@rslib/core 0.8.0 → 0.9.1

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.
@@ -18,31 +18,38 @@ export type Dts = {
18
18
  /**
19
19
  * Whether to bundle the declaration files.
20
20
  * @defaultValue `false`
21
- * @see {@link https://lib.rsbuild.dev/config/lib/dts#dtsbundle}
21
+ * @see {@link https://rslib.rs/config/lib/dts#dtsbundle}
22
22
  */
23
- bundle?: boolean;
23
+ bundle?: boolean | {
24
+ /**
25
+ * Specifies the dependencies whose declaration files should be bundled.
26
+ * @defaultValue {@link https://rslib.rs/config/lib/dts#dtsbundlebundledpackages}
27
+ * @see {@link https://rslib.rs/config/lib/dts#dtsbundlebundledpackages}
28
+ */
29
+ bundledPackages?: string[];
30
+ };
24
31
  /**
25
32
  * The output directory of declaration files.
26
- * @defaultValue {@link https://lib.rsbuild.dev/config/lib/dts#default-value}
27
- * @see {@link https://lib.rsbuild.dev/config/lib/dts#dtsdistpath}
33
+ * @defaultValue {@link https://rslib.rs/config/lib/dts#default-value}
34
+ * @see {@link https://rslib.rs/config/lib/dts#dtsdistpath}
28
35
  */
29
36
  distPath?: string;
30
37
  /**
31
38
  * Whether to generate declaration files with building the project references.
32
39
  * @defaultValue `false`
33
- * @see {@link https://lib.rsbuild.dev/config/lib/dts#dtsbuild}
40
+ * @see {@link https://rslib.rs/config/lib/dts#dtsbuild}
34
41
  */
35
42
  build?: boolean;
36
43
  /**
37
44
  * Whether to abort the build process when an error occurs during declaration files generation.
38
45
  * @defaultValue `true`
39
- * @see {@link https://lib.rsbuild.dev/config/lib/dts#dtsabortonerror}
46
+ * @see {@link https://rslib.rs/config/lib/dts#dtsabortonerror}
40
47
  */
41
48
  abortOnError?: boolean;
42
49
  /**
43
50
  * Whether to automatically set the declaration file extension based on the {@link format} option.
44
51
  * @defaultValue `false`
45
- * @see {@link https://lib.rsbuild.dev/config/lib/dts#dtsautoextension}
52
+ * @see {@link https://rslib.rs/config/lib/dts#dtsautoextension}
46
53
  */
47
54
  autoExtension?: boolean;
48
55
  } | boolean;
@@ -50,25 +57,25 @@ export type AutoExternal = boolean | {
50
57
  /**
51
58
  * Whether to automatically externalize dependencies of type `dependencies`.
52
59
  * @defaultValue `true`
53
- * @see {@link https://lib.rsbuild.dev/config/lib/auto-external#autoexternaldependencies}
60
+ * @see {@link https://rslib.rs/config/lib/auto-external#autoexternaldependencies}
54
61
  */
55
62
  dependencies?: boolean;
56
63
  /**
57
64
  * Whether to automatically externalize dependencies of type `optionalDependencies`.
58
65
  * @defaultValue `true`
59
- * @see {@link https://lib.rsbuild.dev/config/lib/auto-external#autoexternaloptionaldependencies}
66
+ * @see {@link https://rslib.rs/config/lib/auto-external#autoexternaloptionaldependencies}
60
67
  */
61
68
  optionalDependencies?: boolean;
62
69
  /**
63
70
  * Whether to automatically externalize dependencies of type `peerDependencies`.
64
71
  * @defaultValue `true`
65
- * @see {@link https://lib.rsbuild.dev/config/lib/auto-external#autoexternalpeerdependencies}
72
+ * @see {@link https://rslib.rs/config/lib/auto-external#autoexternalpeerdependencies}
66
73
  */
67
74
  peerDependencies?: boolean;
68
75
  /**
69
76
  * Whether to automatically externalize dependencies of type `devDependencies`.
70
77
  * @defaultValue `false`
71
- * @see {@link https://lib.rsbuild.dev/config/lib/auto-external#autoexternaldevdependencies}
78
+ * @see {@link https://rslib.rs/config/lib/auto-external#autoexternaldevdependencies}
72
79
  */
73
80
  devDependencies?: boolean;
74
81
  };
