Skip to content

Commit d6d3997

Browse files
authored
chore: upgrade dnt (#17)
1 parent 0d345ff commit d6d3997

9 files changed

Lines changed: 116 additions & 279 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
name: CI
2-
on: [push, pull_request]
3-
jobs:
4-
CI:
5-
runs-on: ubuntu-latest
6-
permissions:
7-
contents: read
8-
id-token: write
9-
steps:
10-
- uses: actions/checkout@v4
11-
- uses: denoland/setup-deno@v1
12-
with:
13-
deno-version: v1.x
14-
- name: Test
15-
run: deno test --allow-net --allow-read=.
16-
- name: Publish on tag
17-
run: deno run -A jsr:@david/publish-on-tag@0.1.4
18-
- name: Get tag version
19-
if: startsWith(github.ref, 'refs/tags/')
20-
id: get_tag_version
21-
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
22-
- uses: actions/setup-node@v4
23-
with:
24-
node-version: '20.x'
25-
registry-url: 'https://registry.npmjs.org'
26-
- name: npm build
27-
run: deno task build:npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
28-
- name: npm publish
29-
if: startsWith(github.ref, 'refs/tags/')
30-
env:
31-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32-
run: |
33-
cd npm
34-
npm publish --access public
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
CI:
5+
runs-on: ubuntu-latest
6+
permissions:
7+
contents: read
8+
id-token: write
9+
steps:
10+
- uses: actions/checkout@v6
11+
- uses: denoland/setup-deno@v2
12+
- name: Test
13+
run: deno test --allow-net --allow-read=.
14+
- name: Publish on tag
15+
run: deno run -A jsr:@david/publish-on-tag@0.2.0
16+
- name: Get tag version
17+
if: startsWith(github.ref, 'refs/tags/')
18+
id: get_tag_version
19+
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
20+
- uses: actions/setup-node@v6
21+
with:
22+
node-version: "24.x"
23+
registry-url: "https://registry.npmjs.org"
24+
- name: npm build
25+
run: deno task build:npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
26+
- name: npm publish
27+
if: startsWith(github.ref, 'refs/tags/')
28+
run: |
29+
cd npm
30+
npm publish --access public

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,10 @@ Using with plugins on npm (ex. [@dprint/json](https://www.npmjs.com/package/@dpr
4949

5050
```ts
5151
import { createFromBuffer } from "@dprint/formatter";
52-
// You may have to use `getBuffer` on plugins that haven't updated yet.
53-
// See the plugins README.md for details.
54-
import { getPath } from "@dprint/json";
52+
import { getBuffer } from "@dprint/json";
5553
import * as fs from "node:fs";
5654

57-
const buffer = fs.readFileSync(getPath());
58-
const formatter = createFromBuffer(buffer);
55+
const formatter = createFromBuffer(getBuffer());
5956

6057
console.log(formatter.formatText({
6158
filePath: "test.json",

deno.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"build:npm": "deno run -A ./scripts/build_npm.ts"
66
},
77
"imports": {
8-
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
9-
"@std/assert": "jsr:@std/assert@^0.226.0"
8+
"@deno/dnt": "jsr:@deno/dnt@^0.42.3",
9+
"@std/assert": "jsr:@std/assert@1"
1010
},
1111
"publish": {
1212
"exclude": [

deno.lock

Lines changed: 64 additions & 229 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)