@rsbuild/core 1.3.3 → 1.3.5

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 (47) hide show
  1. package/compiled/chokidar/index.d.ts +2 -1
  2. package/compiled/css-loader/index.js +18 -18
  3. package/compiled/html-rspack-plugin/index.js +14 -14
  4. package/compiled/http-proxy-middleware/index.d.ts +3 -2
  5. package/compiled/postcss/lib/at-rule.d.ts +140 -0
  6. package/compiled/postcss/lib/comment.d.ts +68 -0
  7. package/compiled/postcss/lib/container.d.ts +480 -0
  8. package/compiled/postcss/lib/css-syntax-error.d.ts +248 -0
  9. package/compiled/postcss/lib/declaration.d.ts +151 -0
  10. package/compiled/postcss/lib/document.d.ts +69 -0
  11. package/compiled/postcss/lib/fromJSON.d.ts +9 -0
  12. package/compiled/postcss/lib/input.d.ts +206 -0
  13. package/compiled/postcss/lib/lazy-result.d.ts +190 -0
  14. package/compiled/postcss/lib/list.d.ts +60 -0
  15. package/compiled/postcss/lib/no-work-result.d.ts +46 -0
  16. package/compiled/postcss/lib/node.d.ts +541 -0
  17. package/compiled/postcss/lib/parse.d.ts +9 -0
  18. package/compiled/postcss/lib/postcss.d.ts +458 -0
  19. package/compiled/postcss/lib/previous-map.d.ts +81 -0
  20. package/compiled/postcss/lib/processor.d.ts +115 -0
  21. package/compiled/postcss/lib/result.d.ts +205 -0
  22. package/compiled/postcss/lib/root.d.ts +87 -0
  23. package/compiled/postcss/lib/rule.d.ts +126 -0
  24. package/compiled/postcss/lib/stringifier.d.ts +46 -0
  25. package/compiled/postcss/lib/stringify.d.ts +9 -0
  26. package/compiled/postcss/lib/warning.d.ts +147 -0
  27. package/compiled/postcss/package.json +1 -1
  28. package/compiled/postcss-loader/index.js +6 -6
  29. package/compiled/rslog/index.d.ts +2 -1
  30. package/compiled/rspack-chain/index.js +66 -66
  31. package/compiled/rspack-chain/package.json +1 -1
  32. package/compiled/rspack-chain/{index.d.ts → types/index.d.ts} +18 -2
  33. package/compiled/rspack-manifest-plugin/index.d.ts +2 -1
  34. package/compiled/rspack-manifest-plugin/index.js +4 -4
  35. package/compiled/tinyglobby/index.d.ts +2 -1
  36. package/dist/index.cjs +22 -20
  37. package/dist/index.js +22 -20
  38. package/dist-types/configChain.d.ts +1 -1
  39. package/dist-types/helpers/index.d.ts +1 -1
  40. package/dist-types/types/config.d.ts +1 -1
  41. package/dist-types/types/hooks.d.ts +1 -1
  42. package/dist-types/types/plugin.d.ts +1 -1
  43. package/dist-types/types/rspack.d.ts +1 -1
  44. package/dist-types/types/thirdParty.d.ts +2 -2
  45. package/package.json +6 -6
  46. package/types.d.ts +8 -8
  47. package/compiled/postcss/index.d.ts +0 -1
@@ -380,4 +380,5 @@ declare const _default: {
380
380
  FSWatcher: typeof FSWatcher;
381
381
  };
382
382
 
383
- export { type ChokidarOptions, type EmitArgs, type EmitArgsWithName, type EmitErrorArgs, type FSWInstanceOptions, FSWatcher, type FSWatcherEventMap, type FSWatcherKnownEventMap, type MatchFunction, type Matcher, type MatcherObject, type ThrottleType, type Throttler, WatchHelper, _default as default, watch };
383
+ export { FSWatcher, WatchHelper, _default as default, watch };
384
+ export type { ChokidarOptions, EmitArgs, EmitArgsWithName, EmitErrorArgs, FSWInstanceOptions, FSWatcherEventMap, FSWatcherKnownEventMap, MatchFunction, Matcher, MatcherObject, ThrottleType, Throttler };
@@ -1,19 +1,19 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 1001: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 3919: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(3403);
5
+ const loader = __nccwpck_require__(8721);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(7206).defaultGetLocalIdent;
8
+ __nccwpck_require__(172).defaultGetLocalIdent;
9
9
  },
