@angular/compiler-cli 14.0.0-next.4 → 14.0.0-next.5

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.
@@ -28,6 +28,7 @@
28
28
  import * as _babelNamespace from '@babel/core';
29
29
  import _typesNamespace = _babelNamespace.types;
30
30
  export import types = _typesNamespace;
31
+ export declare type BabelFile = _babelNamespace.BabelFile;
31
32
  export declare type PluginObj = _babelNamespace.PluginObj;
32
33
  export declare type ConfigAPI = _babelNamespace.ConfigAPI;
33
34
  export declare type NodePath<T = _babelNamespace.Node> = _babelNamespace.NodePath<T>;
@@ -9,7 +9,7 @@
9
9
  import { NodePath, Scope } from '@babel/traverse';
10
10
  import { DeclarationScope } from '../../../linker';
11
11
  import { types as t } from './babel_core';
12
- export declare type ConstantScopePath = NodePath<t.Function | t.Program>;
12
+ export declare type ConstantScopePath = NodePath<t.FunctionDeclaration> | NodePath<t.FunctionExpression> | NodePath<t.Program>;
13
13
  /**
14
14
  * This class represents the lexical scope of a partial declaration in Babel source code.
15
15
  *
@@ -9,7 +9,7 @@
9
9
  import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
10
10
  import { PackageJsonUpdater } from '../writing/package_json_updater';
11
11
  import { EntryPointPackageJson, PackageJsonFormatProperties } from './entry_point';
12
- export declare const NGCC_VERSION = "14.0.0-next.4";
12
+ export declare const NGCC_VERSION = "14.0.0-next.5";
13
13
  /**
14
14
  * Returns true if there is a format in this entry-point that was compiled with an outdated version
15
15
  * of ngcc.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "14.0.0-next.4",
3
+ "version": "14.0.0-next.5",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -53,7 +53,7 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@babel/core": "^7.8.6",
56
+ "@babel/core": "^7.17.2",
57
57
  "reflect-metadata": "^0.1.2",
58
58
  "chokidar": "^3.0.0",
59
59
  "convert-source-map": "^1.5.1",
@@ -65,7 +65,7 @@
65
65
  "yargs": "^17.2.1"
66
66
  },
67
67
  "peerDependencies": {
68
- "@angular/compiler": "14.0.0-next.4",
68
+ "@angular/compiler": "14.0.0-next.5",
69
69
  "typescript": ">=4.4.2 <4.6"
70
70
  },
71
71
  "repository": {
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { BabelFile, types as t } from '@babel/core';
9
+
10
+ /**
11
+ * Augment some Babel types to add symbols that we rely on, but are not included in the Babel typings.
12
+ */
13
+
14
+ declare module '@babel/traverse' {
15
+ interface Hub {
16
+ file: BabelFile;
17
+ }
18
+ }
19
+
20
+ declare module '@babel/core' {
21
+ interface BabelFile {
22
+ buildCodeFrameError(node: t.Node, message: string): Error;
23
+ }
24
+ }
25
+
26
+ // The following modules are declared to work around a limitation in tsc_wrapped's `strict_deps`
27
+ // check. Since Babel uses scoped packages, the corresponding lookup for declaration files in the
28
+ // `node_modules/@types/` directory follows a special strategy: the `@types` package has to be
29
+ // named `{scope}__{package}`, e.g. `@types/babel__generator`. When `tsc` performs module
30
+ // resolution for the `@babel/generator` module specifier, it will first try the `paths` mappings
31
+ // but resolution through path mappings does _not_ apply this special naming convention rule for
32
+ // `@types` packages, `tsc` only applies that rule in its `@types` resolution step. Consequently,
33
+ // the path mapping into Bazel's private `node_modules` directory fails to resolve, causing `tsc`
34
+ // to find the nearest `node_modules` directory in an ancestor directory of the origin source
35
+ // file. This finds the `node_modules` directory in the workspace, _not_ Bazel's private copy of
36
+ // `node_modules` and therefore the `@types` end up being resolved from a `node_modules` tree
37
+ // that is not governed by Bazel, and therefore not expected by the `strict_deps` rule.
38
+ // Declaring the modules here allows `strict_deps` to always find a declaration of the modules
39
+ // in an input file to the compilation, therefore accepting the module import.
40
+ declare module '@babel/generator' {}
41
+ declare module '@babel/template' {}
42
+ declare module '@babel/parser' {}