Visitar URL original
Fix: always initialize ExportDeclaration attributes by JLHwung · Pull Request #17164 · babel/babel · GitHub
Skip to content

Fix: always initialize ExportDeclaration attributes - #17164

Merged
JLHwung merged 8 commits into
babel:mainfrom
JLHwung:fix-failing-main
Mar 6, 2025
Merged

JLHwung merged 8 commits into
babel:mainfrom
JLHwung:fix-failing-main

Conversation

@JLHwung

@JLHwung JLHwung commented Mar 6, 2025 •

Copy link
Copy Markdown
Contributor
Q                       A
Fixed Issues? Failing e2e test: https://github.com/babel/babel/actions/runs/13684336191/job/38264467179?pr=17163
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

The CI is failing because recently espree supported the ES2025 import attributes. espree always initialize attributes for the export declaration while Babel only do so when we see the from ... source.

I think this is a bug for us since we already handle it in the espree's way for the legacy import assertions, but somehow it is overlooked in import attributes. Here we will initialize attributes property unless importAssertions plugin is enabled.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories PR: Fixes failing main labels Mar 6, 2025
@babel-bot

babel-bot commented Mar 6, 2025 •

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58815

@JLHwung
JLHwung merged commit 74f5d6d into babel:main Mar 6, 2025
@JLHwung
JLHwung deleted the fix-failing-main branch March 6, 2025 20:29
laine-hallot pushed a commit to laine-hallot/uwu-parser that referenced this pull request Mar 31, 2025
* chore: bump eslint and espree

* fix: always initialize ExportDeclaration attributes

* update AST fixtures

* fix: initialize attributes when importAssertions is not enabled

* update AST fixtures

* update test snapshot

* update Makefile.js

* update Babel 8 AST fixtures
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jun 6, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories PR: Fixes failing main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants