@highstate/cli 0.7.0 → 0.7.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/dist/main.js +45 -39
- package/package.json +3 -3
package/dist/main.js
CHANGED
@@ -1428,7 +1428,7 @@ class VersionCommand extends Command {
|
|
1428
1428
|
}
|
1429
1429
|
VersionCommand.paths = [[`-v`], [`--version`]];
|
1430
1430
|
|
1431
|
-
var version$2 = "0.
|
1431
|
+
var version$2 = "0.7.0";
|
1432
1432
|
|
1433
1433
|
const _DRIVE_LETTER_START_RE$1 = /^[A-Za-z]:\//;
|
1434
1434
|
function normalizeWindowsPath$1(input = "") {
|
@@ -1438,7 +1438,7 @@ function normalizeWindowsPath$1(input = "") {
|
|
1438
1438
|
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE$1, (r) => r.toUpperCase());
|
1439
1439
|
}
|
1440
1440
|
const _UNC_REGEX$1 = /^[/\\]{2}/;
|
1441
|
-
const _IS_ABSOLUTE_RE$
|
1441
|
+
const _IS_ABSOLUTE_RE$1 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
1442
1442
|
const _DRIVE_LETTER_RE$1 = /^[A-Za-z]:$/;
|
1443
1443
|
const normalize$1 = function(path) {
|
1444
1444
|
if (path.length === 0) {
|
@@ -1446,7 +1446,7 @@ const normalize$1 = function(path) {
|
|
1446
1446
|
}
|
1447
1447
|
path = normalizeWindowsPath$1(path);
|
1448
1448
|
const isUNCPath = path.match(_UNC_REGEX$1);
|
1449
|
-
const isPathAbsolute = isAbsolute$
|
1449
|
+
const isPathAbsolute = isAbsolute$1(path);
|
1450
1450
|
const trailingSeparator = path[path.length - 1] === "/";
|
1451
1451
|
path = normalizeString$1(path, !isPathAbsolute);
|
1452
1452
|
if (path.length === 0) {
|
@@ -1467,7 +1467,7 @@ const normalize$1 = function(path) {
|
|
1467
1467
|
}
|
1468
1468
|
return `//${path}`;
|
1469
1469
|
}
|
1470
|
-
return isPathAbsolute && !isAbsolute$
|
1470
|
+
return isPathAbsolute && !isAbsolute$1(path) ? `/${path}` : path;
|
1471
1471
|
};
|
1472
1472
|
const join$1 = function(...segments) {
|
1473
1473
|
let path = "";
|
@@ -1506,10 +1506,10 @@ const resolve$1 = function(...arguments_) {
|
|
1506
1506
|
continue;
|
1507
1507
|
}
|
1508
1508
|
resolvedPath = `${path}/${resolvedPath}`;
|
1509
|
-
resolvedAbsolute = isAbsolute$
|
1509
|
+
resolvedAbsolute = isAbsolute$1(path);
|
1510
1510
|
}
|
1511
1511
|
resolvedPath = normalizeString$1(resolvedPath, !resolvedAbsolute);
|
1512
|
-
if (resolvedAbsolute && !isAbsolute$
|
1512
|
+
if (resolvedAbsolute && !isAbsolute$1(resolvedPath)) {
|
1513
1513
|
return `/${resolvedPath}`;
|
1514
1514
|
}
|
1515
1515
|
return resolvedPath.length > 0 ? resolvedPath : ".";
|
@@ -1574,8 +1574,8 @@ function normalizeString$1(path, allowAboveRoot) {
|
|
1574
1574
|
}
|
1575
1575
|
return res;
|
1576
1576
|
}
|
1577
|
-
const isAbsolute$
|
1578
|
-
return _IS_ABSOLUTE_RE$
|
1577
|
+
const isAbsolute$1 = function(p) {
|
1578
|
+
return _IS_ABSOLUTE_RE$1.test(p);
|
1579
1579
|
};
|
1580
1580
|
|
1581
1581
|
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
@@ -1987,7 +1987,7 @@ function pushComment(options, array) {
|
|
1987
1987
|
array.push(comment);
|
1988
1988
|
};
|
1989
1989
|
}
|
1990
|
-
var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
1990
|
+
var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, 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;
|
1991
1991
|
function functionFlags(async, generator) {
|
1992
1992
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
1993
1993
|
}
|
@@ -2050,19 +2050,20 @@ prototypeAccessors.inFunction.get = function() {
|
|
2050
2050
|
return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
|
2051
2051
|
};
|
2052
2052
|
prototypeAccessors.inGenerator.get = function() {
|
2053
|
-
return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0
|
2053
|
+
return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
|
2054
2054
|
};
|
2055
2055
|
prototypeAccessors.inAsync.get = function() {
|
2056
|
-
return (this.currentVarScope().flags & SCOPE_ASYNC) > 0
|
2056
|
+
return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
|
2057
2057
|
};
|
2058
2058
|
prototypeAccessors.canAwait.get = function() {
|
2059
2059
|
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
2060
|
-
var
|
2061
|
-
|
2060
|
+
var ref2 = this.scopeStack[i];
|
2061
|
+
var flags = ref2.flags;
|
2062
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) {
|
2062
2063
|
return false;
|
2063
2064
|
}
|
2064
|
-
if (
|
2065
|
-
return (
|
2065
|
+
if (flags & SCOPE_FUNCTION) {
|
2066
|
+
return (flags & SCOPE_ASYNC) > 0;
|
2066
2067
|
}
|
2067
2068
|
}
|
2068
2069
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
@@ -2070,8 +2071,7 @@ prototypeAccessors.canAwait.get = function() {
|
|
2070
2071
|
prototypeAccessors.allowSuper.get = function() {
|
2071
2072
|
var ref2 = this.currentThisScope();
|
2072
2073
|
var flags = ref2.flags;
|
2073
|
-
|
2074
|
-
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
|
2074
|
+
return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
|
2075
2075
|
};
|
2076
2076
|
prototypeAccessors.allowDirectSuper.get = function() {
|
2077
2077
|
return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
|
@@ -2080,10 +2080,14 @@ prototypeAccessors.treatFunctionsAsVar.get = function() {
|
|
2080
2080
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
2081
2081
|
};
|
2082
2082
|
prototypeAccessors.allowNewDotTarget.get = function() {
|
2083
|
-
var
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2083
|
+
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
2084
|
+
var ref2 = this.scopeStack[i];
|
2085
|
+
var flags = ref2.flags;
|
2086
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) || flags & SCOPE_FUNCTION && !(flags & SCOPE_ARROW)) {
|
2087
|
+
return true;
|
2088
|
+
}
|
2089
|
+
}
|
2090
|
+
return false;
|
2087
2091
|
};
|
2088
2092
|
prototypeAccessors.inClassStaticBlock.get = function() {
|
2089
2093
|
return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
|
@@ -2923,11 +2927,9 @@ pp$8.parseClassField = function(field) {
|
|
2923
2927
|
this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
|
2924
2928
|
}
|
2925
2929
|
if (this.eat(types$1.eq)) {
|
2926
|
-
|
2927
|
-
var inClassFieldInit = scope.inClassFieldInit;
|
2928
|
-
scope.inClassFieldInit = true;
|
2930
|
+
this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
|
2929
2931
|
field.value = this.parseMaybeAssign();
|
2930
|
-
|
2932
|
+
this.exitScope();
|
2931
2933
|
} else {
|
2932
2934
|
field.value = null;
|
2933
2935
|
}
|
@@ -3050,6 +3052,9 @@ pp$8.parseExport = function(node, exports) {
|
|
3050
3052
|
}
|
3051
3053
|
node.specifiers = [];
|
3052
3054
|
node.source = null;
|
3055
|
+
if (this.options.ecmaVersion >= 16) {
|
3056
|
+
node.attributes = [];
|
3057
|
+
}
|
3053
3058
|
} else {
|
3054
3059
|
node.declaration = null;
|
3055
3060
|
node.specifiers = this.parseExportSpecifiers(exports);
|
@@ -3071,6 +3076,9 @@ pp$8.parseExport = function(node, exports) {
|
|
3071
3076
|
}
|
3072
3077
|
}
|
3073
3078
|
node.source = null;
|
3079
|
+
if (this.options.ecmaVersion >= 16) {
|
3080
|
+
node.attributes = [];
|
3081
|
+
}
|
3074
3082
|
}
|
3075
3083
|
this.semicolon();
|
3076
3084
|
}
|
@@ -4430,9 +4438,10 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
4430
4438
|
return this.finishNode(prop, "Property");
|
4431
4439
|
};
|
4432
4440
|
pp$5.parseGetterSetter = function(prop) {
|
4433
|
-
|
4441
|
+
var kind = prop.key.name;
|
4434
4442
|
this.parsePropertyName(prop);
|
4435
4443
|
prop.value = this.parseMethod(false);
|
4444
|
+
prop.kind = kind;
|
4436
4445
|
var paramCount = prop.kind === "get" ? 0 : 1;
|
4437
4446
|
if (prop.value.params.length !== paramCount) {
|
4438
4447
|
var start = prop.value.start;
|
@@ -4458,9 +4467,9 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
4458
4467
|
if (isPattern) {
|
4459
4468
|
this.unexpected();
|
4460
4469
|
}
|
4461
|
-
prop.kind = "init";
|
4462
4470
|
prop.method = true;
|
4463
4471
|
prop.value = this.parseMethod(isGenerator, isAsync);
|
4472
|
+
prop.kind = "init";
|
4464
4473
|
} else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
|
4465
4474
|
if (isGenerator || isAsync) {
|
4466
4475
|
this.unexpected();
|
@@ -4474,7 +4483,6 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
4474
4483
|
if (prop.key.name === "await" && !this.awaitIdentPos) {
|
4475
4484
|
this.awaitIdentPos = startPos;
|
4476
4485
|
}
|
4477
|
-
prop.kind = "init";
|
4478
4486
|
if (isPattern) {
|
4479
4487
|
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
|
4480
4488
|
} else if (this.type === types$1.eq && refDestructuringErrors) {
|
@@ -4485,6 +4493,7 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
4485
4493
|
} else {
|
4486
4494
|
prop.value = this.copyNode(prop.key);
|
4487
4495
|
}
|
4496
|
+
prop.kind = "init";
|
4488
4497
|
prop.shorthand = true;
|
4489
4498
|
} else {
|
4490
4499
|
this.unexpected();
|
@@ -4634,7 +4643,7 @@ pp$5.checkUnreserved = function(ref2) {
|
|
4634
4643
|
if (this.inAsync && name === "await") {
|
4635
4644
|
this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function");
|
4636
4645
|
}
|
4637
|
-
if (this.currentThisScope().
|
4646
|
+
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments") {
|
4638
4647
|
this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer");
|
4639
4648
|
}
|
4640
4649
|
if (this.inClassStaticBlock && (name === "arguments" || name === "await")) {
|
@@ -4727,6 +4736,9 @@ var pp$4 = Parser.prototype;
|
|
4727
4736
|
pp$4.raise = function(pos, message) {
|
4728
4737
|
var loc = getLineInfo(this.input, pos);
|
4729
4738
|
message += " (" + loc.line + ":" + loc.column + ")";
|
4739
|
+
if (this.sourceFile) {
|
4740
|
+
message += " in " + this.sourceFile;
|
4741
|
+
}
|
4730
4742
|
var err = new SyntaxError(message);
|
4731
4743
|
err.pos = pos;
|
4732
4744
|
err.loc = loc;
|
@@ -4745,7 +4757,6 @@ var Scope = function Scope2(flags) {
|
|
4745
4757
|
this.var = [];
|
4746
4758
|
this.lexical = [];
|
4747
4759
|
this.functions = [];
|
4748
|
-
this.inClassFieldInit = false;
|
4749
4760
|
};
|
4750
4761
|
pp$3.enterScope = function(flags) {
|
4751
4762
|
this.scopeStack.push(new Scope(flags));
|
@@ -4807,7 +4818,7 @@ pp$3.currentScope = function() {
|
|
4807
4818
|
pp$3.currentVarScope = function() {
|
4808
4819
|
for (var i = this.scopeStack.length - 1; ; i--) {
|
4809
4820
|
var scope = this.scopeStack[i];
|
4810
|
-
if (scope.flags & SCOPE_VAR) {
|
4821
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) {
|
4811
4822
|
return scope;
|
4812
4823
|
}
|
4813
4824
|
}
|
@@ -4815,7 +4826,7 @@ pp$3.currentVarScope = function() {
|
|
4815
4826
|
pp$3.currentThisScope = function() {
|
4816
4827
|
for (var i = this.scopeStack.length - 1; ; i--) {
|
4817
4828
|
var scope = this.scopeStack[i];
|
4818
|
-
if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
|
4829
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) && !(scope.flags & SCOPE_ARROW)) {
|
4819
4830
|
return scope;
|
4820
4831
|
}
|
4821
4832
|
}
|
@@ -7060,7 +7071,7 @@ pp.readWord = function() {
|
|
7060
7071
|
}
|
7061
7072
|
return this.finishToken(type, word);
|
7062
7073
|
};
|
7063
|
-
var version$1 = "8.14.
|
7074
|
+
var version$1 = "8.14.1";
|
7064
7075
|
Parser.acorn = {
|
7065
7076
|
Parser,
|
7066
7077
|
version: version$1,
|
@@ -7105,11 +7116,6 @@ function joinURL(base, ...input) {
|
|
7105
7116
|
return url;
|
7106
7117
|
}
|
7107
7118
|
|
7108
|
-
const _IS_ABSOLUTE_RE$1 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
7109
|
-
const isAbsolute$1 = function(p) {
|
7110
|
-
return _IS_ABSOLUTE_RE$1.test(p);
|
7111
|
-
};
|
7112
|
-
|
7113
7119
|
const BUILTIN_MODULES = new Set(builtinModules);
|
7114
7120
|
function normalizeSlash(path2) {
|
7115
7121
|
return path2.replace(/\\/g, "/");
|
@@ -8932,7 +8938,7 @@ async function readPackageJSON(id, options = {}) {
|
|
8932
8938
|
return parsed;
|
8933
8939
|
}
|
8934
8940
|
async function resolvePackageJSON(id = process.cwd(), options = {}) {
|
8935
|
-
const resolvedPath = isAbsolute$
|
8941
|
+
const resolvedPath = isAbsolute$1(id) ? id : await resolvePath(id, options);
|
8936
8942
|
return findNearestFile("package.json", {
|
8937
8943
|
startingFrom: resolvedPath,
|
8938
8944
|
...options
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@highstate/cli",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.1",
|
4
4
|
"description": "The CLI for the Highstate project.",
|
5
5
|
"type": "module",
|
6
6
|
"files": [
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"build": "pkgroll --tsconfig=tsconfig.build.json"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
|
-
"@highstate/backend": "^0.7.
|
19
|
+
"@highstate/backend": "^0.7.1",
|
20
20
|
"consola": "^3.4.0"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|
@@ -27,5 +27,5 @@
|
|
27
27
|
"pkg-types": "^1.2.1",
|
28
28
|
"pkgroll": "^2.5.1"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "76c38ce5dbf7a710cf0e6339f52e86358537a99a"
|
31
31
|
}
|