8000 Fix: always initialize ExportDeclaration attributes by JLHwung · Pull Request #17164 · babel/babel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: always initialize ExportDeclaration attributes #17164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 6, 2025

Conversation

JLHwung
Copy link
Contributor
@JLHwung JLHwung commented Mar 6, 2025
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
Copy link
Collaborator
babel-bot commented Mar 6, 2025

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
55 checks passed
@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
0