@angular/compiler-cli 17.0.3 → 17.1.0-next.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.
Files changed (60) hide show
  1. package/bundles/{chunk-HKIDKKUJ.js → chunk-2UJEML3U.js} +2764 -2780
  2. package/bundles/chunk-2UJEML3U.js.map +6 -0
  3. package/bundles/{chunk-EKTJ7622.js → chunk-2WQIUGOU.js} +1 -1
  4. package/bundles/chunk-2WQIUGOU.js.map +6 -0
  5. package/bundles/{chunk-BV3ZUD7T.js → chunk-64JBPJBS.js} +1 -1
  6. package/bundles/{chunk-BV3ZUD7T.js.map → chunk-64JBPJBS.js.map} +1 -1
  7. package/bundles/{chunk-PCMLSPQF.js → chunk-DUY2FPLZ.js} +1 -1
  8. package/bundles/chunk-DUY2FPLZ.js.map +6 -0
  9. package/bundles/{chunk-MHTLEXGT.js → chunk-EMC3QXAT.js} +2 -2
  10. package/bundles/chunk-EMC3QXAT.js.map +6 -0
  11. package/bundles/{chunk-EKZWOVDR.js → chunk-MTZGVQDN.js} +36 -25
  12. package/bundles/chunk-MTZGVQDN.js.map +6 -0
  13. package/bundles/{chunk-WJ2RDNX4.js → chunk-U6JZJXY2.js} +2 -2
  14. package/bundles/chunk-U6JZJXY2.js.map +6 -0
  15. package/bundles/{chunk-Z4QM3XT4.js → chunk-UTWZHLA4.js} +4 -4
  16. package/bundles/chunk-UTWZHLA4.js.map +6 -0
  17. package/bundles/{chunk-OTTOC3WQ.js → chunk-VHIKXGRX.js} +23 -15
  18. package/bundles/chunk-VHIKXGRX.js.map +6 -0
  19. package/bundles/{chunk-ELZXPNCU.js → chunk-XCEXKEDO.js} +139 -120
  20. package/bundles/chunk-XCEXKEDO.js.map +6 -0
  21. package/bundles/index.js +8 -8
  22. package/bundles/index.js.map +1 -1
  23. package/bundles/linker/babel/index.js +5 -5
  24. package/bundles/linker/babel/index.js.map +1 -1
  25. package/bundles/linker/index.js +5 -5
  26. package/bundles/ngcc/index.js.map +1 -1
  27. package/bundles/private/bazel.js +1 -1
  28. package/bundles/private/localize.js +2 -2
  29. package/bundles/private/migrations.js +5 -5
  30. package/bundles/private/tooling.js +3 -3
  31. package/bundles/src/bin/ng_xi18n.js +7 -7
  32. package/bundles/src/bin/ngc.js +7 -7
  33. package/bundles_metadata.json +1 -1
  34. package/linker/babel/src/ast/babel_ast_factory.d.ts +2 -0
  35. package/linker/babel/src/ast/babel_ast_host.d.ts +2 -0
  36. package/linker/babel/src/babel_declaration_scope.d.ts +3 -0
  37. package/linker/babel/src/babel_plugin.d.ts +2 -0
  38. package/linker/babel/src/es2015_linker_plugin.d.ts +2 -0
  39. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  40. package/package.json +3 -3
  41. package/src/bin/ng_xi18n.d.ts +1 -0
  42. package/src/bin/ngc.d.ts +1 -0
  43. package/src/ngtsc/annotations/common/src/di.d.ts +2 -3
  44. package/src/ngtsc/core/src/host.d.ts +1 -0
  45. package/src/ngtsc/indexer/src/api.d.ts +1 -1
  46. package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -0
  47. package/src/ngtsc/reflection/src/host.d.ts +1 -1
  48. package/src/ngtsc/reflection/src/type_to_value.d.ts +1 -1
  49. package/src/ngtsc/reflection/src/typescript.d.ts +2 -1
  50. package/src/ngtsc/translator/src/ts_util.d.ts +12 -0
  51. package/src/ngtsc/typecheck/src/ts_util.d.ts +4 -0
  52. package/bundles/chunk-EKTJ7622.js.map +0 -6
  53. package/bundles/chunk-EKZWOVDR.js.map +0 -6
  54. package/bundles/chunk-ELZXPNCU.js.map +0 -6
  55. package/bundles/chunk-HKIDKKUJ.js.map +0 -6
  56. package/bundles/chunk-MHTLEXGT.js.map +0 -6
  57. package/bundles/chunk-OTTOC3WQ.js.map +0 -6
  58. package/bundles/chunk-PCMLSPQF.js.map +0 -6
  59. package/bundles/chunk-WJ2RDNX4.js.map +0 -6
  60. package/bundles/chunk-Z4QM3XT4.js.map +0 -6
