mirror of
https://github.com/carloscuesta/gitmoji.git
synced 2025-12-08 20:14:12 +00:00
♻️ Migrate from yarn to pnpm (#1503)
* 🔧 Add `pnpm-workspace` configuration * 🔧 Add `pnpm-lock` file * ♻️ Replace `yarn` with `pnpm` in root package.json * 🔥 Remove yarn binary * ⬆️ Bump `next-pwa` dependencies * 🔥 Remove yarn lockfile * ♻️ Replace `yarn` with `pnpm` in gitmojis package * ♻️ Replace `yarn` with `pnpm` in website package * ♻️ Replace `yarn` with `pnpm` in GitHub workflows * ♻️ Adjust `lintstagedrc` prettier arguments * 📝 Update documentation * ♻️ Replace `yarn` with `pnpm` in git hooks * 🔥 Remove yarn refs from git files * ⬆️ Update `clipboard` dependency * 👷♂️ Install pnpm in GitHub Actions * 🔥 Remove unnecessary `exec` c md * 📝 Update documentation * 🔧 Specify pnpm as an engine
This commit is contained in:
parent
ccdc5cbc25
commit
7d305f45f3
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
||||
/.yarn/releases/** binary
|
||||
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -11,8 +11,8 @@ If you would like to add a new emoji to gitmoji, fill the provided `ISSUE_TEMPLA
|
||||
1. Fork [this repository](https://github.com/carloscuesta/gitmoji/fork).
|
||||
2. Create a new branch with the feature name. (Eg: add-emoji-deploy, fix-website-header)
|
||||
3. Make your changes.
|
||||
4. Test you changes by running `yarn turbo test`
|
||||
- 4.1. If the snapshots are failing run `yarn turbo test -- -u` and be sure that the new snapshots match your changes
|
||||
4. Test you changes by running `pnpm turbo test`
|
||||
- 4.1. If the snapshots are failing run `pnpm turbo test -- -u` and be sure that the new snapshots match your changes
|
||||
5. Commit your changes. Don't forget to add a commit title with an emoji and a description.
|
||||
6. Push your changes.
|
||||
7. Submit your pull request.
|
||||
@ -53,7 +53,7 @@ $ cd gitmoji
|
||||
2. Install the dependencies and start the development server.
|
||||
|
||||
```bash
|
||||
$ yarn install && yarn run dev
|
||||
$ pnpm install && pnpm run dev
|
||||
```
|
||||
|
||||
The project is built with [Next.js](http://nextjs.org)
|
||||
|
||||
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -15,16 +15,17 @@ jobs:
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
- name: Install Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
cache: "pnpm"
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install dependencies 📦
|
||||
run: yarn install --immutable
|
||||
run: pnpm install
|
||||
- name: Lint 🎨
|
||||
run: yarn turbo lint
|
||||
run: pnpm turbo lint
|
||||
- name: TypeScript check 🏷
|
||||
run: yarn turbo tscheck
|
||||
run: pnpm turbo tscheck
|
||||
- name: Tests ✅
|
||||
run: yarn turbo test
|
||||
run: pnpm turbo test
|
||||
|
||||
9
.github/workflows/npm-publish.yml
vendored
9
.github/workflows/npm-publish.yml
vendored
@ -8,20 +8,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
cache: "pnpm"
|
||||
node-version: "18"
|
||||
- name: Install dependencies 📦
|
||||
run: yarn install --immutable
|
||||
run: pnpm install
|
||||
- name: Build 👷♂️
|
||||
run: yarn turbo run build --filter=gitmojis
|
||||
run: pnpm turbo run build --filter=gitmojis
|
||||
- name: Publish package to NPM 🚀
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
|
||||
run: |
|
||||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||
yarn turbo publishPackage
|
||||
pnpm turbo publishPackage
|
||||
- name: Publish GitHub Release 📝
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@ -8,12 +8,6 @@ coverage/
|
||||
.eslintcache
|
||||
*.log
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# next-pwa
|
||||
packages/website/public/workbox-*.js
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn lint-staged
|
||||
pnpm exec lint-staged
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn turbo tscheck && yarn turbo test
|
||||
pnpm turbo tscheck && pnpm turbo test
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"*.json": ["prettier --write *.json"],
|
||||
"*.md": ["prettier --write *.md"],
|
||||
"*.yml": ["prettier --write *.yml"]
|
||||
"*.json": ["prettier --write"],
|
||||
"*.md": ["prettier --write"],
|
||||
"*.yml": ["prettier --write"]
|
||||
}
|
||||
|
||||
823
.yarn/releases/yarn-3.3.1.cjs
vendored
823
.yarn/releases/yarn-3.3.1.cjs
vendored
File diff suppressed because one or more lines are too long
@ -1,2 +0,0 @@
|
||||
yarnPath: .yarn/releases/yarn-3.3.1.cjs
|
||||
nodeLinker: node-modules
|
||||
10
package.json
10
package.json
@ -2,14 +2,12 @@
|
||||
"name": "gitmoji",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": "18"
|
||||
"node": "18",
|
||||
"pnpm": ">=8"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
"dev": "yarn turbo --parallel dev"
|
||||
"dev": "pnpm turbo --parallel dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/analytics": "^1.0.1",
|
||||
@ -21,5 +19,5 @@
|
||||
"volta": {
|
||||
"node": "16.15.0"
|
||||
},
|
||||
"packageManager": "yarn@3.3.1"
|
||||
"packageManager": "pnpm@8.6.2"
|
||||
}
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "nodemon --exec 'yarn build' --watch ./src",
|
||||
"dev": "nodemon --exec 'pnpm run build' --watch ./src",
|
||||
"build": "unbuild",
|
||||
"lint:json": "ajv --spec=draft2020 validate -s ./src/schema.json -d ./src/gitmojis.json",
|
||||
"lint": "yarn run lint:json && prettier --check ./src/**/*.{js,json,ts}",
|
||||
"lint": "pnpm run lint:json && prettier --check ./src/**/*.{js,json,ts}",
|
||||
"publishPackage": "npm publish"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"engines": {
|
||||
"node": "16"
|
||||
"node": "18"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "next build && next-sitemap",
|
||||
"tscheck": "yarn tsc --noEmit",
|
||||
"tscheck": "pnpm exec tsc --noEmit",
|
||||
"dev": "next dev",
|
||||
"lint": "eslint ./src && prettier --check ./src/**/*.{ts,tsx,css}",
|
||||
"start": "next start",
|
||||
@ -20,7 +20,7 @@
|
||||
"@types/react-test-renderer": "^18.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
||||
"@typescript-eslint/parser": "^5.59.11",
|
||||
"clipboard": "^2.0.4",
|
||||
"clipboard": "^2.0.11",
|
||||
"eslint": "^8.42.0",
|
||||
"eslint-config-next": "^13.4.5",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
@ -36,7 +36,7 @@
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"lint-staged": "^13.2.2",
|
||||
"next": "^13.4.5",
|
||||
"next-pwa": "^5.4.4",
|
||||
"next-pwa": "^5.6.0",
|
||||
"next-sitemap": "^4.1.3",
|
||||
"next-themes": "^0.2.0",
|
||||
"node-mocks-http": "^1.12.2",
|
||||
|
||||
8053
pnpm-lock.yaml
generated
Normal file
8053
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
packages:
|
||||
- 'packages/*'
|
||||
Loading…
x
Reference in New Issue
Block a user