From 51096cc092857b9a915d8a63f9ffaaca8b5e5ee9 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Sat, 27 Aug 2022 06:59:27 +0200 Subject: [PATCH] Debug test --- .github/workflows/tests.yml | 6 +++--- package.json | 2 +- .../watch/watch-config-early-update/_config.js | 13 +++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b185827e0a0..ca3d7fa148f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['14'] + node: ['14.18.0'] name: Node ${{ matrix.node }} (Linux) steps: - name: Checkout Commit @@ -78,7 +78,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node: ['14', '18'] + node: ['14.18.0', '18'] name: Node ${{ matrix.node }} (macOS) steps: - name: Checkout Commit @@ -98,7 +98,7 @@ jobs: runs-on: windows-latest strategy: matrix: - node: ['14', '18'] + node: ['14.18.0', '18'] name: Node ${{ matrix.node }} (Windows) steps: - name: Checkout Commit diff --git a/package.json b/package.json index f0b98f4bf72..014b958e2e3 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "dist/es/package.json" ], "engines": { - "node": ">=14.13.1", + "node": ">=14.18.0", "npm": ">=8.0.0" }, "exports": { diff --git a/test/cli/samples/watch/watch-config-early-update/_config.js b/test/cli/samples/watch/watch-config-early-update/_config.js index dbe54cf0cc5..2c6dbf049be 100644 --- a/test/cli/samples/watch/watch-config-early-update/_config.js +++ b/test/cli/samples/watch/watch-config-early-update/_config.js @@ -1,6 +1,6 @@ const { mkdirSync, unlinkSync } = require('fs'); const path = require('path'); -const { writeAndSync, writeAndRetry } = require('../../../../utils'); +const { wait, writeAndSync, writeAndRetry } = require('../../../../utils'); const configFile = path.join(__dirname, 'rollup.config.mjs'); let stopUpdate; @@ -48,11 +48,11 @@ module.exports = { stopUpdate(); }, abortOnStderr(data) { - console.log('data', data); if (data === 'initial\n') { - stopUpdate = writeAndRetry( - configFile, - ` + wait(200).then(() => { + stopUpdate = writeAndRetry( + configFile, + ` console.error('updated'); export default { input: 'main.js', @@ -61,7 +61,8 @@ module.exports = { format: "es" } };` - ); + ); + }); return false; } if (data.includes(`created _actual/output2.js`)) {