diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d36e1a8..441975c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,8 +10,7 @@ jobs: fail-fast: false matrix: node-version: - - 14 - - 12 + - 16 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 diff --git a/cli.js b/cli.js index 8f195e3..1e995b2 100755 --- a/cli.js +++ b/cli.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +import process from 'node:process'; import meow from 'meow'; import stripAnsi from 'strip-ansi'; import getStdin from 'get-stdin'; @@ -10,7 +11,9 @@ const cli = meow(` Example $ ls --color | strip-ansi -`); +`, { + importMeta: import.meta, +}); const input = cli.input[0]; diff --git a/package.json b/package.json index fb1e036..fbf05ec 100644 --- a/package.json +++ b/package.json @@ -51,12 +51,12 @@ ], "dependencies": { "get-stdin": "^9.0.0", - "meow": "^9.0.0", - "strip-ansi": "^7.0.0" + "meow": "^10.1.1", + "strip-ansi": "^7.0.1" }, "devDependencies": { "ava": "^3.15.0", - "execa": "^5.0.0", - "xo": "^0.38.2" + "execa": "^5.1.1", + "xo": "^0.44.0" } } diff --git a/test.js b/test.js index 191cc31..fa6968a 100644 --- a/test.js +++ b/test.js @@ -8,7 +8,7 @@ test('main', async t => { test('stdin', async t => { const {stdout} = await execa('./cli.js', { - input: '\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m' + input: '\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m', }); t.is(stdout, 'foofoo'); });