Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { emitWarningIfUnsupportedVersion, state } from "./emitWarningIfUnsupport

describe("emitWarningIfUnsupportedVersion", () => {
const emitWarning = process.emitWarning;
const supportedVersion = "18.0.0";
const supportedVersion = "20.0.0";

beforeEach(() => {});

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

// Verify that the warning emits only once.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ export const state = {
* @param version - The Node.js version string.
*/
export const emitWarningIfUnsupportedVersion = (version: string) => {
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) {
state.warningEmitted = true;
process.emitWarning(
`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
no longer support Node.js 16.x on January 6, 2025.
no longer support Node.js ${version} in January 2026.
To continue receiving updates to AWS services, bug fixes, and security
updates please upgrade to a supported Node.js LTS version.
More information can be found at: https://a.co/74kJMmI`
More information can be found at: https://a.co/c895JFp`
);
}
};
Loading