@netlify/build 20.0.2 → 20.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "20.0.2",
3
+ "version": "20.2.0",
4
4
  "description": "Netlify build module",
5
5
  "main": "src/core/main.js",
6
6
  "types": "types/index.d.ts",
@@ -58,8 +58,8 @@
58
58
  "@netlify/config": "^16.0.0",
59
59
  "@netlify/functions-utils": "^3.0.0",
60
60
  "@netlify/git-utils": "^3.0.0",
61
- "@netlify/plugin-edge-handlers": "^2.0.0",
62
- "@netlify/plugins-list": "^5.0.0",
61
+ "@netlify/plugin-edge-handlers": "^3.0.0",
62
+ "@netlify/plugins-list": "^6.0.1",
63
63
  "@netlify/run-utils": "^3.0.0",
64
64
  "@netlify/zip-it-and-ship-it": "^5.2.0",
65
65
  "@sindresorhus/slugify": "^1.1.0",
@@ -16,10 +16,12 @@ const getFeatureFlag = function (name) {
16
16
  // Default values for feature flags
17
17
  const DEFAULT_FEATURE_FLAGS = {
18
18
  buildbot_build_go_functions: false,
19
+ buildbot_create_functions_manifest: false,
19
20
  buildbot_es_modules_esbuild: false,
20
21
  buildbot_zisi_trace_nft: false,
21
22
  buildbot_zisi_esbuild_parser: false,
22
23
  buildbot_scheduled_functions: false,
24
+ zisi_parse_isc: false,
23
25
  }
24
26
 
25
27
  module.exports = { normalizeCliFeatureFlags, DEFAULT_FEATURE_FLAGS }
@@ -1,9 +1,11 @@
1
1
  'use strict'
2
2
 
3
- const { pluginsList: oldPluginsList, pluginsUrl } = require('@netlify/plugins-list')
4
3
  const got = require('got')
5
4
  const isPlainObj = require('is-plain-obj')
6
5
 
6
+ // TODO: use static `import` after migrating this repository to pure ES modules
7
+ const netlifyPluginsList = import('@netlify/plugins-list')
8
+
7
9
  const { logPluginsList } = require('../log/messages/plugins')
8
10
  const { logPluginsFetchError } = require('../log/messages/plugins')
9
11
 
@@ -16,14 +18,16 @@ const { CONDITIONS } = require('./compatibility')
16
18
  // make this request is somewhat ok (in the 100ms range).
17
19
  // We only fetch this plugins list when needed, i.e. we defer it as much as
18
20
  // possible.
19
- const getPluginsList = async function ({ debug, logs, testOpts: { pluginsListUrl = pluginsUrl } }) {
21
+ const getPluginsList = async function ({ debug, logs, testOpts: { pluginsListUrl } }) {
20
22
  // We try not to mock in integration tests. However, sending a request for
21
23
  // each test would be too slow and make tests unreliable.
22
24
  if (pluginsListUrl === 'test') {
23
25
  return []
24
26
  }
25
27
 
26
- const pluginsList = await fetchPluginsList({ logs, pluginsListUrl })
28
+ const { pluginsUrl } = await netlifyPluginsList
29
+ const pluginsListUrlA = pluginsListUrl === undefined ? pluginsUrl : pluginsListUrl
30
+ const pluginsList = await fetchPluginsList({ logs, pluginsListUrl: pluginsListUrlA })
27
31
  const pluginsListA = normalizePluginsList(pluginsList)
28
32
  logPluginsList({ pluginsList: pluginsListA, debug, logs })
29
33
  return pluginsListA
@@ -46,6 +50,7 @@ const fetchPluginsList = async function ({ logs, pluginsListUrl }) {
46
50
  // buildbot release.
47
51
  } catch (error) {
48
52
  logPluginsFetchError(logs, error.message)
53
+ const { pluginsList: oldPluginsList } = await netlifyPluginsList
49
54
  return oldPluginsList
50
55
  }
51
56
  }
@@ -1,9 +1,11 @@
1
1
  'use strict'
2
2
 
3
3
  const getZisiFeatureFlags = (featureFlags) => ({
4
+ ...featureFlags,
4
5
  buildGoSource: featureFlags.buildbot_build_go_functions,
5
6
  defaultEsModulesToEsbuild: featureFlags.buildbot_es_modules_esbuild,
6
7
  nftTranspile: featureFlags.buildbot_nft_transpile_esm || featureFlags.buildbot_zisi_trace_nft,
8
+ parseISC: featureFlags.zisi_parse_isc,
7
9
  parseWithEsbuild: featureFlags.buildbot_zisi_esbuild_parser,
8
10
  traceWithNft: featureFlags.buildbot_zisi_trace_nft,
9
11
  })
@@ -51,8 +51,8 @@ const getZisiParameters = ({
51
51
  isRunningLocally,
52
52
  repositoryRoot,
53
53
  }) => {
54
- const isManifestEnabled = featureFlags.functionsBundlingManifest === true
55
- const manifest = isManifestEnabled && isRunningLocally ? join(functionsDist, 'manifest.json') : undefined
54
+ const isManifestEnabled = isRunningLocally || featureFlags.buildbot_create_functions_manifest === true
55
+ const manifest = isManifestEnabled ? join(functionsDist, 'manifest.json') : undefined
56
56
  const config = mapObject(functionsConfig, (expression, object) => [
57
57
  expression,
58
58
  normalizeFunctionConfig({ buildDir, featureFlags, functionConfig: object, isRunningLocally }),