Skip to content

Commit 97683a4

Browse files
committed
🎉 feat: use absolute path to generate declaration file
2 parents 5e54ce2 + 59a142b commit 97683a4

33 files changed

+3169
-3155
lines changed

.eslintrc.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
module.exports = {
2-
"env": {
3-
"es2021": true,
4-
"node": true
5-
},
6-
"extends": [
7-
"eslint:recommended",
8-
"plugin:@typescript-eslint/recommended"
9-
],
10-
"parser": "@typescript-eslint/parser",
11-
"parserOptions": {
12-
"ecmaVersion": "latest",
13-
"sourceType": "module"
14-
},
15-
"plugins": [
16-
"@typescript-eslint"
17-
],
18-
"rules": {
19-
"@typescript-eslint/ban-types": 'off',
20-
'@typescript-eslint/no-explicit-any': 'off'
21-
},
22-
"ignorePatterns": ["example/*", "tests/**/*"]
23-
}
1+
module.exports = {
2+
"env": {
3+
"es2021": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": "latest",
13+
"sourceType": "module"
14+
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
18+
"rules": {
19+
"@typescript-eslint/ban-types": 'off',
20+
'@typescript-eslint/no-explicit-any': 'off'
21+
},
22+
"ignorePatterns": ["example/*", "tests/**/*"]
23+
}

.github/dependabot.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
version: 2
2-
updates:
3-
- package-ecosystem: 'npm'
4-
directory: './'
5-
schedule:
6-
interval: 'daily'
7-
8-
- package-ecosystem: 'github-actions'
9-
directory: './'
10-
schedule:
11-
interval: 'daily'
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: './'
5+
schedule:
6+
interval: 'daily'
7+
8+
- package-ecosystem: 'github-actions'
9+
directory: './'
10+
schedule:
11+
interval: 'daily'

.github/workflows/ci.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
name: Code CI
2-
3-
on:
4-
push:
5-
pull_request:
6-
7-
jobs:
8-
build:
9-
name: Build and test code
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
16-
- name: Setup bun
17-
uses: oven-sh/setup-bun@v1
18-
with:
19-
bun-version: latest
20-
21-
- name: Install packages
22-
run: bun install
23-
24-
- name: Build code
25-
run: bun run build
26-
27-
- name: Test
28-
run: bun run test
1+
name: Code CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
name: Build and test code
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup bun
17+
uses: oven-sh/setup-bun@v1
18+
with:
19+
bun-version: latest
20+
21+
- name: Install packages
22+
run: bun install
23+
24+
- name: Build code
25+
run: bun run build
26+
27+
- name: Test
28+
run: bun run test

.github/workflows/publish.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
name: Publish
2-
3-
on:
4-
release:
5-
types: [published]
6-
7-
defaults:
8-
run:
9-
shell: bash
10-
11-
permissions:
12-
id-token: write
13-
14-
env:
15-
# Enable debug logging for actions
16-
ACTIONS_RUNNER_DEBUG: true
17-
18-
jobs:
19-
publish-npm:
20-
name: 'Publish: npm Registry'
21-
runs-on: ubuntu-latest
22-
steps:
23-
- name: 'Checkout'
24-
uses: actions/checkout@v4
25-
26-
- name: 'Setup Bun'
27-
uses: oven-sh/setup-bun@v1
28-
with:
29-
bun-version: latest
30-
registry-url: "https://registry.npmjs.org"
31-
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: '20.x'
35-
registry-url: 'https://registry.npmjs.org'
36-
37-
- name: Install packages
38-
run: bun install
39-
40-
- name: Build code
41-
run: bun run build
42-
43-
- name: Test
44-
run: bun run test
45-
46-
- name: 'Publish'
47-
env:
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
run: |
50-
npm publish --provenance --access=public
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
permissions:
12+
id-token: write
13+
14+
env:
15+
# Enable debug logging for actions
16+
ACTIONS_RUNNER_DEBUG: true
17+
18+
jobs:
19+
publish-npm:
20+
name: 'Publish: npm Registry'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: 'Checkout'
24+
uses: actions/checkout@v4
25+
26+
- name: 'Setup Bun'
27+
uses: oven-sh/setup-bun@v1
28+
with:
29+
bun-version: latest
30+
registry-url: "https://registry.npmjs.org"
31+
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: '20.x'
35+
registry-url: 'https://registry.npmjs.org'
36+
37+
- name: Install packages
38+
run: bun install
39+
40+
- name: Build code
41+
run: bun run build
42+
43+
- name: Test
44+
run: bun run test
45+
46+
- name: 'Publish'
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
run: |
50+
npm publish --provenance --access=public

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.DS_Store
2-
3-
node_modules
4-
.pnpm-debug.log
5-
dist
6-
1+
.DS_Store
2+
3+
node_modules
4+
.pnpm-debug.log
5+
dist
6+
77
build

.npmignore

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
.git
2-
.github
3-
.gitignore
4-
.prettierrc
5-
.cjs.swcrc
6-
.es.swcrc
7-
bun.lockb
8-
9-
node_modules
10-
tsconfig.json
11-
pnpm-lock.yaml
12-
jest.config.js
13-
nodemon.json
14-
15-
example
16-
src
17-
tests
18-
test
19-
CHANGELOG.md
20-
.eslintrc.js
21-
tsconfig.cjs.json
22-
tsconfig.esm.json
23-
tsconfig.dts.json
24-
25-
src
26-
build.ts
1+
.git
2+
.github
3+
.gitignore
4+
.prettierrc
5+
.cjs.swcrc
6+
.es.swcrc
7+
bun.lockb
8+
9+
node_modules
10+
tsconfig.json
11+
pnpm-lock.yaml
12+
jest.config.js
13+
nodemon.json
14+
15+
example
16+
src
17+
tests
18+
test
19+
CHANGELOG.md
20+
.eslintrc.js
21+
tsconfig.cjs.json
22+
tsconfig.esm.json
23+
tsconfig.dts.json
24+
25+
src
26+
build.ts

.prettierrc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{
2-
"useTabs": true,
3-
"tabWidth": 4,
4-
"semi": false,
5-
"singleQuote": true,
6-
"trailingComma": "none"
7-
}
1+
{
2+
"useTabs": true,
3+
"tabWidth": 4,
4+
"semi": false,
5+
"singleQuote": true,
6+
"trailingComma": "none"
7+
}

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# 1.3.11 - 10 Sep 2025
1+
# 1.3.12 - 10 Sep 2025
22
Improvement:
33
- type generator: add `compilerOptions`, `tmpRoot` options
44

55
Bug fix:
66
- type generator: use absolute path to generate types
77

8+
# 1.3.11 - 9 Sep 2025
9+
Bug fix:
10+
- type generator: convert Windows path to Unix for TypeScript CLI
11+
812
# 1.3.10 - 5 Sep 2025
913
Feature:
1014
- type generator: accept `.d.ts` to prevent type generation in production

LICENSE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Copyright 2022 saltyAom
2-
3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4-
5-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6-
7-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1+
Copyright 2022 saltyAom
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)