@lynx-js/rspeedy-canary 0.10.3-canary-20250728-fcafd541 → 0.10.3

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lynx-js/rspeedy
2
2
 
3
- ## 0.10.3-canary-20250728132211-fcafd541c535f354476cf439b8ba97b00530aa52
3
+ ## 0.10.3
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -43,28 +43,28 @@
43
43
 
44
44
  ```ts
45
45
  type InlineChunkTestFunction = (params: {
46
- size: number;
47
- name: string;
48
- }) => boolean;
46
+ size: number
47
+ name: string
48
+ }) => boolean
49
49
 
50
- type InlineChunkTest = RegExp | InlineChunkTestFunction;
50
+ type InlineChunkTest = RegExp | InlineChunkTestFunction
51
51
 
52
52
  type InlineChunkConfig =
53
53
  | boolean
54
54
  | InlineChunkTest
55
- | { enable?: boolean | "auto"; test: InlineChunkTest };
55
+ | { enable?: boolean | 'auto', test: InlineChunkTest }
56
56
  ```
57
57
 
58
58
  ```ts
59
- import { defineConfig } from "@lynx-js/rspeedy";
59
+ import { defineConfig } from '@lynx-js/rspeedy'
60
60
 
61
61
  export default defineConfig({
62
62
  output: {
63
63
  inlineScripts: ({ name, size }) => {
64
- return name.includes("foo") && size < 1000;
64
+ return name.includes('foo') && size < 1000
65
65
  },
66
66
  },
67
- });
67
+ })
68
68
  ```
69
69
 
70
70
  - docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
@@ -107,13 +107,13 @@
107
107
  example:
108
108
 
109
109
  ```js
110
- import { defineConfig } from "@lynx-js/rspeedy";
110
+ import { defineConfig } from '@lynx-js/rspeedy'
111
111
 
112
112
  export default defineConfig({
113
113
  output: {
114
114
  inlineScripts: false,
115
115
  },
116
- });
116
+ })
117
117
  ```
118
118
 
119
119
  - Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
@@ -133,12 +133,12 @@
133
133
  example:
134
134
 
135
135
  ```js
136
- import { defineConfig } from "@lynx-js/rspeedy";
136
+ import { defineConfig } from '@lynx-js/rspeedy'
137
137
  export default defineConfig({
138
138
  source: {
139
- preEntry: "./src/polyfill.ts",
139
+ preEntry: './src/polyfill.ts',
140
140
  },
141
- });
141
+ })
142
142
  ```
143
143
 
144
144
  - Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
@@ -149,17 +149,17 @@
149
149
 
150
150
  ```js
151
151
  export const myPlugin = {
152
- name: "my-plugin",
152
+ name: 'my-plugin',
153
153
  setup(api) {
154
- const { callerName } = api.context;
154
+ const { callerName } = api.context
155
155
 
156
- if (callerName === "rslib") {
156
+ if (callerName === 'rslib') {
157
157
  // ...
158
- } else if (callerName === "rspeedy") {
158
+ } else if (callerName === 'rspeedy') {
159
159
  // ...
160
160
  }
161
161
  },
162
- };
162
+ }
163
163
  ```
164
164
 
165
165
  - Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
@@ -182,7 +182,7 @@
182
182
  Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
183
183
 
184
184
  ```js
185
- import { defineConfig } from "@lynx-js/rspeedy";
185
+ import { defineConfig } from '@lynx-js/rspeedy'
186
186
 
187
187
  export default defineConfig({
188
188
  tools: {
@@ -192,7 +192,7 @@
192
192
  },
193
193
  },
194
194
  },
195
- });
195
+ })
196
196
  ```
197
197
 
198
198
  See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
@@ -324,12 +324,12 @@
324
324
  example:
325
325
 
326
326
  ```js
327
- import { defineConfig } from "@lynx-js/rspeedy";
327
+ import { defineConfig } from '@lynx-js/rspeedy'
328
328
  export default defineConfig({
329
329
  server: {
330
- base: "/dist",
330
+ base: '/dist',
331
331
  },
332
- });
332
+ })
333
333
  ```
