Author SHA1 Message Date
Renovate Bot 05af33e247 Add renovate.json 2020-11-04 09:14:27 +00:00
28 changed files with 9124 additions and 5740 deletions

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
dist
typings
+12
View File
@@ -0,0 +1,12 @@
{
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"extends": ["@antfu/eslint-config-ts"],
"plugins": ["jest"],
"rules": {}
}
-2
View File
@@ -1,2 +0,0 @@
github: [antfu]
opencollective: antfu
-19
View File
@@ -1,19 +0,0 @@
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
@@ -1,15 +0,0 @@
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
@@ -0,0 +1,24 @@
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
+80 -12
View File
@@ -1,13 +1,81 @@
.cache
.DS_Store
.githooks
.idea
*.log
*.tgz
coverage
dist
lib-cov
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
node_modules
skills/npm-*
temp
*.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
.idea
-6
View File
@@ -1,6 +0,0 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"antfu.pnpm-catalog-lens"
]
}
-38
View File
@@ -1,38 +0,0 @@
{
// 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
@@ -1 +0,0 @@
Please refer to https://github.com/antfu/contribute
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2025-PRESENT Anthony Fu <https://github.com/antfu>
Copyright (c) 2020 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
+1 -42
View File
@@ -1,42 +1 @@
# 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
# ts-starter
-9
View File
@@ -1,9 +0,0 @@
// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu(
{
type: 'lib',
pnpm: true,
},
)
+12
View File
@@ -0,0 +1,12 @@
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
+45 -59
View File
@@ -1,73 +1,59 @@
{
"name": "pkg-placeholder",
"type": "module",
"name": "@antfu/ts-starter",
"version": "0.0.0",
"packageManager": "pnpm@11.15.1",
"description": "_description_",
"description": "",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu/pkg-placeholder#readme",
"sideEffects": false,
"bugs": {
"url": "https://github.com/<placeholder>/issues"
},
"homepage": "https://github.com/<placeholder>#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/antfu/pkg-placeholder.git"
"url": "git+https://github.com/<placeholder>.git"
},
"bugs": "https://github.com/antfu/pkg-placeholder/issues",
"keywords": [],
"sideEffects": false,
"exports": {
".": "./dist/index.mjs",
"./package.json": "./package.json"
"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"
]
},
"types": "./dist/index.d.mts",
"files": [
"dist"
],
"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"
},
"dependencies": {},
"devDependencies": {
"@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"
"@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"
}
}
-5436
View File
File diff suppressed because it is too large. Load diff
-40
View File
@@ -1,40 +0,0 @@
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
@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}
+1 -2
View File
@@ -1,2 +1 @@
export const one = 1
export const two = 2
export * from './number'
+2
View File
@@ -0,0 +1,2 @@
export const one = 1
export const two = 2
@@ -1,7 +0,0 @@
/**
* Generated by tsnapi — public API snapshot of `pkg-placeholder`
*/
// #region Variables
export declare const one: number;
export declare const two: number;
// #endregion
@@ -1,7 +0,0 @@
/**
* Generated by tsnapi — public API snapshot of `pkg-placeholder`
*/
// #region Variables
export var one /* const */
export var two /* const */
// #endregion
-14
View File
@@ -1,14 +0,0 @@
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
@@ -0,0 +1,7 @@
import { one } from '../src'
describe('should', () => {
it('exported', () => {
expect(one).toEqual(1)
})
})
+6 -10
View File
@@ -1,16 +1,12 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "es2017",
"module": "esnext",
"lib": ["esnext"],
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"strictNullChecks": true,
"noEmit": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true
"resolveJsonModule": true
}
}
-14
View File
@@ -1,14 +0,0 @@
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
@@ -1,6 +0,0 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
},
})