@netlify/config 25.2.4 → 25.2.5

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.
Files changed (2) hide show
  1. package/lib/main.js +11 -4
  2. package/package.json +2 -2
package/lib/main.js CHANGED
@@ -39,7 +39,7 @@ export const resolveConfig = async function (opts) {
39
39
  const extensionApiBaseUrl = host?.includes(NETLIFY_API_STAGING_HOSTNAME)
40
40
  ? EXTENSION_API_STAGING_BASE_URL
41
41
  : EXTENSION_API_BASE_URL;
42
- const { config: configOpt, defaultConfig, inlineConfig, configMutations, cwd, context, repositoryRoot, base, branch, siteId, accountId, deployId, skewProtectionToken, buildId, baseRelDir, mode, debug, logs, featureFlags, } = await normalizeOpts(optsA);
42
+ const { config: configOpt, defaultConfig, inlineConfig, configMutations, configMutationsOrigin, cwd, context, repositoryRoot, base, branch, siteId, accountId, deployId, skewProtectionToken, buildId, baseRelDir, mode, debug, logs, featureFlags, } = await normalizeOpts(optsA);
43
43
  let { siteInfo, accounts, integrations: extensions } = parsedCachedConfig || {};
44
44
  // If we have cached site info, we don't need to fetch it again
45
45
  const useCachedSiteInfo = Boolean(featureFlags?.use_cached_site_info && siteInfo && accounts && extensions);
@@ -83,6 +83,7 @@ export const resolveConfig = async function (opts) {
83
83
  branch,
84
84
  defaultConfig: defaultConfigA,
85
85
  inlineConfig: inlineConfigA,
86
+ configMutationsOrigin,
86
87
  baseRelDir: baseRelDirA,
87
88
  logs,
88
89
  featureFlags,
@@ -157,7 +158,7 @@ const addLegacyFunctionsDirectory = (config) => {
157
158
  * The first pass uses the `defaultConfig`'s `build.base` (if defined).
158
159
  * The second pass uses the `build.base` from the first pass (if defined).
159
160
  */
160
- const loadConfig = async function ({ configOpt, cwd, context, repositoryRoot, packagePath, branch, defaultConfig, inlineConfig, baseRelDir, logs, featureFlags, }) {
161
+ const loadConfig = async function ({ configOpt, cwd, context, repositoryRoot, packagePath, branch, defaultConfig, inlineConfig, configMutationsOrigin, baseRelDir, logs, featureFlags, }) {
161
162
  const initialBase = getInitialBase({ repositoryRoot, defaultConfig, inlineConfig });
162
163
  const { configPath, config, buildDir, base, redirectsPath, headersPath } = await getFullConfig({
163
164
  configOpt,
@@ -167,6 +168,7 @@ const loadConfig = async function ({ configOpt, cwd, context, repositoryRoot, pa
167
168
  branch,
168
169
  defaultConfig,
169
170
  inlineConfig,
171
+ configMutationsOrigin,
170
172
  baseRelDir,
171
173
  packagePath,
172
174
  configBase: initialBase,
@@ -190,6 +192,7 @@ const loadConfig = async function ({ configOpt, cwd, context, repositoryRoot, pa
190
192
  branch,
191
193
  defaultConfig,
192
194
  inlineConfig,
195
+ configMutationsOrigin,
193
196
  baseRelDir,
194
197
  configBase: base,
195
198
  base,
@@ -207,7 +210,7 @@ const loadConfig = async function ({ configOpt, cwd, context, repositoryRoot, pa
207
210
  /**
208
211
  * Load configuration file and normalize it, merge contexts, etc.
209
212
  */
210
- const getFullConfig = async function ({ configOpt, cwd, context, repositoryRoot, packagePath, branch, defaultConfig, inlineConfig, baseRelDir, configBase, base, logs, featureFlags, }) {
213
+ const getFullConfig = async function ({ configOpt, cwd, context, repositoryRoot, packagePath, branch, defaultConfig, inlineConfig, configMutationsOrigin, baseRelDir, configBase, base, logs, featureFlags, }) {
211
214
  const configPath = await getConfigPath({ configOpt, cwd, repositoryRoot, packagePath, configBase });
212
215
  try {
213
216
  const config = await parseConfig(configPath);
@@ -221,7 +224,11 @@ const getFullConfig = async function ({ configOpt, cwd, context, repositoryRoot,
221
224
  }
222
225
  catch (error) {
223
226
  const configName = configPath === undefined ? '' : ` file ${configPath}`;
224
- error.message = `When resolving config${configName}:\n${error.message}`;
227
+ // The invalid value is not in the config file when it came from a mutation.
228
+ const stage = configMutationsOrigin === undefined
229
+ ? `resolving config${configName}`
230
+ : `applying configuration from ${configMutationsOrigin}`;
231
+ error.message = `When ${stage}:\n${error.message}`;
225
232
  throw error;
226
233
  }
227
234
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "25.2.4",
3
+ "version": "25.2.5",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -94,5 +94,5 @@
94
94
  "engines": {
95
95
  "node": ">=22.12.0"
96
96
  },
97
- "gitHead": "d30dc9ad0c79ea23f01354f2487187d3398f5de2"
97
+ "gitHead": "ff2974e358a0d36f213a9a24e844cd0c3ca44c18"
98
98
  }