talk icon indicating copy to clipboard operation
talk copied to clipboard

[CORL-3020]: update to pnpm

Open kabeaty opened this issue 1 year ago • 1 comments
trafficstars

What does this PR do?

These changes add fixes to address an issue with scripts not running everything as expected to remove npm-run-all and just use pnpm, plus updates how some args are passed through.

These changes update to use pnpm instead of npm as Coral's package manager.

To achieve this, it was necessary to:

  • Update scripts to use pnpm
  • Install some dependencies that weren't directly installed before
  • Update transformIgnorePatterns in jest config to include .pnpm symlink path (See https://jestjs.io/docs/configuration#transformignorepatterns-arraystring and its Tip section)

In this PR, we also override protobufjs in our server package.json to address a security update needed there.

These changes will impact:

  • [ ] commenters
  • [ ] moderators
  • [ ] admins
  • [x] developers

What changes to the GraphQL/Database Schema does this PR introduce?

none

Does this PR introduce any new environment variables or feature flags?

no

If any indexes were added, were they added to INDEXES.md?

n/a

How do I test this PR?

First, you'll need to get set up with pnpm. You can run npm install -g [email protected] Then you'll want to clear your node modules. Run sh scripts/clear-node_modules.sh Then you can run sh scripts/pnpm-ci.sh to install from the new pnpm-lock.yaml. (This is equivalent to package-lock.json) Then you can do all the usual things. pnpm run watch inside client and server to run Coral (Might need to run sh scripts/build.sh first if you see linting errors) pnpm run lint inside client and server to check linting (or sh scripts/lint.sh to run linting everywhere) pnpm run test inside client and server to check tests

Were any tests migrated to React Testing Library?

How do we deploy this PR?

kabeaty avatar Feb 20 '24 14:02 kabeaty

Deploy Preview for gallant-galileo-14878c ready!

Name Link
Latest commit 94e259eea7998af665885174812fbda0436cc058
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/65f44a70b30d59000818b77b
Deploy Preview https://deploy-preview-4548--gallant-galileo-14878c.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Feb 20 '24 14:02 netlify[bot]