diff --git a/ava.base.js b/ava.base.js index b2cac32a6f..5bf45e7db1 100644 --- a/ava.base.js +++ b/ava.base.js @@ -7,7 +7,7 @@ import * as execa from 'execa' const { execaCommand } = execa if (process.argv.includes('-w')) { - execaCommand('tsc -w', { cleanup: true }) + execaCommand('tsc -w', { cleanup: true, verbose: 'full' }) } // `tests-metadata.json` is created by running `npx lerna run test:measure --scope @netlify/build` diff --git a/packages/build-info/tests/bin.test.ts b/packages/build-info/tests/bin.test.ts index 40a3b4bbbe..c7b2f90ebb 100644 --- a/packages/build-info/tests/bin.test.ts +++ b/packages/build-info/tests/bin.test.ts @@ -15,7 +15,7 @@ const runBinary = (...args: string[]) => { return execaNode(binary, args) } const binary = fileURLToPath(new URL('../src/node/bin.ts', import.meta.url)) - return execa('node', ['--loader=ts-node/esm', '--no-warnings', binary, ...args]) + return execa('node', ['--loader=ts-node/esm', '--no-warnings', binary, ...args], { verbose: 'full' }) } test('CLI --help flag', async () => { diff --git a/packages/build/src/core/user_node_version.js b/packages/build/src/core/user_node_version.js index d95b0ce3d0..3472ffc975 100644 --- a/packages/build/src/core/user_node_version.js +++ b/packages/build/src/core/user_node_version.js @@ -28,7 +28,7 @@ export const getUserNodeVersion = async function (nodePath) { } // Fallback to actually running `node --version` with the given nodePath - const { stdout } = await execa(nodePath, ['--version'], { reject: false }) + const { stdout } = await execa(nodePath, ['--version'], { reject: false, verbose: 'full' }) const version = semver.clean(stdout) if (version === null) { diff --git a/packages/build/src/install/main.js b/packages/build/src/install/main.js index 24ee4d3c5c..13617aca9e 100644 --- a/packages/build/src/install/main.js +++ b/packages/build/src/install/main.js @@ -21,7 +21,7 @@ export const addExactDependencies = function ({ packageRoot, isLocal, packages } const runCommand = async function ({ packageRoot, packages = [], isLocal, type }) { try { const [command, ...args] = await getCommand({ packageRoot, type, isLocal }) - await execa(command, [...args, ...packages], { cwd: packageRoot, all: true }) + await execa(command, [...args, ...packages], { cwd: packageRoot, all: true, verbose: 'full' }) } catch (error) { const message = getErrorMessage(error.all) const errorA = new Error(`Error while installing dependencies in ${packageRoot}\n${message}`) diff --git a/packages/build/src/install/missing.js b/packages/build/src/install/missing.js index 45c60b810b..5ebf265672 100644 --- a/packages/build/src/install/missing.js +++ b/packages/build/src/install/missing.js @@ -87,7 +87,7 @@ const getIntegrationPackage = async function ({ const integrationDir = testOpts.cwd ? resolve(testOpts.cwd, path) : resolve(buildDir, path) try { - const res = await execa('npm', ['run', 'build'], { cwd: integrationDir, env: pluginsEnv }) + const res = await execa('npm', ['run', 'build'], { cwd: integrationDir, env: pluginsEnv, verbose: 'full' }) // This is horrible and hacky, but `npm run build` will // return status code 0 even if it fails diff --git a/packages/build/src/plugins_core/build_command.js b/packages/build/src/plugins_core/build_command.js index f38477910b..1a263dd4e5 100644 --- a/packages/build/src/plugins_core/build_command.js +++ b/packages/build/src/plugins_core/build_command.js @@ -38,6 +38,7 @@ const coreStep = async function ({ env: childEnv, extendEnv: false, stdio, + verbose: 'full', }) try { diff --git a/packages/build/tests/plugins/fixtures/local_bin/plugin.js b/packages/build/tests/plugins/fixtures/local_bin/plugin.js index 4eeb35c2ba..bac38bf216 100644 --- a/packages/build/tests/plugins/fixtures/local_bin/plugin.js +++ b/packages/build/tests/plugins/fixtures/local_bin/plugin.js @@ -1,5 +1,5 @@ import { execa } from 'execa' export const onPreBuild = async function () { - await execa('atob', ['dGVzdA=='], { stdio: 'inherit' }) + await execa('atob', ['dGVzdA=='], { stdio: 'inherit', verbose: 'full' }) } diff --git a/packages/build/tests/plugins_list/fixtures/plugins_cache_bin/.netlify/plugins/node_modules/netlify-plugin-contextual-env/index.js b/packages/build/tests/plugins_list/fixtures/plugins_cache_bin/.netlify/plugins/node_modules/netlify-plugin-contextual-env/index.js index faf9fbe773..00c3591aca 100644 --- a/packages/build/tests/plugins_list/fixtures/plugins_cache_bin/.netlify/plugins/node_modules/netlify-plugin-contextual-env/index.js +++ b/packages/build/tests/plugins_list/fixtures/plugins_cache_bin/.netlify/plugins/node_modules/netlify-plugin-contextual-env/index.js @@ -1,5 +1,5 @@ import { execa } from 'execa' export const onPreBuild = async function () { - await execa('netlify-config', ['--version'], { stdio:'inherit' }) + await execa('netlify-config', ['--version'], { stdio: 'inherit', verbose: 'full' }) } diff --git a/packages/config/src/env/git.js b/packages/config/src/env/git.js index 20beef53ed..99ac05d2f3 100644 --- a/packages/config/src/env/git.js +++ b/packages/config/src/env/git.js @@ -17,7 +17,7 @@ export const getGitEnv = async function (buildDir, branch) { const git = async function (args, cwd) { try { - const { stdout } = await execa('git', args, { cwd }) + const { stdout } = await execa('git', args, { cwd, verbose: 'full' }) return stdout } catch { // continue regardless error diff --git a/packages/config/src/options/branch.js b/packages/config/src/options/branch.js index cec6cac0af..b11d896f7d 100644 --- a/packages/config/src/options/branch.js +++ b/packages/config/src/options/branch.js @@ -26,7 +26,10 @@ export const getBranch = async function ({ branch, repositoryRoot }) { const getGitBranch = async function (repositoryRoot, gitRef) { try { - const { stdout } = await execaCommand(`git rev-parse --abbrev-ref ${gitRef}`, { cwd: repositoryRoot }) + const { stdout } = await execaCommand(`git rev-parse --abbrev-ref ${gitRef}`, { + cwd: repositoryRoot, + verbose: 'full', + }) return stdout } catch { // continue regardless error diff --git a/packages/edge-bundler/test/util.ts b/packages/edge-bundler/test/util.ts index 2b8d204772..7f068b5e6c 100644 --- a/packages/edge-bundler/test/util.ts +++ b/packages/edge-bundler/test/util.ts @@ -40,7 +40,7 @@ const inspectFunction = (path: string) => ` responses[functionName] = await res.text(); } - + console.log(JSON.stringify(responses)); ` diff --git a/packages/run-utils/src/main.ts b/packages/run-utils/src/main.ts index 098da28bbb..ea16ffca1f 100644 --- a/packages/run-utils/src/main.ts +++ b/packages/run-utils/src/main.ts @@ -3,7 +3,7 @@ import process from 'process' import { execa, ExecaChildProcess, execaCommand, Options } from 'execa' /** Allow running local binaries by default */ -const DEFAULT_OPTIONS: Partial> = { preferLocal: true } +const DEFAULT_OPTIONS: Partial> = { preferLocal: true, verbose: 'full' } /** Run a command, with arguments being an array */ export const run = (file: string, args?: string[] | object, options?: Record) => { diff --git a/packages/testing/src/fixture.ts b/packages/testing/src/fixture.ts index 67cb43429a..ed08d9d02f 100644 --- a/packages/testing/src/fixture.ts +++ b/packages/testing/src/fixture.ts @@ -150,7 +150,7 @@ export class Fixture { await cpy('./**', this.copyRootDir, { cwd: this.repositoryRoot }) if (copyRoot.branch !== undefined) { - await execaCommand(`git checkout -b ${copyRoot.branch}`, { cwd: this.copyRootDir }) + await execaCommand(`git checkout -b ${copyRoot.branch}`, { cwd: this.copyRootDir, verbose: 'full' }) } this.repositoryRoot = this.copyRootDir diff --git a/packages/testing/src/fs.ts b/packages/testing/src/fs.ts index 93d06f1838..6b9beec54d 100644 --- a/packages/testing/src/fs.ts +++ b/packages/testing/src/fs.ts @@ -7,8 +7,8 @@ export const unzipFile = async function (path: string, dest: string): Promise { await mkdir(dest, { recursive: true }) if (platform === 'win32') { - await execa('tar', ['-xf', path, '-C', dest]) + await execa('tar', ['-xf', path, '-C', dest]), { verbose: 'full' } } else { - await execa('unzip', ['-o', path, '-d', dest]) + await execa('unzip', ['-o', path, '-d', dest], { verbose: 'full' }) } } diff --git a/packages/zip-it-and-ship-it/tests/main.test.ts b/packages/zip-it-and-ship-it/tests/main.test.ts index 6c9199b3d2..4fbbf5c482 100644 --- a/packages/zip-it-and-ship-it/tests/main.test.ts +++ b/packages/zip-it-and-ship-it/tests/main.test.ts @@ -656,6 +656,7 @@ describe('zip-it-and-ship-it', () => { await execa('npm', ['install', '--no-package-lock', '--no-audit', '--prefer-offline', '--progress=false'], { cwd: basePath, + verbose: 'full', }) }, 30_000) @@ -1194,7 +1195,7 @@ describe('zip-it-and-ship-it', () => { const fixturePath = join(FIXTURES_DIR, 'esbuild-log-limit') try { - await execa('node', [BINARY_PATH, fixturePath, tmpDir, `--config.*.nodeBundler=esbuild`]) + await execa('node', [BINARY_PATH, fixturePath, tmpDir, `--config.*.nodeBundler=esbuild`], { verbose: 'full' }) expect.fail('Bundling should have thrown') } catch (error) { diff --git a/tools/tests-duration.js b/tools/tests-duration.js index 27443ae468..f462821c37 100755 --- a/tools/tests-duration.js +++ b/tools/tests-duration.js @@ -14,7 +14,7 @@ const measureDurations = async () => { const durations = new Map() for (const testFile of testFiles) { const startTime = performance.now() - const { stdout } = await execa('ava', [testFile], { preferLocal: true, reject: false }) + const { stdout } = await execa('ava', [testFile], { preferLocal: true, reject: false, verbose: 'full' }) console.log(stdout) const endTime = performance.now()