netlify-cli 9.7.0 → 9.8.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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "9.7.0",
3
+ "version": "9.8.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "9.7.0",
9
+ "version": "9.8.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "9.7.0",
4
+ "version": "9.8.0",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Abraham Schilling <AbrahamSchilling@gmail.com> (https://gitlab.com/n4bb12)",
@@ -529,7 +529,12 @@ const deploy = async (options, command) => {
529
529
  deployFolder,
530
530
  functionsFolder,
531
531
  })
532
- const functionsConfig = normalizeFunctionsConfig({ functionsConfig: config.functions, projectRoot: site.root })
532
+ const siteEnv = get(siteData, 'build_settings.env')
533
+ const functionsConfig = normalizeFunctionsConfig({
534
+ functionsConfig: config.functions,
535
+ projectRoot: site.root,
536
+ siteEnv,
537
+ })
533
538
 
534
539
  const redirectsPath = `${deployFolder}/_redirects`
535
540
  const { restoreConfig, updateConfig } = await netlifyConfigPromise
@@ -1,7 +1,7 @@
1
1
  // The function configuration keys returned by @netlify/config are not an exact
2
2
  // match to the properties that @netlify/zip-it-and-ship-it expects. We do that
3
3
  // translation here.
4
- const normalizeFunctionsConfig = ({ functionsConfig = {}, projectRoot }) =>
4
+ const normalizeFunctionsConfig = ({ functionsConfig = {}, projectRoot, siteEnv = {} }) =>
5
5
  Object.entries(functionsConfig).reduce(
6
6
  (result, [pattern, config]) => ({
7
7
  ...result,
@@ -11,6 +11,7 @@ const normalizeFunctionsConfig = ({ functionsConfig = {}, projectRoot }) =>
11
11
  includedFilesBasePath: projectRoot,
12
12
  ignoredNodeModules: config.ignored_node_modules,
13
13
  nodeBundler: config.node_bundler === 'esbuild' ? 'esbuild_zisi' : config.node_bundler,
14
+ nodeVersion: siteEnv.AWS_LAMBDA_JS_RUNTIME,
14
15
  processDynamicNodeImports: true,
15
16
  schedule: config.schedule,
16
17
  zipGo: true,
@@ -37,6 +37,7 @@ const deploySite = async (
37
37
  maxRetry = DEFAULT_MAX_RETRY,
38
38
  // API calls this the 'title'
39
39
  message: title,
40
+ siteEnv,
40
41
  skipFunctionsCache,
41
42
  statusCb = () => {
42
43
  /* default to noop */
@@ -65,6 +66,7 @@ const deploySite = async (
65
66
  rootDir,
66
67
  manifestPath,
67
68
  skipFunctionsCache,
69
+ siteEnv,
68
70
  }),
69
71
  ])
70
72
  const filesCount = Object.keys(files).length
@@ -61,7 +61,12 @@ const getFunctionZips = async ({
61
61
  })
62
62
  }
63
63
 
64
- return await zipIt.zipFunctions(directories, tmpDir, { basePath: rootDir, config: functionsConfig })
64
+ const featureFlags = {
65
+ zisi_detect_esm: true,
66
+ zisi_pure_esm: true,
67
+ }
68
+
69
+ return await zipIt.zipFunctions(directories, tmpDir, { basePath: rootDir, config: functionsConfig, featureFlags })
65
70
  }
66
71
 
67
72
  const hashFns = async (