Skip to content

Commit

Permalink
feat: Version 2 (#13)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The library has been significantly expanded and now implements full functionality needed to implement and run workflows:

- Support for work items and nested workflows
- Ability to listen to changes to the state (which allows implementation of persisted state)

Most of the previous features are available, some names might be changed.
  • Loading branch information
retro authored Dec 3, 2023
1 parent 54880ff commit 3646a9b
Show file tree
Hide file tree
Showing 86 changed files with 27,027 additions and 5,367 deletions.
10 changes: 9 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,33 @@
"Coverable",
"degit",
"esbuild",
"ESWI",
"fixedsize",
"Gilleland",
"gjuchault",
"graphviz",
"millis",
"nminusr",
"OCAI",
"OCOI",
"octocat",
"omarking",
"Persistable",
"Postset",
"premarked",
"qname",
"rankdir",
"remeda",
"rimbu",
"rmrf",
"socio",
"tasquencer",
"Unfinalized",
"WAWIT",
"WFOJ",
"wfojnet",
"wsts"
"wsts",
"WWAIT"
],
"flagWords": [],
"ignorePaths": [
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/prefer-return-this-type": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error", // or "error"
{
Expand Down
17 changes: 9 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1.
2.
3.

1.
2.
3.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu 22.04, macOS 11.4]
- Node version [e.g 16.4.2]
- Code Version [e.g. 1.1.0]
**Desktop (please exit the following information):**

- OS: [e.g. Ubuntu 22.04, macOS 11.4]
- Node version [e.g 16.4.2]
- Code Version [e.g. 1.1.0]

**Additional context**
Add any other context about the problem here.
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- run: npm ci

- name: Dependencies audit
Expand All @@ -34,4 +34,4 @@ jobs:
run: npm run spell:check

- name: Test
run: npm run test
run: npm run test
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ A BPM library for Node based on the concepts from https://yawlfoundation.github.
Example:

```typescript
Builder.workflow<{
const workflowDefinition = Builder.workflow<{
shouldBookFlight: boolean;
shouldBookCar: boolean;
}>('or-split-and-or-join')
}>()
.withName('or-split-join')
.startCondition('start')
.task('register', (t) => t.withSplitType('or'))
.task('book_flight')
.task('book_hotel')
.task('book_car')
.task('pay', (t) => t.withJoinType('or'))
.task('register', Builder.emptyTask().withSplitType('or'))
.task('book_flight', Builder.emptyTask())
.task('book_hotel', Builder.emptyTask())
.task('book_car', Builder.emptyTask())
.task('pay', Builder.emptyTask().withJoinType('or'))
.endCondition('end')
.connectCondition('start', (to) => to.task('register'))
.connectTask('register', (to) =>
Expand Down
103 changes: 50 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"types": "./build/src/index.d.ts",
"license": "MIT",
"engines": {
"node": "^18.16.0",
"npm": "^9.5.1"
"node": "^18.17.1",
"npm": "^9.6.7"
},
"volta": {
"node": "18.16.1",
"npm": "9.5.1"
"node": "18.17.1",
"npm": "9.6.7"
},
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -73,9 +73,9 @@
"vitest": "^0.32.4"
},
"dependencies": {
"@effect/match": "^0.38.0",
"big-integer": "^1.6.51",
"effect": "^2.0.0-next.45",
"mutative": "^0.5.0"
"effect": "^2.0.0-next.54",
"mutative": "^0.7.1",
"nanoid": "^5.0.3",
"type-fest": "^4.8.2"
}
}
Loading

0 comments on commit 3646a9b

Please sign in to comment.