@rspack-debug/core 1.4.11 → 1.6.4

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 (145) 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 +1015 -18
  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 +7 -3
  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/pluginImport.d.ts +2 -2
  24. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/DefinePlugin.d.ts +2 -2
  39. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -2
  40. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -2
  41. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +11 -0
  49. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -1
  52. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -2
  57. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/InlineExportsPlugin.d.ts +9 -0
  61. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -2
  67. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -2
  70. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -2
  74. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -2
  75. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
  76. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  77. package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
  78. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
  79. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  80. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  81. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  82. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
  83. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  84. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +3 -3
  85. package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
  86. package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
  87. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  88. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  89. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  90. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  91. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  92. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -2
  93. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
  94. package/dist/builtin-plugin/URLPlugin.d.ts +9 -0
  95. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  96. package/dist/builtin-plugin/base.d.ts +2 -2
  97. package/dist/builtin-plugin/css-extract/index.d.ts +2 -2
  98. package/dist/builtin-plugin/html-plugin/options.d.ts +0 -1
  99. package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
  100. package/dist/builtin-plugin/index.d.ts +4 -0
  101. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -17
  102. package/dist/config/adapterRuleUse.d.ts +65 -7
  103. package/dist/config/defaults.d.ts +0 -9
  104. package/dist/config/devServer.d.ts +123 -16
  105. package/dist/config/index.d.ts +1 -0
  106. package/dist/config/normalization.d.ts +18 -3
  107. package/dist/config/types.d.ts +119 -18
  108. package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
  109. package/dist/container/ModuleFederationPlugin.d.ts +3 -1
  110. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  111. package/dist/cssExtractHmr.js +12 -13
  112. package/dist/cssExtractLoader.js +9 -10
  113. package/dist/exports.d.ts +16 -9
  114. package/dist/index.js +1556 -5443
  115. package/dist/lib/Cache.d.ts +1 -1
  116. package/dist/loader-runner/ModuleError.d.ts +7 -1
  117. package/dist/loader-runner/loadLoader.d.ts +2 -1
  118. package/dist/loader-runner/service.d.ts +1 -1
  119. package/dist/loader-runner/utils.d.ts +2 -1
  120. package/dist/moduleFederationDefaultRuntime.js +1 -1
  121. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +16 -0
  122. package/dist/stats/statsFactoryUtils.d.ts +17 -1
  123. package/dist/util/ArrayQueue.d.ts +2 -2
  124. package/dist/util/bindingVersionCheck.d.ts +1 -1
  125. package/dist/util/comparators.d.ts +1 -1
  126. package/dist/util/fs.d.ts +25 -2
  127. package/dist/util/index.d.ts +0 -3
  128. package/dist/util/source.d.ts +5 -6
  129. package/dist/util/validateConfig.d.ts +5 -0
  130. package/dist/worker.js +152 -118
  131. package/hot/lazy-compilation-node.js +1 -3
  132. package/hot/lazy-compilation-web.js +4 -3
  133. package/module.d.ts +11 -14
  134. package/package.json +20 -20
  135. package/compiled/graceful-fs/index.d.ts +0 -13
  136. package/compiled/graceful-fs/index.js +0 -1063
  137. package/compiled/graceful-fs/license +0 -15
  138. package/compiled/graceful-fs/package.json +0 -1
  139. package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
  140. package/dist/loader-runner/ModuleWarning.d.ts +0 -7
  141. package/dist/schema/config.d.ts +0 -996
  142. package/dist/schema/loaders.d.ts +0 -400
  143. package/dist/schema/plugins.d.ts +0 -167
  144. package/dist/schema/utils.d.ts +0 -4
  145. package/dist/schema/validate.d.ts +0 -10
@@ -487,7 +487,7 @@ interface Options extends Config {
487
487
  */
488
488
  sourceRoot?: string;
489
489
  plugin?: Plugin;
490
- isModule?: boolean | "unknown";
490
+ isModule?: boolean | "unknown" | "commonjs";
491
491
  /**
492
492
  * Destination path. Note that this value is used only to fix source path
493
493
  * of source map files and swc does not write output to this path.
@@ -731,7 +731,7 @@ interface EsParserConfig {
731
731
  */
732
732
  importAssertions?: boolean;
733
733
  /**
734
- * Defaults to `false`
734
+ * @deprecated Always true in swc
735
735
  */
736
736
  importAttributes?: boolean;
737
737
  /**
@@ -785,6 +785,7 @@ interface TransformConfig {
785
785
  * https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
786
786
  */
787
787
  verbatimModuleSyntax?: boolean;
788
+ tsEnumIsMutable?: boolean;
788
789
  }
