@netlify/nock-udp 2.0.0 → 3.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.
package/lib/main.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export function isMocked(): boolean;
2
- export function intercept(address: any, { persist, startIntercept, allowUnknown }?: {
1
+ export declare const isMocked: () => boolean;
2
+ export declare const intercept: (address: any, { persist, startIntercept, allowUnknown }?: {
3
3
  persist?: boolean;
4
4
  startIntercept?: boolean;
5
5
  allowUnknown?: boolean;
6
- }): {
6
+ }) => {
7
7
  used: boolean;
8
8
  persist: boolean;
9
9
  buffers: any[];
@@ -12,10 +12,8 @@ export function intercept(address: any, { persist, startIntercept, allowUnknown
12
12
  address: any;
13
13
  clean: () => void;
14
14
  };
15
- export function cleanAll({ stopIntercept }?: {
15
+ export declare const cleanAll: ({ stopIntercept }?: {
16
16
  stopIntercept?: boolean;
17
- }): void;
18
- export function restoreSocketSend(): void;
19
- export function interceptSocketSend({ allowUnknown }?: {
20
- allowUnknown: any;
21
- }): void;
17
+ }) => void;
18
+ export declare const restoreSocketSend: () => void;
19
+ export declare const interceptSocketSend: ({ allowUnknown }?: any) => void;
package/lib/main.js CHANGED
@@ -64,5 +64,6 @@ export const restoreSocketSend = function () {
64
64
  Socket.prototype.send = originalSocketSend;
65
65
  };
66
66
  export const interceptSocketSend = function ({ allowUnknown } = {}) {
67
+ ;
67
68
  Socket.prototype.send = getMockSocketSend({ allowUnknown });
68
69
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/nock-udp",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Here to mock your UDP packets",
5
5
  "exports": "./lib/main.js",
6
6
  "main": "./lib/main.js",
@@ -12,8 +12,9 @@
12
12
  "scripts": {
13
13
  "prebuild": "rm -rf lib",
14
14
  "build": "tsc",
15
- "test": "ava",
16
- "test:ci": "c8 -r lcovonly -r text -r json ava"
15
+ "test": "vitest run",
16
+ "test:dev": "vitest",
17
+ "test:ci": "vitest run --reporter=default"
17
18
  },
18
19
  "keywords": [],
19
20
  "license": "MIT",
@@ -22,11 +23,12 @@
22
23
  },
23
24
  "author": "Netlify Inc.",
24
25
  "devDependencies": {
25
- "ava": "^4.0.0",
26
- "c8": "^7.11.0"
26
+ "@types/node": "^14.18.31",
27
+ "typescript": "^4.8.4",
28
+ "vitest": "^0.24.1"
27
29
  },
28
30
  "engines": {
29
31
  "node": "^14.16.0 || >=16.0.0"
30
32
  },
31
- "gitHead": "b75d4a07f41dd18f5314920e0cef644c118677b4"
33
+ "gitHead": "be9da6e85afa0223bdcd6d228c929f4372515538"
32
34
  }