Skip to content

Commit cb2cf8b

Browse files
zenshanda-ai
andcommitted
chore: upgrade deps and modernize CI/CD
- Bump version to 1.2.3 - Upgrade TypeScript 6.0.3, ESLint 10.6.0, vitest 4.1.9, and all devDependencies - CI/CD: use actions/checkout@v5, pnpm/action-setup@v6, Node 24 - Publish: adopt OIDC trusted publishing with dry-run support - tsconfig: add rootDir, normalize outDir, remove legacy moduleResolution from CJS config Co-Authored-By: Anda Bot <noreply@anda.bot>
1 parent 383acd7 commit cb2cf8b

8 files changed

Lines changed: 422 additions & 520 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'CI'
1+
name: "CI"
22

33
on:
44
push:
@@ -13,15 +13,14 @@ jobs:
1313
packages: write
1414

1515
steps:
16-
- run: npm install -g pnpm
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
16+
- uses: actions/checkout@v5
17+
- uses: pnpm/action-setup@v6
18+
- uses: actions/setup-node@v6
1919
with:
20-
node-version: '20.x'
21-
cache: 'pnpm'
22-
registry-url: 'https://registry.npmjs.org'
20+
node-version: 24
21+
cache: "pnpm"
22+
registry-url: "https://registry.npmjs.org"
2323
- run: |
24-
pnpm install
2524
pnpm lint
2625
pnpm test
2726
pnpm build

.github/workflows/publish.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: 'Publish'
1+
name: "Publish"
22

33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- "v*"
77

88
jobs:
99
build:
@@ -13,18 +13,22 @@ jobs:
1313
packages: write
1414

1515
steps:
16-
- run: npm install -g pnpm
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
16+
- uses: actions/checkout@v5
17+
- uses: pnpm/action-setup@v6
18+
- uses: actions/setup-node@v6
1919
with:
20-
node-version: '20.x'
21-
cache: 'pnpm'
22-
registry-url: 'https://registry.npmjs.org'
20+
node-version: 24
21+
cache: "pnpm"
22+
registry-url: "https://registry.npmjs.org"
2323
- run: |
2424
pnpm install
2525
pnpm lint
2626
pnpm test
2727
pnpm build
28-
- run: npm publish .
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
- name: Dry-run npm publish
29+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
30+
run: npm publish --dry-run --access public
31+
# OIDC trusted publishing: no NODE_AUTH_TOKEN, provenance is generated automatically.
32+
- name: Publish to npm
33+
if: ${{ github.event_name == 'push' || inputs.dry_run == false }}
34+
run: npm publish --access public

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "xid-ts",
33
"type": "module",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"author": "0xZensh <txr1883@gmail.com>",
66
"description": "xid is a globally unique id generator thought for the web. A Typescript port of https://github.com/rs/xid.",
77
"license": "MIT",
@@ -42,18 +42,18 @@
4242
"test": "vitest src --coverage --run"
4343
},
4444
"devDependencies": {
45-
"@types/node": "^25.1.0",
46-
"@typescript-eslint/eslint-plugin": "^8.54.0",
47-
"@typescript-eslint/parser": "^8.54.0",
48-
"@vitest/coverage-v8": "^4.0.18",
49-
"cborg": "^4.5.8",
50-
"eslint": "^9.39.2",
45+
"@types/node": "^26.1.0",
46+
"@typescript-eslint/eslint-plugin": "^8.62.1",
47+
"@typescript-eslint/parser": "^8.62.1",
48+
"@vitest/coverage-v8": "^4.1.9",
49+
"cborg": "^5.1.7",
50+
"eslint": "^10.6.0",
5151
"eslint-plugin-import": "^2.32.0",
5252
"eslint-config-prettier": "^10.1.8",
53-
"eslint-plugin-prettier": "^5.5.5",
54-
"prettier": "^3.8.1",
55-
"typescript": "^5.9.3",
56-
"vitest": "^4.0.18"
53+
"eslint-plugin-prettier": "^5.5.6",
54+
"prettier": "^3.9.4",
55+
"typescript": "^6.0.3",
56+
"vitest": "^4.1.9"
5757
},
5858
"dependencies": {},
5959
"keywords": [

0 commit comments

Comments
 (0)