@angular/compiler-cli 20.1.0 → 20.1.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.
Files changed (43) hide show
  1. package/bundles/{chunk-SEKYV57I.js → chunk-6HOSNZU5.js} +2 -3
  2. package/bundles/{chunk-FPHHL4UV.js → chunk-BPDNYZBC.js} +253 -49
  3. package/bundles/chunk-DWRM7PIK.js +14 -0
  4. package/bundles/{chunk-TPEB2IXF.js → chunk-GWZQLAGK.js} +35 -7
  5. package/bundles/{chunk-UZOSFHTN.js → chunk-GXMJGI7A.js} +1835 -401
  6. package/bundles/{chunk-PML5JK7B.js → chunk-HYJ2H3FU.js} +120 -7
  7. package/bundles/{chunk-6ECVYRSU.js → chunk-I2BHWRAU.js} +11 -6
  8. package/bundles/{chunk-JXYBFWGA.js → chunk-JWGODKML.js} +19 -7
  9. package/bundles/{chunk-5TMRGUHP.js → chunk-NA3RDKZL.js} +27 -11
  10. package/bundles/{chunk-5JF7HF3W.js → chunk-SZY7NM6F.js} +2 -3
  11. package/bundles/{chunk-YNE6T2TY.js → chunk-WX5V4QZA.js} +568 -102
  12. package/bundles/index.js +34 -19
  13. package/bundles/linker/babel/index.js +70 -18
  14. package/bundles/linker/index.js +11 -5
  15. package/bundles/private/localize.js +5 -6
  16. package/bundles/private/migrations.js +5 -6
  17. package/bundles/private/tooling.js +27 -11
  18. package/bundles/src/bin/ng_xi18n.js +11 -12
  19. package/bundles/src/bin/ngc.js +9 -10
  20. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  21. package/package.json +2 -2
  22. package/bundles/chunk-2FHBFXPC.js +0 -34
  23. package/bundles/chunk-2FHBFXPC.js.map +0 -6
  24. package/bundles/chunk-5JF7HF3W.js.map +0 -6
  25. package/bundles/chunk-5TMRGUHP.js.map +0 -6
  26. package/bundles/chunk-6ECVYRSU.js.map +0 -6
  27. package/bundles/chunk-FPHHL4UV.js.map +0 -6
  28. package/bundles/chunk-JXYBFWGA.js.map +0 -6
  29. package/bundles/chunk-KPQ72R34.js +0 -23
  30. package/bundles/chunk-KPQ72R34.js.map +0 -6
  31. package/bundles/chunk-PML5JK7B.js.map +0 -6
  32. package/bundles/chunk-SEKYV57I.js.map +0 -6
  33. package/bundles/chunk-TPEB2IXF.js.map +0 -6
  34. package/bundles/chunk-UZOSFHTN.js.map +0 -6
  35. package/bundles/chunk-YNE6T2TY.js.map +0 -6
  36. package/bundles/index.js.map +0 -6
  37. package/bundles/linker/babel/index.js.map +0 -6
  38. package/bundles/linker/index.js.map +0 -6
  39. package/bundles/private/localize.js.map +0 -6
  40. package/bundles/private/migrations.js.map +0 -6
  41. package/bundles/private/tooling.js.map +0 -6
  42. package/bundles/src/bin/ng_xi18n.js.map +0 -6
  43. package/bundles/src/bin/ngc.js.map +0 -6
@@ -0,0 +1,14 @@
1
+
2
+ import {createRequire as __cjsCompatRequire} from 'module';
3
+ const require = __cjsCompatRequire(import.meta.url);
4
+
5
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
6
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
7
+ }) : x)(function(x) {
8
+ if (typeof require !== "undefined") return require.apply(this, arguments);
9
+ throw Error('Dynamic require of "' + x + '" is not supported');
10
+ });
11
+
12
+ export {
13
+ __require
14
+ };
@@ -3,7 +3,7 @@
3
3
  const require = __cjsCompatRequire(import.meta.url);
4
4
 
5
5
 
