@0dep/bpmn-extensions 0.1.0 → 1.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 ADDED
@@ -0,0 +1,66 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## v1.0.0 - 2026-09-20
6
+
7
+ ### Breaking
8
+
9
+ - ESM only: the CommonJS rollup bundle (`dist/`) is gone. `require('@0dep/bpmn-extensions')` still works through Node's `require(esm)`, so the supported Node range is now `>=22.12` (was `>=22`; 22.0–22.11 CommonJS consumers would need `--experimental-require-module`). `feelin` is no longer bundled — `import` and `require` consumers share the installed copy.
10
+ - `feelin` bumped to v8, which moved FEEL temporal values from luxon to [Temporal](https://tc39.es/proposal-temporal/). A user task `dueDate`/`followUpDate` resolved from a FEEL expression is still an ISO 8601 string, now in feelin's serialization (`2026-09-04T09:00:00Z`, no `.000` milliseconds). Week durations (`P1W`) and mixed-kind duration arithmetic (months + days) are now rejected by feelin instead of silently miscomputed.
11
+
12
+ ### Fixes
13
+
14
+ - readme: trailing slash on the 0dep.se/run link
15
+
16
+ ## v0.1.1 - 2026-09-16
17
+
18
+ - set package homepage
19
+
20
+ ## v0.1.0 - 2026-09-13
21
+
22
+ - require bpmn-elements@>=18.0.25
23
+ - readme toc
24
+
25
+ ## v0.0.6 - 2026-08-30
26
+
27
+ ### Additions
28
+
29
+ - `TimerEventDefinition` — a bpmn-elements timer event definition that also parses a **cron** `timeCycle` (`0 0 * * *`, as Camunda 8 schedules timer start events) besides ISO 8601 intervals. Install it through the type resolver: `TypeResolver({ ...elements, TimerEventDefinition })`.
30
+ - `extendFn` lifts a timer start event's `timeCycle` onto the behaviour as `scheduledStart`; a process-level timer start event exposes it on its content, so a scheduler can find the flows to start without running them.
31
+ - New peer dependency [`croner`](https://www.npmjs.com/package/croner) (`>= 9`) for cron parsing; kept external in the CJS bundle.
32
+ - Dev: `zeebe-bpmn-moddle` bumped to v2.
33
+
34
+ ## v0.0.5 - 2026-08-24
35
+
36
+ ### Breaking
37
+
38
+ - stop publishing on activity format queue if there is nothing to format
39
+
40
+ ### Additions
41
+
42
+ - support task priority and task schedule, published on user task wait message as `priority`, `dueDate` and `followUpDate`
43
+
44
+ ## v0.0.4 - 2026-08-17
45
+
46
+ - Environment services are in FEEL scope under `services`, callable as functions in every expression (conditions, io mapping, scripts, correlation keys, ...) — e.g. `= services.isEligible(order)`. Unlike functions passed through variables, services survive `getState()`/`recover()`, so they are resume-safe. A variable named `services` shadows the overlay. New exported helper `getFeelScope(environment, localVariables)` builds the scope.
47
+ - `FeelScripts` `getScript` declares `Script | undefined` (bpmn-elements fixed the upstream type).
48
+
49
+ ## v0.0.3 - 2026-07-26
50
+
51
+ - Message `zeebe:subscription`: the correlation key is resolved on enter and exposed on the waiting element content as `subscription: { message, correlationKey }`, so the embedding application can route an incoming message to the right waiting activity.
52
+ - Fix: a FEEL unary test that is undecidable (evaluates to null) is now false — `evaluateFeelUnaryTest` returns strictly boolean.
53
+ - Types: `FeelExpressions()` declares `isExpression`/`hasExpression`; JSDoc polish in `FeelScripts`.
54
+ - Tests are type-checked against the published type surface (`tsc -p test/tsconfig.json`).
55
+ - Peer `bpmn-elements` floor raised to `>= 18.0.12` — earlier versions could stall or skip extension re-activation when resuming a stopped instance in place.
56
+
57
+ ## v0.0.2 - 2026-06-28
58
+
59
+ - FEEL (`= ...`) expressions and sequence-flow conditions (`FeelExpressions`); `zeebe:script` script tasks (`FeelScripts`).
60
+ - Service tasks (`zeebe:taskDefinition`) and business rule tasks (`zeebe:calledDecision`) with `resultVariable`.
61
+ - `zeebe:ioMapping` input/output, propagated across call activities and sub processes.
62
+ - Multi-instance `zeebe:loopCharacteristics`: collection, parallel/sequential, `outputCollection` aggregation.
63
+ - User tasks: `zeebe:assignmentDefinition`, `zeebe:formDefinition`; plus `zeebe:taskHeaders` and `zeebe:properties`.
64
+ - Blocking `zeebe:executionListeners`, called as `(elementApi, { retries, headers }, callback)`.
65
+ - Call activities (`zeebe:calledElement`); stop/recover/resume.
66
+ - Dual ESM/CJS build with generated types; peer `bpmn-elements >= 18.0.4`.
package/README.md CHANGED
@@ -210,7 +210,6 @@ assert.equal(serializer.getActivityById('start').behaviour.scheduledStart, '0 1
210
210
  ```sh
211
211
  npm test # mocha (BDD, mocha-cakes-2) + lint + run README examples (texample)
212
212
  npm run test:md # run the README javascript examples with texample
213
- npm run dist # bundle the CommonJS build with rollup
214
213
  npm run types # generate types/index.d.ts from JSDoc with dts-buddy
215
214
  npm run format # eslint --fix && prettier --write
216
215
  ```
@@ -222,7 +221,7 @@ the engine's `Logger` to the [`debug`](https://www.npmjs.com/package/debug) pack
222
221
 
223
222
  ## Ecosystem
224
223
 
225
- - [0dep.se/run](https://0dep.se/run) — Run a BPMN diagram in the browser: `bpmn-elements` wired with `@0dep/bpmn-extensions`, drawn with bpmn-js; step through, signal waiting tasks, and drop DMN files for business rule tasks.
224
+ - [0dep.se/run](https://0dep.se/run/) — Run a BPMN diagram in the browser: `bpmn-elements` wired with `@0dep/bpmn-extensions`, drawn with bpmn-js; step through, signal waiting tasks, and drop DMN files for business rule tasks.
226
225
  - [bpmn-engine](https://github.com/paed01/bpmn-engine) — BPMN 2.0 execution engine wrapping `bpmn-elements`; the batteries-included way to run, stop, resume, and recover flows.
227
226
  - [bpmn-middleware](https://github.com/zerodep/bpmn-middleware) — Express middleware exposing the engine over HTTP, with pluggable state storage.
228
227
  - [@onify/flow-extensions](https://github.com/onify/flow-extensions) — Onify Flow extensions for `bpmn-elements`.
package/package.json CHANGED
@@ -1,21 +1,19 @@
1
1
  {
2
2
  "name": "@0dep/bpmn-extensions",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Flow extensions for bpmn-elements: FEEL expressions and the zeebe-namespace BPMN extension elements",
5
5
  "type": "module",
6
- "module": "src/index.js",
7
- "main": "dist/index.js",
6
+ "main": "src/index.js",
8
7
  "types": "./types/index.d.ts",
9
8
  "sideEffects": false,
10
9
  "exports": {
11
10
  ".": {
12
11
  "types": "./types/index.d.ts",
13
- "require": "./dist/index.js",
14
- "import": "./src/index.js"
12
+ "default": "./src/index.js"
15
13
  }
16
14
  },
17
15
  "engines": {
18
- "node": ">=22"
16
+ "node": ">=22.12"
19
17
  },
20
18
  "scripts": {
21
19
  "test": "mocha",
@@ -24,12 +22,11 @@
24
22
  "cov:html": "c8 mocha && c8 report --reporter html",
25
23
  "posttest": "npm run toc && npm run lint && npm run test:md && npm run prepack",
26
24
  "lint": "eslint . --cache && prettier . --check --cache",
27
- "toc": "toc README.md",
25
+ "toc": "toc -c README.md",
28
26
  "posttoc": "prettier --write README.md",
29
27
  "format": "eslint . --fix && prettier . --write",
30
- "dist": "rollup -c",
31
28
  "types": "dts-buddy types/index.d.ts -m @0dep/bpmn-extensions:src/index.js",
32
- "prepack": "npm run dist && npm run types"
29
+ "prepack": "npm run types"
33
30
  },
34
31
  "keywords": [
35
32
  "bpmn",
@@ -45,9 +42,10 @@
45
42
  "url": "git+https://github.com/zerodep/bpmn-extensions.git"
46
43
  },
47
44
  "author": {
48
- "name": "Pål Edman",
49
- "url": "https://github.com/paed01"
45
+ "name": "Zerodep AB",
46
+ "url": "https://0dep.se"
50
47
  },
48
+ "homepage": "https://0dep.se/run/",
51
49
  "license": "MIT",
52
50
  "publishConfig": {
53
51
  "access": "public"
@@ -57,7 +55,7 @@
57
55
  "croner": ">=9"
58
56
  },
59
57
  "dependencies": {
60
- "feelin": "^7.0.1"
58
+ "feelin": "^8.1.0"
61
59
  },
62
60
  "overrides": {
63
61
  "mocha": {
@@ -65,10 +63,8 @@
65
63
  }
66
64
  },
67
65
  "devDependencies": {
68
- "@0dep/toc": "^1.0.1",
66
+ "@0dep/toc": "^2.1.0",
69
67
  "@eslint/js": "^10.0.1",
70
- "@rollup/plugin-commonjs": "^29.0.3",
71
- "@rollup/plugin-node-resolve": "^16.0.3",
72
68
  "@types/chai": "^5.2.3",
73
69
  "@types/mocha": "^10.0.10",
74
70
  "@types/node": "^26.1.1",
@@ -85,19 +81,17 @@
85
81
  "mocha-cakes-2": "^3.3.0",
86
82
  "moddle-context-serializer": "^6.0.1",
87
83
  "prettier": "^3.9.1",
88
- "rollup": "^4.62.2",
89
84
  "texample": "^1.0.2",
90
85
  "typescript": "^6.0.3",
91
86
  "zeebe-bpmn-moddle": "^2.0.0"
92
87
  },
93
88
  "files": [
94
89
  "src",
95
- "dist",
96
- "types"
90
+ "types",
91
+ "CHANGELOG.md"
97
92
  ],
98
93
  "c8": {
99
94
  "exclude": [
100
- "dist",
101
95
  "test"
102
96
  ]
103
97
  }
@@ -91,17 +91,17 @@ export class FormatProcess {
91
91
  }
92
92
 
93
93
  /**
94
- * Resolve a due/follow-up date to an ISO 8601 string. A FEEL temporal result (a luxon
95
- * DateTime) or a Date is ISO-stringified — content is JSON-serialized on `getState()`, so a
96
- * string is the shape that survives a recover round trip. Anything else passes through as-is.
94
+ * Resolve a due/follow-up date to an ISO 8601 string. A FEEL temporal result (a feelin
95
+ * `FeelDateTime`) or a Date is ISO-stringified via `toJSON()` — content is JSON-serialized on
96
+ * `getState()`, so a string is the shape that survives a recover round trip. Anything else
97
+ * passes through as-is.
97
98
  * @param {any} value
98
99
  * @param {any} scope
99
100
  * @returns {string | undefined} Date as iso string
100
101
  */
101
102
  function resolveDate(value, scope) {
102
103
  const resolved = resolveValue(value, scope);
103
- if (typeof resolved?.toISO === 'function') return resolved.toISO();
104
- if (resolved instanceof Date) return resolved.toISOString();
104
+ if (typeof resolved?.toJSON === 'function') return resolved.toJSON();
105
105
  return resolved;
106
106
  }
107
107