@rspack-debug/core 1.4.9 → 1.6.2

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 (150) hide show
  1. package/compiled/@swc/types/index.d.ts +15 -5
  2. package/compiled/@swc/types/package.json +1 -1
  3. package/compiled/browserslist-load-config/index.d.ts +11 -0
  4. package/compiled/browserslist-load-config/index.js +26 -40
  5. package/compiled/browserslist-load-config/package.json +1 -1
  6. package/compiled/watchpack/index.js +1157 -20
  7. package/compiled/webpack-sources/index.js +82 -82
  8. package/dist/Compilation.d.ts +17 -20
  9. package/dist/Compiler.d.ts +63 -32
  10. package/dist/Module.d.ts +3 -14
  11. package/dist/MultiCompiler.d.ts +8 -4
  12. package/dist/MultiStats.d.ts +3 -2
  13. package/dist/MultiWatching.d.ts +1 -1
  14. package/dist/NativeWatchFileSystem.d.ts +8 -2
  15. package/dist/NormalModuleFactory.d.ts +2 -2
  16. package/dist/Resolver.d.ts +13 -7
  17. package/dist/ResolverFactory.d.ts +8 -5
  18. package/dist/RspackError.d.ts +3 -0
  19. package/dist/RuntimeGlobals.d.ts +3 -0
  20. package/dist/RuntimeModule.d.ts +1 -1
  21. package/dist/VirtualModulesPlugin.d.ts +12 -0
  22. package/dist/Watching.d.ts +9 -0
  23. package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +13 -0
  24. package/dist/builtin-loader/swc/pluginImport.d.ts +2 -2
  25. package/dist/builtin-loader/swc/types.d.ts +4 -0
  26. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/DefinePlugin.d.ts +2 -2
  41. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -2
  42. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -2
  43. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +11 -0
  51. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/ExternalsPlugin.d.ts +5 -3
  54. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -2
  59. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/InlineExportsPlugin.d.ts +9 -0
  63. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -2
  69. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -2
  72. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  74. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  75. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -2
  76. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -2
  77. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
  78. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  79. package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
  80. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
  81. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  82. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  83. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  84. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
  85. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  86. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +7 -3
  87. package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
  88. package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
  89. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  90. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  91. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  92. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  93. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  94. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -2
  95. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
  96. package/dist/builtin-plugin/URLPlugin.d.ts +9 -0
  97. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  98. package/dist/builtin-plugin/base.d.ts +2 -2
  99. package/dist/builtin-plugin/css-extract/index.d.ts +2 -2
  100. package/dist/builtin-plugin/html-plugin/options.d.ts +0 -1
  101. package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
  102. package/dist/builtin-plugin/index.d.ts +4 -0
  103. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -17
  104. package/dist/config/adapterRuleUse.d.ts +65 -7
  105. package/dist/config/defaults.d.ts +0 -9
  106. package/dist/config/devServer.d.ts +12 -13
  107. package/dist/config/index.d.ts +1 -0
  108. package/dist/config/normalization.d.ts +18 -3
  109. package/dist/config/types.d.ts +123 -19
  110. package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
  111. package/dist/container/ModuleFederationPlugin.d.ts +3 -1
  112. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  113. package/dist/cssExtractHmr.js +12 -13
  114. package/dist/cssExtractLoader.js +63 -62
  115. package/dist/exports.d.ts +16 -9
  116. package/dist/index.js +1723 -5626
  117. package/dist/lib/Cache.d.ts +1 -1
  118. package/dist/loader-runner/ModuleError.d.ts +7 -1
  119. package/dist/loader-runner/loadLoader.d.ts +2 -1
  120. package/dist/loader-runner/service.d.ts +2 -2
  121. package/dist/loader-runner/utils.d.ts +2 -1
  122. package/dist/moduleFederationDefaultRuntime.js +1 -1
  123. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +16 -0
  124. package/dist/stats/statsFactoryUtils.d.ts +17 -1
  125. package/dist/util/ArrayQueue.d.ts +2 -2
  126. package/dist/util/bindingVersionCheck.d.ts +1 -1
  127. package/dist/util/comparators.d.ts +1 -1
  128. package/dist/util/fs.d.ts +25 -2
  129. package/dist/util/index.d.ts +0 -3
  130. package/dist/util/source.d.ts +5 -6
  131. package/dist/util/validateConfig.d.ts +5 -0
  132. package/dist/worker.js +152 -118
  133. package/hot/lazy-compilation-node.js +1 -3
  134. package/hot/lazy-compilation-web.js +4 -3
  135. package/module.d.ts +11 -14
  136. package/package.json +20 -21
  137. package/compiled/glob-to-regexp/index.d.ts +0 -11
  138. package/compiled/glob-to-regexp/index.js +0 -187
  139. package/compiled/glob-to-regexp/package.json +0 -1
  140. package/compiled/graceful-fs/index.d.ts +0 -13
  141. package/compiled/graceful-fs/index.js +0 -1063
  142. package/compiled/graceful-fs/license +0 -15
  143. package/compiled/graceful-fs/package.json +0 -1
  144. package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
  145. package/dist/loader-runner/ModuleWarning.d.ts +0 -7
  146. package/dist/schema/config.d.ts +0 -996
  147. package/dist/schema/loaders.d.ts +0 -400
  148. package/dist/schema/plugins.d.ts +0 -163
  149. package/dist/schema/utils.d.ts +0 -4
  150. package/dist/schema/validate.d.ts +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-debug/core",
