From 83741a0eb9e44457b083e8790a11eb89984e6357 Mon Sep 17 00:00:00 2001 From: Trek Glowacki Date: Thu, 30 May 2024 08:24:15 -0700 Subject: [PATCH] [node] update node@16 deprecation day (#11671) 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 --- .changeset/polite-shoes-exist.md | 5 +++++ packages/build-utils/src/fs/node-version.ts | 2 +- packages/build-utils/test/unit.test.ts | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/polite-shoes-exist.md diff --git a/.changeset/polite-shoes-exist.md b/.changeset/polite-shoes-exist.md new file mode 100644 index 00000000000..b7ec12ce47b --- /dev/null +++ b/.changeset/polite-shoes-exist.md @@ -0,0 +1,5 @@ +--- +"@vercel/build-utils": patch +--- + +[node] update node@16 deprecation day diff --git a/packages/build-utils/src/fs/node-version.ts b/packages/build-utils/src/fs/node-version.ts index 25fc0855376..8effd8df3a7 100644 --- a/packages/build-utils/src/fs/node-version.ts +++ b/packages/build-utils/src/fs/node-version.ts @@ -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, diff --git a/packages/build-utils/test/unit.test.ts b/packages/build-utils/test/unit.test.ts index 5c3abd1db3f..3860c79e87b 100644 --- a/packages/build-utils/test/unit.test.ts +++ b/packages/build-utils/test/unit.test.ts @@ -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(); @@ -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;