334
334
 
335
335
  - Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
@@ -382,11 +382,11 @@
382
382
  You can switch to other tools by using:
383
383
 
384
384
  ```js
385
- import { defineConfig } from "@lynx-js/rspeedy";
385
+ import { defineConfig } from '@lynx-js/rspeedy'
386
386
  import {
387
387
  CssMinimizerWebpackPlugin,
388
388
  pluginCssMinimizer,
389
- } from "@rsbuild/plugin-css-minimizer";
389
+ } from '@rsbuild/plugin-css-minimizer'
390
390
 
391
391
  export default defineConfig({
392
392
  plugins: [
@@ -399,7 +399,7 @@
399
399
  },
400
400
  }),
401
401
  ],
402
- });
402
+ })
403
403
  ```
404
404
 
405
405
  See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
@@ -409,8 +409,8 @@
409
409
  You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
410
410
 
411
411
  ```js
412
- import { defineConfig } from "@lynx-js/rspeedy";
413
- import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
412
+ import { defineConfig } from '@lynx-js/rspeedy'
413
+ import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
414
414
 
415
415
  export default defineConfig({
416
416
  plugins: [
@@ -422,7 +422,7 @@
422
422
  },
423
423
  }),
424
424
  ],
425
- });
425
+ })
426
426
  ```
427
427
 
428
428
  ## 0.7.1
@@ -442,7 +442,7 @@
442
442
  You may turn it off using `output.minify.css: false`:
443
443
 
444
444
  ```js
445
- import { defineConfig } from "@lynx-js/rspeedy";
445
+ import { defineConfig } from '@lynx-js/rspeedy'
446
446
 
447
447
  export default defineConfig({
448
448
  output: {
@@ -450,18 +450,18 @@
450
450
  css: false,
451
451
  },
452
452
  },
453
- });
453
+ })
454
454
  ```
455
455
 
456
456
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
457
457
 
458
458
  ```js
459
- import { defineConfig } from "@lynx-js/rspeedy";
460
- import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
459
+ import { defineConfig } from '@lynx-js/rspeedy'
460
+ import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
461
461
 
462
462
  export default defineConfig({
463
463
  plugins: [pluginCssMinimizer()],
464
- });
464
+ })
465
465
  ```
466
466
 
467
467
  - 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
@@ -488,22 +488,22 @@
488
488
  - The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
489
489
 
490
490
  ```js
491
- import { defineConfig } from "@lynx-js/rspeedy";
491
+ import { defineConfig } from '@lynx-js/rspeedy'
492
492
 
493
493
  export default defineConfig({
494
494
  dev: {
495
495
  watchFiles: [
496
496
  {
497
- type: "reload-server",
498
- paths: ["public/**/*.txt"],
497
+ type: 'reload-server',
498
+ paths: ['public/**/*.txt'],
499
499
  },
500
500
  {
501
- type: "reload-page",
502
- paths: ["public/**/*.json"],
501
+ type: 'reload-page',
502
+ paths: ['public/**/*.json'],
503
503
  },
504
504
  ],
505
505
  },
506
- });
506
+ })
507
507
  ```
508
508
 
509
509
  - be9b003: Add `source.exclude`.
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@ var __webpack_modules__ = {
112
112
  });
113
113
  var core_ = __webpack_require__("@rsbuild/core");
114
114
  var package_namespaceObject = {
115
- i8: "0.10.2"
115
+ i8: "0.10.3"
116
116
  };
117
117
  const version = package_namespaceObject.i8;
118
118
  const rspackVersion = core_.rspack.rspackVersion;
@@ -40,7 +40,7 @@ export const __webpack_modules__ = {
40
40
  });
41
41
  var core_ = __webpack_require__("@rsbuild/core");
42
42
  var package_namespaceObject = {
43
- i8: "0.10.2"
43
+ i8: "0.10.3"
44
44
  };
45
45
  const version = package_namespaceObject.i8;
46
46
  const rspackVersion = core_.rspack.rspackVersion;
