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

Update jest-runtime #14148

Merged
merged 8 commits into from
Jun 21, 2023
Merged

Update jest-runtime #14148

merged 8 commits into from
Jun 21, 2023

Conversation

BobdenOs
Copy link
Contributor

Include columnOffset property for Script allowing vscode to match the original file with the wrapped Script contents.

Summary

When debugging inside a jest test the vscode debugger is struggling to source map variables correctly. This applies for the hover variables and any debugger console vm scripts. This issue can be solved by setting transform as {}, but this comes with the side effect that now the original file can no longer be matched as the contents of the script includes the wrapper.

The length of the wrapper was already being tracked when applying the transformation. This information was only never passed along to the Script constructor.

Test plan

node docs

Include `columnOffset` property for `Script` allowing vscode to match the original file with the wrapped `Script` contents.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 17, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@netlify
Copy link

netlify bot commented May 17, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 114c6f7
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64922495b9ea37000886efb7
😎 Deploy Preview https://deploy-preview-14148--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks! 👍

Could you add a changelog entry and sign the CLA?

Add fix description
Fixes `Expected object keys to be in ascending order. 'columnOffset' should be before 'filename'`
@SimenB
Copy link
Member

SimenB commented May 24, 2023

Could you update the failing snapshots? Seems to only be e2e/__tests__/globals.test.ts

@SimenB SimenB merged commit 8cb542c into jestjs:main Jun 21, 2023
@SimenB
Copy link
Member

SimenB commented Jul 4, 2023

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants