Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump typescript from 5.3.3 to 5.5.2 #44

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.2",
"tsx": "^4.7.0",
"typescript": "^5.0.4",
"web-streams-polyfill": "^3.3.2"
"typescript": "^5.5.2",
"web-streams-polyfill": "^4.0.0"
},
"peerDependencies": {
"typescript": ">=4.2"
Expand Down
6 changes: 3 additions & 3 deletions test/node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ describe('Node integration tests', () => {
it('polyfilled web stream cannot be converted into node native stream', async () => {
const { ReadableStream: PolyfilledReadableStream } = await import ('web-streams-polyfill');

// this test is just to keep track that this behaviour is expected
// this test is just to keep track that this behaviour is expected: it does not cause a TS error, but a runtime one
const input = 'chunk';
const stream = new PolyfilledReadableStream({
const stream: NodeWebReadableStream<string> = new PolyfilledReadableStream<string>({
start(controller) {
controller.enqueue(input);
controller.close();
}
});
const streamedData = toStream(stream);
// @ts-expect-error `fromWeb` does not accept the polyfilled stream
// `fromWeb` does not accept the polyfilled stream
expect(() => NodeNativeReadableStream.fromWeb(streamedData)).to.throw(/must be an instance of ReadableStream/);
});
});
4 changes: 2 additions & 2 deletions test/typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const newEmptyWebStream = <T extends Data>(): WebStream<T> => new WebReadableStr
const expectedWebStreamButActualNodeStream: WebStream<string> = toStream(nodeWebStream);
assert(expectedWebStreamButActualNodeStream instanceof NodeWebReadableStream);
const newStringStream: Stream<string> = toStream('chunk');
assert(newStringStream instanceof WebReadableStream); // ReadableStream is polyfilled
assert(newStringStream instanceof NodeWebReadableStream);
// @ts-expect-error detect type parameter mismatch
const anotherStringStream: Stream<Uint8Array> = toStream('chunk');
assert(anotherStringStream instanceof WebReadableStream); // ReadableStream is polyfilled
assert(anotherStringStream instanceof NodeWebReadableStream);

assert(isArrayStream(new ArrayStream())) ; // ensure Array is actually extended in e.g. es5

Expand Down
Loading