@rspack-debug/core 1.4.8 → 1.4.11

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 (36) hide show
  1. package/compiled/watchpack/index.js +149 -9
  2. package/dist/BuildInfo.d.ts +1 -1
  3. package/dist/Chunk.d.ts +1 -0
  4. package/dist/ChunkGraph.d.ts +1 -1
  5. package/dist/Compilation.d.ts +1 -1
  6. package/dist/Compiler.d.ts +1 -1
  7. package/dist/Module.d.ts +1 -1
  8. package/dist/MultiCompiler.d.ts +1 -1
  9. package/dist/NativeWatchFileSystem.d.ts +1 -1
  10. package/dist/NormalModuleFactory.d.ts +1 -1
  11. package/dist/Resolver.d.ts +8 -3
  12. package/dist/ResolverFactory.d.ts +1 -1
  13. package/dist/RspackError.d.ts +1 -1
  14. package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +13 -0
  15. package/dist/builtin-loader/swc/types.d.ts +4 -0
  16. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -2
  18. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +4 -0
  19. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -0
  21. package/dist/builtin-plugin/base.d.ts +1 -1
  22. package/dist/config/adapterRuleUse.d.ts +1 -1
  23. package/dist/config/types.d.ts +4 -1
  24. package/dist/container/ModuleFederationRuntimePlugin.d.ts +5 -2
  25. package/dist/container/index.d.ts +4 -0
  26. package/dist/cssExtractLoader.js +56 -54
  27. package/dist/index.js +3787 -3796
  28. package/dist/loader-runner/service.d.ts +1 -1
  29. package/dist/schema/plugins.d.ts +4 -0
  30. package/dist/stats/statsFactoryUtils.d.ts +1 -1
  31. package/dist/taps/compilation.d.ts +1 -1
  32. package/dist/taps/types.d.ts +1 -1
  33. package/package.json +6 -7
  34. package/compiled/glob-to-regexp/index.d.ts +0 -11
  35. package/compiled/glob-to-regexp/index.js +0 -187
  36. package/compiled/glob-to-regexp/package.json +0 -1
@@ -1,4 +1,4 @@
1
- import type { Tinypool } from "../../compiled/tinypool/dist/index.js" with { "resolution-mode": "import" };
1
+ import type { Tinypool } from "tinypool" with { "resolution-mode": "import" };
2
2
  type RunOptions = Parameters<Tinypool["run"]>[1];
3
3
  export interface WorkerResponseMessage {
4
4
  type: "response";
@@ -17,6 +17,10 @@ export declare const getRsdoctorPluginSchema: () => z.ZodObject<{
17
17
  assets: "assets";
18
18
  graph: "graph";
19
19
  }>>]>>;
20
+ sourceMapFeatures: z.ZodOptional<z.ZodObject<{
21
+ module: z.ZodOptional<z.ZodBoolean>;
22
+ cheap: z.ZodOptional<z.ZodBoolean>;
23
+ }, z.core.$strip>>;
20
24
  }, z.core.$strict>;
21
25
  export declare const getSRIPluginOptionsSchema: () => z.ZodObject<{
22
26
  hashFuncNames: z.ZodOptional<z.ZodTuple<[z.ZodEnum<{
@@ -1,4 +1,4 @@
1
- import type * as binding from "@rspack/binding";
1
+ import type binding from "@rspack/binding";
2
2
  import type { JsOriginRecord } from "@rspack/binding";
3
3
  import type { Compilation } from "../Compilation";
4
4
  import type { StatsOptions } from "../config";
@@ -1,4 +1,4 @@
1
- import * as binding from "@rspack/binding";
1
+ import binding from "@rspack/binding";
2
2
  import type { CreatePartialRegisters } from "./types";
3
3
  export declare class CodeGenerationResult {
4
4
  #private;
@@ -1,4 +1,4 @@
1
- import type * as binding from "@rspack/binding";
1
+ import type binding from "@rspack/binding";
2
2
  import type * as liteTapable from "@rspack/lite-tapable";
3
3
  import type { Compiler } from "../Compiler";
4
4
  type CreateHookMapRegisterTaps = <H extends liteTapable.Hook<any, any, any>>(registerKind: binding.RegisterJsTapKind, getHookMap: () => liteTapable.HookMap<H>, createTap: (queried: liteTapable.QueriedHookMap<H>) => any) => (stages: number[]) => binding.JsTap[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-debug/core",
3
- "version": "1.4.8",
3
+ "version": "1.4.11",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -37,9 +37,9 @@
37
37
  "directory": "packages/rspack"
38
38
  },
39
39
  "devDependencies": {
40
- "@ast-grep/napi": "^0.37.0",
41
- "@rsbuild/core": "^1.4.6",
42
- "@rslib/core": "0.10.5",
40
+ "@ast-grep/napi": "^0.39.1",
41
+ "@rsbuild/core": "^1.4.10",
42
+ "@rslib/core": "0.11.0",
43
43
  "@swc/types": "0.1.23",
44
44
  "@types/graceful-fs": "4.1.9",
45
45
  "@types/watchpack": "^2.4.4",
@@ -54,13 +54,12 @@
54
54
  "webpack-sources": "3.3.3",
55
55
  "glob-to-regexp": "^0.4.1",
56
56
  "zod": "^3.25.76",
57
- "@types/glob-to-regexp": "^0.4.4",
58
57
  "zod-validation-error": "3.5.3"
59
58
  },
60
59
  "dependencies": {
61
- "@module-federation/runtime-tools": "0.16.0",
60
+ "@module-federation/runtime-tools": "0.17.1",
62
61
  "@rspack/lite-tapable": "1.0.1",
63
- "@rspack/binding": "npm:@rspack-debug/binding@1.4.8"
62
+ "@rspack/binding": "npm:@rspack-debug/binding@1.4.11"
64
63
  },
65
64
  "peerDependencies": {
66
65
  "@swc/helpers": ">=0.5.1"
@@ -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"}