Skip to content

Commit 1614ca9

Browse files
authored
fix: Cypress no longer fails silently in develop mode when Electron immediately exits with code 1 (#32468)
* consolidate electron files into one dir * extract open() from electron.ts, add coverage, remove stderr filtering in dev env * fix build after dir mod * ... * make behavior of paths a little more predictable, add tests * changelog * inf loop * changelog * changelog * changelog * decrease expected mocha result count by 1, bc electron package had empty mocha tests * use vi.stubEnv * missed one * reduce exepected mocha result count * fix tsconfig.esm.json
1 parent acba4dc commit 1614ca9

23 files changed

+837
-245
lines changed

.circleci/workflows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ jobs:
18281828
source ./scripts/ensure-node.sh
18291829
yarn lerna run types
18301830
- sanitize-verify-and-store-mocha-results:
1831-
expectedResultCount: 19
1831+
expectedResultCount: 18
18321832

18331833
verify-release-readiness:
18341834
<<: *defaults

cli/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2+
## 15.2.1
3+
4+
_Released 9/23/2025 (PENDING)_
5+
6+
**Bugfixes:**
7+
8+
- In development mode, Electron `stderr` is piped directly to Cypress' `stderr` to make it clear why Electron failed to start, if it fails to start. Fixes [#32358](https://github.com/cypress-io/cypress/issues/32358). Addressed in [32468](https://github.com/cypress-io/cypress/pull/32468).
9+
210
## 15.2.0
311

412
_Released 9/9/2025_

cli/tsconfig.esm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"resolveJsonModule": true,
1111
"strict": true,
1212
"skipLibCheck": true,
13-
"noImplicitAny": false,
13+
"noImplicitAny": false
1414
},
1515
"include": [
16-
"lib/**/*.mts",
16+
"lib/**/*.mts"
1717
]
1818
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env node
22

3-
require('../dist/src/index.js').cli(process.argv.slice(2))
3+
require('../dist/index.js').cli(process.argv.slice(2))

packages/electron/eslint.config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ export default [
44
...baseConfig,
55
...cliOverrides,
66
{
7-
ignores: [
8-
'**/dist',
9-
'**/*.d.ts',
10-
'**/package-lock.json',
11-
'**/tsconfig.json',
12-
'**/cypress/fixtures',
13-
],
147
},
158
{
169
languageOptions: {

packages/electron/lib/electron.ts

Lines changed: 0 additions & 197 deletions
This file was deleted.

packages/electron/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@packages/electron",
33
"version": "0.0.0-development",
44
"private": true,
5-
"main": "dist/src/index.js",
5+
"main": "dist/index.js",
66
"scripts": {
77
"build": "rimraf dist && yarn build:esm && yarn build:cjs",
88
"build-binary": "node ./bin/cypress-electron --install",
@@ -12,10 +12,7 @@
1212
"postinstall": "echo '@packages/electron needs: yarn build'",
1313
"lint": "eslint",
1414
"start": "./bin/cypress-electron",
15-
"test": "yarn test-unit",
16-
"test-debug": "yarn test-unit --inspect-brk=5566",
17-
"test-unit": "mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json",
18-
"test-watch": "yarn test-unit --watch"
15+
"test": "yarn vitest"
1916
},
2017
"dependencies": {
2118
"@packages/icons": "0.0.0-development",
@@ -29,18 +26,22 @@
2926
"devDependencies": {
3027
"@electron/fuses": "1.8.0",
3128
"@electron/packager": "18.3.6",
29+
"@vitest/coverage-v8": "^3.2.4",
30+
"eslint": "^9.31.0",
3231
"execa": "4.1.0",
3332
"mocha": "3.5.3",
34-
"systeminformation": "^5.27.7"
33+
"systeminformation": "^5.27.7",
34+
"vitest": "^3.2.4"
3535
},
3636
"files": [
3737
"dist",
38-
"lib"
38+
"bin",
39+
"app"
3940
],
4041
"bin": {
4142
"cypress-electron": "./bin/cypress-electron"
4243
},
43-
"types": "dist/cjs/src/index.d.ts",
44+
"types": "dist/index.d.ts",
4445
"lint-staged": {
4546
"**/*.{js,jsx,ts,tsx}": "eslint --fix"
4647
},

0 commit comments

Comments
 (0)