Skip to content

Commit

Permalink
Upgrade pnpm to version 7 (novuhq#740)
Browse files Browse the repository at this point in the history
* Fix pnpm deps for v7 breaking changes

* wip

* fix(): specify pnpm version

* build: fix the build

* build: add missing peer dependency

* build: add webpack dev server

* build: fix lock file

* build: add cypress peer dep

* chore: update pnpm version on dockerfiles

* feat: fix pnpm install and setup inside docker

* build: fix -w

* build: docker file

* fix: docker file to correctly install pm2 globally

* fix: fix web dockerfile build

* fix(embed): use regular install on docker file

* build: update lock file

* fix: remove un-needed global flag
  • Loading branch information
scopsy authored Jun 30, 2022
1 parent 2ed0bbe commit 3b1307d
Show file tree
Hide file tree
Showing 38 changed files with 5,334 additions and 4,290 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-api-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: pnpm/[email protected]
with:
version: 6.0.2
version: 7.3.0
run_install: true

- uses: mansagroup/nrwl-nx-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: pnpm/[email protected]
with:
version: 6.0.2
version: 7.3.0
run_install: true

- uses: mansagroup/nrwl-nx-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-widget-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: pnpm/[email protected]
with:
version: 6.0.2
version: 7.3.0
run_install: true

- uses: mansagroup/nrwl-nx-action@v2
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=true
strict-peer-dependencies=false
5 changes: 3 additions & 2 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ FROM node:16.13.1

WORKDIR /usr/src/app

RUN npm i pnpm@6.32.11 -g --loglevel notice --force
RUN pnpm i pm2 -g
RUN npm install -g pnpm@7.3.0 --loglevel notice
RUN npm i pm2 -g

COPY package.json .
COPY .npmrc .

COPY apps/api ./apps/api
COPY libs/dal ./libs/dal
Expand Down
4 changes: 3 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"newrelic": "^7.4.0",
"passport": "^0.4.1",
"passport-github2": "^0.1.12",
"passport-oauth2": "1.6.1",
"passport-jwt": "^4.0.0",
"recursive-diff": "^1.0.8",
"reflect-metadata": "^0.1.13",
Expand Down Expand Up @@ -110,8 +111,9 @@
"mocha": "^8.1.1",
"nodemon": "^2.0.3",
"sinon": "^9.0.2",
"ts-loader": "9.2.8",
"ts-node": "^9.0.0",
"typescript": "4.6.2",
"ts-loader": "9.2.8",
"tsconfig-paths": "3.11.0"
},
"lint-staged": {
Expand Down
5 changes: 3 additions & 2 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ FROM node:16.13.1

WORKDIR /usr/src/app

RUN npm i pnpm@6.32.11 -g --loglevel notice --force
RUN npm install -g pnpm@7.3.0 --loglevel notice

COPY .npmrc .
COPY package.json .

COPY apps/web ./apps/web
Expand All @@ -21,7 +22,7 @@ COPY pnpm-workspace.yaml .
COPY pnpm-lock.yaml .

RUN pnpm install
RUN pnpm add @babel/core -W
RUN pnpm add @babel/core -w

COPY .eslintrc.js .
COPY .prettierrc .
Expand Down
5 changes: 4 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"@babel/plugin-transform-runtime": "^7.16.5",
"@cypress/react": "^5.12.4",
"@cypress/webpack-dev-server": "^1.8.2",
"html-webpack-plugin": "5.5.0",
"webpack-dev-server": "4.9.2",
"@editorjs/editorjs": "^2.19.3",
"@editorjs/paragraph": "^2.8.0",
"@emotion/babel-plugin": "^11.7.2",
Expand Down Expand Up @@ -97,7 +99,8 @@
"nodemon": "^2.0.15",
"react-error-overlay": "6.0.9",
"start-server-and-test": "1.11.6",
"webpack": "4.46.0"
"webpack": "4.46.0",
"typescript": "4.6.2"
},
"scripts": {
"start": "cross-env PORT=4200 react-app-rewired start",
Expand Down
10 changes: 0 additions & 10 deletions apps/web/src/App.test.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion apps/widget/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ FROM node:16.13.1

WORKDIR /usr/src/app

RUN npm i pnpm@6.32.11 -g --loglevel notice --force
RUN npm install -g pnpm@7.3.0 --loglevel notice

COPY .npmrc .
COPY package.json .

COPY apps/widget ./apps/widget
Expand Down
5 changes: 4 additions & 1 deletion apps/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"@novu/testing": "^0.5.1",
"@types/moment": "^2.13.0",
"@types/react-router-dom": "^5.1.7",
"html-webpack-plugin": "5.5.0",
"webpack-dev-server": "4.9.2",
"@types/styled-components": "^5.1.7",
"babel-plugin-styled-components": "^1.12.0",
"craco-antd": "^1.19.0",
Expand All @@ -55,7 +57,8 @@
"jest": "27.0.6",
"less": "^4.1.0",
"less-loader": "4.1.0",
"start-server-and-test": "1.11.6"
"start-server-and-test": "1.11.6",
"typescript": "4.6.2"
},
"scripts": {
"start": "craco start",
Expand Down
5 changes: 3 additions & 2 deletions apps/ws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ FROM node:16.13.1

WORKDIR /usr/src/app

RUN npm i pnpm@6.32.11 -g --loglevel notice --force
RUN pnpm i pm2 -g
RUN npm install -g pnpm@7.3.0 --loglevel notice
RUN npm i pm2 -g

COPY .npmrc .
COPY package.json .

COPY apps/ws ./apps/ws
Expand Down
1 change: 1 addition & 0 deletions apps/ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"jsonwebtoken": "8.5.1",
"@godaddy/terminus": "^4.3.1",
"@nestjs/common": "^7.6.17",
"@nestjs/core": "^7.6.17",
Expand Down
3 changes: 2 additions & 1 deletion libs/dal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"eslint-plugin-prettier": "^3.4.0",
"nodemon": "^2.0.3",
"ts-node": "^9.0.0",
"tsconfig-paths": "^3.9.0"
"tsconfig-paths": "^3.9.0",
"typescript": "4.6.2"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down
3 changes: 2 additions & 1 deletion libs/embed/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ FROM node:16.13.1

WORKDIR /usr/src/app

RUN npm i pnpm@6.32.11 -g --loglevel notice --force
RUN npm install -g pnpm@7.3.0 --loglevel notice --force

COPY .npmrc .
COPY package.json .

COPY libs/embed ./libs/embed
Expand Down
6 changes: 3 additions & 3 deletions libs/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"axios": "^0.26.1",
"class-transformer": "0.5.1",
"class-validator": "^0.9.1",
"mixpanel": "^0.13.0",
"typescript": "4.1.3"
"mixpanel": "^0.13.0"
},
"devDependencies": {
"@types/bluebird": "^3.5.24"
"@types/bluebird": "^3.5.24",
"typescript": "4.1.3"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down
4 changes: 2 additions & 2 deletions libs/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"reflect-metadata": "^0.1.13",
"superagent-defaults": "^0.1.14",
"supertest": "^5.0.0",
"typescript": "4.1.3",
"uuid": "^8.3.0"
},
"devDependencies": {
Expand All @@ -49,7 +48,8 @@
"eslint-plugin-prettier": "^3.4.0",
"nodemon": "^2.0.3",
"ts-node": "^9.0.0",
"tsconfig-paths": "^3.9.0"
"tsconfig-paths": "^3.9.0",
"typescript": "4.1.3"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"preinstall": "npx only-allow pnpm",
"prepare": "husky install",
"publish": "lerna publish from-package",
"setup:project": "npx pnpm@6.32.3 i && node scripts/setup-env-files.js && npx pnpm build",
"setup:project": "npx pnpm@7.3.0 i && node scripts/setup-env-files.js && npx pnpm build",
"commit": "cz",
"nx": "nx",
"generate:provider": "npx hygen provider new",
Expand Down Expand Up @@ -47,7 +47,7 @@
"get-remote-env-files": "doppler secrets download --project api --config dev --no-file --format env > apps/api/src/.env"
},
"devDependencies": {
"@auto-it/jira": "^10.36.5",
"@octokit/core": "^3.6.0",
"@auto-it/npm": "^10.36.5",
"@auto-it/released": "^10.36.5",
"@commitlint/cli": "17.0.1",
Expand All @@ -59,6 +59,7 @@
"@nrwl/tao": "13.8.5",
"@nrwl/workspace": "13.8.5",
"@types/node": "16.11.7",
"@types/jest": "27.4.0",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"auto": "^10.36.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"standard-version": "^9.0.0",
"ts-jest": "^27.0.5",
"ts-node": "^9.0.0",
"typedoc": "^0.19.0"
"typedoc": "^0.19.0",
"typescript": "4.6.2"
},
"files": [
"build/main",
Expand Down
4 changes: 3 additions & 1 deletion packages/notification-center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"rollup-plugin-dts": "^4.0.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^4.4.4"
"tslib": "^2.3.1",
"typescript": "^4.4.4",
"acorn": "^8.7.1"
},
"peerDependencies": {
"react": ">=16.8.0"
Expand Down
Loading

0 comments on commit 3b1307d

Please sign in to comment.