Skip to content

Commit

Permalink
chore(smithy-client): skip emitting warning for Node.js 12.x (#4127)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Nov 1, 2022
1 parent ffec8bd commit 33f5ef6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe("emitWarningIfUnsupportedVersion", () => {
describe.skip("emitWarningIfUnsupportedVersion", () => {
let emitWarningIfUnsupportedVersion;
const emitWarning = process.emitWarning;
const supportedVersion = "14.0.0";
Expand Down
17 changes: 9 additions & 8 deletions packages/smithy-client/src/emitWarningIfUnsupportedVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ let warningEmitted = false;
export const emitWarningIfUnsupportedVersion = (version: string) => {
if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 14) {
warningEmitted = true;
process.emitWarning(
`The AWS SDK for JavaScript (v3) will\n` +
`no longer support Node.js ${version} on November 1, 2022.\n\n` +
`To continue receiving updates to AWS services, bug fixes, and security\n` +
`updates please upgrade to Node.js 14.x or later.\n\n` +
`For details, please refer our blog post: https://a.co/48dbdYz`,
`NodeDeprecationWarning`
);
// ToDo: Turn back warning for future Node.js version deprecation
// process.emitWarning(
// `The AWS SDK for JavaScript (v3) will\n` +
// `no longer support Node.js ${version} on November 1, 2022.\n\n` +
// `To continue receiving updates to AWS services, bug fixes, and security\n` +
// `updates please upgrade to Node.js 14.x or later.\n\n` +
// `For details, please refer our blog post: https://a.co/48dbdYz`,
// `NodeDeprecationWarning`
// );
}
};

0 comments on commit 33f5ef6

Please sign in to comment.