Socket
Socket
Sign inDemoInstall

bpmnlint

Package Overview
Dependencies
Maintainers
3
Versions
61
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 5.1.2 to 5.2.0

50

bin/bpmnlint.js

@@ -248,16 +248,9 @@ #!/usr/bin/env node

async function handleConfig(configString) {
console.log();
async function lint(config) {
let config;
try {
config = JSON.parse(configString);
} catch (e) {
return logAndExit('Error: Could not parse configuration file', e);
}
let errorCount = 0;
let warningCount = 0;
console.log();
for (let i = 0; i < cli.input.length; i++) {

@@ -295,15 +288,32 @@ let results = await lintDiagram(cli.input[i], config);

const { config } = cli.flags;
async function run() {
const configPath = config || '.bpmnlintrc';
const configOverridePath = cli.flags.config;
readFile(configPath, 'utf-8').then(handleConfig, (error) => {
const configPath = configOverridePath || '.bpmnlintrc';
const message = (
config
? `Error: Could not read ${ config }`
: 'Error: Could not locate configuration'
);
let configString, config;
logAndExit(message, error);
}).catch(logAndExit);
try {
configString = await readFile(configPath, 'utf-8');
} catch (error) {
const message = (
configOverridePath
? `Error: Could not read ${ configOverridePath }`
: 'Error: Could not locate local .bpmnlintrc file, please create one: https://github.com/bpmn-io/bpmnlint#configuration'
);
return logAndExit(message);
}
try {
config = JSON.parse(configString);
} catch (err) {
return logAndExit('Error: Could not parse ' + configPath + ': ' + err.message);
}
return lint(config);
}
run().catch(logAndExit);

4

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## 5.2.0
* `FEAT`: provide help on missing `.bpmnlintrc`
## 5.1.2

@@ -11,0 +15,0 @@

{
"name": "bpmnlint",
"description": "Validate your BPMN diagrams based on configurable lint rules",
"version": "5.1.2",
"version": "5.2.0",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc