-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
perf(utils): optimize parse stack trace regexp #6123
base: main
Are you sure you want to change the base?
Conversation
packages/utils/src/source-map.ts
Outdated
// eslint-disable-next-line regexp/no-super-linear-backtracking,regexp/no-misleading-capturing-group,regexp/no-unused-capturing-group | ||
const matches = /(at\s+)?(async\s+)?([^\s@]+)?(?:@|\s+\()?([^\s()]+):(\d+):(\d+)\)?/.exec(line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling these ESLint rules is not convincing. Can we fix these errors as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check @AriPerkkio ? check also discord server, some hints there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add test case from #6039 that timeouts without this fix.
Added a test in the If you want to test it, change "test:browser:preview": "BROWSER=firefox PROVIDER=preview vitest",
"test:browser:playwright": "BROWSER=firefox PROVIDER=playwright vitest",
"test:browser:webdriverio": "BROWSER=firefox PROVIDER=webdriverio vitest" For example, running (check |
Seems like the current implementation breaks inline snapshots in the browser |
By "current", I mean this PR. It works fine in main. |
@userquin any luck fixing this issue? 🙏 🙏 🙏 |
Description
closes #6039
Check https://github.com/userquin/vitest-stacktrace-issue-6039
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.