generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 273
chore: switch to pnpm and upgrade non-breaking packages #2464
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
Open
AnujChhikara
wants to merge
9
commits into
develop
Choose a base branch
from
chore/package-manager-upgrade
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11,589
−9,318
Open
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7ec7c53
chore: migrate from Yarn to pnpm for package management
AnujChhikara ca5c279
chore: add @google-cloud/firestore dependency
AnujChhikara 565fa74
chore: fix failing test
AnujChhikara f2d8121
chore: update package manager to [email protected]
AnujChhikara bd9e122
chore: remove pnpm version from engines in package.json
AnujChhikara 62f32af
chore: restore @types/nodemailer dependency in package.json
AnujChhikara 5c0a0a5
chore: update pnpm-lock.yaml to restore @types/nodemailer dependency
AnujChhikara 1226898
Merge branch 'develop' into chore/package-manager-upgrade
MayankBansal12 e5225d7
Merge branch 'develop' into chore/package-manager-upgrade
MayankBansal12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ This Project serves the backend APIs required for [Real Dev Squad](https://reald | |
|
||
## Starting Local Development | ||
|
||
Please install `yarn` and `volta` | ||
Please install `pnpm` and `volta` | ||
AnujChhikara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[Why Volta?](https://docs.volta.sh/guide/#why-volta) | ||
|
||
|
@@ -39,12 +39,12 @@ To install Volta, please follow the [process](https://docs.volta.sh/guide/gettin | |
Install all the packages using the following command: | ||
|
||
```shell | ||
yarn | ||
pnpm install | ||
``` | ||
Now if one runs yarn install. The yarn.lock will be unexpectedly updated with an unknown future version of a dependency, potentially breaking the build in the future. To ensure that the yarn.lock file is not update, you will need to use the --frozen-lockfile flag. | ||
Now if one runs pnpm install. The pnpm-lock.yaml will be unexpectedly updated with an unknown future version of a dependency, potentially breaking the build in the future. To ensure that the pnpm-lock.yaml file is not update, you will need to use the --frozen-lockfile flag. | ||
|
||
```shell | ||
yarn install --frozen-lockfile | ||
pnpm install --frozen-lockfile | ||
``` | ||
AnujChhikara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Confirm correct configuration setup | ||
|
@@ -53,7 +53,7 @@ This command should be successful, before moving to development. | |
|
||
|
||
```shell | ||
yarn validate-setup | ||
pnpm validate-setup | ||
``` | ||
|
||
#### TDD Local Development | ||
|
@@ -65,27 +65,27 @@ Head over to [TDD Tests Files List](scripts/tests/tdd-files-list.txt), and add t | |
Run TDD in watch mode. Exiting this command will print the coverage report. Try to achieve 100% coverage. | ||
|
||
```shell | ||
yarn tdd:watch | ||
pnpm tdd:watch | ||
``` | ||
|
||
#### Running a server in Dev mode | ||
|
||
```shell | ||
yarn dev | ||
pnpm dev | ||
``` | ||
|
||
## What happens in production: | ||
|
||
- Install packages | ||
|
||
``` | ||
yarn | ||
pnpm install | ||
``` | ||
|
||
- Run tests | ||
|
||
``` | ||
yarn run test | ||
pnpm test | ||
``` | ||
AnujChhikara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- Prune dev dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do not need to prune dev dependencies we can directly install packages using |
||
|
@@ -97,7 +97,7 @@ npm prune --production | |
- Run start command (with port information) | ||
|
||
``` | ||
yarn start | ||
pnpm start | ||
``` | ||
AnujChhikara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Note: These are handled automatically behind the scene when pushing to [Heroku](https://devcenter.heroku.com/) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,89 +2,93 @@ | |
"name": "website-backend", | ||
"version": "1.0.0", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"start": "node ./dist/server.js", | ||
"tsc": "tsc", | ||
"postinstall": "yarn run tsc", | ||
"postinstall": "pnpm run tsc", | ||
"dev": "cross-env NODE_ENV=development ts-node-dev server.js", | ||
"lint": "eslint .", | ||
"lint-fix": "eslint . --fix", | ||
"validate-setup": "node scripts/validateSetup.js", | ||
"test-integration": "sh scripts/tests/testIntegration.sh", | ||
"test-unit": "sh scripts/tests/testUnit.sh", | ||
"test": "yarn lint && yarn test-unit && yarn test-integration", | ||
"test": "pnpm lint && pnpm test-unit && pnpm test-integration", | ||
"tdd:watch": "sh scripts/tests/tdd.sh" | ||
}, | ||
"dependencies": { | ||
"@aws-sdk/client-identitystore": "^3.665.0", | ||
"@types/nodemailer": "^6.4.15", | ||
"axios": "1.7.4", | ||
"cloudinary": "2.0.3", | ||
"config": "3.3.7", | ||
"cookie-parser": "1.4.6", | ||
"@aws-sdk/client-identitystore": "^3.864.0", | ||
"@google-cloud/firestore": "^7.11.3", | ||
"axios": "^1.11.0", | ||
"cloudinary": "^2.7.0", | ||
"config": "4.1.1", | ||
"cookie-parser": "^1.4.7", | ||
"cors": "2.8.5", | ||
"datauri": "4.1.0", | ||
"debug": "4.3.5", | ||
"debug": "^4.4.1", | ||
"express": "~4.18.3", | ||
"express-boom": "3.0.0", | ||
"firebase-admin": "12.1.1", | ||
"helmet": "7.1.0", | ||
"firebase-admin": "13.4.0", | ||
"helmet": "8.1.0", | ||
"http-errors": "~2.0.0", | ||
"joi": "17.12.2", | ||
"jsdoc": "4.0.2", | ||
"joi": "18.0.0", | ||
"jsdoc": "4.0.4", | ||
"jsonwebtoken": "^8.5.1", | ||
"morgan": "1.10.0", | ||
"multer": "1.4.5-lts.1", | ||
"newrelic": "11.19.0", | ||
"nodemailer": "^6.9.15", | ||
"morgan": "^1.10.1", | ||
"multer": "2.0.2", | ||
"newrelic": "13.1.0", | ||
"nodemailer": "^7.0.5", | ||
"nodemailer-mock": "^2.0.6", | ||
"passport": "0.7.0", | ||
"passport-github2": "0.1.12", | ||
"passport-google-oauth20": "^2.0.0", | ||
"rate-limiter-flexible": "5.0.3", | ||
"winston": "3.13.0" | ||
"rate-limiter-flexible": "7.2.0", | ||
"winston": "3.17.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "4.3.16", | ||
"@types/config": "3.3.4", | ||
"@types/express": "4.17.21", | ||
"@types/jest": "29.5.12", | ||
"@types/mocha": "10.0.6", | ||
"@types/node": "20.11.24", | ||
"@types/sinon": "17.0.3", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"chai": "4.4.1", | ||
"@types/chai": "4.3.20", | ||
"@types/config": "3.3.5", | ||
"@types/nodemailer": "^7.0.0", | ||
"@types/express": "5.0.3", | ||
"@types/jest": "30.0.0", | ||
"@types/lodash": "^4.17.20", | ||
"@types/mocha": "10.0.10", | ||
"@types/node": "24.3.0", | ||
"@types/sinon": "17.0.4", | ||
"@typescript-eslint/parser": "^8.39.1", | ||
"chai": "4.5.0", | ||
"chai-http": "4.4.0", | ||
"cross-env": "7.0.3", | ||
"cross-env": "10.0.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-config-standard": "^16.0.3", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-mocha": "^10.0.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-prettier": "^5.5.4", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-security": "^1.7.1", | ||
"firebase-tools": "13.4.0", | ||
"mocha": "10.3.0", | ||
"firebase-tools": "14.12.1", | ||
"lodash": "^4.17.21", | ||
"mocha": "11.7.1", | ||
"nock": "13.2.9", | ||
"nodemon": "3.1.3", | ||
"nyc": "15.1.0", | ||
"nodemon": "3.1.10", | ||
"nyc": "17.1.0", | ||
"pre-commit": "1.2.2", | ||
"prettier": "^2.5.1", | ||
"sinon": "18.0.0", | ||
"prettier": "^2.8.8", | ||
"sinon": "21.0.0", | ||
"ts-node": "10.9.2", | ||
"ts-node-dev": "2.0.0", | ||
"typescript": "5.3.3" | ||
"typescript": "5.9.2" | ||
}, | ||
"engines": { | ||
"node": "22.10.0" | ||
"node": "22.18.0" | ||
}, | ||
"pre-commit": [ | ||
"lint" | ||
], | ||
"volta": { | ||
"node": "22.10.0", | ||
"yarn": "1.22.21" | ||
"node": "22.18.0", | ||
"pnpm": "10.14.0" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.