Skip to content

Commit 4c0c949

Browse files
committed
breaking: update execa from 1.0.0 to 4.1.0 which breaks the yielded cy.exec() object from yielding property code and instead yields exitCode
1 parent f3c1164 commit 4c0c949

File tree

18 files changed

+53
-60
lines changed

18 files changed

+53
-60
lines changed

.circleci/cache-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Bump this version to force CI to re-create the cache from scratch.
2-
8-7-2025
2+
8-13-2025

.circleci/workflows.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
3838
- /^release\/\d+\.\d+\.\d+$/
3939
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
4040
- 'update-v8-snapshot-cache-on-develop'
41-
- 'mabel/issue-10425-studio-redesign'
41+
- 'breaking/update_execa'
4242

4343
# usually we don't build Mac app - it takes a long time
4444
# but sometimes we want to really confirm we are doing the right thing
@@ -49,7 +49,7 @@ macWorkflowFilters: &darwin-workflow-filters
4949
- equal: [ develop, << pipeline.git.branch >> ]
5050
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
5151
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
52-
- equal: [ 'feat/support_vite_7', << pipeline.git.branch >> ]
52+
- equal: [ 'breaking/update_execa', << pipeline.git.branch >> ]
5353
- equal: [ 'chore/test_cypress_recipes_15', << pipeline.git.branch >> ]
5454
- equal: [ 'mabel/issue-31677-reporter-redesign', << pipeline.git.branch >> ]
5555
- matches:
@@ -62,7 +62,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
6262
- equal: [ develop, << pipeline.git.branch >> ]
6363
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
6464
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
65-
- equal: [ 'feat/support_vite_7', << pipeline.git.branch >> ]
65+
- equal: [ 'breaking/update_execa', << pipeline.git.branch >> ]
6666
- matches:
6767
pattern: /^release\/\d+\.\d+\.\d+$/
6868
value: << pipeline.git.branch >>
@@ -85,7 +85,7 @@ windowsWorkflowFilters: &windows-workflow-filters
8585
- equal: [ develop, << pipeline.git.branch >> ]
8686
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
8787
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
88-
- equal: [ 'feat/support_vite_7', << pipeline.git.branch >> ]
88+
- equal: [ 'breaking/update_execa', << pipeline.git.branch >> ]
8989
- matches:
9090
pattern: /^release\/\d+\.\d+\.\d+$/
9191
value: << pipeline.git.branch >>
@@ -159,7 +159,7 @@ commands:
159159
name: Set environment variable to determine whether or not to persist artifacts
160160
command: |
161161
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
162-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mabel/issue-10425-studio-redesign" ]]; then
162+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "breaking/update_execa" ]]; then
163163
export SHOULD_PERSIST_ARTIFACTS=true
164164
fi' >> "$BASH_ENV"
165165
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
@@ -2491,6 +2491,7 @@ jobs:
24912491
- restore_cached_workspace
24922492
- clone-repo-and-checkout-branch:
24932493
repo: cypress-example-kitchensink
2494+
pull_request_id: 983
24942495
- install-required-node
24952496
- run:
24962497
name: Install prod dependencies
@@ -2512,6 +2513,7 @@ jobs:
25122513
- restore_cached_workspace
25132514
- clone-repo-and-checkout-branch:
25142515
repo: cypress-example-kitchensink
2516+
pull_request_id: 983
25152517
- install-required-node
25162518
- run:
25172519
name: Install prod dependencies
@@ -2763,20 +2765,23 @@ jobs:
27632765
- test-binary-against-repo:
27642766
repo: cypress-example-kitchensink
27652767
browser: electron
2768+
pull_request_id: 983
27662769

27672770
test-binary-against-kitchensink-firefox:
27682771
<<: *defaults
27692772
steps:
27702773
- test-binary-against-repo:
27712774
repo: cypress-example-kitchensink
27722775
browser: firefox
2776+
pull_request_id: 983
27732777

27742778
test-binary-against-kitchensink-chrome:
27752779
<<: *defaults
27762780
steps:
27772781
- test-binary-against-repo:
27782782
repo: cypress-example-kitchensink
27792783
browser: chrome
2784+
pull_request_id: 983
27802785
executor: << parameters.executor >>
27812786

