@putout/babel 4.5.0 → 4.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 +0 -165
- package/package.json +1 -1
package/bundle/index.js
CHANGED
|
@@ -640,9 +640,6 @@ var require_js_tokens_BABEL_8_BREAKING_true = __commonJS({
|
|
|
640
640
|
});
|
|
641
641
|
|
|
642
642
|
// ../babel-babel/node_modules/js-tokens-BABEL_8_BREAKING-false/index.js
|
|
643
|
-
var require_js_tokens_BABEL_8_BREAKING_false = () => {};
|
|
644
|
-
|
|
645
|
-
// ../babel-babel/node_modules/js-tokens/index.js
|
|
646
643
|
var require_js_tokens = __commonJS({
|
|
647
644
|
'../babel-babel/node_modules/js-tokens/index.js'(exports2, module2) {
|
|
648
645
|
function bool2(value) {
|
|
@@ -1034,168 +1031,6 @@ var require_has_flag = __commonJS({
|
|
|
1034
1031
|
});
|
|
1035
1032
|
|
|
1036
1033
|
// ../babel-babel/node_modules/supports-color/index.js
|
|
1037
|
-
var require_supports_color = __commonJS({
|
|
1038
|
-
'../babel-babel/node_modules/supports-color/index.js'(exports2, module2) {
|
|
1039
|
-
"use strict";
|
|
1040
|
-
|
|
1041
|
-
var os = require('os');
|
|
1042
|
-
var tty = require('tty');
|
|
1043
|
-
var hasFlag = require_has_flag();
|
|
1044
|
-
var {env} = process;
|
|
1045
|
-
var flagForceColor;
|
|
1046
|
-
|
|
1047
|
-
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) {
|
|
1048
|
-
flagForceColor = 0;
|
|
1049
|
-
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
1050
|
-
flagForceColor = 1;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
function envForceColor() {
|
|
1054
|
-
if ('FORCE_COLOR' in env) {
|
|
1055
|
-
if (env.FORCE_COLOR === 'true') {
|
|
1056
|
-
return 1;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
if (env.FORCE_COLOR === 'false') {
|
|
1060
|
-
return 0;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
function translateLevel(level) {
|
|
1068
|
-
if (level === 0) {
|
|
1069
|
-
return false;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
return {
|
|
1073
|
-
level,
|
|
1074
|
-
hasBasic: true,
|
|
1075
|
-
has256: level >= 2,
|
|
1076
|
-
has16m: level >= 3,
|
|
1077
|
-
};
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
function supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
|
1081
|
-
const noFlagForceColor = envForceColor();
|
|
1082
|
-
|
|
1083
|
-
if (noFlagForceColor !== void 0) {
|
|
1084
|
-
flagForceColor = noFlagForceColor;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
1088
|
-
|
|
1089
|
-
if (forceColor === 0) {
|
|
1090
|
-
return 0;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
if (sniffFlags) {
|
|
1094
|
-
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
1095
|
-
return 3;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
if (hasFlag('color=256')) {
|
|
1099
|
-
return 2;
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
1104
|
-
return 0;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
const min = forceColor || 0;
|
|
1108
|
-
|
|
1109
|
-
if (env.TERM === 'dumb') {
|
|
1110
|
-
return min;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
if (process.platform === 'win32') {
|
|
1114
|
-
const osRelease = os
|
|
1115
|
-
.release()
|
|
1116
|
-
.split('.');
|
|
1117
|
-
|
|
1118
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1119
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
return 1;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
if ('CI' in env) {
|
|
1126
|
-
if ([
|
|
1127
|
-
'TRAVIS',
|
|
1128
|
-
'CIRCLECI',
|
|
1129
|
-
'APPVEYOR',
|
|
1130
|
-
'GITLAB_CI',
|
|
1131
|
-
'GITHUB_ACTIONS',
|
|
1132
|
-
'BUILDKITE',
|
|
1133
|
-
'DRONE',
|
|
1134
|
-
].some((sign) => sign in env) || env.CI_NAME === 'codeship') {
|
|
1135
|
-
return 1;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
return min;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
if ('TEAMCITY_VERSION' in env) {
|
|
1142
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
if (env.COLORTERM === 'truecolor') {
|
|
1146
|
-
return 3;
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
if ('TERM_PROGRAM' in env) {
|
|
1150
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '')
|
|
1151
|
-
.split('.')[0], 10);
|
|
1152
|
-
|
|
1153
|
-
switch(env.TERM_PROGRAM) {
|
|
1154
|
-
case 'iTerm.app':
|
|
1155
|
-
return version >= 3 ? 3 : 2;
|
|
1156
|
-
|
|
1157
|
-
case 'Apple_Terminal':
|
|
1158
|
-
return 2;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
1163
|
-
return 2;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
1167
|
-
return 1;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
if ('COLORTERM' in env) {
|
|
1171
|
-
return 1;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
return min;
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
function getSupportLevel(stream, options = {}) {
|
|
1178
|
-
const level = supportsColor(stream, {
|
|
1179
|
-
streamIsTTY: stream && stream.isTTY,
|
|
1180
|
-
...options,
|
|
1181
|
-
});
|
|
1182
|
-
|
|
1183
|
-
return translateLevel(level);
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
module2.exports = {
|
|
1187
|
-
supportsColor: getSupportLevel,
|
|
1188
|
-
stdout: getSupportLevel({
|
|
1189
|
-
isTTY: tty.isatty(1),
|
|
1190
|
-
}),
|
|
1191
|
-
stderr: getSupportLevel({
|
|
1192
|
-
isTTY: tty.isatty(2),
|
|
1193
|
-
}),
|
|
1194
|
-
};
|
|
1195
|
-
},
|
|
1196
|
-
});
|
|
1197
|
-
|
|
1198
|
-
// ../babel-babel/node_modules/debug/src/node.js
|
|
1199
1034
|
var require_node = () => () => ({
|
|
1200
1035
|
enabled: false,
|
|
1201
1036
|
});
|