@rspack/core 1.1.8 → 1.2.0-beta.0

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 (86) hide show
  1. package/compiled/@swc/types/index.d.ts +20 -5
  2. package/compiled/@swc/types/license +1 -1
  3. package/compiled/@swc/types/package.json +1 -1
  4. package/dist/Chunk.d.ts +21 -28
  5. package/dist/ChunkGraph.d.ts +8 -4
  6. package/dist/ChunkGroup.d.ts +13 -19
  7. package/dist/Compilation.d.ts +5 -9
  8. package/dist/Compiler.d.ts +1 -0
  9. package/dist/Entrypoint.d.ts +4 -3
  10. package/dist/ExportsInfo.d.ts +20 -0
  11. package/dist/FileSystem.d.ts +17 -17
  12. package/dist/Module.d.ts +6 -8
  13. package/dist/ModuleGraph.d.ts +6 -0
  14. package/dist/ModuleGraphConnection.d.ts +11 -0
  15. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  16. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  18. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +8 -10
  29. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/EntryPlugin.d.ts +11 -3
  36. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +8 -10
  56. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +10 -0
  59. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/base.d.ts +1 -1
  72. package/dist/builtin-plugin/css-extract/index.d.ts +1 -0
  73. package/dist/builtin-plugin/index.d.ts +1 -0
  74. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  75. package/dist/config/adapter.d.ts +2 -4
  76. package/dist/config/adapterRuleUse.d.ts +32 -8
  77. package/dist/config/normalization.d.ts +18 -2
  78. package/dist/config/types.d.ts +33 -11
  79. package/dist/config/zod.d.ts +1279 -1253
  80. package/dist/container/ContainerPlugin.d.ts +1 -1
  81. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  82. package/dist/exports.d.ts +1 -0
  83. package/dist/index.js +1376 -1379
  84. package/dist/util/hash/wasm-hash.d.ts +1 -1
  85. package/dist/util/identifier.d.ts +0 -36
  86. package/package.json +8 -7
@@ -46,7 +46,7 @@ export declare class WasmHash {
46
46
  * @returns
47
47
  */
48
48
  _updateWithBuffer(data: Buffer): void;
49
- digest(type: BufferEncoding): string | Buffer;
49
+ digest(type: BufferEncoding): string | Buffer<ArrayBuffer>;
50
50
  }
51
51
  declare const create: (wasmModule: WebAssembly.Module, instancesPool: WasmHash[], chunkSize: number, digestSize: number) => WasmHash;
52
52
  export default create;
@@ -7,58 +7,22 @@ interface ParsedResource {
7
7
  type ParsedResourceWithoutFragment = Omit<ParsedResource, "fragment">;
8
8
  export declare const makePathsRelative: {
9
9
  (context: string, identifier: string, associatedObjectForCache: object | undefined): string;
10
- /**
11
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
12
- * @returns {function(string, string): string} cached function
13
- */
14
10
  bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
15
- /**
16
- * @param {string} context context used to create relative path
17
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
18
- * @returns {function(string): string} cached function
19
- */
20
11
  bindContextCache(context: string, associatedObjectForCache: object | undefined): ((arg0: string) => string);
21
12
  };
22
13
  export declare const makePathsAbsolute: {
23
14
  (context: string, identifier: string, associatedObjectForCache: object | undefined): string;
24
- /**
25
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
26
- * @returns {function(string, string): string} cached function
27
- */
28
15
  bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
29
- /**
30
- * @param {string} context context used to create relative path
31
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
32
- * @returns {function(string): string} cached function
33
- */
34
16
  bindContextCache(context: string, associatedObjectForCache: object | undefined): ((arg0: string) => string);
35
17
  };
36
18
  export declare const contextify: {
37
19
  (context: string, identifier: string, associatedObjectForCache: object | undefined): string;
38
- /**
39
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
40
- * @returns {function(string, string): string} cached function
41
- */
42
20
  bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
43
- /**
44
- * @param {string} context context used to create relative path
45
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
46
- * @returns {function(string): string} cached function
47
- */
48
21
  bindContextCache(context: string, associatedObjectForCache: object | undefined): ((arg0: string) => string);
49
22
  };
50
23
  export declare const absolutify: {
51
24
  (context: string, identifier: string, associatedObjectForCache: object | undefined): string;
52
- /**
53
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
54
- * @returns {function(string, string): string} cached function
55
- */
56
25
  bindCache(associatedObjectForCache: object | undefined): ((arg0: string, arg1: string) => string);
57
- /**
58
- * @param {string} context context used to create relative path
59
- * @param {Object=} associatedObjectForCache an object to which the cache will be attached
60
- * @returns {function(string): string} cached function
61
- */
62
26
  bindContextCache(context: string, associatedObjectForCache: object | undefined): ((arg0: string) => string);
63
27
  };
64
28
  export declare const parseResource: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.1.8",
3
+ "version": "1.2.0-beta.0",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -37,8 +37,8 @@
37
37
  "directory": "packages/rspack"
38
38
  },
39
39
  "devDependencies": {
40
- "@swc/core": "1.7.40",
41
- "@swc/types": "0.1.12",
40
+ "@swc/core": "1.10.1",
41
+ "@swc/types": "0.1.17",
42
42
  "@types/graceful-fs": "4.1.9",
43
43
  "@types/watchpack": "^2.4.0",
44
44
  "@types/webpack-sources": "3.2.3",
@@ -50,7 +50,8 @@
50
50
  "prebundle": "^1.1.0",
51
51
  "tsc-alias": "^1.8.8",
52
52
  "tsup": "^8.3.0",
53
- "typescript": "^5.6.3",
53
+ "tsx": "^4.19.2",
54
+ "typescript": "^5.7.2",
54
55
  "watchpack": "^2.4.0",
55
56
  "webpack-dev-server": "5.0.4",
56
57
  "webpack-sources": "3.2.3",
@@ -58,10 +59,10 @@
58
59
  "zod-validation-error": "3.4.0"
59
60
  },
60
61
  "dependencies": {
61
- "@module-federation/runtime-tools": "0.5.1",
62
+ "@module-federation/runtime-tools": "0.8.4",
62
63
  "@rspack/lite-tapable": "1.0.1",
63
64
  "caniuse-lite": "^1.0.30001616",
64
- "@rspack/binding": "1.1.8"
65
+ "@rspack/binding": "1.2.0-beta.0"
65
66
  },
66
67
  "peerDependencies": {
67
68
  "@swc/helpers": ">=0.5.1"
@@ -78,7 +79,7 @@
78
79
  "dev:types": "tsc -w",
79
80
  "dev:js": "tsup --watch",
80
81
  "prepare-container-runtime": "node ./scripts/prepare-container-runtime.js",
81
- "doc-coverage": "node scripts/check-documentation-coverage.mjs",
82
+ "doc-coverage": "tsx ./scripts/check-documentation-coverage.ts",
82
83
  "api-extractor": "api-extractor run --verbose",
83
84
  "api-extractor:ci": "api-extractor run --verbose || diff temp/core.api.md etc/core.api.md"
84
85
  }