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

Commit fccddbf

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

File tree

10 files changed

+1594
-253
lines changed

10 files changed

+1594
-253
lines changed

.github/workflows/main.yaml

Lines changed: 26 additions & 12 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,9 @@ 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 install
48+
- run: pnpm test
49+
- run: pnpm test:bun
4650

4751
publish:
4852
if: github.event_name == 'push'
@@ -56,31 +60,41 @@ jobs:
5660
- uses: denoland/setup-deno@v1
5761
with:
5862
deno-version: v2.x
63+
- uses: pnpm/action-setup@v4
64+
with:
65+
version: 10
5966
- uses: actions/setup-node@v4
6067
with:
6168
node-version: lts/*
69+
cache: pnpm
6270
- if: github.ref_type == 'branch'
6371
run: |
72+
set -ex
6473
jq \
6574
--arg build "$GITHUB_RUN_NUMBER" \
6675
--arg commit "${GITHUB_SHA::8}" \
6776
'.version = .version + "-dev." + $build + "+" + $commit' \
6877
deno.json > deno.json.tmp
69-
mv deno.json.tmp deno.json
78+
jq \
79+
--arg build "$GITHUB_RUN_NUMBER" \
80+
'.version = .version + "-dev." + $build' \
81+
package.json > package.json.tmp
82+
mv package.json.tmp package.json
7083
- 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
84+
run: |
85+
set -ex
86+
[[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]
87+
[[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]]
7588
- run: |
7689
set -ex
77-
npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
90+
pnpm install
91+
pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
7892
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
79-
npm publish --provenance --access public
93+
pnpm publish --provenance --access public
8094
else
81-
npm publish --provenance --access public --tag dev
95+
pnpm publish --provenance --access public --tag dev
8296
fi
8397
env:
8498
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
85-
working-directory: ${{ github.workspace }}/npm/
99+
NPM_CONFIG_PROVENANCE: "true"
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)