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(gatsby): don't serve codeframes for files outside of compilation (#38059) #38063

Merged
merged 1 commit into from
May 5, 2023

Conversation

gatsbybot
Copy link
Collaborator

Backporting #38059 to the 4.25 release branch

(cherry picked from commit ed5855e)

…38059)

* test: add test case for overlay handlers

* fix: don't serve codeframes for files outside of compilation

(cherry picked from commit ed5855e)
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 5, 2023
@pieh pieh removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 5, 2023
Comment on lines +4 to +10
it(`__file-code-frame`, () => {
cy.request(
`__file-code-frame?filePath=${cwd}/SHOULD_NOT_SERVE&lineNumber=0`
).should(response => {
expect(response.body.codeFrame).not.to.match(/CYPRESS-MARKER/)
})
})
Copy link
Contributor

Choose a reason for hiding this comment

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

v4 doesn't have the other endpoint (__original-stack-frame with skipSourceMap param) that would serve content outside of.

We probably should streamline this in v5 to have single handler instead of 2 the basically do same thing just used in different places, but that's outside of scope of this

@pieh pieh merged commit fc22f4b into release/4.25 May 5, 2023
@pieh pieh deleted the backport-4.25-38059 branch May 5, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants