mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-05-15 07:31:10 -04:00
Build for 934a4c4882
fix(deps): lock file maintenance (#3148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
parent
b74b9cf310
commit
0fd3f8df0a
2 changed files with 34 additions and 25 deletions
|
@ -29003,6 +29003,7 @@ var
|
|||
SCOPE_SUPER = 64,
|
||||
SCOPE_DIRECT_SUPER = 128,
|
||||
SCOPE_CLASS_STATIC_BLOCK = 256,
|
||||
SCOPE_CLASS_FIELD_INIT = 512,
|
||||
SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
||||
|
||||
function functionFlags(async, generator) {
|
||||
|
@ -29113,15 +29114,16 @@ Parser.prototype.parse = function parse () {
|
|||
|
||||
prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };
|
||||
|
||||
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit };
|
||||
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 };
|
||||
|
||||
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit };
|
||||
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 };
|
||||
|
||||
prototypeAccessors.canAwait.get = function () {
|
||||
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
||||
var scope = this.scopeStack[i];
|
||||
if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false }
|
||||
if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 }
|
||||
var ref = this.scopeStack[i];
|
||||
var flags = ref.flags;
|
||||
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) { return false }
|
||||
if (flags & SCOPE_FUNCTION) { return (flags & SCOPE_ASYNC) > 0 }
|
||||
}
|
||||
return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction
|
||||
};
|
||||
|
@ -29129,8 +29131,7 @@ prototypeAccessors.canAwait.get = function () {
|
|||
prototypeAccessors.allowSuper.get = function () {
|
||||
var ref = this.currentThisScope();
|
||||
var flags = ref.flags;
|
||||
var inClassFieldInit = ref.inClassFieldInit;
|
||||
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod
|
||||
return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod
|
||||
};
|
||||
|
||||
prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
|
||||
|
@ -29138,10 +29139,13 @@ prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThis
|
|||
prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
|
||||
|
||||
prototypeAccessors.allowNewDotTarget.get = function () {
|
||||
var ref = this.currentThisScope();
|
||||
var flags = ref.flags;
|
||||
var inClassFieldInit = ref.inClassFieldInit;
|
||||
return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit
|
||||
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
||||
var ref = this.scopeStack[i];
|
||||
var flags = ref.flags;
|
||||
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) ||
|
||||
((flags & SCOPE_FUNCTION) && !(flags & SCOPE_ARROW))) { return true }
|
||||
}
|
||||
return false
|
||||
};
|
||||
|
||||
prototypeAccessors.inClassStaticBlock.get = function () {
|
||||
|
@ -30068,11 +30072,9 @@ pp$8.parseClassField = function(field) {
|
|||
|
||||
if (this.eat(types$1.eq)) {
|
||||
// To raise SyntaxError if 'arguments' exists in the initializer.
|
||||
var scope = this.currentThisScope();
|
||||
var inClassFieldInit = scope.inClassFieldInit;
|
||||
scope.inClassFieldInit = true;
|
||||
this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
|
||||
field.value = this.parseMaybeAssign();
|
||||
scope.inClassFieldInit = inClassFieldInit;
|
||||
this.exitScope();
|
||||
} else {
|
||||
field.value = null;
|
||||
}
|
||||
|
@ -30214,6 +30216,8 @@ pp$8.parseExport = function(node, exports) {
|
|||
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
||||
node.specifiers = [];
|
||||
node.source = null;
|
||||
if (this.options.ecmaVersion >= 16)
|
||||
{ node.attributes = []; }
|
||||
} else { // export { x, y as z } [from '...']
|
||||
node.declaration = null;
|
||||
node.specifiers = this.parseExportSpecifiers(exports);
|
||||
|
@ -30237,6 +30241,8 @@ pp$8.parseExport = function(node, exports) {
|
|||
}
|
||||
|
||||
node.source = null;
|
||||
if (this.options.ecmaVersion >= 16)
|
||||
{ node.attributes = []; }
|
||||
}
|
||||
this.semicolon();
|
||||
}
|
||||
|
@ -31816,9 +31822,10 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|||
};
|
||||
|
||||
pp$5.parseGetterSetter = function(prop) {
|
||||
prop.kind = prop.key.name;
|
||||
var kind = prop.key.name;
|
||||
this.parsePropertyName(prop);
|
||||
prop.value = this.parseMethod(false);
|
||||
prop.kind = kind;
|
||||
var paramCount = prop.kind === "get" ? 0 : 1;
|
||||
if (prop.value.params.length !== paramCount) {
|
||||
var start = prop.value.start;
|
||||
|
@ -31841,9 +31848,9 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|||
prop.kind = "init";
|
||||
} else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
|
||||
if (isPattern) { this.unexpected(); }
|
||||
prop.kind = "init";
|
||||
prop.method = true;
|
||||
prop.value = this.parseMethod(isGenerator, isAsync);
|
||||
prop.kind = "init";
|
||||
} else if (!isPattern && !containsEsc &&
|
||||
this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
|
||||
(prop.key.name === "get" || prop.key.name === "set") &&
|
||||
|
@ -31855,7 +31862,6 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|||
this.checkUnreserved(prop.key);
|
||||
if (prop.key.name === "await" && !this.awaitIdentPos)
|
||||
{ this.awaitIdentPos = startPos; }
|
||||
prop.kind = "init";
|
||||
if (isPattern) {
|
||||
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
|
||||
} else if (this.type === types$1.eq && refDestructuringErrors) {
|
||||
|
@ -31865,6 +31871,7 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|||
} else {
|
||||
prop.value = this.copyNode(prop.key);
|
||||
}
|
||||
prop.kind = "init";
|
||||
prop.shorthand = true;
|
||||
} else { this.unexpected(); }
|
||||
};
|
||||
|
@ -32040,7 +32047,7 @@ pp$5.checkUnreserved = function(ref) {
|
|||
{ this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
|
||||
if (this.inAsync && name === "await")
|
||||
{ this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
|
||||
if (this.currentThisScope().inClassFieldInit && name === "arguments")
|
||||
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments")
|
||||
{ this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); }
|
||||
if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
|
||||
{ this.raise(start, ("Cannot use " + name + " in class static initialization block")); }
|
||||
|
@ -32153,6 +32160,9 @@ var pp$4 = Parser.prototype;
|
|||
pp$4.raise = function(pos, message) {
|
||||
var loc = getLineInfo(this.input, pos);
|
||||
message += " (" + loc.line + ":" + loc.column + ")";
|
||||
if (this.sourceFile) {
|
||||
message += " in " + this.sourceFile;
|
||||
}
|
||||
var err = new SyntaxError(message);
|
||||
err.pos = pos; err.loc = loc; err.raisedAt = this.pos;
|
||||
throw err
|
||||
|
@ -32176,8 +32186,6 @@ var Scope = function Scope(flags) {
|
|||
this.lexical = [];
|
||||
// A list of lexically-declared FunctionDeclaration names in the current lexical scope
|
||||
this.functions = [];
|
||||
// A switch to disallow the identifier reference 'arguments'
|
||||
this.inClassFieldInit = false;
|
||||
};
|
||||
|
||||
// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
|
||||
|
@ -32247,7 +32255,7 @@ pp$3.currentScope = function() {
|
|||
pp$3.currentVarScope = function() {
|
||||
for (var i = this.scopeStack.length - 1;; i--) {
|
||||
var scope = this.scopeStack[i];
|
||||
if (scope.flags & SCOPE_VAR) { return scope }
|
||||
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) { return scope }
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -32255,7 +32263,8 @@ pp$3.currentVarScope = function() {
|
|||
pp$3.currentThisScope = function() {
|
||||
for (var i = this.scopeStack.length - 1;; i--) {
|
||||
var scope = this.scopeStack[i];
|
||||
if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope }
|
||||
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) &&
|
||||
!(scope.flags & SCOPE_ARROW)) { return scope }
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -34609,7 +34618,7 @@ pp.readWord = function() {
|
|||
// [walk]: util/walk.js
|
||||
|
||||
|
||||
var version = "8.14.0";
|
||||
var version = "8.14.1";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue