Skip to content

Use t.buildUndefinedNode instead of Scope#buildUndefinedNode#33020

Merged
clydin merged 2 commits intoangular:mainfrom
nicolo-ribaudo:patch-1
Apr 17, 2026
Merged

Use t.buildUndefinedNode instead of Scope#buildUndefinedNode#33020
clydin merged 2 commits intoangular:mainfrom
nicolo-ribaudo:patch-1

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Contributor

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current/new behavior?

Babel 8 is likely going to remove the variant on Scope#, since this method has not needed scope-specific information in ages.

Does this PR introduce a breaking change?

  • Yes
  • No

This package depends on Babel 7.29.0, which supports t.buildUndefinedNode.

Other information

Ref babel/babel#17937

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the elide-angular-metadata Babel plugin to utilize the types object provided by the plugin factory for generating undefined nodes, replacing the previous usage of path.scope.buildUndefinedNode(). Feedback suggests adding an explicit type annotation to the destructured types parameter to prevent implicit any types and improve code maintainability.

Comment thread packages/angular/build/src/tools/babel/plugins/elide-angular-metadata.ts Outdated
…e#buildUndefinedNode`

Babel 8 is _likely_ going to remove the variant on `Scope#`, since this method has not needed scope-specific information in ages.
@alan-agius4 alan-agius4 added the target: minor This PR is targeted for the next minor release label Apr 17, 2026
Copy link
Copy Markdown
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed target: minor This PR is targeted for the next minor release labels Apr 17, 2026
@clydin clydin merged commit 8b62c18 into angular:main Apr 17, 2026
35 checks passed
@clydin
Copy link
Copy Markdown
Member

clydin commented Apr 17, 2026

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants