Skip to content

Commit

Permalink
[node] update node@16 deprecation day (#11671)
Browse files Browse the repository at this point in the history
Double check my dates, but I believe this is the new correct date we want. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
  • Loading branch information
trek committed May 30, 2024
1 parent 9db0298 commit 83741a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-shoes-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vercel/build-utils": patch
---

[node] update node@16 deprecation day
2 changes: 1 addition & 1 deletion packages/build-utils/src/fs/node-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const NODE_VERSIONS: NodeVersion[] = [
major: 16,
range: '16.x',
runtime: 'nodejs16.x',
discontinueDate: new Date('2024-06-15'),
discontinueDate: new Date('2025-02-28'),
},
{
major: 14,
Expand Down
6 changes: 3 additions & 3 deletions packages/build-utils/test/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ it('should throw for discontinued versions', async () => {
// Mock a future date so that Node 16 becomes discontinued
const realDateNow = Date.now;
try {
global.Date.now = () => new Date('2024-07-16').getTime();
global.Date.now = () => new Date('2025-03-01').getTime();

expect(getSupportedNodeVersion('8.10.x', false)).rejects.toThrow();
expect(getSupportedNodeVersion('8.10.x', true)).rejects.toThrow();
Expand Down Expand Up @@ -356,8 +356,8 @@ it('should warn for deprecated versions, soon to be discontinued', async () => {
'Error: Node.js version 12.x has reached End-of-Life. Deployments created on or after 2022-10-03 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
'Error: Node.js version 14.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
'Error: Node.js version 14.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2024-06-15 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2024-06-15 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2025-02-28 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2025-02-28 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
]);
} finally {
global.Date.now = realDateNow;
Expand Down

0 comments on commit 83741a0

Please sign in to comment.