Skip to content
Closed
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1e6cb9c
bump execa versions to 4.1.0
jennifer-shehane Jul 15, 2025
4ad9761
run workflows in windows
jennifer-shehane Jul 15, 2025
c2df80d
add changelog entry
jennifer-shehane Jul 15, 2025
6c02a91
Resolve to previous default shell on Windows
jennifer-shehane Jul 15, 2025
8c1cb8b
Remove duplicate 'pickMainProps'
jennifer-shehane Jul 15, 2025
3d89889
set exitCode on success
jennifer-shehane Jul 15, 2025
35c8916
cache bump
jennifer-shehane Jul 15, 2025
96dcb88
Revert "Resolve to previous default shell on Windows"
jennifer-shehane Jul 16, 2025
193191a
Revert "Remove duplicate 'pickMainProps'"
jennifer-shehane Jul 16, 2025
49930b8
Revert "set exitCode on success"
jennifer-shehane Jul 16, 2025
0ab2daa
pick out exit code from result
jennifer-shehane Jul 16, 2025
db1f7ef
Merge branch 'develop' into bump-execa-versions
jennifer-shehane Jul 16, 2025
a5577f0
Move changelog to correct version
jennifer-shehane Jul 16, 2025
953c13e
Updates for command result and default shell for windows
jennifer-shehane Jul 16, 2025
4d1b480
set back to cmd
jennifer-shehane Jul 16, 2025
96a344f
index on bump-execa-versions: 4d1b4808f9 set back to cmd
Jul 16, 2025
9790882
WIP on bump-execa-versions: 4d1b4808f9 set back to cmd
Jul 16, 2025
baa162a
index on bump-execa-versions: 4d1b4808f9 set back to cmd
Jul 16, 2025
bf3e019
WIP on bump-execa-versions: 4d1b4808f9 set back to cmd
Jul 16, 2025
c422ab5
Merge commit 'stash' into bump-execa-versions
Jul 16, 2025
53ed4be
index on bump-execa-versions: 4d1b4808f9 set back to cmd
Jul 16, 2025
0ba35d4
WIP on bump-execa-versions: 4d1b4808f9 set back to cmd
Jul 16, 2025
d4fadf2
Merge commit 'stash' into bump-execa-versions
Jul 16, 2025
e5663a5
Add debug logs for shell and exec for windows
jennifer-shehane Jul 17, 2025
5aee9b2
run server unit tests across multiple windows shells
jennifer-shehane Jul 17, 2025
a405a49
remove windows param
jennifer-shehane Jul 17, 2025
06f7e1c
try in separate jobs
jennifer-shehane Jul 17, 2025
a69e4f6
set default to bash
jennifer-shehane Jul 17, 2025
4dbfd67
Do not have shell set on linux/darwin jobs
jennifer-shehane Jul 18, 2025
7e291d1
Merge branch 'develop' into bump-execa-versions
jennifer-shehane Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

