Skip to content

Commit

Permalink
Ensure no Node.js dependencies are used
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Jan 30, 2025
1 parent d01692b commit b4bc432
Show file tree
Hide file tree
Showing 6 changed files with 730 additions and 807 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.x]

env:
YARN_IGNORE_NODE: 1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `peek-readable` contains one class: `StreamReader`, which reads from a [stre

Module: version 5 migrated from [CommonJS](https://en.wikipedia.org/wiki/CommonJS) to [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
JavaScript is compliant with [ECMAScript 2019 (ES10)](https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_%E2%80%93_ECMAScript_2019).
Requires Node.js ≥ 14.16 engine.
Requires Node.js ≥ 18 engine.

## Usage

Expand Down
20 changes: 18 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"node:buffer": "Use Uint8Array instead of Buffer"
}
}
}},
}
},
"correctness": {
"noNodejsModules": "error"
},
"style":{
"useConsistentBuiltinInstantiation": "error",
"useThrowNewError": "error",
Expand All @@ -44,5 +48,17 @@
"./test/**/*.d.ts",
"./test/**/*.js"
]
}
},
"overrides": [
{
"include": ["./test/**/*"],
"linter": {
"rules": {
"correctness": {
"noNodejsModules": "off"
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion lib/WebStreamReaderFactory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ReadableStream as NodeReadableStream, ReadableStreamDefaultReader } from 'node:stream/web';
import type { ReadableStream as NodeReadableStream } from 'node:stream/web';
import { WebStreamByobReader } from './WebStreamByobReader.js';
import { WebStreamDefaultReader } from './WebStreamDefaultReader.js';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"start": "yarn run compile && yarn run lint && yarn run cover-test"
},
"engines": {
"node": ">=14.16"
"node": ">=18"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit b4bc432

Please sign in to comment.