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
Anthony Fu 977d3d4066 feat: use vitest controlled api-snapshot 2026-04-23 13:37:35 +09:00
Anthony Fu b898f3cf9a chore: update snapshot 2026-04-23 11:24:28 +09:00
Anthony Fu f44a384227 chore: update deps 2026-04-23 11:24:12 +09:00
Anthony Fu 83cf9c396b feat: use tsnapi for exports snapshoting 2026-04-10 17:12:24 +09:00
Anthony Fu 68c00a2b25 feat: update deps, enable publint 2025-12-13 19:47:24 +09:00
Anthony Fu e76a9c0f18 chore: update deps 2025-11-07 14:42:18 +09:00
Anthony Fu d16cf1e854 chore: typo 2025-09-23 10:05:07 +09:00
Anthony Fu bcca902a44 feat: switch to tsdown 2025-09-23 09:08:19 +09:00
Anthony Fu 8a2f9026ff feat: prompt trusted publisher 2025-09-23 09:03:39 +09:00
Anthony Fu 95557b44ae chore: setup pnpm lock guard on commit 2025-03-12 23:44:55 +08:00
Anthony Fu 6011481edc chore: add extension list 2025-03-12 13:58:47 +08:00
Anthony Fu 4d180f40bf chore: update deps 2025-03-12 13:51:12 +08:00
YiJieandAnthony Fu 296e97d5fa chore: export package.json for higher version Node.js (#103)
shikijs/shiki#640

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2025-03-08 03:03:22 +08:00
invalid w 3fd967d71f fix(ci): add --no-git-checks flag to publish (#106) 2025-03-08 03:02:10 +08:00
Anthony Fu 608a888262 chore: use pnpm catalogs 2025-03-08 03:00:53 +08:00
Anthony Fu 1ed66db81d feat: add verbatimModuleSyntax in tsconfig 2025-03-05 12:46:25 +08:00
Anthony Fu 49248f74e2 feat: add vitest-package-exports tests 2025-03-05 12:43:25 +08:00
Anthony Fu 11e95cd5da chore: update 2025-02-10 12:40:54 +08:00
Anthony Fu e86bcbe3d5 chore: update deps, remove typesVersions field 2025-02-08 11:30:38 +08:00
Anthony Fu a4c4a820ec feat: esm-only by default 2025-01-15 20:53:40 +08:00
Anthony Fu 2036435c45 chore: update deps 2025-01-13 12:26:40 +08:00
Anthony Fu 7feaa975d3 chore: update 2024-11-29 17:07:35 +08:00
Anthony Fu 396cbec550 chore: update deps 2024-09-06 06:16:52 +02:00
Anthony Fu 0c31fbe960 chore: update ci 2024-07-20 14:26:04 +02:00
Anthony Fu 1f51d21f90 chore: update deps 2024-07-17 19:53:20 +02:00
Anthony Fu a05f3ec6f5 chore: update deps 2024-07-07 10:03:19 +08:00
Anthony Fu 964047d5be chore: update deps 2024-05-19 04:13:59 +02:00
Anthony Fu f8fb542605 chore: update 2024-05-12 13:42:50 +02:00
Anthony Fu d5f7e5f41d chore: update deps 2024-04-18 01:11:41 +02:00
Anthony Fu eb55ddbc3b chore: update deps 2024-02-22 17:26:23 +01:00
Anthony Fu 0cc51c5e79 chore: update 2024-01-09 03:04:07 +01:00
Anthony Fu 9fe749aa56 chore: update deps 2023-12-26 02:20:35 +01:00
Anthony Fu fe571ba0c2 chore: update deps 2023-12-07 18:34:51 +01:00
Anthony Fu 1f834fb7f9 chore: update deps 2023-12-04 13:29:50 +01:00
Anthony Fu f30e2757bf chore: update deps 2023-11-30 09:09:32 +01:00
Anthony Fu 41b9f245ff chore: upgrade to vite 5 2023-11-17 15:54:26 +01:00
Anthony Fu a2e9f70880 chore: update deps 2023-11-14 22:23:24 +01:00
Anthony Fu 657ff8de2b chore: update deps 2023-11-03 00:03:08 +09:00
Anthony Fu c427ea1aa2 chore: lint 2023-10-08 22:35:36 +08:00
21 changed files with 5083 additions and 4042 deletions

No files matched your search

+1
View File
@@ -1 +1,2 @@
github: [antfu]
opencollective: antfu
+12 -80
View File
@@ -1,87 +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@v3
unit-test:
uses: sxzz/workflows/.github/workflows/unit-test.yml@main
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Lint
run: nr lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Typecheck
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@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Build
run: nr build
- name: Test
run: nr test
# coverage:
# uses: sxzz/workflows/.github/workflows/coverage.yml@main
# needs: unit-test
# permissions:
# id-token: write
+6 -20
View File
@@ -1,8 +1,5 @@
name: Release
permissions:
contents: write
on:
push:
tags:
@@ -10,20 +7,9 @@ on:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: sxzz/workflows/.github/workflows/release.yml@main
with:
publish: true
permissions:
contents: write
id-token: write
+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
-1
View File
@@ -1 +0,0 @@
ignore-workspace-root-check=true
+6
View File
@@ -0,0 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"antfu.pnpm-catalog-lens"
]
}
+1 -4
View File
@@ -1,14 +1,11 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Anthony Fu <https://github.com/antfu>
Copyright (c) 2025-PRESENT Anthony Fu <https://github.com/antfu>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+11 -7
View File
@@ -8,28 +8,32 @@
_description_
> **Note**:
> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template.
## Note for Developers
This starter recommands using [npm Trusted Publisher](https://github.com/e18e/ecosystem-issues/issues/201), where the release is done on CI to ensure the security of the packages.
To do so, you need to run `pnpm publish` manually for the very first time to create the package on npm, and then go to `https://www.npmjs.com/package/<your-package-name>/access` to set the connection to your GitHub repo.
Then for the future releases, you can run `pnpm run release` to do the release and the GitHub Actions will take care of the release process.
## Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
<img src="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg" alt="Sponsors"/>
</a>
</p>
## License
[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
[MIT](./LICENSE) License © [Anthony Fu](https://github.com/antfu)
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/pkg-placeholder
[npm-version-href]: https://npmx.dev/package/pkg-placeholder
[npm-downloads-src]: https://img.shields.io/npm/dm/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/pkg-placeholder
[npm-downloads-href]: https://npmx.dev/package/pkg-placeholder
[bundle-src]: https://img.shields.io/bundlephobia/minzip/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=pkg-placeholder
[license-src]: https://img.shields.io/github/license/antfu/pkg-placeholder.svg?style=flat&colorA=080f12&colorB=1fa669
-12
View File
@@ -1,12 +0,0 @@
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
entries: [
'src/index',
],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
},
})
+2 -8
View File
@@ -3,13 +3,7 @@ import antfu from '@antfu/eslint-config'
export default antfu(
{
ignores: [
// eslint ignore globs here
],
},
{
rules: {
// overrides
},
type: 'lib',
pnpm: true,
},
)
+43 -43
View File
@@ -2,7 +2,7 @@
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "pnpm@8.8.0",
"packageManager": "pnpm@11.15.1",
"description": "_description_",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
@@ -16,58 +16,58 @@
"keywords": [],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
".": "./dist/index.mjs",
"./package.json": "./package.json"
},
"types": "./dist/index.d.mts",
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
"build": "tsdown",
"dev": "tsdown --watch",
"lint": "eslint",
"prepack": "nr build",
"release": "bumpp",
"start": "tsx src/index.ts",
"test": "pnpm run build && vitest",
"typecheck": "tsc",
"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": "^1.0.0-beta.22",
"@antfu/ni": "^0.21.8",
"@antfu/utils": "^0.7.6",
"@types/node": "^20.8.3",
"bumpp": "^9.2.0",
"eslint": "^8.51.0",
"esno": "^0.17.0",
"lint-staged": "^14.0.1",
"pnpm": "^8.8.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^4.4.11",
"vitest": "^0.34.6"
"@antfu/eslint-config": "catalog:cli",
"@antfu/ni": "catalog:cli",
"@antfu/utils": "catalog:inlined",
"@types/node": "catalog:types",
"bumpp": "catalog:cli",
"eslint": "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",
"tsx": "catalog:cli",
"typescript": "catalog:cli",
"vite": "catalog:cli",
"vitest": "catalog:testing"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && pnpm run build && npx nano-staged"
},
"lint-staged": {
"nano-staged": {
"*": "eslint --fix"
}
}
+4906 -3854
View File
File diff suppressed because it is too large. Load diff
+37
View File
@@ -1,3 +1,40 @@
catalogMode: prefer
ignoreWorkspaceRootCheck: true
minimumReleaseAgeExclude:
- '@types/node@25.9.0'
- tsx@4.22.2
- bumpp@12.0.0
shellEmulator: true
trustPolicy: no-downgrade
packages:
- playground
- docs
- packages/*
- examples/*
catalogs:
cli:
'@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
skills-npm: ^1.2.0
tsdown: ^0.22.12
tsx: ^4.23.1
typescript: ^6.0.3
vite: ^8.1.5
inlined:
'@antfu/utils': ^9.3.0
testing:
tsdown-stale-guard: ^0.1.3
tsnapi: ^1.0.0
vitest: ^4.1.10
types:
'@types/node': ^26.1.1
allowBuilds:
esbuild: true
simple-git-hooks: true
@@ -0,0 +1,7 @@
/**
* Generated by tsnapi — public API snapshot of `pkg-placeholder`
*/
// #region Variables
export declare const one: number;
export declare const two: number;
// #endregion
@@ -0,0 +1,7 @@
/**
* Generated by tsnapi — public API snapshot of `pkg-placeholder`
*/
// #region Variables
export var one /* const */
export var two /* const */
// #endregion
+14
View File
@@ -0,0 +1,14 @@
import { fileURLToPath } from 'node:url'
import { guardStaleBuild } from 'tsdown-stale-guard'
import { snapshotApiPerEntry } from 'tsnapi/vitest'
import { beforeAll, describe } from 'vitest'
const root = fileURLToPath(new URL('..', import.meta.url))
describe('api snapshot', () => {
beforeAll(async () => {
await guardStaleBuild({ root })
})
snapshotApiPerEntry(root)
})
-7
View File
@@ -1,7 +0,0 @@
import { describe, expect, it } from 'vitest'
describe('should', () => {
it('exported', () => {
expect(1).toEqual(1)
})
})
+7 -5
View File
@@ -1,13 +1,15 @@
{
"compilerOptions": {
"target": "es2018",
"lib": ["esnext"],
"module": "esnext",
"moduleResolution": "node",
"target": "ESNext",
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"esModuleInterop": true,
"strict": true,
"strictNullChecks": true,
"noEmit": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true
}
+14
View File
@@ -0,0 +1,14 @@
import { defineConfig } from 'tsdown'
import { StaleGuardRecorder } from 'tsdown-stale-guard'
export default defineConfig({
entry: [
'src/index.ts',
],
dts: true,
exports: true,
publint: true,
plugins: [
StaleGuardRecorder(),
],
})
+6
View File
@@ -0,0 +1,6 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
},
})