bpmnlint-plugin-camunda-compat 2.30.0 → 2.32.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/index.js CHANGED
@@ -96,7 +96,8 @@ const camundaCloud86Rules = withConfig({
96
96
  }, { version: '8.6' });
97
97
 
98
98
  const camundaCloud87Rules = withConfig({
99
- ...camundaCloud86Rules
99
+ ...camundaCloud86Rules,
100
+ 'ad-hoc-sub-process': 'error',
100
101
  }, { version: '8.7' });
101
102
 
102
103
  const camundaCloud88Rules = withConfig({
@@ -132,6 +133,7 @@ const camundaPlatform723Rules = withConfig(camundaPlatform721Rules, {
132
133
  });
133
134
 
134
135
  const rules = {
136
+ 'ad-hoc-sub-process': './rules/camunda-cloud/ad-hoc-sub-process',
135
137
  'element-type': './rules/camunda-cloud/element-type',
136
138
  'called-element': './rules/camunda-cloud/called-element',
137
139
  'collapsed-subprocess': './rules/camunda-cloud/collapsed-subprocess',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.30.0",
3
+ "version": "2.32.0",
4
4
  "description": "A bpmnlint plug-in for Camunda compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,22 +24,22 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "bpmn-moddle": "^8.1.0",
28
- "bpmnlint": "^10.2.0",
27
+ "bpmn-moddle": "^9.0.1",
28
+ "bpmnlint": "^11.1.0",
29
29
  "camunda-bpmn-moddle": "^7.0.1",
30
30
  "chai": "^4.4.1",
31
- "eslint": "^8.56.0",
32
- "eslint-plugin-bpmn-io": "^1.0.0",
31
+ "eslint": "^9.20.1",
32
+ "eslint-plugin-bpmn-io": "^2.1.0",
33
33
  "mocha": "^10.2.0",
34
34
  "modeler-moddle": "^0.2.0",
35
35
  "sinon": "^17.0.1",
36
36
  "sinon-chai": "^3.7.0",
37
- "zeebe-bpmn-moddle": "^1.7.0"
37
+ "zeebe-bpmn-moddle": "^1.9.0"
38
38
  },
39
39
  "dependencies": {
40
- "@bpmn-io/feel-lint": "^1.2.0",
40
+ "@bpmn-io/feel-lint": "^1.4.0",
41
41
  "@bpmn-io/moddle-utils": "^0.2.1",
42
- "bpmnlint-utils": "^1.0.2",
42
+ "bpmnlint-utils": "^1.1.1",
43
43
  "min-dash": "^4.1.1",
44
44
  "semver-compare": "^1.0.0"
45
45
  },
@@ -48,6 +48,6 @@
48
48
  "index.js"
49
49
  ],
50
50
  "engines": {
51
- "node": "*"
51
+ "node": ">= 20"
52
52
  }
53
53
  }
@@ -0,0 +1,34 @@
1
+ const { is, isAny } = require('bpmnlint-utils');
2
+
3
+ const { reportErrors } = require('../utils/reporter');
4
+
5
+ const { skipInNonExecutableProcess } = require('../utils/rule');
6
+
7
+ module.exports = skipInNonExecutableProcess(function() {
8
+ function check(node, reporter) {
9
+ if (!is(node, 'bpmn:AdHocSubProcess')) {
10
+ return;
11
+ }
12
+
13
+ // Ad-Hoc Sub-Process must contain at least one activity
14
+ if (node.get('flowElements').some(isActivity)) {
15
+ return;
16
+ }
17
+
18
+ reportErrors(node, reporter, {
19
+ message: 'Element of type <bpmn:AdHocSubProcess> must contain at least one activity',
20
+ data: {
21
+ node,
22
+ parentNode: null
23
+ }
24
+ });
25
+ }
26
+
27
+ return {
28
+ check
29
+ };
30
+ });
31
+
32
+ function isActivity(element) {
33
+ return isAny(element, [ 'bpmn:Task', 'bpmn:SubProcess' ]);
34
+ }
@@ -63,5 +63,6 @@ module.exports = {
63
63
  'bpmn:SubProcess': '1.0',
64
64
  'bpmn:Task': '8.2',
65
65
  'bpmn:TextAnnotation': '1.0',
66
- 'bpmn:UserTask': '1.0'
66
+ 'bpmn:UserTask': '1.0',
67
+ 'bpmn:AdHocSubProcess': '8.7',
67
68
  };