@camunda/linting 3.40.0 → 3.41.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.
@@ -1,47 +1,47 @@
1
- function getEventDefinition(node) {
2
- const eventDefinitions = node.get('eventDefinitions');
3
-
4
- return eventDefinitions && eventDefinitions[ 0 ];
5
- }
6
-
7
- function getEventDefinitionPrefix(eventDefinition) {
8
- const localType = getLocalType(eventDefinition);
9
-
10
- return localType.replace('EventDefinition', '');
11
- }
12
-
13
- function getLocalType(node) {
14
- const { $descriptor } = node;
15
-
16
- const { localName } = $descriptor.ns;
17
-
18
- return localName;
19
- }
20
-
21
- function formatTypeString(string) {
22
- return string.replace(/([a-z])([A-Z])/g, '$1 $2').trim();
23
- }
24
-
25
- export function getTypeString(node) {
26
- let type = getLocalType(node);
27
-
28
- const eventDefinition = getEventDefinition(node);
29
-
30
- if (eventDefinition) {
31
- type = `${ getEventDefinitionPrefix(eventDefinition) }${ type }`;
32
- } else if ([
33
- 'BoundaryEvent',
34
- 'EndEvent',
35
- 'IntermediateCatchEvent',
36
- 'IntermediateThrowEvent',
37
- 'StartEvent'
38
- ].includes(type)) {
39
- type = `Undefined ${ type }`;
40
- }
41
-
42
- if (type === 'Task') {
43
- type = 'Undefined Task';
44
- }
45
-
46
- return formatTypeString(type);
1
+ function getEventDefinition(node) {
2
+ const eventDefinitions = node.get('eventDefinitions');
3
+
4
+ return eventDefinitions && eventDefinitions[ 0 ];
5
+ }
6
+
7
+ function getEventDefinitionPrefix(eventDefinition) {
8
+ const localType = getLocalType(eventDefinition);
9
+
10
+ return localType.replace('EventDefinition', '');
11
+ }
12
+
13
+ function getLocalType(node) {
14
+ const { $descriptor } = node;
15
+
16
+ const { localName } = $descriptor.ns;
17
+
18
+ return localName;
19
+ }
20
+
21
+ function formatTypeString(string) {
22
+ return string.replace(/([a-z])([A-Z])/g, '$1 $2').trim();
23
+ }
24
+
25
+ export function getTypeString(node) {
26
+ let type = getLocalType(node);
27
+
28
+ const eventDefinition = getEventDefinition(node);
29
+
30
+ if (eventDefinition) {
31
+ type = `${ getEventDefinitionPrefix(eventDefinition) }${ type }`;
32
+ } else if ([
33
+ 'BoundaryEvent',
34
+ 'EndEvent',
35
+ 'IntermediateCatchEvent',
36
+ 'IntermediateThrowEvent',
37
+ 'StartEvent'
38
+ ].includes(type)) {
39
+ type = `Undefined ${ type }`;
40
+ }
41
+
42
+ if (type === 'Task') {
43
+ type = 'Undefined Task';
44
+ }
45
+
46
+ return formatTypeString(type);
47
47
  }
@@ -1,9 +1,9 @@
1
- import cmp from 'semver-compare';
2
-
3
- export function greaterOrEqual(a, b) {
4
- return cmp(a, b) !== -1;
5
- }
6
-
7
- export function toSemverMinor(executionPlatformVersion) {
8
- return executionPlatformVersion.split('.').slice(0, 2).join('.');
1
+ import cmp from 'semver-compare';
2
+
3
+ export function greaterOrEqual(a, b) {
4
+ return cmp(a, b) !== -1;
5
+ }
6
+
7
+ export function toSemverMinor(executionPlatformVersion) {
8
+ return executionPlatformVersion.split('.').slice(0, 2).join('.');
9
9
  }
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@camunda/linting",
3
- "version": "3.40.0",
4
- "description": "Linting for Camunda",
5
- "main": "index.js",
6
- "scripts": {
7
- "all": "npm run lint && npm test",
8
- "dev": "npm run test:watch",
9
- "lint": "eslint .",
10
- "start": "npm run start:cloud",
11
- "start:platform": "cross-env SINGLE_START=platform npm run test:watch",
12
- "start:cloud": "cross-env SINGLE_START=cloud npm run test:watch",
13
- "test": "npm run compile-config && karma start",
14
- "test:watch": "npm test -- --auto-watch --no-single-run",
15
- "compile-config": "node tasks/compile-config.js",
16
- "prepublish": "npm run compile-config"
17
- },
18
- "keywords": [
19
- "bpmnlint",
20
- "camunda"
21
- ],
22
- "author": {
23
- "name": "Philipp Fromme",
24
- "url": "https://github.com/philippfromme"
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "https://github.com/camunda/linting"
29
- },
30
- "license": "MIT",
31
- "dependencies": {
32
- "@bpmn-io/diagram-js-ui": "^0.2.3",
33
- "bpmn-moddle": "^9.0.1",
34
- "bpmnlint": "^11.6.0",
35
- "bpmnlint-plugin-camunda-compat": "^2.39.0",
36
- "bpmnlint-utils": "^1.0.2",
37
- "camunda-bpmn-moddle": "^7.0.1",
38
- "clsx": "^2.0.0",
39
- "min-dash": "^4.0.0",
40
- "min-dom": "^5.1.1",
41
- "modeler-moddle": "^0.2.0",
42
- "semver-compare": "^1.0.0",
43
- "zeebe-bpmn-moddle": "^1.9.0"
44
- },
45
- "devDependencies": {
46
- "bpmn-js": "^18.3.1",
47
- "bpmn-js-element-templates": "^2.5.3",
48
- "bpmn-js-properties-panel": "^5.38.0",
49
- "camunda-bpmn-js-behaviors": "^1.9.1",
50
- "chai": "^4.5.0",
51
- "cross-env": "^7.0.3",
52
- "eslint": "^8.57.1",
53
- "eslint-plugin-bpmn-io": "^1.0.1",
54
- "karma": "^6.4.4",
55
- "karma-chrome-launcher": "^3.2.0",
56
- "karma-debug-launcher": "0.0.5",
57
- "karma-env-preprocessor": "^0.1.1",
58
- "karma-mocha": "^2.0.1",
59
- "karma-sinon-chai": "^2.0.2",
60
- "karma-webpack": "^5.0.1",
61
- "mocha": "^10.7.3",
62
- "mocha-test-container-support": "^0.2.0",
63
- "puppeteer": "^23.3.1",
64
- "sinon": "^17.0.1",
65
- "sinon-chai": "^3.7.0",
66
- "webpack": "^5.94.0"
67
- },
68
- "peerDependencies": {
69
- "bpmn-js-properties-panel": ">= 2.0.0"
70
- },
71
- "peerDependenciesMeta": {
72
- "bpmn-js-properties-panel": {
73
- "optional": true
74
- }
75
- },
76
- "files": [
77
- "assets",
78
- "lib",
79
- "index.js",
80
- "modeler.js"
81
- ],
82
- "publishConfig": {
83
- "access": "public"
84
- }
85
- }
1
+ {
2
+ "name": "@camunda/linting",
3
+ "version": "3.41.0",
4
+ "description": "Linting for Camunda",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "all": "npm run lint && npm test",
8
+ "dev": "npm run test:watch",
9
+ "lint": "eslint .",
10
+ "start": "npm run start:cloud",
11
+ "start:platform": "cross-env SINGLE_START=platform npm run test:watch",
12
+ "start:cloud": "cross-env SINGLE_START=cloud npm run test:watch",
13
+ "test": "npm run compile-config && karma start",
14
+ "test:watch": "npm test -- --auto-watch --no-single-run",
15
+ "compile-config": "node tasks/compile-config.js",
16
+ "prepublish": "npm run compile-config"
17
+ },
18
+ "keywords": [
19
+ "bpmnlint",
20
+ "camunda"
21
+ ],
22
+ "author": {
23
+ "name": "Philipp Fromme",
24
+ "url": "https://github.com/philippfromme"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/camunda/linting"
29
+ },
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "@bpmn-io/diagram-js-ui": "^0.2.3",
33
+ "bpmn-moddle": "^9.0.2",
34
+ "bpmnlint": "^11.6.0",
35
+ "bpmnlint-plugin-camunda-compat": "^2.41.3",
36
+ "bpmnlint-utils": "^1.0.2",
37
+ "camunda-bpmn-moddle": "^7.0.1",
38
+ "clsx": "^2.0.0",
39
+ "min-dash": "^4.0.0",
40
+ "min-dom": "^5.1.1",
41
+ "modeler-moddle": "^0.2.0",
42
+ "semver-compare": "^1.0.0",
43
+ "zeebe-bpmn-moddle": "^1.11.0"
44
+ },
45
+ "devDependencies": {
46
+ "bpmn-js": "^18.6.2",
47
+ "bpmn-js-element-templates": "^2.10.0",
48
+ "bpmn-js-properties-panel": "^5.41.2",
49
+ "camunda-bpmn-js-behaviors": "^1.11.0",
50
+ "chai": "^4.5.0",
51
+ "cross-env": "^7.0.3",
52
+ "eslint": "^8.57.1",
53
+ "eslint-plugin-bpmn-io": "^1.0.1",
54
+ "karma": "^6.4.4",
55
+ "karma-chrome-launcher": "^3.2.0",
56
+ "karma-debug-launcher": "0.0.5",
57
+ "karma-env-preprocessor": "^0.1.1",
58
+ "karma-mocha": "^2.0.1",
59
+ "karma-sinon-chai": "^2.0.2",
60
+ "karma-webpack": "^5.0.1",
61
+ "mocha": "^11.7.1",
62
+ "mocha-test-container-support": "^0.2.0",
63
+ "puppeteer": "^24.16.2",
64
+ "sinon": "^17.0.1",
65
+ "sinon-chai": "^3.7.0",
66
+ "webpack": "^5.101.2"
67
+ },
68
+ "peerDependencies": {
69
+ "bpmn-js-properties-panel": ">= 2.0.0"
70
+ },
71
+ "peerDependenciesMeta": {
72
+ "bpmn-js-properties-panel": {
73
+ "optional": true
74
+ }
75
+ },
76
+ "files": [
77
+ "assets",
78
+ "lib",
79
+ "index.js",
80
+ "modeler.js"
81
+ ],
82
+ "publishConfig": {
83
+ "access": "public"
84
+ }
85
+ }