bpmnlint 7.2.1 → 7.3.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/CHANGELOG.md +7 -1
- package/README.md +4 -1
- package/bin/bpmnlint.js +11 -0
- package/lib/testers/rule-tester.js +4 -4
- package/package.json +1 -1
- package/rules/no-bpmndi.js +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,15 @@ All notable changes to [bpmnlint](https://github.com/bpmn-io/bpmnlint) are docum
|
|
|
6
6
|
|
|
7
7
|
___Note:__ Yet to be released changes appear here._
|
|
8
8
|
|
|
9
|
+
## 7.3.0
|
|
10
|
+
|
|
11
|
+
* `FEAT`: support `--version` command line flag ([#65](https://github.com/bpmn-io/bpmnlint/pull/65))
|
|
12
|
+
* `FEAT`: allow rule testers to provide custom `it`
|
|
13
|
+
* `FIX`: make `no-bpmndi` handle missing `LaneSet#lanes` gracefully ([#63](https://github.com/bpmn-io/bpmnlint/issues/63), [#66](https://github.com/bpmn-io/bpmnlint/pull/66))
|
|
14
|
+
|
|
9
15
|
## 7.2.1
|
|
10
16
|
|
|
11
|
-
* `FIX`: exclude compensation boundary and activity in `no-disconnected` check ([#
|
|
17
|
+
* `FIX`: exclude compensation boundary and activity in `no-disconnected` check ([#60](https://github.com/bpmn-io/bpmnlint/pull/60))
|
|
12
18
|
|
|
13
19
|
## 7.2.0
|
|
14
20
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Validate your BPMN diagrams based on configurable lint rules.
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Installation
|
|
9
9
|
|
|
10
10
|
Install the utility via [npm](https://www.npmjs.com/package/bpmnlint):
|
|
11
11
|
|
|
@@ -13,6 +13,9 @@ Install the utility via [npm](https://www.npmjs.com/package/bpmnlint):
|
|
|
13
13
|
npm install -g bpmnlint
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
16
19
|
Validate your diagrams via the commandline:
|
|
17
20
|
|
|
18
21
|
```sh
|
package/bin/bpmnlint.js
CHANGED
|
@@ -146,6 +146,12 @@ function errorAndExit(...args) {
|
|
|
146
146
|
process.exit(1);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
function showVersionAndExit() {
|
|
150
|
+
console.log(require('../package.json').version);
|
|
151
|
+
|
|
152
|
+
process.exit(0);
|
|
153
|
+
}
|
|
154
|
+
|
|
149
155
|
function infoAndExit(...args) {
|
|
150
156
|
console.log(...args);
|
|
151
157
|
|
|
@@ -314,6 +320,7 @@ async function run() {
|
|
|
314
320
|
const {
|
|
315
321
|
help,
|
|
316
322
|
init,
|
|
323
|
+
version,
|
|
317
324
|
config: configOverridePath,
|
|
318
325
|
_: files
|
|
319
326
|
} = mri(process.argv.slice(2), {
|
|
@@ -323,6 +330,10 @@ async function run() {
|
|
|
323
330
|
}
|
|
324
331
|
});
|
|
325
332
|
|
|
333
|
+
if (version) {
|
|
334
|
+
return showVersionAndExit();
|
|
335
|
+
}
|
|
336
|
+
|
|
326
337
|
if (help) {
|
|
327
338
|
return infoAndExit(HELP_STRING);
|
|
328
339
|
}
|
|
@@ -33,9 +33,9 @@ function verify(ruleName, rule, testCases) {
|
|
|
33
33
|
|
|
34
34
|
describe('should lint valid', function() {
|
|
35
35
|
|
|
36
|
-
testCases.valid.forEach(({ moddleElement }, idx) => (
|
|
36
|
+
testCases.valid.forEach(({ moddleElement, it: _it }, idx) => (
|
|
37
37
|
|
|
38
|
-
it(`test case #${idx + 1}`, function() {
|
|
38
|
+
(_it || it)(`test case #${idx + 1}`, function() {
|
|
39
39
|
return (
|
|
40
40
|
Promise.resolve(moddleElement)
|
|
41
41
|
.then(moddleRoot => {
|
|
@@ -54,9 +54,9 @@ function verify(ruleName, rule, testCases) {
|
|
|
54
54
|
|
|
55
55
|
describe('should lint invalid', function() {
|
|
56
56
|
|
|
57
|
-
testCases.invalid.forEach(({ moddleElement, report }, idx) => (
|
|
57
|
+
testCases.invalid.forEach(({ moddleElement, report, it: _it }, idx) => (
|
|
58
58
|
|
|
59
|
-
it(`test case #${idx}`, function() {
|
|
59
|
+
(_it || it)(`test case #${idx}`, function() {
|
|
60
60
|
|
|
61
61
|
if (!Array.isArray(report)) {
|
|
62
62
|
report = [
|
package/package.json
CHANGED
package/rules/no-bpmndi.js
CHANGED
|
@@ -54,6 +54,9 @@ module.exports = function() {
|
|
|
54
54
|
function getAllBpmnElements(rootElements) {
|
|
55
55
|
return flatten(rootElements.map((rootElement) => {
|
|
56
56
|
|
|
57
|
+
const laneSet =
|
|
58
|
+
rootElement.laneSets && rootElement.laneSets[0] || rootElement.childLaneSet;
|
|
59
|
+
|
|
57
60
|
// Include
|
|
58
61
|
// * flowElements (e.g., tasks, sequenceFlows),
|
|
59
62
|
// * nested flowElements,
|
|
@@ -68,10 +71,8 @@ function getAllBpmnElements(rootElements) {
|
|
|
68
71
|
(rootElement.flowElements && getAllBpmnElements(rootElement.flowElements.filter(hasFlowElements))) || [],
|
|
69
72
|
rootElement.participants || [],
|
|
70
73
|
rootElement.artifacts || [],
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(rootElement.childLaneSet && rootElement.childLaneSet.lanes) || [],
|
|
74
|
-
(rootElement.childLaneSet && getAllBpmnElements(rootElement.childLaneSet.lanes.filter(hasChildLaneSet))) || []
|
|
74
|
+
laneSet && laneSet.lanes || [],
|
|
75
|
+
laneSet && laneSet.lanes && getAllBpmnElements(laneSet.lanes.filter(hasChildLaneSet)) || []
|
|
75
76
|
));
|
|
76
77
|
|
|
77
78
|
if (elements.length > 0) {
|