Skip to content
New issue

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

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

Already on GitHub? # to your account

perf: improve multilineCommentsRE regex (fix #10689) #10751

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

mrkldshv
Copy link
Contributor

@mrkldshv mrkldshv commented Nov 1, 2022

Description

Update multilineCommentsRE regular expression to more performant without lazy modifier.
Regex is based on https://stackoverflow.com/a/36328890.

Close #10689.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@mrkldshv mrkldshv changed the title fix(node/utils): update multilineCommentsRE regex (fix #10689) fix(node/utils): update multilineCommentsRE regex to be more performant (fix #10689) Nov 1, 2022
@bluwy bluwy changed the title fix(node/utils): update multilineCommentsRE regex to be more performant (fix #10689) perf: improve multilineCommentsRE regex (fix #10689) Nov 2, 2022
@bluwy bluwy enabled auto-merge (squash) November 3, 2022 07:30
@bluwy
Copy link
Member

bluwy commented Nov 3, 2022

Wait I didn't realize the mac CI is constantly failing 😅 looks like it's a lot more flaky recently.

@bluwy bluwy merged commit 51ed059 into vitejs:main Nov 3, 2022
@mrkldshv mrkldshv deleted the fix/multiline-comments-regex branch November 3, 2022 08:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vite plugin css, build crash
3 participants