6
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/invalid_file_system.js
6
+ // packages/compiler-cli/src/ngtsc/file_system/src/invalid_file_system.js
7
7
  var InvalidFileSystem = class {
8
8
  exists(path) {
9
9
  throw makeError();
@@ -91,7 +91,7 @@ function makeError() {
91
91
  return new Error("FileSystem has not been configured. Please call `setFileSystem()` before calling this method.");
92
92
  }
93
93
 
94
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/util.js
94
+ // packages/compiler-cli/src/ngtsc/file_system/src/util.js
95
95
  var TS_DTS_JS_EXTENSION = /(?:\.d)?\.ts$|\.js$/;
96
96
  function normalizeSeparators(path) {
97
97
  return path.replace(/\\/g, "/");
@@ -107,7 +107,7 @@ function getSourceFileOrError(program, fileName) {
107
107
  return sf;
108
108
  }
109
109
 
110
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/helpers.js
110
+ // packages/compiler-cli/src/ngtsc/file_system/src/helpers.js
111
111
  var fs = new InvalidFileSystem();
112
112
  function getFileSystem() {
113
113
  return fs;
@@ -164,7 +164,7 @@ function toRelativeImport(relativePath) {
164
164
  return isLocalRelativePath(relativePath) ? `./${relativePath}` : relativePath;
165
165
  }
166
166
 
167
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/compiler_host.js
167
+ // packages/compiler-cli/src/ngtsc/file_system/src/compiler_host.js
168
168
  import * as os from "os";
169
169
  import ts from "typescript";
170
170
  var NgtscCompilerHost = class {
@@ -224,8 +224,14 @@ var NgtscCompilerHost = class {
224
224
  }
225
225
  };
226
226
 
227
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/logical.js
227
+ // packages/compiler-cli/src/ngtsc/file_system/src/logical.js
228
228
  var LogicalProjectPath = {
229
+ /**
230
+ * Get the relative path between two `LogicalProjectPath`s.
231
+ *
232
+ * This will return a `PathSegment` which would be a valid module specifier to use in `from` when
233
+ * importing from `to`.
234
+ */
229
235
  relativePathBetween: function(from, to) {
230
236
  const relativePath = relative(dirname(resolve(from)), resolve(to));
231
237
  return toRelativeImport(relativePath);
@@ -233,17 +239,40 @@ var LogicalProjectPath = {
233
239
  };
234
240
  var LogicalFileSystem = class {
235
241
  compilerHost;
242
+ /**
243
+ * The root directories of the project, sorted with the longest path first.
244
+ */
236
245
  rootDirs;
246
+ /**
247
+ * The same root directories as `rootDirs` but with each one converted to its
248
+ * canonical form for matching in case-insensitive file-systems.
249
+ */
237
250
  canonicalRootDirs;
251
+ /**
252
+ * A cache of file paths to project paths, because computation of these paths is slightly
253
+ * expensive.
254
+ */
238
255
  cache = /* @__PURE__ */ new Map();
239
256
  constructor(rootDirs, compilerHost) {
240
257
  this.compilerHost = compilerHost;
241
258
  this.rootDirs = rootDirs.concat([]).sort((a, b) => b.length - a.length);
242
259
  this.canonicalRootDirs = this.rootDirs.map((dir) => this.compilerHost.getCanonicalFileName(dir));
243
260
  }
261
+ /**
262
+ * Get the logical path in the project of a `ts.SourceFile`.
263
+ *
264
+ * This method is provided as a convenient alternative to calling
265
+ * `logicalPathOfFile(absoluteFromSourceFile(sf))`.
266
+ */
244
267
  logicalPathOfSf(sf) {
245
268
  return this.logicalPathOfFile(absoluteFromSourceFile(sf));
246
269
  }
270
+ /**
271
+ * Get the logical path in the project of a source file.
272
+ *
273
+ * @returns A `LogicalProjectPath` to the source file, or `null` if the source file is not in any
274
+ * of the TS project's root directories.
275
+ */
247
276
  logicalPathOfFile(physicalFile) {
248
277
  if (!this.cache.has(physicalFile)) {
249
278
  const canonicalFilePath = this.compilerHost.getCanonicalFileName(physicalFile);
@@ -273,7 +302,7 @@ function isWithinBasePath(base, path) {
273
302
  return isLocalRelativePath(relative(base, path));
274
303
  }
275
304
 
276
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/ts_read_directory.js
305
+ // packages/compiler-cli/src/ngtsc/file_system/src/ts_read_directory.js
277
306
  import ts2 from "typescript";
278
307
  function createFileSystemTsReadDirectoryFn(fs2) {
279
308
  if (ts2.matchFiles === void 0) {
@@ -335,4 +364,3 @@ export {
335
364
  * Use of this source code is governed by an MIT-style license that can be
336
365
  * found in the LICENSE file at https://angular.dev/license
337
366
  */
338
- //# sourceMappingURL=chunk-TPEB2IXF.js.map