* custom async retry for any async fn
* "proxied" fetch for PUT, throwing http errors
* cleans up put_fetch return types & parsing
* move protocol upload logic to put_protocol_artifact, rm upload_stream
* changelog
* changelog
* manually fix wsp in snapshot
* reorganizes a little, properly tests retryable logic
* removes 408 as a non-retriable error in unit test
* make expectation to be resolved more clear
* rm unnecessary type coercion
* changelog
* Update cli/CHANGELOG.md
* asyncRetry only throws Aggregate errors if there is more than one attempt
* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* direct copy paste of angular npm package to angular18 (no changes)
* feat: implement angular-signals test hardness to support angular signals
add changelog entry and build binary [run ci]
rename angular18 to angular-signals until we are able to merge back into core package [run ci]
fix linting job [run ci]
make sure angular-signals harness is copied to cli after build [run ci]
add project fixture directory to angular 18 and build binaries for newly named branch
run ci
update cache [run ci]
bust nx cache [run ci]
bust cache on linux [run ci]
try busting the cache... again [run ci]
usually helps when you have the correct build output... [run ci]
fix issue where component internal props were getting blown away when user would not set prop in componentProperties [run ci]
* update test harness description
* add built-in control flow tests with signals
* make sure to clean up rxjs observables in order to prevent a memory leak
* address comments from code review
* yarn lock
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* perf: improve performance of `experimentalSourceRewriting`
This change is in addition to https://github.com/benjamn/recast/pull/1399. This commit
focuses on Cypress' use of recast, with the following optimizations:
1. Avoid printing the source file again if no change was made.
Printing an AST using recast does reuse the original text, but identifying
for which parts of the AST reuse is possible comes with noticeable overhead.
By tracking changes within the visitor it becomes possible to skip this
phase entirely if no changes were made.
2. Avoid a scope lookup (`path.scope.declares(node.name)`) for all identifiers in
the program, doing it only for identifiers that may have to be rewritten.
With these changes, a 2.6MB bundle that does not need rewriting has improved
from 4.4s to 2.3s, provided that the above-mentioned recast PR has been applied.
* chore: move `experimentalSourceRewriting` release note to pending release section
---------
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* reprod browser cri crash chrome
* commit with the fix
* Add integration-like test that verifies the browser is launched with the correct arguments [run ci]
* fix: "type" action with {upArrow} and {downArrow} arguments to simulate native behavior of input[type=number]
* Add changelog entry for the fix
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* chore: update babel to latest in packages and update vite to version 5, vite related vue plugins to version 5, and svg plugin to v5
update vitejs react to v5
updated vite plugins
updates unplugin-vue-components and unplugin-icons for vite
remove vite-plugin-copmponents as it is the same thing as unplugin-vue-components
update vue-i18n from beta package to released v9
get unplugin-vue-i18n to latest
add @babel/types to no rewrite [run ci]
fix typing errors [run ci]
* update snapshot [run ci]
* coerce type for compiled messages to bridge type compatibility between unplugin-vue-i18n and vue-i18n [run ci]
* chore: update babel to latest in packages and update vite to version … (#29634)
* fix vite
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* update other hard coded @babel/core
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* [protocol] throw error verifying sig
Not throwing is surfacing as an upload error when it's a download error.
* adds system test snapshot for invalid signature
* changelog
* pending
* Update cli/CHANGELOG.md
---------
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* misc: report protocol capture afterSpec duration to cloud
* WIP: collecting afterSpec durations, TODO: system test scaffolding
* push all afterSpec timings to cloud
* push afterSpecTotal instead of afterSpec property
* changelog
* fix trailing slash in readme
* fix afterspec duration unit test
* correct return signature of afterSpec; add debug
* changelog
* Update packages/server/lib/cloud/api/index.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update packages/server/lib/cloud/protocol.ts
* fix ts check
* fix unit tests re: expected afterSpec sig
* fix return sig of protocol afterSpec stub for system tests
* use env var directly in tests for capture error codepath, rather than override var
* rm unused param
* bump cache
* changelog
* remove pending runnables duration from afterspec report
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* fix: HTTP response with invalid headers doesn't throw error #28865
When receiving the described HTTP response Cypress resets the headers.
This would cause the validateHeaderName method from node to be called
which would cause an error, since the headers where invalid.
Now Crypress verifies all the headers before reseting them,
discards invalid ones and sends a warning in the console
when debug module is on.
* fix: improved warning display to the command line
When cutting off invalid headers from the response the user
is informed of such headers in the command line
* fix: added undefined verification and catched missing error
Fixed a typescript error where validateHeaderValue was being called
with value possibly being undefined. Fixed catching missing error
where code is 'ERROR_INVALID_CHAR' and rethrows other errors
* Update cli/CHANGELOG.md
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* feat: add CT support for angular 18
* chore: update system test for angular 17 to use released version [run ci]
* chore: add ignore engines for system test install until Electron 29 update is finished
* empty commit to run ci
* fix changelog
* fix changelog
* fix: update the monorepo to typescript 5
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* run ci to see problems [run ci]
* update vue-tsc and typings that conflict with update
* regen snapshot
* fix typescript errors ui test as stack trace behavior has changed
* fix server unit tests
* update cy.origin() spec based on stack traces and code frames
* update spec to include source map url
* run ci
* fix check-ts
* chore: fix system tests [run ci]
* add preprocessor tests to batteries included to exercise new logic
* run ci
* refactor unit tests to be a bit more dry
* pin typescript to ~5.4 and adjust config to ignroe deprecations but keep importsNotUsedAsValues
* add changelog entry
* add fixme issue to stack trace mismatches inside evaled context
* use import type webpack as webpack as a lib isn't actually invboked in the runner webpack config
* fix system test as adding 4 lines of comments impacts the stack trace line 4 lines (duh)
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* feat: add option to ignore chrome preferences
* build binary on this branch
* adds explanation comment and test
* update changelog from dev
* Update packages/server/lib/browsers/chrome.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* put disableRestorePagesPrompt back in promise list in browser open
* Update cli/CHANGELOG.md
* ensure we skip writing to chrome prefs when env is set
* changelog update
* Update packages/server/lib/browsers/chrome.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* more fully ignore chrome preferences when env var is set
---------
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
* misc: Add generic types to net-stubbing for use in intercept and wait
* misc: Add changelog entry (#29507)
* misc: Revert to `any` for Interception type of multiple waits (#29507)
The nested types were apparently not supported (as written) before TypeScript ~4.1.Remove them in favour of just using `Interception<any, any>` in this overload of `wait`.
* misc: Move changelog entry (#29507)
---------
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* fix: refetch current project on geometric delay in Main.vue if config has not yet loaded
* adds test for config file load behavior in Main.vue
* changelog
* fix extraneous refetches when config is in error state
* Update packages/launchpad/src/Main.vue
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update packages/launchpad/src/Main.vue
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update cli/CHANGELOG.md
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update packages/launchpad/cypress/e2e/project-setup.cy.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update packages/launchpad/cypress/e2e/project-setup.cy.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* chore: Force deprecation of unload event
* empty commit
* use pagehide instead of unload event
* tslint
* bump cache
* some debugging
* rm debug
* comment out forced deprecation of unload - tbd how to enable
* rm more unnecessary debug
* changelog
* rename event callback from onUnload -> onPageHide
* comment on discrepency of event naming for end of page lifecycle events
* use pagehide in chrome, unload elsewhere
* comment on chromium-specific pagehide behavior
* changelog
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* feat: support vite v5 [run ci]
* make sure to use correct path in windows if no cypress public path is provided [run ci]
* update snapshot [run ci]
* update docs on devServerPublicPathRoute for vite-dev-server
* update comments
* refactor resolveConfig test
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* fix: Encode fileServerFolder to fix#25839
* fix: Encode fileServerFolder to fix#25839 add changelog
* update unit tests
* adjust CHANGELOG location
* Update packages/server/test/unit/config_spec.js
* Fix changelog entry placement
* Fix some bugs to pass the test case
* maintain a test case
* Fix changelog entry
* added integration test and updated to use encodeURI
* Update cli/CHANGELOG.md
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Matt Schile <mschile@gmail.com>
* dependency: Replace forked xvfb package with xvfb
* changelog entry
* replace call to cypress/xvfb to xvfb
* put the cypress/xvfb dep back!
* Remove xvfb package from server
* Remove changelog entry
* fix: Searching by files using digits (Fixes#29034)
When trying to search for a file using digits cypress wasn't able
to find it. Now it is able to do more complex searches with digits.
* Update cli/CHANGELOG.md
* Update changelog to new version/reword
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
* Patch node-fetch to set defaultPort based on protocol
* unit test that proper host headers are sent with fetch
* changelog
* make patch more robust
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* misc: Add tabindex to shiki code highlights so that it is accessible via the keyboard.
* Add tabindex for code preview in error-header
* Change h3 to h2 to meet a11y guidelines for incremental headers
* Add roles for landmarks
* Move navigation role to correct area
* Update main to have singular role
* update nav in banner to 'div' so there aren't 2 navs
* Have an h1 on the Global page to address a11y violation
* Fix aria-disabled attr to have valid 'true' value instead of 'disabled'
* Add changelog entry
* Fix tests that are looking for aria-disabled to now look for 'true'
* chore: fix test that's failing in npm/react test
* fix: pass all chromium flags through to Electron
* Add changelog entry
* exclude webkit from test for navigator.webdriver being true
* add debug log for switches in electron
* Fix the unit test so it passes now
* Update packages/server/lib/environment.js
Co-authored-by: Matt Schile <mschile@cypress.io>
* Update packages/server/lib/environment.js
Yes 😝 Probably why a better test would be good around this.
Co-authored-by: Matt Schile <mschile@cypress.io>
* Update packages/server/test/unit/util/chromium_flags_spec.js
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* lint fix
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* new error messages
* errors for initialization and capturing test replay
* messaging the case where no protocol instance but also no fatal error
* adds suggested remedies to initialization errors
* differentiation between network and http errors, initial work on db missing error
* improve db not found error
* add new error type to schema
* rm commented dead code
* clean up network error creation in uploadStream
* make artifact confirmation error msg more general
* test display of put instance artifacts failure
* changelog
* ensure we are displaying errors even in quiet mode
* fix pending changelog
* new snapshots for protocol errors
* improve aggregate error
* resolved html error snapshots
* fix check-ts
* fix test
* sanitize temp dir in CLOUD_PROTOCOL_CAPTURE_FAILURE error msg
* changelog
* fix double entry of certain network errors, error message prop for network errors
* fix url arg for network error
* Update packages/server/lib/cloud/artifacts/upload_artifacts.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* rm extra formatting from debug
* snapshot whitespace
* changelog update
* +pending
* Update cli/CHANGELOG.md
* resolve snapshots?
* does moving the stack trace fix whitespace in snapshots in ci?
* maybe fixes whitespace on electron now?
* fully normalize stack traces
* remove full normalization
* maybe debug stack normalization
* rm stack traces from error messages
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* fix: bump Electron to 27.3.10
* add changelog entry
* do windows builds for good measure
* temporarily set branch to publish binary with updated electron
* Update binary-integrity-check-source.js
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>