@tryghost/webhook-mock-receiver 1.2.1 → 2.0.1

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.
@@ -1,8 +1,6 @@
1
1
  const {AssertionError} = require('assert');
2
2
  const {URL} = require('url');
3
3
  const nock = require('nock');
4
- const pWaitFor = require('p-wait-for');
5
-
6
4
  class WebhookMockReceiver {
7
5
  constructor({snapshotManager}) {
8
6
  this.body;
@@ -19,6 +17,7 @@ class WebhookMockReceiver {
19
17
 
20
18
  async receivedRequest() {
21
19
  // @NOTE: figure out a better waiting mechanism here, don't allow it to hang forever
20
+ const {default: pWaitFor} = await import('p-wait-for');
22
21
  await pWaitFor(() => this._receiver.isDone());
23
22
  }
24
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/webhook-mock-receiver",
3
- "version": "1.2.1",
3
+ "version": "2.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/TryGhost/framework.git",
@@ -11,7 +11,7 @@
11
11
  "main": "index.js",
12
12
  "scripts": {
13
13
  "dev": "echo \"Implement me!\"",
14
- "test": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura mocha './test/**/*.test.js'",
14
+ "test": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
15
15
  "lint:code": "eslint *.js lib/ --ext .js --cache",
16
16
  "lint": "yarn lint:code && yarn lint:test",
17
17
  "lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache",
@@ -25,12 +25,10 @@
25
25
  "access": "public"
26
26
  },
27
27
  "devDependencies": {
28
- "c8": "10.1.3",
29
- "got": "9.6.0",
30
- "mocha": "11.7.5",
31
- "sinon": "21.0.1"
28
+ "got": "14.6.6",
29
+ "sinon": "21.0.2"
32
30
  },
33
31
  "dependencies": {
34
- "p-wait-for": "3.2.0"
32
+ "p-wait-for": "6.0.0"
35
33
  }
36
34
  }