@rsbuild/core 1.0.6 → 1.0.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.
@@ -34,8 +34,6 @@ export declare const CHAIN_ID: {
34
34
  readonly PUG: "pug";
35
35
  /** Rule for Vue */
36
36
  readonly VUE: "vue";
37
- /** Rule for yaml */
38
- readonly YAML: "yaml";
39
37
  /** Rule for wasm */
40
38
  readonly WASM: "wasm";
41
39
  /** Rule for svelte */
@@ -71,8 +69,6 @@ export declare const CHAIN_ID: {
71
69
  readonly SWC: "swc";
72
70
  /** svgr */
73
71
  readonly SVGR: "svgr";
74
- /** yaml-loader */
75
- readonly YAML: "yaml";
76
72
  /** babel-loader */
77
73
  readonly BABEL: "babel";
78
74
  /** style-loader */
@@ -100,8 +96,6 @@ export declare const CHAIN_ID: {
100
96
  readonly COPY: "copy";
101
97
  /** HtmlRspackPlugin */
102
98
  readonly HTML: "html";
103
- /** ESLintWebpackPlugin */
104
- readonly ESLINT: "eslint";
105
99
  /** DefinePlugin */
106
100
  readonly DEFINE: "define";
107
101
  /** ProgressPlugin */
@@ -124,8 +118,6 @@ export declare const CHAIN_ID: {
124
118
  readonly VUE_LOADER_PLUGIN: "vue-loader-plugin";
125
119
  /** ReactFastRefreshPlugin */
126
120
  readonly REACT_FAST_REFRESH: "react-fast-refresh";
127
- /** ProvidePlugin for node polyfill */
128
- readonly NODE_POLYFILL_PROVIDE: "node-polyfill-provide";
129
121
  /** WebpackSRIPlugin */
130
122
  readonly SUBRESOURCE_INTEGRITY: "subresource-integrity";
131
123
  /** AutoSetRootFontSizePlugin */
@@ -4,7 +4,7 @@ import { isMultiCompiler } from './';
4
4
  export declare const getAllStatsErrors: (statsData: StatsCompilation) => Rspack.StatsError[] | undefined;
5
5
  export declare const getAllStatsWarnings: (statsData: StatsCompilation) => Rspack.StatsError[] | undefined;
6
6
  export declare function getStatsOptions(compiler: Parameters<typeof isMultiCompiler>[0]): StatsValue | undefined;
7
- export declare function formatStats(stats: Rspack.Stats | Rspack.MultiStats, options?: StatsValue): {
7
+ export declare function formatStats(statsData: Rspack.StatsCompilation, hasErrors: boolean): {
8
8
  message?: string;
9
9
  level?: string;
10
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -46,10 +46,9 @@
46
46
  "types.d.ts"
47
47
  ],
48
48
  "dependencies": {
49
- "@rspack/core": "~1.0.6",
49
+ "@rspack/core": "~1.0.7",
50
50
  "@rspack/lite-tapable": "~1.0.0",
51
51
  "@swc/helpers": "^0.5.13",
52
- "caniuse-lite": "^1.0.30001662",
53
52
  "core-js": "~3.38.1"
54
53
  },
55
54
  "devDependencies": {
@@ -59,8 +58,7 @@
59
58
  "@types/on-finished": "2.3.4",
60
59
  "@types/webpack-bundle-analyzer": "4.7.0",
61
60
  "@types/ws": "^8.5.12",
62
- "browserslist": "4.23.3",
63
- "browserslist-to-es-version": "^1.0.0",
61
+ "browserslist-load-config": "0.0.2",
64
62
  "chokidar": "3.6.0",
65
63
  "commander": "^12.1.0",
66
64
  "connect": "3.7.0",
@@ -85,13 +83,13 @@
85
83
  "reduce-configs": "^1.0.0",
86
84
  "rsbuild-dev-middleware": "0.1.1",
87
85
  "rslog": "^1.2.3",
88
- "rspack-chain": "^1.0.3",
86
+ "rspack-chain": "^1.0.1",
89
87
  "rspack-manifest-plugin": "5.0.1",
90
88
  "sirv": "^2.0.4",
91
89
  "style-loader": "3.3.4",
92
90
  "tsc-alias": "^1.8.10",
93
91
  "typescript": "^5.5.2",
94
- "webpack": "^5.94.0",
92
+ "webpack": "^5.95.0",
95
93
  "webpack-bundle-analyzer": "^4.10.2",
96
94
  "webpack-merge": "6.0.1",
97
95
  "ws": "^8.18.0"
@@ -1,201 +0,0 @@
1
- /**
2
- * Return array of browsers by selection queries.
3
- *
4
- * ```js
5
- * browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8']
6
- * ```
7
- *
8
- * @param queries Browser queries.
9
- * @param opts Options.
10
- * @returns Array with browser names in Can I Use.
11
- */
12
- declare function browserslist(
13
- queries?: string | readonly string[] | null,
14
- opts?: browserslist.Options
15
- ): string[]
16
-
17
- declare namespace browserslist {
18
- interface Query {
19
- compose: 'or' | 'and'
20
- type: string
21
- query: string
22
- not?: true
23
- }
24
-
25
- interface Options {
26
- /**
27
- * Path to processed file. It will be used to find config files.
28
- */
29
- path?: string | false
30
- /**
31
- * Processing environment. It will be used to take right queries
32
- * from config file.
33
- */
34
- env?: string
35
- /**
36
- * Custom browser usage statistics for "> 1% in my stats" query.
37
- */
38
- stats?: Stats | string
39
- /**
40
- * Path to config file with queries.
41
- */
42
- config?: string
43
- /**
44
- * Do not throw on unknown version in direct query.
45
- */
46
- ignoreUnknownVersions?: boolean
47
- /**
48
- * Throw an error if env is not found.
49
- */
50
- throwOnMissing?: boolean
51
- /**
52
- * Disable security checks for extend query.
53
- */
54
- dangerousExtend?: boolean
55
- /**
56
- * Alias mobile browsers to the desktop version when Can I Use
57
- * doesn’t have data about the specified version.
58
- */
59
- mobileToDesktop?: boolean
60
- }
61
-
62
- type Config = {
63
- defaults: string[]
64
- [section: string]: string[] | undefined
65
- }
66
-
67
- interface Stats {
68
- [browser: string]: {
69
- [version: string]: number
70
- }
71
- }
72
-
73
- /**
74
- * Browser names aliases.
75
- */
76
- let aliases: {
77
- [alias: string]: string | undefined
78
- }
79
-
80
- /**
81
- * Aliases to work with joined versions like `ios_saf 7.0-7.1`.
82
- */
83
- let versionAliases: {
84
- [browser: string]:
85
- | {
86
- [version: string]: string | undefined
87
- }
88
- | undefined
89
- }
90
-
91
- /**
92
- * Can I Use only provides a few versions for some browsers (e.g. `and_chr`).
93
- *
94
- * Fallback to a similar browser for unknown versions.
95
- */
96
- let desktopNames: {
97
- [browser: string]: string | undefined
98
- }
99
-
100
- let data: {
101
- [browser: string]:
102
- | {
103
- name: string
104
- versions: string[]
105
- released: string[]
106
- releaseDate: {
107
- [version: string]: number | undefined | null
108
- }
109
- }
110
- | undefined
111
- }
112
-
113
- let nodeVersions: string[]
114
-
115
- interface Usage {
116
- [version: string]: number
117
- }
118
-
119
- let usage: {
120
- global?: Usage
121
- custom?: Usage | null
122
- [country: string]: Usage | undefined | null
123
- }
124
-
125
- let cache: {
126
- [feature: string]: {
127
- [name: string]: {
128
- [version: string]: string
129
- }
130
- }
131
- }
132
-
133
- /**
134
- * Default browsers query
135
- */
136
- let defaults: readonly string[]
137
-
138
- /**
139
- * Which statistics should be used. Country code or custom statistics.
140
- * Pass `"my stats"` to load statistics from `Browserslist` files.
141
- */
142
- type StatsOptions = string | 'my stats' | Stats | { dataByBrowser: Stats }
143
-
144
- /**
145
- * Return browsers market coverage.
146
- *
147
- * ```js
148
- * browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1
149
- * ```
150
- *
151
- * @param browsers Browsers names in Can I Use.
152
- * @param stats Which statistics should be used.
153
- * @returns Total market coverage for all selected browsers.
154
- */
155
- function coverage(browsers: readonly string[], stats?: StatsOptions): number
156
-
157
- /**
158
- * Get queries AST to analyze the config content.
159
- *
160
- * @param queries Browser queries.
161
- * @param opts Options.
162
- * @returns An array of the data of each query in the config.
163
- */
164
- function parse(
165
- queries?: string | readonly string[] | null,
166
- opts?: browserslist.Options
167
- ): Query[]
168
-
169
- function clearCaches(): void
170
-
171
- function parseConfig(string: string): Config
172
-
173
- function readConfig(file: string): Config
174
-
175
- function findConfig(...pathSegments: string[]): Config | undefined
176
-
177
- interface LoadConfigOptions {
178
- config?: string
179
- path?: string
180
- env?: string
181
- }
182
-
183
- function loadConfig(options: LoadConfigOptions): string[] | undefined
184
- }
185
-
186
- declare global {
187
- namespace NodeJS {
188
- interface ProcessEnv {
189
- BROWSERSLIST?: string
190
- BROWSERSLIST_CONFIG?: string
191
- BROWSERSLIST_DANGEROUS_EXTEND?: string
192
- BROWSERSLIST_DISABLE_CACHE?: string
193
- BROWSERSLIST_ENV?: string
194
- BROWSERSLIST_IGNORE_OLD_DATA?: string
195
- BROWSERSLIST_STATS?: string
196
- BROWSERSLIST_ROOT_PATH?: string
197
- }
198
- }
199
- }
200
-
201
- export { browserslist as default };