@@ -80,37 +87,37 @@ export type BannerAndFooter = {
80
87
  export type Shims = {
81
88
  /**
82
89
  * Configure the shims for CommonJS output.
83
- * @see {@link https://lib.rsbuild.dev/config/lib/shims#shimscjs}
90
+ * @see {@link https://rslib.rs/config/lib/shims#shimscjs}
84
91
  */
85
92
  cjs?: {
86
93
  /**
87
94
  * Whether to inject shims for the `import.meta.url` in CommonJS output.
88
95
  * @defaultValue `true`
89
- * @see {@link https://lib.rsbuild.dev/config/lib/shims#shimscjsimportmetaurl}
96
+ * @see {@link https://rslib.rs/config/lib/shims#shimscjsimportmetaurl}
90
97
  */
91
98
  'import.meta.url'?: boolean;
92
99
  };
93
100
  /**
94
101
  * Configure the shims for ESM output.
95
- * @see {@link https://lib.rsbuild.dev/config/lib/shims#shimsesm}
102
+ * @see {@link https://rslib.rs/config/lib/shims#shimsesm}
96
103
  */
97
104
  esm?: {
98
105
  /**
99
106
  * Whether to inject shims for the global `__filename` of CommonJS in ESM output.
100
107
  * @defaultValue `false`
101
- * @see {@link https://lib.rsbuild.dev/config/lib/shims#shimsesm__filename}
108
+ * @see {@link https://rslib.rs/config/lib/shims#shimsesm__filename}
102
109
  */
103
110
  __filename?: boolean;
104
111
  /**
105
112
  * Whether to inject shims for the global `__dirname` of CommonJS in ESM output.
106
113
  * @defaultValue `false`
107
- * @see {@link https://lib.rsbuild.dev/config/lib/shims#shimsesm__dirname}
114
+ * @see {@link https://rslib.rs/config/lib/shims#shimsesm__dirname}
108
115
  */
109
116
  __dirname?: boolean;
110
117
  /**
111
118
  * Whether to inject shims for the global `require` of CommonJS in ESM output.
112
119
  * @defaultValue `false`
113
- * @see {@link https://lib.rsbuild.dev/config/lib/shims#shimsesmrequire}
120
+ * @see {@link https://rslib.rs/config/lib/shims#shimsesmrequire}
114
121
  */
115
122
  require?: boolean;
116
123
  };
@@ -165,61 +172,61 @@ export interface LibConfig extends EnvironmentConfig {
165
172
  /**
166
173
  * The unique identifier of the library.
167
174
  * @defaultValue `undefined`
168
- * @see {@link https://lib.rsbuild.dev/config/lib/id}
175
+ * @see {@link https://rslib.rs/config/lib/id}
169
176
  */
170
177
  id?: string;
171
178
  /**
172
179
  * Output format for the generated JavaScript files.
173
180
  * @defaultValue `'esm'`
174
- * @see {@link https://lib.rsbuild.dev/config/lib/format}
181
+ * @see {@link https://rslib.rs/config/lib/format}
175
182
  */
176
183
  format?: Format;
177
184
  /**
178
185
  * Whether to bundle the library.
179
186
  * @defaultValue `true`
180
- * @see {@link https://lib.rsbuild.dev/config/lib/bundle}
187
+ * @see {@link https://rslib.rs/config/lib/bundle}
181
188
  */
182
189
  bundle?: boolean;
183
190
  /**
184
191
  * Whether to automatically set the file extension based on {@link format} option in the JavaScript output files.
185
192
  * @defaultValue `true`
186
- * @see {@link https://lib.rsbuild.dev/config/lib/auto-extension}
193
+ * @see {@link https://rslib.rs/config/lib/auto-extension}
187
194
  */
188
195
  autoExtension?: boolean;
189
196
  /**
190
197
  * Whether to automatically externalize dependencies of different dependency types and do not bundle them.
191
198
  * @defaultValue `true` when {@link format} is `cjs` or `esm`, `false` when {@link format} is `umd` or `mf`.
192
- * @see {@link https://lib.rsbuild.dev/config/lib/auto-external}
199
+ * @see {@link https://rslib.rs/config/lib/auto-external}
193
200
  */
194
201
  autoExternal?: AutoExternal;
195
202
  /**
196
203
  * Configure the redirect of the import paths, applicable {@link bundle} is set to `false`.
197
204
  * @defaultValue `{}`
198
- * @see {@link https://lib.rsbuild.dev/config/lib/redirect}
205
+ * @see {@link https://rslib.rs/config/lib/redirect}
199
206
  */
200
207
  redirect?: Redirect;
201
208
  /**
202
209
  * Configure the syntax to which JavaScript and CSS will be downgraded.
203
210
  * @defaultValue `'esnext'`
204
- * @see {@link https://lib.rsbuild.dev/config/lib/syntax}
211
+ * @see {@link https://rslib.rs/config/lib/syntax}
205
212
  */
206
213
  syntax?: Syntax;
207
214
  /**
208
215
  * Whether to import SWC helper functions from `@swc/helpers` instead of inlining them.
209
216
  * @defaultValue `false`
210
- * @see {@link https://lib.rsbuild.dev/config/lib/external-helpers}
217
+ * @see {@link https://rslib.rs/config/lib/external-helpers}
211
218
  */
212
219
  externalHelpers?: boolean;
213
220
  /**
214
221
  * Inject content into the top of each JavaScript, CSS or declaration file.
215
222
  * @defaultValue `{}`
216
- * @see {@link https://lib.rsbuild.dev/config/lib/banner}
223
+ * @see {@link https://rslib.rs/config/lib/banner}
217
224
  */
218
225
  banner?: BannerAndFooter;
219
226
  /**
220
227
  * Inject content into the bottom of each JavaScript, CSS or declaration file.
221
228
  * @defaultValue `{}`
222
- * @see {@link https://lib.rsbuild.dev/config/lib/footer}
229
+ * @see {@link https://rslib.rs/config/lib/footer}
223
230
  */
224
231
  footer?: BannerAndFooter;
225
232
  /**
@@ -238,25 +245,25 @@ export interface LibConfig extends EnvironmentConfig {
238
245
  * },
239
246
  * };
240
247
  * ```
241
- * @see {@link https://lib.rsbuild.dev/config/lib/shims}
248
+ * @see {@link https://rslib.rs/config/lib/shims}
242
249
  */
243
250
  shims?: Shims;
244
251
  /**
245
252
  * Configure the generation of the TypeScript declaration files.
246
253
  * @defaultValue `false`
247
- * @see {@link https://lib.rsbuild.dev/config/lib/dts}
254
+ * @see {@link https://rslib.rs/config/lib/dts}
248
255
  */
249
256
  dts?: Dts;
250
257
  /**
251
258
  * The export name of the UMD bundle.
252
259
  * @defaultValue `undefined`
253
- * @see {@link https://lib.rsbuild.dev/config/lib/umd-name}
260
+ * @see {@link https://rslib.rs/config/lib/umd-name}
254
261
  */
255
- umdName?: string;
262
+ umdName?: Rspack.LibraryName;
256
263
  /**
257
264
  * The base directory of the output files.
258
265
  * @defaultValue `undefined`
259
- * @see {@link https://lib.rsbuild.dev/config/lib/out-base}
266
+ * @see {@link https://rslib.rs/config/lib/out-base}
260
267
  */
261
268
  outBase?: string;
262
269
  /**
@@ -281,7 +288,7 @@ interface RslibOutputConfig extends OutputConfig {
281
288
  * When minify is not specified, Rslib will use a sane default for minify options.
282
289
  * The default options will only perform dead code elimination and unused code elimination.
283
290
  *
284
- * @see {@link https://lib.rsbuild.dev/config/rsbuild/output#outputminify}
291
+ * @see {@link https://rslib.rs/config/rsbuild/output#outputminify}
285
292
  */
286
293
  minify?: OutputConfig['minify'];
287
294
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@rslib/core",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "The Rsbuild-based library development tool.",
5
- "homepage": "https://lib.rsbuild.dev",
5
+ "homepage": "https://rslib.rs",
6
6
  "bugs": {
7
7
  "url": "https://github.com/web-infra-dev/rslib/issues"
8
8
  },
@@ -36,23 +36,23 @@
36
36
  "types.d.ts"
37
37
  ],
38
38
  "dependencies": {
39
- "@rsbuild/core": "1.3.20",
40
- "tinyglobby": "^0.2.13",
41
- "rsbuild-plugin-dts": "0.8.0"
39
+ "@rsbuild/core": "~1.3.21",
40
+ "tinyglobby": "^0.2.14",
41
+ "rsbuild-plugin-dts": "0.9.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@module-federation/rsbuild-plugin": "^0.14.0",
44
+ "@module-federation/rsbuild-plugin": "^0.14.1",
45
45
  "@types/fs-extra": "^11.0.4",
46
+ "cac": "^6.7.14",
46
47
  "chokidar": "^4.0.3",
47
- "commander": "^14.0.0",
48
48
  "fs-extra": "^11.3.0",
49
49
  "memfs": "^4.17.2",
50
50
  "picocolors": "1.1.1",
51
51
  "prebundle": "1.3.3",
52
52
  "rsbuild-plugin-publint": "^0.3.2",
53
- "rslib": "npm:@rslib/core@0.7.1",
53
+ "rslib": "npm:@rslib/core@0.9.0",
54
54
  "rslog": "^1.2.3",
55
- "tsconfck": "3.1.5",
55
+ "tsconfck": "3.1.6",
56
56
  "typescript": "^5.8.3",
57
57
  "@rslib/tsconfig": "0.0.1"
58
58
  },