Skip to content

Commit

Permalink
chore: migrate to pnpm (#130)
Browse files Browse the repository at this point in the history
* chore: migrate to pnpm

* chore: set packageManager version

* chore: setup vercel and netlify config
  • Loading branch information
agustinusnathaniel authored Apr 2, 2023
1 parent 7dd7a6b commit 92ee121
Show file tree
Hide file tree
Showing 14 changed files with 8,390 additions and 7,707 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit "$1"
pnpm commitlint --edit "$1"
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
yarn type-check:turbo
pnpm lint-staged
pnpm type-check:turbo
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint:turbo
pnpm lint:turbo
2 changes: 1 addition & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[[ "$(uname -a)" = *"MINGW64"* ]] && exit 0
. "$(dirname "$0")/_/husky.sh"

exec < /dev/tty && yarn cz --hook || true
exec < /dev/tty && pnpm cz --hook || true
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev",
"command": "pnpm dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
## Pre-requisites

1. [Node.js](https://nodejs.org/en/) or nvm installed.
2. `yarn` installed.
2. `pnpm` installed.

## Getting Started

Expand All @@ -47,12 +47,12 @@
npx degit sozonome/nextarter-chakra <YOUR_APP_NAME>
```

2. After cloning the project, run this command: `yarn` or `yarn install`
2. After cloning the project, run this command: `pnpm` or `pnpm install`

3. Then, run the development server:

```bash
yarn dev
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Expand All @@ -61,8 +61,8 @@ You can start editing the page by modifying `src/lib/pages/index.tsx`. The page

## How to Run e2e Test (in local machine)

1. Build production with `yarn build`, then run the production build using `yarn start`.
2. Open another terminal (or new terminal tab, don't cancel / close the production server), then run the test with `yarn test:e2e`.
1. Build production with `pnpm build`, then run the production build using `pnpm start`.
2. Open another terminal (or new terminal tab, don't cancel / close the production server), then run the test with `pnpm test:e2e`.

References:

Expand Down
2 changes: 2 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
command = 'pnpm build'
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@
"postbuild": "next-sitemap --config next-sitemap.config.js",
"start": "next start",
"lint": "next lint",
"lint:fix": "eslint src --fix && yarn format",
"lint:fix": "eslint src --fix && pnpm format",
"lint:turbo": "npx turbo lint",
"type-check": "tsc --noEmit",
"type-check:turbo": "npx turbo type-check",
"test:e2e": "playwright test",
"format": "prettier --write src",
"up": "yarn upgrade-interactive",
"up-latest": "yarn up --latest",
"up-interactive": "pnpm up -i",
"up-latest": "pnpm up-interactive -L",
"release": "cross-env HUSKY=0 standard-version",
"push-release": "git push --follow-tags origin main",
"prepare": "husky install"
},
"dependencies": {
"@chakra-ui/react": "^2.5.1",
"@chakra-ui/react": "^2.5.5",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"framer-motion": "^8.5.5",
"framer-motion": "^10.10.0",
"next": "^13.2.3",
"next-pwa": "^5.6.0",
"next-seo": "^5.15.0",
"next-seo": "^6.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.8.0"
Expand All @@ -38,22 +38,24 @@
"@commitlint/config-conventional": "^17.4.4",
"@commitlint/cz-commitlint": "^17.4.4",
"@playwright/test": "^1.31.1",
"@types/react": "^18.0.28",
"@types/react": "^18.0.31",
"commitizen": "^4.3.0",
"commitlint": "^17.4.4",
"commitlint": "^17.5.1",
"cross-env": "^7.0.3",
"eslint": "^8.35.0",
"eslint": "^8.37.0",
"eslint-config-next": "^13.2.3",
"eslint-config-sznm": "^1.1.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.2",
"next-sitemap": "^3.1.55",
"next-sitemap": "^4.0.6",
"prettier": "^2.8.4",
"standard-version": "^9.5.0",
"turbo": "^1.8.3",
"turbo": "^1.8.8",
"typescript": "^4.9.5"
},
"engines": {
"node": ">=16.x.x"
}
"node": ">=16.x.x",
"pnpm": ">=8"
},
"packageManager": "[email protected]"
}
Loading

1 comment on commit 92ee121

@vercel
Copy link

@vercel vercel bot commented on 92ee121 Apr 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.