@angular/core 18.2.3 → 18.2.4
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/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/application_error_handler.mjs +3 -3
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +3 -3
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/after-render-phase/bundle.js +13 -13
- package/schematics/migrations/http-providers/bundle.js +13 -13
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +13 -13
- package/schematics/ng-generate/inject-migration/bundle.js +13 -13
- package/schematics/ng-generate/route-lazy-loading/bundle.js +13 -13
- package/schematics/ng-generate/standalone-migration/bundle.js +351 -294
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.2.
|
|
2
|
+
* @license Angular v18.2.4
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -175,10 +175,10 @@ class TestBedApplicationErrorHandler {
|
|
|
175
175
|
throw e;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
179
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.
|
|
178
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
179
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TestBedApplicationErrorHandler }); }
|
|
180
180
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
|
|
182
182
|
type: Injectable
|
|
183
183
|
}] });
|
|
184
184
|
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -20644,7 +20644,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20644
20644
|
}
|
|
20645
20645
|
if (params !== null) {
|
|
20646
20646
|
if (params.trackBy === null) {
|
|
20647
|
-
errors.push(new ParseError(ast.
|
|
20647
|
+
errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20648
20648
|
} else {
|
|
20649
20649
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20650
20650
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
@@ -20686,7 +20686,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20686
20686
|
function parseForLoopParameters(block, errors, bindingParser) {
|
|
20687
20687
|
var _a2;
|
|
20688
20688
|
if (block.parameters.length === 0) {
|
|
20689
|
-
errors.push(new ParseError(block.
|
|
20689
|
+
errors.push(new ParseError(block.startSourceSpan, "@for loop does not have an expression"));
|
|
20690
20690
|
return null;
|
|
20691
20691
|
}
|
|
20692
20692
|
const [expressionParam, ...secondaryParams] = block.parameters;
|
|
@@ -20724,7 +20724,7 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20724
20724
|
} else {
|
|
20725
20725
|
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
20726
20726
|
if (expression.ast instanceof EmptyExpr) {
|
|
20727
|
-
errors.push(new ParseError(
|
|
20727
|
+
errors.push(new ParseError(block.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20728
20728
|
}
|
|
20729
20729
|
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
20730
20730
|
result.trackBy = { expression, keywordSpan };
|
|
@@ -20775,15 +20775,15 @@ function validateIfConnectedBlocks(connectedBlocks) {
|
|
|
20775
20775
|
const block = connectedBlocks[i];
|
|
20776
20776
|
if (block.name === "else") {
|
|
20777
20777
|
if (hasElse) {
|
|
20778
|
-
errors.push(new ParseError(block.
|
|
20778
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional can only have one @else block"));
|
|
20779
20779
|
} else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {
|
|
20780
|
-
errors.push(new ParseError(block.
|
|
20780
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block must be last inside the conditional"));
|
|
20781
20781
|
} else if (block.parameters.length > 0) {
|
|
20782
|
-
errors.push(new ParseError(block.
|
|
20782
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block cannot have parameters"));
|
|
20783
20783
|
}
|
|
20784
20784
|
hasElse = true;
|
|
20785
20785
|
} else if (!ELSE_IF_PATTERN.test(block.name)) {
|
|
20786
|
-
errors.push(new ParseError(block.
|
|
20786
|
+
errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));
|
|
20787
20787
|
}
|
|
20788
20788
|
}
|
|
20789
20789
|
return errors;
|
|
@@ -20792,7 +20792,7 @@ function validateSwitchBlock(ast) {
|
|
|
20792
20792
|
const errors = [];
|
|
20793
20793
|
let hasDefault = false;
|
|
20794
20794
|
if (ast.parameters.length !== 1) {
|
|
20795
|
-
errors.push(new ParseError(ast.
|
|
20795
|
+
errors.push(new ParseError(ast.startSourceSpan, "@switch block must have exactly one parameter"));
|
|
20796
20796
|
return errors;
|
|
20797
20797
|
}
|
|
20798
20798
|
for (const node of ast.children) {
|
|
@@ -20805,13 +20805,13 @@ function validateSwitchBlock(ast) {
|
|
|
20805
20805
|
}
|
|
20806
20806
|
if (node.name === "default") {
|
|
20807
20807
|
if (hasDefault) {
|
|
20808
|
-
errors.push(new ParseError(node.
|
|
20808
|
+
errors.push(new ParseError(node.startSourceSpan, "@switch block can only have one @default block"));
|
|
20809
20809
|
} else if (node.parameters.length > 0) {
|
|
20810
|
-
errors.push(new ParseError(node.
|
|
20810
|
+
errors.push(new ParseError(node.startSourceSpan, "@default block cannot have parameters"));
|
|
20811
20811
|
}
|
|
20812
20812
|
hasDefault = true;
|
|
20813
20813
|
} else if (node.name === "case" && node.parameters.length !== 1) {
|
|
20814
|
-
errors.push(new ParseError(node.
|
|
20814
|
+
errors.push(new ParseError(node.startSourceSpan, "@case block must have exactly one parameter"));
|
|
20815
20815
|
}
|
|
20816
20816
|
}
|
|
20817
20817
|
return errors;
|
|
@@ -20830,7 +20830,7 @@ function parseBlockParameterToBinding(ast, bindingParser, part) {
|
|
|
20830
20830
|
}
|
|
20831
20831
|
function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
20832
20832
|
if (block.parameters.length === 0) {
|
|
20833
|
-
errors.push(new ParseError(block.
|
|
20833
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional block does not have an expression"));
|
|
20834
20834
|
return null;
|
|
20835
20835
|
}
|
|
20836
20836
|
const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);
|
|
@@ -23451,7 +23451,7 @@ function publishFacade(global) {
|
|
|
23451
23451
|
}
|
|
23452
23452
|
|
|
23453
23453
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23454
|
-
var VERSION2 = new Version("18.2.
|
|
23454
|
+
var VERSION2 = new Version("18.2.4");
|
|
23455
23455
|
|
|
23456
23456
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23457
23457
|
var _VisitorMode;
|
|
@@ -20644,7 +20644,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20644
20644
|
}
|
|
20645
20645
|
if (params !== null) {
|
|
20646
20646
|
if (params.trackBy === null) {
|
|
20647
|
-
errors.push(new ParseError(ast.
|
|
20647
|
+
errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20648
20648
|
} else {
|
|
20649
20649
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20650
20650
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
@@ -20686,7 +20686,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20686
20686
|
function parseForLoopParameters(block, errors, bindingParser) {
|
|
20687
20687
|
var _a2;
|
|
20688
20688
|
if (block.parameters.length === 0) {
|
|
20689
|
-
errors.push(new ParseError(block.
|
|
20689
|
+
errors.push(new ParseError(block.startSourceSpan, "@for loop does not have an expression"));
|
|
20690
20690
|
return null;
|
|
20691
20691
|
}
|
|
20692
20692
|
const [expressionParam, ...secondaryParams] = block.parameters;
|
|
@@ -20724,7 +20724,7 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20724
20724
|
} else {
|
|
20725
20725
|
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
20726
20726
|
if (expression.ast instanceof EmptyExpr) {
|
|
20727
|
-
errors.push(new ParseError(
|
|
20727
|
+
errors.push(new ParseError(block.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20728
20728
|
}
|
|
20729
20729
|
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
20730
20730
|
result.trackBy = { expression, keywordSpan };
|
|
@@ -20775,15 +20775,15 @@ function validateIfConnectedBlocks(connectedBlocks) {
|
|
|
20775
20775
|
const block = connectedBlocks[i];
|
|
20776
20776
|
if (block.name === "else") {
|
|
20777
20777
|
if (hasElse) {
|
|
20778
|
-
errors.push(new ParseError(block.
|
|
20778
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional can only have one @else block"));
|
|
20779
20779
|
} else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {
|
|
20780
|
-
errors.push(new ParseError(block.
|
|
20780
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block must be last inside the conditional"));
|
|
20781
20781
|
} else if (block.parameters.length > 0) {
|
|
20782
|
-
errors.push(new ParseError(block.
|
|
20782
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block cannot have parameters"));
|
|
20783
20783
|
}
|
|
20784
20784
|
hasElse = true;
|
|
20785
20785
|
} else if (!ELSE_IF_PATTERN.test(block.name)) {
|
|
20786
|
-
errors.push(new ParseError(block.
|
|
20786
|
+
errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));
|
|
20787
20787
|
}
|
|
20788
20788
|
}
|
|
20789
20789
|
return errors;
|
|
@@ -20792,7 +20792,7 @@ function validateSwitchBlock(ast) {
|
|
|
20792
20792
|
const errors = [];
|
|
20793
20793
|
let hasDefault = false;
|
|
20794
20794
|
if (ast.parameters.length !== 1) {
|
|
20795
|
-
errors.push(new ParseError(ast.
|
|
20795
|
+
errors.push(new ParseError(ast.startSourceSpan, "@switch block must have exactly one parameter"));
|
|
20796
20796
|
return errors;
|
|
20797
20797
|
}
|
|
20798
20798
|
for (const node of ast.children) {
|
|
@@ -20805,13 +20805,13 @@ function validateSwitchBlock(ast) {
|
|
|
20805
20805
|
}
|
|
20806
20806
|
if (node.name === "default") {
|
|
20807
20807
|
if (hasDefault) {
|
|
20808
|
-
errors.push(new ParseError(node.
|
|
20808
|
+
errors.push(new ParseError(node.startSourceSpan, "@switch block can only have one @default block"));
|
|
20809
20809
|
} else if (node.parameters.length > 0) {
|
|
20810
|
-
errors.push(new ParseError(node.
|
|
20810
|
+
errors.push(new ParseError(node.startSourceSpan, "@default block cannot have parameters"));
|
|
20811
20811
|
}
|
|
20812
20812
|
hasDefault = true;
|
|
20813
20813
|
} else if (node.name === "case" && node.parameters.length !== 1) {
|
|
20814
|
-
errors.push(new ParseError(node.
|
|
20814
|
+
errors.push(new ParseError(node.startSourceSpan, "@case block must have exactly one parameter"));
|
|
20815
20815
|
}
|
|
20816
20816
|
}
|
|
20817
20817
|
return errors;
|
|
@@ -20830,7 +20830,7 @@ function parseBlockParameterToBinding(ast, bindingParser, part) {
|
|
|
20830
20830
|
}
|
|
20831
20831
|
function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
20832
20832
|
if (block.parameters.length === 0) {
|
|
20833
|
-
errors.push(new ParseError(block.
|
|
20833
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional block does not have an expression"));
|
|
20834
20834
|
return null;
|
|
20835
20835
|
}
|
|
20836
20836
|
const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);
|
|
@@ -23451,7 +23451,7 @@ function publishFacade(global) {
|
|
|
23451
23451
|
}
|
|
23452
23452
|
|
|
23453
23453
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23454
|
-
var VERSION2 = new Version("18.2.
|
|
23454
|
+
var VERSION2 = new Version("18.2.4");
|
|
23455
23455
|
|
|
23456
23456
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23457
23457
|
var _VisitorMode;
|
|
@@ -20765,7 +20765,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20765
20765
|
}
|
|
20766
20766
|
if (params !== null) {
|
|
20767
20767
|
if (params.trackBy === null) {
|
|
20768
|
-
errors.push(new ParseError(ast.
|
|
20768
|
+
errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20769
20769
|
} else {
|
|
20770
20770
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20771
20771
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
@@ -20807,7 +20807,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20807
20807
|
function parseForLoopParameters(block, errors, bindingParser) {
|
|
20808
20808
|
var _a2;
|
|
20809
20809
|
if (block.parameters.length === 0) {
|
|
20810
|
-
errors.push(new ParseError(block.
|
|
20810
|
+
errors.push(new ParseError(block.startSourceSpan, "@for loop does not have an expression"));
|
|
20811
20811
|
return null;
|
|
20812
20812
|
}
|
|
20813
20813
|
const [expressionParam, ...secondaryParams] = block.parameters;
|
|
@@ -20845,7 +20845,7 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20845
20845
|
} else {
|
|
20846
20846
|
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
20847
20847
|
if (expression.ast instanceof EmptyExpr) {
|
|
20848
|
-
errors.push(new ParseError(
|
|
20848
|
+
errors.push(new ParseError(block.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20849
20849
|
}
|
|
20850
20850
|
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
20851
20851
|
result.trackBy = { expression, keywordSpan };
|
|
@@ -20896,15 +20896,15 @@ function validateIfConnectedBlocks(connectedBlocks) {
|
|
|
20896
20896
|
const block = connectedBlocks[i];
|
|
20897
20897
|
if (block.name === "else") {
|
|
20898
20898
|
if (hasElse) {
|
|
20899
|
-
errors.push(new ParseError(block.
|
|
20899
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional can only have one @else block"));
|
|
20900
20900
|
} else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {
|
|
20901
|
-
errors.push(new ParseError(block.
|
|
20901
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block must be last inside the conditional"));
|
|
20902
20902
|
} else if (block.parameters.length > 0) {
|
|
20903
|
-
errors.push(new ParseError(block.
|
|
20903
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block cannot have parameters"));
|
|
20904
20904
|
}
|
|
20905
20905
|
hasElse = true;
|
|
20906
20906
|
} else if (!ELSE_IF_PATTERN.test(block.name)) {
|
|
20907
|
-
errors.push(new ParseError(block.
|
|
20907
|
+
errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));
|
|
20908
20908
|
}
|
|
20909
20909
|
}
|
|
20910
20910
|
return errors;
|
|
@@ -20913,7 +20913,7 @@ function validateSwitchBlock(ast) {
|
|
|
20913
20913
|
const errors = [];
|
|
20914
20914
|
let hasDefault = false;
|
|
20915
20915
|
if (ast.parameters.length !== 1) {
|
|
20916
|
-
errors.push(new ParseError(ast.
|
|
20916
|
+
errors.push(new ParseError(ast.startSourceSpan, "@switch block must have exactly one parameter"));
|
|
20917
20917
|
return errors;
|
|
20918
20918
|
}
|
|
20919
20919
|
for (const node of ast.children) {
|
|
@@ -20926,13 +20926,13 @@ function validateSwitchBlock(ast) {
|
|
|
20926
20926
|
}
|
|
20927
20927
|
if (node.name === "default") {
|
|
20928
20928
|
if (hasDefault) {
|
|
20929
|
-
errors.push(new ParseError(node.
|
|
20929
|
+
errors.push(new ParseError(node.startSourceSpan, "@switch block can only have one @default block"));
|
|
20930
20930
|
} else if (node.parameters.length > 0) {
|
|
20931
|
-
errors.push(new ParseError(node.
|
|
20931
|
+
errors.push(new ParseError(node.startSourceSpan, "@default block cannot have parameters"));
|
|
20932
20932
|
}
|
|
20933
20933
|
hasDefault = true;
|
|
20934
20934
|
} else if (node.name === "case" && node.parameters.length !== 1) {
|
|
20935
|
-
errors.push(new ParseError(node.
|
|
20935
|
+
errors.push(new ParseError(node.startSourceSpan, "@case block must have exactly one parameter"));
|
|
20936
20936
|
}
|
|
20937
20937
|
}
|
|
20938
20938
|
return errors;
|
|
@@ -20951,7 +20951,7 @@ function parseBlockParameterToBinding(ast, bindingParser, part) {
|
|
|
20951
20951
|
}
|
|
20952
20952
|
function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
20953
20953
|
if (block.parameters.length === 0) {
|
|
20954
|
-
errors.push(new ParseError(block.
|
|
20954
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional block does not have an expression"));
|
|
20955
20955
|
return null;
|
|
20956
20956
|
}
|
|
20957
20957
|
const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);
|
|
@@ -23572,7 +23572,7 @@ function publishFacade(global) {
|
|
|
23572
23572
|
}
|
|
23573
23573
|
|
|
23574
23574
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23575
|
-
var VERSION2 = new Version("18.2.
|
|
23575
|
+
var VERSION2 = new Version("18.2.4");
|
|
23576
23576
|
|
|
23577
23577
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23578
23578
|
var _VisitorMode;
|
|
@@ -20550,7 +20550,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20550
20550
|
}
|
|
20551
20551
|
if (params !== null) {
|
|
20552
20552
|
if (params.trackBy === null) {
|
|
20553
|
-
errors.push(new ParseError(ast.
|
|
20553
|
+
errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20554
20554
|
} else {
|
|
20555
20555
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20556
20556
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
@@ -20592,7 +20592,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20592
20592
|
function parseForLoopParameters(block, errors, bindingParser) {
|
|
20593
20593
|
var _a2;
|
|
20594
20594
|
if (block.parameters.length === 0) {
|
|
20595
|
-
errors.push(new ParseError(block.
|
|
20595
|
+
errors.push(new ParseError(block.startSourceSpan, "@for loop does not have an expression"));
|
|
20596
20596
|
return null;
|
|
20597
20597
|
}
|
|
20598
20598
|
const [expressionParam, ...secondaryParams] = block.parameters;
|
|
@@ -20630,7 +20630,7 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20630
20630
|
} else {
|
|
20631
20631
|
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
20632
20632
|
if (expression.ast instanceof EmptyExpr) {
|
|
20633
|
-
errors.push(new ParseError(
|
|
20633
|
+
errors.push(new ParseError(block.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20634
20634
|
}
|
|
20635
20635
|
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
20636
20636
|
result.trackBy = { expression, keywordSpan };
|
|
@@ -20681,15 +20681,15 @@ function validateIfConnectedBlocks(connectedBlocks) {
|
|
|
20681
20681
|
const block = connectedBlocks[i];
|
|
20682
20682
|
if (block.name === "else") {
|
|
20683
20683
|
if (hasElse) {
|
|
20684
|
-
errors.push(new ParseError(block.
|
|
20684
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional can only have one @else block"));
|
|
20685
20685
|
} else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {
|
|
20686
|
-
errors.push(new ParseError(block.
|
|
20686
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block must be last inside the conditional"));
|
|
20687
20687
|
} else if (block.parameters.length > 0) {
|
|
20688
|
-
errors.push(new ParseError(block.
|
|
20688
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block cannot have parameters"));
|
|
20689
20689
|
}
|
|
20690
20690
|
hasElse = true;
|
|
20691
20691
|
} else if (!ELSE_IF_PATTERN.test(block.name)) {
|
|
20692
|
-
errors.push(new ParseError(block.
|
|
20692
|
+
errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));
|
|
20693
20693
|
}
|
|
20694
20694
|
}
|
|
20695
20695
|
return errors;
|
|
@@ -20698,7 +20698,7 @@ function validateSwitchBlock(ast) {
|
|
|
20698
20698
|
const errors = [];
|
|
20699
20699
|
let hasDefault = false;
|
|
20700
20700
|
if (ast.parameters.length !== 1) {
|
|
20701
|
-
errors.push(new ParseError(ast.
|
|
20701
|
+
errors.push(new ParseError(ast.startSourceSpan, "@switch block must have exactly one parameter"));
|
|
20702
20702
|
return errors;
|
|
20703
20703
|
}
|
|
20704
20704
|
for (const node of ast.children) {
|
|
@@ -20711,13 +20711,13 @@ function validateSwitchBlock(ast) {
|
|
|
20711
20711
|
}
|
|
20712
20712
|
if (node.name === "default") {
|
|
20713
20713
|
if (hasDefault) {
|
|
20714
|
-
errors.push(new ParseError(node.
|
|
20714
|
+
errors.push(new ParseError(node.startSourceSpan, "@switch block can only have one @default block"));
|
|
20715
20715
|
} else if (node.parameters.length > 0) {
|
|
20716
|
-
errors.push(new ParseError(node.
|
|
20716
|
+
errors.push(new ParseError(node.startSourceSpan, "@default block cannot have parameters"));
|
|
20717
20717
|
}
|
|
20718
20718
|
hasDefault = true;
|
|
20719
20719
|
} else if (node.name === "case" && node.parameters.length !== 1) {
|
|
20720
|
-
errors.push(new ParseError(node.
|
|
20720
|
+
errors.push(new ParseError(node.startSourceSpan, "@case block must have exactly one parameter"));
|
|
20721
20721
|
}
|
|
20722
20722
|
}
|
|
20723
20723
|
return errors;
|
|
@@ -20736,7 +20736,7 @@ function parseBlockParameterToBinding(ast, bindingParser, part) {
|
|
|
20736
20736
|
}
|
|
20737
20737
|
function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
20738
20738
|
if (block.parameters.length === 0) {
|
|
20739
|
-
errors.push(new ParseError(block.
|
|
20739
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional block does not have an expression"));
|
|
20740
20740
|
return null;
|
|
20741
20741
|
}
|
|
20742
20742
|
const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);
|
|
@@ -23357,7 +23357,7 @@ function publishFacade(global) {
|
|
|
23357
23357
|
}
|
|
23358
23358
|
|
|
23359
23359
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23360
|
-
var VERSION2 = new Version("18.2.
|
|
23360
|
+
var VERSION2 = new Version("18.2.4");
|
|
23361
23361
|
|
|
23362
23362
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23363
23363
|
var _VisitorMode;
|
|
@@ -20507,7 +20507,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20507
20507
|
}
|
|
20508
20508
|
if (params !== null) {
|
|
20509
20509
|
if (params.trackBy === null) {
|
|
20510
|
-
errors.push(new ParseError(ast.
|
|
20510
|
+
errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20511
20511
|
} else {
|
|
20512
20512
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20513
20513
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
@@ -20549,7 +20549,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20549
20549
|
function parseForLoopParameters(block, errors, bindingParser) {
|
|
20550
20550
|
var _a2;
|
|
20551
20551
|
if (block.parameters.length === 0) {
|
|
20552
|
-
errors.push(new ParseError(block.
|
|
20552
|
+
errors.push(new ParseError(block.startSourceSpan, "@for loop does not have an expression"));
|
|
20553
20553
|
return null;
|
|
20554
20554
|
}
|
|
20555
20555
|
const [expressionParam, ...secondaryParams] = block.parameters;
|
|
@@ -20587,7 +20587,7 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20587
20587
|
} else {
|
|
20588
20588
|
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
20589
20589
|
if (expression.ast instanceof EmptyExpr) {
|
|
20590
|
-
errors.push(new ParseError(
|
|
20590
|
+
errors.push(new ParseError(block.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20591
20591
|
}
|
|
20592
20592
|
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
20593
20593
|
result.trackBy = { expression, keywordSpan };
|
|
@@ -20638,15 +20638,15 @@ function validateIfConnectedBlocks(connectedBlocks) {
|
|
|
20638
20638
|
const block = connectedBlocks[i];
|
|
20639
20639
|
if (block.name === "else") {
|
|
20640
20640
|
if (hasElse) {
|
|
20641
|
-
errors.push(new ParseError(block.
|
|
20641
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional can only have one @else block"));
|
|
20642
20642
|
} else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {
|
|
20643
|
-
errors.push(new ParseError(block.
|
|
20643
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block must be last inside the conditional"));
|
|
20644
20644
|
} else if (block.parameters.length > 0) {
|
|
20645
|
-
errors.push(new ParseError(block.
|
|
20645
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block cannot have parameters"));
|
|
20646
20646
|
}
|
|
20647
20647
|
hasElse = true;
|
|
20648
20648
|
} else if (!ELSE_IF_PATTERN.test(block.name)) {
|
|
20649
|
-
errors.push(new ParseError(block.
|
|
20649
|
+
errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));
|
|
20650
20650
|
}
|
|
20651
20651
|
}
|
|
20652
20652
|
return errors;
|
|
@@ -20655,7 +20655,7 @@ function validateSwitchBlock(ast) {
|
|
|
20655
20655
|
const errors = [];
|
|
20656
20656
|
let hasDefault = false;
|
|
20657
20657
|
if (ast.parameters.length !== 1) {
|
|
20658
|
-
errors.push(new ParseError(ast.
|
|
20658
|
+
errors.push(new ParseError(ast.startSourceSpan, "@switch block must have exactly one parameter"));
|
|
20659
20659
|
return errors;
|
|
20660
20660
|
}
|
|
20661
20661
|
for (const node of ast.children) {
|
|
@@ -20668,13 +20668,13 @@ function validateSwitchBlock(ast) {
|
|
|
20668
20668
|
}
|
|
20669
20669
|
if (node.name === "default") {
|
|
20670
20670
|
if (hasDefault) {
|
|
20671
|
-
errors.push(new ParseError(node.
|
|
20671
|
+
errors.push(new ParseError(node.startSourceSpan, "@switch block can only have one @default block"));
|
|
20672
20672
|
} else if (node.parameters.length > 0) {
|
|
20673
|
-
errors.push(new ParseError(node.
|
|
20673
|
+
errors.push(new ParseError(node.startSourceSpan, "@default block cannot have parameters"));
|
|
20674
20674
|
}
|
|
20675
20675
|
hasDefault = true;
|
|
20676
20676
|
} else if (node.name === "case" && node.parameters.length !== 1) {
|
|
20677
|
-
errors.push(new ParseError(node.
|
|
20677
|
+
errors.push(new ParseError(node.startSourceSpan, "@case block must have exactly one parameter"));
|
|
20678
20678
|
}
|
|
20679
20679
|
}
|
|
20680
20680
|
return errors;
|
|
@@ -20693,7 +20693,7 @@ function parseBlockParameterToBinding(ast, bindingParser, part) {
|
|
|
20693
20693
|
}
|
|
20694
20694
|
function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
20695
20695
|
if (block.parameters.length === 0) {
|
|
20696
|
-
errors.push(new ParseError(block.
|
|
20696
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional block does not have an expression"));
|
|
20697
20697
|
return null;
|
|
20698
20698
|
}
|
|
20699
20699
|
const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);
|
|
@@ -23314,7 +23314,7 @@ function publishFacade(global) {
|
|
|
23314
23314
|
}
|
|
23315
23315
|
|
|
23316
23316
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23317
|
-
var VERSION2 = new Version("18.2.
|
|
23317
|
+
var VERSION2 = new Version("18.2.4");
|
|
23318
23318
|
|
|
23319
23319
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23320
23320
|
var _VisitorMode;
|
|
@@ -20508,7 +20508,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20508
20508
|
}
|
|
20509
20509
|
if (params !== null) {
|
|
20510
20510
|
if (params.trackBy === null) {
|
|
20511
|
-
errors.push(new ParseError(ast.
|
|
20511
|
+
errors.push(new ParseError(ast.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20512
20512
|
} else {
|
|
20513
20513
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20514
20514
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
@@ -20550,7 +20550,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20550
20550
|
function parseForLoopParameters(block, errors, bindingParser) {
|
|
20551
20551
|
var _a2;
|
|
20552
20552
|
if (block.parameters.length === 0) {
|
|
20553
|
-
errors.push(new ParseError(block.
|
|
20553
|
+
errors.push(new ParseError(block.startSourceSpan, "@for loop does not have an expression"));
|
|
20554
20554
|
return null;
|
|
20555
20555
|
}
|
|
20556
20556
|
const [expressionParam, ...secondaryParams] = block.parameters;
|
|
@@ -20588,7 +20588,7 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20588
20588
|
} else {
|
|
20589
20589
|
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
20590
20590
|
if (expression.ast instanceof EmptyExpr) {
|
|
20591
|
-
errors.push(new ParseError(
|
|
20591
|
+
errors.push(new ParseError(block.startSourceSpan, '@for loop must have a "track" expression'));
|
|
20592
20592
|
}
|
|
20593
20593
|
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
20594
20594
|
result.trackBy = { expression, keywordSpan };
|
|
@@ -20639,15 +20639,15 @@ function validateIfConnectedBlocks(connectedBlocks) {
|
|
|
20639
20639
|
const block = connectedBlocks[i];
|
|
20640
20640
|
if (block.name === "else") {
|
|
20641
20641
|
if (hasElse) {
|
|
20642
|
-
errors.push(new ParseError(block.
|
|
20642
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional can only have one @else block"));
|
|
20643
20643
|
} else if (connectedBlocks.length > 1 && i < connectedBlocks.length - 1) {
|
|
20644
|
-
errors.push(new ParseError(block.
|
|
20644
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block must be last inside the conditional"));
|
|
20645
20645
|
} else if (block.parameters.length > 0) {
|
|
20646
|
-
errors.push(new ParseError(block.
|
|
20646
|
+
errors.push(new ParseError(block.startSourceSpan, "@else block cannot have parameters"));
|
|
20647
20647
|
}
|
|
20648
20648
|
hasElse = true;
|
|
20649
20649
|
} else if (!ELSE_IF_PATTERN.test(block.name)) {
|
|
20650
|
-
errors.push(new ParseError(block.
|
|
20650
|
+
errors.push(new ParseError(block.startSourceSpan, `Unrecognized conditional block @${block.name}`));
|
|
20651
20651
|
}
|
|
20652
20652
|
}
|
|
20653
20653
|
return errors;
|
|
@@ -20656,7 +20656,7 @@ function validateSwitchBlock(ast) {
|
|
|
20656
20656
|
const errors = [];
|
|
20657
20657
|
let hasDefault = false;
|
|
20658
20658
|
if (ast.parameters.length !== 1) {
|
|
20659
|
-
errors.push(new ParseError(ast.
|
|
20659
|
+
errors.push(new ParseError(ast.startSourceSpan, "@switch block must have exactly one parameter"));
|
|
20660
20660
|
return errors;
|
|
20661
20661
|
}
|
|
20662
20662
|
for (const node of ast.children) {
|
|
@@ -20669,13 +20669,13 @@ function validateSwitchBlock(ast) {
|
|
|
20669
20669
|
}
|
|
20670
20670
|
if (node.name === "default") {
|
|
20671
20671
|
if (hasDefault) {
|
|
20672
|
-
errors.push(new ParseError(node.
|
|
20672
|
+
errors.push(new ParseError(node.startSourceSpan, "@switch block can only have one @default block"));
|
|
20673
20673
|
} else if (node.parameters.length > 0) {
|
|
20674
|
-
errors.push(new ParseError(node.
|
|
20674
|
+
errors.push(new ParseError(node.startSourceSpan, "@default block cannot have parameters"));
|
|
20675
20675
|
}
|
|
20676
20676
|
hasDefault = true;
|
|
20677
20677
|
} else if (node.name === "case" && node.parameters.length !== 1) {
|
|
20678
|
-
errors.push(new ParseError(node.
|
|
20678
|
+
errors.push(new ParseError(node.startSourceSpan, "@case block must have exactly one parameter"));
|
|
20679
20679
|
}
|
|
20680
20680
|
}
|
|
20681
20681
|
return errors;
|
|
@@ -20694,7 +20694,7 @@ function parseBlockParameterToBinding(ast, bindingParser, part) {
|
|
|
20694
20694
|
}
|
|
20695
20695
|
function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
20696
20696
|
if (block.parameters.length === 0) {
|
|
20697
|
-
errors.push(new ParseError(block.
|
|
20697
|
+
errors.push(new ParseError(block.startSourceSpan, "Conditional block does not have an expression"));
|
|
20698
20698
|
return null;
|
|
20699
20699
|
}
|
|
20700
20700
|
const expression = parseBlockParameterToBinding(block.parameters[0], bindingParser);
|
|
@@ -23315,7 +23315,7 @@ function publishFacade(global) {
|
|
|
23315
23315
|
}
|
|
23316
23316
|
|
|
23317
23317
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23318
|
-
var VERSION2 = new Version("18.2.
|
|
23318
|
+
var VERSION2 = new Version("18.2.4");
|
|
23319
23319
|
|
|
23320
23320
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23321
23321
|
var _VisitorMode;
|