Skip to content

Commit fee7ba1

Browse files
authored
chore(core/client): emit warning for Node.js 18.x end-of-support (#7540)
1 parent c83c986 commit fee7ba1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/core/src/submodules/client/emitWarningIfUnsupportedVersion.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { emitWarningIfUnsupportedVersion, state } from "./emitWarningIfUnsupport
44

55
describe("emitWarningIfUnsupportedVersion", () => {
66
const emitWarning = process.emitWarning;
7-
const supportedVersion = "18.0.0";
7+
const supportedVersion = "20.0.0";
88

99
beforeEach(() => {});
1010

@@ -39,12 +39,12 @@ describe("emitWarningIfUnsupportedVersion", () => {
3939
expect(process.emitWarning).toHaveBeenCalledTimes(1);
4040
expect(process.emitWarning).toHaveBeenCalledWith(
4141
`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
42-
no longer support Node.js 16.x on January 6, 2025.
42+
no longer support Node.js ${unsupportedVersion} in January 2026.
4343
4444
To continue receiving updates to AWS services, bug fixes, and security
4545
updates please upgrade to a supported Node.js LTS version.
4646
47-
More information can be found at: https://a.co/74kJMmI`
47+
More information can be found at: https://a.co/c895JFp`
4848
);
4949

5050
// Verify that the warning emits only once.

packages/core/src/submodules/client/emitWarningIfUnsupportedVersion.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ export const state = {
1212
* @param version - The Node.js version string.
1313
*/
1414
export const emitWarningIfUnsupportedVersion = (version: string) => {
15-
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
15+
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) {
1616
state.warningEmitted = true;
1717
process.emitWarning(
1818
`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
19-
no longer support Node.js 16.x on January 6, 2025.
19+
no longer support Node.js ${version} in January 2026.
2020
2121
To continue receiving updates to AWS services, bug fixes, and security
2222
updates please upgrade to a supported Node.js LTS version.
2323
24-
More information can be found at: https://a.co/74kJMmI`
24+
More information can be found at: https://a.co/c895JFp`
2525
);
2626
}
2727
};

0 commit comments

Comments
 (0)