@rspack/core 1.3.2 → 1.3.3
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/tinypool/LICENSE +24 -0
- package/compiled/tinypool/README.md +212 -0
- package/compiled/tinypool/dist/chunk-6LX4VMOV.js +31 -0
- package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +12 -0
- package/compiled/tinypool/dist/chunk-E2J7JLFN.js +53 -0
- package/compiled/tinypool/dist/chunk-UBWFVGJX.js +38 -0
- package/compiled/tinypool/dist/entry/process.d.ts +2 -0
- package/compiled/tinypool/dist/entry/process.js +92 -0
- package/compiled/tinypool/dist/entry/utils.d.ts +5 -0
- package/compiled/tinypool/dist/entry/utils.js +9 -0
- package/compiled/tinypool/dist/entry/worker.d.ts +2 -0
- package/compiled/tinypool/dist/entry/worker.js +103 -0
- package/compiled/tinypool/dist/index.d.ts +188 -0
- package/compiled/tinypool/dist/index.js +1080 -0
- package/compiled/tinypool/package.json +55 -0
- package/dist/RuntimeGlobals.d.ts +1 -0
- package/dist/index.js +17 -4
- package/dist/loader-runner/service.d.ts +1 -1
- package/package.json +4 -4
@@ -0,0 +1,55 @@
|
|
1
|
+
{
|
2
|
+
"name": "tinypool",
|
3
|
+
"type": "module",
|
4
|
+
"version": "1.0.2",
|
5
|
+
"description": "A minimal and tiny Node.js Worker Thread Pool implementation, a fork of piscina, but with fewer features",
|
6
|
+
"license": "MIT",
|
7
|
+
"homepage": "https://github.com/tinylibs/tinypool#readme",
|
8
|
+
"repository": {
|
9
|
+
"type": "git",
|
10
|
+
"url": "https://github.com/tinylibs/tinypool.git"
|
11
|
+
},
|
12
|
+
"bugs": {
|
13
|
+
"url": "https://github.com/tinylibs/tinypool/issues"
|
14
|
+
},
|
15
|
+
"keywords": [
|
16
|
+
"fast",
|
17
|
+
"worker threads",
|
18
|
+
"thread pool"
|
19
|
+
],
|
20
|
+
"exports": {
|
21
|
+
".": {
|
22
|
+
"types": "./dist/index.d.ts",
|
23
|
+
"default": "./dist/index.js"
|
24
|
+
},
|
25
|
+
"./package.json": "./package.json"
|
26
|
+
},
|
27
|
+
"main": "./dist/index.js",
|
28
|
+
"module": "./dist/index.js",
|
29
|
+
"types": "./dist/index.d.ts",
|
30
|
+
"files": [
|
31
|
+
"dist"
|
32
|
+
],
|
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"
|
54
|
+
}
|
55
|
+
}
|
package/dist/RuntimeGlobals.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -5256,7 +5256,7 @@ var ensureLoaderWorkerPool = async () => {
|
|
5256
5256
|
if (pool) {
|
5257
5257
|
return pool;
|
5258
5258
|
}
|
5259
|
-
return pool = import("tinypool").then(({ Tinypool }) => {
|
5259
|
+
return pool = import("../compiled/tinypool").then(({ Tinypool }) => {
|
5260
5260
|
const cpus = require("os").cpus().length;
|
5261
5261
|
const availableThreads = Math.max(cpus - 1, 1);
|
5262
5262
|
const pool2 = new Tinypool({
|
@@ -12800,7 +12800,7 @@ var CodeGenerationResult = class {
|
|
12800
12800
|
};
|
12801
12801
|
|
12802
12802
|
// src/RuntimeGlobals.ts
|
12803
|
-
var
|
12803
|
+
var RESERVED_RUNTIME_GLOBALS = /* @__PURE__ */ new Map();
|
12804
12804
|
function __from_binding_runtime_globals(runtimeRequirements) {
|
12805
12805
|
const res = /* @__PURE__ */ new Set();
|
12806
12806
|
for (const flag of runtimeRequirements.value) {
|
@@ -12817,7 +12817,7 @@ function __to_binding_runtime_globals(runtimeRequirements) {
|
|
12817
12817
|
value: []
|
12818
12818
|
};
|
12819
12819
|
for (const flag of Array.from(runtimeRequirements)) {
|
12820
|
-
const item =
|
12820
|
+
const item = RESERVED_RUNTIME_GLOBALS.get(flag);
|
12821
12821
|
if (typeof item === "string") {
|
12822
12822
|
res.value.push(item);
|
12823
12823
|
} else {
|
@@ -13139,8 +13139,9 @@ var RuntimeGlobals = {
|
|
13139
13139
|
asyncModule: "__webpack_require__.a"
|
13140
13140
|
};
|
13141
13141
|
for (const entry2 of Object.entries(RuntimeGlobals)) {
|
13142
|
-
|
13142
|
+
RESERVED_RUNTIME_GLOBALS.set(entry2[1], entry2[0]);
|
13143
13143
|
}
|
13144
|
+
var isReservedRuntimeGlobal = (r) => RESERVED_RUNTIME_GLOBALS.has(r);
|
13144
13145
|
|
13145
13146
|
// src/taps/compilation.ts
|
13146
13147
|
var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
@@ -13177,9 +13178,21 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13177
13178
|
const set = __from_binding_runtime_globals(runtimeRequirements);
|
13178
13179
|
const all = __from_binding_runtime_globals(allRuntimeRequirements);
|
13179
13180
|
const chunk = Chunk.__from_binding(chunkBinding);
|
13181
|
+
const customRuntimeGlobals = /* @__PURE__ */ new Set();
|
13182
|
+
const originalAdd = all.add.bind(all);
|
13183
|
+
const add = function add2(r) {
|
13184
|
+
if (all.has(r)) return all;
|
13185
|
+
if (isReservedRuntimeGlobal(r)) return originalAdd(r);
|
13186
|
+
customRuntimeGlobals.add(r);
|
13187
|
+
return originalAdd(r);
|
13188
|
+
};
|
13189
|
+
all.add = add.bind(add);
|
13180
13190
|
for (const r of set) {
|
13181
13191
|
queried.for(r).call(chunk, all);
|
13182
13192
|
}
|
13193
|
+
for (const r of customRuntimeGlobals) {
|
13194
|
+
queried.for(r).call(chunk, all);
|
13195
|
+
}
|
13183
13196
|
return {
|
13184
13197
|
allRuntimeRequirements: __to_binding_runtime_globals(all)
|
13185
13198
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Tinypool } from "tinypool" with { "resolution-mode": "import" };
|
1
|
+
import type { Tinypool } from "../../compiled/tinypool" with { "resolution-mode": "import" };
|
2
2
|
type RunOptions = Parameters<Tinypool["run"]>[1];
|
3
3
|
export interface WorkerResponseMessage {
|
4
4
|
type: "response";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.3",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -57,14 +57,14 @@
|
|
57
57
|
"webpack-sources": "3.2.3",
|
58
58
|
"zod": "^3.24.2",
|
59
59
|
"zod-validation-error": "3.4.0",
|
60
|
-
"
|
60
|
+
"tinypool": "^1.0.2",
|
61
|
+
"@rspack/tracing": "1.3.3"
|
61
62
|
},
|
62
63
|
"dependencies": {
|
63
64
|
"@module-federation/runtime-tools": "0.11.2",
|
64
65
|
"@rspack/lite-tapable": "1.0.1",
|
65
66
|
"caniuse-lite": "^1.0.30001707",
|
66
|
-
"
|
67
|
-
"@rspack/binding": "1.3.2"
|
67
|
+
"@rspack/binding": "1.3.3"
|
68
68
|
},
|
69
69
|
"peerDependencies": {
|
70
70
|
"@rspack/tracing": "^1.x",
|