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

fix: remove the unnecessary logic for inserting semicolons #7615

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

inottn
Copy link
Collaborator

@inottn inottn commented Aug 19, 2024

Summary

fix #7611

  1. We don't need to insert a semicolon for ExportDefaultDeclaration:
export default function () {} // No need to insert a semicolon
export default class MyClass {}
  1. For ExportDeclaration, when a semicolon needs to be inserted, the corresponding Visit will be triggered:
export function foo() {} // No need to insert a semicolon
export const bar = 42 // It will call visit_var_decl to insert a semicolon

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Aug 19, 2024
Copy link

netlify bot commented Aug 19, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit d1a6cad
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66c3892821d8e80008dd9918

@h-a-n-a
Copy link
Contributor

h-a-n-a commented Aug 20, 2024

Thanks. I will update tests in the upcoming PR.

@h-a-n-a h-a-n-a merged commit 374ae5f into web-infra-dev:main Aug 20, 2024
33 checks passed
@chenjiahan chenjiahan mentioned this pull request Aug 23, 2024
@inottn inottn deleted the fix/7611 branch October 10, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Regression between beta4 and beta5 semicolon incorrectly added.
2 participants