@rsbuild/core 1.0.7 → 1.0.9

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.
@@ -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
  };
@@ -33,20 +33,19 @@ export declare function printServerURLs({ urls: originalUrls, port, routes, prot
33
33
  * @param strictPort - Whether to throw an error when the port is occupied.
34
34
  * @returns Available port number.
35
35
  */
36
- export declare const getPort: ({ host, port, strictPort, tryLimits, silent, }: {
36
+ export declare const getPort: ({ host, port, strictPort, tryLimits, }: {
37
37
  host: string;
38
38
  port: string | number;
39
39
  strictPort: boolean;
40
40
  tryLimits?: number;
41
- silent?: boolean;
42
41
  }) => Promise<number>;
43
- export declare const getServerConfig: ({ config, getPortSilently, }: {
42
+ export declare const getServerConfig: ({ config, }: {
44
43
  config: NormalizedConfig;
45
- getPortSilently?: boolean;
46
44
  }) => Promise<{
47
45
  port: number;
48
46
  host: string;
49
47
  https: boolean;
48
+ portTip: string | undefined;
50
49
  }>;
51
50
  type AddressUrl = {
52
51
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
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.7",
50
- "@rspack/lite-tapable": "~1.0.0",
49
+ "@rspack/core": "~1.0.8",
50
+ "@rspack/lite-tapable": "~1.0.1",
51
51
  "@swc/helpers": "^0.5.13",
52
- "caniuse-lite": "^1.0.30001663",
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.24.0",
63
- "browserslist-to-es-version": "^1.0.0",
61
+ "browserslist-load-config": "0.1.1",
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.1",
86
+ "rspack-chain": "^1.0.3",
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,203 +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
- function findConfigFile(...pathSegments: string[]): string | undefined
178
-
179
- interface LoadConfigOptions {
180
- config?: string
181
- path?: string
182
- env?: string
183
- }
184
-
185
- function loadConfig(options: LoadConfigOptions): string[] | undefined
186
- }
187
-
188
- declare global {
189
- namespace NodeJS {
190
- interface ProcessEnv {
191
- BROWSERSLIST?: string
192
- BROWSERSLIST_CONFIG?: string
193
- BROWSERSLIST_DANGEROUS_EXTEND?: string
194
- BROWSERSLIST_DISABLE_CACHE?: string
195
- BROWSERSLIST_ENV?: string
196
- BROWSERSLIST_IGNORE_OLD_DATA?: string
197
- BROWSERSLIST_STATS?: string
198
- BROWSERSLIST_ROOT_PATH?: string
199
- }
200
- }
201
- }
202
-
203
- export { browserslist as default };