Author SHA1 Message Date
Anthony Fu 44c491c079 chore: update ci 2026-07-22 14:26:26 +09:00
Anthony Fu 99a0a2874a chore: add scripts-info 2026-07-22 09:18:30 +09:00
Anthony Fu 0ac25856a3 chore: update deps 2026-07-22 09:08:38 +09:00
Anthony Fu d25b1bce8e 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.
2026-05-19 12:07:20 +09:00
6 changed files with 1721 additions and 1202 deletions

No files matched your search

+12 -46
View File
@@ -1,53 +1,19 @@
name: CI
name: Unit Test
on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main
branches: [main]
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
unit-test:
uses: sxzz/workflows/.github/workflows/unit-test.yml@main
- run: pnpm i -g @antfu/ni
- run: nci
- run: nr lint
- run: nr typecheck
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm i -g @antfu/ni
- run: nci
- run: nr build
- run: nr test
# coverage:
# uses: sxzz/workflows/.github/workflows/coverage.yml@main
# needs: unit-test
# permissions:
# id-token: write
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs:
release:
uses: sxzz/workflows/.github/workflows/release.yml@v1
uses: sxzz/workflows/.github/workflows/release.yml@main
with:
publish: true
permissions:
+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
+18 -6
View File
@@ -2,7 +2,7 @@
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "pnpm@10.33.1",
"packageManager": "pnpm@11.15.1",
"description": "_description_",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
@@ -27,12 +27,23 @@
"build": "tsdown",
"dev": "tsdown --watch",
"lint": "eslint",
"prepublishOnly": "nr build",
"prepack": "nr build",
"release": "bumpp",
"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"
},
"scripts-info": {
"build": "Build the library for publishing",
"dev": "Rebuild on change during development",
"lint": "Check for code style issues",
"prepack": "Build before publishing",
"release": "Bump version and publish a release",
"start": "Run the entry file",
"test": "Run the test suite",
"typecheck": "Check types",
"prepare": "Set up git hooks and skills"
},
"devDependencies": {
"@antfu/eslint-config": "catalog:cli",
@@ -41,9 +52,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 +65,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"
}
}
+1667 -1133
View File
File diff suppressed because it is too large. Load diff
+21 -16
View File
@@ -1,5 +1,9 @@
catalogMode: prefer
ignoreWorkspaceRootCheck: true
minimumReleaseAgeExclude:
- '@types/node@25.9.0'
- tsx@4.22.2
- bumpp@12.0.0
shellEmulator: true
trustPolicy: no-downgrade
@@ -11,25 +15,26 @@ packages:
catalogs:
cli:
'@antfu/eslint-config': ^8.2.0
'@antfu/ni': ^30.1.0
bumpp: ^11.0.1
eslint: ^10.2.1
lint-staged: ^16.4.0
publint: ^0.3.18
'@antfu/eslint-config': ^9.1.0
'@antfu/ni': ^30.2.0
bumpp: ^12.0.0
eslint: ^10.7.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.2.0
tsdown: ^0.22.12
tsx: ^4.23.1
typescript: ^6.0.3
vite: ^8.0.9
vite: ^8.1.5
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.3
tsnapi: ^1.0.0
vitest: ^4.1.10
types:
'@types/node': ^25.6.0
onlyBuiltDependencies:
- esbuild
- simple-git-hooks
'@types/node': ^26.1.1
allowBuilds:
esbuild: true
simple-git-hooks: true