Skip to content

Commit 193b129

Browse files
authored
use TS natively and switch to pnpm (#1672)
* use TS natively * use pnpm
1 parent 89c714c commit 193b129

11 files changed

Lines changed: 826 additions & 2999 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3-
41
name: Node.js CI
5-
6-
on:
7-
push:
8-
branches: [ "main" ]
9-
pull_request:
10-
branches: [ "main" ]
11-
2+
on: [push]
123
jobs:
134
build:
14-
155
runs-on: ubuntu-latest
16-
17-
strategy:
18-
matrix:
19-
node-version: [22.x]
20-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21-
226
steps:
23-
- uses: actions/checkout@v3
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v3
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm ci
30-
- run: npm run build --if-present
31-
- run: npm test
7+
- uses: actions/checkout@v5
8+
- uses: pnpm/action-setup@v4
9+
with:
10+
version: 10
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: '22.x'
14+
cache: 'pnpm'
15+
- run: pnpm install
16+
- run: pnpm run typecheck
17+
- run: pnpm test

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3-
4-
name: Node.js Package
5-
1+
name: Publish Package to npmjs
62
on:
73
release:
84
types: [published]
9-
10-
permissions:
11-
contents: read
12-
135
jobs:
146
build:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
19-
with:
20-
node-version: 22
21-
- run: npm ci
22-
- run: npm test
23-
24-
publish-npm:
25-
needs: build
267
runs-on: ubuntu-latest
278
permissions:
9+
contents: read
2810
id-token: write
2911
steps:
30-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
13+
- uses: pnpm/action-setup@v4
14+
with:
15+
version: 10
3116
- uses: actions/setup-node@v4
3217
with:
33-
node-version: 22
34-
registry-url: https://registry.npmjs.org/
35-
- run: npm ci
36-
- run: npm publish --provenance --access public
18+
node-version: '22.x'
19+
registry-url: 'https://registry.npmjs.org'
20+
- run: pnpm install
21+
- run: pnpm publish --provenance --access public
3722
env:
38-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)