Skip to content

Commit e41639d

Browse files
committed
major upgrade of @0dep/piso@3
1 parent 43062cb commit e41639d

11 files changed

Lines changed: 24 additions & 35 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
## [17.2.1] - 2025-08-13
6+
7+
- major upgrade of [@0dep/piso@3](https://www.npmjs.com/package/@0dep/piso)
8+
59
## [17.2.0] - 2025-07-22
610

711
- major upgrade of [smqp@10.0.0](https://github.com/paed01/smqp/blob/default/CHANGELOG.md)

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bpmn-elements",
3-
"version": "17.2.0",
3+
"version": "17.2.1",
44
"description": "Executable workflow elements based on BPMN 2.0",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -90,11 +90,10 @@
9090
"c8": "^10.1.1",
9191
"camunda-bpmn-moddle": "^7.0.1",
9292
"chai": "^5.1.0",
93-
"chronokinesis": "^6.0.0",
93+
"chronokinesis": "^7.0.0",
9494
"debug": "^4.3.4",
9595
"eslint": "^9.0.0",
9696
"globals": "^16.0.0",
97-
"got": "^14.2.1",
9897
"mocha": "^11.0.1",
9998
"mocha-cakes-2": "^3.3.0",
10099
"moddle-context-serializer": "^4.2.1",
@@ -103,7 +102,7 @@
103102
"texample": "^0.0.8"
104103
},
105104
"dependencies": {
106-
"@0dep/piso": "^2.4.0",
105+
"@0dep/piso": "^3.0.1",
107106
"smqp": "^10.0.0"
108107
}
109108
}

test/Timers-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ck from 'chronokinesis';
1+
import * as ck from 'chronokinesis';
22

33
import { Timers } from '../src/Timers.js';
44

test/eventDefinitions/TimerEventDefinition-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ck from 'chronokinesis';
1+
import * as ck from 'chronokinesis';
22
import Environment from '../../src/Environment.js';
33
import testHelpers from '../helpers/testHelpers.js';
44
import TimerEventDefinition from '../../src/eventDefinitions/TimerEventDefinition.js';

test/feature/activity-status-feature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ck from 'chronokinesis';
1+
import * as ck from 'chronokinesis';
22
import Definition from '../../src/definition/Definition.js';
33
import factory from '../helpers/factory.js';
44
import testHelpers from '../helpers/testHelpers.js';

test/feature/gateway-feature.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Definition from '../../src/definition/Definition.js';
22
import factory from '../helpers/factory.js';
3-
import got from 'got';
43
import nock from 'nock';
54

65
import testHelpers from '../helpers/testHelpers.js';
@@ -273,9 +272,7 @@ Feature('Gateway', () => {
273272
}
274273

275274
async function getRule(rule) {
276-
const body = await got(rule, {
277-
prefixUrl: 'https://rules.local',
278-
}).json();
275+
const body = await fetch(new URL(rule, 'https://rules.local')).then((res) => res.json());
279276

280277
return { rule, value: body.value };
281278
}

test/feature/issues/stack-overflow-feature.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Definition } from '../../../src/index.js';
2-
import got from 'got';
32
import JsExtension from '../../resources/extensions/JsExtension.js';
43
import nock from 'nock';
54
import testHelpers from '../../helpers/testHelpers.js';
@@ -90,8 +89,8 @@ Feature('Attempt to provoke a stack overflow', () => {
9089

9190
async function makeRequest(path, _, next) {
9291
try {
93-
const { body } = await got(new URL(path, 'http://example.local'), { responseType: 'json', retry: { limit: 0 } });
94-
return next(null, body);
92+
const res = await fetch(new URL(path, 'http://example.local'));
93+
return next(null, await res.json());
9594
} catch (err) {
9695
next(err);
9796
}
@@ -205,8 +204,8 @@ Feature('Attempt to provoke a stack overflow', () => {
205204

206205
async function makeRequest(path, _, next) {
207206
try {
208-
const { body } = await got(new URL(path, 'http://example.local'), { responseType: 'json', retry: { limit: 0 } });
209-
return next(null, body);
207+
const res = await fetch(new URL(path, 'http://example.local'));
208+
return next(null, await res.json());
210209
} catch (err) {
211210
next(err);
212211
}

test/feature/stopAndResume-feature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ck from 'chronokinesis';
1+
import * as ck from 'chronokinesis';
22
import Definition from '../../src/definition/Definition.js';
33
import JsExtension from '../resources/extensions/JsExtension.js';
44
import testHelpers from '../helpers/testHelpers.js';

test/feature/timers-feature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ck from 'chronokinesis';
1+
import * as ck from 'chronokinesis';
22
import Definition from '../../src/definition/Definition.js';
33
import testHelpers from '../helpers/testHelpers.js';
44
import factory from '../helpers/factory.js';

test/tasks/ScriptTask-test.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import js from '../resources/extensions/JsExtension.js';
22
import nock from 'nock';
3-
import request from 'got';
43
import testHelpers from '../helpers/testHelpers.js';
54
import { ActivityError } from '../../src/error/Errors.js';
65
import { Scripts } from '../helpers/JavaScripts.js';
@@ -194,9 +193,9 @@ describe('ScriptTask', () => {
194193
<scriptTask id="scriptTask" scriptFormat="Javascript">
195194
<script>
196195
<![CDATA[
197-
const request = environment.getServiceByName('request');
198-
request('http://example.com/test')
199-
.json()
196+
const fetch = environment.getServiceByName('fetch');
197+
fetch('http://example.com/test')
198+
.then((res) => res.json())
200199
.then((body) => next(null, body))
201200
.catch(next);
202201
]]>
@@ -208,18 +207,10 @@ describe('ScriptTask', () => {
208207
</process>
209208
</definitions>`;
210209

211-
nock('http://example.com').get('/test').reply(
212-
200,
213-
{
214-
data: 2,
215-
},
216-
{
217-
'content-type': 'application/json',
218-
}
219-
);
210+
nock('http://example.com').get('/test').reply(200, { data: 2 }, { 'content-type': 'application/json' });
220211

221212
const context = await testHelpers.context(source);
222-
context.environment.addService('request', request);
213+
context.environment.addService('fetch', globalThis.fetch);
223214

224215
const task = context.getActivityById('scriptTask');
225216
task.activate();

0 commit comments

Comments
 (0)