Skip to content
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

Remove syntaxType option for record-and-tuple (parser&plugin) #16458

Merged
merged 10 commits into from May 2, 2024

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

@@ -27,6 +27,8 @@ if [ "$BABEL_8_BREAKING" = true ] ; then
sed -i 's/const generate = babelGenerator.default/const generate = babelGenerator/' scripts/build/transform/index.js
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
51 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the remove-rt-syntax-type branch May 2, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

4 participants