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

Update Node.js versions #1207

Merged
merged 3 commits into from
Sep 4, 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
# Node.js v16 does not provide all necessary fetch types by default, so
# we cannot run tests for @connectrpc/connect-web.
# v16 is tested in a separate job below.
node-version: [21.1.0, 20.9.0, 18.16.0]
node-version: [22.7.0, 20.17.0, 18.20.4]
name: "test on Node.js ${{ matrix.node-version }}"
steps:
- uses: actions/checkout@v4
Expand All @@ -80,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [16.20.0]
node-version: [16.20.2]
name: "test on Node.js ${{ matrix.node-version }}"
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-express.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [21.1.0, 20.9.0, 18.16.0, 16.20.0]
node-version: [22.7.0, 20.17.0, 18.20.4, 16.20.2]
name: "Node.js ${{ matrix.node-version }}"
timeout-minutes: 10
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-fastify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [21.1.0, 20.9.0, 18.16.0, 16.20.0]
node-version: [22.7.0, 20.17.0, 18.20.4, 16.20.2]
name: "Node.js ${{ matrix.node-version }}"
timeout-minutes: 10
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [21.1.0, 20.9.0, 18.16.0, 16.20.0]
node-version: [22.7.0, 20.17.0, 18.20.4, 16.20.2]
side: [client, server]
name: "Node.js ${{ matrix.node-version }} ${{ matrix.side }}"
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
matrix:
# Node.js v16 does not provide all necessary fetch types by default
node-version: [21.1.0, 20.9.0, 18.16.0]
node-version: [22.7.0, 20.17.0, 18.20.4, 18.16.0]
client: [promise, callback]
name: "Node.js ${{ matrix.node-version }} ${{ matrix.client }}"
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.9.0
20.17.0
14 changes: 0 additions & 14 deletions packages/connect-node/src/compression.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,6 @@ describe("compression", () => {
);
}
});
it("should raise internal error on excessive readMaxBytes", async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test ensures that we raise the error code "internal" if the readMaxBytes argument passed to decompress() is larger than what the decompressor supports.

We just had to update the implementation because error codes changed in a minor, and v22 would require us to change it again.

readMaxBytes is a configuration option that's verified elsewhere to be in bounds, so I think it's best we just remove this test.

try {
await compression.decompress(
new Uint8Array([0xde, 0xad, 0xbe, 0xef]),
Number.MAX_SAFE_INTEGER,
);
fail("excepted an error");
} catch (e) {
expect(e).toBeInstanceOf(ConnectError);
expect(ConnectError.from(e).message).toBe(
"[internal] decompression failed",
);
}
});
});
}
});