Skip to content

Commit 5c2a489

Browse files
committed
Support JSR
1 parent 2981916 commit 5c2a489

File tree

5 files changed

+41
-58
lines changed

5 files changed

+41
-58
lines changed

.github/workflows/jsr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: jsr
2+
3+
env:
4+
DENO_VERSION: 1.x
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: denoland/setup-deno@v1
23+
with:
24+
deno-version: ${{ env.DENO_VERSION }}
25+
- name: Publish
26+
run: |
27+
deno run -A jsr:@david/[email protected]

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ on:
1010
branches:
1111
- main
1212
pull_request:
13+
workflow_dispatch:
1314

1415
jobs:
1516
check:
1617
runs-on: ubuntu-latest
1718
steps:
18-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1920
- uses: denoland/setup-deno@v1
2021
with:
2122
deno-version: ${{ env.DENO_VERSION }}
@@ -30,11 +31,14 @@ jobs:
3031
test:
3132
runs-on: ubuntu-latest
3233
steps:
33-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3435
- uses: denoland/setup-deno@v1
3536
with:
3637
deno-version: ${{ env.DENO_VERSION }}
3738
- name: Test
3839
run: |
3940
deno task test
4041
timeout-minutes: 5
42+
- name: JSR publish (dry-run)
43+
run: |
44+
deno publish --dry-run

.github/workflows/udd.yml

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

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# streamtools
22

3-
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/streamtools)
3+
[![jsr](https://img.shields.io/jsr/v/%40lambdalisue/streamtools?logo=javascript&logoColor=white)](https://jsr.io/@lambdalisue/streamtools)
4+
[![denoland](https://img.shields.io/github/v/release/lambdalisue/deno-streamtools?logo=deno&label=denoland)](https://github.com/lambdalisue/deno-streamtools/releases)
45
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/streamtools/mod.ts)
56
[![Test](https://github.com/lambdalisue/deno-streamtools/workflows/Test/badge.svg)](https://github.com/lambdalisue/deno-streamtools/actions?query=workflow%3ATest)
67

7-
This is a [Deno][deno] module that provides utilities for handling Streams API.
8-
9-
[deno]: https://deno.land/
8+
This is a TypeScript module that provides utilities for handling Streams API.
109

1110
## Usage
1211

@@ -138,7 +137,7 @@ console.log(results); // [1, 2, 3]
138137
and concatenates them into a single `Uint8Array`.
139138

140139
```ts
141-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
140+
import { assertEquals } from "jsr:@std/assert";
142141
import { readAll } from "./read_all.ts";
143142

144143
const encoder = new TextEncoder();
@@ -157,7 +156,7 @@ assertEquals(result, encoder.encode("HelloWorld"));
157156
units.
158157

159158
```ts
160-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
159+
import { assertEquals } from "jsr:@std/assert";
161160
import { writeAll } from "./write_all.ts";
162161

163162
const encoder = new TextEncoder();

deno.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"name": "@lambdalisue/streamtools",
3+
"version": "0.0.0",
4+
"exports": "./mod.ts",
25
"tasks": {
36
"test": "deno test -A --parallel --doc --shuffle",
47
"check": "deno check **/*.ts"

0 commit comments

Comments
 (0)