goldstein 7.1.0 → 7.3.0

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 CHANGED
@@ -1,3 +1,13 @@
1
+ 2026.02.15, v7.3.0
2
+
3
+ fix:
4
+ - 5af35c8 goldstein: infinite loop
5
+
6
+ 2026.02.12, v7.2.0
7
+
8
+ feature:
9
+ - e8cb35f goldstein: import with attributes
10
+
1
11
  2026.02.12, v7.1.0
2
12
 
3
13
  feature:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goldstein",
3
- "version": "7.1.0",
3
+ "version": "7.3.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "JavaScript with no limits",
@@ -74,9 +74,7 @@ export default function keywordExportNoConst(Parser) {
74
74
  this.unexpected();
75
75
 
76
76
  node.source = this.parseExprAtom();
77
-
78
- if (this.options.ecmaVersion >= 16)
79
- node.attributes = this.parseWithClause();
77
+ node.attributes = this.parseWithClause();
80
78
  } else {
81
79
  for (let i = 0, list = node.specifiers; i < list.length; ++i) {
82
80
  // check for keywords used as local names
@@ -18,6 +18,7 @@ export default function keywordImport(Parser) {
18
18
 
19
19
  if (this.type === tokTypes.string) {
20
20
  node.source = this.parseLiteral(this.value);
21
+ node.attributes = this.parseWithClause();
21
22
  } else if (this.type === tokTypes.name) {
22
23
  const {value} = this;
23
24
 
@@ -10,7 +10,12 @@ export default function fn(Parser) {
10
10
  node.properties = [];
11
11
  this.next();
12
12
 
13
+ let i = 1;
14
+
13
15
  while (!this.eat(tt.braceR)) {
16
+ if (++i > 10_000)
17
+ break;
18
+
14
19
  if (!first) {
15
20
  this.eat(tt.comma);
16
21
  this.eat(tt.semi);