Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@
"@babel/generator": "7.22.15",
"@babel/helper-annotate-as-pure": "7.22.5",
"@babel/helper-split-export-declaration": "7.22.6",
"@babel/plugin-proposal-async-generator-functions": "7.20.7",
"@babel/plugin-transform-async-generator-functions": "7.22.5",
"@babel/plugin-transform-async-to-generator": "7.22.5",
"@babel/plugin-transform-runtime": "7.22.15",
"@babel/preset-env": "7.22.15",
"@babel/runtime": "7.22.15",
"@babel/template": "7.22.15",
"@bazel/bazelisk": "1.18.0",
"@bazel/buildifier": "6.3.3",
"@bazel/concatjs": "5.8.1",
Expand All @@ -95,7 +94,6 @@
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@types/babel__core": "7.20.1",
"@types/babel__template": "7.4.1",
"@types/browser-sync": "^2.27.0",
"@types/browserslist": "^4.15.0",
"@types/express": "^4.16.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/angular_devkit/build_angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,13 @@ ts_library(
"@npm//@babel/generator",
"@npm//@babel/helper-annotate-as-pure",
"@npm//@babel/helper-split-export-declaration",
"@npm//@babel/plugin-proposal-async-generator-functions",
"@npm//@babel/plugin-transform-async-generator-functions",
"@npm//@babel/plugin-transform-async-to-generator",
"@npm//@babel/plugin-transform-runtime",
"@npm//@babel/preset-env",
"@npm//@babel/runtime",
"@npm//@babel/template",
"@npm//@discoveryjs/json-ext",
"@npm//@types/babel__core",
"@npm//@types/babel__template",
"@npm//@types/browser-sync",
"@npm//@types/browserslist",
"@npm//@types/inquirer",
Expand Down
3 changes: 1 addition & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
"@babel/generator": "7.22.15",
"@babel/helper-annotate-as-pure": "7.22.5",
"@babel/helper-split-export-declaration": "7.22.6",
"@babel/plugin-proposal-async-generator-functions": "7.20.7",
"@babel/plugin-transform-async-generator-functions": "7.22.5",
"@babel/plugin-transform-async-to-generator": "7.22.5",
"@babel/plugin-transform-runtime": "7.22.15",
"@babel/preset-env": "7.22.15",
"@babel/runtime": "7.22.15",
"@babel/template": "7.22.15",
"@discoveryjs/json-ext": "0.5.7",
"@ngtools/webpack": "0.0.0-PLACEHOLDER",
"@vitejs/plugin-basic-ssl": "1.0.1",
Expand Down
6 changes: 0 additions & 6 deletions packages/angular_devkit/build_angular/src/babel-bazel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ declare module '@babel/core' {
declare module '@babel/generator' {
export { default } from '@types/babel__generator';
}
declare module '@babel/traverse' {
export { default } from '@types/babel__traverse';
}
declare module '@babel/template' {
export { default } from '@types/babel__template';
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function analyzeClassSiblings(
const wrapStatementPaths: NodePath<types.Statement>[] = [];
let hasPotentialSideEffects = false;
for (let i = 1; ; ++i) {
const nextStatement = origin.getSibling(+origin.key + i);
const nextStatement = origin.getSibling(+(origin.key ?? 0) + i);
if (!nextStatement.isExpressionStatement()) {
break;
}
Expand Down Expand Up @@ -213,7 +213,7 @@ export default function (): PluginObj {
// to a subsequent statement to prevent a JavaScript syntax error.
ExportDefaultDeclaration(path: NodePath<types.ExportDefaultDeclaration>, state: PluginPass) {
const declaration = path.get('declaration');
if (!declaration.isClassDeclaration()) {
if (!declaration.isClassDeclaration() || !declaration.node.id) {
return;
}

Expand All @@ -232,7 +232,8 @@ export default function (): PluginObj {
const { node: classNode, parentPath } = path;
const { wrapDecorators } = state.opts as { wrapDecorators: boolean };

if (visitedClasses.has(classNode)) {
// Skip if already visited or has no name
if (visitedClasses.has(classNode) || !classNode.id) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function (): PluginObj {
const hasExport =
parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration();
const origin = hasExport ? parentPath : path;
const nextStatement = origin.getSibling(+origin.key + 1);
const nextStatement = origin.getSibling(+(origin.key ?? 0) + 1);
if (!nextStatement.isExpressionStatement()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default function (api: unknown, options: ApplicationPresetOptions) {
// Always transform async/await to support Zone.js
plugins.push(
require('@babel/plugin-transform-async-to-generator').default,
require('@babel/plugin-proposal-async-generator-functions').default,
require('@babel/plugin-transform-async-generator-functions').default,
);
needRuntimeTransform = true;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_angular/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare module '@babel/helper-annotate-as-pure' {

declare module '@babel/helper-split-export-declaration' {
export default function splitExportDeclaration(
exportDeclaration: import('@babel/traverse').NodePath<
exportDeclaration: import('@babel/core').NodePath<
import('@babel/types').ExportDefaultDeclaration
>,
): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import {
NodePath,
ParseResult,
parseSync,
template as templateBuilder,
transformAsync,
transformFromAstSync,
traverse,
types,
} from '@babel/core';
import templateBuilder from '@babel/template';
import * as fs from 'fs/promises';
import * as path from 'path';
import { workerData } from 'worker_threads';
Expand Down
36 changes: 21 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@
tslib "^2.3.0"

"@angular/bazel@https://github.com/angular/bazel-builds.git#209efddd1c2cac304183971c2259e70a4a7b5f7b":
version "17.0.0-next.3+sha-05762b9"
uid "209efddd1c2cac304183971c2259e70a4a7b5f7b"
version "17.0.0-next.3"
resolved "https://github.com/angular/bazel-builds.git#209efddd1c2cac304183971c2259e70a4a7b5f7b"
dependencies:
"@microsoft/api-extractor" "^7.24.2"
Expand All @@ -140,7 +139,6 @@

"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#a870de5389e6533dd007b46512942249e7c82e95":
version "0.0.0-c95355fd247d8003f18dcd2f1a410b906566cab6"
uid a870de5389e6533dd007b46512942249e7c82e95
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#a870de5389e6533dd007b46512942249e7c82e95"
dependencies:
"@angular-devkit/build-angular" "16.2.0-rc.1"
Expand Down Expand Up @@ -301,7 +299,6 @@

"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#3e0d49e91578f0aa9ff6972ef7979df18c126c68":
version "0.0.0-c95355fd247d8003f18dcd2f1a410b906566cab6"
uid "3e0d49e91578f0aa9ff6972ef7979df18c126c68"
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#3e0d49e91578f0aa9ff6972ef7979df18c126c68"
dependencies:
"@yarnpkg/lockfile" "^1.1.0"
Expand Down Expand Up @@ -820,6 +817,16 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-transform-async-generator-functions@7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz#7336356d23380eda9a56314974f053a020dab0c3"
integrity sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==
dependencies:
"@babel/helper-environment-visitor" "^7.22.5"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/helper-remap-async-to-generator" "^7.22.5"
"@babel/plugin-syntax-async-generators" "^7.8.4"

"@babel/plugin-transform-async-generator-functions@^7.22.15", "@babel/plugin-transform-async-generator-functions@^7.22.7":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.15.tgz#3b153af4a6b779f340d5b80d3f634f55820aefa3"
Expand Down Expand Up @@ -1436,15 +1443,6 @@
dependencies:
regenerator-runtime "^0.13.11"

"@babel/template@7.22.15", "@babel/template@^7.22.15", "@babel/template@^7.22.5":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
dependencies:
"@babel/code-frame" "^7.22.13"
"@babel/parser" "^7.22.15"
"@babel/types" "^7.22.15"

"@babel/template@7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec"
Expand All @@ -1454,6 +1452,15 @@
"@babel/parser" "^7.22.5"
"@babel/types" "^7.22.5"

"@babel/template@^7.22.15", "@babel/template@^7.22.5":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
dependencies:
"@babel/code-frame" "^7.22.13"
"@babel/parser" "^7.22.15"
"@babel/types" "^7.22.15"

"@babel/traverse@^7.22.15", "@babel/traverse@^7.22.17", "@babel/traverse@^7.22.5", "@babel/traverse@^7.22.8":
version "7.22.17"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.17.tgz#b23c203ab3707e3be816043081b4a994fcacec44"
Expand Down Expand Up @@ -3301,7 +3308,7 @@
dependencies:
"@babel/types" "^7.0.0"

"@types/babel__template@*", "@types/babel__template@7.4.1":
"@types/babel__template@*":
version "7.4.1"
resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969"
integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==
Expand Down Expand Up @@ -11079,7 +11086,6 @@ sass@1.66.1, sass@^1.55.0:

"sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz":
version "0.0.0"
uid "9310bc860f7870a1f872b11c4dc6073a1ad34e5e"
resolved "https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz#9310bc860f7870a1f872b11c4dc6073a1ad34e5e"

saucelabs@^1.5.0:
Expand Down