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 CHANGED
@@ -77,51 +77,58 @@ function getDefaultExportFromCjs (x) {
77
77
 
78
78
  var picocolors = {exports: {}};
79
79
 
80
- let tty = require$$0__default.default;
81
- 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);
82
- let formatter = (open, close, replace = open)=>(input)=>{
83
- let string = "" + input;
84
- let index = string.indexOf(close, open.length);
85
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
86
- };
87
- let replaceClose = (string, close, replace, index)=>{
88
- let start = string.substring(0, index) + replace;
89
- let end = string.substring(index + close.length);
90
- let nextIndex = end.indexOf(close);
91
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
92
- };
93
- let createColors = (enabled = isColorSupported)=>({
94
- isColorSupported: enabled,
95
- reset: enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String,
96
- bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
97
- dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
98
- italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
99
- underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
100
- inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
101
- hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
102
- strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
103
- black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
104
- red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
105
- green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
106
- yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
107
- blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
108
- magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
109
- cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
110
- white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
111
- gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
112
- bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
113
- bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
114
- bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
115
- bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
116
- bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
117
- bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
118
- bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
119
- bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String
120
- });
121
- picocolors.exports = createColors();
122
- picocolors.exports.createColors = createColors;
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 = picocolors.exports;
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.0";
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
- let tty = require$$0__default.default;
41
- 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);
42
- let formatter = (open, close, replace = open)=>(input)=>{
43
- let string = "" + input;
44
- let index = string.indexOf(close, open.length);
45
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
46
- };
47
- let replaceClose = (string, close, replace, index)=>{
48
- let start = string.substring(0, index) + replace;
49
- let end = string.substring(index + close.length);
50
- let nextIndex = end.indexOf(close);
51
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
52
- };
53
- let createColors = (enabled = isColorSupported)=>({
54
- isColorSupported: enabled,
55
- reset: enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String,
56
- bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
57
- dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
58
- italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
59
- underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
60
- inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
61
- hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
62
- strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
63
- black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
64
- red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
65
- green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
66
- yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
67
- blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
68
- magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
69
- cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
70
- white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
71
- gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
72
- bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
73
- bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
74
- bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
75
- bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
76
- bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
77
- bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
78
- bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
79
- bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String
80
- });
81
- picocolors.exports = createColors();
82
- picocolors.exports.createColors = createColors;
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 = picocolors.exports;
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.0",
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": "^26.0.1",
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": "^5.0.7",
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.19.2",
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.1",
56
- "tslib": "^2.6.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.5.2"
85
+ "typescript": "^5.6.2"
86
86
  },
87
87
  "lint-staged": {
88
88
  "*.{js,jsx,ts,tsx,md,json,yml,yaml}": "prettier --write"