@netlify/zip-it-and-ship-it 9.27.0 → 9.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ export declare const defaultFlags: {
7
7
  readonly zisi_output_cjs_extension: false;
8
8
  readonly zisi_unique_entry_file: false;
9
9
  readonly zisi_esbuild_fail_double_glob: false;
10
+ readonly zisi_go_drop_runtime_override: false;
10
11
  };
11
12
  export type FeatureFlags = Partial<Record<keyof typeof defaultFlags, boolean>>;
12
13
  export declare const getFlags: (input?: Record<string, boolean>, flags?: {
@@ -18,4 +19,5 @@ export declare const getFlags: (input?: Record<string, boolean>, flags?: {
18
19
  readonly zisi_output_cjs_extension: false;
19
20
  readonly zisi_unique_entry_file: false;
20
21
  readonly zisi_esbuild_fail_double_glob: false;
22
+ readonly zisi_go_drop_runtime_override: false;
21
23
  }) => FeatureFlags;
@@ -18,6 +18,8 @@ export const defaultFlags = {
18
18
  zisi_unique_entry_file: false,
19
19
  // If multiple glob stars are in includedFiles, fail the build instead of warning.
20
20
  zisi_esbuild_fail_double_glob: false,
21
+ // drops the "runtimeVersion" override field
22
+ zisi_go_drop_runtime_override: false,
21
23
  };
22
24
  // List of supported flags and their default value.
23
25
  export const getFlags = (input = {}, flags = defaultFlags) => Object.entries(flags).reduce((result, [key, defaultValue]) => ({
@@ -68,7 +68,7 @@ const processSource = async ({ cache, mainFile, path, }) => {
68
68
  stat,
69
69
  };
70
70
  };
71
- const zipFunction = async function ({ config, destFolder, filename, mainFile, srcDir, srcPath, stat, isInternal, }) {
71
+ const zipFunction = async function ({ config, destFolder, filename, mainFile, srcDir, srcPath, stat, isInternal, featureFlags, }) {
72
72
  const destPath = join(destFolder, filename);
73
73
  const isSource = extname(mainFile) === '.go';
74
74
  let binary = {
@@ -88,7 +88,7 @@ const zipFunction = async function ({ config, destFolder, filename, mainFile, sr
88
88
  config,
89
89
  displayName: config?.name,
90
90
  generator: config?.generator || getInternalValue(isInternal),
91
- runtimeVersion: 'provided.al2',
91
+ runtimeVersion: featureFlags.zisi_go_drop_runtime_override ? undefined : 'provided.al2',
92
92
  };
93
93
  // If `zipGo` is enabled, we create a zip archive with the Go binary and the
94
94
  // toolchain file.
@@ -11,7 +11,7 @@ export declare const getFunctionsFromPaths: (paths: string[], { cache, config, c
11
11
  config?: Config | undefined;
12
12
  configFileDirectories?: string[] | undefined;
13
13
  dedupe?: boolean | undefined;
14
- featureFlags?: Partial<Record<"buildRustSource" | "parseWithEsbuild" | "traceWithNft" | "zisi_pure_esm" | "zisi_pure_esm_mjs" | "zisi_output_cjs_extension" | "zisi_unique_entry_file" | "zisi_esbuild_fail_double_glob", boolean>> | undefined;
14
+ featureFlags?: Partial<Record<"buildRustSource" | "parseWithEsbuild" | "traceWithNft" | "zisi_pure_esm" | "zisi_pure_esm_mjs" | "zisi_output_cjs_extension" | "zisi_unique_entry_file" | "zisi_esbuild_fail_double_glob" | "zisi_go_drop_runtime_override", boolean>> | undefined;
15
15
  }) => Promise<FunctionMap>;
16
16
  /**
17
17
  * Gets a list of functions found in a list of paths.
@@ -20,6 +20,6 @@ export declare const getFunctionFromPath: (path: string, { cache, config, config
20
20
  cache: RuntimeCache;
21
21
  config?: Config | undefined;
22
22
  configFileDirectories?: string[] | undefined;
23
- featureFlags?: Partial<Record<"buildRustSource" | "parseWithEsbuild" | "traceWithNft" | "zisi_pure_esm" | "zisi_pure_esm_mjs" | "zisi_output_cjs_extension" | "zisi_unique_entry_file" | "zisi_esbuild_fail_double_glob", boolean>> | undefined;
23
+ featureFlags?: Partial<Record<"buildRustSource" | "parseWithEsbuild" | "traceWithNft" | "zisi_pure_esm" | "zisi_pure_esm_mjs" | "zisi_output_cjs_extension" | "zisi_unique_entry_file" | "zisi_esbuild_fail_double_glob" | "zisi_go_drop_runtime_override", boolean>> | undefined;
24
24
  }) => Promise<FunctionSource | undefined>;
25
25
  export {};
@@ -3,6 +3,7 @@ const validRuntimeMap = {
3
3
  14: 'nodejs14.x',
4
4
  16: 'nodejs16.x',
5
5
  18: 'nodejs18.x',
6
+ 20: 'nodejs20.x',
6
7
  };
7
8
  const minimumV2Version = 18;
8
9
  export const getNodeRuntime = (input) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/zip-it-and-ship-it",
3
- "version": "9.27.0",
3
+ "version": "9.28.0",
4
4
  "description": "Zip it and ship it",
5
5
  "main": "./dist/main.js",
6
6
  "type": "module",