From 02fcd8c156bc1313e99f9f30b1656d2056a99d9d Mon Sep 17 00:00:00 2001 From: FarhounYoussef Date: Wed, 24 Jan 2024 15:00:33 +0100 Subject: [PATCH] fix: add support for nodejs20 for Google (#520) * Add node20 runtime support to google * doc: Add Google runtime support in README --------- Co-authored-by: Youssef Farhoun --- README.md | 12 ++++++++++++ src/helper.ts | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5de97aa..fc4be68 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,18 @@ This plugin will automatically set the esbuild `target` for the following suppor | `nodejs14.x` | `node14` | | `nodejs12.x` | `node12` | +### Google + +This plugin is compatible with the [serverless-google-cloudfunctions](https://github.com/serverless/serverless-google-cloudfunctions) plugin, and will set the runtimes accordingly. + +| Runtime | Target | +| ------------ | -------- | +| `nodejs20` | `node20` | +| `nodejs18` | `node18` | +| `nodejs16` | `node16` | +| `nodejs14` | `node14` | +| `nodejs12` | `node12` | + ### Azure This plugin is compatible with the [serverless-azure-functions](https://github.com/serverless/serverless-azure-functions) plugin, and will set the runtimes accordingly. diff --git a/src/helper.ts b/src/helper.ts index 1ef3a12..ae5ffdc 100644 --- a/src/helper.ts +++ b/src/helper.ts @@ -234,7 +234,7 @@ export type AwsNodeMatcher = AwsNodeProviderRuntimeMatcher<12 | 14 | 16 | 18 | 2 export type AzureNodeMatcher = AzureNodeProviderRuntimeMatcher<12 | 14 | 16 | 18>; -export type GoogleNodeMatcher = GoogleNodeProviderRuntimeMatcher<12 | 14 | 16 | 18>; +export type GoogleNodeMatcher = GoogleNodeProviderRuntimeMatcher<12 | 14 | 16 | 18 | 20>; export type ScalewayNodeMatcher = ScalewayNodeProviderRuntimeMatcher<12 | 14 | 16 | 18 | 20>; @@ -266,6 +266,7 @@ const azureNodeMatcher: AzureNodeMatcher = { }; const googleNodeMatcher: GoogleNodeMatcher = { + nodejs20: 'node20', nodejs18: 'node18', nodejs16: 'node16', nodejs14: 'node14',