Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"indent-string": "^5.0.0",
"is-plain-obj": "^4.0.0",
"map-obj": "^5.0.0",
"omit.js": "^2.0.2",
"p-locate": "^6.0.0",
"path-type": "^6.0.0",
"read-package-up": "^11.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/config/src/bin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { dirname } from 'path'
import process from 'process'

import fastSafeStringify from 'fast-safe-stringify'
import omit from 'omit.js'

import { isUserError } from '../error.js'
import { resolveConfig } from '../main.js'
Expand All @@ -28,7 +27,7 @@ const DEFAULT_OUTPUT = '-'
// The result is output as JSON on success (exit code 0)
const handleCliSuccess = async function (result, stable, output) {
const resultA = serializeApi(result)
const resultB = omit.default(resultA, SECRET_PROPERTIES)
const resultB = Object.fromEntries(Object.entries(resultA).filter(([key]) => !SECRET_PROPERTIES.includes(key)))
const stringifyFunc = stable ? fastSafeStringify.stableStringify : JSON.stringify
const resultJson = stringifyFunc(resultB, null, 2)
await outputResult(resultJson, output)
Expand Down
3 changes: 1 addition & 2 deletions packages/config/src/env/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { NetlifyAPI } from '@netlify/api'
import omit from 'omit.js'

import { removeFalsy } from '../utils/remove_falsy.js'

Expand Down Expand Up @@ -214,7 +213,7 @@ const getConfigFileEnv = function ({

// Some environment variables cannot be overridden by configuration
const cleanUserEnv = function (userEnv) {
return omit.default(userEnv, READONLY_ENV)
return Object.fromEntries(Object.entries(userEnv ?? {}).filter(([key]) => !READONLY_ENV.includes(key)))
}

const READONLY_ENV = [
Expand Down
Loading