PHOENIX-7981 Site build improvements - #38
Merged
Merged
Conversation
build.sh: Enforce the project’s required Node 22 runtime. If Node or npm are missing or a different Node major is active, install and switch to Node 22 through nvm. This avoids incompatibilities with the current Playwright dependency. unit-tests/setup.ts: Provide an in-memory localStorage implementation when the test environment lacks one. This prevents UI tests from failing Node versions where the experimental localStorage is disabled. Co-authored-by: GPT-5.6 Terra Medium <cursoragent@cursor.com>
virajjasani
approved these changes
Aug 5, 2026
There was a problem hiding this comment.
Pull request overview
This PR improves build reliability and unit test execution by ensuring a consistent Node.js major version during site builds and by providing a localStorage fallback for the Vitest happy-dom environment.
Changes:
- Add a
localStoragepolyfill in the unit test setup for environments where it is missing. - Update
build.shto bootstrap vianvmwhen the installed Node.js major version does not match the required major version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| unit-tests/setup.ts | Adds a localStorage polyfill for the Vitest runtime and adjusts test setup behavior. |
| build.sh | Enforces required Node.js major version and improves nvm sourcing/bootstrapping logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.