3
- "version": "1.4.9",
3
+ "version": "1.6.2",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -27,7 +27,7 @@
27
27
  "module.d.ts"
28
28
  ],
29
29
  "engines": {
30
- "node": ">=16.0.0"
30
+ "node": ">=18.12.0"
31
31
  },
32
32
  "homepage": "https://rspack.rs",
33
33
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
@@ -37,30 +37,28 @@
37
37
  "directory": "packages/rspack"
38
38
  },
39
39
  "devDependencies": {
40
- "@ast-grep/napi": "^0.38.7",
41
- "@rsbuild/core": "^1.4.6",
42
- "@rslib/core": "0.10.5",
43
- "@swc/types": "0.1.23",
44
- "@types/graceful-fs": "4.1.9",
40
+ "@ast-grep/napi": "^0.39.9",
41
+ "@napi-rs/wasm-runtime": "1.0.7",
42
+ "@rsbuild/plugin-node-polyfill": "^1.4.2",
43
+ "@rslib/core": "0.17.1",
44
+ "@swc/types": "0.1.25",
45
+ "@types/node": "^20.19.25",
45
46
  "@types/watchpack": "^2.4.4",
46
- "browserslist-load-config": "^1.0.0",
47
- "enhanced-resolve": "5.18.2",
48
- "graceful-fs": "^4.2.11",
49
- "prebundle": "^1.3.4",
47
+ "browserslist-load-config": "^1.0.1",
48
+ "enhanced-resolve": "5.18.3",
49
+ "glob-to-regexp": "^0.4.1",
50
+ "memfs": "4.48.1",
51
+ "prebundle": "^1.5.0",
50
52
  "tinypool": "^1.1.1",
51
- "tsx": "^4.20.3",
52
- "typescript": "^5.8.3",
53
+ "tsx": "^4.20.6",
54
+ "typescript": "^5.9.3",
53
55
  "watchpack": "^2.4.4",
54
- "webpack-sources": "3.3.3",
55
- "glob-to-regexp": "^0.4.1",
56
- "zod": "^3.25.76",
57
- "@types/glob-to-regexp": "^0.4.4",
58
- "zod-validation-error": "3.5.3"
56
+ "webpack-sources": "3.3.3"
59
57
  },
60
58
  "dependencies": {
61
- "@module-federation/runtime-tools": "0.17.0",
62
- "@rspack/lite-tapable": "1.0.1",
63
- "@rspack/binding": "npm:@rspack-debug/binding@1.4.9"
59
+ "@module-federation/runtime-tools": "0.21.4",
60
+ "@rspack/lite-tapable": "1.1.0",
61
+ "@rspack/binding": "npm:@rspack-debug/binding@1.6.2"
64
62
  },
65
63
  "peerDependencies": {
66
64
  "@swc/helpers": ">=0.5.1"
@@ -72,6 +70,7 @@
72
70
  },
73
71
  "scripts": {
74
72
  "build": "rslib build",
73
+ "build:browser": "rslib build -c rslib.browser.config.mts",
75
74
  "dev": "rslib build --watch",
76
75
  "doc-coverage": "tsx ./scripts/check-documentation-coverage.ts",
77
76
  "api-extractor": "api-extractor run --verbose",
@@ -1,11 +0,0 @@
1
- declare function GlobToRegExp(glob: string, options?: GlobToRegExp.Options): RegExp;
2
-
3
- declare namespace GlobToRegExp {
4
- interface Options {
5
- extended?: boolean | undefined;
6
- globstar?: boolean | undefined;
7
- flags?: string | undefined;
8
- }
9
- }
10
-
11
- export { GlobToRegExp as default };
@@ -1,187 +0,0 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ var __webpack_modules__ = ({
3
-
4
- /***/ 137:
5
- /***/ ((module) => {
6
-
7
- module.exports = function (glob, opts) {
8
- if (typeof glob !== 'string') {
9
- throw new TypeError('Expected a string');
10
- }
11
-
12
- var str = String(glob);
13
-
14
- // The regexp we are building, as a string.
15
- var reStr = "";
16
-
17
- // Whether we are matching so called "extended" globs (like bash) and should
18
- // support single character matching, matching ranges of characters, group
19
- // matching, etc.
20
- var extended = opts ? !!opts.extended : false;
21
-
22
- // When globstar is _false_ (default), '/foo/*' is translated a regexp like
23
- // '^\/foo\/.*$' which will match any string beginning with '/foo/'
24
- // When globstar is _true_, '/foo/*' is translated to regexp like
25
- // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT
26
- // which does not have a '/' to the right of it.
27
- // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but
28
- // these will not '/foo/bar/baz', '/foo/bar/baz.txt'
29
- // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when
30
- // globstar is _false_
31
- var globstar = opts ? !!opts.globstar : false;
32
-
33
- // If we are doing extended matching, this boolean is true when we are inside
34
- // a group (eg {*.html,*.js}), and false otherwise.
35
- var inGroup = false;
36
-
37
- // RegExp flags (eg "i" ) to pass in to RegExp constructor.
38
- var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : "";
39
-
40
- var c;
41
- for (var i = 0, len = str.length; i < len; i++) {
42
- c = str[i];
43
-
44
- switch (c) {
45
- case "/":
46
- case "$":
47
- case "^":
48
- case "+":
49
- case ".":
50
- case "(":
51
- case ")":
52
- case "=":
53
- case "!":
54
- case "|":
55
- reStr += "\\" + c;
56
- break;
57
-
58
- case "?":
59
- if (extended) {
60
- reStr += ".";
61
- break;
62
- }
63
-
64
- case "[":
65
- case "]":
66
- if (extended) {
67
- reStr += c;
68
- break;
69
- }
70
-
71
- case "{":
72
- if (extended) {
73
- inGroup = true;
74
- reStr += "(";
75
- break;
76
- }
77
-
78
- case "}":
79
- if (extended) {
80
- inGroup = false;
81
- reStr += ")";
82
- break;
83
- }
84
-
85
- case ",":
86
- if (inGroup) {
87
- reStr += "|";
88
- break;
89
- }
90
- reStr += "\\" + c;
91
- break;
92
-
93
- case "*":
94
- // Move over all consecutive "*"'s.
95
- // Also store the previous and next characters
96
- var prevChar = str[i - 1];
97
- var starCount = 1;
98
- while(str[i + 1] === "*") {
99
- starCount++;
100
- i++;
101
- }
102
- var nextChar = str[i + 1];
103
-
104
- if (!globstar) {
105
- // globstar is disabled, so treat any number of "*" as one
106
- reStr += ".*";
107
- } else {
108
- // globstar is enabled, so determine if this is a globstar segment
109
- var isGlobstar = starCount > 1 // multiple "*"'s
110
- && (prevChar === "/" || prevChar === undefined) // from the start of the segment
111
- && (nextChar === "/" || nextChar === undefined) // to the end of the segment
112
-
113
- if (isGlobstar) {
114
- // it's a globstar, so match zero or more path segments
115
- reStr += "((?:[^/]*(?:\/|$))*)";
116
- i++; // move over the "/"
117
- } else {
118
- // it's not a globstar, so only match one path segment
119
- reStr += "([^/]*)";
120
- }
121
- }
122
- break;
123
-
124
- default:
125
- reStr += c;
126
- }
127
- }
128
-
129
- // When regexp 'g' flag is specified don't
130
- // constrain the regular expression with ^ & $
131
- if (!flags || !~flags.indexOf('g')) {
132
- reStr = "^" + reStr + "$";
133
- }
134
-
135
- return new RegExp(reStr, flags);
136
- };
137
-
138
-
139
- /***/ })
140
-
141
- /******/ });
142
- /************************************************************************/
143
- /******/ // The module cache
144
- /******/ var __webpack_module_cache__ = {};
145
- /******/
146
- /******/ // The require function
147
- /******/ function __nccwpck_require__(moduleId) {
148
- /******/ // Check if module is in cache
149
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
150
- /******/ if (cachedModule !== undefined) {
151
- /******/ return cachedModule.exports;
152
- /******/ }
153
- /******/ // Create a new module (and put it into the cache)
154
- /******/ var module = __webpack_module_cache__[moduleId] = {
155
- /******/ // no module.id needed
156
- /******/ // no module.loaded needed
157
- /******/ exports: {}
158
- /******/ };
159
- /******/
160
- /******/ // Execute the module function
161
- /******/ var threw = true;
162
- /******/ try {
163
- /******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
164
- /******/ threw = false;
165
- /******/ } finally {
166
- /******/ if(threw) delete __webpack_module_cache__[moduleId];
167
- /******/ }
168
- /******/
169
- /******/ // Return the exports of the module
170
- /******/ return module.exports;
171
- /******/ }
172
- /******/
173
- /************************************************************************/
174
- /******/ /* webpack/runtime/compat */
175
- /******/
176
- /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
177
- /******/
178
- /************************************************************************/
179
- /******/
180
- /******/ // startup
181
- /******/ // Load entry module and return exports
182
- /******/ // This entry module is referenced by other modules so it can't be inlined
183
- /******/ var __webpack_exports__ = __nccwpck_require__(137);
184
- /******/ module.exports = __webpack_exports__;
185
- /******/
186
- /******/ })()
187
- ;
@@ -1 +0,0 @@
1
- {"name":"glob-to-regexp","author":"Nick Fitzgerald <fitzgen@gmail.com>","version":"0.4.1","license":"BSD-2-Clause","types":"index.d.ts","type":"commonjs"}
@@ -1,13 +0,0 @@
1
- /// <reference types="node" />
2
- export * from 'fs';
3
-
4
- /**
5
- * Use this method to patch the global fs module (or any other fs-like module).
6
- * NOTE: This should only ever be done at the top-level application layer, in order to delay on
7
- * EMFILE errors from any fs-using dependencies. You should **not** do this in a library, because
8
- * it can cause unexpected delays in other parts of the program.
9
- * @param fsModule The reference to the fs module or an fs-like module.
10
- */
11
- declare function gracefulify<T>(fsModule: T): T;
12
-
13
- export { gracefulify };