Switch from NPM to PNPM for package management by rmunn · Pull Request #1818 · sillsdev/web-languageforge
added 4 commits
May 24, 2024 10:46Advantage 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).
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).
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
added
the
engineering
label
May 24, 2024By 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
mentioned this pull request
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
deleted the
chore/switch-to-pnpm
branch
rmunn
mentioned this pull request
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