Commit Graph

2065 Commits

Author SHA1 Message Date
Matt Schile fb436e3ba0 dependency: upgrade uuid to 11.1.1 to address SNYK-JS-UUID-16133035 (#33765) 2026-05-08 14:10:23 -06:00
Chris Breiding 2d6f97f87a chore: Capture more env vars (#33766) 2026-05-08 15:56:05 -04:00
Matt Schile 599daafe50 dependency: upgrade socket.io stack to fix GHSA-677m-j7p3-52f9 (#33719) 2026-05-07 21:28:58 -06:00
Matt Schile d3b4d3780c fix(proxy): preserve Content-Length: 0 on empty proxied responses (#33754) 2026-05-07 13:15:26 -06:00
Bill Glesias d9b2be464b fix(vite-dev-server): exclude CT specs from Vite 8 JSX refresh (#33751)
* fix(vite-dev-server): exclude CT specs from Vite 8 JSX refresh

Prevents duplicate describe/it registration in headed mode when specs define
local React components (HMR self-accept). Sets oxc.jsxRefreshExclude for Vite 8.

Fixes #33750

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(vite-dev-server): scope jsxRefreshInclude so CSS is not transformed by Oxc

Pair jsxRefreshExclude with a script-only jsxRefreshInclude pattern; Vite's
createFilter(undefined, exclude) otherwise matches all non-spec assets.

Add unit tests including CSS path regression coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 12:55:45 -04:00
Matt Schile c06792f643 fix(server): retry cloud requests on HTTP 500 (#33718) 2026-05-06 08:48:14 -06:00
Matt Schile c412a65297 fix(driver): escape CSS attribute selectors to prevent runner crash (#33739) 2026-05-05 10:33:49 -06:00
Jennifer Shehane 1c1734b2e0 fix: remove cross origin window ref in spec-bridge communicator lifecycle (#33704)
* perf: updates for cross-origin window ref

* update test

* add restores to tests

* restore in tests

* reset stubs/spies

* restore in screenshot test

* remove unused API

* changelog entry

* Address cursor feedback

* fix ts-check
2026-05-05 10:36:28 -04:00
Chris Breiding dfc00fb5d3 misc: Capture additional env vars for retrying failed tests (#33714) 2026-05-01 09:49:50 -04:00
Matt Schile 810cec32dd deprecation: cy.end() deprecation (#33707) 2026-04-30 17:44:07 -06:00
Cacie Prins 922988081b chore(deps): upgrade @cypress/request to ^4.0.0 (#33712)
* chore(deps): upgrade `@cypress/request` to `^4.0.0`

* changelog
2026-04-30 14:05:34 -04:00
Cacie Prins 545556ee30 dependency(listr): upgrade listr 3.x to 9.x (#33640)
* chore(deps): upgrade listr 3.x to 9.x

* use important strings to assert install output instead of fragile snapshots

* rm unused `enquirer` dep; write cli test results

* revert persisting junit xml for now

* ensure VerboseRenderer implements LstrRenderer contract

* remove unnecessary vendorized VerboseRenderer; use behavioral assertions in verify instead of brittle snapshots

* make most `any` types in cli installer explicit; remove unused deps

* changelog

* rm trailing slash from pr link

* Update cli/lib/tasks/install.ts

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* simplify task list definitions; improve type annotations

* fix version output; improve readability of task generation

* rm unused types

* revert error handling regression

* fix implicit any

* more readability improvements; better listr mocking

* apply similar readability improvements to verify

* fix order of verify -> welcome message

* chore: skip adding the install comment on the commit (#33685)

* update axios (#33687)

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2026-04-28 15:06:42 -04:00
Cacie Prins f1592001cf chore: upgrades ts-loader to 9.5.7 (#33691)
* dependency: update ts-loader in webpack-preprocessor-batteries-included

* adds debug for ts loader rules to investigate publish binary failure

* rm extra debug

* update ts-loader in extension and server
2026-04-28 10:31:50 -06:00
Matt Schile 3442523620 fix: guard cy.wait against undefined retry responses (#33651) 2026-04-28 09:25:57 -06:00
Matt Schile 3592361a79 fix: set primary remote state before HTTP server accepts requests (#33686) 2026-04-28 09:25:22 -06:00
Matt Schile 6d29bb0f41 dependency: upgrade simple-git to 3.36.0 to fix RCE vulnerability (#33680)
* chore: upgrade simple-git to 3.36.0 to fix RCE vulnerability

Resolves Snyk SNYK-JS-SIMPLEGIT-15456078 (Critical Remote Code
Execution) in simple-git@3.33.0. The existing ^3.32.3 ranges in
packages/data-context and packages/app already cover 3.36.0, so
only a relock was needed. Carried the TasksPendingQueue static-field
patch forward to 3.36.0.
2026-04-24 16:24:58 -06:00
Ryan Manuel 002b3b7c88 fix: strip unsafe target from <base> tags to keep AUT inside Cypress frame (#33667)
* fix: strip unsafe target from <base> tags to keep AUT inside Cypress frame

A `<base target="_top">` (or `_parent`) is inherited by every untargeted
<a> and <form> on the page, so navigations escape the AUT iframe even
though the existing runtime guards only inspect each element's own
`target` attribute. Strip the attribute in both the AST and regex HTML
rewriters at proxy time, and neutralize dynamically inserted `<base>`
tags from the driver's click/submit capture-phase handlers as a backup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: match target keywords case-insensitively and always neutralize base on click

Two gaps in the driver runtime backstop for `<base target>`:

- `HTMLBaseElement.target` reflects the raw content attribute without case
  normalization, but the browser matches `_top` / `_parent` case-insensitively
  at navigation time. Lowercase the comparison so `<base target="_TOP">` is
  also neutralized.
- The click handler previously gated `neutralizeUnsafeBaseTarget` inside the
  `tagName === 'A'` check, which fails for clicks on descendants of an anchor
  (e.g. `<a><img>`). The base-target neutralization is document-scoped, so it
  must run regardless of which descendant the click lands on.

Add E2E regressions for both scenarios.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: add changelog entry for <base> target rewrite fix

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: clarify gating in <base> target changelog entry

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: make <base> target regex work under replaceStream's match re-apply

replace_stream.ts re-applies each pattern to the already-matched substring
(`match.replace(pattern, replacement)`), so any boundary char enforced via
a positive lookahead falls off the end of the match and the lookahead fails
at end-of-string — silently skipping the replacement in the stream path
while the in-memory `strip()` path still worked.

Capture the boundary char in group 2 and re-emit it via `$2` so both paths
produce identical output. Add stream-path regressions covering quoted,
single-quoted, unquoted, and self-closing <base> variants.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: reword test comments to describe behavior directly

Drop "Regression:" / test-justification framing in favor of comments that
describe the HTML or stream behavior the test exercises.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: route <base> target neutralization through handleInvalidTarget

Move neutralizeUnsafeBaseTarget into handleInvalidTarget so every caller —
same-origin submit events, anchor clicks, and the cross-origin
form.submit() patch — gets document-scoped neutralization consistently.
The anchor click handler keeps an explicit neutralize call on the
descendant-click path (where handleInvalidTarget does not run because
e.target is not the anchor itself).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test: rename driver spec from .cy.js to .cy.ts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 15:38:50 +00:00
Jennifer Shehane 40eccdb777 perf(reporter): tear down Scroller scroll listener on reset and reassignment (#33607)
* perf(reporter): tear down Scroller scroll listener on reset and reassignment

setContainer and __reset could leave multiple scroll handlers on the same
container because each setContainer added a new anonymous listener and
never called removeEventListener.
Use a stable handler plus _listenToScrolls / _stopListeningToScrolls so the
previous node is always unsubscribed before attaching to a new container,
and __reset unsubscribes before clearing state.
Add a unit test for repeated setContainer and extend the test container type
so removeEventListener is typed as a Sinon spy.

* changelog entry

* fix broken tests

* fix unit test

* move changelog
2026-04-22 11:57:25 -04:00
renovate[bot] d9147a020d dependency: update dependency cachedir to ^2.4.0 (#33608)
* fix(deps): update dependency cachedir to ^2.4.0

* empty commit

* changelog entry

* empty commit

* update changelog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2026-04-22 10:37:29 -04:00
Matt Schile f652605d31 fix: (vite-dev-server) wait for support file (#33487) 2026-04-20 11:48:09 -06:00
Matt Schile 593c22eab0 perf: dispose mocha runner on run completion to prevent memory leak on rerun (#33631) 2026-04-20 11:34:00 -06:00
Matt Schile e5f0b32dee chore: remove release dates from cli/CHANGELOG.md (#33603) 2026-04-20 08:45:00 -06:00
Ryan Manuel b3202f0ae9 fix: pass inflateRaw override to decryptResponse for large cy.prompt payloads (#33619)
* fix: pass inflateRaw override to decryptResponse for large cy.prompt payloads

The jose library caps decompressed JWE payloads at ~250KB by default. Larger
cy.prompt /plan responses (which carry cached selectors and chains) inflated
past that limit and produced DecryptionError: decryption operation failed.
Match the 5MB ceiling the services-side @packages/encryption decrypt already
configures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update CHANGELOG for version 15.14.1

Added changelog entry for version 15.14.1 with bugfix details.

* Update CHANGELOG.md

* Apply suggestion from @ryanthemanuel

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 16:18:13 -05:00
Emily Wisniewski (Rohrbough) 515a3ca709 chore: Update dates to reduce misinterpretation to non US users (#33551) 2026-04-17 10:51:34 -05:00
Bill Glesias b8a9db27d4 chore: prep Cypress for 15.14.0 release (#33616) 2026-04-16 09:53:14 -04:00
Bill Glesias acf1eef15c feat: support vite 8 for component testing (#33580) 2026-04-15 23:27:48 -04:00
Matt Schile 9f1f15e8be revert: "fix: truncate long strings in chai inspect (#33512)" (#33611) 2026-04-15 17:16:17 -06:00
Matt Schile bf2f052371 revert: "fix: stream privileged file reads over HTTP (#33538)" (#33612) 2026-04-15 16:27:00 -06:00
Adam Alston 585b0df893 fix: stream privileged file reads over HTTP (#33538) 2026-04-14 21:57:26 -06:00
Jennifer Shehane cebbc85a87 perf(driver): allowlist keys kept after log memory cleanup when tests drop out of numTestsKeptInMemory (#33601)
* perf(driver): allowlist keys kept after log memory cleanup when tests drop out of numTestsKeptInMemory

Replace blocklisted string keys with REDUCE_MEMORY_PRESERVED_KEYS so
reduceMemory nulls every other field (including custom Cypress.log data)
when tests drop out of numTestsKeptInMemory. Add vitest coverage.

* changelog entry

* remove viewportHeight and Width in cleanup

* add back some necessary keys
2026-04-14 16:48:08 -04:00
Matt Schile 8eaedab0d8 feat: TypeScript 6 compatibility for webpack preprocessor and CT wizard (#33575) 2026-04-13 15:47:30 -06:00
Matt Schile 31622bea5e dependency: update axios to 1.15.0 (#33594) 2026-04-13 15:44:27 -06:00
Adam Alston 89a16f3538 fix: truncate long strings in chai inspect (#33512) 2026-04-08 15:28:32 -06:00
Cacie Prins 68054bc591 fix: restart when .env is changed in the config file (#33567)
* fix: restart when .env is changed in the config file

* changelog
2026-04-08 15:05:20 -04:00
Bill Glesias ab6082263b chore: release cypress app 15.3.1 (#33571) 2026-04-07 10:46:58 -04:00
Craigory Coppola 44fd8b95dd perf: skip git status and git log calls in run mode (#33552) 2026-04-06 09:54:31 -06:00
Cacie Prins 28441711af dependency: Upgrade node-forge to ^1.4.0 (#33546)
* deps: node-forge

* rm from root

* changelog

* Apply suggestion from @jennifer-shehane

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2026-04-01 13:08:28 -04:00
Varun Chawla 60325bb11f fix: reject cy.intercept delay values >= 2^31 (#33377)
* fix: login attempts subsequent to a cancelled one now launch the browser and can complete (#33366)

* fix: login attempts subsequent to a cancelled one now launch the browser and can complete

* resolve cached responses with a bluebird promise instead of a native promise

* adds typedefs for @cypress/request and extends interfaces so that api/index.ts can be better typed

* correct type declaration in packages/server/lib/cloud/user.ts

* clean up ts/package.json

* changelog

* rm expect-error directive and repalce with ignore - why is driver typechecking this?

* changelog

* fix: reject cy.intercept delay values >= 2^31

setTimeout uses a signed 32-bit integer internally, so delay values
>= 2^31 (~24.8 days) are silently coerced to 1ms. This causes the
delay to be effectively ignored with no indication to the user.

Add validation in validateStaticResponse to throw a clear error
when delay >= 2^31, consistent with how throttleKbps is validated.

Fixes #33183

* fix: add changelog entry and fix lint padding

- Add changelog entry for delay validation to cli/CHANGELOG.md
- Fix padding-line-between-statements lint error (blank line after const)

* fix: use 2**31 notation instead of 2^31 and add PR link to changelog

Address review feedback: use JavaScript exponentiation notation (2**31)
instead of mathematical caret notation (2^31) in comments and changelog
to avoid confusion with JavaScript's XOR operator. Also add the missing
PR reference link in the changelog entry.

* Update CHANGELOG.md

Moves the changelog entry to 15.11.1

* Fix off-by-one error

* Update error message with regard to off-by-one

* Fix test with regard to off-by-one

* lint

* Update CHANGELOG.md

---------

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2026-04-01 09:38:44 -04:00
Jennifer Shehane 8baf7013c7 perf: trimmed config on instance test payloads instead of the full runtime object during Cloud recording (#33517)
* perf: strip values not from public config API from being sent in Cloud recording

* Add changelog entry

* Apply suggestion from @mschile

Co-authored-by: Matt Schile <mschile@cypress.io>

* Apply suggestion from @jennifer-shehane

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
2026-03-26 12:45:19 -04:00
Cacie Prins 18b67d7108 chore: release 15.13.0 (#33513) 2026-03-24 07:34:08 -04:00
Jennifer Shehane ab6a7d9b8b chore: update changelog wording (#33509) 2026-03-23 10:31:13 -04:00
Alejandro Estrada 1bf3ff8023 chore: remove experimentalPromptCommand config (#33497)
* chore: remove experimentalPromptCommand config

* Update with code review

* feat: add projectId handling in CyPromptLifecycleManager and ProjectBase

- Enhanced ProjectBase to include projectId in the context.
- Updated CyPromptLifecycleManager to utilize projectId, with fallback handling when project configuration fails.
- Added tests to verify behavior when project configuration is unavailable, ensuring fallback projectId is used correctly.

* Update with code review

* Update with code review
2026-03-22 06:52:04 -05:00
Matt Schile 6dfecdaf82 dependency: update flatted to 3.4.2 (#33501) 2026-03-20 21:04:55 -06:00
Jennifer Shehane a87bfe6429 chore: replace stop-only package with eslint mocha only rule (#33492)
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
2026-03-20 12:32:08 -04:00
mabela416 c7b0e7202b feat: studio - allow for new test to be added when focused on single test (#33481)
* display new test button in spec header in single test studio mode

* add tests

* add changelog

* remove curly braces
2026-03-17 14:54:53 -04:00
Adam Stone-Lord 18707a00d3 misc: (studio) warn user of unsaved changes when they navigate away from studio (#33457)
Co-authored-by: Matt Schile <mschile@cypress.io>
2026-03-17 13:21:17 -04:00
mabela416 6462141f85 refactor: rerun tests on unloadEvent instead of on beforeunload (#33456)
* chore: rerun tests on unloadEvent instead of on beforeunload

* update changelog

* fix changelog

* check for spec dirty data store to actually run the beforeunload clean up

* clean up _deferCleanupToUnload flag

* update changelog

* update changelog entry

* Update cli/CHANGELOG.md

Co-authored-by: Matt Schile <mschile@cypress.io>

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
2026-03-17 12:26:41 -04:00
Muaz Othman 513655cf83 dependency: remediate minimatch, serialize-javascript, and vite vulnerabilities (#33461)
* fix(deps): remediate package vulnerabilities

- Bump minimatch from 3.1.2 to 3.1.3 in data-context, driver, and
  network packages to address ReDoS vulnerability
- Add yarn resolutions to pin minimatch across transitive dependencies
  (lerna, nx, editorconfig, graphql-config, mocha, serve-handler)
- Add serialize-javascript 7.0.3 resolution to fix XSS vulnerability
- Remove obsolete socket.io-parser resolution
- Bump vite from 3.2.11 to 4.5.12 in outdated-deps test projects and
  update corresponding e2e test assertions
- Bump Angular 21 test project dependencies from ^21.0.0 to ^21.2.0

* fix(deps): pin mocha minimatch resolution to 3.1.3

- Change mocha-7.2.0/minimatch resolution from 5.1.8 to 3.1.3 since
  mocha 7.2.0 depends on minimatch ^3.0.4, which is incompatible with
  the 5.x major version. This removes the unused minimatch@5.1.8 entry
  from yarn.lock.

* docs(changelog): add entries for minimatch and serialize-javascript upgrades

- Add dependency update changelog entries for minimatch 3.1.3 and
  serialize-javascript 7.0.3 vulnerability remediations in PR #33461

* chore: update CI cache version to 03-10-2026

* docs(cli): move minimatch and serialize-javascript entries to 15.13.0

Move the minimatch and serialize-javascript dependency upgrade entries
from 15.12.0 to the pending 15.13.0 release section so they are listed
under the correct version.

Closes #33461

Made-with: Cursor
2026-03-16 14:01:14 -05:00
Matt Schile 3a942401d3 fix: throw error when connection error to dev server in run mode (#33469) 2026-03-16 10:42:35 -06:00
Cacie Prins 9a0db2bcca chore: corrects the release date in the changelog for v15.12.0 (#33474) 2026-03-16 10:48:19 -04:00