A toolbox for displaying and modifying diagrams on the web.
Installations
npm install diagram-js
Developer
bpmn-io
Developer Guide
Module System
CommonJS
Min. Node Version
*
Typescript Support
Yes
Node Version
20.11.1
NPM Version
10.9.0
Statistics
1,710 Stars
2,568 Commits
418 Forks
56 Watching
40 Branches
52 Contributors
Updated on 25 Nov 2024
Bundle Size
35.51 kB
Minified
11.51 kB
Minified + Gzipped
Languages
JavaScript (96.46%)
TypeScript (2.5%)
CSS (1.03%)
Total Downloads
Cumulative downloads
Total Downloads
13,361,086
Last day
10.3%
17,993
Compared to previous day
Last week
5%
92,274
Compared to previous week
Last month
6.3%
377,934
Compared to previous month
Last year
25.8%
4,183,751
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
9
Dev Dependencies
27
diagram-js
A toolbox for displaying and modifying diagrams on the web.
Built with diagram-js
Some libraries / applications built on top of diagram-js:
Part of bpmn.io
- bpmn-js - A BPMN 2.0 viewer / modeler (Demo)
- cmmn-js - A CMMN 1.1 viewer / modeler (Demo)
- dmn-js - A DMN 1.3 viewer / modeler / table editor (Demo)
External
- Apache Seata Saga Designer - A visual orchestration tool for Seata Saga transaction (Demo)
- archimate-js - An ArchiMate diagram viewer and editor (Demo)
- chor-js - A BPMN 2.0 Choreography diagram viewer and editor (Demo)
- Node Sequencer - A Node-Based Sequencer for the Web (Demo)
- object-diagram-js - An object diagram viewer and editor (Demo)
- postit-js - Create Post-it boards on a canvas editor (Demo)
Resources
Development
Prepare the project by installing all dependencies:
1npm install
Then, depending on your use-case you may run any of the following commands:
1# build the library and run all tests 2npm run all 3 4# run the development setup 5npm run dev 6 7# run tests (single run) 8npm test
Expose an environment variable TEST_BROWSERS=(Chrome|Firefox)
to execute the tests in a non-headless browser.
[!NOTE] We do not generate any build artifacts. Required parts of the library should be bundled by consuming libraries as needed instead.
License
MIT
Stable Version
The latest stable version of the package.
Stable Version
15.2.3
MODERATE
2
0/10
Summary
Cross-Site Scripting in diagram-js
Affected Versions
>= 3.0.0, < 3.3.1
Patched Versions
3.3.1
0/10
Summary
Cross-Site Scripting in diagram-js
Affected Versions
< 2.6.2
Patched Versions
2.6.2
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found linked content: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/bpmn-io/.github/SECURITY.md:1
Reason
SAST tool detected but not run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Warn: 16 commits out of 18 are checked with a SAST tool
Reason
Found 6/18 approved changesets -- score normalized to 3
Reason
7 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-7q7g-4xm8-89cq
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/CI.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/CI.yml/develop?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/CI.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CODE_SCANNING.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/CODE_SCANNING.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CODE_SCANNING.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/CODE_SCANNING.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CODE_SCANNING.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/CODE_SCANNING.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/MERGE_MASTER_TO_DEVELOP.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/MERGE_MASTER_TO_DEVELOP.yml/develop?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/MERGE_MASTER_TO_DEVELOP.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/diagram-js/MERGE_MASTER_TO_DEVELOP.yml/develop?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 1 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/MERGE_MASTER_TO_DEVELOP.yml:11
- Warn: no topLevel permission defined: .github/workflows/CI.yml:1
- Warn: no topLevel permission defined: .github/workflows/CODE_SCANNING.yml:1
- Warn: no topLevel permission defined: .github/workflows/MERGE_MASTER_TO_DEVELOP.yml:1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'develop'
- Warn: branch protection not enabled for branch 'main'
Score
5.3
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to diagram-js
diagram-js-direct-editing
Direct editing support for diagram-js
diagram-js-minimap
A minimap for diagram-js
@bpmn-io/diagram-js-ui
[![CI](https://github.com/bpmn-io/diagram-js-ui/actions/workflows/CI.yml/badge.svg)](https://github.com/bpmn-io/diagram-js-ui/actions/workflows/CI.yml)
diagram-js-grid
A visual grid for diagram-js