@rsbuild/core 2.1.6 → 2.1.8

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 (162) hide show
  1. package/compiled/cors/index.d.ts +1 -1
  2. package/compiled/css-loader/index.js +2 -2
  3. package/compiled/html-rspack-plugin/index.d.ts +1 -1
  4. package/compiled/html-rspack-plugin/index.js +14 -14
  5. package/compiled/postcss/index.js +1 -1
  6. package/compiled/postcss/lib/postcss.d.ts +4 -1
  7. package/compiled/postcss/package.json +1 -1
  8. package/compiled/postcss-loader/index.js +6 -6
  9. package/compiled/rslog/index.d.ts +7 -0
  10. package/compiled/rslog/package.json +1 -1
  11. package/dist/{711.js → 626.js} +336 -252
  12. package/dist/build.d.ts +4 -0
  13. package/dist/chokidar.js +1 -1046
  14. package/{dist-types → dist}/cli/commands.d.ts +2 -2
  15. package/{dist-types → dist}/cli/init.d.ts +3 -4
  16. package/dist/client/hmr.js +1 -1
  17. package/dist/client/overlay.js +1 -1
  18. package/{dist-types → dist}/configChain.d.ts +2 -2
  19. package/dist/connect-next.js +1 -876
  20. package/dist/cors.js +1 -1
  21. package/{dist-types → dist}/createCompiler.d.ts +2 -2
  22. package/{dist-types → dist}/createContext.d.ts +4 -3
  23. package/{dist-types → dist}/createRsbuild.d.ts +1 -1
  24. package/{dist-types → dist}/defaultConfig.d.ts +1 -1
  25. package/{dist-types → dist}/helpers/compiler.d.ts +1 -1
  26. package/{dist-types → dist}/helpers/css.d.ts +1 -1
  27. package/{dist-types → dist}/helpers/format.d.ts +1 -1
  28. package/{dist-types → dist}/helpers/fs.d.ts +2 -2
  29. package/{dist-types → dist}/helpers/index.d.ts +4 -4
  30. package/{dist-types → dist}/helpers/overlayConfig.d.ts +1 -1
  31. package/{dist-types → dist}/helpers/path.d.ts +1 -1
  32. package/dist/helpers/restartManager.d.ts +13 -0
  33. package/{dist-types → dist}/helpers/stats.d.ts +2 -2
  34. package/{dist-types → dist}/helpers/url.d.ts +2 -2
  35. package/{dist-types → dist}/helpers/vendors.d.ts +1 -1
  36. package/{dist-types → dist}/hooks.d.ts +2 -1
  37. package/dist/http-proxy-middleware.js +5 -3010
  38. package/{dist-types → dist}/index.d.ts +14 -14
  39. package/dist/index.js +1 -1
  40. package/{dist-types → dist}/initConfigs.d.ts +1 -1
  41. package/{dist-types → dist}/initPlugins.d.ts +2 -2
  42. package/{dist-types → dist}/inspectConfig.d.ts +2 -2
  43. package/dist/launch-editor-middleware.js +1 -544
  44. package/{dist-types → dist}/loadConfig.d.ts +6 -6
  45. package/{dist-types → dist}/loader/cssUrlLoader.d.ts +1 -1
  46. package/{dist-types → dist}/loader/ignoreCssLoader.d.ts +1 -1
  47. package/{dist-types → dist}/loader/transformLoader.d.ts +1 -1
  48. package/{dist-types → dist}/loader/transformRawLoader.d.ts +1 -1
  49. package/{dist-types → dist}/logger.d.ts +1 -1
  50. package/dist/manifest-plugin.js +1 -692
  51. package/dist/memfs.js +1 -5695
  52. package/{dist-types → dist}/mergeConfig.d.ts +1 -1
  53. package/dist/open.js +2 -439
  54. package/{dist-types → dist}/pluginHelper.d.ts +1 -1
  55. package/{dist-types → dist}/pluginManager.d.ts +2 -2
  56. package/{dist-types → dist}/plugins/appIcon.d.ts +1 -1
  57. package/{dist-types → dist}/plugins/asset.d.ts +1 -1
  58. package/{dist-types → dist}/plugins/basic.d.ts +1 -1
  59. package/dist/plugins/cache.d.ts +2 -0
  60. package/{dist-types → dist}/plugins/cleanOutput.d.ts +1 -1
  61. package/{dist-types → dist}/plugins/css.d.ts +1 -1
  62. package/{dist-types → dist}/plugins/define.d.ts +1 -1
  63. package/dist/plugins/entry.d.ts +2 -0
  64. package/{dist-types → dist}/plugins/externals.d.ts +2 -2
  65. package/{dist-types → dist}/plugins/fileSize.d.ts +1 -1
  66. package/{dist-types → dist}/plugins/html.d.ts +1 -1
  67. package/{dist-types → dist}/plugins/inlineChunk.d.ts +1 -1
  68. package/{dist-types → dist}/plugins/lazyCompilation.d.ts +1 -1
  69. package/{dist-types → dist}/plugins/manifest.d.ts +1 -1
  70. package/{dist-types → dist}/plugins/minimize.d.ts +3 -3
  71. package/{dist-types → dist}/plugins/moduleFederation.d.ts +1 -1
  72. package/{dist-types → dist}/plugins/nodeAddons.d.ts +1 -1
  73. package/dist/plugins/nonce.d.ts +2 -0
  74. package/{dist-types → dist}/plugins/output.d.ts +1 -1
  75. package/{dist-types → dist}/plugins/progress.d.ts +1 -1
  76. package/{dist-types → dist}/plugins/resolve.d.ts +1 -1
  77. package/{dist-types → dist}/plugins/resourceHints.d.ts +1 -1
  78. package/{dist-types → dist}/plugins/rsdoctor.d.ts +1 -1
  79. package/{dist-types → dist}/plugins/rspackProfile.d.ts +1 -1
  80. package/{dist-types → dist}/plugins/server.d.ts +1 -1
  81. package/{dist-types → dist}/plugins/sourceMap.d.ts +1 -1
  82. package/{dist-types → dist}/plugins/splitChunks.d.ts +1 -1
  83. package/dist/plugins/sri.d.ts +2 -0
  84. package/{dist-types → dist}/plugins/swc.d.ts +1 -1
  85. package/{dist-types → dist}/plugins/target.d.ts +1 -1
  86. package/dist/plugins/wasm.d.ts +2 -0
  87. package/{dist-types → dist}/plugins/worker.d.ts +1 -1
  88. package/dist/range-parser.js +1 -1
  89. package/dist/restart.d.ts +15 -0
  90. package/{dist-types → dist}/rspack-plugins/RsbuildHtmlPlugin.d.ts +1 -1
  91. package/{dist-types → dist}/rspack-plugins/resource-hints/HtmlResourceHintsPlugin.d.ts +1 -1
  92. package/{dist-types → dist}/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +1 -1
  93. package/{dist-types → dist}/rspack-plugins/resource-hints/extractChunks.d.ts +1 -1
  94. package/{dist-types → dist}/rspackConfig.d.ts +1 -1
  95. package/{dist-types → dist}/server/assets-middleware/getFileFromUrl.d.ts +1 -1
  96. package/{dist-types → dist}/server/assets-middleware/index.d.ts +2 -2
  97. package/{dist-types → dist}/server/assets-middleware/middleware.d.ts +1 -1
  98. package/{dist-types → dist}/server/assets-middleware/setupOutputFileSystem.d.ts +1 -1
  99. package/{dist-types → dist}/server/assets-middleware/setupWriteToDisk.d.ts +2 -2
  100. package/{dist-types → dist}/server/browserLogs.d.ts +1 -1
  101. package/{dist-types → dist}/server/buildManager.d.ts +3 -3
  102. package/{dist-types → dist}/server/cliShortcuts.d.ts +2 -2
  103. package/{dist-types → dist}/server/devMiddlewares.d.ts +4 -4
  104. package/{dist-types → dist}/server/devServer.d.ts +4 -4
  105. package/{dist-types → dist}/server/environment.d.ts +1 -1
  106. package/{dist-types → dist}/server/gzipMiddleware.d.ts +1 -1
  107. package/{dist-types → dist}/server/helper.d.ts +4 -4
  108. package/{dist-types → dist}/server/historyApiFallback.d.ts +2 -2
  109. package/{dist-types → dist}/server/httpServer.d.ts +1 -1
  110. package/{dist-types → dist}/server/middlewares.d.ts +2 -2
  111. package/{dist-types → dist}/server/open.d.ts +2 -2
  112. package/{dist-types → dist}/server/previewServer.d.ts +2 -2
  113. package/{dist-types → dist}/server/proxy.d.ts +3 -3
  114. package/{dist-types → dist}/server/runner/basic.d.ts +1 -1
  115. package/{dist-types → dist}/server/runner/cjs.d.ts +2 -2
  116. package/{dist-types → dist}/server/runner/esm.d.ts +2 -2
  117. package/{dist-types → dist}/server/runner/index.d.ts +1 -1
  118. package/{dist-types → dist}/server/serverSetup.d.ts +1 -1
  119. package/{dist-types → dist}/server/socketServer.d.ts +1 -1
  120. package/{dist-types → dist}/server/watchFiles.d.ts +4 -3
  121. package/dist/sirv.js +1 -1
  122. package/dist/tinyglobby.js +1 -1670
  123. package/{dist-types → dist}/types/config.d.ts +36 -19
  124. package/{dist-types → dist}/types/context.d.ts +11 -7
  125. package/{dist-types → dist}/types/hooks.d.ts +36 -9
  126. package/dist/types/index.d.ts +8 -0
  127. package/{dist-types → dist}/types/plugin.d.ts +10 -7
  128. package/{dist-types → dist}/types/rsbuild.d.ts +21 -14
  129. package/{dist-types → dist}/types/rspack.d.ts +2 -2
  130. package/{dist-types → dist}/types/thirdParty.d.ts +5 -5
  131. package/dist/ws.js +2 -1528
  132. package/package.json +11 -12
  133. package/dist-types/build.d.ts +0 -4
  134. package/dist-types/package.json +0 -1
  135. package/dist-types/plugins/cache.d.ts +0 -2
  136. package/dist-types/plugins/entry.d.ts +0 -2
  137. package/dist-types/plugins/nonce.d.ts +0 -2
  138. package/dist-types/plugins/sri.d.ts +0 -2
  139. package/dist-types/plugins/wasm.d.ts +0 -2
  140. package/dist-types/restart.d.ts +0 -19
  141. package/dist-types/types/index.d.ts +0 -8
  142. /package/dist/{711.js.LICENSE.txt → 626.js.LICENSE.txt} +0 -0
  143. /package/{dist-types → dist}/cli/index.d.ts +0 -0
  144. /package/dist/client/{307.js → 307~0.js} +0 -0
  145. /package/{dist-types → dist}/constants.d.ts +0 -0
  146. /package/{dist-types → dist}/helpers/exitHook.d.ts +0 -0
  147. /package/{dist-types → dist}/helpers/packageJson.d.ts +0 -0
  148. /package/{dist-types → dist}/helpers/version.d.ts +0 -0
  149. /package/{dist-types → dist}/loadEnv.d.ts +0 -0
  150. /package/{dist-types → dist}/loader/workerLoader.d.ts +0 -0
  151. /package/dist/{1~rslib-runtime.js → rslib-runtime.js} +0 -0
  152. /package/{dist-types → dist}/rspack-plugins/resource-hints/getResourceType.d.ts +0 -0
  153. /package/{dist-types → dist}/server/ansiHTML.d.ts +0 -0
  154. /package/{dist-types → dist}/server/assets-middleware/parseTokenList.d.ts +0 -0
  155. /package/{dist-types → dist}/server/compileState.d.ts +0 -0
  156. /package/{dist-types → dist}/server/gracefulShutdown.d.ts +0 -0
  157. /package/{dist-types → dist}/server/hmrFallback.d.ts +0 -0
  158. /package/{dist-types → dist}/server/overlay.d.ts +0 -0
  159. /package/{dist-types → dist}/server/publicPathnames.d.ts +0 -0
  160. /package/{dist-types → dist}/server/runner/asModule.d.ts +0 -0
  161. /package/{dist-types → dist}/server/runner/type.d.ts +0 -0
  162. /package/{dist-types → dist}/types/utils.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "bugs": {
@@ -18,16 +18,15 @@
18
18
  "files": [
19
19
  "bin",
20
20
  "dist",
21
- "dist-types",
22
21
  "static",
23
22
  "compiled",
24
23
  "types.d.ts"
25
24
  ],
26
25
  "type": "module",
27
- "types": "./dist-types/index.d.ts",
26
+ "types": "./dist/index.d.ts",
28
27
  "exports": {
29
28
  ".": {
30
- "types": "./dist-types/index.d.ts",
29
+ "types": "./dist/index.d.ts",
31
30
  "default": "./dist/index.js"
32
31
  },
33
32
  "./types": {
@@ -40,13 +39,12 @@
40
39
  "registry": "https://registry.npmjs.org/"
41
40
  },
42
41
  "dependencies": {
43
- "@rspack/core": "~2.1.4",
42
+ "@rspack/core": "~2.1.5",
44
43
  "@swc/helpers": "^0.5.23"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@jridgewell/remapping": "^2.3.5",
48
47
  "@jridgewell/trace-mapping": "^0.3.31",
49
- "@rslib/core": "0.23.2",
50
48
  "@rstackjs/load-config": "^0.1.2",
51
49
  "@types/cors": "^2.8.19",
52
50
  "@types/node": "^24.13.3",
@@ -71,13 +69,13 @@
71
69
  "mrmime": "^2.0.1",
72
70
  "on-finished": "2.4.1",
73
71
  "open": "^11.0.0",
74
- "postcss": "^8.5.17",
72
+ "postcss": "^8.5.19",
75
73
  "postcss-load-config": "6.0.1",
76
74
  "postcss-loader": "8.2.1",
77
75
  "prebundle": "1.6.5",
78
76
  "range-parser": "^1.3.0",
79
77
  "reduce-configs": "^2.0.1",
80
- "rslog": "^2.2.0",
78
+ "rslog": "^2.3.0",
81
79
  "rspack-chain": "^2.1.1",
82
80
  "rspack-manifest-plugin": "5.2.2",
83
81
  "rspack-merge": "1.0.1",
@@ -86,7 +84,7 @@
86
84
  "style-loader": "^4.0.0",
87
85
  "tinyglobby": "^0.2.17",
88
86
  "typescript": "^6.0.3",
89
- "ws": "^8.21.0"
87
+ "ws": "^8.21.1"
90
88
  },
91
89
  "peerDependencies": {
92
90
  "core-js": ">= 3.0.0"
@@ -100,8 +98,9 @@
100
98
  "node": "^20.19.0 || >=22.12.0"
101
99
  },
102
100
  "scripts": {
103
- "build": "rslib",
104
- "dev": "rslib -w",
105
- "prebundle": "prebundle"
101
+ "build": "rs lib",
102
+ "dev": "rs lib -w",
103
+ "prebundle": "prebundle",
104
+ "test": "rs test"
106
105
  }
107
106
  }
@@ -1,4 +0,0 @@
1
- import type { InitConfigsOptions } from './initConfigs';
2
- import type { Build, BuildOptions } from './types';
3
- export declare const RSPACK_BUILD_ERROR = 'Rspack build failed.';
4
- export declare const build: (initOptions: InitConfigsOptions, { watch }?: BuildOptions) => Promise<ReturnType<Build>>;
@@ -1 +0,0 @@
1
- {"//":"This file is for making TypeScript work with moduleResolution nodenext.","version":"1.0.0"}
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginCache: () => RsbuildPlugin;
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginEntry: () => RsbuildPlugin;
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginNonce: () => RsbuildPlugin;
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginSri: () => RsbuildPlugin;
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginWasm: () => RsbuildPlugin;
@@ -1,19 +0,0 @@
1
- import type { ChokidarOptions } from '../compiled/chokidar';
2
- import type { Logger } from './logger';
3
- import type { RsbuildInstance } from './types';
4
- type Cleaner = () => unknown;
5
- /**
6
- * Add a cleaner to handle side effects
7
- */ export declare const onBeforeRestartServer: (cleaner: Cleaner) => void;
8
- export declare const restartDevServer: ({ filePath, clear, logger }: {
9
- filePath?: string;
10
- clear?: boolean;
11
- logger: Logger;
12
- }) => Promise<boolean>;
13
- export declare function watchFilesForRestart({ files, rsbuild, isBuildWatch, watchOptions }: {
14
- files: string[];
15
- rsbuild: RsbuildInstance;
16
- isBuildWatch: boolean;
17
- watchOptions?: ChokidarOptions;
18
- }): Promise<void>;
19
- export { };
@@ -1,8 +0,0 @@
1
- export type * from './config';
2
- export type * from './context';
3
- export type * from './hooks';
4
- export type * from './plugin';
5
- export type * from './rsbuild';
6
- export type * from './rspack';
7
- export type * from './thirdParty';
8
- export type * from './utils';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes