@netlify/build 18.17.7 → 18.19.2

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": "18.17.7",
3
+ "version": "18.19.2",
4
4
  "description": "Netlify build module",
5
5
  "main": "src/core/main.js",
6
6
  "types": "types/index.d.ts",
@@ -61,7 +61,7 @@
61
61
  "@netlify/plugin-edge-handlers": "^1.11.22",
62
62
  "@netlify/plugins-list": "^4.0.1",
63
63
  "@netlify/run-utils": "^2.0.0",
64
- "@netlify/zip-it-and-ship-it": "^4.27.0",
64
+ "@netlify/zip-it-and-ship-it": "^4.28.1",
65
65
  "@sindresorhus/slugify": "^1.1.0",
66
66
  "@ungap/from-entries": "^0.2.1",
67
67
  "ansi-escapes": "^4.3.2",
@@ -17,7 +17,9 @@ const getFeatureFlag = function (name) {
17
17
  const DEFAULT_FEATURE_FLAGS = {
18
18
  buildbot_build_go_functions: false,
19
19
  buildbot_es_modules_esbuild: false,
20
+ buildbot_zisi_trace_nft: false,
20
21
  buildbot_zisi_esbuild_parser: false,
22
+ buildbot_scheduled_functions: false,
21
23
  }
22
24
 
23
25
  module.exports = { normalizeCliFeatureFlags, DEFAULT_FEATURE_FLAGS }
@@ -4,6 +4,7 @@ const getZisiFeatureFlags = (featureFlags) => ({
4
4
  buildGoSource: featureFlags.buildbot_build_go_functions,
5
5
  defaultEsModulesToEsbuild: featureFlags.buildbot_es_modules_esbuild,
6
6
  parseWithEsbuild: featureFlags.buildbot_zisi_esbuild_parser,
7
+ traceWithNft: featureFlags.buildbot_zisi_trace_nft,
7
8
  })
8
9
 
9
10
  module.exports = { getZisiFeatureFlags }
@@ -22,7 +22,7 @@ const isUsingEsbuild = (functionsConfig = {}) =>
22
22
  // The function configuration keys returned by @netlify/config are not an exact
23
23
  // match to the properties that @netlify/zip-it-and-ship-it expects. We do that
24
24
  // translation here.
25
- const normalizeFunctionConfig = ({ buildDir, functionConfig = {}, isRunningLocally }) => ({
25
+ const normalizeFunctionConfig = ({ buildDir, featureFlags, functionConfig = {}, isRunningLocally }) => ({
26
26
  externalNodeModules: functionConfig.external_node_modules,
27
27
  includedFiles: functionConfig.included_files,
28
28
  includedFilesBasePath: buildDir,
@@ -39,6 +39,8 @@ const normalizeFunctionConfig = ({ buildDir, functionConfig = {}, isRunningLocal
39
39
  // path that will get cached in between builds, allowing us to speed up the
40
40
  // build process.
41
41
  rustTargetDirectory: isRunningLocally ? undefined : resolve(buildDir, '.netlify', 'rust-functions-cache', '[name]'),
42
+
43
+ schedule: featureFlags.buildbot_scheduled_functions ? functionConfig.schedule : undefined,
42
44
  })
43
45
 
44
46
  const getZisiParameters = ({
@@ -1,10 +1,3 @@
1
- import { PluginInputs } from './inputs'
2
-
3
- interface NetlifyPlugin {
4
- package: string
5
- inputs: PluginInputs
6
- }
7
-
8
1
  /* eslint-disable camelcase -- some properties are named in snake case in this API */
9
2
 
10
3
  export interface Build {
@@ -54,8 +47,6 @@ export interface Build {
54
47
  compress?: boolean
55
48
  }
56
49
  }
57
-
58
- plugins: readonly NetlifyPlugin[]
59
50
  }
60
51
 
61
52
  /* eslint-enable camelcase */
@@ -2,6 +2,7 @@ import { Many } from '../utils/many'
2
2
 
3
3
  import { Build } from './build'
4
4
  import { Functions } from './functions'
5
+ import { PluginInputs } from './inputs'
5
6
 
6
7
  type HttpStatusCode = number
7
8
 
@@ -26,6 +27,11 @@ interface EdgeHandler {
26
27
  handler: string
27
28
  }
28
29
 
30
+ interface NetlifyPlugin {
31
+ package: string
32
+ inputs: PluginInputs
33
+ }
34
+
29
35
  /* eslint-disable camelcase -- some properties are named in snake case in this API */
30
36
 
31
37
  interface NetlifyConfig {
@@ -46,6 +52,7 @@ interface NetlifyConfig {
46
52
  */
47
53
  functions: Functions
48
54
  build: Build
55
+ plugins: readonly NetlifyPlugin[]
49
56
  }
50
57
 
51
58
  /* eslint-enable camelcase */
@@ -3,5 +3,5 @@
3
3
  */
4
4
  export type NetlifyPluginBuildUtil = Record<
5
5
  'failBuild' | 'failPlugin' | 'cancelBuild',
6
- (message: string, options?: { error: Error }) => void
6
+ (message: string, options?: { error?: Error }) => void
7
7
  >
@@ -15,7 +15,7 @@ export type NetlifyPluginCacheUtil = {
15
15
  cwd?: string
16
16
  },
17
17
  ): Promise<boolean>
18
- list(options: {
18
+ list(options?: {
19
19
  /**
20
20
  * @default `process.cwd()`
21
21
  */