bpmn-engine 14.1.1 → 15.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ # 15.0.0
5
+
6
+ ## Breaking
7
+ - Drop node 12 support
8
+
4
9
  # 14.1.1
5
10
 
6
11
  - fix(types): add missing `moddleContext` option
package/index.js CHANGED
@@ -189,7 +189,7 @@ Engine.prototype.addSource = function addSource({sourceContext: addContext} = {}
189
189
 
190
190
  Engine.prototype.getDefinitions = async function getDefinitions(executeOptions) {
191
191
  const loadedDefinitions = this[kLoadedDefinitions];
192
- if (loadedDefinitions && loadedDefinitions.length) return loadedDefinitions;
192
+ if (loadedDefinitions?.length) return loadedDefinitions;
193
193
  return this._loadDefinitions(executeOptions);
194
194
  };
195
195
 
@@ -318,7 +318,6 @@ Execution.prototype._execute = function execute(executeOptions, callback) {
318
318
  return result;
319
319
  }, []);
320
320
 
321
-
322
321
  if (!definitionExecutions.length) {
323
322
  const error = new Error('No executable processes');
324
323
  if (!callback) return this[kEngine].emit('error', error);
@@ -409,7 +408,7 @@ Execution.prototype._setup = function setup(setupOptions = {}) {
409
408
 
410
409
  Execution.prototype._onChildMessage = function onChildMessage(routingKey, message, owner) {
411
410
  const {environment: ownerEnvironment} = owner;
412
- const listener = ownerEnvironment.options && ownerEnvironment.options.listener;
411
+ const listener = ownerEnvironment.options?.listener;
413
412
  this[kState] = 'running';
414
413
 
415
414
  let newState;
@@ -540,7 +539,7 @@ Execution.prototype.getPostponed = function getPostponed() {
540
539
 
541
540
  Execution.prototype.signal = function signal(payload, {ignoreSameDefinition} = {}) {
542
541
  for (const definition of this[kExecuting]) {
543
- if (ignoreSameDefinition && payload && payload.parent && payload.parent.id === definition.id) continue;
542
+ if (ignoreSameDefinition && payload?.parent?.id === definition.id) continue;
544
543
  definition.signal(payload);
545
544
  }
546
545
  };
@@ -71,4 +71,3 @@ DummyScript.prototype.execute = function execute(executionContext, callback) {
71
71
  this.logger.debug(`<${executionId} (${id})> passthrough dummy script ${this.language || 'esperanto'}`);
72
72
  callback();
73
73
  };
74
-
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bpmn-engine",
3
3
  "description": "BPMN 2.0 execution engine. Open source javascript workflow engine.",
4
- "version": "14.1.1",
4
+ "version": "15.0.0",
5
5
  "main": "index.js",
6
6
  "types": "types/bpmn-engine.d.ts",
7
7
  "repository": {
@@ -13,7 +13,7 @@
13
13
  "url": "https://github.com/paed01"
14
14
  },
15
15
  "engines": {
16
- "node": ">=10"
16
+ "node": ">=14"
17
17
  },
18
18
  "files": [
19
19
  "lib/",
@@ -23,7 +23,7 @@
23
23
  "scripts": {
24
24
  "test": "mocha -R dot",
25
25
  "posttest": "eslint . --cache && npm run toc",
26
- "wintest": "node_modules/.bin/mocha",
26
+ "wintest": "mocha",
27
27
  "cov:html": "nyc mocha -R dot && nyc report --reporter=html",
28
28
  "test:lcov": "nyc mocha -R dot && nyc report --reporter lcov && npm run posttest",
29
29
  "toc": "node scripts/generate-api-toc ./docs/API.md,./docs/Examples.md",
@@ -54,9 +54,9 @@
54
54
  "camunda-bpmn-moddle": "^6.1.2",
55
55
  "chai": "^4.3.6",
56
56
  "chronokinesis": "^3.0.0",
57
- "eslint": "^7.23.0",
57
+ "eslint": "^8.21.0",
58
58
  "markdown-toc": "^1.2.0",
59
- "mocha": "^9.2.2",
59
+ "mocha": "^10.0.0",
60
60
  "mocha-cakes-2": "^3.3.0",
61
61
  "nock": "^13.2.9",
62
62
  "nyc": "^15.1.0"