Skip to content

Commit

Permalink
Merge branch 'main' into renovate/micromatch-4.x-lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored May 23, 2024
2 parents 1e9f766 + bbbba76 commit a5dbe1e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@netlify/functions-utils": "^5.2.57",
"@netlify/git-utils": "^5.1.1",
"@netlify/opentelemetry-utils": "^1.2.1",
"@netlify/plugins-list": "^6.79.0",
"@netlify/plugins-list": "^6.80.0",
"@netlify/run-utils": "^5.1.1",
"@netlify/zip-it-and-ship-it": "9.33.0",
"@sindresorhus/slugify": "^2.0.0",
Expand Down
12 changes: 10 additions & 2 deletions packages/config/src/log/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import figures from 'figures'
import { serializeObject } from './serialize.js'
import { THEME } from './theme.js'

export const logsAreBuffered = (logs) => {
return logs !== undefined && 'stdout' in logs
}

// When the `buffer` option is true, we return logs instead of printing them
// on the console. The logs are accumulated in a `logs` array variable.
export const getBufferLogs = function ({ buffer }) {
Expand All @@ -19,10 +23,14 @@ export const log = function (logs, string, { color } = {}) {
const stringA = String(string).replace(EMPTY_LINES_REGEXP, EMPTY_LINE)
const stringB = color === undefined ? stringA : color(stringA)

if (logs !== undefined) {
// `logs` is a stateful variable
if (logs && logs.outputFlusher) {
logs.outputFlusher.flush()
}

if (logsAreBuffered(logs)) {
// `logs` is a stateful variable
logs.stderr.push(stringB)

return
}

Expand Down

0 comments on commit a5dbe1e

Please sign in to comment.