Commit Graph

269 Commits

Author SHA1 Message Date
semantic-release-bot
a1734b9e88 chore: release @cypress/vite-dev-server-v6.0.3
[skip ci]
2025-03-25 14:29:27 -04:00
renovate[bot]
a566242f7f dependency: update dependency semver to v7.7.1 (#31341)
* fix(deps): update dependency semver to v7.7.1

* changelog

* caret dep

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-03-20 13:58:02 -04:00
semantic-release-bot
f072ca1c03 chore: release @cypress/vite-dev-server-v6.0.2
[skip ci]
2025-01-27 13:11:17 -05:00
Jonathan Wieben
3149a8f184 fix: avoid source map plugin from replacing valid code (#30890)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-01-23 13:38:24 -05:00
semantic-release-bot
c31050afe6 chore: release @cypress/vite-dev-server-v6.0.1
[skip ci]
2025-01-15 11:47:49 -05:00
Bill Glesias
107d3eda5e fix: add cypress 14 as a peer dependency for vite-dev-server (#30857) 2025-01-10 16:59:16 -05:00
semantic-release-bot
8af37d5c82 chore: release @cypress/vite-dev-server-v6.0.0
[skip ci]
2025-01-07 19:58:38 -05:00
AtofStryker
dd21af5812 breaking: release version 6.0.0 of @cypress/vite-dev-server.
BREAKING CHANGE: Cypress 14 drops support forVite 2-3. Vite 4 and up is supported.
2025-01-07 17:06:41 -05:00
Cacie Prins
0547d65a2a breaking: no longer inject document.domain by default (#30770)
* remove experimentalSkipDomainInjection, add and deprecate injectDocumentDomain

* remove experimentalSkipDomainInjection, add injectDocumentDomain

* begin rethreading domain injection

* complete document domain transition

* move some cookie specs to separate test run

* origin and privileged commands with default docdom inject

* fix privileged channel when injecting document domain

* rm unnecessary .getOrigin abstraction in cors lib

* move remote-states in prep for refactor Replace Conditional with Polymorphism

* refactor remote states to strategy pattern

* cookie commands work as expected w cross origin bridge on different origins

* some origin tests updated

* run tests with document domain enabled

* run tests actually

* use correct config, swap conditional

* check-ts

* inject documetn domain for webkit tests

* do not exec injectDocumetnDomain in parallel

* fix ServerBase construction in tests to include cfg now

* pass cfg to ServerBase

* improved integration tests

* remove document domain checks for all server integration specs - will add injectDocumentDomain cases

* tests for injecting document domain when configured to

* square away server integration tests

* ensure cookies are set correctly, potentially

* errors pkg snapshots

* fix config tests

* fixing config tests

* somewhat improves tests for cors policies in packages/network

* fix ts err in server-base

* enable injectDocumentDomain for cy in cy tests

* fix Policy type ref

* refactor cypress-schematic ct spec to be less prone to timeouts

* run vite-dev-server tests with injectDocumentDomain

* rm document domain assertion from page_loading system test

* add system tests that test with injectDocumentDomain and others that test with cy.origin

* fix results_spec snapshot

* update experimentalSkipDomainInjection system test

* different behavior for certain net_stubbing tests based on injectDocumentDomain or not

* fix ts

* extract origin key logic from remote states, for now

* move server-base and response-middleware over to new pattern

* WIP - reentry

* fix build, remove console.log

* check-ts

* fix spec frame injection

* remove injection for localhost

* mostly fix vite-dev-server app integration tests

* fix codeframe in certain cases in chrome

* drop internal stack frames from stacks intended for determining code frame data

* some improvements to vite ct error codeframes

* fix proxy unit tests to use document domain injection util class

* rm .only

* fix all vite ct error specs

* rm console.log

* slight refactor to util class to make easier to test

* fix refactor - missing rename in files.js

* several tests do not set testingtype in config, so just check against component instead of checking for e2e

* revert changes to getInvocationDetails to see if that breaks tests

* re-enable stack stripping in invocation details for chrome

* new snapshots with more accurate invocation details

* test for same-site cross-origin cookie behavior

* ignore window.top ts errors

* revert forcing injectDocumentDomain in vite-dev-server cy config

* fix normalized whitespace for firefox "loading_failed" error

* always trim trailing wsp from stack before appending additional content

* force normalization of whitespace to three \n when adding additional stack details

* normalize wsp between stack and additional stack to "\n  \n" in firefox

* remove stack_utils attempt at normalizing wsp

* various cleanup: remove commented console logs, add more detailed comments

* add on links to error messages

* remove experimentalSkipDomainInjection from exported type defs

* Update system-tests/test/experimental_skip_domain_injection_spec.ts

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

* Update packages/driver/cypress/e2e/e2e/origin/cookie_misc.cy.ts

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

* no need to coerce a boolean value to a booleanc

* export base config from primary cypress config in driver for use in inject-document-domain test subset

* lift experimentalSkipDomainInjection breaking option to root

* rollback config/options changes

* rm invalid comment

* use hostname instead of origin to create cookie from automation cookie

* clarify stack regex in results_spec

* lint

* take a stab at the changelog entries for this

* Update cli/CHANGELOG.md

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

* Update cli/CHANGELOG.md

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

* reenable locally-failing test

* changelog

* snapshot updatesfor experimental skip domain injection err msg

* remove packageManager declaration in package.json

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2025-01-06 13:48:43 -05:00
Bill Glesias
4efd932eac feat: component testing now supports vite 6 [run ci] (#30679) 2024-12-03 15:03:08 -05:00
Jennifer Shehane
636bed9cf7 merge develop 2024-12-02 09:42:47 -05:00
Bill Glesias
15c5761eb6 breaking: make JustInTimeCompile GA from experimentalJustInTimeCompile and default to true (#30641)
* pull support for JIT from vite since it doesn't have an affect for end users or performance (webpack only) [run ci]

rebase this

* remove the experimentalJIT flag and make it GA (default still false) [run ci]

* enable justInTimeCompile by default [run ci]

* chore: bump cache [run ci]
2024-11-21 15:25:59 -05:00
semantic-release-bot
68363c2b38 chore: release @cypress/vite-dev-server-v5.2.1
[skip ci]
2024-11-19 13:02:14 -05:00
Bill Glesias
0c661b4f35 breaking: remove support for React 16 and 17 for Cypress Component Testing. Additionally, remove the cypress/react18 testing harness and merge it upstream with cypress/react (#30590)
* breaking: remove support for react 16 and 17 for component testing and move cypress/react18 upstream into cypress/react [run ci]

* update tests / suggestions from code review [run ci]
2024-11-15 16:14:48 -05:00
Ryan Manuel
4bf8e585cd fix: ensure that each js file served up by vite dev server has an inline sourcemap (#30606)
* fix: ensure that each js file served up by vite dev server has an inline sourcemap

* refactor

* refactor with more understanding

* add changelog

* PR comments and other tweaks

* add comments

* add comments

* Apply suggestions from code review
2024-11-14 11:55:19 -06:00
Bill Glesias
37b944f9b4 breaking: remove support for create react app for component testing as it is no longer maintained [run ci] (#30558) 2024-11-07 18:02:04 -05:00
Bill Glesias
dfd296e85c breaking: remove support for vite 2 and 3 from @cypress/vite-dev-server (#30489)
* chore: update system tests for vite 4 and 5 to latest [run ci]

* chore: remove projects vite 2.8.6, 2.9.1, vite3.0.2 as they are no longer supported by @cypress/vite-dev-server

* chore: update vite-ct-function-api system tests to latests

* chore: update vite-ct-object-api system tests to latests

* chore: update vite-simple system tests to latests

* breaking: remove support for vite 2 and 3 [run ci]

* update react-vite-ts-configured to latest deps

* update react-vite-ts-unconfigured to latest deps

* update vue2 to latest (to be removed later in v14)

* update vue3-vite-ts-configured to latest deps (need to fix typings issue within vue)

* update vue3-vite-ts-unconfigured to latest deps

* update vue3-vite-ts-custom-index-html to latest deps (need to fix typings issue within vue)

* update vue3 to latest deps

* update detection spec to be compatible with latest compatible deps. removed test for allowing passing scaffolding for installing prereleases as we don't support prereleases ahead of time

* add changelog

* chore: update react-vite-ts-configured

* update svelte vite

* update ct-public-api-solid-js

* update system test vite dependencies

* update comments on typings issues and missed dependencies [run ci]

* add addresses section [run ci]

* update lock file for component-testing-outdated-dependencies [run ci]

* update lock file [run ci]

* update missed yarn lock file [run ci]

* fix issues inside vue2 project package not using correct dependencies [run ci]

* fix issues with failing vds test [run ci]

* fix failing tests in vite-dev-server by fixing source map references (expected since we are on 3 major versions ahead of vite) and install @cypress/vite-dev-server in correct packages [run ci]
2024-11-03 14:57:27 -05:00
semantic-release-bot
bebb403b38 chore: release @cypress/vite-dev-server-v5.2.0
[skip ci]
2024-08-27 12:37:53 -04:00
Bill Glesias
57f6110d29 feat: implement JIT component experiment (#30049)
* feat: implement JIT component experiment [run ci]

* don't update the dev server unnecessarily if the run is cancelled [run ci]

* fix system test flake

* Update cli/types/cypress.d.ts

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

* Update system-tests/projects/experimental-JIT/webpack/cypress/support/component-index.html

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

* Update system-tests/projects/experimental-JIT/vite/cypress/support/component-index.html

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

* chore: ignore node_modules for webpack dev server

* be sure to end span when throwing error

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-08-22 10:56:55 -04:00
semantic-release-bot
efcc71a1bc chore: release @cypress/vite-dev-server-v5.1.1
[skip ci]
2024-06-07 12:59:05 -04:00
Bill Glesias
f3b67666a5 fix: update cypress to Typescript 5 (#29568)
* 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>
2024-06-04 19:17:38 -04:00
renovate[bot]
a73d300ae2 chore(deps): update dependency vite-4 to ^4.5.3 [security] (#29550)
* chore(deps): update dependency vite-4 to ^4.5.3 [security]

* empty commit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-05-22 15:11:56 -04:00
semantic-release-bot
2567b72a5a chore: release @cypress/vite-dev-server-v5.1.0
[skip ci]
2024-05-21 13:39:45 -04:00
Bill Glesias
079030bb5f feat: support vite v5 (#29518)
* 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>
2024-05-21 12:49:09 -04:00
Bill Glesias
f14a11aecf chore: update eslint from version 7 to version 8 (#29355)
* chore: (for eslint-plugin-dev only is breaking) update eslint-plugin dev minimum to eslint 7. Remove support for coffeescript and reconfigured required peer deps

* correctly configure eslint-plugin-json-format for the monorepo and run linting on all json files (previously was not running)

* properly support no duplicate imports
2024-04-26 14:42:33 -04:00
Jennifer Shehane
e74963ebc4 chore: wait for specs page to load before continuing in tests in order to reduce flake (#28855)
* chore: test a theory that waiting for specs list will be less flaky

* empty commit to trigger CI

* Add logic to login command for when we're visiting pages with no specs

* Rework tests to handle different 'no specs' pages

* Update a couple more situations where there is no specs list

* Fix bug where unauthorized login was not being sent at the right time to test the logout

* Move the specs page assertions into their own custom command

* typo fix
2024-02-06 09:38:36 -05:00
renovate[bot]
b17409a9ea chore(deps): update dependency vite [security] (#28773)
* chore(deps): update dependency vite [security]

* empty commit to trigger CI

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-01-23 11:25:02 -05:00
semantic-release-bot
68d5b01618 chore: release @cypress/vite-dev-server-v5.0.7
[skip ci]
2023-12-26 12:53:20 -05:00
Jennifer Shehane
372515829e dependency: Bump ts-node to 10.9.2 (#28528) 2023-12-14 13:28:18 -05:00
Jim Hays
34c8b1f884 refactor: Spellcheck (#27964)
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-11 10:06:10 -04:00
Adam Stone-Lord
4c11731ee1 chore: optimize task execution (#27848)
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec686e.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeba8f.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <adams@cypress.io>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <jordan@jpdesigning.com>
Co-authored-by: Dave Kasper <dave.m.kasper@gmail.com>
2023-10-04 12:25:00 -05:00
semantic-release-bot
87fc6ccdb7 chore: release @cypress/vite-dev-server-v5.0.6
[skip ci]
2023-08-29 11:10:23 -04:00
Ryan Manuel
37dd857d13 fix additional tests 2023-08-28 16:09:20 -05:00
Ryan Manuel
c30ce10e4c fix cy in cy tests 2023-08-28 13:10:07 -05:00
Brian Mann
f82fdf026e fix: allow cypress config.port to override devServer.port for proxying assets 2023-08-28 03:01:35 -04:00
Adam Stone-Lord
24f1460692 chore: revert changes to build process (#27584)
* Revert "chore: remove Typescript dependency from app node_modules in binary (#27577)"

This reverts commit 60d4c8356c.

* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec686e.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeba8f.

* build everything

* [run ci]
2023-08-18 10:05:29 -04:00
Jordan
9e60aeba8f chore: upgrade lerna to 6, cache build step (#26913)
* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <adams@cypress.io>
2023-08-10 11:12:38 -04:00
renovate[bot]
6787693fa7 chore(deps): update dependency semver to ^7.5.3 🌟 (#27151)
* dependency(deps): update dependency semver to ^7.5.3 🌟

* changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-06-29 14:16:09 +10:00
Mike Plummer
91cbc6741c chore: Update Vite to 4.3.0 (#26553)
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-04-27 15:09:31 -05:00
Lachlan Miller
6ba6200d22 chore: revert to vite 4.1 (#26162)
Co-authored-by: marktnoonan <mark@cypress.io>
2023-03-21 10:49:24 -04:00
semantic-release-bot
913de854c2 chore: release @cypress/vite-dev-server-v5.0.5
[skip ci]
2023-03-20 12:49:01 -04:00
Adam Stone-Lord
3a2b2d3323 fix(vite-dev-server): do not use incremental esbuild option with Vite v4.2.0+ (#26139)
* fix: do not use `incremental` esbuild option with Vite v4.2.0+

* fix(vite-dev-server): do not use `incremental` esbuild option with Vite v4.2.0+

* feedback

* add changelog entry

* update changelog entry

* remove system test

* invert config logic

* Update cli/CHANGELOG.md

Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>

---------

Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
2023-03-20 09:09:43 +10:00
Radik24
6397ac60da fix: Vite dev server add searchForWorkspaceRoot (#26036)
* misc: Vite dev server add searchForWorkspaceRoot

* misc: Vite dev server add searchForWorkspaceRoot

* trigger ci

* add null check

---------

Co-authored-by: Mike Plummer <mikep@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-03-16 14:42:50 +10:00
semantic-release-bot
3769319228 chore: release @cypress/vite-dev-server-v5.0.4
[skip ci]
2023-02-23 22:43:58 -05:00
Lachlan Miller
0981fcf6ac fix: vite-dev-server windows (#25889)
* chore: update vite in system test

* fix: vite-dev-server on windows

* fix slash

* windows

* try to run windows again

* update

* chore: comment [skip ci]

* update
2023-02-22 12:44:20 +10:00
semantic-release-bot
8ddc9b6faa chore: release @cypress/vite-dev-server-v5.0.3
[skip ci]
2023-02-17 09:53:17 -05:00
Paolo Caleffi
d54fa65f58 fix: allow running tests outside Vite project root folder (#25801)
* fix: allow running tests outside Vite project root folder

* update snapshots

* add changelog entry

---------

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-02-17 15:02:35 +10:00
Zachary Williams
8b1d74f34a chore: remove react-scripts and jest (#25383)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-01-19 16:07:36 -06:00
Zach Bloomquist
1b1ed9cd49 chore: improve linting (#25235) 2022-12-29 17:26:13 +00:00
Lachlan Miller
0e14b9ebea chore: bump rollup & some vite deps (#25140) 2022-12-19 14:08:12 -05:00