diff --git a/.github/dependabot.yml b/.github/dependabot.yml index de46e32..0bc3b42 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,5 +4,8 @@ updates: directory: "/" schedule: interval: daily - time: "11:00" + time: "10:00" open-pull-requests-limit: 10 + commit-message: + prefix: "deps" + prefix-development: "deps(dev)" diff --git a/LICENSE b/LICENSE index b799ec0..20ce483 100644 --- a/LICENSE +++ b/LICENSE @@ -1,22 +1,4 @@ -Copyright (c) 2013 Dominic Tarr +This project is dual licensed under MIT and Apache-2.0. -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..14478a3 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,5 @@ +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..72dc60d --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index f27d08b..8cdf14d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,28 @@ -# it-pair +# it-pair -[![Build Status](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml/badge.svg?branch=master)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml) -[![Dependencies Status](https://status.david-dm.org/gh/alanshaw/it-pair.svg)](https://david-dm.org/alanshaw/it-pair) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) +[![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) + +> pair a source async iterable stream and a sink async iterable stream + +## Table of contents + +- [Install](#install) +- [License](#license) +- [Contribution](#contribution) + +## Install + +```console +$ npm i it-pair +``` A pair of {source, sink} streams that are internally connected, (what goes into the sink comes out the source) This can be used to construct pipelines that are connected. -``` js +```js import { pipe } from 'it-pipe' import { pair } from 'it-pair' @@ -34,7 +47,7 @@ This is particularly useful for creating duplex streams especially around servers. Use `it-pair/duplex` to get two duplex streams that are attached to each other. -``` js +```js import { duplexPair } from 'it-pair/duplex' var d = duplexPair() @@ -65,4 +78,11 @@ pipe( ## License -MIT +Licensed under either of + +- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](LICENSE-MIT) / ) + +## Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. diff --git a/package.json b/package.json index 249f22d..2faf6c6 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,20 @@ { "name": "it-pair", - "description": "pair a source async iterable stream and a sink async iterable stream", "version": "2.0.2", - "homepage": "https://github.com/alanshaw/it-pair", + "description": "pair a source async iterable stream and a sink async iterable stream", + "author": "Alan Shaw", + "license": "Apache-2.0 OR MIT", + "homepage": "https://github.com/alanshaw/it-pair#readme", "repository": { "type": "git", - "url": "git://github.com/alanshaw/it-pair.git" + "url": "git+https://github.com/alanshaw/it-pair.git" + }, + "bugs": { + "url": "https://github.com/alanshaw/it-pair/issues" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" }, "type": "module", "types": "./dist/src/index.d.ts", @@ -13,9 +22,13 @@ "*": { "*": [ "*", - "*/index", "dist/*", - "dist/*/index", + "dist/src/*", + "dist/src/*/index" + ], + "src/*": [ + "*", + "dist/*", "dist/src/*", "dist/src/*/index" ] @@ -29,9 +42,11 @@ ], "exports": { ".": { + "types": "./dist/src/index.d.ts", "import": "./dist/src/index.js" }, "./duplex": { + "types": "./dist/src/duplex.d.ts", "import": "./dist/src/duplex.js" } }, @@ -68,15 +83,15 @@ "release": "patch" }, { - "type": "chore", + "type": "docs", "release": "patch" }, { - "type": "docs", + "type": "test", "release": "patch" }, { - "type": "test", + "type": "deps", "release": "patch" }, { @@ -106,7 +121,11 @@ }, { "type": "docs", - "section": "Trivial Changes" + "section": "Documentation" + }, + { + "type": "deps", + "section": "Dependencies" }, { "type": "test", @@ -124,28 +143,25 @@ }, "scripts": { "lint": "aegir lint", - "dep-check": "aegir dep-check dist/src/**/*.js dist/test/**/*.js", - "build": "tsc", - "pretest": "npm run build", - "test": "aegir test -f ./dist/test", - "test:chrome": "npm run test -- -t browser --cov", - "test:chrome-webworker": "npm run test -- -t webworker", - "test:firefox": "npm run test -- -t browser -- --browser firefox", - "test:firefox-webworker": "npm run test -- -t webworker -- --browser firefox", - "test:node": "npm run test -- -t node --cov", - "test:electron-main": "npm run test -- -t electron-main", - "release": "semantic-release" + "dep-check": "aegir dep-check", + "build": "aegir build", + "test": "aegir test", + "test:chrome": "aegir test -t browser --cov", + "test:chrome-webworker": "aegir test -t webworker", + "test:firefox": "aegir test -t browser -- --browser firefox", + "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" + }, + "dependencies": { + "it-stream-types": "^1.0.3", + "p-defer": "^4.0.0" }, "devDependencies": { - "aegir": "^36.1.3", + "aegir": "^37.4.8", "it-all": "^1.0.6", "it-drain": "^1.0.5", "it-pipe": "^2.0.0" - }, - "author": "Alan Shaw", - "license": "MIT", - "dependencies": { - "it-stream-types": "^1.0.3", - "p-defer": "^4.0.0" } } diff --git a/test/index.spec.ts b/test/index.spec.ts index d8e6004..d2ba20b 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -1,4 +1,4 @@ -import { expect } from 'aegir/utils/chai.js' +import { expect } from 'aegir/chai' import { pipe } from 'it-pipe' import { pair } from '../src/index.js' import { duplexPair } from '../src/duplex.js'