Commit Graph

54 Commits

Author SHA1 Message Date
Zachary Williams
00a0f5a0e9 fix: restart dev-server on config change (#21212)
* fix: restart dev-server on config change

* close dev server before cp is spawned

* fix test that is failing... not sure why

* cleanup unsued close events

* remove wait

* add back in close for unit tests

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2022-05-02 12:05:01 +10:00
Jess
b326693879 chore: cutting over system-tests and Cypress to use the new CT Object API (#21079)
* removing vite-dev-server local dependency from react-vite-ts-configured system test

* moving some CRA examples over to use the object api for setup

* fixing issue where function API was broken by object API for cy config + devservers

* adding deeply nested react import to project-fixtures for cra

* finishes cutting over cypress/react for sys tests

* chore: adding circle for this feature branch

* chore: moving over many vue + vite system tests to use object API instead of function API (#21080)

* doing webpack-dev-server cutovers

* removing more webpack-dev-server refrences

* fixing snapshots

* bumping yarn.lock

* wip

* fix test

* fix assertion

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>

* feat: removing all references for "fresh" dev servers (webpack-dev-server-fresh and vite-dev-server-fresh) (#21094)

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>

* chore: add dev-servers as deps to server to be included in the binary (#21091)

* fix bad merge

* fix next types and webpack-dev-server- resolve

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-04-20 15:57:19 +10:00
Tim Griesser
e1da852473 feat: add new webpack-dev-server package based on object API & bundling (#20861)
Adds the new webpack-dev-server-fresh package, exposing the new object api. This package will eventually be merged with/replace the existing webpack-dev-server

closes: UNIFY-1267
2022-04-05 12:05:33 -04:00
Zachary Williams
2c8e97df24 refactor: lift indexHtmlFile up to component, add validation (#20870) 2022-04-01 09:45:21 -05:00
Tyler Biethman
21fd2ebe9c Merge branch 'develop' of https://github.com/cypress-io/cypress into tbiethman/develop-into-10.0
# Conflicts:
#	packages/launcher/package.json
2022-03-29 09:46:08 -05:00
David Munechika
07bc5465dd merge develop 2022-03-15 10:56:04 -04:00
Lachlan Miller
1b152fca1b fix(webpack-dev-server): do not encodeUri in loader (#20575)
* fix: do not encodeUri in webpack loader

* add tests

* fix test

* fix: use decodeURI in loader and add tests (#20593)

* add tests for non-unicode and specs with ...

* add more system tests

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-03-15 12:49:45 +10:00
BlueWinds
2875ddd98a Add additional comments to plugin 2022-03-08 10:54:32 -08:00
BlueWinds
c9bece8c69 Refactor webpack-dev-server, fix event listener leak 2022-03-08 09:50:49 -08:00
Zachary Williams
3a8797e54d fix: wire up scaffolded indexHtml to dev servers (#20453)
* fix: wire up scaffolded indexHtml to dev servers

* fix vite tests

* update vuecli-5, fix system tests

* fix vite build error and launchpad test

* remove only

* address comments, remove gitignores

* remove only
2022-03-04 14:16:06 +10:00
Barthélémy Ledoux
9f6090170b fix: avoid nextjs unsafeCache and watchOptions (#20440) 2022-03-03 14:15:51 -06:00
Tyler Biethman
8a9713fc0d Chore: Merge branch 'develop' of https://github.com/cypress-io/cypress into 10.0-release
# Conflicts:
#	npm/vite-dev-server/src/makeCypressPlugin.ts
#	npm/vite-dev-server/src/resolveServerConfig.ts
#	npm/vue/README.md
#	npm/webpack-dev-server/package.json
#	packages/driver/cypress/integration/commands/actions/type_spec.js
#	packages/driver/src/cy/commands/navigation.ts
2022-02-10 12:11:42 -06:00
Zachary Williams
f9ce67cfb6 fix: detect newly added specs in dev-server compilation (#17950)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-02-08 17:06:15 -06:00
Tim Griesser
e018a14c21 feat: Add typings for new devServer config (#18797) 2021-11-08 11:02:01 -05:00
Lachlan Miller
e6cf765113 fix incorrect merge 2021-10-21 01:17:40 +10:00
Lachlan Miller
5754b2c480 merge in develop 2021-10-20 18:36:26 +10:00
Barthélémy Ledoux
8f5308f706 feat: normalized signatures webpack & vite servers (#18379) 2021-10-14 17:38:03 -05:00
Zachary Williams
745b3ac451 feat: index.html configurability and storybook support (#18242) 2021-10-08 13:16:30 -05:00
Ben Kucera
41524a9ab3 change @ts-expect-error -> @ts-ignore (#18047) 2021-09-17 12:13:10 -04:00
Barthélémy Ledoux
da4b1e06ce feat: allow usage of @react/plugins with cypress.config.js (#17738) 2021-09-09 16:17:14 -05:00
Zachary Williams
16e4759e01 feat: support webpack-dev-server v4 (#17918)
* feat: migrate to new webpack-dev-server public api

* fix: extract version check, and disallow minor releases matching `/3\./` with a starts with req.

* feat: support webpack-dev-server v4

* fix webpack warning causing overlay and types

* pin test dependency

* fix tests that were using incorrect wewbpack configuration

Co-authored-by: Ollie Relph <ollie@relph.me>
2021-08-30 17:42:17 -04:00
Lachlan Miller
b945b8197e chore(server): reduce coupling between methods to instantiate a project (#17200)
* wip

* wip: use async/await

* slowly refactor

* slowly refactor

* use typescript

* use async/await

* update spec

* do not use tap because bluebird sucks

* refactor

* update

* remove bluebird

* update

* remove then

* change to async/await to make it easier to reason about

* remove more bluebird

* no more bluebird

* remov ts ignore

* do not tap

* refactor

* simplify cfg

* move static methods to separate file

* update snapshot

* comment out test

* simplifying options merging

* update tests

* change order of options

* move code out of project-base

* update tests

* update tests

* type reporter

* simplify onWatchSettings function

* sep starting websockets and watching settings. reduce need to pass large cfg object

* move util functions out of project class

* move tests to new file

* update test

* move code around

* update tests

* remove need to pass options to getConfig

* fix tests

* separate get and init config

* set browser warnings in initializeConfig

* move Ct specific concerns to same function

* do not pass config to initializeSpecStore

* remove onOpen function

* improve types

* update typing errors

* update types

* types

* fix types

* update tests

* update tests

* fix tests

* update tests

* comment back in test

* update methods

* update types

* add defensive code against config.clientRoute

* do not use async

* update tests

* use same baseUrl for proxy regardless

* remove comment

* revert change to baseUrl
2021-07-13 11:32:59 +10:00
Lachlan Miller
c0fc23a052 feat(npm/webpack-dev-server,runner-ct): Normalize webpack errors + general React/TS improvements (#16613)
* feat: normalize webpack errors

* move some files to TS

* add tests

* simplify test

* improve types

Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
2021-05-24 17:40:36 -04:00
Adam Gastineau
4bb1ecd077 fix: Properly typecheck webpack-dev-server and fix several undefined issues (#16503) 2021-05-14 10:07:03 -07:00
Lachlan Miller
bcd05862fc Merge branch 'master' into develop 2021-05-13 02:13:03 +00:00
Lachlan Miller
0cea625f35 feat: support webpack dev server v4 (#16414)
* feat: support webpack dev server v4

* simplify code

* add types
2021-05-13 12:12:29 +10:00
Lachlan Miller
116fe649d7 fix: encodeURI to correctly load specs with white space (#16416)
* fix: encodeURI to correctly load specs with white space

* fix the tests

* allow refresh page when spaes are in the path

Co-authored-by: ElevateBart <ledouxb@gmail.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-05-11 11:01:07 +10:00
Lachlan Miller
14c22929ba feat: exclude html pwa plugin in webpack dev server (#16388)
Co-authored-by: Adam Gastineau <adamg@cypress.io>
2021-05-10 16:14:03 +10:00
Lachlan Miller
042fb6a0c0 support custom index-template for webpack dev server (#16247) 2021-04-28 11:04:31 -04:00
Lachlan Miller
4cfe4b1971 fix(webpack-dev-server): remove hard dependency on html-webpack-plugin v4 (#16108)
* update webpack-dev-server to support html-webpack-plugin 4 and 5

* add nextjs example

* update env

* chore: comment out nextjs webpack 5 example

* use ts-ignore instead of 'ts-expect-error'

* lock file

* chore: update dependencies

Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-04-23 13:47:05 +10:00
Lachlan Miller
92d0b76aa5 chore: remove conflicting types 2021-04-22 12:10:09 +10:00
Barthélémy Ledoux
ecf21a6caa Merge branch 'master' into develop 2021-04-21 14:17:11 +00:00
Barthélémy Ledoux
7340851097 fix(webpack): allow load custom asset on windows (#16099)
* fix(webpack): allow load custom asset on windows

closes #16097

* fix: use a regexp and path.sep

* chore: avoid replacement when using posix filesystem
2021-04-21 09:16:26 -05:00
Lachlan Miller
10b89f8d58 fix(component-testing): correct imports for relative paths in cypress.json (#16056) 2021-04-21 05:13:25 -07:00
Barthélémy Ledoux
6c12a6c7b7 fix: run-ct does not hang on windows anymore (#16022) 2021-04-16 10:34:14 -05:00
Barthélémy Ledoux
dcf3b14f36 fix: remove lazy-compile-webpack-plugin (#15964)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2021-04-13 15:34:37 -04:00
Lachlan Miller
19136b6a13 fix: remove lazy-compile-webpack-plugin, make html-webpack-plugin a dependency (#15954)
* update webpack perf stats

* do not use lazy-compile plugin. add html-webpack-plugin as direct deps

* update snapshot

* remove unused deps
2021-04-13 11:34:56 -04:00
Jessica Sachs
1d271ea209 Revert "fix: ensure root el mounting exists, remove userland html webpack plugin (#15870)" (#15949)
This reverts commit 726120da18.

Co-authored-by: ElevateBart <ledouxb@gmail.com>
2021-04-12 17:10:44 -04:00
Barthélémy Ledoux
602c762cfd fix: make component testing windows compatible (#15889) 2021-04-10 10:52:10 -05:00
Lachlan Miller
8e894a0fdb fix(webpack-dev-server): remove output.publicPath from webpack-dev-server (#15839)
* fix: remove publicPath in react-scripts if it is present

* fix: remove publicPath in react-scripts if it is present

* fix: remove publicPath in webpack-dev-server regardless

* fix: add root path

* chore: revert

* fix: remove user base path

* remove unused function

* test: add unit test for make webpack config

* chore: make purpose for fake url more clear

* do not include local filesystem path in snapshot
2021-04-09 08:23:01 -04:00
Lachlan Miller
726120da18 fix: ensure root el mounting exists, remove userland html webpack plugin (#15870)
* fix: ensure root el exists

* fix: remove userland webpack plugins

* chore: bump html webpack plugin version

* fix: remove preload plugin

* chore: remove dep

* fix: revert code

* chore: revert

* chore: revert

* fix: null check for user webpack
2021-04-09 12:55:09 +10:00
Dmitriy Kovalenko
254eb47d91 fix(component-testing): Fix webpack-dev-server deps validation crash (#15708)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2021-04-02 10:12:57 -05:00
Adam Gastineau
fa780634ca Removed experimentalComponentTesting flag 2021-03-29 10:47:52 -07:00
Dmitriy Kovalenko
b1f831a86a fix(@cypress/react): Devtools unpredictable resets (#15612)
* fix: Devtools unpredictable resets

* Remove cleaning up from webpack-dev-server

* Fix lint errors

* Get back observer

* fix: bring back cleanup (#15634)

* fix: wait for fw teardown to do html teardown

* fix: port responsibility of teardown to frameworks

* chore: add comments

* fix: typings

* fix: react unmount cannot be called in the right hook

* run dtslint

Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
2021-03-25 10:43:34 +10:00
ElevateBart
2917fe3f68 refactor: properly use the dev server publicPaths 2021-03-22 11:20:05 -05:00
Barthélémy Ledoux
a12b72b81d refactor(component-testing): simplify vue mount (#15275)
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
2021-03-18 20:38:59 -04:00
Barthélémy Ledoux
5fd91bde01 chore: deliver npm modules (#15398)
* fix: deliver webpack-dev-server new architecture

* fix: make vite-dev-server work

* fix: deliver react and vite-dev-server

* fix: deliver the vue2 package too

* fix: rollback react changes published to next
2021-03-10 12:40:59 -06:00
Jessica Sachs
2863e33892 fix: add webpack-dev-server to peerDependencies, improve peerDependency error handling, fix index-template.html path (#15149) 2021-02-18 18:00:48 -05:00
ElevateBart
585649c61c Merge branch 'develop' into master-merge-up 2021-02-17 14:07:51 -06:00
Lachlan Miller
fb7540e99d fix: add a trivial change to trigger semantic release (#15127) 2021-02-17 17:12:24 +00:00