@@ -1469,9 +1469,9 @@ export const __webpack_modules__ = {
1469
1469
  if (void 0 === value) return true;
1470
1470
  return "string" == typeof value || "boolean" == typeof value;
1471
1471
  });
1472
- const _io40 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@911"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
1472
+ const _io40 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6578"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
1473
1473
  if ([
1474
- "__@toStringTag@911"
1474
+ "__@toStringTag@6578"
1475
1475
  ].some((prop)=>key === prop)) return true;
1476
1476
  const value = input[key];
1477
1477
  if (void 0 === value) return true;
@@ -3076,14 +3076,14 @@ export const __webpack_modules__ = {
3076
3076
  if (void 0 === value) return true;
3077
3077
  return false;
3078
3078
  })));
3079
- const _io148 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@911"] && Object.keys(input).every((key)=>{
3079
+ const _io148 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@6578"] && Object.keys(input).every((key)=>{
3080
3080
  if ([
3081
3081
  "BYTES_PER_ELEMENT",
3082
3082
  "buffer",
3083
3083
  "byteLength",
3084
3084
  "byteOffset",
3085
3085
  "length",
3086
- "__@toStringTag@911"
3086
+ "__@toStringTag@6578"
3087
3087
  ].some((prop)=>key === prop)) return true;
3088
3088
  const value = input[key];
3089
3089
  if (void 0 === value) return true;
@@ -6292,9 +6292,9 @@ export const __webpack_modules__ = {
6292
6292
  if (void 0 === value) return true;
6293
6293
  return false;
6294
6294
  }));
6295
- const _io402 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@911"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6295
+ const _io402 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6578"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6296
6296
  if ([
6297
- "__@toStringTag@911"
6297
+ "__@toStringTag@6578"
6298
6298
  ].some((prop)=>key === prop)) return true;
6299
6299
  const value = input[key];
6300
6300
  if (void 0 === value) return true;
@@ -6883,18 +6883,18 @@ export const __webpack_modules__ = {
6883
6883
  return false;
6884
6884
  })();
6885
6885
  const _iu1 = (input, _exceptionable = true)=>(()=>{
6886
- if (void 0 !== input["__@toStringTag@911"]) return _io148(input, _exceptionable);
6886
+ if (void 0 !== input["__@toStringTag@6578"]) return _io148(input, _exceptionable);
6887
6887
  if (void 0 !== input.pem) return _io149(input, _exceptionable);
6888
6888
  return false;
6889
6889
  })();
6890
6890
  const _iu2 = (input, _exceptionable = true)=>(()=>{
6891
- if (void 0 !== input["__@toStringTag@911"]) return _io148(input, _exceptionable);
6891
+ if (void 0 !== input["__@toStringTag@6578"]) return _io148(input, _exceptionable);
6892
6892
  if (void 0 !== input.buf) return _io150(input, _exceptionable);
6893
6893
  return false;
6894
6894
  })();
6895
6895
  const _iu3 = (input, _exceptionable = true)=>(()=>{
6896
6896
  if (void 0 !== input.name) return _io401(input, _exceptionable);
6897
- if (void 0 !== input["__@toStringTag@911"]) return _io402(input, _exceptionable);
6897
+ if (void 0 !== input["__@toStringTag@6578"]) return _io402(input, _exceptionable);
6898
6898
  return false;
6899
6899
  })();
6900
6900
  const _iu4 = (input, _exceptionable = true)=>(()=>{
@@ -9260,14 +9260,14 @@ export const __webpack_modules__ = {
9260
9260
  }).every((flag)=>flag)
9261
9261
  ].every((flag)=>flag);
