Skip to content

Commit f3579f8

Browse files
authored
Update dependencies
Closes GH-29. These major versions are related to packages moving to ESM or dropping support for older Node.js versions. A breaking change is that camelcase now converts `'_'` to `''`. This only affects `unified-args` internals.
1 parent 0a8f8cd commit f3579f8

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

lib/options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function options(flags, configuration) {
9696
processor: configuration.processor,
9797
help: config.help,
9898
version: config.version,
99-
files: config._,
99+
files: config[''],
100100
filePath: config.filePath,
101101
watch: config.watch,
102102
extensions: ext.length === 0 ? configuration.extensions : ext,

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
],
3333
"dependencies": {
3434
"@types/text-table": "^0.2.0",
35-
"camelcase": "^6.0.0",
36-
"chalk": "^4.0.0",
35+
"camelcase": "^7.0.0",
36+
"chalk": "^5.0.0",
3737
"chokidar": "^3.0.0",
3838
"fault": "^2.0.0",
3939
"json5": "^2.0.0",
@@ -46,11 +46,11 @@
4646
"@types/touch": "^3.0.0",
4747
"bail": "^2.0.0",
4848
"c8": "^7.0.0",
49-
"execa": "^5.0.0",
49+
"execa": "^6.0.0",
5050
"prettier": "^2.0.0",
5151
"remark": "^14.0.0",
5252
"remark-cli": "^10.0.0",
53-
"remark-preset-wooorm": "^8.0.0",
53+
"remark-preset-wooorm": "^9.0.0",
5454
"rimraf": "^3.0.0",
5555
"strip-ansi": "^7.0.0",
5656
"tape": "^5.0.0",
@@ -59,7 +59,7 @@
5959
"typescript": "^4.0.0",
6060
"unified": "^10.0.0",
6161
"vfile-reporter-json": "^3.0.0",
62-
"xo": "^0.44.0"
62+
"xo": "^0.50.0"
6363
},
6464
"scripts": {
6565
"build": "rimraf \"lib/**/*.d.ts\" \"test/**/*.d.ts\" && tsc && type-coverage",

test/index.js

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
/**
2+
* @typedef {import('execa').ExecaReturnValue} ExecaReturnValue
3+
*/
4+
15
import fs from 'node:fs'
26
import path from 'node:path'
37
import process from 'node:process'
4-
import execa from 'execa'
8+
import {execa} from 'execa'
59
import {bail} from 'bail'
610
import test from 'tape'
711
import strip from 'strip-ansi'
@@ -28,7 +32,7 @@ test('unified-args', (t) => {
2832

2933
execa(bin, ['missing.txt']).then(
3034
() => t.fail(),
31-
(/** @type {execa.ExecaReturnValue} */ error) => {
35+
(/** @type {ExecaReturnValue} */ error) => {
3236
t.deepEqual(
3337
[error.exitCode, strip(error.stderr)],
3438
[1, expected],
@@ -125,7 +129,7 @@ test('unified-args', (t) => {
125129

126130
execa(bin, ['-n']).then(
127131
() => t.fail(),
128-
(/** @type {execa.ExecaReturnValue} */ error) => {
132+
(/** @type {ExecaReturnValue} */ error) => {
129133
t.deepEqual(
130134
[error.exitCode, strip(error.stderr)],
131135
[1, expected],
@@ -145,7 +149,7 @@ test('unified-args', (t) => {
145149

146150
execa(bin, ['-on']).then(
147151
() => t.fail(),
148-
(/** @type {execa.ExecaReturnValue} */ error) => {
152+
(/** @type {ExecaReturnValue} */ error) => {
149153
t.deepEqual(
150154
[error.exitCode, strip(error.stderr)],
151155
[1, expected],
@@ -165,7 +169,7 @@ test('unified-args', (t) => {
165169

166170
execa(bin, ['--no']).then(
167171
() => t.fail(),
168-
(/** @type {execa.ExecaReturnValue} */ error) => {
172+
(/** @type {ExecaReturnValue} */ error) => {
169173
t.deepEqual(
170174
[error.exitCode, strip(error.stderr)],
171175
[1, expected],
@@ -290,7 +294,7 @@ test('unified-args', (t) => {
290294

291295
execa(bin, ['.', flag]).then(
292296
() => t.fail(),
293-
(/** @type {execa.ExecaReturnValue} */ error) => {
297+
(/** @type {ExecaReturnValue} */ error) => {
294298
t.deepEqual(
295299
[error.stdout, error.stderr],
296300
['', expected],
@@ -337,7 +341,7 @@ test('unified-args', (t) => {
337341
// Should be quoted.
338342
execa(bin, ['.', flag, 'foo:bar']).then(
339343
() => t.fail(),
340-
(/** @type {execa.ExecaReturnValue} */ error) => {
344+
(/** @type {ExecaReturnValue} */ error) => {
341345
t.deepEqual(
342346
[error.exitCode, strip(error.stderr)],
343347
[1, expected],
@@ -416,7 +420,7 @@ test('unified-args', (t) => {
416420
// Should be quoted.
417421
execa(bin, ['.', flag, './plugin.js=foo:bar']).then(
418422
() => t.fail(),
419-
(/** @type {execa.ExecaReturnValue} */ error) => {
423+
(/** @type {ExecaReturnValue} */ error) => {
420424
t.deepEqual(
421425
[error.exitCode, strip(error.stderr)],
422426
[1, expected],
@@ -495,7 +499,7 @@ test('unified-args', (t) => {
495499

496500
execa(bin, ['.', '--report']).then(
497501
() => t.fail(),
498-
(/** @type {execa.ExecaReturnValue} */ error) => {
502+
(/** @type {ExecaReturnValue} */ error) => {
499503
t.deepEqual(
500504
[error.exitCode, error.stderr],
501505
[1, 'Error: Missing value: --report <reporter> specify reporter'],
@@ -604,7 +608,7 @@ test('unified-args', (t) => {
604608

605609
execa(bin, ['one.txt', 'two.txt', '--ignore-pattern', 'one.txt']).then(
606610
() => t.fail(),
607-
(/** @type {execa.ExecaReturnValue} */ error) => {
611+
(/** @type {ExecaReturnValue} */ error) => {
608612
t.deepEqual(
609613
[error.exitCode, strip(error.stderr)],
610614
[1, expected],
@@ -659,7 +663,7 @@ test('unified-args', (t) => {
659663

660664
setTimeout(seeYouLaterAlligator, delay)
661665

662-
function onsuccess(/** @type {execa.ExecaReturnValue} */ result) {
666+
function onsuccess(/** @type {ExecaReturnValue} */ result) {
663667
resolved = true
664668
fs.unlinkSync(doc)
665669
t.deepEqual(
@@ -714,7 +718,7 @@ test('unified-args', (t) => {
714718

715719
setTimeout(seeYouLaterAlligator, delay)
716720

717-
function onsuccess(/** @type {execa.ExecaReturnValue} */ result) {
721+
function onsuccess(/** @type {ExecaReturnValue} */ result) {
718722
resolved = true
719723

720724
fs.unlinkSync(doc)
@@ -748,7 +752,7 @@ test('unified-args', (t) => {
748752

749753
execa(bin, ['-w']).then(
750754
() => t.fail(),
751-
(/** @type {execa.ExecaReturnValue} */ error) => {
755+
(/** @type {ExecaReturnValue} */ error) => {
752756
const actual = strip(error.stderr).split('\n').slice(0, 2).join('\n')
753757

754758
t.deepEqual([error.exitCode, actual], [1, expected], 'should fail')
@@ -764,7 +768,7 @@ test('unified-args', (t) => {
764768

765769
execa(bin, ['.', '-u', './plugin.js']).then(
766770
() => t.fail(),
767-
(/** @type {execa.ExecaReturnValue} */ error) => {
771+
(/** @type {ExecaReturnValue} */ error) => {
768772
t.deepEqual(
769773
[error.exitCode, strip(error.stderr)],
770774
[1, expected],

0 commit comments

Comments
 (0)