@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.
- package/compiled/@swc/types/index.d.ts +18 -2
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/tinypool/README.md +4 -196
- package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
- package/compiled/tinypool/dist/entry/process.d.ts +1 -2
- package/compiled/tinypool/dist/entry/process.js +63 -83
- package/compiled/tinypool/dist/entry/utils.d.ts +3 -1
- package/compiled/tinypool/dist/entry/utils.js +3 -9
- package/compiled/tinypool/dist/entry/worker.d.ts +1 -2
- package/compiled/tinypool/dist/entry/worker.js +66 -94
- package/compiled/tinypool/dist/index.d.ts +132 -125
- package/compiled/tinypool/dist/index.js +771 -1035
- package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
- package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
- package/compiled/tinypool/package.json +6 -22
- package/compiled/webpack-sources/index.js +112 -132
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +8 -6
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +19 -14
- package/compiled/zod/dist/types/v4/core/api.d.ts +5 -4
- package/compiled/zod/dist/types/v4/core/checks.d.ts +1 -1
- package/compiled/zod/dist/types/v4/core/core.d.ts +1 -1
- package/compiled/zod/dist/types/v4/core/registries.d.ts +3 -1
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +33 -39
- package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +2 -2
- package/compiled/zod/dist/types/v4/core/util.d.ts +1 -1
- package/compiled/zod/dist/types/v4/locales/index.d.ts +1 -0
- package/compiled/zod/dist/types/v4/locales/ps.d.ts +4 -0
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +77 -125
- package/compiled/zod/index.js +33 -33
- package/compiled/zod/package.json +1 -1
- package/dist/BuildInfo.d.ts +17 -0
- package/dist/FileSystem.d.ts +26 -3
- package/dist/Module.d.ts +1 -13
- package/dist/Resolver.d.ts +2 -1
- package/dist/builtin-loader/swc/types.d.ts +255 -255
- package/dist/config/devServer.d.ts +10 -10
- package/dist/config/normalization.d.ts +1 -0
- package/dist/config/types.d.ts +10 -1
- package/dist/config/utils.d.ts +1 -0
- package/dist/config/zod.d.ts +1638 -1068
- package/dist/cssExtractLoader.js +5 -5
- package/dist/exports.d.ts +2 -1
- package/dist/index.js +550 -473
- package/dist/loader-runner/index.d.ts +0 -9
- package/dist/trace/index.d.ts +16 -18
- package/dist/worker.js +2 -2
- package/module.d.ts +1 -1
- package/package.json +9 -9
- package/compiled/tinypool/dist/chunk-6LX4VMOV.js +0 -31
- package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +0 -12
- package/compiled/tinypool/dist/chunk-E2J7JLFN.js +0 -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 };
|
@@ -1,7 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "tinypool",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.0
|
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
|
-
"
|
34
|
-
"
|
35
|
-
|
36
|
-
|
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
|
}
|