@putout/bundle 3.15.1 → 3.16.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/bundle/putout.js +59 -28
- package/bundle/putout.min.js +1 -1
- package/package.json +3 -3
package/bundle/putout.js
CHANGED
|
@@ -8582,7 +8582,7 @@ __export(lib_exports, {
|
|
|
8582
8582
|
return conditionalExpression$1;
|
|
8583
8583
|
},
|
|
8584
8584
|
ContinueStatement: function() {
|
|
8585
|
-
return continueStatement;
|
|
8585
|
+
return continueStatement$1;
|
|
8586
8586
|
},
|
|
8587
8587
|
DECLARATION_TYPES: function() {
|
|
8588
8588
|
return DECLARATION_TYPES;
|
|
@@ -10487,7 +10487,7 @@ __export(lib_exports, {
|
|
|
10487
10487
|
return conditionalExpression$1;
|
|
10488
10488
|
},
|
|
10489
10489
|
continueStatement: function() {
|
|
10490
|
-
return continueStatement;
|
|
10490
|
+
return continueStatement$1;
|
|
10491
10491
|
},
|
|
10492
10492
|
createFlowUnionType: function() {
|
|
10493
10493
|
return createFlowUnionType;
|
|
@@ -21381,7 +21381,7 @@ function conditionalExpression$1(test, consequent, alternate) {
|
|
|
21381
21381
|
alternate: alternate
|
|
21382
21382
|
});
|
|
21383
21383
|
}
|
|
21384
|
-
function continueStatement() {
|
|
21384
|
+
function continueStatement$1() {
|
|
21385
21385
|
var label = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
21386
21386
|
return validateNode({
|
|
21387
21387
|
type: "ContinueStatement",
|
|
@@ -46796,7 +46796,7 @@ function BreakStatement$1(node) {
|
|
|
46796
46796
|
this.word("break");
|
|
46797
46797
|
printStatementAfterKeyword(this, node.label, node, true);
|
|
46798
46798
|
}
|
|
46799
|
-
function ContinueStatement(node) {
|
|
46799
|
+
function ContinueStatement$1(node) {
|
|
46800
46800
|
this.word("continue");
|
|
46801
46801
|
printStatementAfterKeyword(this, node.label, node, true);
|
|
46802
46802
|
}
|
|
@@ -49097,7 +49097,7 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
|
|
|
49097
49097
|
ClassPrivateProperty: ClassPrivateProperty$1,
|
|
49098
49098
|
ClassProperty: ClassProperty$1,
|
|
49099
49099
|
ConditionalExpression: ConditionalExpression$2,
|
|
49100
|
-
ContinueStatement: ContinueStatement,
|
|
49100
|
+
ContinueStatement: ContinueStatement$1,
|
|
49101
49101
|
DebuggerStatement: DebuggerStatement$1,
|
|
49102
49102
|
DecimalLiteral: DecimalLiteral,
|
|
49103
49103
|
DeclareClass: DeclareClass,
|
|
@@ -56871,7 +56871,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
56871
56871
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
56872
56872
|
PERFORMANCE OF THIS SOFTWARE.
|
|
56873
56873
|
***************************************************************************** */
|
|
56874
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
56874
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
56875
56875
|
|
|
56876
56876
|
var extendStatics = function(d, b) {
|
|
56877
56877
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -56978,8 +56978,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
56978
56978
|
}
|
|
56979
56979
|
|
|
56980
56980
|
function __generator(thisArg, body) {
|
|
56981
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
56982
|
-
return g =
|
|
56981
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
56982
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
56983
56983
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
56984
56984
|
function step(op) {
|
|
56985
56985
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -57083,7 +57083,7 @@ function __await(v) {
|
|
|
57083
57083
|
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
57084
57084
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
57085
57085
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
57086
|
-
return i =
|
|
57086
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
57087
57087
|
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
57088
57088
|
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
57089
57089
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
@@ -57180,17 +57180,22 @@ function __disposeResources(env) {
|
|
|
57180
57180
|
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
57181
57181
|
env.hasError = true;
|
|
57182
57182
|
}
|
|
57183
|
+
var r, s = 0;
|
|
57183
57184
|
function next() {
|
|
57184
|
-
while (env.stack.
|
|
57185
|
-
var rec = env.stack.pop();
|
|
57185
|
+
while (r = env.stack.pop()) {
|
|
57186
57186
|
try {
|
|
57187
|
-
|
|
57188
|
-
if (
|
|
57187
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
57188
|
+
if (r.dispose) {
|
|
57189
|
+
var result = r.dispose.call(r.value);
|
|
57190
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
57191
|
+
}
|
|
57192
|
+
else s |= 1;
|
|
57189
57193
|
}
|
|
57190
57194
|
catch (e) {
|
|
57191
|
-
|
|
57195
|
+
fail(e);
|
|
57192
57196
|
}
|
|
57193
57197
|
}
|
|
57198
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
57194
57199
|
if (env.hasError) throw env.error;
|
|
57195
57200
|
}
|
|
57196
57201
|
return next();
|
|
@@ -82915,9 +82920,13 @@ breakStatement.BreakStatement = {
|
|
|
82915
82920
|
split(path, {print}) {
|
|
82916
82921
|
print.newline();
|
|
82917
82922
|
},
|
|
82918
|
-
print(path, {print, indent}) {
|
|
82923
|
+
print(path, {print, indent, maybe}) {
|
|
82924
|
+
const {label} = path.node;
|
|
82919
82925
|
indent();
|
|
82920
|
-
print('break
|
|
82926
|
+
print('break');
|
|
82927
|
+
maybe.print.space(label);
|
|
82928
|
+
print('__label');
|
|
82929
|
+
print(';');
|
|
82921
82930
|
},
|
|
82922
82931
|
afterSatisfy: () => [
|
|
82923
82932
|
isParentBlock,
|
|
@@ -82986,6 +82995,21 @@ program.Program = (path, printer, semantics) => {
|
|
|
82986
82995
|
write.endOfFile();
|
|
82987
82996
|
};
|
|
82988
82997
|
|
|
82998
|
+
var continueStatement = {};
|
|
82999
|
+
|
|
83000
|
+
continueStatement.ContinueStatement = (path, {indent, print, maybe, write}) => {
|
|
83001
|
+
const {label} = path.node;
|
|
83002
|
+
|
|
83003
|
+
indent();
|
|
83004
|
+
print('continue');
|
|
83005
|
+
|
|
83006
|
+
maybe.print.space(label);
|
|
83007
|
+
print('__label');
|
|
83008
|
+
|
|
83009
|
+
write(';');
|
|
83010
|
+
print.newline();
|
|
83011
|
+
};
|
|
83012
|
+
|
|
82989
83013
|
const {ExpressionStatement: ExpressionStatement$1} = expressionStatement;
|
|
82990
83014
|
const {VariableDeclaration} = variableDeclaration;
|
|
82991
83015
|
const {IfStatement} = ifStatement;
|
|
@@ -83006,6 +83030,7 @@ const {ExportDefaultDeclaration} = exportDefaultDeclaration;
|
|
|
83006
83030
|
const {BreakStatement} = breakStatement;
|
|
83007
83031
|
const {DoWhileStatement} = doWhileStatement;
|
|
83008
83032
|
const {Program} = program;
|
|
83033
|
+
const {ContinueStatement} = continueStatement;
|
|
83009
83034
|
|
|
83010
83035
|
const {
|
|
83011
83036
|
ExportNamespaceSpecifier,
|
|
@@ -83047,11 +83072,7 @@ var statements$1 = {
|
|
|
83047
83072
|
SwitchStatement,
|
|
83048
83073
|
...TryStatements,
|
|
83049
83074
|
BreakStatement,
|
|
83050
|
-
ContinueStatement
|
|
83051
|
-
indent();
|
|
83052
|
-
print('continue;');
|
|
83053
|
-
print.newline();
|
|
83054
|
-
},
|
|
83075
|
+
ContinueStatement,
|
|
83055
83076
|
WhileStatement,
|
|
83056
83077
|
};
|
|
83057
83078
|
|
|
@@ -124240,17 +124261,26 @@ const REPLACERS = [
|
|
|
124240
124261
|
[
|
|
124241
124262
|
// (a\ ) -> (a )
|
|
124242
124263
|
// (a ) -> (a)
|
|
124264
|
+
// (a ) -> (a)
|
|
124243
124265
|
// (a \ ) -> (a )
|
|
124244
|
-
|
|
124245
|
-
|
|
124246
|
-
|
|
124247
|
-
|
|
124266
|
+
/((?:\\\\)*?)(\\?\s+)$/,
|
|
124267
|
+
(_, m1, m2) => m1 + (
|
|
124268
|
+
m2.indexOf('\\') === 0
|
|
124269
|
+
? SPACE
|
|
124270
|
+
: EMPTY
|
|
124271
|
+
)
|
|
124248
124272
|
],
|
|
124249
124273
|
|
|
124250
124274
|
// replace (\ ) with ' '
|
|
124275
|
+
// (\ ) -> ' '
|
|
124276
|
+
// (\\ ) -> '\\ '
|
|
124277
|
+
// (\\\ ) -> '\\ '
|
|
124251
124278
|
[
|
|
124252
|
-
|
|
124253
|
-
() =>
|
|
124279
|
+
/(\\+?)\s/g,
|
|
124280
|
+
(_, m1) => {
|
|
124281
|
+
const {length} = m1;
|
|
124282
|
+
return m1.slice(0, length - length % 2) + SPACE
|
|
124283
|
+
}
|
|
124254
124284
|
],
|
|
124255
124285
|
|
|
124256
124286
|
// Escape metacharacters
|
|
@@ -124478,7 +124508,8 @@ const makeRegex = (pattern, ignoreCase) => {
|
|
|
124478
124508
|
|
|
124479
124509
|
if (!source) {
|
|
124480
124510
|
source = REPLACERS.reduce(
|
|
124481
|
-
(prev,
|
|
124511
|
+
(prev, [matcher, replacer]) =>
|
|
124512
|
+
prev.replace(matcher, replacer.bind(pattern)),
|
|
124482
124513
|
pattern
|
|
124483
124514
|
);
|
|
124484
124515
|
regexCache[pattern] = source;
|