5-14-2025
7-15-2025
119 changes: 92 additions & 27 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40'
- 'bump-execa-versions'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -49,11 +49,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal:
[
'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40',
<< pipeline.git.branch >>
]
- equal: [ 'bump-execa-versions', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -64,11 +60,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal:
[
'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40',
<< pipeline.git.branch >>
]
- equal: [ 'bump-execa-versions', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -91,11 +83,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal:
[
'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40',
<< pipeline.git.branch >>
]
- equal: [ 'bump-execa-versions', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -169,7 +157,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "bump-execa-versions" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down Expand Up @@ -827,6 +815,7 @@ commands:

DEBUG=<<parameters.debug>> \
CYPRESS_CONFIG_ENV=production \
DEBUG=cypress:server:* \
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
Expand Down Expand Up @@ -1861,6 +1850,7 @@ jobs:
resource_class:
type: string
default: medium

resource_class: << parameters.resource_class >>
parallelism: 1
steps:
Expand All @@ -1871,17 +1861,81 @@ jobs:
equal: [ *darwin-arm64-executor, << parameters.executor >> ]
steps:
- run: rm -f /tmp/cypress/junit/*
- run:
name: Run server unit tests
command: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- sanitize-verify-and-store-mocha-results:
expectedResultCount: 1

windows-server-unit-tests-cloud-environment-cmd:
<<: *defaults
parameters:
<<: *defaultsParameters
resource_class:
type: string
default: medium
resource_class: << parameters.resource_class >>
parallelism: 1
steps:
- restore_cached_workspace
# this is a temporary work around while we wait for circle to resolve issues with packages
# with an @ character in windows during save_cache.
# @see https://github.com/cypress-io/cypress/issues/30343 for more details.
- when:
condition:
equal: [ *windows-executor, << parameters.executor >> ]
steps:
- run:
name: reinstall dependencies to work around cache issue (Windows only)
command: rm -rf node_modules && yarn
- run: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- run:
name: reinstall dependencies to work around cache issue (Windows only)
command: rm -rf node_modules && yarn
- run:
name: Run server unit tests (cmd.exe)
shell: cmd.exe
command: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- sanitize-verify-and-store-mocha-results:
expectedResultCount: 1

windows-server-unit-tests-cloud-environment-bash:
<<: *defaults
parameters:
<<: *defaultsParameters
resource_class:
type: string
default: medium
resource_class: << parameters.resource_class >>
parallelism: 1
steps:
- restore_cached_workspace
# this is a temporary work around while we wait for circle to resolve issues with packages
# with an @ character in windows during save_cache.
# @see https://github.com/cypress-io/cypress/issues/30343 for more details.
- run:
name: reinstall dependencies to work around cache issue (Windows only)
command: rm -rf node_modules && yarn
- run:
name: Run server unit tests (bash.exe)
shell: bash.exe
command: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- sanitize-verify-and-store-mocha-results:
expectedResultCount: 1

windows-server-unit-tests-cloud-environment-powershell:
<<: *defaults
parameters:
<<: *defaultsParameters
resource_class:
type: string
default: medium
resource_class: << parameters.resource_class >>
parallelism: 1
steps:
- restore_cached_workspace
# this is a temporary work around while we wait for circle to resolve issues with packages
# with an @ character in windows during save_cache.
# @see https://github.com/cypress-io/cypress/issues/30343 for more details.
- run:
name: reinstall dependencies to work around cache issue (Windows only)
command: rm -rf node_modules && yarn
- run:
name: Run server unit tests (powershell.exe)
shell: powershell.exe -ExecutionPolicy Bypass
command: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- sanitize-verify-and-store-mocha-results:
expectedResultCount: 1

Expand Down Expand Up @@ -3866,8 +3920,19 @@ windows-workflow: &windows-workflow
requires:
- windows-build

- server-unit-tests-cloud-environment:
name: windows-server-unit-tests-cloud-environment
- windows-server-unit-tests-cloud-environment-cmd:
executor: windows
resource_class: windows.medium
requires:
- windows-build

- windows-server-unit-tests-cloud-environment-bash:
executor: windows
resource_class: windows.medium
requires:
- windows-build

- windows-server-unit-tests-cloud-environment-powershell:
executor: windows
resource_class: windows.medium
requires:
Expand Down
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ _Released 7/30/2025 (PENDING)_

- Fixed missing support for setting an absolute path for `component.indexHtmlFile` in `@cypress/webpack-dev-server`. Fixes [#31819](https://github.com/cypress-io/cypress/issues/31819).

**Dependency Updates:**

- Updated `execa` from `1.0.0` to `4.1.0`. Addressed in [#32027](https://github.com/cypress-io/cypress/pull/32027).

## 14.5.2

_Released 7/15/2025_
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"eslint-plugin-react": "7.22.0",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-vue": "7.18.0",
"execa": "4.0.0",
"execa": "4.1.0",
"fast-xml-parser": "^4.5.1",
"filesize": "10.1.1",
"fs-extra": "9.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"dedent": "^0.7.0",
"ejs": "^3.1.10",
"endent": "2.0.1",
"execa": "1.0.0",
"execa": "4.1.0",
"front-matter": "^4.0.2",
"fs-extra": "8.1.0",
"getenv": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"bluebird": "3.5.3",
"debug": "^4.3.4",
"execa": "4.0.0",
"execa": "4.1.0",
"fs-extra": "9.1.0",
"lodash": "^4.17.21",
"plist": "3.1.0",
Expand Down
12 changes: 9 additions & 3 deletions packages/server/lib/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Promise = require('bluebird')
const execa = require('execa')
const shellEnv = require('shell-env')
const _ = require('lodash')
const log = require('./log')
const log = require('debug')('cypress:server:exec')
const utils = require('./util/shell')

const pickMainProps = (val) => _.pick(val, ['stdout', 'stderr', 'code'])
Expand Down Expand Up @@ -32,15 +32,21 @@ module.exports = {
log('and is running command:', options.cmd)
log('in folder:', projectRoot)

return execa.shell(cmd, { cwd, env, shell })
return execa(cmd, { cwd, env, shell })
.then((result) => {
// do we want to return all fields returned by execa?
result.shell = shell
result.cmd = cmd
result.code = result.exitCode

return result
}).then(pickMainProps)
.catch(pickMainProps) // transform rejection into an object
.catch((result) => {
result.code = result.exitCode

return result
})
.then(pickMainProps) // transform rejection into an object
.then(trimStdio)
}

Expand Down
6 changes: 3 additions & 3 deletions packages/server/lib/util/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Promise = require('bluebird')
const execa = require('execa')
const os = require('os')
const commandExistsModule = require('command-exists')
const log = require('../log')
const log = require('debug')('cypress:server:util:shell')

const isWindows = () => {
return os.platform() === 'win32'
Expand Down Expand Up @@ -69,7 +69,7 @@ const sourceShellCommand = function (cmd, shell) {
}

const findBash = () => {
return execa.shell('which bash')
return execa('which bash', { shell: true })
.then((val) => val.stdout)
}

Expand All @@ -89,7 +89,7 @@ const getShell = function (shell) {
if (isWindows()) {
log('use default shell on Windows')

return Promise.resolve()
return Promise.resolve('cmd.exe')
}

return findBash()
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"electron-context-menu": "3.6.1",
"errorhandler": "1.5.1",
"evil-dns": "0.2.0",
"execa": "1.0.0",
"execa": "4.1.0",
"express": "4.21.0",
"fetch-retry-ts": "^1.3.1",
"find-process": "1.4.7",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/test/scripts/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ console.log('specfiles:', run)
console.log('test command:')
console.log(cmd)

const child = execa.shell(cmd, { env, stdio: 'inherit' })
const child = execa(cmd, { shell: true, env, stdio: 'inherit' })

child.on('exit', (code, signal) => {
child.on('exit', (exitCode, signal) => {
if (signal) {
console.error(`tests exited with signal ${signal}`)
}

process.exit(code === null ? 1 : code)
process.exit(exitCode === null ? 1 : exitCode)
})
6 changes: 4 additions & 2 deletions packages/server/test/unit/util/suppress_warnings_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const SUPPRESS_WARNING = `require('${__dirname}/../../../lib/util/suppress_warni

describe('lib/util/suppress_warnings', function () {
it('tls.connect emits warning if NODE_TLS_REJECT_UNAUTHORIZED=0 and not suppressed', function () {
return execa.shell(`node -e "${TLS_CONNECT}"`, {
return execa(`node -e "${TLS_CONNECT}"`, {
shell: true,
env: {
'NODE_TLS_REJECT_UNAUTHORIZED': '0',
},
Expand All @@ -22,7 +23,8 @@ describe('lib/util/suppress_warnings', function () {

it('tls.connect does not emit warning if NODE_TLS_REJECT_UNAUTHORIZED=0 and suppressed', function () {
// test 2 sequential tls.connects
return execa.shell(`node -e "${SUPPRESS_WARNING} ${TLS_CONNECT} ${TLS_CONNECT}"`, {
return execa(`node -e "${SUPPRESS_WARNING} ${TLS_CONNECT} ${TLS_CONNECT}"`, {
shell: true,
env: {
'NODE_TLS_REJECT_UNAUTHORIZED': '0',
},
Expand Down
2 changes: 1 addition & 1 deletion system-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"dedent": "^0.7.0",
"dockerode": "3.3.1",
"esbuild": "^0.15.3",
"execa": "4",
"execa": "4.1.0",
"express": "4.21.0",
"express-session": "1.16.1",
"express-useragent": "1.0.15",
Expand Down
Loading
Loading