9262
9262
  const _vo40 = (input, _path, _exceptionable = true)=>[
9263
- "string" == typeof input["__@toStringTag@911"] || _report(_exceptionable, {
9264
- path: _path + "[\"__@toStringTag@911\"]",
9263
+ "string" == typeof input["__@toStringTag@6578"] || _report(_exceptionable, {
9264
+ path: _path + "[\"__@toStringTag@6578\"]",
9265
9265
  expected: "string",
9266
- value: input["__@toStringTag@911"]
9266
+ value: input["__@toStringTag@6578"]
9267
9267
  }),
9268
9268
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
9269
9269
  if ([
9270
- "__@toStringTag@911"
9270
+ "__@toStringTag@6578"
9271
9271
  ].some((prop)=>key === prop)) return true;
9272
9272
  const value = input[key];
9273
9273
  if (void 0 === value) return true;
@@ -17820,10 +17820,10 @@ export const __webpack_modules__ = {
17820
17820
  expected: "number",
17821
17821
  value: input.length
17822
17822
  }),
17823
- "Uint8Array" === input["__@toStringTag@911"] || _report(_exceptionable, {
17824
- path: _path + "[\"__@toStringTag@911\"]",
17823
+ "Uint8Array" === input["__@toStringTag@6578"] || _report(_exceptionable, {
17824
+ path: _path + "[\"__@toStringTag@6578\"]",
17825
17825
  expected: "\"Uint8Array\"",
17826
- value: input["__@toStringTag@911"]
17826
+ value: input["__@toStringTag@6578"]
17827
17827
  }),
17828
17828
  false === _exceptionable || Object.keys(input).map((key)=>{
17829
17829
  if ([
@@ -17832,7 +17832,7 @@ export const __webpack_modules__ = {
17832
17832
  "byteLength",
17833
17833
  "byteOffset",
17834
17834
  "length",
17835
- "__@toStringTag@911"
17835
+ "__@toStringTag@6578"
17836
17836
  ].some((prop)=>key === prop)) return true;
17837
17837
  const value = input[key];
17838
17838
  if (void 0 === value) return true;
@@ -34681,14 +34681,14 @@ export const __webpack_modules__ = {
34681
34681
  }).every((flag)=>flag)
34682
34682
  ].every((flag)=>flag);
34683
34683
  const _vo402 = (input, _path, _exceptionable = true)=>[
34684
- "string" == typeof input["__@toStringTag@911"] || _report(_exceptionable, {
34685
- path: _path + "[\"__@toStringTag@911\"]",
34684
+ "string" == typeof input["__@toStringTag@6578"] || _report(_exceptionable, {
34685
+ path: _path + "[\"__@toStringTag@6578\"]",
34686
34686
  expected: "string",
34687
- value: input["__@toStringTag@911"]
34687
+ value: input["__@toStringTag@6578"]
34688
34688
  }),
34689
34689
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
34690
34690
  if ([
34691
- "__@toStringTag@911"
34691
+ "__@toStringTag@6578"
34692
34692
  ].some((prop)=>key === prop)) return true;
34693
34693
  const value = input[key];
34694
34694
  if (void 0 === value) return true;
@@ -37425,7 +37425,7 @@ export const __webpack_modules__ = {
37425
37425
  });
37426
37426
  })();
37427
37427
  const _vu1 = (input, _path, _exceptionable = true)=>(()=>{
37428
- if (void 0 !== input["__@toStringTag@911"]) return _vo148(input, _path, _exceptionable);
37428
+ if (void 0 !== input["__@toStringTag@6578"]) return _vo148(input, _path, _exceptionable);
37429
37429
  if (void 0 !== input.pem) return _vo149(input, _path, _exceptionable);
37430
37430
  return _report(_exceptionable, {
37431
37431
  path: _path,
@@ -37434,7 +37434,7 @@ export const __webpack_modules__ = {
37434
37434
  });
37435
37435
  })();
37436
37436
  const _vu2 = (input, _path, _exceptionable = true)=>(()=>{
37437
- if (void 0 !== input["__@toStringTag@911"]) return _vo148(input, _path, _exceptionable);
37437
+ if (void 0 !== input["__@toStringTag@6578"]) return _vo148(input, _path, _exceptionable);
37438
37438
  if (void 0 !== input.buf) return _vo150(input, _path, _exceptionable);
37439
37439
  return _report(_exceptionable, {
37440
37440
  path: _path,
@@ -37444,7 +37444,7 @@ export const __webpack_modules__ = {
37444
37444
  })();
37445
37445
  const _vu3 = (input, _path, _exceptionable = true)=>(()=>{
37446
37446
  if (void 0 !== input.name) return _vo401(input, _path, _exceptionable);
37447
- if (void 0 !== input["__@toStringTag@911"]) return _vo402(input, _path, _exceptionable);
37447
+ if (void 0 !== input["__@toStringTag@6578"]) return _vo402(input, _path, _exceptionable);
37448
37448
  return _report(_exceptionable, {
37449
37449
  path: _path,
37450
37450
  expected: "(LooseRsbuildPlugin | RsbuildPlugins | LooseRsbuildPlugin | Falsy)",
@@ -19,11 +19,11 @@ export const __webpack_modules__ = {
19
19
  config,
20
20
  debug: _debug_js__WEBPACK_IMPORTED_MODULE_1__.fF,
21
21
  async exit (code) {
22
- const { exit } = await __webpack_require__.e("src_cli_exit_ts").then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
22
+ const { exit } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
23
23
  return exit(code);
24
24
  },
25
25
  logger: _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger,
26
- version: _version_js__WEBPACK_IMPORTED_MODULE_2__.i8
26
+ version: _version_js__WEBPACK_IMPORTED_MODULE_2__.version
27
27
  });
28
28
  }
29
29
  };
@@ -7,10 +7,8 @@ export const __webpack_modules__ = {
7
7
  __webpack_require__.d(__webpack_exports__, {
8
8
  pluginRsdoctor: ()=>pluginRsdoctor
9
9
  });
10
- var core_ = __webpack_require__("@rsbuild/core");
11
- function isCI() {
12
- return !!process.env['CI'] && 'false' !== process.env['CI'];
13
- }
10
+ var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
11
+ var _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/is-ci.ts");
14
12
  function pluginRsdoctor(options) {
15
13
  return {
16
14
  name: 'lynx:rsbuild:rsdoctor',
@@ -27,7 +25,7 @@ export const __webpack_modules__ = {
27
25
  if (registered) continue;
28
26
  config.plugins ??= [];
29
27
  const defaultOptions = {
30
- disableClientServer: isCI(),
28
+ disableClientServer: (0, _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__.y)(),
31
29
  supports: {
32
30
  banner: true
33
31
  },
@@ -42,12 +40,20 @@ export const __webpack_modules__ = {
42
40
  }
43
41
  }
44
42
  };
45
- config.plugins.push(new RsdoctorRspackPlugin((0, core_.mergeRsbuildConfig)(defaultOptions, options)));
43
+ config.plugins.push(new RsdoctorRspackPlugin((0, _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.mergeRsbuildConfig)(defaultOptions, options)));
46
44
  }
47
- core_.logger.info("Rsdoctor is enabled.");
45
+ _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger.info("Rsdoctor is enabled.");
48
46
  });
49
47
  }
50
48
  };
51
49
  }
50
+ },
51
+ "./src/utils/is-ci.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
52
+ __webpack_require__.d(__webpack_exports__, {
53
+ y: ()=>isCI
54
+ });
55
+ function isCI() {
56
+ return !!process.env['CI'] && 'false' !== process.env['CI'];
57
+ }
52
58
  }
53
59
  };
@@ -10,7 +10,7 @@ export const __webpack_modules__ = {
10
10
  });
11
11
  var core_ = __webpack_require__("@rsbuild/core");
12
12
  var package_namespaceObject = {
13
- i8: "0.10.2"
13
+ i8: "0.10.3"
14
14
  };
15
15
  const version = package_namespaceObject.i8;
16
16
  const rspackVersion = core_.rspack.rspackVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/rspeedy-canary",
3
- "version": "0.10.3-canary-20250728-fcafd541",
3
+ "version": "0.10.3",
4
4
  "description": "A webpack/rspack-based frontend toolchain for Lynx",
5
5
  "keywords": [
6
6
  "webpack",