feat: migrate frontend to pnpm#9172
Conversation
| id="emails" | ||
| isRequired | ||
| isInvalid={staticTagInputErrorMessage} | ||
| isInvalid={!!staticTagInputErrorMessage} |
|
issue: could we explore why |
21dc2ad to
65fad4b
Compare
| skip: dependabot/** | ||
| # Only run when the react-email-preview directory has changes | ||
| untraced: '!(react-email-preview)/**' | ||
| # untraced: '!(react-email-preview)/**' |
There was a problem hiding this comment.
question: is this supposed to be commented out?
| key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }} | ||
| fail-on-cache-miss: true | ||
| - run: npm run lint:frontend | ||
| - run: pnpm lint-ci |
There was a problem hiding this comment.
issue: seems like lint-ci is meant to lint the backend src/ directory. is pnpm lint:frontend expected instead?
| "@chakra-ui/anatomy": "^2.3.4", | ||
| "@chakra-ui/checkbox": "^2.3.2", | ||
| "@chakra-ui/form-control": "^2.2.0", | ||
| "@chakra-ui/hooks": "^2.4.2", |
There was a problem hiding this comment.
info: btw, we can check what version we were using by searching in the old package.json. This here enforces a version bump for some of these dependencies, which we may not want to do to reduce risk this change.
There was a problem hiding this comment.
for example, we were using
"node_modules/@chakra-ui/hooks": {
"version": "2.2.1",
| "prepare": "husky", | ||
| "pre-commit": "lint-staged", | ||
| "storybook": "npm run --prefix frontend storybook", | ||
| "postinstall:frontend": "npm --prefix frontend install --legacy-peer-deps", |
There was a problem hiding this comment.
question: just for my understanding, how does pnpm resolve peer deps differently?
| - name: Install BE dependencies | ||
| working-directory: src | ||
| run: npm i | ||
| # - name: Install BE dependencies |
| "@chakra-ui/checkbox": "^2.3.2", | ||
| "@chakra-ui/form-control": "^2.2.0", | ||
| "@chakra-ui/hooks": "^2.2.1", | ||
| "@chakra-ui/layout": "^2.1.0", |
… resolved build issues
f2485ff to
d6b61a4
Compare
|
lgtm! |
* feat: migrate shared to pnpm (#9163) * feat: migrate shared to pnpm * feat: update ci to support pnpm * feat: install eslint in shared * feat: update ci scripts to install pnpm, remove pnpm caching * feat: update chromatic script with pnpm * feat: use common env for pnpm and npm and pin to specific * Merge pull request #9162 from opengovsg/feat/migrate-serverless-virus-scanner-to-pnpm feat: migrate serverless virus scanner to pnpm * feat: migrate backend to pnpm (#9164) * feat: migrate backend to pnpm * feat: use pnpm in ci scripts * feat: install missing deps and fix typing * feat: add pnpm installation to ci jobs * feat: update playwright and ci * feat: use pnpm for build * feat: create shared pnpm base * feat: use shared env version * feat: remove ebs files (#9170) * feat: remove ebextensions * feat: remove dockerrun used for ebs * feat: migrate serverless pdf lambda to pnpm (#9167) * feat: migrate pdf lambda from npm to pnpm * feat: replace ci yml scripts and build.sh to use pnpm * chore: remove --frozen-lockfile * feat: updated deploy-pdf-gen-lambda.yml to standardised pnpm steps * feat: updated ci.yml to pnpm for pdf-gen * feat: updated package.json root builds with pnpm for pdf-gen * feat: replace pnpm ci with pnpm install * feat: split build and deploy * chore: replace strategy matrix, updated README/md * feat: updated ci.yml pdf gen to use env.PNPM_VERSION * feat: updated deploy-pdf-gen-lambda to use pnpm run sam-deploy and pnpm sam-build * feat: updated quickstart.md * feat: add -p to build-dist.sh * fix: ci script typo * feat: migrate payments recon to pnpm (#9174) * feat: update payments recon documentation * chore: update staging to stg, added stg-alt3 * feat: remove npmrc * feat: update translation.md * feat: update root package json engine * feat: update playwright to build webserver using pnpm * feat: remove stale puppeteer * fix(frontend): hardcode success style extension * feat: migrate frontend to pnpm (#9172) * feat: migrated package-lock.json to pnpm-lock.yaml * feat: updated package.json to pnpm commands & added built dependencies * feat: added phantom dependencies directly into frontend/package.json, resolved build issues * feat: updated root package.json * feat: updated readme, quickstart & missed package.json * chore: remove legacy-peer-deps * feat: updated ci.yml file * feat: added install pnpm to frontend_lint & _test in ci.yml * feat: updated Dockerfile production to copy pnpm-lock.yaml: * chore: replace all pnpm run with pnpm * feat: updated Dockerfile * feat: updated chromatic.yml * chore: remove cache, updated emailpreview in chromatic.yml to install pnpm * chore: remove untraced to explicitly run react-email-preview * fix: remove BE dependency installed from chromatic.yml * feat: replace package-lock.json with pnpm-lock.yaml for react-eail-preview * feat: add microtime to built dependencies for package.json frontend * fix: addressed comments * fix: updated package versions to match package-lock.json * feat: update pnpm lock * fix: uncommented testing code * fix: email be dep working dir * fix: lint errors * feat: migrate react-email-preview to pnpm * fix: bummp react-rotuer version * fix: updated layout package.json * fix: ran pnpm install for frontend * feat: move ignore built deps to package.json * fix: frontend lint * feat: update readme * feat: update comments and readme to use pnpm --------- Co-authored-by: Kevin Foong <55353265+kevin9foong@users.noreply.github.com> Co-authored-by: Eliot Lim <eliot@open.gov.sg> --------- Co-authored-by: scottheng96 <44297674+scottheng96@users.noreply.github.com> Co-authored-by: Eliot Lim <eliot@open.gov.sg>
* feat: monorepo phase 1 - migrate npm to pnpm (#9166) * feat: migrate shared to pnpm (#9163) * feat: migrate shared to pnpm * feat: update ci to support pnpm * feat: install eslint in shared * feat: update ci scripts to install pnpm, remove pnpm caching * feat: update chromatic script with pnpm * feat: use common env for pnpm and npm and pin to specific * Merge pull request #9162 from opengovsg/feat/migrate-serverless-virus-scanner-to-pnpm feat: migrate serverless virus scanner to pnpm * feat: migrate backend to pnpm (#9164) * feat: migrate backend to pnpm * feat: use pnpm in ci scripts * feat: install missing deps and fix typing * feat: add pnpm installation to ci jobs * feat: update playwright and ci * feat: use pnpm for build * feat: create shared pnpm base * feat: use shared env version * feat: remove ebs files (#9170) * feat: remove ebextensions * feat: remove dockerrun used for ebs * feat: migrate serverless pdf lambda to pnpm (#9167) * feat: migrate pdf lambda from npm to pnpm * feat: replace ci yml scripts and build.sh to use pnpm * chore: remove --frozen-lockfile * feat: updated deploy-pdf-gen-lambda.yml to standardised pnpm steps * feat: updated ci.yml to pnpm for pdf-gen * feat: updated package.json root builds with pnpm for pdf-gen * feat: replace pnpm ci with pnpm install * feat: split build and deploy * chore: replace strategy matrix, updated README/md * feat: updated ci.yml pdf gen to use env.PNPM_VERSION * feat: updated deploy-pdf-gen-lambda to use pnpm run sam-deploy and pnpm sam-build * feat: updated quickstart.md * feat: add -p to build-dist.sh * fix: ci script typo * feat: migrate payments recon to pnpm (#9174) * feat: update payments recon documentation * chore: update staging to stg, added stg-alt3 * feat: remove npmrc * feat: update translation.md * feat: update root package json engine * feat: update playwright to build webserver using pnpm * feat: remove stale puppeteer * fix(frontend): hardcode success style extension * feat: migrate frontend to pnpm (#9172) * feat: migrated package-lock.json to pnpm-lock.yaml * feat: updated package.json to pnpm commands & added built dependencies * feat: added phantom dependencies directly into frontend/package.json, resolved build issues * feat: updated root package.json * feat: updated readme, quickstart & missed package.json * chore: remove legacy-peer-deps * feat: updated ci.yml file * feat: added install pnpm to frontend_lint & _test in ci.yml * feat: updated Dockerfile production to copy pnpm-lock.yaml: * chore: replace all pnpm run with pnpm * feat: updated Dockerfile * feat: updated chromatic.yml * chore: remove cache, updated emailpreview in chromatic.yml to install pnpm * chore: remove untraced to explicitly run react-email-preview * fix: remove BE dependency installed from chromatic.yml * feat: replace package-lock.json with pnpm-lock.yaml for react-eail-preview * feat: add microtime to built dependencies for package.json frontend * fix: addressed comments * fix: updated package versions to match package-lock.json * feat: update pnpm lock * fix: uncommented testing code * fix: email be dep working dir * fix: lint errors * feat: migrate react-email-preview to pnpm * fix: bummp react-rotuer version * fix: updated layout package.json * fix: ran pnpm install for frontend * feat: move ignore built deps to package.json * fix: frontend lint * feat: update readme * feat: update comments and readme to use pnpm --------- Co-authored-by: Kevin Foong <55353265+kevin9foong@users.noreply.github.com> Co-authored-by: Eliot Lim <eliot@open.gov.sg> --------- Co-authored-by: scottheng96 <44297674+scottheng96@users.noreply.github.com> Co-authored-by: Eliot Lim <eliot@open.gov.sg> * chore: bump version to v6.312.0 --------- Co-authored-by: scottheng96 <44297674+scottheng96@users.noreply.github.com> Co-authored-by: Eliot Lim <eliot@open.gov.sg>

Problem
Part of the work moving FormSG to monorepo structure
Closes FRM-2309
Solution
Breaking Changes