diff --git a/server/src/stacks/2020-10-01/stacks/function-app-stacks/Node.ts b/server/src/stacks/2020-10-01/stacks/function-app-stacks/Node.ts index 1c93f4a494..6adf6dd8c1 100644 --- a/server/src/stacks/2020-10-01/stacks/function-app-stacks/Node.ts +++ b/server/src/stacks/2020-10-01/stacks/function-app-stacks/Node.ts @@ -6,15 +6,74 @@ const getNodeStack: (useIsoDateFormat: boolean) => FunctionAppStack = (useIsoDat const node10EOL = getDateString(new Date(2021, 3, 30), useIsoDateFormat); const node8EOL = getDateString(new Date(2019, 11, 31), useIsoDateFormat); const node6EOL = getDateString(new Date(2019, 3, 30), useIsoDateFormat); + const node20EOL = getDateString(new Date(2026, 4, 30), useIsoDateFormat); const node18EOL = getDateString(new Date(2025, 3, 30), useIsoDateFormat); const node16EOL = getDateString(new Date(2023, 8, 11), useIsoDateFormat); const node14EOL = getDateString(new Date(2023, 3, 30), useIsoDateFormat); + return { displayText: 'Node.js', value: 'node', preferredOs: 'windows', majorVersions: [ + { + displayText: 'Node.js 20', + value: '20', + minorVersions: [ + { + displayText: 'Node.js 20', + value: '20', + stackSettings: { + windowsRuntimeSettings: { + runtimeVersion: '~20', + isPreview: true, + isHidden: true, + remoteDebuggingSupported: false, + appInsightsSettings: { + isSupported: true, + }, + gitHubActionSettings: { + isSupported: true, + supportedVersion: '20.x', + }, + appSettingsDictionary: { + FUNCTIONS_WORKER_RUNTIME: 'node', + WEBSITE_NODE_DEFAULT_VERSION: '~20', + }, + siteConfigPropertiesDictionary: { + use32BitWorkerProcess: true, + netFrameworkVersion: 'v6.0', + }, + supportedFunctionsExtensionVersions: ['~4'], + endOfLifeDate: node20EOL, + }, + linuxRuntimeSettings: { + runtimeVersion: 'Node|20', + isPreview: true, + isHidden: true, + remoteDebuggingSupported: false, + appInsightsSettings: { + isSupported: true, + }, + gitHubActionSettings: { + isSupported: true, + supportedVersion: '20.x', + }, + appSettingsDictionary: { + FUNCTIONS_WORKER_RUNTIME: 'node', + }, + siteConfigPropertiesDictionary: { + use32BitWorkerProcess: false, + linuxFxVersion: 'Node|20', + }, + supportedFunctionsExtensionVersions: ['~4'], + endOfLifeDate: node20EOL, + }, + }, + }, + ], + }, { displayText: 'Node.js 18', value: '18', diff --git a/server/src/tests/Stacks/2020-10-01/function-app/validations.ts b/server/src/tests/Stacks/2020-10-01/function-app/validations.ts index 93ee07c6a6..64c3a1d8d3 100644 --- a/server/src/tests/Stacks/2020-10-01/function-app/validations.ts +++ b/server/src/tests/Stacks/2020-10-01/function-app/validations.ts @@ -167,7 +167,7 @@ function validateNodeStack(nodeStack) { expect(nodeStack.displayText).to.equal('Node.js'); expect(nodeStack.value).to.equal('node'); expect(nodeStack.preferredOs).to.equal('windows'); - expect(nodeStack.majorVersions.length).to.equal(7); + expect(nodeStack.majorVersions.length).to.equal(8); expect(nodeStack).to.deep.equal(hardCodedNodeStack); }