@@ -36,14 +36,14 @@ import {
36
36
  aliasTransformFactory,
37
37
  declarationTransformFactory,
38
38
  ivyTransformFactory
39
- } from "./chunk-HKIDKKUJ.js";
39
+ } from "./chunk-2UJEML3U.js";
40
40
  import {
41
41
  ImportManager,
42
42
  TypeEmitter,
43
43
  canEmitType,
44
44
  translateExpression,
45
45
  translateType
46
- } from "./chunk-ELZXPNCU.js";
46
+ } from "./chunk-XCEXKEDO.js";
47
47
  import {
48
48
  AbsoluteModuleStrategy,
49
49
  AliasStrategy,
@@ -85,14 +85,14 @@ import {
85
85
  relativePathBetween,
86
86
  replaceTsWithNgInErrors,
87
87
  toUnredirectedSourceFile
88
- } from "./chunk-OTTOC3WQ.js";
88
+ } from "./chunk-VHIKXGRX.js";
89
89
  import {
90
90
  ActivePerfRecorder,
91
91
  DelegatingPerfRecorder,
92
92
  PerfCheckpoint,
93
93
  PerfEvent,
94
94
  PerfPhase
95
- } from "./chunk-BV3ZUD7T.js";
95
+ } from "./chunk-64JBPJBS.js";
96
96
  import {
97
97
  LogicalFileSystem,
98
98
  absoluteFrom,
@@ -102,7 +102,7 @@ import {
102
102
  getSourceFileOrError,
103
103
  join,
104
104
  resolve
105
- } from "./chunk-PCMLSPQF.js";
105
+ } from "./chunk-DUY2FPLZ.js";
106
106
 
107
107
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
108
108
  var DEFAULT_ERROR_CODE = 100;
