Skip to content

Commit 43155ec

Browse files
committed
refactor: migrate from bun to node & pnpm, build with tsc, update code & ci
1 parent 111af2f commit 43155ec

18 files changed

Lines changed: 3561 additions & 991 deletions

.github/workflows/ci.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/qa.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: QA
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
- uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
- uses: actions/setup-node@v6
21+
with:
22+
node-version: lts/*
23+
cache: pnpm
24+
- run: pnpm install --frozen-lockfile
25+
- run: pnpm run lint
26+
27+
typecheck:
28+
name: Typecheck
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v6
32+
- uses: pnpm/action-setup@v4
33+
with:
34+
run_install: false
35+
- uses: actions/setup-node@v6
36+
with:
37+
node-version: lts/*
38+
cache: pnpm
39+
- run: pnpm install --frozen-lockfile
40+
- run: pnpm run typecheck

.github/workflows/release.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,24 @@ on:
77

88
jobs:
99
publish-npm:
10+
name: Build and Publish to npm
1011
permissions:
1112
id-token: write
1213
contents: read
1314
runs-on: ubuntu-latest
1415
steps:
15-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1617
with:
1718
fetch-depth: 0
18-
- uses: oven-sh/setup-bun@v2
19-
- run: bun install
20-
- run: bun run build
21-
- run: bun publish --access=public
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
run_install: false
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: lts/*
25+
cache: pnpm
26+
registry-url: 'https://registry.npmjs.org'
27+
- run: npm install -g npm@latest
28+
- run: pnpm install --frozen-lockfile
29+
- run: pnpm run build
30+
- run: pnpm publish --access=public --provenance --no-git-checks

bun.lock

Lines changed: 0 additions & 856 deletions
This file was deleted.
File renamed without changes.

package.json

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@grom.js/bot-api-spec",
33
"type": "module",
44
"version": "0.4.1",
5+
"packageManager": "pnpm@10.25.0",
56
"description": "Telegram Bot API specification as a collection of JavaScript objects in a custom format.",
67
"license": "MIT",
78
"repository": {
@@ -12,32 +13,41 @@
1213
".": {
1314
"types": "./dist/index.d.ts",
1415
"import": "./dist/index.js"
16+
},
17+
"./format": {
18+
"types": "./dist/format.d.ts",
19+
"import": "./dist/format.js"
1520
}
1621
},
1722
"files": [
18-
"dist/"
23+
"./dist/",
24+
"./src/"
1925
],
26+
"engines": {
27+
"node": ">=22.18"
28+
},
2029
"scripts": {
21-
"typecheck": "tsc",
22-
"build": "tsdown",
30+
"typecheck": "tsc --build --noEmit",
31+
"build": "tsc --build",
2332
"lint": "eslint .",
2433
"lint:fix": "eslint . --fix",
25-
"gen:spec": "bun run ./scripts/gen.ts",
26-
"gen:return-types": "bun run ./scripts/gen-return-types.ts",
34+
"gen:spec": "node ./scripts/gen.ts",
35+
"gen:return-types": "node --env-file=./.env ./scripts/gen-return-types.ts",
36+
"deps": "taze --write --interactive --include-locked minor",
2737
"release": "bumpp"
2838
},
2939
"devDependencies": {
30-
"@antfu/eslint-config": "^5.4.1",
31-
"@types/bun": "^1.2.22",
32-
"@types/turndown": "^5.0.5",
33-
"bumpp": "^10.2.3",
34-
"cheerio": "^1.1.2",
35-
"domhandler": "^5.0.3",
36-
"eslint": "^9.36.0",
37-
"eslint-plugin-format": "^1.0.1",
38-
"tsdown": "^0.15.5",
39-
"turndown": "^7.2.1",
40-
"typescript": "^5.9.2",
41-
"zod": "^4.1.11"
40+
"@antfu/eslint-config": "7.0.1",
41+
"@types/node": "22.19.7",
42+
"@types/turndown": "5.0.6",
43+
"bumpp": "10.4.0",
44+
"cheerio": "1.1.2",
45+
"domhandler": "5.0.3",
46+
"eslint": "9.39.2",
47+
"eslint-plugin-format": "1.3.1",
48+
"taze": "19.9.2",
49+
"turndown": "7.2.2",
50+
"typescript": "5.9.3",
51+
"zod": "4.3.5"
4252
}
4353
}

0 commit comments

Comments
 (0)