@rspack/core 1.4.4 → 1.4.5
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/watchpack/index.d.ts +1 -0
- package/dist/Compilation.d.ts +2 -0
- package/dist/builtin-loader/swc/types.d.ts +1 -1
- package/dist/config/utils.d.ts +1 -1
- package/dist/config/zod.d.ts +11 -9
- package/dist/index.js +15288 -8896
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/util/validate.d.ts +1 -1
- package/hot/lazy-compilation-node.js +1 -1
- package/hot/lazy-compilation-web.js +10 -16
- package/package.json +3 -2
@@ -14,7 +14,7 @@ import { type GroupConfig } from "../util/smartGrouping";
|
|
14
14
|
export type KnownStatsFactoryContext = {
|
15
15
|
type: string;
|
16
16
|
makePathsRelative?: ((arg0: string) => string) | undefined;
|
17
|
-
compilation
|
17
|
+
compilation: Compilation;
|
18
18
|
cachedGetErrors?: ((arg0: Compilation) => JsStatsError[]) | undefined;
|
19
19
|
cachedGetWarnings?: ((arg0: Compilation) => JsStatsError[]) | undefined;
|
20
20
|
getStatsCompilation: (compilation: Compilation) => JsStatsCompilation;
|
package/dist/util/validate.d.ts
CHANGED
@@ -8,7 +8,7 @@ var urlBase = decodeURIComponent(__resourceQuery.slice(1));
|
|
8
8
|
* @param {{ data: string, onError: (err: Error) => void, active: boolean, module: module }} options options
|
9
9
|
* @returns {() => void} function to destroy response
|
10
10
|
*/
|
11
|
-
exports.
|
11
|
+
exports.activate = function (options) {
|
12
12
|
var data = options.data;
|
13
13
|
var onError = options.onError;
|
14
14
|
var active = options.active;
|
@@ -11,14 +11,14 @@ if (typeof EventSource !== "function") {
|
|
11
11
|
var urlBase = decodeURIComponent(__resourceQuery.slice(1));
|
12
12
|
/** @type {EventSource | undefined} */
|
13
13
|
var activeEventSource;
|
14
|
-
var
|
14
|
+
var compiling = new Set();
|
15
15
|
var errorHandlers = new Set();
|
16
16
|
|
17
17
|
var updateEventSource = function updateEventSource() {
|
18
18
|
if (activeEventSource) activeEventSource.close();
|
19
|
-
if (
|
19
|
+
if (compiling.size) {
|
20
20
|
activeEventSource = new EventSource(
|
21
|
-
urlBase + Array.from(
|
21
|
+
urlBase + Array.from(compiling).join("@")
|
22
22
|
);
|
23
23
|
/**
|
24
24
|
* @this {EventSource}
|
@@ -47,17 +47,18 @@ var updateEventSource = function updateEventSource() {
|
|
47
47
|
* @param {{ data: string, onError: (err: Error) => void, active: boolean, module: module }} options options
|
48
48
|
* @returns {() => void} function to destroy response
|
49
49
|
*/
|
50
|
-
exports.
|
50
|
+
exports.activate = function (options) {
|
51
51
|
var data = options.data;
|
52
52
|
var onError = options.onError;
|
53
53
|
var active = options.active;
|
54
54
|
var module = options.module;
|
55
55
|
errorHandlers.add(onError);
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
|
57
|
+
if (!compiling.has(data)) {
|
58
|
+
compiling.add(data);
|
59
59
|
updateEventSource();
|
60
60
|
}
|
61
|
+
|
61
62
|
if (!active && !module.hot) {
|
62
63
|
console.log(
|
63
64
|
"Hot Module Replacement is not enabled. Waiting for process restart..."
|
@@ -66,14 +67,7 @@ exports.keepAlive = function (options) {
|
|
66
67
|
|
67
68
|
return function () {
|
68
69
|
errorHandlers.delete(onError);
|
69
|
-
|
70
|
-
|
71
|
-
if (value === 1) {
|
72
|
-
activeKeys.delete(data);
|
73
|
-
updateEventSource();
|
74
|
-
} else {
|
75
|
-
activeKeys.set(data, value - 1);
|
76
|
-
}
|
77
|
-
}, 1000);
|
70
|
+
compiling.delete(data);
|
71
|
+
updateEventSource();
|
78
72
|
};
|
79
73
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.5",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -38,6 +38,7 @@
|
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@ast-grep/napi": "^0.37.0",
|
41
|
+
"@rsbuild/core": "^1.4.4",
|
41
42
|
"@rslib/core": "0.10.0",
|
42
43
|
"@swc/core": "1.12.0",
|
43
44
|
"@swc/types": "0.1.22",
|
@@ -58,7 +59,7 @@
|
|
58
59
|
"dependencies": {
|
59
60
|
"@module-federation/runtime-tools": "0.15.0",
|
60
61
|
"@rspack/lite-tapable": "1.0.1",
|
61
|
-
"@rspack/binding": "1.4.
|
62
|
+
"@rspack/binding": "1.4.5"
|
62
63
|
},
|
63
64
|
"peerDependencies": {
|
64
65
|
"@swc/helpers": ">=0.5.1"
|