From 6a0fe0a14738768e543eb16c37fdaf3d01e295bd Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 12 Nov 2024 21:21:22 -0600 Subject: [PATCH] fix(deps): leverage execa without the wrapper --- package-lock.json | 491 +++++++++++++++--- package.json | 4 +- src/corepack/lifter.js | 2 +- src/corepack/lifter.test.js | 5 +- src/dependencies/installer.js | 2 +- src/dependencies/installer.test.js | 4 +- src/dependencies/remover.js | 2 +- src/dependencies/remover.test.js | 5 +- src/node-version/tasks.js | 2 +- src/node-version/tasks.test.js | 5 +- src/prompts/questions.js | 2 +- src/prompts/questions.test.js | 4 +- .../features/step_definitions/common-steps.js | 4 +- .../step_definitions/coverage-steps.js | 2 +- .../step_definitions/dependencies-steps.js | 2 +- .../step_definitions/dialect-steps.js | 4 +- .../step_definitions/eslint-config-steps.js | 2 +- .../features/step_definitions/husky-steps.js | 14 +- .../features/step_definitions/npm-steps.js | 8 +- .../features/step_definitions/nvm-steps.js | 4 +- .../step_definitions/package-manager-steps.js | 4 +- .../step_definitions/publishable-steps.js | 2 +- .../features/step_definitions/yarn-steps.js | 8 +- thirdparty-wrappers/execa.js | 3 - 24 files changed, 467 insertions(+), 118 deletions(-) delete mode 100644 thirdparty-wrappers/execa.js diff --git a/package-lock.json b/package-lock.json index 6a5c8fa8..b4c6c939 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,8 +14,7 @@ "@form8ion/config-file": "^1.1.1", "@form8ion/core": "^4.0.0", "@form8ion/eslint": "^6.1.0", - "@form8ion/execa-wrapper": "^1.0.0-alpha.1", - "@form8ion/husky": "^5.3.0", + "@form8ion/husky": "^6.0.0-beta.2", "@form8ion/javascript-core": "^12.0.0-beta.1", "@form8ion/overridable-prompts": "^1.2.0", "@form8ion/prettier": "^2.0.0", @@ -24,6 +23,7 @@ "@travi/language-scaffolder-prompts": "^2.0.0-beta.1", "camelcase": "^8.0.0", "deepmerge": "^4.2.2", + "execa": "^9.5.1", "filedirname": "^3.0.0", "ini": "^5.0.0", "joi": "^17.5.0", @@ -1644,6 +1644,71 @@ "node": "^18.17 || >=20.6.1" } }, + "node_modules/@form8ion/codecov/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/@form8ion/codecov/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@form8ion/codecov/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/@form8ion/codecov/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@form8ion/codecov/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/@form8ion/commit-convention": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@form8ion/commit-convention/-/commit-convention-7.2.0.tgz", @@ -1690,9 +1755,9 @@ } }, "node_modules/@form8ion/config-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@form8ion/config-file/-/config-file-1.1.2.tgz", - "integrity": "sha512-fI4nV6HRk17gErwC5fzyfDY6sO2rRZu0rLI0kg7df+Y2S7/sVu4wJiB3pTVQAJ3mnoLQ8gr/tGjM+rXjcZzDKg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@form8ion/config-file/-/config-file-1.3.0.tgz", + "integrity": "sha512-5T5WHcfyVBE5PndJ0zPaGpyU8RjKnWWEpbbUl5eQzlvisGOVvJzEgY7l3aKy+vfdJSzjdixBbU7nzPZ1qoUvhg==", "license": "MIT", "dependencies": { "@form8ion/core": "^4.2.0", @@ -1782,65 +1847,104 @@ "execa": "^5.1.1" } }, - "node_modules/@form8ion/github-workflows-core": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@form8ion/github-workflows-core/-/github-workflows-core-5.4.0.tgz", - "integrity": "sha512-FFQVIcXJ4YS7u7SF9MyxM7Ow0VhGlNWPvaDPg3+YAQo6/9gbGaNHpF9wDtLbHP5pNsMbeU7QGHdPkhWnXeA6Nw==", + "node_modules/@form8ion/execa-wrapper/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "license": "MIT", "dependencies": { - "@form8ion/core": "^4.7.1" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" }, "engines": { - "node": "^18.17 || >=20.6.1" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/@form8ion/husky": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@form8ion/husky/-/husky-5.4.2.tgz", - "integrity": "sha512-UiX2mAXpw8hy382o1A0eaQRJJ+hpPJHMW51ZBH+3iYqVvTARZ2AYGHUMNO0a+PIUFowS9eSNsanbxCeyXzAQLA==", + "node_modules/@form8ion/execa-wrapper/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "license": "MIT", - "dependencies": { - "@form8ion/core": "^3.0.0", - "@form8ion/execa-wrapper": "^1.0.0-alpha.1", - "@travi/cli-messages": "^1.0.5", - "semver": "^7.3.5" + "engines": { + "node": ">=10" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@form8ion/execa-wrapper/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "license": "Apache-2.0", "engines": { - "node": "^16.14 || >=18" + "node": ">=10.17.0" } }, - "node_modules/@form8ion/husky/node_modules/@form8ion/core": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-3.3.0.tgz", - "integrity": "sha512-c6pA2A/DNIKp3fOE7woradqvLy6kBXjoBz6Gi6LB3yeslR9bnWnbS0HEcG3QrwihlG8qhD2+3oqaYRU5tiGV1Q==", + "node_modules/@form8ion/execa-wrapper/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "license": "MIT", "dependencies": { - "@hapi/hoek": "^11.0.2", - "@travi/cli-messages": "^1.0.5", - "deepmerge": "^4.2.2", - "js-yaml": "^4.1.0", - "spdx-license-list": "6.8.0" + "path-key": "^3.0.0" }, "engines": { - "node": "^16.14 || >=18" + "node": ">=8" } }, - "node_modules/@form8ion/husky/node_modules/spdx-license-list": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.8.0.tgz", - "integrity": "sha512-5UdM7r9yJ1EvsPQZWfa41AZjLQngl9iMMysm9XBW7Lqhq7aF8cllfqjS+rFCHB8FFMGSM0yFWue2LUV9mR0QzQ==", - "license": "CC0-1.0", + "node_modules/@form8ion/execa-wrapper/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6" + } + }, + "node_modules/@form8ion/github-workflows-core": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@form8ion/github-workflows-core/-/github-workflows-core-5.4.0.tgz", + "integrity": "sha512-FFQVIcXJ4YS7u7SF9MyxM7Ow0VhGlNWPvaDPg3+YAQo6/9gbGaNHpF9wDtLbHP5pNsMbeU7QGHdPkhWnXeA6Nw==", + "license": "MIT", + "dependencies": { + "@form8ion/core": "^4.7.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^18.17 || >=20.6.1" + } + }, + "node_modules/@form8ion/husky": { + "version": "6.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@form8ion/husky/-/husky-6.0.0-beta.2.tgz", + "integrity": "sha512-za3xNi1PIHV4XGo6vvemI0778xyLzVwZrqHuVBJuLwPXhSMWb/JyI5F300cob4JULtgtsUZTyYIiUpwM1UVHZg==", + "license": "MIT", + "dependencies": { + "@form8ion/config-file": "^1.3.0", + "@form8ion/core": "^4.8.0", + "@form8ion/javascript-core": "^12.3.0", + "@travi/cli-messages": "^1.0.5", + "execa": "^9.5.1", + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.19.0 || ^20.6.1 || >=22" } }, "node_modules/@form8ion/javascript-core": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@form8ion/javascript-core/-/javascript-core-12.2.0.tgz", - "integrity": "sha512-Menmw7OrYdVm/JuMclb7ViOoS7adaU4D9lvuas/IcsxVQOVloY/SQVOpXU2VFUepFQ8dXyVV0vSFFfNLhEUqTA==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@form8ion/javascript-core/-/javascript-core-12.3.0.tgz", + "integrity": "sha512-bB3gqJhmwnjBV2pqcb9cJ3sOiqNPhfNCQfQNsPYj/Pcb3VxkXac2emcmNW80l2EISq7OwgLZ5KoiA93TY9K/Dg==", "license": "MIT", "dependencies": { "@form8ion/core": "^4.2.0", @@ -4029,6 +4133,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@sec-ant/readable-stream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", + "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", + "license": "MIT" + }, "node_modules/@sideway/address": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", @@ -4203,6 +4313,18 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -8748,28 +8870,94 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.5.1.tgz", + "integrity": "sha512-QY5PPtSonnGwhhHDNI7+3RvY285c7iuJFFB+lU+oEzMY/gEGJ808owqJsrr8Otd1E/x07po1LkUBmdAc5duPAg==", "license": "MIT", "dependencies": { + "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "figures": "^6.1.0", + "get-stream": "^9.0.0", + "human-signals": "^8.0.0", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^6.0.0", + "pretty-ms": "^9.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.0.0" }, "engines": { - "node": ">=10" + "node": "^18.19.0 || >=20.5.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/figures": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", + "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -9403,12 +9591,28 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", "license": "MIT", + "dependencies": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + }, "engines": { - "node": ">=10" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream/node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10229,12 +10433,12 @@ } }, "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.0.tgz", + "integrity": "sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==", "license": "Apache-2.0", "engines": { - "node": ">=10.17.0" + "node": ">=18.18.0" } }, "node_modules/humanize-ms": { @@ -11305,6 +11509,81 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-changed-files/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/jest-changed-files/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-changed-files/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/jest-circus": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", @@ -15107,15 +15386,43 @@ } }, "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", + "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", "license": "MIT", "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0", + "unicorn-magic": "^0.3.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/npmlog": { @@ -15801,6 +16108,18 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "license": "MIT" }, + "node_modules/parse-ms": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", + "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", @@ -16174,6 +16493,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/pretty-ms": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.1.0.tgz", + "integrity": "sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==", + "license": "MIT", + "dependencies": { + "parse-ms": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/proc-log": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", @@ -18829,12 +19163,15 @@ } }, "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", "license": "MIT", "engines": { - "node": ">=6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-indent": { @@ -20748,6 +21085,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yoctocolors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", + "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yoctocolors-cjs": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", diff --git a/package.json b/package.json index 08f49593..d86b253a 100644 --- a/package.json +++ b/package.json @@ -64,8 +64,7 @@ "@form8ion/config-file": "^1.1.1", "@form8ion/core": "^4.0.0", "@form8ion/eslint": "^6.1.0", - "@form8ion/execa-wrapper": "^1.0.0-alpha.1", - "@form8ion/husky": "^5.3.0", + "@form8ion/husky": "^6.0.0-beta.2", "@form8ion/javascript-core": "^12.0.0-beta.1", "@form8ion/overridable-prompts": "^1.2.0", "@form8ion/prettier": "^2.0.0", @@ -74,6 +73,7 @@ "@travi/language-scaffolder-prompts": "^2.0.0-beta.1", "camelcase": "^8.0.0", "deepmerge": "^4.2.2", + "execa": "^9.5.1", "filedirname": "^3.0.0", "ini": "^5.0.0", "joi": "^17.5.0", diff --git a/src/corepack/lifter.js b/src/corepack/lifter.js index 9f40fcc3..f104a22e 100644 --- a/src/corepack/lifter.js +++ b/src/corepack/lifter.js @@ -1,4 +1,4 @@ -import execa from '../../thirdparty-wrappers/execa.js'; +import {execa} from 'execa'; export default async function () { await execa('corepack', ['use', 'npm@latest']); diff --git a/src/corepack/lifter.test.js b/src/corepack/lifter.test.js index c8ddd488..f26c3ccf 100644 --- a/src/corepack/lifter.test.js +++ b/src/corepack/lifter.test.js @@ -1,9 +1,10 @@ +import {execa} from 'execa'; + import {describe, it, vi, expect, afterEach} from 'vitest'; -import execa from '../../thirdparty-wrappers/execa.js'; import liftCorepack from './lifter.js'; -vi.mock('../../thirdparty-wrappers/execa.js'); +vi.mock('execa'); describe('corepack lifter', () => { afterEach(() => { diff --git a/src/dependencies/installer.js b/src/dependencies/installer.js index d3ac34c9..a7e12826 100644 --- a/src/dependencies/installer.js +++ b/src/dependencies/installer.js @@ -1,7 +1,7 @@ import {info, warn} from '@travi/cli-messages'; import {DEV_DEPENDENCY_TYPE, packageManagers} from '@form8ion/javascript-core'; -import execa from '../../thirdparty-wrappers/execa.js'; +import {execa} from 'execa'; import {getDependencyTypeFlag, getExactFlag, getInstallationCommandFor} from './package-managers.js'; export default async function (dependencies, dependenciesType, projectRoot, packageManager = packageManagers.NPM) { diff --git a/src/dependencies/installer.test.js b/src/dependencies/installer.test.js index 6333bf84..e5a0813d 100644 --- a/src/dependencies/installer.test.js +++ b/src/dependencies/installer.test.js @@ -1,14 +1,14 @@ +import {execa} from 'execa'; import {DEV_DEPENDENCY_TYPE, packageManagers} from '@form8ion/javascript-core'; import {vi, it, describe, expect, beforeEach} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import execa from '../../thirdparty-wrappers/execa.js'; import {getDependencyTypeFlag, getInstallationCommandFor, getExactFlag} from './package-managers.js'; import install from './installer.js'; -vi.mock('../../thirdparty-wrappers/execa.js'); +vi.mock('execa'); vi.mock('./package-managers.js'); describe('dependencies installer', () => { diff --git a/src/dependencies/remover.js b/src/dependencies/remover.js index a35ac476..4bdd5ed7 100644 --- a/src/dependencies/remover.js +++ b/src/dependencies/remover.js @@ -1,4 +1,4 @@ -import execa from '../../thirdparty-wrappers/execa.js'; +import {execa} from 'execa'; export default async function ({packageManager, dependencies}) { await execa(packageManager, ['remove', ...dependencies]); diff --git a/src/dependencies/remover.test.js b/src/dependencies/remover.test.js index 9e38d2f6..11d503e8 100644 --- a/src/dependencies/remover.test.js +++ b/src/dependencies/remover.test.js @@ -1,10 +1,11 @@ +import {execa} from 'execa'; + import any from '@travi/any'; import {describe, it, expect, vi} from 'vitest'; -import execa from '../../thirdparty-wrappers/execa.js'; import removeDependencies from './remover.js'; -vi.mock('../../thirdparty-wrappers/execa.js'); +vi.mock('execa'); describe('dependency remover', () => { it('should remove the dependencies using the named package manager', async () => { diff --git a/src/node-version/tasks.js b/src/node-version/tasks.js index 785be304..ca8896d0 100644 --- a/src/node-version/tasks.js +++ b/src/node-version/tasks.js @@ -1,6 +1,6 @@ import {info} from '@travi/cli-messages'; -import execa from '../../thirdparty-wrappers/execa.js'; +import {execa} from 'execa'; export async function determineLatestVersionOf(nodeVersionCategory) { info('Determining version of node', {level: 'secondary'}); diff --git a/src/node-version/tasks.test.js b/src/node-version/tasks.test.js index c2bed4f3..293c987c 100644 --- a/src/node-version/tasks.test.js +++ b/src/node-version/tasks.test.js @@ -1,11 +1,12 @@ +import {execa} from 'execa'; + import {it, expect, describe, afterEach, vi} from 'vitest'; import {when} from 'jest-when'; import any from '@travi/any'; -import execa from '../../thirdparty-wrappers/execa.js'; import {determineLatestVersionOf, install} from './tasks.js'; -vi.mock('../../thirdparty-wrappers/execa.js'); +vi.mock('execa'); describe('node-version tasks', () => { const majorVersion = any.integer(); diff --git a/src/prompts/questions.js b/src/prompts/questions.js index 1a1ec0e0..08d9fd16 100644 --- a/src/prompts/questions.js +++ b/src/prompts/questions.js @@ -3,7 +3,7 @@ import {prompt as promptWithInquirer} from '@form8ion/overridable-prompts'; import {questionNames as commonQuestionNames, questions as commonQuestions} from '@travi/language-scaffolder-prompts'; import {warn} from '@travi/cli-messages'; -import execa from '../../thirdparty-wrappers/execa.js'; +import {execa} from 'execa'; import npmConfFactory from '../../thirdparty-wrappers/npm-conf.js'; import buildDialectChoices from '../dialects/prompt-choices.js'; import { diff --git a/src/prompts/questions.test.js b/src/prompts/questions.test.js index 6058d474..19044285 100644 --- a/src/prompts/questions.test.js +++ b/src/prompts/questions.test.js @@ -1,3 +1,4 @@ +import {execa} from 'execa'; import * as commonPrompts from '@travi/language-scaffolder-prompts'; import * as prompts from '@form8ion/overridable-prompts'; import {packageManagers, projectTypes} from '@form8ion/javascript-core'; @@ -6,7 +7,6 @@ import {expect, describe, it, vi, beforeEach} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import execa from '../../thirdparty-wrappers/execa.js'; import npmConfFactory from '../../thirdparty-wrappers/npm-conf.js'; import buildDialectChoices from '../dialects/prompt-choices.js'; import {questionNames} from './question-names.js'; @@ -14,9 +14,9 @@ import * as conditionals from './conditionals.js'; import {prompt} from './questions.js'; import * as validators from './validators.js'; +vi.mock('execa'); vi.mock('@travi/language-scaffolder-prompts'); vi.mock('@form8ion/overridable-prompts'); -vi.mock('../../thirdparty-wrappers/execa.js'); vi.mock('../../thirdparty-wrappers/npm-conf.js'); vi.mock('../dialects/prompt-choices.js'); vi.mock('./validators.js'); diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index d38598c1..f3c03dcf 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -47,7 +47,7 @@ export function assertDevDependencyIsInstalled(execa, dependencyName) { Before(async function () { validateNpmPackageName(any.word()); - this.execa = await td.replaceEsm('@form8ion/execa-wrapper'); + this.execa = (await td.replaceEsm('execa')).execa; this.projectRoot = process.cwd(); // eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved @@ -265,7 +265,7 @@ Then('the expected results for a(n) {string} are returned to the project scaffol if (projectTypes.PACKAGE === type) { assert.equal(scripts['lint:publish'], 'publint --strict'); - assertDevDependencyIsInstalled(this.execa.default, 'publint'); + assertDevDependencyIsInstalled(this.execa, 'publint'); } if ('github' === this.vcs?.host && 'Public' === this.visibility && this.tested) { diff --git a/test/integration/features/step_definitions/coverage-steps.js b/test/integration/features/step_definitions/coverage-steps.js index e19c926c..14513816 100644 --- a/test/integration/features/step_definitions/coverage-steps.js +++ b/test/integration/features/step_definitions/coverage-steps.js @@ -21,7 +21,7 @@ Then('nyc is not configured for code coverage', async function () { assert.isFalse(await fileExists(`${process.cwd()}/.nycrc`)); assert.isFalse(await directoryExists(`${process.cwd()}/.nyc_output`)); assertDependenciesWereRemoved( - this.execa.default, + this.execa, this.packageManager, ['nyc', '@istanbuljs/nyc-config-babel', 'babel-plugin-istanbul'] ); diff --git a/test/integration/features/step_definitions/dependencies-steps.js b/test/integration/features/step_definitions/dependencies-steps.js index 2cfa1dd2..836b51bc 100644 --- a/test/integration/features/step_definitions/dependencies-steps.js +++ b/test/integration/features/step_definitions/dependencies-steps.js @@ -21,5 +21,5 @@ export function assertDependenciesWereRemoved(execa, packageManager, dependencyN } Then('ls-engines is added as a dependency', async function () { - assertDevDependencyIsInstalled(this.execa.default, 'ls-engines'); + assertDevDependencyIsInstalled(this.execa, 'ls-engines'); }); diff --git a/test/integration/features/step_definitions/dialect-steps.js b/test/integration/features/step_definitions/dialect-steps.js index e99c380c..947ce09f 100644 --- a/test/integration/features/step_definitions/dialect-steps.js +++ b/test/integration/features/step_definitions/dialect-steps.js @@ -132,7 +132,7 @@ Then('the {string} dialect is configured', async function (dialect) { } = this; if (dialects.BABEL === dialect) { - await assertBabelDialectDetailsAreCorrect(babelPreset, buildDirectory, this.execa.default); + await assertBabelDialectDetailsAreCorrect(babelPreset, buildDirectory, this.execa); } if (dialects.TYPESCRIPT === dialect) { @@ -145,7 +145,7 @@ Then('the {string} dialect is configured', async function (dialect) { testFilenamePattern, projectType, this.packageTypeChoiceAnswer, - this.execa.default + this.execa ); } diff --git a/test/integration/features/step_definitions/eslint-config-steps.js b/test/integration/features/step_definitions/eslint-config-steps.js index 240697eb..b1a8a093 100644 --- a/test/integration/features/step_definitions/eslint-config-steps.js +++ b/test/integration/features/step_definitions/eslint-config-steps.js @@ -59,5 +59,5 @@ Then('dependencies are defined for the additional configs', async function () { return `${this.eslintConfigScope}/eslint-config-${config.name}`; }); - assertDevDependencyIsInstalled(this.execa.default, additionalConfigPackageNames.join(' ')); + assertDevDependencyIsInstalled(this.execa, additionalConfigPackageNames.join(' ')); }); diff --git a/test/integration/features/step_definitions/husky-steps.js b/test/integration/features/step_definitions/husky-steps.js index d77b393a..40d1e7dd 100644 --- a/test/integration/features/step_definitions/husky-steps.js +++ b/test/integration/features/step_definitions/husky-steps.js @@ -16,13 +16,13 @@ export async function assertHookContainsScript(hook, script) { Given('husky v5 is installed', async function () { td - .when(this.execa.default('npm', ['ls', 'husky', '--json'])) + .when(this.execa('npm', ['ls', 'husky', '--json'])) .thenResolve({stdout: JSON.stringify({dependencies: {husky: {version: '5.0.0'}}})}); }); Given('husky v4 is installed', async function () { td - .when(this.execa.default('npm', ['ls', 'husky', '--json'])) + .when(this.execa('npm', ['ls', 'husky', '--json'])) .thenResolve({stdout: JSON.stringify({dependencies: {husky: {version: '4.5.6'}}})}); }); @@ -32,7 +32,7 @@ Given('husky is not installed', async function () { error.stdout = JSON.stringify({}); error.command = 'npm ls husky --json'; - td.when(this.execa.default('npm', ['ls', 'husky', '--json'])).thenReject(error); + td.when(this.execa('npm', ['ls', 'husky', '--json'])).thenReject(error); }); Given('husky config is in v4 format', async function () { @@ -44,7 +44,7 @@ Given('husky config is in v5 format', async function () { }); Then('husky is configured for a {string} project', async function (packageManager) { - td.verify(this.execa.default(td.matchers.contains(/(npm install|yarn add).*husky/)), {ignoreExtraArgs: true}); + td.verify(this.execa(td.matchers.contains(/(npm install|yarn add).*husky/)), {ignoreExtraArgs: true}); await assertHookContainsScript('pre-commit', `${packageManager} test`); await assertHookContainsScript('commit-msg', 'npx --no-install commitlint --edit $1'); @@ -53,17 +53,17 @@ Then('husky is configured for a {string} project', async function (packageManage Then('husky is configured for {string}', async function (packageManager) { if (packageManagers.NPM === packageManager) { td.verify( - this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install')), + this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install')), {ignoreExtraArgs: true} ); } if (packageManagers.YARN === packageManager) { td.verify( - this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add')), + this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add')), {ignoreExtraArgs: true} ); } - td.verify(this.execa.default(td.matchers.contains(/(npm install|yarn add).*husky@latest/)), {ignoreExtraArgs: true}); + td.verify(this.execa(td.matchers.contains(/(npm install|yarn add).*husky@latest/)), {ignoreExtraArgs: true}); assert.equal( JSON.parse(await fs.readFile(`${process.cwd()}/package.json`, 'utf-8')).scripts.prepare, 'husky' diff --git a/test/integration/features/step_definitions/npm-steps.js b/test/integration/features/step_definitions/npm-steps.js index 236d8e75..10299791 100644 --- a/test/integration/features/step_definitions/npm-steps.js +++ b/test/integration/features/step_definitions/npm-steps.js @@ -156,11 +156,11 @@ Given(/^the npm cli is logged in$/, function () { error.stdout = JSON.stringify({}); error.command = 'npm ls husky --json'; - td.when(this.execa.default('npm', ['whoami'])).thenResolve({stdout: this.npmAccount}); + td.when(this.execa('npm', ['whoami'])).thenResolve({stdout: this.npmAccount}); td - .when(this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install'))) + .when(this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install'))) .thenResolve({stdout: ''}); - td.when(this.execa.default('npm', ['ls', 'husky', '--json'])).thenReject(error); + td.when(this.execa('npm', ['ls', 'husky', '--json'])).thenReject(error); }); Then('the npm cli is configured for use', async function () { @@ -176,7 +176,7 @@ Then('the npm cli is configured for use', async function () { assert.equal(path, 'package-lock.json'); assert.equal(this.scaffoldResult.verificationCommand, 'npm run generate:md && npm test'); td.verify( - this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install')), + this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install')), {ignoreExtraArgs: true} ); }); diff --git a/test/integration/features/step_definitions/nvm-steps.js b/test/integration/features/step_definitions/nvm-steps.js index 62f39088..7cffd8e8 100644 --- a/test/integration/features/step_definitions/nvm-steps.js +++ b/test/integration/features/step_definitions/nvm-steps.js @@ -16,9 +16,9 @@ Given(/^nvm is properly configured$/, function () { this.latestLtsMajorVersion = majorVersion; this.latestLtsVersion = semverStringFactory(); - td.when(this.execa.default('. ~/.nvm/nvm.sh && nvm ls-remote --lts', {shell: true})) + td.when(this.execa('. ~/.nvm/nvm.sh && nvm ls-remote --lts', {shell: true})) .thenResolve({stdout: [...any.listOf(semverStringFactory), this.latestLtsVersion, ''].join('\n')}); td - .when(this.execa.default('. ~/.nvm/nvm.sh && nvm install', {shell: true})) + .when(this.execa('. ~/.nvm/nvm.sh && nvm install', {shell: true})) .thenReturn({stdout: {pipe: () => undefined}}); }); diff --git a/test/integration/features/step_definitions/package-manager-steps.js b/test/integration/features/step_definitions/package-manager-steps.js index b3d243b2..f0f301c0 100644 --- a/test/integration/features/step_definitions/package-manager-steps.js +++ b/test/integration/features/step_definitions/package-manager-steps.js @@ -10,7 +10,7 @@ Given('an {string} lockfile exists', async function (packageManager) { await fs.writeFile(`${process.cwd()}/package-lock.json`, JSON.stringify(any.simpleObject())); td - .when(this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install'))) + .when(this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && npm install'))) .thenResolve({stdout: ''}); } @@ -18,7 +18,7 @@ Given('an {string} lockfile exists', async function (packageManager) { await fs.writeFile(`${process.cwd()}/yarn.lock`, any.string()); td - .when(this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add'))) + .when(this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add'))) .thenResolve({stdout: ''}); } diff --git a/test/integration/features/step_definitions/publishable-steps.js b/test/integration/features/step_definitions/publishable-steps.js index cafa7060..5ce929c9 100644 --- a/test/integration/features/step_definitions/publishable-steps.js +++ b/test/integration/features/step_definitions/publishable-steps.js @@ -23,5 +23,5 @@ Then('publint is configured', async function () { const {scripts} = JSON.parse(await fs.readFile(`${process.cwd()}/package.json`, 'utf-8')); assert.equal(scripts['lint:publish'], 'publint --strict'); - assertDevDependencyIsInstalled(this.execa.default, 'publint'); + assertDevDependencyIsInstalled(this.execa, 'publint'); }); diff --git a/test/integration/features/step_definitions/yarn-steps.js b/test/integration/features/step_definitions/yarn-steps.js index 442e1b87..e4c5d53f 100644 --- a/test/integration/features/step_definitions/yarn-steps.js +++ b/test/integration/features/step_definitions/yarn-steps.js @@ -17,9 +17,9 @@ Given('the yarn cli is logged in', async function () { error.stdout = JSON.stringify({}); error.command = 'npm ls husky --json'; - td.when(this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add'))).thenResolve({stdout: ''}); - td.when(this.execa.default('npm', ['ls', 'husky', '--json'])).thenResolve({stdout: JSON.stringify({})}); - td.when(this.execa.default('npm', ['ls', 'husky', '--json'])).thenReject(error); + td.when(this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add'))).thenResolve({stdout: ''}); + td.when(this.execa('npm', ['ls', 'husky', '--json'])).thenResolve({stdout: JSON.stringify({})}); + td.when(this.execa('npm', ['ls', 'husky', '--json'])).thenReject(error); }); Then('the yarn cli is configured for use', async function () { @@ -35,7 +35,7 @@ Then('the yarn cli is configured for use', async function () { assert.equal(path, 'yarn.lock'); assert.equal(this.scaffoldResult.verificationCommand, 'yarn generate:md && yarn test'); td.verify( - this.execa.default(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add')), + this.execa(td.matchers.contains('. ~/.nvm/nvm.sh && nvm use && yarn add')), {ignoreExtraArgs: true} ); }); diff --git a/thirdparty-wrappers/execa.js b/thirdparty-wrappers/execa.js deleted file mode 100644 index 22507d16..00000000 --- a/thirdparty-wrappers/execa.js +++ /dev/null @@ -1,3 +0,0 @@ -import execa from '@form8ion/execa-wrapper'; - -export default execa;