bpmnlint 10.3.1 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +11 -12
- package/rules/no-bpmndi.js +2 -2
- package/rules/no-overlapping-elements.js +9 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmnlint",
|
|
3
3
|
"description": "Validate your BPMN diagrams based on configurable lint rules",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11.0.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"bpmnlint",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": ">=
|
|
26
|
+
"node": ">= 20"
|
|
27
27
|
},
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"scripts": {
|
|
30
30
|
"all": "run-s lint test-coverage",
|
|
31
|
-
"lint": "eslint .
|
|
31
|
+
"lint": "eslint .",
|
|
32
32
|
"dev": "npm test -- --watch",
|
|
33
33
|
"test": "mocha --exclude 'test/integration/*/**' 'test/**/*.*js'",
|
|
34
34
|
"test-coverage": "nyc --reporter=lcov --reporter=html npm test",
|
|
@@ -40,26 +40,25 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@bpmn-io/moddle-utils": "^0.2.1",
|
|
42
42
|
"ansi-colors": "^4.1.3",
|
|
43
|
-
"bpmn-moddle": "^
|
|
43
|
+
"bpmn-moddle": "^9.0.1",
|
|
44
44
|
"bpmnlint-utils": "^1.1.1",
|
|
45
45
|
"cli-table": "^0.3.11",
|
|
46
46
|
"color-support": "^1.1.3",
|
|
47
|
-
"min-dash": "^4.2.
|
|
47
|
+
"min-dash": "^4.2.2",
|
|
48
48
|
"mri": "^1.2.0",
|
|
49
49
|
"pluralize": "^7.0.0",
|
|
50
50
|
"tiny-glob": "^0.2.9"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@bpmn-io/bpmnlint-generate-docs-images": "^0.4.0",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"eslint": "^
|
|
57
|
-
"
|
|
58
|
-
"execa": "^8.0.1",
|
|
54
|
+
"chai": "^4.5.0",
|
|
55
|
+
"eslint": "^9.17.0",
|
|
56
|
+
"eslint-plugin-bpmn-io": "^2.0.2",
|
|
57
|
+
"execa": "^9.5.2",
|
|
59
58
|
"install-local": "^3.0.1",
|
|
60
|
-
"mocha": "^
|
|
59
|
+
"mocha": "^11.0.1",
|
|
61
60
|
"npm-run-all": "^4.1.5",
|
|
62
|
-
"nyc": "^
|
|
61
|
+
"nyc": "^17.1.0",
|
|
63
62
|
"strip-indent": "^3.0.0"
|
|
64
63
|
},
|
|
65
64
|
"files": [
|
package/rules/no-bpmndi.js
CHANGED
|
@@ -103,13 +103,13 @@ function getAllBpmnElements(rootElements) {
|
|
|
103
103
|
*/
|
|
104
104
|
function getAllDiBpmnReferences(definitionsNode) {
|
|
105
105
|
return flatten(
|
|
106
|
-
definitionsNode.diagrams.map((diagram) => {
|
|
106
|
+
definitionsNode.get('diagrams').map((diagram) => {
|
|
107
107
|
|
|
108
108
|
const diElements = diagram.plane.planeElement || [];
|
|
109
109
|
|
|
110
110
|
return diElements.map((element) => {
|
|
111
111
|
|
|
112
|
-
return element.bpmnElement
|
|
112
|
+
return element.bpmnElement?.id;
|
|
113
113
|
});
|
|
114
114
|
})
|
|
115
115
|
);
|
|
@@ -108,7 +108,15 @@ function checkElementsArray(elements, elementsToReport, diObjects) {
|
|
|
108
108
|
continue;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
const bounds1 = diObjects.get(element)?.bounds;
|
|
112
|
+
const bounds2 = diObjects.get(element2)?.bounds;
|
|
113
|
+
|
|
114
|
+
// ignore if an element doesn't have bounds
|
|
115
|
+
if (!bounds1 || !bounds2) {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (isCollision(bounds1, bounds2)) {
|
|
112
120
|
elementsToReport.add(element);
|
|
113
121
|
elementsToReport.add(element2);
|
|
114
122
|
}
|