Commit Graph

7172 Commits

Author SHA1 Message Date
Bill Glesias 2e81887764 chore: make the @packages/config an independent bundle without needed ts-node to register entrypoint. Both ESM and CJS distributions are built and types are used as source to be compatible with older styles of commonjs bundling. Types are not shipped with the package. (#32612) 2025-10-01 15:49:17 -04:00
Bill Glesias bb8d9aebda chore: make the @packages/errors an independent bundle without needed ts-node to register entrypoint. Both ESM and CJS distributions are built and types are used as source to be compatible with older styles of commonjs bundling. Types are not shipped with the package. (#32610) 2025-10-01 15:45:44 -04:00
Bill Glesias 2cf1b06bf6 chore: make the @packages/types an independent bundle without needed ts-node to register entrypoint. Both ESM and CJS distributions are built and types are used as source to be compatible with older styles of commonjs bundling. Types are not shipped with the package. (#32608) 2025-10-01 15:41:08 -04:00
Bill Glesias 504b153005 chore: convert @packages/data-context from mocha to jest (#32598)
* start jest conversion and covnert authaction to jest

* chore: conver codegenaction to jest

* chore: convert cohorts action spec to vitest

* chore: convert dataEmitterActions to jest

* chore: convert event collector action to vitest

* chore: convert local settings action spec tojest

* chore: convert notification action to vitest

* chor: convert project actions to vitest and fix pretty-formnat

* chore: convert code-generator spec to jest

* chore: convert spec options spec to jest

* chore: convert project config ipc to jest

* chore: convert projectconfigmanager tests to jest

* chore: convert project lifecycle manager tests to jest

* chore: conver poller spec to jest

* chore: convert browser data source to jest

* chore: convert cloud dats source to jest

* chore: convert gitdatasource unit tests to jest

* chore: convert FileDataSource to jest

* chore: convert git data source to jest

* chore: convert graphql data source to jest

* chore: convert project data source to jest

* chore: convert revelvant runs data source to jest

* chore: convert relevant run specs data source to jest

* chore: convert remote request data source to jest

* chore: convert versions data source spec to jest

* chore: convert wizard data source spec to jest

* chore: convert document node builder to jest

* chore: convert has TypeScript to jest

* chore: convert test counts spec to jest

* chore: convert weighted choice spec to jest

* chore: convert config file updater to jest

* clean up files to allow tests to run in band but out of order, add README, cleanup unused scripts and dependencies

* fix deprecation warning from ts-jest via isolated modules

* chore: adjust expected result count

* chore: clean up types

* turn back on no implicit any and reinstall graphql package in frontend shared

* fix isFocusSupported mock

* chore: copy over the old data-context-helper into the server as the one in the data-context package is written in jest now

* chore: fix code review findings from cursor

* fix incorrect expect async throw

* chore: remove use of this in projectData source

* add docs to copied data-context helper and fix cursor detected issue
2025-09-30 17:16:17 -04:00
Bill Glesias f9c3f75563 chore: bundle the root package.json as an installable package (#32544)
* chore: bundle the root package.json as an installable package

* Update packages/root/README.md

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* Update guides/esm-migration.md

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* Update packages/root/README.md

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-09-30 17:15:18 -04:00
Ryan Manuel 96bd60de6b fix: ensure that code frames within cy.origin point to the right line of the code (#32597)
* fix: ensure that code frames within cy.origin point to the right line of the code

* additional tests

* additional tests

* changelog

* Apply suggestions from code review

* Update system-tests/projects/e2e/cypress/e2e/cy_origin_error.cy.ts

* fix tests

* fix tests

* clean up
2025-09-30 14:46:24 -05:00
Jennifer Shehane e1d92bfb28 chore: Removed unused / no longer needed errors (#32595)
* chore: Removed unused / no longer needed errors

* removed unused variables
2025-09-30 14:45:24 -04:00
Bill Glesias d048e46bc7 chore: convert @packages/scaffold-config tests from mocha to vitest (#32568)
* chore: start vitest conversion and convertsupportFile to vitest

* chore: convert frameworks spec to vitest

* chore: convert detect spec to vitest

* chore: convert ct-detect-third-party spec to vitest

* chore: convert component index template to vitest

* chore: clean up scaffold-config as tests are now converted to vitest

* fix issue where projectRoot was passed inncorrectly in test
2025-09-29 19:47:59 -04:00
Matt Schile 942a71f0cd misc: fix studio panel resizing when dragging (#32584) 2025-09-29 14:58:24 -06:00
Bill Glesias cef5820ba9 chore: convert telemetry tests from mocha to vitest (#32577)
* chore: start vitest conversion

* convert githubActionsDetectorSync to vitest

* chore: convert on start span processor to vitest

* chore: convert cloud span exporter to vitest

* convert trace link exporter to vitest

* chore: convert ipc span exporter tests to vitest

* chore: convert websocket span exporter to vitest

* chore: convert browser spec to vitest

* chore: convert index spec to vitest

* chore: convert node spec to vitest

* clean up telemetry package after vite conversion

* add missing import

* change assertions to be not.toBeUndefined() to toBeDefined()

* correctly pack config

* chore: stub out the @opentelemetry/exporter-trace-otlp-http
2025-09-29 13:21:19 -04:00
Adam Stone-Lord 0ad725dc88 chore: (studio) AI status updates (#32511) 2025-09-29 12:21:27 -04:00
Bill Glesias b81c5a0a8e chore: convert tests in @packages/errors from mocha to vitest (#32572)
* start vitest convertion and convert errors spec to vitest

* chore: convert errTemplate to vitest

* convert stripIndent to vitest

* convert the visualsnapshoterrors spec to vitest

* chore: clean up errors package, update guide, and move snapshots

* move tests out of unit test directory as most tests are integration tests

* add to esm checklist and update workflow

* clean build and rebuild after test due to CI having built files

* Chore: fix bad test assertion in error spec

* Update guides/esm-migration.md

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

* chore: remove unused FIREFOX_CDP_FAILED_TO_CONNECT error as it is no longer used and likely missed with the CDP removal for Firefox

* chore: fix missed imports

* remove system test code to check for CDP error in firefox

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-09-29 11:37:07 -04:00
Cacie Prins 48c2ba28e7 chore: upgrade cli eslint to 9 (#32446)
* chore: replace dtslint with eslint-plugin-expect-type

* update guide

* add lint-staged

* rm stale script

* modify cli eslint and tsconfigs to support ts migration

* separate expect-type files

* modifications to tsconfigs to make eslint a little easier

* revert workflow.yml

* further revision

* put tslint config for dtslint back in

* ensure false negative case is tested

* correct tsconfigs

* align dtslint tsconfig with eslint 9 config

* consolidate / DRY tsconfigs
2025-09-26 11:16:42 -04:00
Bill Glesias 9da952a64e chore: convert @packages/config tests to vitest from mocha (#32539)
* start vitest conversion

* convert utils to vitest

* convert index spec to vitest

* chore: convert utils spec to vitest

* chore: convert addToCypressConfig spect to vitest

* add plugin tests to vitest config

* chore: convert validation to vitest

* chore: clean up scripts after vitest conversion

* chore: remove check-more-types

* adjust expected mocha results to 17 and update esm migration
2025-09-25 15:42:03 -04:00
Bill Glesias cb6e509607 chore: combine the graphql package into the data-context package to avoid a cyclical dependency (#32566) 2025-09-25 15:40:24 -04:00
Cacie Prins 8755160a68 feat: escape key for cy.press (#32545)
* feat: escape key for cy.press

* changelog

* on-link to cy.press() in changelog
2025-09-23 10:48:12 -04:00
Bill Glesias 7d5fd90721 fix: incorrect loading of ESM based configurations (#32515)
* add regression test

* fix: make sure esm configs are indeed loaded as ESM
2025-09-22 11:03:34 -04:00
kurekszymon a4b03b424c misc: make runnable headers semi-bold font weight (600) (#32491)
* chore: make runnable headers semi-bold font weight (600)

* changelog entry

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2025-09-22 10:32:53 -04:00
kurekszymon 9367b4345b misc: remove border-bottom if test is isolated in studio mode (#32492) 2025-09-19 07:59:22 -06:00
Mike McCready e6e5ddb7f5 chore(deps): update dependency cypress-example-kitchensink to 5.1.2 (#32520) 2025-09-18 11:12:44 -04:00
renovate[bot] 689b2b26cd dependency: update dependency electron to v36.8.1 (#32371)
* chore(deps): update dependency electron to v36.8.1

* bump node version

* update workflow files + publish-binary script

* bump base-internal images

* remove current node version from additional test

* bump circleci cache

* allow node_version env var

* Update .circleci/workflows.yml

* index on renovate/electron-36.x: 95d10b1d53 Merge branch 'develop' into renovate/electron-36.x

* index on renovate/electron-36.x: 95d10b1d53 Merge branch 'develop' into renovate/electron-36.x

* index on renovate/electron-36.x: 95d10b1d53 Merge branch 'develop' into renovate/electron-36.x

* bump types/node

* update some node versions

* update integrity check and electron instrcutions

* correctly call net.family with net family type

* Revert "correctly call net.family with net family type"

This reverts commit 505ff949a8.

* update location of note types

* more clearly type frame

* fix type issues in agent.ts file

* fix agent call

* replace proxyquire in webpack-dev-server package

* add 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>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
2025-09-18 10:32:19 -04:00
Alejandro Estrada d528fcae69 misc: Update grouping styles (#32521)
* misc: Update grouping styles

* Update changelog

* Update CHANGELOG for misc changes

* Update cli/CHANGELOG.md

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-09-17 16:36:15 -04:00
Ryan Manuel c0c1f2e22a chore: fix contributor pr workflow with ipv6 tests - take 2 (#32509)
* Revert "chore: fix contributor pr workflow with ipv6 tests (#32500)"

This reverts commit ef566b28ae.

* chore: fix contributor pr workflow with ipv6 tests
2025-09-16 17:36:46 -05:00
Adam Alston ca9a5239b0 chore(wait): add types and fix issues flagged by types (#32332)
* chore(wait): add types and fix issues flagged by types

* refactor: create shallow copy of aliases

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2025-09-16 14:50:33 -04:00
Ryan Manuel ef566b28ae chore: fix contributor pr workflow with ipv6 tests (#32500)
* chore: fix contributor pr workflow with ipv6 tests

* rename
2025-09-16 10:22:31 -05:00
Cacie Prins 1614ca9c94 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
2025-09-15 14:19:17 -04:00
Cacie Prins acba4dc487 chore: vitest project config (#32447)
* chore: align on vitest versions across the repo, add project vitest config

* Apply suggestion from @cacieprins

* Apply suggestion from @cacieprins

* Apply suggestion from @cacieprins

* Apply suggestion from @cacieprins

* Update package.json

* lockfile, align vite with vitest

* add vitest configs to pkgs that were missing it

* update build scripts

* fix test pattern for vite-dev-server

* correct the path for packages/types tests

* downgrade vite-dev-server to vitest 2
2025-09-15 12:53:12 -04:00
renovate[bot] 387a2d8264 chore(deps): update dependency rimraf to v6 (#32448)
* chore(deps): update dependency rimraf to v6

* empty commit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2025-09-12 14:53:18 -04:00
Bill Glesias 484b177fb5 chore: update tsx to 4.20.5 and set minimum node 20 to 20.1.0 (#32469) 2025-09-12 12:12:17 -04:00
Jennifer Shehane 8d72119891 chore: remove css element queries from reporter (#32461)
* remove css element queries from reporter

* empty commit
2025-09-10 11:48:23 -04:00
Ahmed Ashour 02fb097558 chore: add --glob to rimraf command (#32444)
* chore: add --glob to rimraf command

* Quote the glob pattern.
2025-09-08 16:09:37 -04:00
Jennifer Shehane 9f0e71fced chore: Update styles in runner to not be fractional + only update scrollbar style if value has changed (#32437)
* chore: set debug verbose on stderr-filtering logs

* fix: spike into resize observer fix

* only commit resizeobserver protection

* prevent fractional numbers in iframe styles

* some other changes

* undo irrelevant changes

* undo verbose

* remove console
2025-09-08 11:09:54 -04:00
Brian Mann a07062d13e fix(dns-cache): prevent local family cache collisions (#32403)
* bump node types

* add network tests to terminals

* dont use the web-config, just use regular TS so that it compiles much faster and line numbers work

* fix missing promise

* cache families to include host + port; fix types

* fix incorrect cacheKey

* fix skipped tests and updated error messages likely due to node upgrade

* cleanup a ton of test context

* Add changelog entry

* close servers after each test

* Update packages/network/lib/agent.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* update tests to pass inside + outside of docker

* try this in docker

* try to enable ipv6 in circleci docker config

* escape

* dont run this test in CI

* revert

* skip the other test

* maybe this works

* try this

* Update .circleci/workflows.yml

* oops

* i do not think we need sudo

* test

* test

* try machine

* refactor

* that was weird

* that was weird

* mess with daemon and sudo

* escape <

* modify /etc/hosts

* Update .circleci/workflows.yml

* Update .circleci/workflows.yml

* Update .circleci/workflows.yml

* remove dead code

* Update branch condition in CircleCI workflow

* Update .circleci/workflows.yml

* clean up

* clean up

* fix cy in cy tests

* fix cy in cy

* Update packages/server/lib/server-base.ts

---------

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2025-09-08 10:02:16 -05:00
Cacie Prins 9ebdddad9e chore: Migrate @packages/electron to TS (#32417)
* migrates electron pkg to typescript

* build multi platform binaries on this branch

* Update packages/electron/BUILD.md

* Update packages/electron/BUILD.md

* Update packages/electron/BUILD.md

* update docs

* lint

* Update .circleci/workflows.yml

* Update .circleci/workflows.yml

* fix inverted fuse logic

* convert buffer to Uint8Array before hashing

* use pipeline to simplify

* fix ide error display of disabled rule

* rm redundant md

* fix error handling / exit code

* update docs for cli params

* fix async try/catch

* re-apply obfuscated requires ...

* improve readability, correct debug output regarding access vs stat

* flip fuses the right way again

* move back to some fs-extra, clean up dist a little better

* correct normalization for paths

* icons path

* exit(1) on electron signal>=1

* Update packages/electron/lib/electron.ts

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

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2025-09-08 10:15:25 -04:00
Adam Stone-Lord 4671317eb1 feat: (studio) support @cypress/grep package in Cypress Studio (#32311)
Co-authored-by: Matt Schile <mschile@cypress.io>
2025-09-08 09:55:06 -04:00
Jennifer Shehane 7820ea6683 chore: set debug verbose on stderr-filtering logs (#32436) 2025-09-05 16:06:15 -04:00
Cacie Prins 5719c84683 chore: migrate server and webpack-batteries-included-preprocessor to modern eslint (#32343)
* eslint migration for webpack-batteries-included

* some debug

* rm debug?

* rm debug

* update migration manifest
2025-09-05 13:46:29 -04:00
Chris Breiding b4ba15e4e9 internal: Ensure studio/protocol is re-initialized any time test is run (#32349) 2025-09-05 08:36:45 -04:00
Jennifer Shehane 86becd4736 chore: convert browsers_spec from JS to TS (#32420)
* chore: convert browsers_spec from JS to TS

* Update packages/server/test/unit/browsers/browsers_spec.ts

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

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2025-09-04 13:45:35 -04:00
renovate[bot] dd0262d334 chore(deps): update dependency vitest to v2.1.9 [security] (#32381)
* chore(deps): update dependency vitest to v2.1.9 [security]

* empty commit

---------

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>
2025-09-03 11:03:59 -04:00
Jennifer Shehane b4d5109cb9 chore: optimize server unit test perf (#32402)
* chore: improve performance of server unit-tests

* update screenshots spec to run faster

* improve timing of more server unit tests

* revert the project spec changes

* fix path resolutions
2025-09-03 11:02:29 -04:00
Jennifer Shehane b5fc986749 chore: convert server/lib/plugins files from JS to TS (#32337)
* chore: convert server/lib/plugins files from JS to TS

* consolidate error types

* update anys to unknowns where we don't know the args

* add module esports

* forgot to push this I guess

* Update so this isn't always true

* add some utils to a JS file

* remove duplicate ts file

* remove dead code

* remove module.exports = API

* chore: fix exports of run events and adapt CJS tests importing TS modules to use the default export

* fix another preprocessor default call

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2025-09-03 09:52:53 -04:00
Ryan Manuel 4c68732ea4 dependency: upgrade better-sqlite3 from 11.9.1 to 11.10.0 (#32404)
* dep: upgrade better-sqlite3 from 11.9.1 to 11.10.0

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

* update electron guide
2025-09-02 19:27:59 -05:00
Bill Glesias 3481d1acaf chore: refactor cypress/cli to TypeScript (#32063)
* migrate cli scripts to TypeScript

* convert all javascript source files in the CLI to TypeScript

rebase into first

* chore: refactor all tests to TypeScript

rebase into second

* add npmignore for cli for typescript files

* update build process

* fix publically available exports

* Fix cy-in-cy tests

* add ts-expect-error to failing files

* fix projectConfigIpc failures as there are now multiple installs of tsx

* fix after-pack hook

* fix binary script

* chore: update publish binary to account for CLI being an ESModule compiled down to CommonJS

* does this work?

* fix the verify spec by making the listr2 renderer silent as it behaves differently since the refactor and is printing non deterministic outputs into our tests that do not have a large impact on the area we are testing and mostly served to actually test the renders of the listr2 framework itself

* empty commit

* additional refactor to code to remove strange any typing and exporting

* bump cache and build binaries

* fix CLI exports to keep backwards compatibility

* fix unit-tests

* turn on mac jobs

* fix group name rename in CLI

* remove babel deps from cli and explicitly install typescript

* address feedback from code review

* dont just falsy check results and instead explicitly check for null or undefined

* add ts-expect-error

* additional pass on cleaning up dynamic require / import from global lib references

* annotate ts-expect-errors with reason for why error is expected

* add rest of ts-expect-error comments

* removing hardcoded branch to publish binary chore/migrate_cli_to_typescript
2025-09-02 17:52:45 -04:00
Bill Glesias 8d0aee00b1 fix: wrap the tsx loader path in quotes (#32400)
* fix: allow for spaces to be present in the tsx loader path so node can discover the loader. We do this by wrapping the path in quotes

* chore: add rimraf to fix contributors on windows when cleaning the stderr-filtering package
2025-09-02 14:00:02 -04:00
Bill Glesias 58bee2839c fix: force gtk version 3 to avoid Electron 36 from crashing (#32372)
* Fix: force gtk version 3 to avoid https://www.electronjs.org/blog/electron-36-0\#behavior-changed-gtk-4-is-the-default-when-running-on-gnome

* Update cli/CHANGELOG.md

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>

* add suggestions from code review

* empty

---------

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
2025-08-28 20:32:28 -04:00
Jennifer Shehane 90310ae7f9 feat: extend Cypress.Keyboard.Keys and cy.press to support (almost) all keyboard keys (#31496)
* feat: extend Cypress.Keyboard.Keys and cy.press to support all keyboard keys

* Update cli/types/cypress.d.ts

* reference urls for codepoints

* type defs for expanded keys; tests

* changelog

* rm modifier keys temporarily - see WIP @ feat/key-press-modifier-keys

* Add pr link to changelog

* reduce repetition with key codes; remove unsupported capslock keycode

* only "key" special function keys in Cypress.Keyboard.Keys - otherwise, support any single character even if multiple codepoints

* do not refocus on f6 - f6 behavior keyup is indeterminate, so do not assert in that special case

* clean up keyboard key types, clean up duplicate def from merge

* various cleanup - wip - need multi-codepoint fix

* support multi-codepoint characters

* properly dispatch each part of a multipart utf-8 character

* fix import

* fix dtslint

* tscheck

* fix spacing

* Apply suggestions from code review

* changelog

* changelog

* ensure input actions are released in bidi; add test for keypress and input events for firefox

* fix keypress & input events in chrome

* consistent debug

* rm debug logging from input fixture

* some typos, changelog version

* fix toSupportedKey guard fn to properly reject non-strings

* add Space as named key, remove warnings re legacy firefox

* fix space

* support single-digit number keys

* remove support for F-keys

* add test cmd to types pkg

* rm failing vitest project config

* fix changelog

* clean up types a bit for single digit numbers

* more updates

---------

Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
2025-08-28 10:31:49 -04:00
Jennifer Shehane ab2004bbde fix: move from getos to systeminformation to fix OS distro/release info (#32283)
* fix: move from getos to systeminformation

* add changelog entry

* remove extraneous package that isn't used

* update changelog
2025-08-27 09:52:48 -04:00
Mike McCready f49f1c1236 dependency: update axios to 1.11.0 (#32348)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-08-26 14:25:47 -04:00
Adam Stone-Lord 0b2e6697c9 chore: (studio) don't log to Sentry when user opens studio before initialization (#32352) 2025-08-26 09:51:31 -04:00