bpmnlint 9.1.0 → 10.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const path = require('path')
|
|
1
|
+
const path = require('path');
|
|
2
2
|
|
|
3
3
|
const { isString } = require('min-dash');
|
|
4
4
|
|
|
@@ -133,7 +133,7 @@ function createImportStatement(pkg, ruleName, idx, resolver) {
|
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
const rulePath = computeRuleImport(resolver, pkg, rule);
|
|
136
|
+
const rulePath = computeRuleImport(resolver, pkg, originalPkg, rule);
|
|
137
137
|
|
|
138
138
|
return `
|
|
139
139
|
import rule_${ idx } from '${rulePath}';
|
|
@@ -150,15 +150,23 @@ import rule_${ idx } from '${ pkg }/rules/${ ruleName }';
|
|
|
150
150
|
cache['${ originalPkg }/${ ruleName }'] = rule_${ idx };`;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
function computeRuleImport(resolver, pkg, rule) {
|
|
153
|
+
function computeRuleImport(resolver, pkg, originalPkg, rule) {
|
|
154
154
|
|
|
155
155
|
// local reference, resolved relative to pkg location
|
|
156
156
|
if (rule.startsWith('.')) {
|
|
157
|
-
const
|
|
157
|
+
const pkgJsonPath = resolver.require.resolve(`${ pkg }/package.json`);
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
const pkgMainPath = resolver.require.resolve(pkg);
|
|
160
|
+
|
|
161
|
+
const relativePkgMainPath = path.relative(
|
|
162
|
+
path.dirname(pkgJsonPath),
|
|
163
|
+
path.dirname(pkgMainPath)
|
|
164
|
+
);
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
return path.posix.normalize(`${ originalPkg }/${ relativePkgMainPath }/${ rule }`);
|
|
167
|
+
} else {
|
|
168
|
+
|
|
169
|
+
// absolute reference
|
|
170
|
+
return path.posix.normalize(rule);
|
|
171
|
+
}
|
|
164
172
|
}
|
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": "10.0.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"bpmnlint",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": ">=
|
|
26
|
+
"node": ">= 16"
|
|
27
27
|
},
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"scripts": {
|
|
30
30
|
"all": "run-s lint test-coverage",
|
|
31
31
|
"lint": "eslint .",
|
|
32
32
|
"dev": "npm test -- --watch",
|
|
33
|
-
"test": "mocha
|
|
33
|
+
"test": "mocha --exclude 'test/integration/*/**' 'test/**/*.*js'",
|
|
34
34
|
"test-coverage": "nyc --reporter=lcov --reporter=html npm test",
|
|
35
35
|
"generate-docs-images": "npx @bpmn-io/bpmnlint-generate-docs-images ."
|
|
36
36
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"bpmnlint": "./bin/bpmnlint.js"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@bpmn-io/moddle-utils": "^0.2.
|
|
41
|
+
"@bpmn-io/moddle-utils": "^0.2.1",
|
|
42
42
|
"ansi-colors": "^4.1.3",
|
|
43
43
|
"bpmn-moddle": "^8.0.1",
|
|
44
44
|
"bpmnlint-utils": "^1.1.1",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@bpmn-io/bpmnlint-generate-docs-images": "^0.4.0",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"bpmnlint": ".",
|
|
55
|
+
"chai": "^4.3.8",
|
|
56
|
+
"eslint": "^8.49.0",
|
|
56
57
|
"eslint-plugin-bpmn-io": "^1.0.0",
|
|
57
|
-
"
|
|
58
|
-
"execa": "^5.1.1",
|
|
58
|
+
"execa": "^8.0.1",
|
|
59
59
|
"install-local": "^3.0.1",
|
|
60
|
-
"mocha": "^
|
|
60
|
+
"mocha": "^10.2.0",
|
|
61
61
|
"npm-run-all": "^4.1.5",
|
|
62
62
|
"nyc": "^15.1.0",
|
|
63
63
|
"strip-indent": "^3.0.0"
|
package/rules/fake-join.js
CHANGED