Skip to content
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

build!: use pnpm #820

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
show-progress: false
filter: blob:none # we don't need all blobs, only the full tree

- name: Lint commit messages
uses: wagoid/commitlint-github-action@5ce82f5d814d4010519d15f0552aec4f17a1e1fe # v5.4.5
continue-on-error: true
Expand All @@ -34,19 +37,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
show-progress: false

- name: enable corepack
run: corepack enable

- name: Setup node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: enable corepack
run: corepack enable

- name: Install project
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint

e2e:
runs-on: ubuntu-latest
Expand All @@ -59,21 +68,26 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
show-progress: false

- name: enable corepack
run: corepack enable

- name: Setup node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: enable corepack
run: corepack enable

- name: Install project
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build
run: yarn build
run: pnpm build

- name: Configure renovate token
run: |
Expand Down Expand Up @@ -115,13 +129,14 @@ jobs:
git config --global core.symlinks true
git config --global user.email 'bot@renovateapp.com'
git config --global user.name 'Renovate Bot'
yarn config set version-git-tag false

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
fetch-depth: 0 # required for semantic release
ref: 'release'
show-progress: false
filter: blob:none # we don't need all blobs, only the full tree

- name: fetch pr
if: ${{github.event_name == 'pull_request'}}
Expand All @@ -133,17 +148,20 @@ jobs:
git merge --no-ff -Xtheirs -m 'skip: merge (${{ github.sha }}) [skip release]' ${{ github.sha }}
commit=$(git rev-parse HEAD)

- name: enable corepack
run: corepack enable

- name: Setup node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: enable corepack
run: corepack enable

- name: Install project
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Push release branch
run: git push origin release:release
Expand All @@ -153,7 +171,7 @@ jobs:
run: |
# override for semantic-release
export GITHUB_REF=refs/heads/release GITHUB_SHA=${{ steps.merge.outputs.commit }}
yarn release
pnpm release
if: ${{ github.ref_name == github.event.repository.default_branch }}
env:
GITHUB_TOKEN: ${{ github.token }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ typings/
# nuxt.js build output
.nuxt

# react / gatsby
# react / gatsby
public/

# vuepress build output
Expand Down Expand Up @@ -300,3 +300,6 @@ dkms.conf
*.exe
*.out
*.app


/.pnpm-store
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"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
7 changes: 5 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"*.{ts,tsx,js,jsx,json}": "eslint --fix",
"*": "prettier --ignore-unknown --write"
"*.{ts,tsx,js,jsx,json}": [
"eslint --cache --fix",
"prettier --cache --write"
],
"!*.{ts,tsx,js,jsx,json}": "prettier --cache --ignore-unknown --write"
}
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
save-exact=true
save-prefix =

# pnpm run settings
# https://pnpm.io/cli/run
shell-emulator = true
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ coverage/
LICENSE.md
modules/
node_modules/

/.pnpm-store
/pnpm-lock.yaml
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"main": "src/index.ts",
"engines": {
"node": ">=20.11.0",
"yarn": "^1.22.0"
"node": ">=20.9.0",
"pnpm": "^8.0.0"
},
"scripts": {
"build": "run-s clean compile",
Expand Down Expand Up @@ -64,5 +64,16 @@
"ts-node": "10.9.2",
"typescript": "5.3.3"
},
"packageManager": "yarn@1.22.21"
"packageManager": "pnpm@8.15.1",
"pnpm": {
"supportedArchitectures": {
"os": [
"linux",
"win32"
],
"cpu": [
"x64"
]
}
}
}
Loading