Compare commits
110
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44c491c079 | ||
|
|
99a0a2874a | ||
|
|
0ac25856a3 | ||
|
|
d25b1bce8e | ||
|
|
977d3d4066 | ||
|
|
b898f3cf9a | ||
|
|
f44a384227 | ||
|
|
83cf9c396b | ||
|
|
68c00a2b25 | ||
|
|
e76a9c0f18 | ||
|
|
d16cf1e854 | ||
|
|
bcca902a44 | ||
|
|
8a2f9026ff | ||
|
|
95557b44ae | ||
|
|
6011481edc | ||
|
|
4d180f40bf | ||
|
|
296e97d5fa | ||
|
|
3fd967d71f | ||
|
|
608a888262 | ||
|
|
1ed66db81d | ||
|
|
49248f74e2 | ||
|
|
11e95cd5da | ||
|
|
e86bcbe3d5 | ||
|
|
a4c4a820ec | ||
|
|
2036435c45 | ||
|
|
7feaa975d3 | ||
|
|
396cbec550 | ||
|
|
0c31fbe960 | ||
|
|
1f51d21f90 | ||
|
|
a05f3ec6f5 | ||
|
|
964047d5be | ||
|
|
f8fb542605 | ||
|
|
d5f7e5f41d | ||
|
|
eb55ddbc3b | ||
|
|
0cc51c5e79 | ||
|
|
9fe749aa56 | ||
|
|
fe571ba0c2 | ||
|
|
1f834fb7f9 | ||
|
|
f30e2757bf | ||
|
|
41b9f245ff | ||
|
|
a2e9f70880 | ||
|
|
657ff8de2b | ||
|
|
c427ea1aa2 | ||
|
|
b55a386469 | ||
|
|
1f68471391 | ||
|
|
abeb203b4a | ||
|
|
2c477f87ab | ||
|
|
0ec76ee5f0 | ||
|
|
220b8af18e | ||
|
|
0bfc447aa9 | ||
|
|
87d92c78f1 | ||
|
|
e8eb570761 | ||
|
|
3a442dd5d1 | ||
|
|
711293df81 | ||
|
|
03d463b56e | ||
|
|
5cc4d93838 | ||
|
|
690f972463 | ||
|
|
49627f98bf | ||
|
|
9ba269f01a | ||
|
|
3a70f34631 | ||
|
|
e2b1f8730f | ||
|
|
cba4dfacc3 | ||
|
|
1d3e667264 | ||
|
|
bd802599bc | ||
|
|
574bae6096 | ||
|
|
b1d2f21629 | ||
|
|
5d1361cad2 | ||
|
|
3334f2167d | ||
|
|
65021595cc | ||
|
|
4358d816f1 | ||
|
|
f99510b3fb | ||
|
|
d76bbf90cd | ||
|
|
644079f3c4 | ||
|
|
843ab09319 | ||
|
|
d414465d2e | ||
|
|
120f702862 | ||
|
|
cbfb52684c | ||
|
|
54669e1e8b | ||
|
|
b652bb2324 | ||
|
|
b735ccf16b | ||
|
|
05277145ac | ||
|
|
58de0a0f2d | ||
|
|
dcccf3089c | ||
|
|
c1604b337a | ||
|
|
945bc12c45 | ||
|
|
b8e4da60ee | ||
|
|
479f69e9a8 | ||
|
|
19c99b081a | ||
|
|
b038774520 | ||
|
|
49ec8e540e | ||
|
|
1e6c30d40e | ||
|
|
09cf08abb8 | ||
|
|
88d31bc365 | ||
|
|
7b9688536c | ||
|
|
db055b9ed1 | ||
|
|
60b53aaa2f | ||
|
|
b6d7f4fcab | ||
|
|
f1d73e195d | ||
|
|
e9f6d37360 | ||
|
|
eb6526281c | ||
|
|
8550c2d748 | ||
|
|
f56ba9fddf | ||
|
|
b7164bf251 | ||
|
|
2b653b5424 | ||
|
|
f51d60af4c | ||
|
|
12ca186a5c | ||
|
|
2eb2b6edf4 | ||
|
|
55b2258ba4 | ||
|
|
5df24c5bf2 | ||
|
|
bba0a5148a |
No files matched your search
@@ -1,2 +0,0 @@
|
|||||||
dist
|
|
||||||
typings
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"env": {
|
|
||||||
"es6": true,
|
|
||||||
"browser": true,
|
|
||||||
"node": true,
|
|
||||||
"jest": true
|
|
||||||
},
|
|
||||||
"extends": ["@antfu/eslint-config-ts"],
|
|
||||||
"plugins": ["jest"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
github: [antfu]
|
||||||
|
opencollective: antfu
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
@@ -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
|
.cache
|
||||||
|
.DS_Store
|
||||||
# next.js build output
|
.githooks
|
||||||
.next
|
|
||||||
|
|
||||||
# nuxt.js build output
|
|
||||||
.nuxt
|
|
||||||
|
|
||||||
# Nuxt generate
|
|
||||||
dist
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless
|
|
||||||
|
|
||||||
# IDE
|
|
||||||
.idea
|
.idea
|
||||||
|
*.log
|
||||||
|
*.tgz
|
||||||
|
coverage
|
||||||
|
dist
|
||||||
|
lib-cov
|
||||||
|
logs
|
||||||
|
node_modules
|
||||||
|
skills/npm-*
|
||||||
|
temp
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"antfu.pnpm-catalog-lens"
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+38
@@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Please refer to https://github.com/antfu/contribute
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// @ts-check
|
||||||
|
import antfu from '@antfu/eslint-config'
|
||||||
|
|
||||||
|
export default antfu(
|
||||||
|
{
|
||||||
|
type: 'lib',
|
||||||
|
pnpm: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
roots: [
|
|
||||||
'<rootDir>/test',
|
|
||||||
],
|
|
||||||
testMatch: [
|
|
||||||
'**/__tests__/**/*.+(ts|tsx|js)',
|
|
||||||
'**/?(*.)+(spec|test).+(ts|tsx|js)',
|
|
||||||
],
|
|
||||||
transform: {
|
|
||||||
'^.+\\.(ts|tsx)$': 'ts-jest',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Generated
-8926
File diff suppressed because it is too large.
Load diff
+59
-45
@@ -1,59 +1,73 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/ts-starter",
|
"name": "pkg-placeholder",
|
||||||
|
"type": "module",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "",
|
"packageManager": "pnpm@11.15.1",
|
||||||
"main": "dist/index.js",
|
"description": "_description_",
|
||||||
"module": "dist/index.mjs",
|
|
||||||
"types": "dist/index.d.ts",
|
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"sideEffects": false,
|
"funding": "https://github.com/sponsors/antfu",
|
||||||
"bugs": {
|
"homepage": "https://github.com/antfu/pkg-placeholder#readme",
|
||||||
"url": "https://github.com/<placeholder>/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/<placeholder>#readme",
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/<placeholder>.git"
|
"url": "git+https://github.com/antfu/pkg-placeholder.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"bugs": "https://github.com/antfu/pkg-placeholder/issues",
|
||||||
"prepublishOnly": "npm run build",
|
"keywords": [],
|
||||||
"watch": "npm run build -- --watch",
|
"sideEffects": false,
|
||||||
"dev": "esno src/index.ts",
|
"exports": {
|
||||||
"build": "tsup src/index.ts --format cjs,esm --dts",
|
".": "./dist/index.mjs",
|
||||||
"publish:ci": "npm publish --access public",
|
"./package.json": "./package.json"
|
||||||
"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"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
|
"types": "./dist/index.d.mts",
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"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": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config-ts": "^0.4.3",
|
"@antfu/eslint-config": "catalog:cli",
|
||||||
"@types/jest": "^26.0.15",
|
"@antfu/ni": "catalog:cli",
|
||||||
"@types/node": "^14.14.6",
|
"@antfu/utils": "catalog:inlined",
|
||||||
"eslint": "^7.12.1",
|
"@types/node": "catalog:types",
|
||||||
"eslint-plugin-jest": "^24.1.0",
|
"bumpp": "catalog:cli",
|
||||||
"esno": "^0.2.4",
|
"eslint": "catalog:cli",
|
||||||
"husky": "^4.3.0",
|
"nano-staged": "catalog:cli",
|
||||||
"jest": "^26.6.3",
|
"publint": "catalog:cli",
|
||||||
"lint-staged": "^10.5.1",
|
"simple-git-hooks": "catalog:cli",
|
||||||
"ts-jest": "^26.4.3",
|
"skills-npm": "catalog:cli",
|
||||||
"tsup": "^3.7.1",
|
"tsdown": "catalog:cli",
|
||||||
"typescript": "^4.0.5"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
+5436
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"config:base"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
export * from './number'
|
export const one = 1
|
||||||
|
export const two = 2
|
||||||
@@ -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
|
||||||
@@ -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)
|
||||||
|
})
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { one } from '../src'
|
|
||||||
|
|
||||||
describe('should', () => {
|
|
||||||
it('exported', () => {
|
|
||||||
expect(one).toEqual(1)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
+10
-6
@@ -1,12 +1,16 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2017",
|
"target": "ESNext",
|
||||||
"module": "esnext",
|
"lib": ["ESNext"],
|
||||||
"lib": ["esnext"],
|
"module": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "Bundler",
|
||||||
"esModuleInterop": true,
|
"resolveJsonModule": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"resolveJsonModule": true
|
"noEmit": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"verbatimModuleSyntax": true,
|
||||||
|
"skipDefaultLibCheck": true,
|
||||||
|
"skipLibCheck": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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(),
|
||||||
|
],
|
||||||
|
})
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { defineConfig } from 'vitest/config'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in new issue
Block a user