789
790
  interface ReactConfig {
790
791
  /**
@@ -845,11 +846,20 @@ interface ReactConfig {
845
846
  emitFullSignatures?: boolean;
846
847
  };
847
848
  /**
848
- * jsx runtime
849
+ * Decides which runtime to use when transforming JSX.
850
+ * - `"automatic"` - Automatically imports the functions that JSX transpiles to.
851
+ * This is the modern approach introduced in React 17+ that eliminates the need to
852
+ * manually import React in every file that uses JSX.
853
+ * - `"classic"` - Uses the traditional JSX transform that relies on `React.createElement`
854
+ * calls. Requires React to be in scope, which was the standard behavior before React 17.
855
+ * - `"preserve"` - Leaves JSX syntax unchanged without transforming it.
856
+ * @default "classic"
849
857
  */
850
- runtime?: "automatic" | "classic";
858
+ runtime?: "automatic" | "classic" | "preserve";
851
859
  /**
852
- * Declares the module specifier to be used for importing the `jsx` and `jsxs` factory functions when using `runtime` 'automatic'
860
+ * Declares the module specifier to be used for importing the `jsx` and `jsxs` factory
861
+ * functions when using `runtime` 'automatic'
862
+ * @default "react"
853
863
  */
854
864
  importSource?: string;
855
865
  }
@@ -1 +1 @@
1
- {"name":"@swc/types","author":"강동윤 <kdy1997.dev@gmail.com>","version":"0.1.23","license":"Apache-2.0","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"@swc/types","author":"강동윤 <kdy1997.dev@gmail.com>","version":"0.1.25","license":"Apache-2.0","types":"index.d.ts","type":"commonjs"}
@@ -1,7 +1,18 @@
1
1
  declare function findConfig(from: string): Record<string, string[]> | undefined;
2
2
  type LoadConfigOptions = {
3
+ /**
4
+ * Specify the path to the configuration file
5
+ * If both `config` and `path` are provided, `config` will be used
6
+ */
3
7
  config?: string;
8
+ /**
9
+ * Specify the directory where the configuration file is located
10
+ */
4
11
  path?: string;
12
+ /**
13
+ * Specify the environment to load
14
+ * @default "production"
15
+ */
5
16
  env?: string;
6
17
  };
7
18
  declare function loadConfig(opts: LoadConfigOptions): string[] | undefined;
@@ -16,46 +16,33 @@ module.exports = require("node:path");
16
16
 
17
17
  /***/ }),
18
18
 
19
- /***/ 725:
19
+ /***/ 867:
20
20
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
21
21
 
22
22
 
