Skip to content

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Apr 30, 2024

Q                       A
Fixed Issues? Ref #16456
Patch: Bug Fix?
Major: Breaking Change? Yes
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we remove the syntaxType option from the @babel/plugin-proposal-record-and-tuple and the Babel parser plugin recordAndTuple for Babel 8.

I suggest we deprecate syntaxType: "bar" and default to syntaxType: "hash" starting from Babel 7.25, as users will have longer time window to migrate to the hash syntax or update their Babel configs.

@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release PR: Needs Docs labels Apr 30, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Apr 30, 2024

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

@JLHwung JLHwung force-pushed the remove-rt-syntax-type branch from 7f6d472 to 71f94b0 Compare April 30, 2024 18:40
@JLHwung JLHwung mentioned this pull request Apr 30, 2024
7 tasks
sed -i 's/,"updateContext":null//g' tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap
rm tests/unit/__snapshots__/visitor-keys.js.snap
# Update recordAndTuple usage
sed -i 's/\["recordAndTuple", { syntaxType: "hash" }\]/"recordAndTuple"/' src/language-js/parse/babel.js
Copy link
Contributor Author

Choose a reason for hiding this comment

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

/cc @fisker We plan to remove the syntaxType option in Babel 8. The syntax will always be hash.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks!

@nicolo-ribaudo nicolo-ribaudo changed the title Remove syntaxType option from the record-and-tuple plugin and babel parser Remove syntaxType option for record-and-tuple (parser&plugin) May 2, 2024
@nicolo-ribaudo nicolo-ribaudo merged commit 97c3eb1 into babel:main May 2, 2024
@nicolo-ribaudo nicolo-ribaudo deleted the remove-rt-syntax-type branch May 2, 2024 13:53
@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 Aug 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2024
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: Breaking Change 💥 A type of pull request used for our changelog categories for next major release PR: Needs Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants