110 Commits
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
Anthony Fu b55a386469 chore: update deps 2023-10-08 22:09:03 +08:00
Anthony Fu 1f68471391 chore: update deps 2023-09-27 18:07:20 +08:00
Anthony Fu abeb203b4a chore: update deps 2023-09-23 18:11:02 +08:00
Anthony Fu 2c477f87ab chore: clean up 2023-09-22 04:02:06 +08:00
Anthony Fu 0ec76ee5f0 chore: update 2023-09-22 03:59:48 +08:00
Anthony Fu 220b8af18e feat: use new eslint-config 2023-09-22 01:54:00 +08:00
Anthony Fu 0bfc447aa9 chore: update deps 2023-08-29 10:23:12 +02:00
Anthony Fu 87d92c78f1 chore: update badges 2023-08-29 10:21:56 +02:00
Anthony Fu e8eb570761 chore: update deps 2023-08-22 16:13:53 +02:00
Anthony Fu 3a442dd5d1 chore: update deps 2023-07-26 10:57:03 +08:00
Anthony Fu 711293df81 chore: update deps 2023-06-01 11:23:07 +02:00
Anthony Fu 03d463b56e chore: update deps 2023-04-06 10:13:02 +02:00
Anthony Fu 5cc4d93838 chore: bump node version 2023-03-30 19:43:03 +02:00
Anthony Fu 690f972463 chore: update deps 2023-03-30 18:47:40 +02:00
Anthony Fu 49627f98bf chore: update deps 2023-03-21 18:04:03 +01:00
Anthony Fu 9ba269f01a chore: setup lint-stage 2023-02-25 00:00:28 +01:00
Anthony Fu 3a70f34631 chore: update deps 2023-02-13 22:21:06 +01:00
Anthony Fu e2b1f8730f chore: update deps 2022-09-19 19:45:01 +08:00
Anthony Fu cba4dfacc3 chore: update deps 2022-08-16 17:44:08 +08:00
Anthony Fu 1d3e667264 chore: update deps 2022-07-29 19:56:01 +08:00
Anthony Fu bd802599bc chore: update ci 2022-07-29 19:53:38 +08:00
Anthony Fu 574bae6096 chore: update deps 2022-07-10 10:52:06 +08:00
Anthony Fu b1d2f21629 chore: update deps 2022-06-18 20:16:38 +08:00
Anthony Fu 5d1361cad2 chore: simpify release command 2022-06-15 23:54:47 +08:00
Anthony Fu 3334f2167d chore: update deps 2022-06-15 23:53:40 +08:00
Anthony Fu 65021595cc chore: update 2022-06-13 18:03:22 +08:00
Anthony Fu 4358d816f1 chore: update 2022-06-13 17:47:09 +08:00
Anthony Fu f99510b3fb chore: contributing guide 2022-05-26 16:18:16 +08:00
Anthony Fu d76bbf90cd chore: update deps 2022-05-25 07:04:13 +08:00
Anthony Fu 644079f3c4 chore: update deps 2022-05-12 13:14:50 +08:00
Anthony Fu 843ab09319 chore: update deps 2022-05-10 20:00:59 +08:00
Anthony Fu d414465d2e feat: type module by default 2022-05-04 04:06:48 +08:00
Anthony Fu 120f702862 chore: update ci 2022-04-28 14:48:58 +08:00
Anthony Fu cbfb52684c chore: update deps 2022-04-28 14:48:05 +08:00
Anthony Fu 54669e1e8b chore: update deps 2022-04-11 21:56:43 +08:00
Anthony Fu b652bb2324 chore: update license 2022-04-07 10:49:41 +08:00
Anthony Fu b735ccf16b chore: update deps 2022-04-07 05:57:17 +08:00
Anthony Fu 05277145ac chore: update 2022-03-24 21:04:40 +08:00
Anthony Fu 58de0a0f2d chore: update 2022-03-23 08:08:37 +08:00
Anthony Fu dcccf3089c chore: clean up 2022-03-19 16:14:50 +08:00
Anthony Fu c1604b337a chore: update 2022-03-19 16:08:37 +08:00
Anthony Fu 945bc12c45 chore: update deps 2022-03-19 16:04:44 +08:00
Anthony Fu b8e4da60ee chore: update deps 2022-03-10 20:33:22 +08:00
Anthony Fu 479f69e9a8 chore: update 2022-03-10 19:06:37 +08:00
Anthony Fu 19c99b081a chore: update ci script 2022-02-26 17:00:36 +08:00
Anthony Fu b038774520 chore: update deps 2022-02-26 17:00:09 +08:00
Anthony Fu 49ec8e540e chore: update deps 2022-02-26 16:52:19 +08:00
Anthony Fu 1e6c30d40e chore: update 2022-01-03 22:28:54 +08:00
Anthony Fu 09cf08abb8 chore: update deps 2021-12-21 01:48:19 +08:00
Anthony Fu 88d31bc365 chore: update deps 2021-12-20 05:05:28 +08:00
Anthony Fu 7b9688536c chore: update lint 2021-12-18 19:33:57 +08:00
Anthony Fu db055b9ed1 chore: update 2021-12-18 19:26:53 +08:00
Anthony Fu 60b53aaa2f chore: update 2021-12-18 13:16:27 +08:00
Anthony Fu b6d7f4fcab chore: update 2021-12-18 12:30:48 +08:00
Anthony Fu f1d73e195d chore: switch to unbuild 2021-11-29 18:36:09 +08:00
Anthony Fu e9f6d37360 chore: skip lint 2021-10-09 01:46:42 +08:00
Anthony Fu eb6526281c chore: update deps 2021-10-08 23:33:40 +08:00
Anthony Fu 8550c2d748 chore: update deps 2021-08-24 10:48:36 +08:00
Anthony Fu f56ba9fddf chore: update 2021-08-24 10:42:10 +08:00
Anthony Fu b7164bf251 chore: disable lint in ci 2021-08-05 16:39:17 +08:00
Anthony Fu 2b653b5424 chore: update deps 2021-08-05 16:38:41 +08:00
Anthony Fu f51d60af4c chore: update 2021-08-05 16:26:15 +08:00
Anthony Fu 12ca186a5c chore: update deps 2021-04-02 00:42:23 +08:00
Anthony Fu 2eb2b6edf4 chore: update test script 2021-02-27 15:37:19 +08:00
Anthony Fu 55b2258ba4 chore: update ci 2021-02-17 16:09:22 +08:00
Anthony Fu 5df24c5bf2 chore: fix lint 2021-02-17 15:48:50 +08:00
Anthony Fu bba0a5148a feat: update! 2021-02-17 15:31:32 +08:00
28 changed files with 5739 additions and 9123 deletions

No files matched your search

-2
View File
@@ -1,2 +0,0 @@
dist
typings
-12
View File
@@ -1,12 +0,0 @@
{
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"extends": ["@antfu/eslint-config-ts"],
"plugins": ["jest"],
"rules": {}
}
+2
View File
@@ -0,0 +1,2 @@
github: [antfu]
opencollective: antfu
+19
View File
@@ -0,0 +1,19 @@
name: Unit Test
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions: {}
jobs:
unit-test:
uses: sxzz/workflows/.github/workflows/unit-test.yml@main
# coverage:
# uses: sxzz/workflows/.github/workflows/coverage.yml@main
# needs: unit-test
# permissions:
# id-token: write
+15
View File
@@ -0,0 +1,15 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
uses: sxzz/workflows/.github/workflows/release.yml@main
with:
publish: true
permissions:
contents: write
id-token: write
-24
View File
@@ -1,24 +0,0 @@
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Install
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test
+11 -79
View File
@@ -1,81 +1,13 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE
.DS_Store
.githooks
.idea
*.log
*.tgz
coverage
dist
lib-cov
logs
node_modules
skills/npm-*
temp
+6
View File
@@ -0,0 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"antfu.pnpm-catalog-lens"
]
}
+38
View File
@@ -0,0 +1,38 @@
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}
+1
View File
@@ -0,0 +1 @@
Please refer to https://github.com/antfu/contribute
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 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
+42 -1
View File
@@ -1 +1,42 @@
# ts-starter
# pkg-placeholder
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]
_description_
## 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" alt="Sponsors"/>
</a>
</p>
## License
[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://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://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
[license-href]: https://github.com/antfu/pkg-placeholder/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/pkg-placeholder
+9
View File
@@ -0,0 +1,9 @@
// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu(
{
type: 'lib',
pnpm: true,
},
)
-12
View File
@@ -1,12 +0,0 @@
module.exports = {
roots: [
'<rootDir>/test',
],
testMatch: [
'**/__tests__/**/*.+(ts|tsx|js)',
'**/?(*.)+(spec|test).+(ts|tsx|js)',
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
}
-8926
View File
File diff suppressed because it is too large. Load diff
+59 -45
View File
@@ -1,59 +1,73 @@
{
"name": "@antfu/ts-starter",
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"description": "",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"packageManager": "pnpm@11.15.1",
"description": "_description_",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"sideEffects": false,
"bugs": {
"url": "https://github.com/<placeholder>/issues"
},
"homepage": "https://github.com/<placeholder>#readme",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu/pkg-placeholder#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/<placeholder>.git"
"url": "git+https://github.com/antfu/pkg-placeholder.git"
},
"scripts": {
"prepublishOnly": "npm run build",
"watch": "npm run build -- --watch",
"dev": "esno src/index.ts",
"build": "tsup src/index.ts --format cjs,esm --dts",
"publish:ci": "npm publish --access public",
"release": "npx bumpp --commit --push --tag && npm run publish:ci",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint:fix": "npm run lint -- --fix",
"test": "jest"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,js}": [
"eslint --fix",
"git add"
]
"bugs": "https://github.com/antfu/pkg-placeholder/issues",
"keywords": [],
"sideEffects": false,
"exports": {
".": "./dist/index.mjs",
"./package.json": "./package.json"
},
"types": "./dist/index.d.mts",
"files": [
"dist"
],
"dependencies": {},
"scripts": {
"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-ts": "^0.4.3",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.6",
"eslint": "^7.12.1",
"eslint-plugin-jest": "^24.1.0",
"esno": "^0.2.4",
"husky": "^4.3.0",
"jest": "^26.6.3",
"lint-staged": "^10.5.1",
"ts-jest": "^26.4.3",
"tsup": "^3.7.1",
"typescript": "^4.0.5"
"@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 i --frozen-lockfile --ignore-scripts --offline && pnpm run build && npx nano-staged"
},
"nano-staged": {
"*": "eslint --fix"
}
}
+5436
View File
File diff suppressed because it is too large. Load diff
+40
View File
@@ -0,0 +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
-5
View File
@@ -1,5 +0,0 @@
{
"extends": [
"config:base"
]
}
+2 -1
View File
@@ -1 +1,2 @@
export * from './number'
export const one = 1
export const two = 2
-2
View File
@@ -1,2 +0,0 @@
export const one = 1
export const two = 2
@@ -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 { one } from '../src'
describe('should', () => {
it('exported', () => {
expect(one).toEqual(1)
})
})
+10 -6
View File
@@ -1,12 +1,16 @@
{
"compilerOptions": {
"target": "es2017",
"module": "esnext",
"lib": ["esnext"],
"moduleResolution": "node",
"esModuleInterop": true,
"target": "ESNext",
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"strict": true,
"strictNullChecks": true,
"resolveJsonModule": 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: {
},
})