Skip to content

Commit

Permalink
breaking: remove support for create react app for component testing a…
Browse files Browse the repository at this point in the history
…s it is no longer maintained [run ci]
  • Loading branch information
AtofStryker committed Nov 6, 2024
1 parent 11f3355 commit b2ddc9c
Show file tree
Hide file tree
Showing 136 changed files with 1,592 additions and 73,083 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ dist/

# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public

# Storybook build outputs
Expand Down
21 changes: 10 additions & 11 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3340,19 +3340,19 @@ declare namespace Cypress {
interface CypressComponentDependency {
/**
* Unique identifier.
* @example 'reactscripts'
* @example 'react'
*/
type: string

/**
* Name to display in the user interface.
* @example "React Scripts"
* @example "React.js"
*/
name: string

/**
* Package name on npm.
* @example react-scripts
* @example react
*/
package: string

Expand All @@ -3363,21 +3363,20 @@ declare namespace Cypress {
*
* @example `react`
* @example `react@18`
* @example `react-scripts`
*/
installer: string

/**
* Description shown in UI. It is recommended to use the same one the package uses on npm.
* @example 'Create React apps with no build configuration'
* @example 'A JavaScript library for building user interfaces'
*/
description: string

/**
* Minimum version supported. Should conform to Semantic Versioning as used in `package.json`.
* @see https://docs.npmjs.com/cli/v9/configuring-npm/package-json#dependencies
* @example '^=4.0.0 || ^=5.0.0'
* @example '^2.0.0'
* @example '^=17.0.0 || ^=8.0.0'
* @example '^4.0.0'
*/
minVersion: string
}
Expand All @@ -3386,7 +3385,7 @@ declare namespace Cypress {
/**
* A semantic, unique identifier.
* Must begin with `cypress-ct-` or `@org/cypress-ct-` for third party implementations.
* @example 'reactscripts'
* @example 'react'
* @example 'nextjs'
* @example 'cypress-ct-solid-js'
*/
Expand All @@ -3400,7 +3399,7 @@ declare namespace Cypress {
* export default {
* component: {
* devServer: {
* framework: 'create-react-app' // can be 'next', 'create-react-app', etc etc.
* framework: 'react' // can be 'next', 'vue', etc etc.
* }
* }
* }
Expand All @@ -3415,7 +3414,7 @@ declare namespace Cypress {
/**
* Name displayed in Launchpad when doing initial setup.
* @example 'Solid.js'
* @example 'Create React App'
* @example 'React.js'
*/
name: string

Expand Down Expand Up @@ -3516,7 +3515,7 @@ declare namespace Cypress {

type DevServerConfigOptions = {
bundler: 'webpack'
framework: 'react' | 'vue' | 'vue-cli' | 'create-react-app' | 'next' | 'svelte'
framework: 'react' | 'vue' | 'vue-cli' | 'next' | 'svelte'
webpackConfig?: ConfigHandler<PickConfigOpt<'webpackConfig'>>
} | {
bundler: 'vite'
Expand Down
9 changes: 0 additions & 9 deletions cli/types/tests/cypress-npm-api-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ const componentConfigVueCliWebpack: Cypress.ConfigOptions = {
}
}

const componentConfigCRAWebpack: Cypress.ConfigOptions = {
component: {
devServer: {
bundler: 'webpack',
framework: 'create-react-app',
}
}
}

const componentConfigViteReact: Cypress.ConfigOptions = {
component: {
devServer: {
Expand Down
3 changes: 0 additions & 3 deletions npm/react/examples.env
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

/examples/nextjs
# /examples/nextjs-webpack-5
/examples/react-scripts
/examples/react-scripts-typescript
/examples/find-webpack
/examples/webpack-file
/examples/react-scripts-folder
/examples/using-babel-typescript
/examples/webpack-options
/examples/sass-and-ts
2 changes: 1 addition & 1 deletion npm/vite-dev-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineConfig } from 'cypress'
export default defineConfig({
component: {
devServer: {
framework: 'create-react-app',
framework: 'react',
bundler: 'vite',
// viteConfig?: Will try to infer, if passed it will be used as is
}
Expand Down
5 changes: 2 additions & 3 deletions npm/webpack-dev-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineConfig } from 'cypress'
export default defineConfig({
component: {
devServer: {
framework: 'create-react-app',
framework: 'react',
bundler: 'webpack',
// webpackConfig?: Will try to infer, if passed it will be used as is
}
Expand All @@ -31,7 +31,7 @@ export default defineConfig({
devServer(devServerConfig) {
return devServer({
...devServerConfig,
framework: 'create-react-app',
framework: 'react',
webpackConfig: require('./webpack.config.js')
})
}
Expand All @@ -50,7 +50,6 @@ This module should be primarily covered by system-tests / open-mode tests. All s
- webpack4_wds4-react
- webpack5_wds5-react
- webpack4_wds4-next-11
- webpack4_wds4-create-react-app

## Architecture

Expand Down
89 changes: 0 additions & 89 deletions npm/webpack-dev-server/cypress/e2e/create-react-app.cy.ts

This file was deleted.

4 changes: 0 additions & 4 deletions npm/webpack-dev-server/src/devServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type { Compiler, Configuration } from 'webpack'
import { createWebpackDevServer } from './createWebpackDevServer'
import debugLib from 'debug'
import { vueCliHandler } from './helpers/vueCliHandler'
import { createReactAppHandler } from './helpers/createReactAppHandler'
import { nextHandler } from './helpers/nextHandler'
import { sourceDefaultWebpackDependencies, SourceRelativeWebpackResult } from './helpers/sourceRelativeWebpackModules'
import { angularHandler } from './helpers/angularHandler'
Expand Down Expand Up @@ -108,9 +107,6 @@ async function getPreset (devServerConfig: WebpackDevServerConfig): Promise<Opti
}

switch (devServerConfig.framework) {
case 'create-react-app':
return createReactAppHandler(devServerConfig)

case 'vue-cli':
return await vueCliHandler(devServerConfig)

Expand Down
Loading

0 comments on commit b2ddc9c

Please sign in to comment.