Skip to content

Commit 3e3afb0

Browse files
committed
refactor: upgrade project architecture, reduce dependency installations
1 parent 9d3c70e commit 3e3afb0

File tree

190 files changed

+8013
-7838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+8013
-7838
lines changed

.DS_Store

-8 KB
Binary file not shown.

.changeset/README.md

-8
This file was deleted.

.changeset/config.json

-11
This file was deleted.

.eslintrc

-6
This file was deleted.

.github/workflows/ci.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
cache: pnpm
24+
25+
- run: pnpm i -g @antfu/ni
26+
- run: nci
27+
- run: nr lint
28+
- run: nr typecheck
29+
30+
test:
31+
runs-on: ${{ matrix.os }}
32+
33+
strategy:
34+
matrix:
35+
node: [lts/*]
36+
os: [ubuntu-latest, windows-latest, macos-latest]
37+
fail-fast: false
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: pnpm/action-setup@v4
42+
with:
43+
run_install: false
44+
- name: Set node ${{ matrix.node }}
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: ${{ matrix.node }}
48+
cache: pnpm
49+
50+
- run: pnpm i -g @antfu/ni
51+
- run: nci
52+
- run: nr build
53+
- run: nr test

.github/workflows/release.yml

+24-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
1-
name: Publish Package
1+
name: Release
2+
3+
permissions:
4+
id-token: write
5+
contents: write
6+
27
on:
38
push:
49
tags:
5-
- v*
10+
- 'v*'
11+
612
jobs:
7-
publish-npm:
8-
permissions:
9-
id-token: write
13+
release:
1014
runs-on: ubuntu-latest
1115
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1417
with:
1518
fetch-depth: 0
16-
- name: Install pnpm
17-
uses: pnpm/action-setup@v2
18-
- name: Use Node.js v18
19-
uses: actions/setup-node@v3
19+
- uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v4
2021
with:
21-
node-version: 18
22+
node-version: lts/*
2223
registry-url: https://registry.npmjs.org/
23-
cache: pnpm
24-
- run: pnpm install
25-
- run: npx changelogithub
26-
continue-on-error: true
24+
25+
- run: pnpm dlx changelogithub
2726
env:
28-
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}}
27+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
28+
29+
# # Uncomment the following lines to publish to npm on CI
30+
#
31+
# - run: pnpm install
32+
# - run: pnpm publish -r --access public
33+
# env:
34+
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
35+
# NPM_CONFIG_PROVENANCE: true

.gitignore

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
node_modules
2-
dist
3-
dist-test
1+
.cache
42
.DS_Store
5-
.turbo
3+
.idea
4+
*.log
5+
*.tgz
6+
coverage
7+
dist
8+
lib-cov
9+
logs
10+
node_modules
11+
temp
12+
cache
13+
.eslintcache

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-workspace-root-check=true
2+
shell-emulator=true

.vscode/settings.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
// Disable the default formatter, use eslint instead
3+
"prettier.enable": false,
4+
"editor.formatOnSave": false,
5+
6+
// Auto fix
7+
"editor.codeActionsOnSave": {
8+
"source.fixAll.eslint": "explicit",
9+
"source.organizeImports": "never"
10+
},
11+
12+
// Silent the stylistic rules in you IDE, but still auto fix them
13+
"eslint.rules.customizations": [
14+
{ "rule": "style/*", "severity": "off" },
15+
{ "rule": "*-indent", "severity": "off" },
16+
{ "rule": "*-spacing", "severity": "off" },
17+
{ "rule": "*-spaces", "severity": "off" },
18+
{ "rule": "*-order", "severity": "off" },
19+
{ "rule": "*-dangle", "severity": "off" },
20+
{ "rule": "*-newline", "severity": "off" },
21+
{ "rule": "*quotes", "severity": "off" },
22+
{ "rule": "*semi", "severity": "off" }
23+
],
24+
25+
// Enable eslint for all supported languages
26+
"eslint.validate": [
27+
"javascript",
28+
"javascriptreact",
29+
"typescript",
30+
"typescriptreact",
31+
"vue",
32+
"html",
33+
"markdown",
34+
"json",
35+
"jsonc",
36+
"yaml"
37+
]
38+
}

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please refer to https://github.com/antfu/contribute

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025-PRESENT Hairyf <https://github.com/hairyf>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)