chore: migrate to pnpm v11, switch to nano-staged, add skills-npm (#111)

* chore: migrate to pnpm v11, switch to nano-staged, add skills-npm

- Bump packageManager to pnpm@11.1.3; rename onlyBuiltDependencies to allowBuilds
- Replace lint-staged with nano-staged
- Add skills-npm via prepare chain
- Set core.hooksPath to .githooks so simple-git-hooks works in worktrees

* ci: bump pnpm/action-setup to v6 for pnpm 11 global bin PATH fix

v4 leaves the v11 isolated global bin dir ($PNPM_HOME/bin) out of PATH,
breaking `pnpm i -g @antfu/ni`. v6 ships pnpm 11 support and the PATH fix.
This commit is contained in:
Anthony Fu
2026-05-19 12:07:20 +09:00
committed by GitHub
parent 977d3d4066
commit d25b1bce8e
5 changed files with 1105 additions and 1002 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v6
with:
run_install: false
- uses: actions/setup-node@v4
@@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v6
with:
run_install: false
- name: Set node ${{ matrix.node }}
+2
View File
@@ -1,5 +1,6 @@
.cache
.DS_Store
.githooks
.idea
*.log
*.tgz
@@ -8,4 +9,5 @@ dist
lib-cov
logs
node_modules
skills/npm-*
temp
+6 -5
View File
@@ -2,7 +2,7 @@
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "pnpm@10.33.1",
"packageManager": "pnpm@11.1.3",
"description": "_description_",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
@@ -32,7 +32,7 @@
"start": "tsx src/index.ts",
"test": "pnpm run build && vitest",
"typecheck": "tsc",
"prepare": "simple-git-hooks"
"prepare": "git config core.hooksPath .githooks && simple-git-hooks && skills-npm"
},
"devDependencies": {
"@antfu/eslint-config": "catalog:cli",
@@ -41,9 +41,10 @@
"@types/node": "catalog:types",
"bumpp": "catalog:cli",
"eslint": "catalog:cli",
"lint-staged": "catalog:cli",
"nano-staged": "catalog:cli",
"publint": "catalog:cli",
"simple-git-hooks": "catalog:cli",
"skills-npm": "catalog:cli",
"tsdown": "catalog:cli",
"tsdown-stale-guard": "catalog:testing",
"tsnapi": "catalog:testing",
@@ -53,9 +54,9 @@
"vitest": "catalog:testing"
},
"simple-git-hooks": {
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && pnpm run build && npx lint-staged"
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && pnpm run build && npx nano-staged"
},
"lint-staged": {
"nano-staged": {
"*": "eslint --fix"
}
}
+1076 -980
View File
File diff suppressed because it is too large Load Diff
+19 -15
View File
@@ -1,5 +1,8 @@
catalogMode: prefer
ignoreWorkspaceRootCheck: true
minimumReleaseAgeExclude:
- '@types/node@25.9.0'
- tsx@4.22.2
shellEmulator: true
trustPolicy: no-downgrade
@@ -11,25 +14,26 @@ packages:
catalogs:
cli:
'@antfu/eslint-config': ^8.2.0
'@antfu/eslint-config': ^9.0.0
'@antfu/ni': ^30.1.0
bumpp: ^11.0.1
eslint: ^10.2.1
lint-staged: ^16.4.0
publint: ^0.3.18
bumpp: ^11.1.0
eslint: ^10.4.0
nano-staged: ^1.0.2
publint: ^0.3.21
simple-git-hooks: ^2.13.1
tsdown: ^0.21.10
tsx: ^4.21.0
skills-npm: ^1.1.1
tsdown: ^0.22.0
tsx: ^4.22.2
typescript: ^6.0.3
vite: ^8.0.9
vite: ^8.0.13
inlined:
'@antfu/utils': ^9.3.0
testing:
tsdown-stale-guard: ^0.1.1
tsnapi: ^0.3.2
vitest: ^4.1.5
tsdown-stale-guard: ^0.1.2
tsnapi: ^0.3.3
vitest: ^4.1.6
types:
'@types/node': ^25.6.0
onlyBuiltDependencies:
- esbuild
- simple-git-hooks
'@types/node': ^25.9.0
allowBuilds:
esbuild: true
simple-git-hooks: true