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

Switch from NPM to PNPM for package management #1818

Merged
merged 12 commits into from
May 27, 2024
Merged

Commits on May 24, 2024

  1. Switch from NPM to PNPM as package tool

    Advantage of PNPM is speed and storage size on disk: if you have
    multiple projects using the same NPM package, NPM will store multiple
    copies, but PNPM will store only one copy and share it between projects.
    
    Most recent version of PNPM also requires Node version 18 or later, so
    we'll bump any Node 16 references to most recent Node (22.2.0).
    rmunn committed May 24, 2024
    Configuration menu
    Copy the full SHA
    9a6bf9b View commit details
    Browse the repository at this point in the history
  2. Don't copy node_modules from dev, run pnpm i in Docker

    Also lets us remove the rebuild of node-sass, which was needed for devs
    running a different architecture on their dev machines than the
    architecture the Docker containers are built for (e.g. devs running Macs
    with ARM chips, when the Docker containers we build are for x64).
    rmunn committed May 24, 2024
    Configuration menu
    Copy the full SHA
    70dc91d View commit details
    Browse the repository at this point in the history
  3. Bump version of date-fns to fix build error

    Version 2 of date-fns had some assumptions built into the package about
    the layout of node_modules that aren't true when pnpm is managing it.
    Version 3 of date-fns fixed those assumptions.
    rmunn committed May 24, 2024
    Configuration menu
    Copy the full SHA
    f5788f3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d25eea2 View commit details
    Browse the repository at this point in the history
  5. Use build targets to reduce unneeded builds

    By specifying `target: development` in docekr-compose.yml, we get the
    same effect as specifying `docker build --target=development`: with
    buildx, unused build stages (e.g., prod stages) are skipped.
    rmunn committed May 24, 2024
    Configuration menu
    Copy the full SHA
    046458b View commit details
    Browse the repository at this point in the history
  6. Add pnpm/action-setup

    myieye committed May 24, 2024
    Configuration menu
    Copy the full SHA
    7c6ed8a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    654627b View commit details
    Browse the repository at this point in the history
  8. Add missing pnpm/action-setup

    myieye committed May 24, 2024
    Configuration menu
    Copy the full SHA
    d65aacb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d4b2dc6 View commit details
    Browse the repository at this point in the history
  10. Fix yaml syntax

    myieye committed May 24, 2024
    Configuration menu
    Copy the full SHA
    823fcdb View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. Switch remaining pnpx cases to pnpm exec

    One case switched to pnpm dlx instead of pnpm exec because there's no
    package.json or node_modules in the test/e2e folder so pnpm exec would
    fail, but pnpm dlx will run the tool globally regardless of location.
    rmunn committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ed5d194 View commit details
    Browse the repository at this point in the history
  2. Need pnpm dlx in check-code-formatting workflow

    Can't use `pnpm exec` here either since it's being run in a step where
    `pnpm i` has *not* happened, so there's no prettier binary to run.
    rmunn committed May 27, 2024
    Configuration menu
    Copy the full SHA
    f9f550d View commit details
    Browse the repository at this point in the history