Skip to content

Commit

Permalink
Add Node.js <10.x end of support postinstall script (#3727)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Apr 26, 2021
1 parent 6a75160 commit 82a02c3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/feature-Node.js-25435344.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "feature",
"category": "Node.js",
"description": "Add postinstall script warning end-of-support for Node.js <10.x"
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"translate-api-test": "mocha scripts/lib/translate-api.spec.js",
"typings-generator-test": "mocha scripts/lib/prune-shapes.spec.js",
"helper-test": "mocha scripts/lib/test-helper.spec.js",
"csm-functional-test": "mocha test/publisher/functional_test"
"csm-functional-test": "mocha test/publisher/functional_test",
"postinstall": "node scripts/check-node-version.js"
}
}
}
8 changes: 8 additions & 0 deletions scripts/check-node-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var version = process.version;

if (version && parseInt(version.substring(1, version.indexOf('.'))) < 10) {
console.warn('The AWS SDK for JavaScript (v2) will no longer support Node.js ' + version
+ '\nas of November 1, 2021. To continue receiving updates to AWS services'
+ '\nand bug fixes please upgrade to Node.js 10.x or later.'
+ '\n\nMore information can be found at: https://a.co/cf10B3y');
}

1 comment on commit 82a02c3

@NatPDeveloper
Copy link

Choose a reason for hiding this comment

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

"node scripts/check-node-version.js" this is the line that is causing my pipeline issues. Perhaps this fix is not compatible with nvm.

Please sign in to comment.