Skip to content

Commit

Permalink
avoid confusion by adding iso8601 to OnifyTimerEventDefinition supports
Browse files Browse the repository at this point in the history
- fix extensions argument context type
  • Loading branch information
paed01 committed May 24, 2024
1 parent fcfc83d commit 54ada99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

# unreleased

# 8.0.3

- add iso8601 to OnifyTimerEventDefinition supports list to avoid confusion
- fix extensions argument context type

# 8.0.2

- rearrange time cycle parsing to rethrow proper cron parsing error
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
},
"scripts": {
"test": "mocha -R dot",
"posttest": "npm run lint && npm run dist",
"posttest": "npm run lint && npm run dist && texample",
"lint": "eslint . --cache && prettier . --check --cache",
"prepare": "npm run dist",
"dist": "babel src -d dist && babel test/helpers/FlowScripts.js -d dist",
"test:md": "texample ./README.md",
"test:lcov": "c8 -r lcov mocha && npm run lint",
"cov:html": "c8 mocha -R dot && c8 report --reporter html"
},
Expand Down Expand Up @@ -72,7 +71,7 @@
"bpmn-elements": "^14.1.0"
},
"dependencies": {
"@0dep/piso": "^0.1.3",
"@0dep/piso": "^0.1.4",
"cron-parser": "^4.9.0"
},
"files": [
Expand All @@ -85,7 +84,6 @@
"exclude": [
"dist",
"test",
".mocharc.cjs",
"babel.config.cjs"
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/OnifyTimerEventDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class OnifyTimerEventDefinition extends TimerEventDefinition {
constructor(activity, def) {
super(activity, def);
Object.defineProperty(this, 'supports', {
value: ['cron'],
value: ['cron', 'iso8601'],
});
}
parse(timerType, value) {
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
declare module '@onify/flow-extensions' {
import { SequenceFlow, TimerEventDefinition, ElementBase, IExtension } from 'bpmn-elements';
import { SequenceFlow, TimerEventDefinition, ElementBase, IExtension, ContextInstance } from 'bpmn-elements';
import { extendFn as extendFunction } from 'moddle-context-serializer';

export class OnifySequenceFlow extends SequenceFlow {}
export class OnifyTimerEventDefinition extends TimerEventDefinition {
readonly supports: string[];
}
export function extensions(element: ElementBase, context: Context): IExtension;
export function extensions(element: ElementBase, context: ContextInstance): IExtension;
export const extendFn: extendFunction;
}

Expand Down

0 comments on commit 54ada99

Please sign in to comment.