@data-fair/lib-node 1.0.0 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-node",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Small nodejs related utility functions for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -10,12 +10,14 @@
10
10
  "author": "",
11
11
  "license": "MIT",
12
12
  "scripts": {
13
- "prepublishOnly": "cd .. && npm run prepublishOnly"
13
+ "prepublishOnly": "cd .. && npm run prepublishOnly",
14
+ "build": "cd .. && npm run build"
14
15
  },
15
16
  "dependencies": {
16
17
  "@data-fair/lib-common-types": "^1.1.0",
17
18
  "@data-fair/lib-utils": "1.0.0",
18
19
  "agentkeepalive": "^4.5.0",
20
+ "ajv-formats": "^3.0.1",
19
21
  "ajv-i18n": "^4.2.0",
20
22
  "axios": "^1.7.7",
21
23
  "cacheable-lookup": "^7.0.0",
@@ -7,7 +7,7 @@ export async function load (url, context, nextLoad) {
7
7
  let source = result.source.toString()
8
8
  const matches = source.match(regexp)
9
9
  if (matches) {
10
- source = 'import { emit as __emitTestSpy } from "@data-fair/lib/node/test-spies.js"\n' + source
10
+ source = 'import { emit as __emitTestSpy } from "@data-fair/lib-node/test-spies.js"\n' + source
11
11
  source = source.replace(regexp, '__emitTestSpy($1)\n')
12
12
  result.source = Buffer.from(source, 'utf-8')
13
13
  }
package/test-spies.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export declare function registerModuleHooks(): void;
2
- export declare function waitFor(eventName: string, timeout?: number): Promise<unknown>;
2
+ export declare function waitFor<T>(eventName: string, timeout?: number): Promise<T>;
3
3
  export declare function emit(eventName: string, data: any): void;
package/test-spies.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { register } from 'node:module'
2
2
  export function registerModuleHooks () {
3
- register('@data-fair/lib/node/test-module-hooks.js', { parentURL: import.meta.url })
3
+ register('@data-fair/lib-node/test-module-hooks.js', { parentURL: import.meta.url })
4
4
  }
5
5
  const pendingPromises = {}
6
6
  let i = 0