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: limit the number of globals defined due to the v8 snapshot #25051

Merged
merged 7 commits into from Dec 8, 2022

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Dec 8, 2022

User facing changelog

Limit the number of globals defined in memory due to the v8 snapshot

Additional details

We inadvertently created a bunch of globals when setting things up in the v8 snapshot. Specifically:

snapshotAuxiliaryData
validateToString
validateElectron
validateFs
validateCrypto
validateFile
integrityCheck
generateSnapshot
supportTypeScript
getSnapshotResult

In the spirit of only exposing what is necessary, we are going to ensure that we are only exposing getSnapshotResult and supportTypeScript. We do this by wrapping the entire snapshot creation inside of an IIFE.

Steps to test

Ultimately, this can be tested by validate that the tests are passing on the PR and that the new smoke test is passing.

How has the user experience changed?

n/a

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 8, 2022

Thanks for taking the time to open a PR!

@@ -109,101 +109,110 @@ export function scriptFromBlueprint (config: BlueprintConfig): {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is more easily reviewed by ignoring whitespace changes.

image

@cypress
Copy link

cypress bot commented Dec 8, 2022



Test summary

196 0 26 0Flakiness 2


Run details

Project cypress
Status Passed
Commit 1b9b2f5
Started Dec 8, 2022 3:26 PM
Ended Dec 8, 2022 3:40 PM
Duration 13:30 💡
OS Windows 10.0.17763
Browser Chrome 108

View run in Cypress Dashboard ➡️


Flakiness

cypress\e2e\scaffold-component-testing.cy.ts Flakiness
1 scaffolding component testing > svelte-webpack-unconfigured > Scaffolds component testing for Svelte using webpack
cypress\e2e\top-nav-launchpad.cy.ts Flakiness
1 ... > global mode > shows "continue" button after login if project selected

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ryanthemanuel ryanthemanuel merged commit f9541af into develop Dec 8, 2022
@ryanthemanuel ryanthemanuel deleted the ryanm/fix/issue-with-integrity-check branch December 8, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants