Skip to content

Commit

Permalink
refactor: remove incorrect extraneous property from type
Browse files Browse the repository at this point in the history
  • Loading branch information
serhalp committed Feb 28, 2025
1 parent 27e6287 commit fc3b1aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions packages/config/src/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ export const getHeadersPath = function ({ build: { publish } }) {
const HEADERS_FILENAME = '_headers'

// Add `config.headers`
export const addHeaders = async function ({
config: { headers: configHeaders, ...config },
headersPath,
logs,
featureFlags,
}) {
export const addHeaders = async function ({ config: { headers: configHeaders, ...config }, headersPath, logs }) {
const { headers, errors } = await parseAllHeaders({
headersFiles: [headersPath],
configHeaders,
minimal: true,
featureFlags,
})
warnHeadersParsing(logs, errors)
warnHeadersCaseSensitivity(logs, headers)
Expand Down
2 changes: 1 addition & 1 deletion packages/config/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const getFullConfig = async function ({
base: baseA,
} = await resolveFiles({ packagePath, config: configA, repositoryRoot, base, baseRelDir })
const headersPath = getHeadersPath(configB)
const configC = await addHeaders({ config: configB, headersPath, logs, featureFlags })
const configC = await addHeaders({ config: configB, headersPath, logs })
const redirectsPath = getRedirectsPath(configC)
const configD = await addRedirects({ config: configC, redirectsPath, logs, featureFlags })
return { configPath, config: configD, buildDir, base: baseA, redirectsPath, headersPath }
Expand Down
2 changes: 1 addition & 1 deletion packages/config/src/mutations/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const updateConfig = async function (
const inlineConfig = applyMutations({}, configMutations)
const normalizedInlineConfig = ensureConfigPriority(inlineConfig, context, branch)
const updatedConfig = await mergeWithConfig(normalizedInlineConfig, configPath)
const configWithHeaders = await addHeaders({ config: updatedConfig, headersPath, logs, featureFlags })
const configWithHeaders = await addHeaders({ config: updatedConfig, headersPath, logs })
const finalConfig = await addRedirects({ config: configWithHeaders, redirectsPath, logs, featureFlags })
const simplifiedConfig = simplifyConfig(finalConfig)

Expand Down

0 comments on commit fc3b1aa

Please sign in to comment.