27822787
test-binary-against-todomvc-firefox:

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ _Released 08/12/2025 (PENDING)_
1313
- In order to better align with best practices, `@cypress/webpack-batteries-included-preprocessor` no longer includes certain browser built-ins that were automatically provided by Webpack 4. The removed built-ins are `assert`, `constants`, `crypto`, `domain`, `events`, `http`, `https`, `punycode`, `querystring`, `string_decoder`, `sys`, `timers`, `tty`, `url`, `util`, `vm`, and `zlib`. However, we know that certain built-ins are popular, given that many users have files that are shared between their Cypress tests and node context. Because of this, `@cypress/webpack-batteries-included-preprocessor` will ship with built-in support for `buffer`, `path`, `process`, `os`, and `stream`. If there is a built-in that isn't supported by default and you need to add support, please refer to the Webpack [resolve.fallback](https://webpack.js.org/configuration/resolve/#resolvefallback) documentation and the [`@cypress/webpack-batteries-included-preprocessor` README](../npm/webpack-batteries-included-preprocessor/README.md). Addresses [#31039](https://github.com/cypress-io/cypress/issues/31039).
1414
- The application under test's `pagehide` event in Chromium browsers will no longer trigger Cypress's `window:unload` event. Addressed in [#31853](https://github.com/cypress-io/cypress/pull/31853).
1515
- The `Cypress.SelectorPlayground` API has been renamed to `Cypress.ElementSelector`. This API was renamed to accommodate its use for defining `selectorPriority` in Cypress Studio and our future [`cy.prompt` release](https://on.cypress.io/cy-prompt-early-access?utm_source=docs&utm_medium=app-changelog&utm_content=cy-prompt-release). Additionally, the `getSelector` method and the `onElement` option of `defaults` were removed from this API. Addresses [#31801](https://github.com/cypress-io/cypress/issues/31801). Addressed in [#31889](https://github.com/cypress-io/cypress/pull/31889) and [#32098](https://github.com/cypress-io/cypress/pull/32098).
16+
- Updates `execa` from `1.0.0` to `4.1.0`. This changes the properties return by [`cy.exec()`](https://docs.cypress.io/api/commands/exec) where `code` is now renamed to `exitCode`. Addressed in [#32238](https://github.com/cypress-io/cypress/pull/32238).
1617
- **Component Testing breaking changes:**
1718
- Removed support for Angular 17. The minimum supported version is now `18.0.0`. Addresses [#31303](https://github.com/cypress-io/cypress/issues/31303).
1819
- `@cypress/angular` now requires a minimum of `zone.js` `0.14.0`. Addresses [#31582](https://github.com/cypress-io/cypress/issues/31582).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
"eslint-plugin-react": "7.22.0",
155155
"eslint-plugin-react-hooks": "4.2.0",
156156
"eslint-plugin-vue": "7.18.0",
157-
"execa": "4.0.0",
157+
"execa": "4.1.0",
158158
"fast-xml-parser": "^4.5.1",
159159
"filesize": "10.1.1",
160160
"fs-extra": "9.1.0",

packages/data-context/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"dedent": "^0.7.0",
3737
"ejs": "^3.1.10",
3838
"endent": "2.0.1",
39-
"execa": "1.0.0",
39+
"execa": "4.1.0",
4040
"front-matter": "^4.0.2",
4141
"fs-extra": "8.1.0",
4242
"get-tsconfig": "4.10.0",

packages/driver/cypress/e2e/commands/exec.cy.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { assertLogLength } = require('../../support/utils')
22
const { _, Promise } = Cypress
33

44
describe('src/cy/commands/exec', () => {
5-
const okResponse = { code: 0 }
5+
const okResponse = { exitCode: 0 }
66

77
context('#exec', {
88
execTimeout: 2500,
@@ -302,7 +302,7 @@ describe('src/cy/commands/exec', () => {
302302

303303
describe('when error code is non-zero', () => {
304304
it('throws error that includes useful information and exit code', (done) => {
305-
Cypress.backend.resolves({ code: 1 })
305+
Cypress.backend.resolves({ exitCode: 1 })
306306

307307
cy.on('fail', (err) => {
308308
expect(err.message).to.contain('`cy.exec(\'ls\')` failed because the command exited with a non-zero code.\n\nPass `{failOnNonZeroExit: false}` to ignore exit code failures.')
@@ -316,7 +316,7 @@ describe('src/cy/commands/exec', () => {
316316
})
317317

318318
it('throws error that includes stderr if it exists and is non-empty', (done) => {
319-
Cypress.backend.resolves({ code: 1, stderr: 'error output', stdout: '' })
319+
Cypress.backend.resolves({ exitCode: 1, stderr: 'error output', stdout: '' })
320320

321321
cy.on('fail', (err) => {
322322
expect(err.message).to.contain('Stderr:\nerror output')
@@ -329,7 +329,7 @@ describe('src/cy/commands/exec', () => {
329329
})
330330

331331
it('throws error that includes stdout if it exists and is non-empty', (done) => {
332-
Cypress.backend.resolves({ code: 1, stderr: '', stdout: 'regular output' })
332+
Cypress.backend.resolves({ exitCode: 1, stderr: '', stdout: 'regular output' })
333333

334334
cy.on('fail', (err) => {
335335
expect(err.message).to.contain('\nStdout:\nregular output')
@@ -342,7 +342,7 @@ describe('src/cy/commands/exec', () => {
342342
})
343343

344344
it('throws error that includes stdout and stderr if they exists and are non-empty', (done) => {
345-
Cypress.backend.resolves({ code: 1, stderr: 'error output', stdout: 'regular output' })
345+
Cypress.backend.resolves({ exitCode: 1, stderr: 'error output', stdout: 'regular output' })
346346

347347
cy.on('fail', (err) => {
348348
expect(err.message).to.contain('\nStdout:\nregular output\nStderr:\nerror output')
@@ -355,7 +355,7 @@ describe('src/cy/commands/exec', () => {
355355

356356
it('truncates the stdout and stderr in the error message', (done) => {
357357
Cypress.backend.resolves({
358-
code: 1,
358+
exitCode: 1,
359359
stderr: `${_.range(200).join()}stderr should be truncated`,
360360
stdout: `${_.range(200).join()}stdout should be truncated`,
361361
})
@@ -381,7 +381,7 @@ describe('src/cy/commands/exec', () => {
381381
expect(Yielded).to.deep.eq({
382382
stdout: 'foo',
383383
stderr: '',
384-
code: 1,
384+
exitCode: 1,
385385
})
386386

387387
done()
@@ -392,7 +392,7 @@ describe('src/cy/commands/exec', () => {
392392

393393
describe('and failOnNonZeroExit is false', () => {
394394
it('does not error', () => {
395-
const response = { code: 1, stderr: 'error output', stdout: 'regular output' }
395+
const response = { exiCode: 1, stderr: 'error output', stdout: 'regular output' }
396396

397397
Cypress.backend.resolves(response)
398398

packages/driver/cypress/e2e/e2e/origin/commands/misc.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ context('cy.origin misc', { browser: '!webkit' }, () => {
9393
expect(consoleProps.name).to.equal('exec')
9494
expect(consoleProps.type).to.equal('command')
9595
expect(consoleProps.props['Shell Used']).to.be.undefined
96-
expect(consoleProps.props.Yielded).to.have.property('code').that.equals(0)
96+
expect(consoleProps.props.Yielded).to.have.property('exitCode').that.equals(0)
9797
expect(consoleProps.props.Yielded).to.have.property('stderr').that.equals('')
9898
expect(consoleProps.props.Yielded).to.have.property('stdout').that.equals('foobar')
9999
})

packages/driver/src/cy/commands/exec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default (Commands, Cypress, cy) => {
6363
consoleOutput['Shell Used'] = result.shell
6464
}
6565

66-
if ((result.code === 0) || !options.failOnNonZeroExit) {
66+
if ((result.exitCode === 0) || !options.failOnNonZeroExit) {
6767
return result
6868
}
6969

@@ -79,7 +79,7 @@ export default (Commands, Cypress, cy) => {
7979

8080
return $errUtils.throwErrByPath('exec.non_zero_exit', {
8181
onFail: options._log,
82-
args: { cmd, output, code: result.code },
82+
args: { cmd, output, code: result.exitCode },
8383
})
8484
})
8585
.catch(Promise.TimeoutError, { timedOut: true }, () => {

packages/frontend-shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"cypress-real-events": "1.14.0",
7575
"dayjs": "^1.9.3",
7676
"dedent": "^0.7.0",
77-
"execa": "4.0.0",
77+
"execa": "4.1.0",
7878
"fake-uuid": "^1.0.0",
7979
"floating-vue": "2.0.0-beta.17",
8080
"fs-extra": "9.1.0",

packages/launcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"bluebird": "3.5.3",
1919
"debug": "^4.3.4",
20-
"execa": "4.0.0",
20+
"execa": "4.1.0",
2121
"fs-extra": "9.1.0",
2222
"lodash": "^4.17.21",
2323
"plist": "3.1.0",

0 commit comments

Comments
 (0)