23
- // The require scope
24
- var __nested_webpack_require_39__ = {};
25
- /************************************************************************/ // webpack/runtime/compat_get_default_export
23
+ var __nested_webpack_require_18__ = {};
26
24
  (()=>{
27
- // getDefaultExport function for compatibility with non-ESM modules
28
- __nested_webpack_require_39__.n = function(module) {
29
- var getter = module && module.__esModule ? function() {
30
- return module['default'];
31
- } : function() {
32
- return module;
33
- };
34
- __nested_webpack_require_39__.d(getter, {
25
+ __nested_webpack_require_18__.n = (module)=>{
26
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
27
+ __nested_webpack_require_18__.d(getter, {
35
28
  a: getter
36
29
  });
37
30
  return getter;
38
31
  };
39
32
  })();
40
- // webpack/runtime/define_property_getters
41
33
  (()=>{
42
- __nested_webpack_require_39__.d = function(exports1, definition) {
43
- for(var key in definition)if (__nested_webpack_require_39__.o(definition, key) && !__nested_webpack_require_39__.o(exports1, key)) Object.defineProperty(exports1, key, {
34
+ __nested_webpack_require_18__.d = (exports1, definition)=>{
35
+ for(var key in definition)if (__nested_webpack_require_18__.o(definition, key) && !__nested_webpack_require_18__.o(exports1, key)) Object.defineProperty(exports1, key, {
44
36
  enumerable: true,
45
37
  get: definition[key]
46
38
  });
47
39
  };
48
40
  })();
49
- // webpack/runtime/has_own_property
50
41
  (()=>{
51
- __nested_webpack_require_39__.o = function(obj, prop) {
52
- return Object.prototype.hasOwnProperty.call(obj, prop);
53
- };
42
+ __nested_webpack_require_18__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
54
43
  })();
55
- // webpack/runtime/make_namespace_object
56
44
  (()=>{
57
- // define __esModule on exports
58
- __nested_webpack_require_39__.r = function(exports1) {
45
+ __nested_webpack_require_18__.r = (exports1)=>{
59
46
  if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
60
47
  value: 'Module'
61
48
  });
@@ -64,18 +51,16 @@ var __nested_webpack_require_39__ = {};
64
51
  });
65
52
  };
66
53
  })();
67
- /************************************************************************/ var __nested_webpack_exports__ = {};
68
- // ESM COMPAT FLAG
69
- __nested_webpack_require_39__.r(__nested_webpack_exports__);
70
- // EXPORTS
71
- __nested_webpack_require_39__.d(__nested_webpack_exports__, {
72
- findConfig: ()=>/* binding */ findConfig,
73
- loadConfig: ()=>/* binding */ loadConfig
54
+ var __nested_webpack_exports__ = {};
55
+ __nested_webpack_require_18__.r(__nested_webpack_exports__);
56
+ __nested_webpack_require_18__.d(__nested_webpack_exports__, {
57
+ loadConfig: ()=>loadConfig,
58
+ findConfig: ()=>findConfig
74
59
  });
75
60
  const external_node_fs_namespaceObject = __nccwpck_require__(24);
76
- var external_node_fs_default = /*#__PURE__*/ __nested_webpack_require_39__.n(external_node_fs_namespaceObject);
61
+ var external_node_fs_default = /*#__PURE__*/ __nested_webpack_require_18__.n(external_node_fs_namespaceObject);
77
62
  const external_node_path_namespaceObject = __nccwpck_require__(760);
78
- var external_node_path_default = /*#__PURE__*/ __nested_webpack_require_39__.n(external_node_path_namespaceObject);
63
+ var external_node_path_default = /*#__PURE__*/ __nested_webpack_require_18__.n(external_node_path_namespaceObject);
79
64
  function _define_property(obj, key, value) {
80
65
  if (key in obj) Object.defineProperty(obj, key, {
81
66
  value: value,
@@ -151,10 +136,7 @@ function parsePackageOrReadConfig(file) {
151
136
  function pickEnv(config, opts) {
152
137
  if ('object' != typeof config) return config;
153
138
  let name;
154
- if ('string' == typeof opts.env) name = opts.env;
155
- else if (process.env.BROWSERSLIST_ENV) name = process.env.BROWSERSLIST_ENV;
156
- else if (process.env.NODE_ENV) name = process.env.NODE_ENV;
157
- else name = 'production';
139
+ name = 'string' == typeof opts.env ? opts.env : process.env.BROWSERSLIST_ENV ? process.env.BROWSERSLIST_ENV : process.env.NODE_ENV ? process.env.NODE_ENV : 'production';
158
140
  return config[name] || config.defaults;
159
141
  }
160
142
  function eachParent(file, callback) {
@@ -208,11 +190,15 @@ function loadConfig(opts) {
208
190
  return pickEnv(config, opts);
209
191
  }
210
192
  }
211
- var __webpack_export_target__ = exports;
212
- for(var i in __nested_webpack_exports__)__webpack_export_target__[i] = __nested_webpack_exports__[i];
213
- if (__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
193
+ exports.findConfig = __nested_webpack_exports__.findConfig;
194
+ exports.loadConfig = __nested_webpack_exports__.loadConfig;
195
+ for(var __webpack_i__ in __nested_webpack_exports__)if (-1 === [
196
+ "findConfig",
197
+ "loadConfig"
198
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __nested_webpack_exports__[__webpack_i__];
199
+ Object.defineProperty(exports, "__esModule", ({
214
200
  value: true
215
- });
201
+ }));
216
202
 
217
203
 
218
204
  /***/ })
@@ -259,7 +245,7 @@ if (__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_expor
259
245
  /******/ // startup
260
246
  /******/ // Load entry module and return exports
261
247
  /******/ // This entry module is referenced by other modules so it can't be inlined
262
- /******/ var __webpack_exports__ = __nccwpck_require__(725);
248
+ /******/ var __webpack_exports__ = __nccwpck_require__(867);
263
249
  /******/ module.exports = __webpack_exports__;
264
250
  /******/
265
251
  /******/ })()
@@ -1 +1 @@
1
- {"name":"browserslist-load-config","version":"1.0.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"browserslist-load-config","version":"1.0.1","license":"MIT","types":"index.d.ts","type":"commonjs"}