scratch-paint 3.0.166 → 3.0.168
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/CHANGELOG.md +14 -0
- package/dist/scratch-paint.js +33 -24
- package/dist/scratch-paint.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.168](https://github.com/scratchfoundation/scratch-paint/compare/v3.0.167...v3.0.168) (2025-03-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **deps:** update dependency scratch-l10n to v5.0.154 ([#3149](https://github.com/scratchfoundation/scratch-paint/issues/3149)) ([2a4e82e](https://github.com/scratchfoundation/scratch-paint/commit/2a4e82ef4951267a27bdc74fd54627cd7388fadf))
|
|
12
|
+
|
|
13
|
+
## [3.0.167](https://github.com/scratchfoundation/scratch-paint/compare/v3.0.166...v3.0.167) (2025-03-09)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **deps:** lock file maintenance ([#3148](https://github.com/scratchfoundation/scratch-paint/issues/3148)) ([934a4c4](https://github.com/scratchfoundation/scratch-paint/commit/934a4c4882651a4f23cacf6300558081b0617cd8))
|
|
19
|
+
|
|
6
20
|
## [3.0.166](https://github.com/scratchfoundation/scratch-paint/compare/v3.0.165...v3.0.166) (2025-03-07)
|
|
7
21
|
|
|
8
22
|
|
package/dist/scratch-paint.js
CHANGED
|
@@ -22725,6 +22725,7 @@ var
|
|
|
22725
22725
|
SCOPE_SUPER = 64,
|
|
22726
22726
|
SCOPE_DIRECT_SUPER = 128,
|
|
22727
22727
|
SCOPE_CLASS_STATIC_BLOCK = 256,
|
|
22728
|
+
SCOPE_CLASS_FIELD_INIT = 512,
|
|
22728
22729
|
SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
22729
22730
|
|
|
22730
22731
|
function functionFlags(async, generator) {
|
|
@@ -22835,15 +22836,16 @@ Parser.prototype.parse = function parse () {
|
|
|
22835
22836
|
|
|
22836
22837
|
prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };
|
|
22837
22838
|
|
|
22838
|
-
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0
|
|
22839
|
+
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 };
|
|
22839
22840
|
|
|
22840
|
-
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0
|
|
22841
|
+
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 };
|
|
22841
22842
|
|
|
22842
22843
|
prototypeAccessors.canAwait.get = function () {
|
|
22843
22844
|
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
|
22844
|
-
var
|
|
22845
|
-
|
|
22846
|
-
if (
|
|
22845
|
+
var ref = this.scopeStack[i];
|
|
22846
|
+
var flags = ref.flags;
|
|
22847
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) { return false }
|
|
22848
|
+
if (flags & SCOPE_FUNCTION) { return (flags & SCOPE_ASYNC) > 0 }
|
|
22847
22849
|
}
|
|
22848
22850
|
return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction
|
|
22849
22851
|
};
|
|
@@ -22851,8 +22853,7 @@ prototypeAccessors.canAwait.get = function () {
|
|
|
22851
22853
|
prototypeAccessors.allowSuper.get = function () {
|
|
22852
22854
|
var ref = this.currentThisScope();
|
|
22853
22855
|
var flags = ref.flags;
|
|
22854
|
-
|
|
22855
|
-
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod
|
|
22856
|
+
return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod
|
|
22856
22857
|
};
|
|
22857
22858
|
|
|
22858
22859
|
prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
|
|
@@ -22860,10 +22861,13 @@ prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThis
|
|
|
22860
22861
|
prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
|
|
22861
22862
|
|
|
22862
22863
|
prototypeAccessors.allowNewDotTarget.get = function () {
|
|
22863
|
-
var
|
|
22864
|
-
var
|
|
22865
|
-
|
|
22866
|
-
|
|
22864
|
+
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
|
22865
|
+
var ref = this.scopeStack[i];
|
|
22866
|
+
var flags = ref.flags;
|
|
22867
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) ||
|
|
22868
|
+
((flags & SCOPE_FUNCTION) && !(flags & SCOPE_ARROW))) { return true }
|
|
22869
|
+
}
|
|
22870
|
+
return false
|
|
22867
22871
|
};
|
|
22868
22872
|
|
|
22869
22873
|
prototypeAccessors.inClassStaticBlock.get = function () {
|
|
@@ -23790,11 +23794,9 @@ pp$8.parseClassField = function(field) {
|
|
|
23790
23794
|
|
|
23791
23795
|
if (this.eat(types$1.eq)) {
|
|
23792
23796
|
// To raise SyntaxError if 'arguments' exists in the initializer.
|
|
23793
|
-
|
|
23794
|
-
var inClassFieldInit = scope.inClassFieldInit;
|
|
23795
|
-
scope.inClassFieldInit = true;
|
|
23797
|
+
this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
|
|
23796
23798
|
field.value = this.parseMaybeAssign();
|
|
23797
|
-
|
|
23799
|
+
this.exitScope();
|
|
23798
23800
|
} else {
|
|
23799
23801
|
field.value = null;
|
|
23800
23802
|
}
|
|
@@ -23936,6 +23938,8 @@ pp$8.parseExport = function(node, exports) {
|
|
|
23936
23938
|
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
|
23937
23939
|
node.specifiers = [];
|
|
23938
23940
|
node.source = null;
|
|
23941
|
+
if (this.options.ecmaVersion >= 16)
|
|
23942
|
+
{ node.attributes = []; }
|
|
23939
23943
|
} else { // export { x, y as z } [from '...']
|
|
23940
23944
|
node.declaration = null;
|
|
23941
23945
|
node.specifiers = this.parseExportSpecifiers(exports);
|
|
@@ -23959,6 +23963,8 @@ pp$8.parseExport = function(node, exports) {
|
|
|
23959
23963
|
}
|
|
23960
23964
|
|
|
23961
23965
|
node.source = null;
|
|
23966
|
+
if (this.options.ecmaVersion >= 16)
|
|
23967
|
+
{ node.attributes = []; }
|
|
23962
23968
|
}
|
|
23963
23969
|
this.semicolon();
|
|
23964
23970
|
}
|
|
@@ -25538,9 +25544,10 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
|
25538
25544
|
};
|
|
25539
25545
|
|
|
25540
25546
|
pp$5.parseGetterSetter = function(prop) {
|
|
25541
|
-
|
|
25547
|
+
var kind = prop.key.name;
|
|
25542
25548
|
this.parsePropertyName(prop);
|
|
25543
25549
|
prop.value = this.parseMethod(false);
|
|
25550
|
+
prop.kind = kind;
|
|
25544
25551
|
var paramCount = prop.kind === "get" ? 0 : 1;
|
|
25545
25552
|
if (prop.value.params.length !== paramCount) {
|
|
25546
25553
|
var start = prop.value.start;
|
|
@@ -25563,9 +25570,9 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
25563
25570
|
prop.kind = "init";
|
|
25564
25571
|
} else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
|
|
25565
25572
|
if (isPattern) { this.unexpected(); }
|
|
25566
|
-
prop.kind = "init";
|
|
25567
25573
|
prop.method = true;
|
|
25568
25574
|
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
25575
|
+
prop.kind = "init";
|
|
25569
25576
|
} else if (!isPattern && !containsEsc &&
|
|
25570
25577
|
this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
|
|
25571
25578
|
(prop.key.name === "get" || prop.key.name === "set") &&
|
|
@@ -25577,7 +25584,6 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
25577
25584
|
this.checkUnreserved(prop.key);
|
|
25578
25585
|
if (prop.key.name === "await" && !this.awaitIdentPos)
|
|
25579
25586
|
{ this.awaitIdentPos = startPos; }
|
|
25580
|
-
prop.kind = "init";
|
|
25581
25587
|
if (isPattern) {
|
|
25582
25588
|
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
|
|
25583
25589
|
} else if (this.type === types$1.eq && refDestructuringErrors) {
|
|
@@ -25587,6 +25593,7 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
25587
25593
|
} else {
|
|
25588
25594
|
prop.value = this.copyNode(prop.key);
|
|
25589
25595
|
}
|
|
25596
|
+
prop.kind = "init";
|
|
25590
25597
|
prop.shorthand = true;
|
|
25591
25598
|
} else { this.unexpected(); }
|
|
25592
25599
|
};
|
|
@@ -25762,7 +25769,7 @@ pp$5.checkUnreserved = function(ref) {
|
|
|
25762
25769
|
{ this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
|
|
25763
25770
|
if (this.inAsync && name === "await")
|
|
25764
25771
|
{ this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
|
|
25765
|
-
if (this.currentThisScope().
|
|
25772
|
+
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments")
|
|
25766
25773
|
{ this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); }
|
|
25767
25774
|
if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
|
|
25768
25775
|
{ this.raise(start, ("Cannot use " + name + " in class static initialization block")); }
|
|
@@ -25875,6 +25882,9 @@ var pp$4 = Parser.prototype;
|
|
|
25875
25882
|
pp$4.raise = function(pos, message) {
|
|
25876
25883
|
var loc = getLineInfo(this.input, pos);
|
|
25877
25884
|
message += " (" + loc.line + ":" + loc.column + ")";
|
|
25885
|
+
if (this.sourceFile) {
|
|
25886
|
+
message += " in " + this.sourceFile;
|
|
25887
|
+
}
|
|
25878
25888
|
var err = new SyntaxError(message);
|
|
25879
25889
|
err.pos = pos; err.loc = loc; err.raisedAt = this.pos;
|
|
25880
25890
|
throw err
|
|
@@ -25898,8 +25908,6 @@ var Scope = function Scope(flags) {
|
|
|
25898
25908
|
this.lexical = [];
|
|
25899
25909
|
// A list of lexically-declared FunctionDeclaration names in the current lexical scope
|
|
25900
25910
|
this.functions = [];
|
|
25901
|
-
// A switch to disallow the identifier reference 'arguments'
|
|
25902
|
-
this.inClassFieldInit = false;
|
|
25903
25911
|
};
|
|
25904
25912
|
|
|
25905
25913
|
// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
|
|
@@ -25969,7 +25977,7 @@ pp$3.currentScope = function() {
|
|
|
25969
25977
|
pp$3.currentVarScope = function() {
|
|
25970
25978
|
for (var i = this.scopeStack.length - 1;; i--) {
|
|
25971
25979
|
var scope = this.scopeStack[i];
|
|
25972
|
-
if (scope.flags & SCOPE_VAR) { return scope }
|
|
25980
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) { return scope }
|
|
25973
25981
|
}
|
|
25974
25982
|
};
|
|
25975
25983
|
|
|
@@ -25977,7 +25985,8 @@ pp$3.currentVarScope = function() {
|
|
|
25977
25985
|
pp$3.currentThisScope = function() {
|
|
25978
25986
|
for (var i = this.scopeStack.length - 1;; i--) {
|
|
25979
25987
|
var scope = this.scopeStack[i];
|
|
25980
|
-
if (scope.flags & SCOPE_VAR
|
|
25988
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) &&
|
|
25989
|
+
!(scope.flags & SCOPE_ARROW)) { return scope }
|
|
25981
25990
|
}
|
|
25982
25991
|
};
|
|
25983
25992
|
|
|
@@ -28331,7 +28340,7 @@ pp.readWord = function() {
|
|
|
28331
28340
|
// [walk]: util/walk.js
|
|
28332
28341
|
|
|
28333
28342
|
|
|
28334
|
-
var version = "8.14.
|
|
28343
|
+
var version = "8.14.1";
|
|
28335
28344
|
|
|
28336
28345
|
Parser.acorn = {
|
|
28337
28346
|
Parser: Parser,
|