Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Commit bd2e633

Browse files
committed
Use tsdown instead of dnt
1 parent 69ef7db commit bd2e633

File tree

10 files changed

+1593
-252
lines changed

10 files changed

+1593
-252
lines changed

.github/workflows/main.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ jobs:
2828
- uses: denoland/setup-deno@v1
2929
with:
3030
deno-version: v2.x
31+
- uses: pnpm/action-setup@v4
32+
with:
33+
version: 10
3134
- uses: actions/setup-node@v4
3235
with:
3336
node-version: lts/*
37+
cache: pnpm
3438
- uses: oven-sh/setup-bun@v1
3539
with:
3640
bun-version: latest
@@ -40,9 +44,8 @@ jobs:
4044
with:
4145
files: .test-report.xml
4246
- run: deno task check
43-
- run: deno task dnt
44-
- run: bun run ./test_runner.js
45-
working-directory: ${{ github.workspace }}/npm/
47+
- run: pnpm test
48+
- run: pnpm test:bun
4649

4750
publish:
4851
if: github.event_name == 'push'
@@ -56,31 +59,42 @@ jobs:
5659
- uses: denoland/setup-deno@v1
5760
with:
5861
deno-version: v2.x
62+
- uses: pnpm/action-setup@v4
63+
with:
64+
version: 10
5965
- uses: actions/setup-node@v4
6066
with:
6167
node-version: lts/*
68+
cache: pnpm
6269
- if: github.ref_type == 'branch'
6370
run: |
71+
set -ex
6472
jq \
6573
--arg build "$GITHUB_RUN_NUMBER" \
6674
--arg commit "${GITHUB_SHA::8}" \
6775
'.version = .version + "-dev." + $build + "+" + $commit' \
6876
deno.json > deno.json.tmp
69-
mv deno.json.tmp deno.json
77+
jq \
78+
--arg build "$GITHUB_RUN_NUMBER" \
79+
'.version = .version + "-dev." + $build \
80+
package.json > package.json.tmp
81+
mv package.json.tmp package.json
7082
- if: github.ref_type == 'tag'
71-
run: '[[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]'
72-
- run: 'deno task dnt "$(jq -r .version deno.json)"'
73-
env:
74-
DNT_TEST: false
83+
run: |
84+
set -ex
85+
[[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]
86+
[[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]]
7587
- run: |
7688
set -ex
77-
npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
89+
pnpm install
90+
pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
7891
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
79-
npm publish --provenance --access public
92+
pnpm publish --provenance --access public
8093
else
81-
npm publish --provenance --access public --tag dev
94+
pnpm publish --provenance --access public --tag dev
8295
fi
8396
env:
8497
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
98+
NPM_CONFIG_PROVENANCE: "true"
8599
working-directory: ${{ github.workspace }}/npm/
86100
- run: deno publish --allow-dirty

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.dnt-import-map.json
2+
dist/
3+
node_modules/
24
npm/

deno.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,22 @@
99
},
1010
"imports": {
1111
"@deno/dnt": "jsr:@deno/dnt@^0.41.3",
12-
"@fedify/fedify": "jsr:@fedify/fedify@1.5.0",
13-
"@logtape/logtape": "jsr:@logtape/logtape@^0.9.0",
14-
"@std/assert": "jsr:@std/assert@^0.226.0",
12+
"@fedify/fedify": "jsr:@fedify/fedify@1.7.2",
13+
"@logtape/logtape": "jsr:@logtape/logtape@^1.0.0",
14+
"@std/assert": "jsr:@std/assert@^1.0.4",
1515
"@std/async": "jsr:@std/async@^1.0.5",
16-
"postgres": "npm:postgres@^3.4.5"
16+
"postgres": "npm:postgres@^3.4.7",
17+
"tsdown": "npm:tsdown@^0.12.9"
1718
},
19+
"nodeModulesDir": "none",
1820
"unstable": [
1921
"temporal"
2022
],
2123
"exclude": [
2224
".github",
23-
"npm"
25+
".test-report.xml",
26+
"npm",
27+
"pnpm-lock.yaml"
2428
],
2529
"tasks": {
2630
"check": "deno fmt --check && deno lint && deno check */*.ts",

0 commit comments

Comments
 (0)