@rslib/core 0.0.15 → 0.0.16
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/bin/rslib.js +13 -1
- package/dist/index.js +6 -5
- package/dist-types/index.d.ts +1 -1
- package/dist-types/types/config/index.d.ts +1 -1
- package/package.json +5 -5
package/bin/rslib.js
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import nodeModule from 'node:module';
|
|
3
|
+
|
|
4
|
+
// enable on-disk code caching of all modules loaded by Node.js
|
|
5
|
+
// requires Nodejs >= 22.8.0
|
|
6
|
+
const { enableCompileCache } = nodeModule;
|
|
7
|
+
if (enableCompileCache) {
|
|
8
|
+
try {
|
|
9
|
+
enableCompileCache();
|
|
10
|
+
} catch {
|
|
11
|
+
// ignore errors
|
|
12
|
+
}
|
|
13
|
+
}
|
|
3
14
|
|
|
4
15
|
async function main() {
|
|
16
|
+
const { logger, prepareCli, runCli } = await import('../dist/index.js');
|
|
5
17
|
prepareCli();
|
|
6
18
|
|
|
7
19
|
try {
|
package/dist/index.js
CHANGED
|
@@ -150,7 +150,7 @@ function prepareCli() {
|
|
|
150
150
|
// Some package managers automatically output a blank line, some do not.
|
|
151
151
|
const { npm_execpath } = process.env;
|
|
152
152
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
153
|
-
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.greet(` Rslib v0.0.
|
|
153
|
+
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.greet(` Rslib v0.0.16\n`);
|
|
154
154
|
}
|
|
155
155
|
const DEFAULT_CONFIG_NAME = 'rslib.config';
|
|
156
156
|
const DEFAULT_CONFIG_EXTENSIONS = [
|
|
@@ -1923,6 +1923,7 @@ const composeDtsConfig = async (libConfig, dtsExtension)=>{
|
|
|
1923
1923
|
// Only setting dts.bundle to true will generate the bundled d.ts.
|
|
1924
1924
|
bundle: dts?.bundle ?? false,
|
|
1925
1925
|
distPath: dts?.distPath ?? output?.distPath?.root ?? './dist',
|
|
1926
|
+
build: dts?.build ?? false,
|
|
1926
1927
|
abortOnError: dts?.abortOnError ?? true,
|
|
1927
1928
|
dtsExtension: dts?.autoExtension ? dtsExtension : '.d.ts',
|
|
1928
1929
|
autoExternal,
|
|
@@ -2118,7 +2119,7 @@ const applyCommonOptions = (command)=>{
|
|
|
2118
2119
|
command.option('-c --config <config>', 'specify the configuration file, can be a relative or absolute path').option('--env-mode <mode>', 'specify the env mode to load the `.env.[mode]` file');
|
|
2119
2120
|
};
|
|
2120
2121
|
function runCli() {
|
|
2121
|
-
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js__.program.name('rslib').usage('<command> [options]').version("0.0.
|
|
2122
|
+
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js__.program.name('rslib').usage('<command> [options]').version("0.0.16");
|
|
2122
2123
|
const buildCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js__.program.command('build');
|
|
2123
2124
|
const inspectCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js__.program.command('inspect');
|
|
2124
2125
|
[
|
|
@@ -2138,7 +2139,7 @@ function runCli() {
|
|
|
2138
2139
|
process.exit(1);
|
|
2139
2140
|
}
|
|
2140
2141
|
});
|
|
2141
|
-
inspectCommand.description('inspect the
|
|
2142
|
+
inspectCommand.description('inspect the Rsbuild / Rspack configs of Rslib projects').option('--output <output>', 'specify inspect content output path', '.rsbuild').option('--verbose', 'show full function definitions in output').action(async (options)=>{
|
|
2142
2143
|
try {
|
|
2143
2144
|
// TODO: inspect should output Rslib's config
|
|
2144
2145
|
const rslibConfig = await loadConfig({
|
|
@@ -2160,6 +2161,6 @@ function runCli() {
|
|
|
2160
2161
|
});
|
|
2161
2162
|
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js__.program.parse();
|
|
2162
2163
|
}
|
|
2163
|
-
const src_version = "0.0.
|
|
2164
|
+
const src_version = "0.0.16";
|
|
2164
2165
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger;
|
|
2165
|
-
export { build, defineConfig, loadConfig, prepareCli, runCli, src_version as version, __webpack_exports__logger as logger };
|
|
2166
|
+
export { build, defineConfig, loadConfig, prepareCli, runCli, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, src_version as version, __webpack_exports__logger as logger };
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { prepareCli } from './cli/prepare';
|
|
2
2
|
export { runCli } from './cli/commands';
|
|
3
|
-
export { defineConfig, loadConfig } from './config';
|
|
3
|
+
export { defineConfig, loadConfig, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, } from './config';
|
|
4
4
|
export { build } from './build';
|
|
5
5
|
export { logger } from './utils/logger';
|
|
6
6
|
export type * from './types';
|
|
@@ -6,7 +6,7 @@ export type LatestEcmaVersions = 'es2024' | 'esnext';
|
|
|
6
6
|
export type EcmaScriptVersion = FixedEcmaVersions | LatestEcmaVersions;
|
|
7
7
|
export type RsbuildConfigOutputTarget = NonNullable<RsbuildConfig['output']>['target'];
|
|
8
8
|
export type Syntax = EcmaScriptVersion | string[];
|
|
9
|
-
export type Dts = (Pick<PluginDtsOptions, 'bundle' | 'distPath' | 'abortOnError'> & {
|
|
9
|
+
export type Dts = (Pick<PluginDtsOptions, 'bundle' | 'distPath' | 'abortOnError' | 'build'> & {
|
|
10
10
|
autoExtension?: boolean;
|
|
11
11
|
}) | boolean;
|
|
12
12
|
export type AutoExternal = boolean | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslib/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "The Rspack-based library build tool.",
|
|
5
5
|
"homepage": "https://lib.rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"compiled"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@rsbuild/core": "~1.0.
|
|
35
|
+
"@rsbuild/core": "~1.0.19",
|
|
36
36
|
"tinyglobby": "^0.2.10",
|
|
37
|
-
"rsbuild-plugin-dts": "0.0.
|
|
37
|
+
"rsbuild-plugin-dts": "0.0.16"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@rspack/core": "1.0.8",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"fs-extra": "^11.2.0",
|
|
44
44
|
"memfs": "^4.14.0",
|
|
45
45
|
"picocolors": "1.1.1",
|
|
46
|
-
"prebundle": "1.2.
|
|
47
|
-
"rslib": "npm:@rslib/core@0.0.
|
|
46
|
+
"prebundle": "1.2.5",
|
|
47
|
+
"rslib": "npm:@rslib/core@0.0.15",
|
|
48
48
|
"rslog": "^1.2.3",
|
|
49
49
|
"tsconfck": "3.1.4",
|
|
50
50
|
"typescript": "^5.6.3",
|