🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

bpmnlint

Package Overview
Dependencies
Maintainers
10
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmnlint - npm Package Compare versions

Comparing version
7.8.0
to
8.0.0
+1
-1
bin/bpmnlint.js

@@ -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;

# Changelog
All notable changes to [bpmnlint](https://github.com/bpmn-io/bpmnlint) are documented here. We use [semantic versioning](http://semver.org/) for releases.
## Unreleased
___Note:__ Yet to be released changes appear here._
## 7.8.0
* `FEAT`: be able to configure rules ([#82](https://github.com/bpmn-io/bpmnlint/pull/82))
* `FEAT`: be able to configure rules when testing ([#83](https://github.com/bpmn-io/bpmnlint/pull/83))
## 7.7.0
* `FEAT`: fuzzy test for equality of nodes when using `RuleTester#verify` ([#79](https://github.com/bpmn-io/bpmnlint/pull/79/files))
## 7.6.0
* `FEAT`: allow passing object as third parameter to `Reporter#report` ([#75](https://github.com/bpmn-io/bpmnlint/pull/75))
## 7.5.0
* `FEAT`: add optional `path` parameter to `Reporter#report` ([#73](https://github.com/bpmn-io/bpmnlint/pull/73))
* `FEAT`: add optional `name` parameter to `RuleTester#verify` ([#68](https://github.com/bpmn-io/bpmnlint/pull/68))
* `CHORE`: update to `bpmn-moddle@7.1.2`
## 7.4.0
* `FEAT`: resolve local package by name ([#64](https://github.com/bpmn-io/bpmnlint/pull/64))
## 7.3.0
* `FEAT`: support `--version` command line flag ([#65](https://github.com/bpmn-io/bpmnlint/pull/65))
* `FEAT`: allow rule testers to provide custom `it`
* `FIX`: make `no-bpmndi` handle missing `LaneSet#lanes` gracefully ([#63](https://github.com/bpmn-io/bpmnlint/issues/63), [#66](https://github.com/bpmn-io/bpmnlint/pull/66))
## 7.2.1
* `FIX`: exclude compensation boundary and activity in `no-disconnected` check ([#60](https://github.com/bpmn-io/bpmnlint/pull/60))
## 7.2.0
* `FEAT`: add `no-bpmndi` rule ([#55](https://github.com/bpmn-io/bpmnlint/issues/55))
## 7.1.0
* `FEAT`: allow rules to skip sub-tree traversal ([#53](https://github.com/bpmn-io/bpmnlint/issues/53))
* `FEAT`: allow rules to hook into node `enter` and `leave` ([#52](https://github.com/bpmn-io/bpmnlint/issues/52))
## 7.0.1
* `CHORE`: drop debug log statement
## 7.0.0
* `CHORE`: update to `bpmn-moddle@7`
* `CHORE`: reduce library footprint
* `CHORE`: require `NodeJS>=10`
## 6.5.0
* `FEAT`: add globbing support ([#46](https://github.com/bpmn-io/bpmnlint/issues/46))
* `DOCS`: add explaination to `no-inclusive-gateway` rule
## 6.4.0
* `FEAT`: add `superfluous-gateway` check ([#42](https://github.com/bpmn-io/bpmnlint/pull/42/files))
## 6.3.0
* `FEAT`: support rules and configuration provided by scoped packages ([#35](https://github.com/bpmn-io/bpmnlint/issues/35))
* `CHORE`: improve `Node >= 12.20` compatibility ([#37](https://github.com/bpmn-io/bpmnlint/pull/37))
## 6.2.0
* `DOCS`: document existing rules ([#14](https://github.com/bpmn-io/bpmnlint/issues/14))
## 6.1.2
* `FIX`: exclude event-based sub-processes from `no-disconnected` check ([#31](https://github.com/bpmn-io/bpmnlint/issues/31))
## 6.1.1
* `FEAT`: allow tool to be used with `Node >= 8`
## 6.1.0
* `FEAT`: resolve local rules in plug-ins without prefix ([`640e411a`](https://github.com/bpmn-io/bpmnlint/commit/640e411ac8c6045198bd09b79b5c53c6e29e251c))
## 6.0.0
* `FEAT`: resolve plug-in provided rules/configuration local to working directory ([`f1bf331f`](https://github.com/bpmn-io/bpmnlint/commit/f1bf331f4bcece62de16da34bb3f8fda08182fbc))
* `CHORE`: improve errors on rule/plugin resolution failures
* `CHORE`: require `>= node@10.12`
## 5.3.0
* `FEAT`: add `--init` option to create `.bpmnlintrc` in current working directory
## 5.2.0
* `FEAT`: provide help on missing `.bpmnlintrc`
## 5.1.2
* `DOCS`: add package description
## 5.1.1
* `CHORE`: exclude additional development assets from distribution
## 5.1.0
* `FEAT`: add `no-duplicate-sequence-flows` rule ([#22](https://github.com/bpmn-io/bpmnlint/issues/22))
* `FEAT`: catch more BPMN parse errors
* `FEAT`: be able to define multiple expected test results in `RuleTester`
* `FIX`: make `nyc` a development dependency
* `CHORE`: update to `bpmn-moddle@6`
## 5.0.0
* `FEAT`: don't expose utils to rules; use `bpmnlint-utils` instead
## 4.1.0
* `FEAT`: handle and report diagram import errors and warnings via CLI
* `FEAT`: properly handle generic moddle elements during rule checking
* `FEAT`: report rule execution errors
## 4.0.0
* `FEAT`: add ability to batch lint multiple files via CLI
* `FEAT`: don't resolve disabled rules ([`6c45f3f9`](https://github.com/bpmn-io/bpmnlint/commit/6c45f3f952a412dda05deb5c57861a1c76af23bb))
* `CHORE`: unify messages of built-in rules
* `CHORE`: adopt cli output to eslint styling
## 3.3.1
* `FIX`: handle empty flow element containers in rules
## 3.3.0
* `FEAT`: do not expose disabled rules when bundling `.bpmnlintrc`
## 3.2.1
* `DOCS`: fix readme code snippet
## 3.2.0
* `FEAT`: add ability to pass linter configuration via constructor
## 3.1.0
* `FEAT`: add support script to compile `.bpmnlintrc` files to JavaScript ([`cf53a389`](https://github.com/bpmn-io/bpmnlint/commit/cf53a3894b6bd821e18ddfc7bdaa8da857356a37))
## 3.0.0
#### Breaking Changes
* `FEAT`: treat unprefixed rules as built-in ones
## 2.0.0
#### Breaking Changes
* `CHORE`: make `NodeResolver` a constructor
* `CHORE`: unify file names to `dashed-case`
* `CHORE`: rework `Resolver` APIs
#### Other Enhancements
* `FEAT`: add `StaticResolver` to load cached resources
* `FEAT`: add `{ Linter }` as a library export
* `CHORE`: move rule and config name resolution to linter
* `CHORE`: catch all cli errors and exit accordingly
## 1.0.0
* `FEAT`: add numerous new rules ([#5](https://github.com/bpmn-io/bpmnlint/issues/5))
* `FEAT`: add `bpmnlint:all` configuration
* `FEAT`: improve `label-required` rule ([#11](https://github.com/bpmn-io/bpmnlint/issues/11))
* `FEAT`: group lint results by rule names
* `FEAT`: exit cli with code=1 on lint errors
* `FEAT`: add `isAny(node, [ ... types ])` method to `utils`
* `CHORE`: improve / test cover existing rules
* `CHORE`: include new rules in `bpmnlint:recommended` configuration
## 1.0.0-alpha6
* `DOCS`: documentation simplification / improvements
## 1.0.0-alpha5
_Initial stable release._
* `FEAT`: configure, resolve and execute local and external rules
* `FEAT`: extend external configuration via `extends`
* `FEAT`: make rule and configuration resolution async
* `FEAT`: provide `bpmnlint:recommended` configuration
* `CHORE`: `linter` is now a constructor, offering a `#lint(moddleElement, config)` method
* `CHORE`: moved library to [bpmn-io/bpmnlint](https://github.com/bpmn-io/bpmnlint)
* `CHORE`: full rewrite of internals
* `CHORE`: `utils` API change
## ...
Check `git log` for earlier history.