10
- 3403: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 8721: (__unused_webpack_module, exports, __nccwpck_require__) => {
11
11
  "use strict";
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports["default"] = loader;
14
14
  var _postcss = _interopRequireDefault(__nccwpck_require__(9409));
15
- var _plugins = __nccwpck_require__(4456);
16
- var _utils = __nccwpck_require__(7206);
15
+ var _plugins = __nccwpck_require__(7502);
16
+ var _utils = __nccwpck_require__(172);
17
17
  function _interopRequireDefault(obj) {
18
18
  return obj && obj.__esModule ? obj : { default: obj };
19
19
  }
@@ -236,7 +236,7 @@
236
236
  callback(null, `${importCode}${moduleCode}${exportCode}`);
237
237
  }
238
238
  },
239
- 4456: (__unused_webpack_module, exports, __nccwpck_require__) => {
239
+ 7502: (__unused_webpack_module, exports, __nccwpck_require__) => {
240
240
  "use strict";
241
241
  Object.defineProperty(exports, "__esModule", { value: true });
242
242
  Object.defineProperty(exports, "icssParser", {
@@ -258,22 +258,22 @@
258
258
  },
259
259
  });
260
260
  var _postcssImportParser = _interopRequireDefault(
261
- __nccwpck_require__(3659),
261
+ __nccwpck_require__(2677),
262
262
  );
263
263
  var _postcssIcssParser = _interopRequireDefault(
264
- __nccwpck_require__(6998),
264
+ __nccwpck_require__(1460),
265
265
  );
266
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(9777));
266
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(7955));
267
267
  function _interopRequireDefault(obj) {
268
268
  return obj && obj.__esModule ? obj : { default: obj };
269
269
  }
270
270
  },
