bunchee 5.5.0 → 5.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 +52 -45
- package/dist/index.js +51 -44
- package/package.json +7 -7
package/dist/bin/cli.js
CHANGED
|
@@ -77,51 +77,58 @@ function getDefaultExportFromCjs (x) {
|
|
|
77
77
|
|
|
78
78
|
var picocolors = {exports: {}};
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
80
|
+
var hasRequiredPicocolors;
|
|
81
|
+
|
|
82
|
+
function requirePicocolors () {
|
|
83
|
+
if (hasRequiredPicocolors) return picocolors.exports;
|
|
84
|
+
hasRequiredPicocolors = 1;
|
|
85
|
+
let tty = require$$0__default.default;
|
|
86
|
+
let isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
|
|
87
|
+
let formatter = (open, close, replace = open)=>(input)=>{
|
|
88
|
+
let string = "" + input;
|
|
89
|
+
let index = string.indexOf(close, open.length);
|
|
90
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
91
|
+
};
|
|
92
|
+
let replaceClose = (string, close, replace, index)=>{
|
|
93
|
+
let start = string.substring(0, index) + replace;
|
|
94
|
+
let end = string.substring(index + close.length);
|
|
95
|
+
let nextIndex = end.indexOf(close);
|
|
96
|
+
return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
|
|
97
|
+
};
|
|
98
|
+
let createColors = (enabled = isColorSupported)=>({
|
|
99
|
+
isColorSupported: enabled,
|
|
100
|
+
reset: enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String,
|
|
101
|
+
bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
|
|
102
|
+
dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
|
|
103
|
+
italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
|
|
104
|
+
underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
|
|
105
|
+
inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
|
|
106
|
+
hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
|
|
107
|
+
strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
|
|
108
|
+
black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
|
|
109
|
+
red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
|
|
110
|
+
green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
|
|
111
|
+
yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
|
|
112
|
+
blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
|
|
113
|
+
magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
|
|
114
|
+
cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
|
|
115
|
+
white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
|
|
116
|
+
gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
|
|
117
|
+
bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
|
|
118
|
+
bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
|
|
119
|
+
bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
|
|
120
|
+
bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
|
|
121
|
+
bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
|
|
122
|
+
bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
|
|
123
|
+
bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
|
|
124
|
+
bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String
|
|
125
|
+
});
|
|
126
|
+
picocolors.exports = createColors();
|
|
127
|
+
picocolors.exports.createColors = createColors;
|
|
128
|
+
return picocolors.exports;
|
|
129
|
+
}
|
|
123
130
|
|
|
124
|
-
var picocolorsExports =
|
|
131
|
+
var picocolorsExports = /*@__PURE__*/ requirePicocolors();
|
|
125
132
|
var pc = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
|
|
126
133
|
|
|
127
134
|
const defaultColorFn = (text)=>text;
|
|
@@ -517,7 +524,7 @@ function lint$1(pkg) {
|
|
|
517
524
|
}
|
|
518
525
|
}
|
|
519
526
|
|
|
520
|
-
var version = "5.5.
|
|
527
|
+
var version = "5.5.1";
|
|
521
528
|
|
|
522
529
|
function relativify(path) {
|
|
523
530
|
return path.startsWith('.') ? path : `./${path}`;
|
package/dist/index.js
CHANGED
|
@@ -37,51 +37,58 @@ function getDefaultExportFromCjs (x) {
|
|
|
37
37
|
|
|
38
38
|
var picocolors = {exports: {}};
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
40
|
+
var hasRequiredPicocolors;
|
|
41
|
+
|
|
42
|
+
function requirePicocolors () {
|
|
43
|
+
if (hasRequiredPicocolors) return picocolors.exports;
|
|
44
|
+
hasRequiredPicocolors = 1;
|
|
45
|
+
let tty = require$$0__default.default;
|
|
46
|
+
let isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
|
|
47
|
+
let formatter = (open, close, replace = open)=>(input)=>{
|
|
48
|
+
let string = "" + input;
|
|
49
|
+
let index = string.indexOf(close, open.length);
|
|
50
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
51
|
+
};
|
|
52
|
+
let replaceClose = (string, close, replace, index)=>{
|
|
53
|
+
let start = string.substring(0, index) + replace;
|
|
54
|
+
let end = string.substring(index + close.length);
|
|
55
|
+
let nextIndex = end.indexOf(close);
|
|
56
|
+
return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
|
|
57
|
+
};
|
|
58
|
+
let createColors = (enabled = isColorSupported)=>({
|
|
59
|
+
isColorSupported: enabled,
|
|
60
|
+
reset: enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String,
|
|
61
|
+
bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
|
|
62
|
+
dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
|
|
63
|
+
italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
|
|
64
|
+
underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
|
|
65
|
+
inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
|
|
66
|
+
hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
|
|
67
|
+
strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
|
|
68
|
+
black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
|
|
69
|
+
red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
|
|
70
|
+
green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
|
|
71
|
+
yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
|
|
72
|
+
blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
|
|
73
|
+
magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
|
|
74
|
+
cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
|
|
75
|
+
white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
|
|
76
|
+
gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
|
|
77
|
+
bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
|
|
78
|
+
bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
|
|
79
|
+
bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
|
|
80
|
+
bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
|
|
81
|
+
bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
|
|
82
|
+
bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
|
|
83
|
+
bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
|
|
84
|
+
bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String
|
|
85
|
+
});
|
|
86
|
+
picocolors.exports = createColors();
|
|
87
|
+
picocolors.exports.createColors = createColors;
|
|
88
|
+
return picocolors.exports;
|
|
89
|
+
}
|
|
83
90
|
|
|
84
|
-
var picocolorsExports =
|
|
91
|
+
var picocolorsExports = /*@__PURE__*/ requirePicocolors();
|
|
85
92
|
var pc = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
|
|
86
93
|
|
|
87
94
|
const defaultColorFn = (text)=>text;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunchee",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.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",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rollup/plugin-commonjs": "^
|
|
39
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
40
40
|
"@rollup/plugin-json": "^6.1.0",
|
|
41
41
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
42
|
-
"@rollup/plugin-replace": "^
|
|
42
|
+
"@rollup/plugin-replace": "^6.0.1",
|
|
43
43
|
"@rollup/plugin-wasm": "^6.2.2",
|
|
44
44
|
"@rollup/pluginutils": "^5.1.0",
|
|
45
45
|
"@swc/core": "^1.7.14",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"magic-string": "^0.30.11",
|
|
50
50
|
"ora": "^8.0.1",
|
|
51
51
|
"pretty-bytes": "^5.6.0",
|
|
52
|
-
"rollup": "^4.
|
|
52
|
+
"rollup": "^4.24.0",
|
|
53
53
|
"rollup-plugin-dts": "^6.1.1",
|
|
54
54
|
"rollup-plugin-swc3": "^0.11.1",
|
|
55
|
-
"rollup-preserve-directives": "^1.1.
|
|
56
|
-
"tslib": "^2.
|
|
55
|
+
"rollup-preserve-directives": "^1.1.2",
|
|
56
|
+
"tslib": "^2.7.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"typescript": "^4.1 || ^5.0"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"picocolors": "^1.0.0",
|
|
83
83
|
"prettier": "^3.0.0",
|
|
84
84
|
"react": "^18.2.0",
|
|
85
|
-
"typescript": "^5.
|
|
85
|
+
"typescript": "^5.6.2"
|
|
86
86
|
},
|
|
87
87
|
"lint-staged": {
|
|
88
88
|
"*.{js,jsx,ts,tsx,md,json,yml,yaml}": "prettier --write"
|