diff --git a/e2e/install.e2e.js b/e2e/install.e2e.js index e5204eac41b..168967425c6 100644 --- a/e2e/install.e2e.js +++ b/e2e/install.e2e.js @@ -1,11 +1,11 @@ -import { readFileSync, existsSync } from 'fs' +import { existsSync, readFileSync } from 'fs' import { mkdir } from 'fs/promises' import { platform } from 'os' import { join, resolve } from 'path' import { env } from 'process' import { fileURLToPath } from 'url' -import execa from 'execa' +import { execa } from 'execa' import { expect, test } from 'vitest' import { packageManagerConfig, packageManagerExists } from './utils.js' diff --git a/package-lock.json b/package-lock.json index 0d0d6c6476f..eed6ac3ae4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "env-paths": "3.0.0", "envinfo": "7.13.0", "etag": "1.8.1", - "execa": "5.1.1", + "execa": "9.1.0", "express": "4.19.2", "express-logging": "1.1.1", "extract-zip": "2.0.1", @@ -869,6 +869,41 @@ "node": ">=v14" } }, + "node_modules/@commitlint/cli/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": 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/@commitlint/cli/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@commitlint/config-conventional": { "version": "17.0.3", "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.0.3.tgz", @@ -1236,6 +1271,41 @@ "node": ">=v14" } }, + "node_modules/@commitlint/rules/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": 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/@commitlint/rules/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@commitlint/to-lines": { "version": "17.0.0", "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.0.0.tgz", @@ -5968,12 +6038,28 @@ "win32" ] }, + "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==" + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "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==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sindresorhus/slugify": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-2.2.1.tgz", @@ -12679,33 +12765,145 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.1.0.tgz", + "integrity": "sha512-lSgHc4Elo2m6bUDhc3Hl/VxvUDJdQWI40RZ4KMY9bKRc+hgMOT7II/JjbNDhI8VnMtrCb7U/fhpJIkLORZozWw==", "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": "^7.0.0", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^5.2.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" }, "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==", + "dependencies": { + "is-unicode-supported": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/get-stream": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", + "dependencies": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/human-signals": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-7.0.0.tgz", + "integrity": "sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/execa/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-unicode-supported": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz", + "integrity": "sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/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==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/pretty-ms": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.0.0.tgz", + "integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==", + "dependencies": { + "parse-ms": "^4.0.0" + }, + "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==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/execa/node_modules/strip-final-newline": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -24662,6 +24860,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/windows-release/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "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/windows-release/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/winston": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.13.0.tgz", @@ -25040,6 +25271,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yoctocolors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.0.2.tgz", + "integrity": "sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yup": { "version": "0.32.11", "resolved": "https://registry.npmjs.org/yup/-/yup-0.32.11.tgz", @@ -25603,6 +25845,31 @@ "resolve-from": "5.0.0", "resolve-global": "1.0.0", "yargs": "^17.0.0" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "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" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + } } }, "@commitlint/config-conventional": { @@ -25885,6 +26152,31 @@ "@commitlint/to-lines": "^17.0.0", "@commitlint/types": "^17.0.0", "execa": "^5.0.0" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "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" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + } } }, "@commitlint/to-lines": { @@ -28831,12 +29123,22 @@ "dev": true, "optional": true }, + "@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==" + }, "@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "@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==" + }, "@sindresorhus/slugify": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-2.2.1.tgz", @@ -33760,25 +34062,86 @@ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.1.0.tgz", + "integrity": "sha512-lSgHc4Elo2m6bUDhc3Hl/VxvUDJdQWI40RZ4KMY9bKRc+hgMOT7II/JjbNDhI8VnMtrCb7U/fhpJIkLORZozWw==", "requires": { + "@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": "^7.0.0", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^5.2.0", + "pretty-ms": "^9.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.0.0" }, "dependencies": { + "figures": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", + "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", + "requires": { + "is-unicode-supported": "^2.0.0" + } + }, + "get-stream": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", + "requires": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + } + }, + "human-signals": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-7.0.0.tgz", + "integrity": "sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==" + }, "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==" + }, + "is-unicode-supported": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz", + "integrity": "sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==" + }, + "npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "requires": { + "path-key": "^4.0.0" + } + }, + "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==" + }, + "pretty-ms": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.0.0.tgz", + "integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==", + "requires": { + "parse-ms": "^4.0.0" + } + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==" + }, + "strip-final-newline": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==" } } }, @@ -42388,6 +42751,29 @@ "integrity": "sha512-y1xFdFvdMiDXI3xiOhMbJwt1Y7dUxidha0CWPs1NgjZIjZANTcX7+7bMqNjuezhzb8s5JGEiBAbQjQQYYy7ulw==", "requires": { "execa": "^5.1.1" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "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" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + } } }, "winston": { @@ -42657,6 +43043,11 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true }, + "yoctocolors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.0.2.tgz", + "integrity": "sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==" + }, "yup": { "version": "0.32.11", "resolved": "https://registry.npmjs.org/yup/-/yup-0.32.11.tgz", diff --git a/package.json b/package.json index 6a99827b19b..daea09f4023 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "env-paths": "3.0.0", "envinfo": "7.13.0", "etag": "1.8.1", - "execa": "5.1.1", + "execa": "9.1.0", "express": "4.19.2", "express-logging": "1.1.1", "extract-zip": "2.0.1", diff --git a/scripts/prepare-for-publish.js b/scripts/prepare-for-publish.js index 1145db3bc5b..a1e2cda0b14 100644 --- a/scripts/prepare-for-publish.js +++ b/scripts/prepare-for-publish.js @@ -2,7 +2,7 @@ import { readFile, writeFile } from 'fs/promises' import { dirname, join } from 'path' import { fileURLToPath } from 'url' -import execa from 'execa' +import { execa } from 'execa' import ora from 'ora' // These scripts from package.json need to be preserved on publish diff --git a/src/commands/dev/dev-exec.ts b/src/commands/dev/dev-exec.ts index 038ab860b0a..39632049846 100644 --- a/src/commands/dev/dev-exec.ts +++ b/src/commands/dev/dev-exec.ts @@ -1,5 +1,5 @@ import { OptionValues } from 'commander' -import execa from 'execa' +import { execa } from 'execa' import { getDotEnvVariables, injectEnvVariables } from '../../utils/dev.js' import { getEnvelopeEnv, normalizeContext } from '../../utils/env/index.js' diff --git a/src/lib/exec-fetcher.ts b/src/lib/exec-fetcher.ts index 7461173c07b..754267be86a 100644 --- a/src/lib/exec-fetcher.ts +++ b/src/lib/exec-fetcher.ts @@ -63,6 +63,7 @@ export const shouldFetchLatestVersion = async ({ return false } + // @ts-expect-error TS(2339) Property 'match' does not exist on type 'never' const match = stdout.match(new RegExp(pattern)) if (!match) { return false diff --git a/src/recipes/vscode/index.ts b/src/recipes/vscode/index.ts index 3fd7be1a96b..c2c5087f435 100644 --- a/src/recipes/vscode/index.ts +++ b/src/recipes/vscode/index.ts @@ -1,7 +1,7 @@ import { join } from 'path' import { DenoBridge } from '@netlify/edge-bundler' -import execa from 'execa' +import { execa } from 'execa' import inquirer from 'inquirer' import { NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, error, log } from '../../utils/command-helpers.js' diff --git a/src/utils/execa.ts b/src/utils/execa.ts index 4c901559698..f840da02d13 100644 --- a/src/utils/execa.ts +++ b/src/utils/execa.ts @@ -1,6 +1,6 @@ import { env } from 'process' -import execaLib from 'execa' +import { execa as execaLib } from 'execa' // This is a thin layer on top of `execa` that allows consumers to provide an // alternative path to the module location, making it easier to mock its logic diff --git a/src/utils/lm/install.ts b/src/utils/lm/install.ts index b8e300a3379..d280d717af2 100644 --- a/src/utils/lm/install.ts +++ b/src/utils/lm/install.ts @@ -4,7 +4,7 @@ import path, { join, sep } from 'path' import process from 'process' import { fileURLToPath } from 'url' -import execa from 'execa' +import { execa } from 'execa' // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'hasb... Remove this comment to see the full error message import hasbin from 'hasbin' import { Listr } from 'listr2' diff --git a/src/utils/shell.ts b/src/utils/shell.ts index fbaf2b0869e..ae5fd75e210 100644 --- a/src/utils/shell.ts +++ b/src/utils/shell.ts @@ -1,6 +1,6 @@ import process from 'process' -import execa from 'execa' +import { execaCommand } from 'execa' // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'stri... Remove this comment to see the full error message import stripAnsiCc from 'strip-ansi-control-characters' @@ -54,7 +54,7 @@ const cleanupBeforeExit = async ({ exitCode }) => { export const runCommand = (command, options = {}) => { // @ts-expect-error TS(2339) FIXME: Property 'cwd' does not exist on type '{}'. const { cwd, env = {}, spinner = null } = options - const commandProcess = execa.command(command, { + const commandProcess = execaCommand(command, { preferLocal: true, // we use reject=false to avoid rejecting synchronously when the command doesn't exist reject: false, @@ -84,11 +84,8 @@ export const runCommand = (command, options = {}) => { }) } - // @ts-expect-error TS(2531) FIXME: Object is possibly 'null'. commandProcess.stdout.pipe(stripAnsiCc.stream()).on('data', pipeDataWithSpinner.bind(null, process.stdout)) - // @ts-expect-error TS(2531) FIXME: Object is possibly 'null'. commandProcess.stderr.pipe(stripAnsiCc.stream()).on('data', pipeDataWithSpinner.bind(null, process.stderr)) - // @ts-expect-error TS(2345) FIXME: Argument of type 'Writable | null' is not assignab... Remove this comment to see the full error message process.stdin.pipe(commandProcess.stdin) // we can't try->await->catch since we don't want to block on the framework server which @@ -107,8 +104,7 @@ export const runCommand = (command, options = {}) => { ) } else { const errorMessage = result.failed - ? // @ts-expect-error TS(2339) FIXME: Property 'shortMessage' does not exist on type 'Ex... Remove this comment to see the full error message - `${NETLIFYDEVERR} ${result.shortMessage}` + ? `${NETLIFYDEVERR} ${result.shortMessage}` : `${NETLIFYDEVWARN} "${command}" exited with code ${result.exitCode}` log(`${errorMessage}. Shutting down Netlify Dev server`) diff --git a/tests/integration/commands/build/build.test.js b/tests/integration/commands/build/build.test.js index ebc9c2fb707..f33955d72ae 100644 --- a/tests/integration/commands/build/build.test.js +++ b/tests/integration/commands/build/build.test.js @@ -1,7 +1,7 @@ import path from 'path' import process from 'process' -import execa from 'execa' +import { execa } from 'execa' import { describe, test } from 'vitest' import { cliPath } from '../../utils/cli-path.js' diff --git a/tests/integration/commands/deploy/deploy.test.js b/tests/integration/commands/deploy/deploy.test.js index fd1258ee0b1..7e218495a26 100644 --- a/tests/integration/commands/deploy/deploy.test.js +++ b/tests/integration/commands/deploy/deploy.test.js @@ -2,7 +2,7 @@ import path from 'path' import process from 'process' import { fileURLToPath } from 'url' -import execa from 'execa' +import { execaCommand } from 'execa' import fetch from 'node-fetch' import { afterAll, beforeAll, describe, test } from 'vitest' @@ -886,7 +886,7 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co }) .build() - await execa.command('npm install', { cwd: builder.directory }) + await execaCommand('npm install', { cwd: builder.directory }) const { deploy_url: deployUrl } = await callCli( ['deploy', '--json'], { diff --git a/tests/integration/commands/dev/dev-miscellaneous.test.js b/tests/integration/commands/dev/dev-miscellaneous.test.js index 21d8e24d62e..7872e179b7c 100644 --- a/tests/integration/commands/dev/dev-miscellaneous.test.js +++ b/tests/integration/commands/dev/dev-miscellaneous.test.js @@ -4,7 +4,7 @@ import { platform } from 'process' import { fileURLToPath } from 'url' import { setProperty } from 'dot-prop' -import execa from 'execa' +import { execa } from 'execa' import getAvailablePort from 'get-port' import jwt from 'jsonwebtoken' import fetch from 'node-fetch' diff --git a/tests/integration/commands/dev/edge-functions.test.ts b/tests/integration/commands/dev/edge-functions.test.ts index 00b65da29d8..f4fbeca8e5f 100644 --- a/tests/integration/commands/dev/edge-functions.test.ts +++ b/tests/integration/commands/dev/edge-functions.test.ts @@ -1,8 +1,8 @@ -import process from 'process' import { rename } from 'fs/promises' import { join } from 'path' +import process from 'process' -import execa from 'execa' +import { execa } from 'execa' import fetch from 'node-fetch' import { describe, expect, expectTypeOf, test } from 'vitest' diff --git a/tests/integration/commands/dev/v2-api.test.ts b/tests/integration/commands/dev/v2-api.test.ts index 450ed634ff1..3de019243ab 100644 --- a/tests/integration/commands/dev/v2-api.test.ts +++ b/tests/integration/commands/dev/v2-api.test.ts @@ -1,6 +1,6 @@ import { version } from 'process' -import execa from 'execa' +import { execa } from 'execa' import { gte } from 'semver' import { describe, expect, test } from 'vitest' diff --git a/tests/integration/commands/env/env.test.js b/tests/integration/commands/env/env.test.js index c1eba42850e..1b61aefe0f1 100644 --- a/tests/integration/commands/env/env.test.js +++ b/tests/integration/commands/env/env.test.js @@ -1,6 +1,6 @@ import process from 'process' -import execa from 'execa' +import { execa } from 'execa' import { describe, test } from 'vitest' import { callCli } from '../../utils/call-cli.js' diff --git a/tests/integration/commands/functions-create/functions-create.test.ts b/tests/integration/commands/functions-create/functions-create.test.ts index a032551ff1c..575d9dd16f5 100644 --- a/tests/integration/commands/functions-create/functions-create.test.ts +++ b/tests/integration/commands/functions-create/functions-create.test.ts @@ -2,7 +2,7 @@ import { existsSync } from 'fs' import { readFile } from 'fs/promises' import { join } from 'path' -import execa from 'execa' +import { execa } from 'execa' import { describe, expect, test } from 'vitest' import { fileExistsAsync } from '../../../../src/lib/fs.js' diff --git a/tests/integration/commands/functions-serve/functions-serve.test.js b/tests/integration/commands/functions-serve/functions-serve.test.js index ca8d5aad4ab..b63a28d12bd 100644 --- a/tests/integration/commands/functions-serve/functions-serve.test.js +++ b/tests/integration/commands/functions-serve/functions-serve.test.js @@ -1,4 +1,4 @@ -import execa from 'execa' +import { execa } from 'execa' import getPort from 'get-port' import fetch from 'node-fetch' import { describe, test } from 'vitest' diff --git a/tests/integration/commands/init/init.test.js b/tests/integration/commands/init/init.test.js index 4e7f76b9d23..9e2678876af 100644 --- a/tests/integration/commands/init/init.test.js +++ b/tests/integration/commands/init/init.test.js @@ -1,7 +1,7 @@ import { readFile } from 'fs/promises' import cleanDeep from 'clean-deep' -import execa from 'execa' +import { execa } from 'execa' import toml from 'toml' import { describe, test } from 'vitest' diff --git a/tests/integration/commands/lm/lm.test.ts b/tests/integration/commands/lm/lm.test.ts index bc67bc88dff..460b042f18f 100644 --- a/tests/integration/commands/lm/lm.test.ts +++ b/tests/integration/commands/lm/lm.test.ts @@ -2,7 +2,7 @@ import { readFile } from 'fs/promises' import os from 'os' import process from 'process' -import execa from 'execa' +import { execa, execaCommand } from 'execa' import ini from 'ini' import { describe, expect, test } from 'vitest' @@ -81,7 +81,7 @@ describe('lm command', () => { const match = cliResponse.match(/source[\s\S]+?(\/.+inc)/) if (!match) expect.fail('could not match path') const [, sourcePath] = match - const { stdout } = await execa.command(`source ${sourcePath} && git-credential-netlify version`, { + const { stdout } = await execaCommand(`source ${sourcePath} && git-credential-netlify version`, { shell: execOptions.env.SHELL, }) diff --git a/tests/integration/commands/recipes/recipes.test.js b/tests/integration/commands/recipes/recipes.test.js index a6034a06d08..735f68ab001 100644 --- a/tests/integration/commands/recipes/recipes.test.js +++ b/tests/integration/commands/recipes/recipes.test.js @@ -2,7 +2,7 @@ import { readFile } from 'fs/promises' import { resolve } from 'path' import { parse } from 'comment-json' -import execa from 'execa' +import { execa } from 'execa' import { describe, test } from 'vitest' import { callCli } from '../../utils/call-cli.js' diff --git a/tests/integration/framework-detection.test.js b/tests/integration/framework-detection.test.js index 41018cbfac7..923b4087b99 100644 --- a/tests/integration/framework-detection.test.js +++ b/tests/integration/framework-detection.test.js @@ -1,4 +1,4 @@ -import execa from 'execa' +import { execa } from 'execa' import fetch from 'node-fetch' import { describe, test } from 'vitest' diff --git a/tests/integration/telemetry.test.ts b/tests/integration/telemetry.test.ts index 7e511ab998d..0db4045d513 100644 --- a/tests/integration/telemetry.test.ts +++ b/tests/integration/telemetry.test.ts @@ -1,7 +1,7 @@ import { env as _env, version as nodejsVersion } from 'process' import type { Options } from 'execa' -import execa from 'execa' +import { execa } from 'execa' import { version as uuidVersion } from 'uuid' import { expect, test } from 'vitest' diff --git a/tests/integration/utils/call-cli.js b/tests/integration/utils/call-cli.js index 3e8f509f7a2..1fbd41ef898 100644 --- a/tests/integration/utils/call-cli.js +++ b/tests/integration/utils/call-cli.js @@ -1,4 +1,4 @@ -import execa from 'execa' +import { execaNode } from 'execa' import { cliPath } from './cli-path.js' @@ -13,7 +13,7 @@ const CLI_TIMEOUT = 3e5 * @returns {Promise} */ export const callCli = async function (args, execOptions = {}, parseJson = false) { - const { stdout } = await execa.node(cliPath, args, { + const { stdout } = await execaNode(cliPath, args, { timeout: CLI_TIMEOUT, nodeOptions: [], ...execOptions, diff --git a/tests/integration/utils/curl.js b/tests/integration/utils/curl.js index 892f54bbc3b..52368637f40 100644 --- a/tests/integration/utils/curl.js +++ b/tests/integration/utils/curl.js @@ -1,4 +1,4 @@ -import execa from 'execa' +import { execa } from 'execa' const CURL_TIMEOUT = 1e5 diff --git a/tests/integration/utils/dev-server.ts b/tests/integration/utils/dev-server.ts index 81eb02e139b..9a0f5c7a1c0 100644 --- a/tests/integration/utils/dev-server.ts +++ b/tests/integration/utils/dev-server.ts @@ -1,7 +1,7 @@ import path from 'path' import process from 'process' -import execa from 'execa' +import { execa } from 'execa' import getPort from 'get-port' import pTimeout from 'p-timeout' diff --git a/tests/integration/utils/site-builder.ts b/tests/integration/utils/site-builder.ts index 56a6bc73362..e503f2855ea 100644 --- a/tests/integration/utils/site-builder.ts +++ b/tests/integration/utils/site-builder.ts @@ -4,7 +4,7 @@ import path from 'path' import process from 'process' import slugify from '@sindresorhus/slugify' -import execa from 'execa' +import { execa } from 'execa' import serializeJS from 'serialize-javascript' import tempDirectory from 'temp-dir' import tomlify from 'tomlify-j0.4' diff --git a/tools/affected-test.js b/tools/affected-test.js index a0cd5902c97..cfcbc96cdea 100755 --- a/tools/affected-test.js +++ b/tools/affected-test.js @@ -6,7 +6,7 @@ import process from 'process' import { fileURLToPath } from 'url' import chalk from 'chalk' -import execa from 'execa' +import { execa } from 'execa' import glob from 'fast-glob' import { DependencyGraph, fileVisitor, visitorPlugins } from './project-graph/index.js' diff --git a/tools/e2e/run.js b/tools/e2e/run.js index 5f5c9540f59..160fc2c6953 100644 --- a/tools/e2e/run.js +++ b/tools/e2e/run.js @@ -3,7 +3,7 @@ import { dirname, join } from 'path' import { exit } from 'process' import { fileURLToPath } from 'url' -import execa from 'execa' +import { execa } from 'execa' import { setup } from './setup.js' diff --git a/tools/e2e/setup.js b/tools/e2e/setup.js index 8ccc6ee3d39..a1a6f78a8a1 100644 --- a/tools/e2e/setup.js +++ b/tools/e2e/setup.js @@ -4,7 +4,7 @@ import { dirname, join, normalize, sep } from 'path' import { env } from 'process' import { fileURLToPath } from 'url' -import execa from 'execa' +import { execa } from 'execa' import getPort from 'get-port' import pTimeout from 'p-timeout' import { runServer } from 'verdaccio'