@@ -270,7 +270,7 @@ function compareVersions(v1, v2) {
270
270
 
271
271
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
272
272
  var MIN_TS_VERSION = "5.2.0";
273
- var MAX_TS_VERSION = "5.3.0";
273
+ var MAX_TS_VERSION = "5.4.0";
274
274
  var tsVersion = ts2.version;
275
275
  function checkVersion(version, minVersion, maxVersion) {
276
276
  if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
@@ -927,7 +927,9 @@ function extractEnumMembers(declaration, checker) {
927
927
  }
928
928
  function getEnumMemberValue(memberNode) {
929
929
  var _a;
930
- const literal = memberNode.getChildren().find((n) => ts8.isNumericLiteral(n) || ts8.isStringLiteral(n));
930
+ const literal = memberNode.getChildren().find((n) => {
931
+ return ts8.isNumericLiteral(n) || ts8.isStringLiteral(n) || ts8.isPrefixUnaryExpression(n) && n.operator === ts8.SyntaxKind.MinusToken && ts8.isNumericLiteral(n.operand);
932
+ });
931
933
  return (_a = literal == null ? void 0 : literal.getText()) != null ? _a : "";
932
934
  }
933
935
 
@@ -1416,6 +1418,7 @@ var DelegatingCompilerHost = class {
1416
1418
  this.hasInvalidatedResolutions = this.delegateMethod("hasInvalidatedResolutions");
1417
1419
  this.resolveModuleNameLiterals = this.delegateMethod("resolveModuleNameLiterals");
1418
1420
  this.resolveTypeReferenceDirectiveReferences = this.delegateMethod("resolveTypeReferenceDirectiveReferences");
1421
+ this.jsDocParsingMode = this.delegateMethod("jsDocParsingMode");
1419
1422
  }
1420
1423
  delegateMethod(name) {
1421
1424
  return this.delegate[name] !== void 0 ? this.delegate[name].bind(this.delegate) : void 0;
@@ -3031,6 +3034,13 @@ function tsCallMethod(receiver, methodName, args = []) {
3031
3034
  function isAccessExpression(node) {
3032
3035
  return ts19.isPropertyAccessExpression(node) || ts19.isElementAccessExpression(node);
3033
3036
  }
3037
+ function tsNumericExpression(value) {
3038
+ if (value < 0) {
3039
+ const operand = ts19.factory.createNumericLiteral(Math.abs(value));
3040
+ return ts19.factory.createPrefixUnaryExpression(ts19.SyntaxKind.MinusToken, operand);
3041
+ }
3042
+ return ts19.factory.createNumericLiteral(value);
3043
+ }
3034
3044
 
3035
3045
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
3036
3046
  import ts22 from "typescript";
@@ -3763,7 +3773,7 @@ var AstTranslator = class {
3763
3773
  } else if (typeof ast.value === "string") {
3764
3774
  node = ts27.factory.createStringLiteral(ast.value);
3765
3775
  } else if (typeof ast.value === "number") {
3766
- node = ts27.factory.createNumericLiteral(ast.value);
3776
+ node = tsNumericExpression(ast.value);
3767
3777
  } else if (typeof ast.value === "boolean") {
3768
3778
  node = ast.value ? ts27.factory.createTrue() : ts27.factory.createFalse();
3769
3779
  } else {
@@ -7899,8 +7909,23 @@ var NgCompiler = class {
7899
7909
  }
7900
7910
  makeCompilation() {
7901
7911
  var _a, _b, _c;
7912
+ const isCore = isAngularCorePackage(this.inputProgram);
7913
+ let compilationMode = CompilationMode.FULL;
7914
+ if (!isCore) {
7915
+ switch (this.options.compilationMode) {
7916
+ case "full":
7917
+ compilationMode = CompilationMode.FULL;
7918
+ break;
7919
+ case "partial":
7920
+ compilationMode = CompilationMode.PARTIAL;
7921
+ break;
7922
+ case "experimental-local":
7923
+ compilationMode = CompilationMode.LOCAL;
7924
+ break;
7925
+ }
7926
+ }
7902
7927
  const checker = this.inputProgram.getTypeChecker();
7903
- const reflector = new TypeScriptReflectionHost(checker);
7928
+ const reflector = new TypeScriptReflectionHost(checker, compilationMode === CompilationMode.LOCAL);
7904
7929
  let refEmitter;
7905
7930
  let aliasingHost = null;
7906
7931
  if (this.adapter.unifiedModulesHost === null || !this.options["_useHostForImportGeneration"]) {
@@ -7926,7 +7951,6 @@ var NgCompiler = class {
7926
7951
  ]);
7927
7952
  aliasingHost = new UnifiedModulesAliasingHost(this.adapter.unifiedModulesHost);
7928
7953
  }
7929
- const isCore = isAngularCorePackage(this.inputProgram);
7930
7954
  const evaluator = new PartialEvaluator(reflector, checker, this.incrementalCompilation.depGraph);
7931
7955
  const dtsReader = new DtsMetadataReader(checker, reflector);
7932
7956
  const localMetaRegistry = new LocalMetadataRegistry();
@@ -7954,20 +7978,6 @@ var NgCompiler = class {
7954
7978
  const dtsTransforms = new DtsTransformRegistry();
7955
7979
  const resourceRegistry = new ResourceRegistry();
7956
7980
  const deferredSymbolsTracker = new DeferredSymbolTracker(this.inputProgram.getTypeChecker());
7957
- let compilationMode = CompilationMode.FULL;
7958
- if (!isCore) {
7959
- switch (this.options.compilationMode) {
7960
- case "full":
7961
- compilationMode = CompilationMode.FULL;
7962
- break;
7963
- case "partial":
7964
- compilationMode = CompilationMode.PARTIAL;
7965
- break;
7966
- case "experimental-local":
7967
- compilationMode = CompilationMode.LOCAL;
7968
- break;
7969
- }
7970
- }
7971
7981
  const cycleHandlingStrategy = compilationMode === CompilationMode.FULL ? 0 : 1;
7972
7982
  const strictCtorDeps = this.options.strictInjectionParameters || false;
7973
7983
  const supportJitMode = (_a = this.options["supportJitMode"]) != null ? _a : true;
@@ -8207,6 +8217,7 @@ var DelegatingCompilerHost2 = class {
8207
8217
  this.hasInvalidatedResolutions = this.delegateMethod("hasInvalidatedResolutions");
8208
8218
  this.resolveModuleNameLiterals = this.delegateMethod("resolveModuleNameLiterals");
8209
8219
  this.resolveTypeReferenceDirectiveReferences = this.delegateMethod("resolveTypeReferenceDirectiveReferences");
8220
+ this.jsDocParsingMode = this.delegateMethod("jsDocParsingMode");
8210
8221
  }
8211
8222
  delegateMethod(name) {
8212
8223
  return this.delegate[name] !== void 0 ? this.delegate[name].bind(this.delegate) : void 0;
@@ -8768,4 +8779,4 @@ export {
8768
8779
  * Use of this source code is governed by an MIT-style license that can be
8769
8780
  * found in the LICENSE file at https://angular.io/license
8770
8781
  */
8771
- //# sourceMappingURL=chunk-EKZWOVDR.js.map
8782
+ //# sourceMappingURL=chunk-MTZGVQDN.js.map