Skip to content

Commit 0c11ed6

Browse files
Copilotkategengler
andauthored
Fix execa usage for v9 compatibility
Agent-Logs-Url: https://github.com/emberjs/ember.js/sessions/6e22ff52-5de4-40d6-83cf-d3894f2f986b Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
1 parent 3cd8ddf commit 0c11ed6

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

bin/benchmark/utils.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
55
import { basename, join } from 'node:path';
66
import { styleText } from 'node:util';
77

8-
import execa from 'execa';
8+
import { execa } from 'execa';
99
import fs from 'fs-extra';
1010
import { existsSync } from 'node:fs';
1111

bin/build-for-publishing.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
const fs = require('fs');
44
const path = require('path');
5-
const execa = require('execa');
65
const buildInfo = require('../broccoli/build-info').buildInfo();
76

8-
function exec(command, args) {
7+
async function exec(command, args) {
8+
const { execa } = await import('execa');
99
// eslint-disable-next-line
1010
console.log(`\n\tRunning: \`${command} ${args.join(' ')}\``);
11-
let stream = execa(command, args);
12-
stream.stdout.pipe(process.stdout);
13-
return stream;
11+
return execa(command, args, { stdout: 'inherit', stderr: 'inherit' });
1412
}
1513

1614
/*

bin/run-browserstack-tests.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
/* eslint-disable no-console */
22

3-
const execa = require('execa');
43
const chalk = require('chalk');
54

6-
function run(command, args = []) {
5+
async function run(command, args = []) {
6+
const { execa } = await import('execa');
77
console.log(chalk.dim('$ ' + command + ' ' + args.join(' ')));
88

9-
let p = execa(command, args);
10-
p.stdout.pipe(process.stdout);
11-
p.stderr.pipe(process.stderr);
12-
13-
return p;
9+
return execa(command, args, { stdout: 'inherit', stderr: 'inherit' });
1410
}
1511

1612
(async function () {

0 commit comments

Comments
 (0)