diff --git a/.github/funding.yml b/.github/funding.yml deleted file mode 100644 index 07fcd36..0000000 --- a/.github/funding.yml +++ /dev/null @@ -1,4 +0,0 @@ -github: sindresorhus -open_collective: sindresorhus -tidelift: npm/is-stream -custom: https://sindresorhus.com/donate diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 441975c..346585c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,10 +10,11 @@ jobs: fail-fast: false matrix: node-version: - - 16 + - 20 + - 18 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install diff --git a/index.d.ts b/index.d.ts index a7398cf..065c444 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,9 +1,9 @@ import { - Stream, - Writable as WritableStream, - Readable as ReadableStream, - Duplex as DuplexStream, - Transform as TransformStream, + type Stream, + type Writable as WritableStream, + type Readable as ReadableStream, + type Duplex as DuplexStream, + type Transform as TransformStream, } from 'node:stream'; export type Options = { diff --git a/index.test-d.ts b/index.test-d.ts index a0990be..a0b9a3f 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -1,9 +1,9 @@ import { - Stream, - Writable as WritableStream, - Readable as ReadableStream, + type Stream, + type Writable as WritableStream, + type Readable as ReadableStream, Duplex as DuplexStream, - Transform as TransformStream, + type Transform as TransformStream, } from 'node:stream'; import {expectType, expectAssignable} from 'tsd'; import { @@ -12,7 +12,7 @@ import { isReadableStream, isDuplexStream, isTransformStream, - Options, + type Options, } from './index.js'; const foo = ''; diff --git a/package.json b/package.json index 47d5761..0db352f 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,13 @@ "url": "https://sindresorhus.com" }, "type": "module", - "exports": "./index.js", + "exports": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "sideEffects": false, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "scripts": { "test": "xo && ava && tsd" @@ -35,10 +39,10 @@ "is" ], "devDependencies": { - "@types/node": "^16.4.13", - "ava": "^3.15.0", - "tempy": "^1.0.1", - "tsd": "^0.17.0", - "xo": "^0.44.0" + "@types/node": "^20.11.19", + "ava": "^5.3.1", + "tempy": "^3.1.0", + "tsd": "^0.30.5", + "xo": "^0.57.0" } } diff --git a/readme.md b/readme.md index ecdf94d..2efdb0a 100644 --- a/readme.md +++ b/readme.md @@ -4,8 +4,8 @@ ## Install -``` -$ npm install is-stream +```sh +npm install is-stream ``` ## Usage @@ -55,15 +55,3 @@ When this option is `true`, the method returns `false` if the stream has already ## Related - [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream - ---- - -