From 1b43f6d91b5d7af4f8372b8c57b1c27dc7fb2ef2 Mon Sep 17 00:00:00 2001 From: Sem Bauke Date: Fri, 15 Mar 2024 11:13:26 +0100 Subject: [PATCH] chore: delete execa (#54107) --- cypress-install.js | 23 +++++++++++++---------- package.json | 1 - pnpm-lock.yaml | 3 --- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/cypress-install.js b/cypress-install.js index 9e9838757c6..18aed3d215a 100644 --- a/cypress-install.js +++ b/cypress-install.js @@ -1,12 +1,15 @@ -const pkg = require('cypress/package.json'); -const execa = require('execa'); +const { spawn } = require('child_process'); -const version = pkg.version; +const child = spawn('pnpm', ['run', 'cypress:install'], { + stdio: 'inherit' +}); -(async () => { - console.log('Installing Cypress ' + version); - await execa('pnpm', ['run', 'cypress:install'], { - env: { CYPRESS_INSTALL_BINARY: version } - }); - console.log('Cypress installed'); -})(); +child.on('close', code => { + if (code) { + console.error('Cypress installation failed with code:', code); + } +}); + +child.on('error', error => { + console.error('Cypress installation error:', error); +}); diff --git a/package.json b/package.json index 3b07fea3e97..75457e53c15 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,6 @@ "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-testing-library": "5.11.1", - "execa": "5.1.1", "husky": "9.0.11", "jest": "29.7.0", "js-yaml": "3.14.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6add683fabf..88bc04f726a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -114,9 +114,6 @@ importers: eslint-plugin-testing-library: specifier: 5.11.1 version: 5.11.1(eslint@8.57.0)(typescript@5.2.2) - execa: - specifier: 5.1.1 - version: 5.1.1 husky: specifier: 9.0.11 version: 9.0.11