From e8deb682da35628af1065c4dc8293e9198bfd063 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Aug 2026 20:02:31 +0000 Subject: [PATCH 1/2] Update dependency ava to v8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0698ea0..c8ad795 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "yargs": "^18.0.0" }, "devDependencies": { - "ava": "^3.1.0", + "ava": "^8.0.0", "c8": "^12.0.0", "eslint": "^10.0.0", "eslint-config-problems": "10.0.1", From 332376530cb0ceaaa7a30b9d63a7e382d709b068 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Thu, 27 Aug 2026 16:16:55 -0400 Subject: [PATCH 2/2] Update stdin/stdout tests to use promises --- test/stdin.js | 30 ++++++++++++++++-------------- test/stdout.js | 37 +++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/test/stdin.js b/test/stdin.js index 5137694..7cc075e 100644 --- a/test/stdin.js +++ b/test/stdin.js @@ -7,22 +7,24 @@ import { exec } from 'node:child_process' import tmp from './helpers/tmp.js' import read from './helpers/read.js' -test.cb('reads from stdin', (t) => { +test('reads from stdin', (t) => { const output = tmp('output.css') - const cp = exec( - `node ${path.resolve('index.js')} -o ${output} --no-map`, - (error, stdout, stderr) => { - if (error) t.end(error, stderr) + return new Promise((resolve, reject) => { + const cp = exec( + `node ${path.resolve('index.js')} -o ${output} --no-map`, + (error) => { + if (error) return reject(error) - Promise.all([read(output), read('test/fixtures/a.css')]) - .then(([a, e]) => { - t.is(a, e) - t.end() - }) - .catch(t.end) - }, - ) + Promise.all([read(output), read('test/fixtures/a.css')]) + .then(([a, e]) => { + t.is(a, e) + resolve() + }) + .catch(reject) + }, + ) - createReadStream('test/fixtures/a.css').pipe(cp.stdin) + createReadStream('test/fixtures/a.css').pipe(cp.stdin) + }) }) diff --git a/test/stdout.js b/test/stdout.js index 6336cc7..0249c69 100644 --- a/test/stdout.js +++ b/test/stdout.js @@ -6,22 +6,27 @@ import { exec } from 'node:child_process' import read from './helpers/read.js' -test.cb('writes to stdout', (t) => { - const cp = exec( - `node ${path.resolve( - 'index.js', - )} --parser sugarss -u postcss-import --no-map`, - (error, stdout, stderr) => { - if (error) t.end(error, stderr) +test('writes to stdout', (t) => { + return new Promise((resolve, reject) => { + const cp = exec( + `node ${path.resolve( + 'index.js', + )} --parser sugarss -u postcss-import --no-map`, + (error, stdout) => { + if (error) return reject(error) - Promise.all([stdout.replace(/\r\n/g, '\n'), read('test/fixtures/s.css')]) - .then(([a, e]) => { - t.is(a, e) - t.end() - }) - .catch(t.end) - }, - ) + Promise.all([ + stdout.replace(/\r\n/g, '\n'), + read('test/fixtures/s.css'), + ]) + .then(([a, e]) => { + t.is(a, e) + resolve() + }) + .catch(reject) + }, + ) - createReadStream('./test/fixtures/a.sss').pipe(cp.stdin) + createReadStream('./test/fixtures/a.sss').pipe(cp.stdin) + }) })