bpmnlint
Advanced tools
Comparing version 7.8.0 to 8.0.0
@@ -31,3 +31,3 @@ #!/usr/bin/env node | ||
const { pathStringify } = require('@philippfromme/moddle-helpers'); | ||
const { pathStringify } = require('@bpmn-io/moddle-utils'); | ||
@@ -34,0 +34,0 @@ const CONFIG_NAME = '.bpmnlintrc'; |
@@ -24,3 +24,3 @@ const Linter = require('../linter'); | ||
// only process and serialize enabled rules | ||
const enabledRules = Object.keys(resolvedRules).reduce(function(enabledRules, key) { | ||
const rules = Object.keys(resolvedRules).reduce(function(rules, key) { | ||
const value = resolvedRules[key]; | ||
@@ -30,10 +30,12 @@ | ||
if (category !== 'off') { | ||
enabledRules[key] = value; | ||
if (category === 'off') { | ||
rules[key] = 0; | ||
} else { | ||
rules[key] = value; | ||
} | ||
return enabledRules; | ||
return rules; | ||
}, {}); | ||
const serializedRules = JSON.stringify(enabledRules, null, ' '); | ||
const serializedRules = JSON.stringify(rules, null, ' '); | ||
@@ -86,4 +88,8 @@ const preambleCode = ` | ||
const importCode = Object.keys(enabledRules).map((key, idx) => { | ||
const importCode = Object.entries(rules).map(([ key, value ], idx) => { | ||
if (!value) { | ||
return null; | ||
} | ||
const { | ||
@@ -96,3 +102,3 @@ pkg, ruleName | ||
cache['${pkg}/${ruleName}'] = rule_${idx};`; | ||
}).join('\n'); | ||
}).filter(e => e).join('\n'); | ||
@@ -99,0 +105,0 @@ return `${preambleCode}\n\n${importCode}`; |
@@ -99,3 +99,3 @@ /* global it, describe, beforeEach */ | ||
function getTitle(idx, name) { | ||
return `test case #${ idx + 1 }${ name ? ` ${ name }`: '' }`; | ||
return `test case #${ idx + 1 }${ name ? ` ${ name }` : '' }`; | ||
} | ||
@@ -102,0 +102,0 @@ |
{ | ||
"name": "bpmnlint", | ||
"description": "Validate your BPMN diagrams based on configurable lint rules", | ||
"version": "7.8.0", | ||
"version": "8.0.0", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"engines": { | ||
"node": ">= 10" | ||
"node": ">= 12" | ||
}, | ||
@@ -41,9 +41,9 @@ "license": "MIT", | ||
"dependencies": { | ||
"@philippfromme/moddle-helpers": "^0.1.0", | ||
"ansi-colors": "^4.1.1", | ||
"bpmn-moddle": "^7.1.2", | ||
"@bpmn-io/moddle-utils": "^0.1.0", | ||
"ansi-colors": "^4.1.3", | ||
"bpmn-moddle": "^7.1.3", | ||
"bpmnlint-utils": "^1.0.2", | ||
"cli-table": "^0.3.9", | ||
"cli-table": "^0.3.11", | ||
"color-support": "^1.1.3", | ||
"min-dash": "^3.8.0", | ||
"min-dash": "^3.8.1", | ||
"mri": "^1.2.0", | ||
@@ -55,12 +55,18 @@ "pluralize": "^7.0.0", | ||
"chai": "^4.3.4", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-bpmn-io": "^0.11.0", | ||
"eslint": "^8.23.1", | ||
"eslint-plugin-bpmn-io": "^0.16.0", | ||
"esm": "^3.2.25", | ||
"execa": "^2.1.0", | ||
"install-local": "^1.0.0", | ||
"execa": "^5.1.1", | ||
"install-local": "^3.0.1", | ||
"mocha": "^8.4.0", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^15.1.0", | ||
"strip-indent": "^2.0.0" | ||
} | ||
"strip-indent": "^3.0.0" | ||
}, | ||
"files": [ | ||
"bin", | ||
"config", | ||
"lib", | ||
"rules" | ||
] | ||
} |
@@ -56,3 +56,2 @@ const { | ||
return flatten(rootElements.map((rootElement) => { | ||
const laneSet = | ||
@@ -70,2 +69,3 @@ rootElement.laneSets && rootElement.laneSets[0] || rootElement.childLaneSet; | ||
// * nested childLaneSets | ||
// * messageFlows | ||
const elements = flatten([].concat( | ||
@@ -77,3 +77,4 @@ rootElement.flowElements || [], | ||
laneSet && laneSet.lanes || [], | ||
laneSet && laneSet.lanes && getAllBpmnElements(laneSet.lanes.filter(hasChildLaneSet)) || [] | ||
laneSet && laneSet.lanes && getAllBpmnElements(laneSet.lanes.filter(hasChildLaneSet)) || [], | ||
rootElement.messageFlows || [] | ||
)); | ||
@@ -121,3 +122,3 @@ | ||
function hasVisualRepresentation(element) { | ||
const noVisRepresentation = ['bpmn:DataObject']; | ||
const noVisRepresentation = [ 'bpmn:DataObject' ]; | ||
@@ -124,0 +125,0 @@ return noVisRepresentation.includes(element.$type) ? false : true; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1659
50321
33
1
+ Added@bpmn-io/moddle-utils@^0.1.0
+ Added@bpmn-io/moddle-utils@0.1.0(transitive)
- Removed@philippfromme/moddle-helpers@^0.1.0
- Removed@philippfromme/moddle-helpers@0.1.0(transitive)
Updatedansi-colors@^4.1.3
Updatedbpmn-moddle@^7.1.3
Updatedcli-table@^0.3.11
Updatedmin-dash@^3.8.1