Skip to content

chore: improve install script and yarn config#12576

Merged
seidior merged 1 commit intomainfrom
install-script-updates
Feb 24, 2026
Merged

chore: improve install script and yarn config#12576
seidior merged 1 commit intomainfrom
install-script-updates

Conversation

@seidior
Copy link
Member

@seidior seidior commented Feb 24, 2026

Description

Improves the reliability and maintainability of the local development install script and Yarn configuration. The install script now runs idempotently (skipping steps already completed), adds a Python virtual environment setup step, improves NVM detection and sourcing, adds section progress headers, and uses set -euo pipefail for safer execution. The README is updated to use source scripts/install.sh so NVM and virtual environment activations persist in the calling shell. Yarn's .yarnrc.yml is updated with log filters to suppress known noisy warnings and package extensions to mark common optional peer dependencies.

This means the install script is overall less chatty and on subsequent runs executes faster while still maintaining a reliable setup environment.

Approach

  • The install script must now be run via source scripts/install.sh (not ./scripts/install.sh) so that NVM and the Python virtual environment are activated in the current shell session. The README has been updated to reflect this.
  • The script sets up a .venv Python virtual environment and installs requirements.txt on first run (or when requirements.txt changes). Subsequent runs skip this step.
  • Colima service start and colima start are now guarded to skip if already running.

Steps to Test

  1. From the repository root, run source scripts/install.sh on a machine where all or some dependencies are already installed.
  2. Verify that already-installed steps (Homebrew, Colima, NVM, Python venv) are skipped with appropriate messages rather than re-run.
  3. Run the script a second time and confirm it completes without errors and skips all already-completed steps.
  4. Verify nvm and the Python virtual environment are active in the shell after sourcing, and the correct version of Node.js is available in the shell.
  5. Run yarn start:dev to confirm the dependency changes do not break the build.

Notes

  • The switch from command -v nvm to checking for $HOME/.nvm/nvm.sh is necessary because NVM is a shell function, not a binary, and may not be on PATH when the script is sourced in a fresh shell context.
  • Log filters added to .yarnrc.yml suppress peer dependency warnings for packages known to have incorrect or overly strict peer dep declarations (e.g., Storybook, Decap CMS, various AWS SDK packages). This reduces noise during yarn install without hiding actionable warnings.
  • The resolutions block for @types/react and @types/react-dom was removed from web/package.json as it is no longer needed.
    • This is because the resolutions block is defined at the root and is not needed in the subdirectories.

Code author checklist

  • I have rebased this branch from the latest main branch
  • I have performed a self-review of my code
  • My code follows the style guide
  • I have created and/or updated relevant documentation on the engineering documentation website
  • I have not used any relative imports
  • I have pruned any instances of unused code
  • I have not added any markdown to labels, titles and button text in config
  • If I added/updated any values in userData (including profileData, formationData etc), then I added a new migration file
  • I have checked for and removed instances of unused config from CMS
  • If I added any new collections to the CMS config, then I updated the search tool and cmsCollections.ts (see CMS Additions in Engineering Reference/FAQ on the engineering documentation site)
  • I have updated relevant .env values in .env-template, in Bitwarden, and in our workspaces
  • I have added the request-reviewer tag on github to request reviews

@seidior seidior marked this pull request as ready for review February 24, 2026 16:39
@seidior seidior added the request-review Add this label for Pickaroo to automatically select reviewers from the "business-dev" team label Feb 24, 2026
@seidior seidior force-pushed the install-script-updates branch from 1113cfa to 5aea1dd Compare February 24, 2026 20:16
@seidior seidior force-pushed the install-script-updates branch from 5aea1dd to 04ddbf0 Compare February 24, 2026 20:59
@seidior seidior merged commit f632a9d into main Feb 24, 2026
2 checks passed
@seidior seidior deleted the install-script-updates branch February 24, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

request-review Add this label for Pickaroo to automatically select reviewers from the "business-dev" team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants