@netlify/config 20.1.0 → 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/lib/files.js CHANGED
@@ -14,7 +14,12 @@ export const resolveConfigPaths = async function ({ config, repositoryRoot, buil
14
14
  };
15
15
  // All file paths in the configuration file are are relative to `buildDir`
16
16
  // (if `baseRelDir` is `true`).
17
- const FILE_PATH_CONFIG_PROPS = ['functionsDirectory', 'build.publish', 'build.edge_functions'];
17
+ const FILE_PATH_CONFIG_PROPS = [
18
+ 'functionsDirectory',
19
+ 'functions.*.deno_import_map',
20
+ 'build.publish',
21
+ 'build.edge_functions',
22
+ ];
18
23
  const resolvePaths = function (config, propNames, baseRel, repositoryRoot) {
19
24
  return propNames.reduce((configA, propName) => resolvePathProp(configA, propName, baseRel, repositoryRoot), config);
20
25
  };
@@ -36,6 +36,7 @@ const normalizeFunctionsProp = (functions, [propName, propValue]) => isConfigPro
36
36
  const isConfigLeaf = (functionConfig) => isPlainObj(functionConfig) && Object.keys(functionConfig).every(isConfigProperty);
37
37
  const isConfigProperty = (propName) => FUNCTION_CONFIG_PROPERTIES.has(propName);
38
38
  export const FUNCTION_CONFIG_PROPERTIES = new Set([
39
+ 'deno_import_map',
39
40
  'directory',
40
41
  'external_node_modules',
41
42
  'ignored_node_modules',
@@ -181,6 +181,14 @@ export const POST_NORMALIZE_VALIDATIONS = [
181
181
  functions: { [prevPath[1]]: { external_node_modules: ['module-one', 'module-two'] } },
182
182
  }),
183
183
  },
184
+ {
185
+ property: 'functions.*.deno_import_map',
186
+ check: isString,
187
+ message: 'must be a string.',
188
+ example: (value, key, prevPath) => ({
189
+ functions: { [prevPath[1]]: { deno_import_map: 'path/to/import_map.json' } },
190
+ }),
191
+ },
184
192
  {
185
193
  property: 'functions.*.external_node_modules',
186
194
  check: isArrayOfStrings,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/main.js",
@@ -95,5 +95,5 @@
95
95
  "engines": {
96
96
  "node": "^14.16.0 || >=16.0.0"
97
97
  },
98
- "gitHead": "e22d6106d734d2b4b7b49d2a2350be21913c0cbf"
98
+ "gitHead": "48bc6057d30ef3c5173629d4345f804271c0a426"
99
99
  }