Skip to content

Commit

Permalink
Support JSR
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Apr 6, 2024
1 parent 2981916 commit 5c2a489
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 58 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/jsr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: jsr

env:
DENO_VERSION: 1.x

on:
push:
tags:
- "v*"

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish
run: |
deno run -A jsr:@david/[email protected]
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
Expand All @@ -30,11 +31,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Test
run: |
deno task test
timeout-minutes: 5
- name: JSR publish (dry-run)
run: |
deno publish --dry-run
50 changes: 0 additions & 50 deletions .github/workflows/udd.yml

This file was deleted.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# streamtools

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

This is a [Deno][deno] module that provides utilities for handling Streams API.

[deno]: https://deno.land/
This is a TypeScript module that provides utilities for handling Streams API.

## Usage

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

```ts
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
import { assertEquals } from "jsr:@std/assert";
import { readAll } from "./read_all.ts";

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

```ts
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
import { assertEquals } from "jsr:@std/assert";
import { writeAll } from "./write_all.ts";

const encoder = new TextEncoder();
Expand Down
3 changes: 3 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@lambdalisue/streamtools",
"version": "0.0.0",
"exports": "./mod.ts",
"tasks": {
"test": "deno test -A --parallel --doc --shuffle",
"check": "deno check **/*.ts"
Expand Down

0 comments on commit 5c2a489

Please sign in to comment.