bunchee 6.5.0 → 6.5.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.
- package/dist/bin/cli.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -3
- package/package.json +6 -6
package/dist/bin/cli.js
CHANGED
|
@@ -646,7 +646,7 @@ function lint$1(pkg) {
|
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
-
var version = "6.5.
|
|
649
|
+
var version = "6.5.1";
|
|
650
650
|
|
|
651
651
|
async function writeDefaultTsconfig(tsConfigPath) {
|
|
652
652
|
await fs.promises.writeFile(tsConfigPath, JSON.stringify(DEFAULT_TS_CONFIG, null, 2), 'utf-8');
|
package/dist/index.d.ts
CHANGED
|
@@ -47,4 +47,5 @@ type BrowserslistConfig = string | string[] | Record<string, string>;
|
|
|
47
47
|
|
|
48
48
|
declare function bundle(cliEntryPath: string, { cwd: _cwd, onSuccess, ...options }?: BundleConfig): Promise<void>;
|
|
49
49
|
|
|
50
|
-
export {
|
|
50
|
+
export { bundle };
|
|
51
|
+
export type { BundleConfig };
|
package/dist/index.js
CHANGED
|
@@ -1978,9 +1978,11 @@ async function bundle(cliEntryPath, { cwd: _cwd, onSuccess, ...options } = {}) {
|
|
|
1978
1978
|
const err = new Error(`Entry file "${cliEntryPath}" does not exist`);
|
|
1979
1979
|
err.name = 'NOT_EXISTED';
|
|
1980
1980
|
return Promise.reject(err);
|
|
1981
|
-
} else
|
|
1982
|
-
|
|
1983
|
-
|
|
1981
|
+
} else {
|
|
1982
|
+
// Check if the project directory exists
|
|
1983
|
+
const hasProjectDir = cwd && fs__default.default.existsSync(cwd) && (await fsp__default.default.stat(cwd)).isDirectory();
|
|
1984
|
+
// Error if the project directory does not exist
|
|
1985
|
+
if (cwd && !hasProjectDir) {
|
|
1984
1986
|
const err = new Error(`Project directory "${cwd}" does not exist`);
|
|
1985
1987
|
err.name = 'NOT_EXISTED';
|
|
1986
1988
|
return Promise.reject(err);
|
|
@@ -1988,6 +1990,13 @@ async function bundle(cliEntryPath, { cwd: _cwd, onSuccess, ...options } = {}) {
|
|
|
1988
1990
|
}
|
|
1989
1991
|
}
|
|
1990
1992
|
const entries = await collectEntriesFromParsedExports(cwd, parsedExportsInfo, pkg, inputFile);
|
|
1993
|
+
// Collect and log missing entries for defined exports
|
|
1994
|
+
const missingEntries = [
|
|
1995
|
+
...parsedExportsInfo.keys()
|
|
1996
|
+
].filter((key)=>!entries[key] && key !== './package.json');
|
|
1997
|
+
if (missingEntries.length > 0) {
|
|
1998
|
+
logger.warn(`The following exports are defined in package.json but missing source files:\n${missingEntries.map((name)=>`⨯ ${name}`).join('\n')}\n`);
|
|
1999
|
+
}
|
|
1991
2000
|
const hasTypeScriptFiles = Object.values(entries).some((entry)=>isTypescriptFile(entry.source));
|
|
1992
2001
|
// If there's no tsconfig, create one.
|
|
1993
2002
|
if (hasTypeScriptFiles && !hasTsConfig) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunchee",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.1",
|
|
4
4
|
"description": "zero config bundler for js/ts/jsx libraries",
|
|
5
5
|
"bin": "./dist/bin/cli.js",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
40
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
41
41
|
"@rollup/plugin-json": "^6.1.0",
|
|
42
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
42
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
43
43
|
"@rollup/plugin-replace": "^6.0.2",
|
|
44
44
|
"@rollup/plugin-wasm": "^6.2.2",
|
|
45
45
|
"@rollup/pluginutils": "^5.1.4",
|
|
46
|
-
"@swc/core": "^1.
|
|
46
|
+
"@swc/core": "^1.11.21",
|
|
47
47
|
"@swc/helpers": "^0.5.15",
|
|
48
48
|
"clean-css": "^5.3.3",
|
|
49
49
|
"fast-glob": "^3.3.3",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"ora": "^8.0.1",
|
|
52
52
|
"picomatch": "^4.0.2",
|
|
53
53
|
"pretty-bytes": "^5.6.0",
|
|
54
|
-
"rollup": "^4.
|
|
55
|
-
"rollup-plugin-dts": "^6.
|
|
54
|
+
"rollup": "^4.40.0",
|
|
55
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
56
56
|
"rollup-plugin-swc3": "^0.11.1",
|
|
57
57
|
"rollup-preserve-directives": "^1.1.3",
|
|
58
58
|
"tslib": "^2.8.1",
|