fabrique 1.0.4 → 1.0.21

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.
@@ -5,4 +5,4 @@ npmRegistryServer: "http://localhost:4873"
5
5
  unsafeHttpWhitelist:
6
6
  - localhost
7
7
 
8
- yarnPath: .yarn/releases/yarn-4.9.4.cjs
8
+ yarnPath: .yarn/releases/yarn-4.12.0.cjs
@@ -1,6 +1,25 @@
1
1
  export namespace testTools {
2
- export function sleep(t: number): Promise<void> {
3
- return new Promise((resolve) => setTimeout(resolve, t));
2
+ export function sleep(duration: number, signal?: AbortSignal): Promise<void> {
3
+ return new Promise<void>((resolve: () => void, reject: (reason?: unknown) => void): void => {
4
+ signal?.throwIfAborted();
5
+
6
+ const end = (): void => {
7
+ signal?.removeEventListener('abort', onAbort);
8
+ clearTimeout(timer);
9
+ };
10
+
11
+ const onAbort = (): void => {
12
+ end();
13
+ reject(signal!.reason);
14
+ };
15
+
16
+ signal?.addEventListener('abort', onAbort);
17
+
18
+ const timer: any = setTimeout((): void => {
19
+ end();
20
+ resolve();
21
+ }, duration);
22
+ });
4
23
  }
5
24
 
6
25
  export function polyfillRequestIdleCallback(): void {
@@ -12,7 +12,9 @@
12
12
  "fb:typedoc": "typedoc --options typedoc.json --tsconfig tsconfig.json",
13
13
  "fb:prod": "node fabrique/actions/cli/build-and-publish.cli.js --mode prod",
14
14
  "fb:dev": "node fabrique/actions/cli/build-and-publish.cli.js --mode dev",
15
- "fb:rc": "node fabrique/actions/cli/build-and-publish.cli.js --mode rc"
15
+ "fb:rc": "node fabrique/actions/cli/build-and-publish.cli.js --mode rc",
16
+ "fb:node:dev": "node --experimental-strip-types --watch src/main.ts",
17
+ "fb:node:dev:inspect": "node --experimental-strip-types --watch --inspect src/main.ts"
16
18
  },
17
19
  "description": "{{description}}",
18
20
  "keywords": [],
@@ -24,13 +26,13 @@
24
26
  "url": "{{giturl}}"
25
27
  },
26
28
  "devDependencies": {
27
- "@types/node": "^24.3.0",
28
- "@vitest/coverage-istanbul": "^3.2.4",
29
- "prettier": "^3.6.2",
30
- "prettier-plugin-organize-imports": "^4.2.0",
31
- "typedoc": "^0.28.12",
32
- "typescript": "^5.9.2",
33
- "vitest": "^3.2.4"
29
+ "@types/node": "^24.10.1",
30
+ "@vitest/coverage-istanbul": "^4.0.15",
31
+ "prettier": "^3.7.4",
32
+ "prettier-plugin-organize-imports": "^4.3.0",
33
+ "typedoc": "^0.28.15",
34
+ "typescript": "^5.9.3",
35
+ "vitest": "^4.0.15"
34
36
  },
35
- "packageManager": "yarn@4.9.4"
37
+ "packageManager": "yarn@4.12.0"
36
38
  }
@@ -7,8 +7,9 @@ export default defineConfig({
7
7
  provider: 'istanbul',
8
8
  include: ['src/**/*.ts'],
9
9
  exclude: [
10
- 'src/**/*.{test,bench,protected,private}.ts',
11
- 'src/**/*.{protected,private}/**/*.ts',
10
+ 'src/**/*.{test,bench}.ts',
11
+ 'src/**/*.skip-test*.ts',
12
+ 'src/**/*.skip-test*/**/*.ts',
12
13
  ],
13
14
  thresholds: {
14
15
  100: true,