bpmnlint-plugin-camunda-compat 2.26.0 → 2.27.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
@@ -93,6 +93,11 @@ const camundaCloud86Rules = withConfig({
93
93
  'version-tag': 'error'
94
94
  }, { version: '8.6' });
95
95
 
96
+ const camundaCloud87Rules = withConfig({
97
+ ...camundaCloud86Rules,
98
+ 'zeebe-user-task': 'error'
99
+ }, { version: '8.7' });
100
+
96
101
  const camundaPlatform719Rules = withConfig({
97
102
  'history-time-to-live': 'info'
98
103
  }, {
@@ -115,6 +120,11 @@ const camundaPlatform722Rules = withConfig(camundaPlatform721Rules, {
115
120
  version: '7.22'
116
121
  });
117
122
 
123
+ const camundaPlatform723Rules = withConfig(camundaPlatform721Rules, {
124
+ platform: 'camunda-platform',
125
+ version: '7.23'
126
+ });
127
+
118
128
  const rules = {
119
129
  'element-type': './rules/camunda-cloud/element-type',
120
130
  'called-element': './rules/camunda-cloud/called-element',
@@ -160,7 +170,8 @@ const rules = {
160
170
  'user-task-definition': './rules/camunda-cloud/user-task-definition',
161
171
  'user-task-form': './rules/camunda-cloud/user-task-form',
162
172
  'version-tag': './rules/camunda-cloud/version-tag',
163
- 'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
173
+ 'wait-for-completion': './rules/camunda-cloud/wait-for-completion',
174
+ 'zeebe-user-task': './rules/camunda-cloud/zeebe-user-task'
164
175
  };
165
176
 
166
177
  const configs = {
@@ -197,6 +208,9 @@ const configs = {
197
208
  'camunda-cloud-8-6': {
198
209
  rules: camundaCloud86Rules
199
210
  },
211
+ 'camunda-cloud-8-7': {
212
+ rules: camundaCloud87Rules
213
+ },
200
214
  'camunda-platform-7-19': {
201
215
  rules: camundaPlatform719Rules
202
216
  },
@@ -208,6 +222,9 @@ const configs = {
208
222
  },
209
223
  'camunda-platform-7-22': {
210
224
  rules: camundaPlatform722Rules
225
+ },
226
+ 'camunda-platform-7-23': {
227
+ rules: camundaPlatform723Rules
211
228
  }
212
229
  };
213
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.26.0",
3
+ "version": "2.27.0",
4
4
  "description": "A bpmnlint plug-in for Camunda compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,6 +1,9 @@
1
1
  const { isString } = require('min-dash');
2
2
 
3
- const { is } = require('bpmnlint-utils');
3
+ const {
4
+ is,
5
+ isAny
6
+ } = require('bpmnlint-utils');
4
7
 
5
8
  const { lintExpression } = require('@bpmn-io/feel-lint');
6
9
 
@@ -18,7 +21,7 @@ module.exports = skipInNonExecutableProcess(function() {
18
21
  return;
19
22
  }
20
23
 
21
- const parentNode = findFlowElement(node);
24
+ const parentNode = findParentNode(node);
22
25
 
23
26
  if (!parentNode) {
24
27
  return;
@@ -74,8 +77,8 @@ const isIgnoredProperty = propertyName => {
74
77
  return propertyName.startsWith('$');
75
78
  };
76
79
 
77
- const findFlowElement = node => {
78
- while (node && !is(node, 'bpmn:FlowElement')) {
80
+ const findParentNode = node => {
81
+ while (node && !isAny(node, [ 'bpmn:FlowElement', 'bpmn:FlowElementsContainer' ])) {
79
82
  node = node.$parent;
80
83
  }
81
84
 
@@ -7,6 +7,9 @@ module.exports = {
7
7
  'bpmn:IntermediateThrowEvent': {
8
8
  'bpmn:MessageEventDefinition': '1.2'
9
9
  },
10
+ 'bpmn:EndEvent': {
11
+ 'bpmn:MessageEventDefinition': '1.2'
12
+ },
10
13
  'bpmn:ScriptTask': '1.1',
11
14
  'bpmn:SendTask': '1.1',
12
15
  'bpmn:ServiceTask': '1.0'
@@ -0,0 +1,25 @@
1
+ const { is } = require('bpmnlint-utils');
2
+
3
+ const { reportErrors } = require('../utils/reporter');
4
+
5
+ const { skipInNonExecutableProcess } = require('../utils/rule');
6
+
7
+ const { hasExtensionElement } = require('../utils/element');
8
+
9
+ module.exports = skipInNonExecutableProcess(function() {
10
+ function check(node, reporter) {
11
+ if (!is(node, 'bpmn:UserTask')) {
12
+ return;
13
+ }
14
+
15
+ const errors = hasExtensionElement(node, 'zeebe:UserTask', node);
16
+
17
+ if (errors && errors.length) {
18
+ reportErrors(node, reporter, errors);
19
+ }
20
+ }
21
+
22
+ return {
23
+ check
24
+ };
25
+ });