271
- 6998: (__unused_webpack_module, exports, __nccwpck_require__) => {
271
+ 1460: (__unused_webpack_module, exports, __nccwpck_require__) => {
272
272
  "use strict";
273
273
  Object.defineProperty(exports, "__esModule", { value: true });
274
274
  exports["default"] = void 0;
275
275
  var _icssUtils = __nccwpck_require__(4531);
276
- var _utils = __nccwpck_require__(7206);
276
+ var _utils = __nccwpck_require__(172);
277
277
  const plugin = (options = {}) => ({
278
278
  postcssPlugin: "postcss-icss-parser",
279
279
  async OnceExit(root) {
@@ -372,14 +372,14 @@
372
372
  plugin.postcss = true;
373
373
  var _default = (exports["default"] = plugin);
374
374
  },
375
- 3659: (__unused_webpack_module, exports, __nccwpck_require__) => {
375
+ 2677: (__unused_webpack_module, exports, __nccwpck_require__) => {
376
376
  "use strict";
377
377
  Object.defineProperty(exports, "__esModule", { value: true });
378
378
  exports["default"] = void 0;
379
379
  var _postcssValueParser = _interopRequireDefault(
380
380
  __nccwpck_require__(2948),
381
381
  );
382
- var _utils = __nccwpck_require__(7206);
382
+ var _utils = __nccwpck_require__(172);
383
383
  function _interopRequireDefault(obj) {
384
384
  return obj && obj.__esModule ? obj : { default: obj };
385
385
  }
@@ -684,14 +684,14 @@
684
684
  plugin.postcss = true;
685
685
  var _default = (exports["default"] = plugin);
686
686
  },
687
- 9777: (__unused_webpack_module, exports, __nccwpck_require__) => {
687
+ 7955: (__unused_webpack_module, exports, __nccwpck_require__) => {
688
688
  "use strict";
689
689
  Object.defineProperty(exports, "__esModule", { value: true });
690
690
  exports["default"] = void 0;
691
691
  var _postcssValueParser = _interopRequireDefault(
692
692
  __nccwpck_require__(2948),
693
693
  );
694
- var _utils = __nccwpck_require__(7206);
694
+ var _utils = __nccwpck_require__(172);
695
695
  function _interopRequireDefault(obj) {
696
696
  return obj && obj.__esModule ? obj : { default: obj };
697
697
  }
@@ -1034,7 +1034,7 @@
1034
1034
  plugin.postcss = true;
1035
1035
  var _default = (exports["default"] = plugin);
1036
1036
  },
1037
- 7206: (__unused_webpack_module, exports, __nccwpck_require__) => {
1037
+ 172: (__unused_webpack_module, exports, __nccwpck_require__) => {
1038
1038
  "use strict";
1039
1039
  Object.defineProperty(exports, "__esModule", { value: true });
1040
1040
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -8098,6 +8098,6 @@
8098
8098
  }
8099
8099
  if (typeof __nccwpck_require__ !== "undefined")
8100
8100
  __nccwpck_require__.ab = __dirname + "/";
8101
- var __webpack_exports__ = __nccwpck_require__(1001);
8101
+ var __webpack_exports__ = __nccwpck_require__(3919);
8102
8102
  module.exports = __webpack_exports__;
8103
8103
  })();
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 386: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 895: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(403);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(908);
6
6
  const compilerMap = new WeakMap();
7
7
  class CachedChildCompilation {
8
8
  constructor(compiler) {
@@ -304,7 +304,7 @@
304
304
  }
305
305
  module.exports = { CachedChildCompilation };
306
306
  },
307
- 403: (module) => {
307
+ 908: (module) => {
308
308
  "use strict";
309
309
  class HtmlWebpackChildCompiler {
310
310
  constructor(templates) {
@@ -473,7 +473,7 @@
473
473
  }
474
474
  module.exports = { HtmlWebpackChildCompiler };
475
475
  },
476
- 369: (module) => {
476
+ 340: (module) => {
477
477
  "use strict";
478
478
  module.exports = {};
479
479
  module.exports.none = (chunks) => chunks;
@@ -492,7 +492,7 @@
492
492
  };
493
493
  module.exports.auto = module.exports.none;
494
494
  },
495
- 312: (module) => {
495
+ 347: (module) => {
496
496
  "use strict";
497
497
  module.exports = function (err) {
498
498
  return {
@@ -513,7 +513,7 @@
513
513
  };
514
514
  };
515
515
  },
516
- 575: (module, __unused_webpack_exports, __nccwpck_require__) => {
516
+ 106: (module, __unused_webpack_exports, __nccwpck_require__) => {
517
517
  "use strict";
518
518
  const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
519
519
  const htmlWebpackPluginHooksMap = new WeakMap();
@@ -539,7 +539,7 @@
539
539
  }
540
540
  module.exports = { getHtmlRspackPluginHooks };
541
541
  },
542
- 654: (module) => {
542
+ 71: (module) => {
543
543
  const voidTags = [
544
544
  "area",
545
545
  "base",
@@ -607,19 +607,19 @@
607
607
  htmlTagObjectToString,
608
608
  };
609
609
  },
610
- 535: (module, __unused_webpack_exports, __nccwpck_require__) => {
610
+ 734: (module, __unused_webpack_exports, __nccwpck_require__) => {
611
611
  "use strict";
612
612
  const promisify = __nccwpck_require__(23).promisify;
613
613
  const vm = __nccwpck_require__(154);
614
614
  const fs = __nccwpck_require__(896);
615
615
  const path = __nccwpck_require__(928);
616
- const { CachedChildCompilation } = __nccwpck_require__(386);
616
+ const { CachedChildCompilation } = __nccwpck_require__(895);
617
617
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
618
- __nccwpck_require__(654);
619
- const prettyError = __nccwpck_require__(312);
620
- const chunkSorter = __nccwpck_require__(369);
618
+ __nccwpck_require__(71);
619
+ const prettyError = __nccwpck_require__(347);
620
+ const chunkSorter = __nccwpck_require__(340);
621
621
  const getHtmlRspackPluginHooks =
622
- __nccwpck_require__(575).getHtmlRspackPluginHooks;
622
+ __nccwpck_require__(106).getHtmlRspackPluginHooks;
623
623
  class HtmlRspackPlugin {
624
624
  constructor(userOptions = {}) {
625
625
  this.version = HtmlRspackPlugin.version;
@@ -1586,6 +1586,6 @@
1586
1586
  }
1587
1587
  if (typeof __nccwpck_require__ !== "undefined")
1588
1588
  __nccwpck_require__.ab = __dirname + "/";
1589
- var __webpack_exports__ = __nccwpck_require__(535);
1589
+ var __webpack_exports__ = __nccwpck_require__(734);
1590
1590
  module.exports = __webpack_exports__;
1591
1591
  })();
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import * as express from 'express';
2
+
3
3
  import * as http from 'http';
4
4
  import * as events from 'events';
5
5
  import * as net from 'net';
@@ -315,4 +315,5 @@ declare function fixRequestBody(proxyReq: http.ClientRequest, req: http.Incoming
315
315
 
316
316
  declare function createProxyMiddleware(context: Filter | Options, options?: Options): RequestHandler;
317
317
 
318
- export { type Filter, type Options, type RequestHandler, createProxyMiddleware, fixRequestBody, responseInterceptor };
318
+ export { createProxyMiddleware, fixRequestBody, responseInterceptor };
319
+ export type { Filter, Options, RequestHandler };
@@ -0,0 +1,140 @@
1
+ import Container, {
2
+ ContainerProps,
3
+ ContainerWithChildren
4
+ } from './container.js'
5
+
6
+ declare namespace AtRule {
7
+ export interface AtRuleRaws extends Record<string, unknown> {
8
+ /**
9
+ * The space symbols after the last child of the node to the end of the node.
10
+ */
11
+ after?: string
12
+
13
+ /**
14
+ * The space between the at-rule name and its parameters.
15
+ */
16
+ afterName?: string
17
+
18
+ /**
19
+ * The space symbols before the node. It also stores `*`
20
+ * and `_` symbols before the declaration (IE hack).
21
+ */
22
+ before?: string
23
+
24
+ /**
25
+ * The symbols between the last parameter and `{` for rules.
26
+ */
27
+ between?: string
28
+
29
+ /**
30
+ * The rule’s selector with comments.
31
+ */
32
+ params?: {
33
+ raw: string
34
+ value: string
35
+ }
36
+
37
+ /**
38
+ * Contains `true` if the last child has an (optional) semicolon.
39
+ */
40
+ semicolon?: boolean
41
+ }
42
+
43
+ export interface AtRuleProps extends ContainerProps {
44
+ /** Name of the at-rule. */
45
+ name: string
46
+ /** Parameters following the name of the at-rule. */
47
+ params?: number | string
48
+ /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
49
+ raws?: AtRuleRaws
50
+ }
51
+
52
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
53
+ export { AtRule_ as default }
54
+ }
55
+
56
+ /**
57
+ * Represents an at-rule.
58
+ *
59
+ * ```js
60
+ * Once (root, { AtRule }) {
61
+ * let media = new AtRule({ name: 'media', params: 'print' })
62
+ * media.append(…)
63
+ * root.append(media)
64
+ * }
65
+ * ```
66
+ *
67
+ * If it’s followed in the CSS by a `{}` block, this node will have
68
+ * a nodes property representing its children.
69
+ *
70
+ * ```js
71
+ * const root = postcss.parse('@charset "UTF-8"; @media print {}')
72
+ *
73
+ * const charset = root.first
74
+ * charset.type //=> 'atrule'
75
+ * charset.nodes //=> undefined
76
+ *
77
+ * const media = root.last
78
+ * media.nodes //=> []
79
+ * ```
80
+ */
81
+ declare class AtRule_ extends Container {
82
+ /**
83
+ * An array containing the layer’s children.
84
+ *
85
+ * ```js
86
+ * const root = postcss.parse('@layer example { a { color: black } }')
87
+ * const layer = root.first
88
+ * layer.nodes.length //=> 1
89
+ * layer.nodes[0].selector //=> 'a'
90
+ * ```
91
+ *
92
+ * Can be `undefinded` if the at-rule has no body.
93
+ *
94
+ * ```js
95
+ * const root = postcss.parse('@layer a, b, c;')
96
+ * const layer = root.first
97
+ * layer.nodes //=> undefined
98
+ * ```
99
+ */
100
+ nodes: Container['nodes'] | undefined
101
+ parent: ContainerWithChildren | undefined
102
+
103
+ raws: AtRule.AtRuleRaws
104
+ type: 'atrule'
105
+ /**
106
+ * The at-rule’s name immediately follows the `@`.
107
+ *
108
+ * ```js
109
+ * const root = postcss.parse('@media print {}')
110
+ * const media = root.first
111
+ * media.name //=> 'media'
112
+ * ```
113
+ */
114
+ get name(): string
115
+ set name(value: string)
116
+
117
+ /**
118
+ * The at-rule’s parameters, the values that follow the at-rule’s name
119
+ * but precede any `{}` block.
120
+ *
121
+ * ```js
122
+ * const root = postcss.parse('@media print, screen {}')
123
+ * const media = root.first
124
+ * media.params //=> 'print, screen'
125
+ * ```
126
+ */
127
+ get params(): string
128
+
129
+ set params(value: string)
130
+
131
+ constructor(defaults?: AtRule.AtRuleProps)
132
+ assign(overrides: AtRule.AtRuleProps | object): this
133
+ clone(overrides?: Partial<AtRule.AtRuleProps>): this
134
+ cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this
135
+ cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
136
+ }
137
+
138
+ declare class AtRule extends AtRule_ {}
139
+
140
+ export = AtRule
@@ -0,0 +1,68 @@
1
+ import Container from './container.js'
2
+ import Node, { NodeProps } from './node.js'
3
+
4
+ declare namespace Comment {
5
+ export interface CommentRaws extends Record<string, unknown> {
6
+ /**
7
+ * The space symbols before the node.
8
+ */
9
+ before?: string
10
+
11
+ /**
12
+ * The space symbols between `/*` and the comment’s text.
13
+ */
14
+ left?: string
15
+
16
+ /**
17
+ * The space symbols between the comment’s text.
18
+ */
19
+ right?: string
20
+ }
21
+
22
+ export interface CommentProps extends NodeProps {
23
+ /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
24
+ raws?: CommentRaws
25
+ /** Content of the comment. */
26
+ text: string
27
+ }
28
+
29
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
30
+ export { Comment_ as default }
31
+ }
32
+
33
+ /**
34
+ * It represents a class that handles
35
+ * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)
36
+ *
37
+ * ```js
38
+ * Once (root, { Comment }) {
39
+ * const note = new Comment({ text: 'Note: …' })
40
+ * root.append(note)
41
+ * }
42
+ * ```
43
+ *
44
+ * Remember that CSS comments inside selectors, at-rule parameters,
45
+ * or declaration values will be stored in the `raws` properties
46
+ * explained above.
47
+ */
48
+ declare class Comment_ extends Node {
49
+ parent: Container | undefined
50
+ raws: Comment.CommentRaws
51
+ type: 'comment'
52
+ /**
53
+ * The comment's text.
54
+ */
55
+ get text(): string
56
+
57
+ set text(value: string)
58
+
59
+ constructor(defaults?: Comment.CommentProps)
60
+ assign(overrides: Comment.CommentProps | object): this
61
+ clone(overrides?: Partial<Comment.CommentProps>): this
62
+ cloneAfter(overrides?: Partial<Comment.CommentProps>): this
63
+ cloneBefore(overrides?: Partial<Comment.CommentProps>): this
64
+ }
65
+
66
+ declare class Comment extends Comment_ {}
67
+
68
+ export = Comment