@putout/babel 1.5.0 → 1.5.2
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/bundle/index.js +28 -22
- package/package.json +1 -1
- package/bundle/index.cjs +0 -42444
- package/bundle/index.d.cts +0 -5451
package/bundle/index.js
CHANGED
|
@@ -1184,12 +1184,11 @@ var require_browser = __commonJS({
|
|
|
1184
1184
|
var require_has_flag = __commonJS({
|
|
1185
1185
|
"node_modules/has-flag/index.js"(exports, module2) {
|
|
1186
1186
|
"use strict";
|
|
1187
|
-
module2.exports = (flag, argv) => {
|
|
1188
|
-
argv = argv || process.argv;
|
|
1187
|
+
module2.exports = (flag, argv = process.argv) => {
|
|
1189
1188
|
const prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
1190
|
-
const
|
|
1191
|
-
const
|
|
1192
|
-
return
|
|
1189
|
+
const position = argv.indexOf(prefix2 + flag);
|
|
1190
|
+
const terminatorPosition = argv.indexOf("--");
|
|
1191
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
1193
1192
|
};
|
|
1194
1193
|
}
|
|
1195
1194
|
});
|
|
@@ -1199,16 +1198,23 @@ var require_supports_color = __commonJS({
|
|
|
1199
1198
|
"node_modules/supports-color/index.js"(exports, module2) {
|
|
1200
1199
|
"use strict";
|
|
1201
1200
|
var os3 = require("os");
|
|
1201
|
+
var tty3 = require("tty");
|
|
1202
1202
|
var hasFlag3 = require_has_flag();
|
|
1203
|
-
var env3 = process
|
|
1203
|
+
var { env: env3 } = process;
|
|
1204
1204
|
var forceColor;
|
|
1205
|
-
if (hasFlag3("no-color") || hasFlag3("no-colors") || hasFlag3("color=false")) {
|
|
1206
|
-
forceColor =
|
|
1205
|
+
if (hasFlag3("no-color") || hasFlag3("no-colors") || hasFlag3("color=false") || hasFlag3("color=never")) {
|
|
1206
|
+
forceColor = 0;
|
|
1207
1207
|
} else if (hasFlag3("color") || hasFlag3("colors") || hasFlag3("color=true") || hasFlag3("color=always")) {
|
|
1208
|
-
forceColor =
|
|
1208
|
+
forceColor = 1;
|
|
1209
1209
|
}
|
|
1210
1210
|
if ("FORCE_COLOR" in env3) {
|
|
1211
|
-
|
|
1211
|
+
if (env3.FORCE_COLOR === "true") {
|
|
1212
|
+
forceColor = 1;
|
|
1213
|
+
} else if (env3.FORCE_COLOR === "false") {
|
|
1214
|
+
forceColor = 0;
|
|
1215
|
+
} else {
|
|
1216
|
+
forceColor = env3.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env3.FORCE_COLOR, 10), 3);
|
|
1217
|
+
}
|
|
1212
1218
|
}
|
|
1213
1219
|
function translateLevel3(level) {
|
|
1214
1220
|
if (level === 0) {
|
|
@@ -1221,8 +1227,8 @@ var require_supports_color = __commonJS({
|
|
|
1221
1227
|
has16m: level >= 3
|
|
1222
1228
|
};
|
|
1223
1229
|
}
|
|
1224
|
-
function supportsColor3(
|
|
1225
|
-
if (forceColor ===
|
|
1230
|
+
function supportsColor3(haveStream, streamIsTTY) {
|
|
1231
|
+
if (forceColor === 0) {
|
|
1226
1232
|
return 0;
|
|
1227
1233
|
}
|
|
1228
1234
|
if (hasFlag3("color=16m") || hasFlag3("color=full") || hasFlag3("color=truecolor")) {
|
|
@@ -1231,19 +1237,22 @@ var require_supports_color = __commonJS({
|
|
|
1231
1237
|
if (hasFlag3("color=256")) {
|
|
1232
1238
|
return 2;
|
|
1233
1239
|
}
|
|
1234
|
-
if (
|
|
1240
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
1235
1241
|
return 0;
|
|
1236
1242
|
}
|
|
1237
|
-
const min = forceColor
|
|
1243
|
+
const min = forceColor || 0;
|
|
1244
|
+
if (env3.TERM === "dumb") {
|
|
1245
|
+
return min;
|
|
1246
|
+
}
|
|
1238
1247
|
if (process.platform === "win32") {
|
|
1239
1248
|
const osRelease = os3.release().split(".");
|
|
1240
|
-
if (Number(
|
|
1249
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1241
1250
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1242
1251
|
}
|
|
1243
1252
|
return 1;
|
|
1244
1253
|
}
|
|
1245
1254
|
if ("CI" in env3) {
|
|
1246
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
|
|
1255
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
|
|
1247
1256
|
return 1;
|
|
1248
1257
|
}
|
|
1249
1258
|
return min;
|
|
@@ -1272,19 +1281,16 @@ var require_supports_color = __commonJS({
|
|
|
1272
1281
|
if ("COLORTERM" in env3) {
|
|
1273
1282
|
return 1;
|
|
1274
1283
|
}
|
|
1275
|
-
if (env3.TERM === "dumb") {
|
|
1276
|
-
return min;
|
|
1277
|
-
}
|
|
1278
1284
|
return min;
|
|
1279
1285
|
}
|
|
1280
1286
|
function getSupportLevel(stream) {
|
|
1281
|
-
const level = supportsColor3(stream);
|
|
1287
|
+
const level = supportsColor3(stream, stream && stream.isTTY);
|
|
1282
1288
|
return translateLevel3(level);
|
|
1283
1289
|
}
|
|
1284
1290
|
module2.exports = {
|
|
1285
1291
|
supportsColor: getSupportLevel,
|
|
1286
|
-
stdout:
|
|
1287
|
-
stderr:
|
|
1292
|
+
stdout: translateLevel3(supportsColor3(true, tty3.isatty(1))),
|
|
1293
|
+
stderr: translateLevel3(supportsColor3(true, tty3.isatty(2)))
|
|
1288
1294
|
};
|
|
1289
1295
|
}
|
|
1290
1296
|
});
|