@rspack/core 1.3.14 → 1.4.0-beta.0

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.
Files changed (53) hide show
  1. package/compiled/@swc/types/index.d.ts +18 -2
  2. package/compiled/@swc/types/package.json +1 -1
  3. package/compiled/tinypool/README.md +4 -196
  4. package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
  5. package/compiled/tinypool/dist/entry/process.d.ts +1 -2
  6. package/compiled/tinypool/dist/entry/process.js +63 -83
  7. package/compiled/tinypool/dist/entry/utils.d.ts +3 -1
  8. package/compiled/tinypool/dist/entry/utils.js +3 -9
  9. package/compiled/tinypool/dist/entry/worker.d.ts +1 -2
  10. package/compiled/tinypool/dist/entry/worker.js +66 -94
  11. package/compiled/tinypool/dist/index.d.ts +132 -125
  12. package/compiled/tinypool/dist/index.js +771 -1035
  13. package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
  14. package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
  15. package/compiled/tinypool/package.json +6 -22
  16. package/compiled/webpack-sources/index.js +112 -132
  17. package/compiled/webpack-sources/package.json +1 -1
  18. package/compiled/webpack-sources/types.d.ts +8 -6
  19. package/compiled/zod/dist/types/v4/classic/schemas.d.ts +19 -14
  20. package/compiled/zod/dist/types/v4/core/api.d.ts +5 -4
  21. package/compiled/zod/dist/types/v4/core/checks.d.ts +1 -1
  22. package/compiled/zod/dist/types/v4/core/core.d.ts +1 -1
  23. package/compiled/zod/dist/types/v4/core/registries.d.ts +3 -1
  24. package/compiled/zod/dist/types/v4/core/schemas.d.ts +33 -39
  25. package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +2 -2
  26. package/compiled/zod/dist/types/v4/core/util.d.ts +1 -1
  27. package/compiled/zod/dist/types/v4/locales/index.d.ts +1 -0
  28. package/compiled/zod/dist/types/v4/locales/ps.d.ts +4 -0
  29. package/compiled/zod/dist/types/v4/mini/schemas.d.ts +77 -125
  30. package/compiled/zod/index.js +33 -33
  31. package/compiled/zod/package.json +1 -1
  32. package/dist/BuildInfo.d.ts +17 -0
  33. package/dist/FileSystem.d.ts +26 -3
  34. package/dist/Module.d.ts +1 -13
  35. package/dist/Resolver.d.ts +2 -1
  36. package/dist/builtin-loader/swc/types.d.ts +255 -255
  37. package/dist/config/devServer.d.ts +10 -10
  38. package/dist/config/normalization.d.ts +1 -0
  39. package/dist/config/types.d.ts +10 -1
  40. package/dist/config/utils.d.ts +1 -0
  41. package/dist/config/zod.d.ts +1638 -1068
  42. package/dist/cssExtractLoader.js +5 -5
  43. package/dist/exports.d.ts +2 -1
  44. package/dist/index.js +550 -473
  45. package/dist/loader-runner/index.d.ts +0 -9
  46. package/dist/trace/index.d.ts +16 -18
  47. package/dist/worker.js +2 -2
  48. package/module.d.ts +1 -1
  49. package/package.json +9 -9
  50. package/compiled/tinypool/dist/chunk-6LX4VMOV.js +0 -31
  51. package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +0 -12
  52. package/compiled/tinypool/dist/chunk-E2J7JLFN.js +0 -53
  53. package/compiled/tinypool/dist/chunk-UBWFVGJX.js +0 -38
@@ -0,0 +1,38 @@
1
+ import { pathToFileURL } from "node:url";
2
+
3
+ //#region src/entry/utils.ts
4
+ let importESMCached;
5
+ function getImportESM() {
6
+ if (importESMCached === void 0) importESMCached = new Function("specifier", "return import(specifier)");
7
+ return importESMCached;
8
+ }
9
+ const handlerCache = new Map();
10
+ async function getHandler(filename, name) {
11
+ let handler = handlerCache.get(`${filename}/${name}`);
12
+ if (handler !== void 0) return handler;
13
+ try {
14
+ const handlerModule = await import(filename);
15
+ handler = typeof handlerModule.default !== "function" && handlerModule.default || handlerModule;
16
+ if (typeof handler !== "function") handler = await handler[name];
17
+ } catch {}
18
+ if (typeof handler !== "function") {
19
+ handler = await getImportESM()(pathToFileURL(filename).href);
20
+ if (typeof handler !== "function") handler = await handler[name];
21
+ }
22
+ if (typeof handler !== "function") return null;
23
+ if (handlerCache.size > 1e3) {
24
+ const [handler$1] = handlerCache;
25
+ const key = handler$1[0];
26
+ handlerCache.delete(key);
27
+ }
28
+ handlerCache.set(`${filename}/${name}`, handler);
29
+ return handler;
30
+ }
31
+ function throwInNextTick(error) {
32
+ process.nextTick(() => {
33
+ throw error;
34
+ });
35
+ }
36
+
37
+ //#endregion
38
+ export { getHandler, throwInNextTick };
@@ -0,0 +1,10 @@
1
+ //#region src/utils.ts
2
+ function stdout() {
3
+ return console._stdout || process.stdout || void 0;
4
+ }
5
+ function stderr() {
6
+ return console._stderr || process.stderr || void 0;
7
+ }
8
+
9
+ //#endregion
10
+ export { stderr, stdout };
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "tinypool",
3
3
  "type": "module",
4
- "version": "1.0.2",
4
+ "version": "1.1.0",
5
+ "packageManager": "pnpm@9.0.6",
5
6
  "description": "A minimal and tiny Node.js Worker Thread Pool implementation, a fork of piscina, but with fewer features",
6
7
  "license": "MIT",
7
8
  "homepage": "https://github.com/tinylibs/tinypool#readme",
@@ -30,26 +31,9 @@
30
31
  "files": [
31
32
  "dist"
32
33
  ],
33
- "devDependencies": {
34
- "@types/node": "^20.12.8",
35
- "clean-publish": "^3.4.4",
36
- "eslint": "^9.4.0",
37
- "eslint-config-prettier": "^9.1.0",
38
- "eslint-plugin-prettier": "^5.1.3",
39
- "eslint-plugin-unicorn": "^53.0.0",
40
- "prettier": "^3.3.2",
41
- "tsup": "^8.0.2",
42
- "typescript": "^5.4.5",
43
- "typescript-eslint": "^7.13.0",
44
- "vite": "^5.2.11",
45
- "vitest": "^2.0.5"
46
- },
47
- "scripts": {
48
- "test": "vitest",
49
- "bench": "vitest bench",
50
- "dev": "tsup --watch",
51
- "build": "tsup",
52
- "lint": "eslint --max-warnings=0",
53
- "typecheck": "tsc --noEmit"
34
+ "pnpm": {
35
+ "overrides": {
36
+ "vitest>tinypool": "link:./"
37
+ }
54
38
  }
55
39
  }