From 520a98ccf5c7b4fe93990819312278b7af590056 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:03:10 +0000 Subject: [PATCH 1/3] deps: bump it-stream-types from 1.0.5 to 2.0.1 Bumps [it-stream-types](https://github.com/achingbrain/it-stream-types) from 1.0.5 to 2.0.1. - [Release notes](https://github.com/achingbrain/it-stream-types/releases) - [Changelog](https://github.com/achingbrain/it-stream-types/blob/master/CHANGELOG.md) - [Commits](https://github.com/achingbrain/it-stream-types/compare/v1.0.5...v2.0.1) --- updated-dependencies: - dependency-name: it-stream-types dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c73996a..2909c85 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "release": "aegir release" }, "dependencies": { - "it-stream-types": "^1.0.3", + "it-stream-types": "^2.0.1", "p-defer": "^4.0.0" }, "devDependencies": { From b44bce902b8b46dee8888b00dca19e0a341bd6da Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 17 Apr 2023 18:33:56 +0200 Subject: [PATCH 2/3] fix: fix types and build --- .gitignore | 10 +++++++--- README.md | 16 +++++++++++++++- package.json | 6 ++++-- src/duplex.ts | 4 ++-- src/index.ts | 2 +- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 84dc48e..7ad9e67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ node_modules -coverage -.nyc_output -package-lock.json +build dist +.docs +.coverage +node_modules +package-lock.json +yarn.lock +.vscode diff --git a/README.md b/README.md index 8cdf14d..b469bcd 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # it-pair [![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-pair.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-pair) -[![CI](https://img.shields.io/github/workflow/status/alanshaw/it-pair/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/alanshaw/it-pair/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > pair a source async iterable stream and a sink async iterable stream ## Table of contents - [Install](#install) + - [Browser ` +``` + A pair of {source, sink} streams that are internally connected, (what goes into the sink comes out the source) @@ -76,6 +86,10 @@ pipe( ) ``` +## API Docs + +- + ## License Licensed under either of diff --git a/package.json b/package.json index 1f86787..24481ad 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "files": [ "src", - "dist/src", + "dist", "!dist/test", "!**/*.tsbuildinfo" ], @@ -142,6 +142,7 @@ ] }, "scripts": { + "clean": "aegir clean", "lint": "aegir lint", "dep-check": "aegir dep-check", "build": "aegir build", @@ -152,7 +153,8 @@ "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:node": "aegir test -t node --cov", "test:electron-main": "aegir test -t electron-main", - "release": "aegir release" + "release": "aegir release", + "docs": "aegir docs" }, "dependencies": { "it-stream-types": "^2.0.1", diff --git a/src/duplex.ts b/src/duplex.ts index 9eb6780..9b2bf8b 100644 --- a/src/duplex.ts +++ b/src/duplex.ts @@ -1,10 +1,10 @@ import { pair } from './index.js' -import type { Duplex } from 'it-stream-types' +import type { Duplex, Source } from 'it-stream-types' /** * Two duplex streams that are attached to each other */ -export function duplexPair (): [Duplex, Duplex] { +export function duplexPair (): [Duplex, Source>, Duplex, Source>] { const a = pair() const b = pair() return [ diff --git a/src/index.ts b/src/index.ts index c0e0e24..1b5b5e2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import type { Source, Duplex } from 'it-stream-types' /** * A pair of streams where one drains from the other */ -export function pair (): Duplex { +export function pair (): Duplex, Source, Promise> { const deferred = defer>() let piped = false From 122f3918be64a077b3f10f69f01713b9d474d25f Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 17 Apr 2023 19:00:20 +0200 Subject: [PATCH 3/3] chore: specify sink return type --- src/duplex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duplex.ts b/src/duplex.ts index 9b2bf8b..e34efa3 100644 --- a/src/duplex.ts +++ b/src/duplex.ts @@ -4,7 +4,7 @@ import type { Duplex, Source } from 'it-stream-types' /** * Two duplex streams that are attached to each other */ -export function duplexPair (): [Duplex, Source>, Duplex, Source>] { +export function duplexPair (): [Duplex, Source, Promise>, Duplex, Source, Promise>] { const a = pair() const b = pair() return [