Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: remove @vue/cli-service from Cypress Component Testing #30585

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

11-07-24-cra-removal
11-07-24-vue-cli-service-removal
10 changes: 5 additions & 5 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'breaking/remove_angular_signals_test_harness'
- 'breaking/remove_vue_cli_service'
- 'publish-binary'

# usually we don't build Mac app - it takes a long time
Expand All @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'breaking/remove_angular_signals_test_harness', << pipeline.git.branch >> ]
- equal: [ 'breaking/remove_vue_cli_service', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'breaking/remove_angular_signals_test_harness', << pipeline.git.branch >> ]
- equal: [ 'breaking/remove_vue_cli_service', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'breaking/remove_angular_signals_test_harness', << pipeline.git.branch >> ]
- equal: [ 'breaking/remove_vue_cli_service', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -152,7 +152,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "breaking/remove_angular_signals_test_harness" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "breaking/remove_vue_cli_service" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ _Released 12/3/2024 (PENDING)_
- Cypress Component Testing no longer supports `Angular` versions 13, 14, 15, and 16. The minimum supported version is now `17.2.0` in order to fully support Angular [signals](https://angular.dev/guide/signals). Addresses [#29582](https://github.com/cypress-io/cypress/issues/29582). Addressed in [#30539](https://github.com/cypress-io/cypress/pull/30539).
- The `cypress/angular-signals` test harness is no longer included in the Cypress binary. Instead, signals support is now shipped with `cypress/angular`! This requires `rxjs` to be installed as a `peerDependency`. Addresses [#29606](https://github.com/cypress-io/cypress/issues/29606).
- Cypress Component Testing no longer supports `create-react-app`. Addresses [#30028](https://github.com/cypress-io/cypress/issues/30028).
- Cypress Component Testing no longer supports `@vue/cli-service`. Addresses [#30481](https://github.com/cypress-io/cypress/issues/30481).

**Deprecations:**

Expand Down
2 changes: 1 addition & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3515,7 +3515,7 @@ declare namespace Cypress {

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

const componentConfigVueCliWebpack: Cypress.ConfigOptions = {
component: {
devServer: {
bundler: 'webpack',
framework: 'vue-cli',
webpackConfig: {}
}
}
}

const componentConfigViteReact: Cypress.ConfigOptions = {
component: {
devServer: {
Expand Down
85 changes: 0 additions & 85 deletions npm/webpack-dev-server/cypress/e2e/vue-cli.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 @@ -7,7 +7,6 @@ import type { Compiler, Configuration } from 'webpack'

import { createWebpackDevServer } from './createWebpackDevServer'
import debugLib from 'debug'
import { vueCliHandler } from './helpers/vueCliHandler'
import { nextHandler } from './helpers/nextHandler'
import { sourceDefaultWebpackDependencies, SourceRelativeWebpackResult } from './helpers/sourceRelativeWebpackModules'
import { angularHandler } from './helpers/angularHandler'
Expand Down Expand Up @@ -107,9 +106,6 @@ async function getPreset (devServerConfig: WebpackDevServerConfig): Promise<Opti
}

switch (devServerConfig.framework) {
case 'vue-cli':
return await vueCliHandler(devServerConfig)

case 'next':
return await nextHandler(devServerConfig)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export const cypressWebpackPath = (config: WebpackDevServerConfig) => {
type FrameworkWebpackMapper = { [Property in Frameworks]: string | undefined }

const frameworkWebpackMapper: FrameworkWebpackMapper = {
'vue-cli': '@vue/cli-service',
react: undefined,
vue: undefined,
next: 'next',
Expand Down
27 changes: 0 additions & 27 deletions npm/webpack-dev-server/src/helpers/vueCliHandler.ts

This file was deleted.

27 changes: 0 additions & 27 deletions npm/webpack-dev-server/test/handlers/vueCliHandler.spec.ts

This file was deleted.

16 changes: 8 additions & 8 deletions packages/app/cypress/e2e/runner/ct-framework-errors.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,21 @@ describe('Vue', {
numTestsKeptInMemory: 1,
}, () => {
beforeEach(() => {
cy.scaffoldProject('vuecli5-vue3')
cy.scaffoldProject('vue3-webpack-ts-configured')
})

it('error conditions', () => {
const verify = loadErrorSpec({
projectName: 'vuecli5-vue3',
projectName: 'vue3-webpack-ts-configured',
configFile: 'cypress.config.ts',
filePath: 'src/components/Errors.cy.js',
filePath: 'src/components/Errors.cy.ts',
failCount: 4,
})

verify('error on mount', {
fileName: 'Errors.vue',
line: 19,
column: 16,
column: 15,
message: [
'mount error',
],
Expand All @@ -232,7 +232,7 @@ describe('Vue', {
verify('sync error', {
fileName: 'Errors.vue',
line: 24,
column: 16,
column: 15,
uncaught: true,
uncaughtMessage: 'sync error',
message: [
Expand All @@ -247,7 +247,7 @@ describe('Vue', {
verify('async error', {
fileName: 'Errors.vue',
line: 28,
column: 18,
column: 17,
uncaught: true,
uncaughtMessage: 'async error',
message: [
Expand All @@ -265,8 +265,8 @@ describe('Vue', {
'Timed out retrying',
'element-that-does-not-exist',
],
codeFrameRegex: /Errors\.cy\.js:25/,
stackRegex: /Errors\.cy\.js:25/,
codeFrameRegex: /Errors\.cy\.ts:32/,
stackRegex: /Errors\.cy\.ts:32/,
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const PROJECTS: {projectName: ProjectDirs[number], test: string}[] = [
{ projectName: 'angular-18', test: 'app.component' },
{ projectName: 'react-vite-ts-configured', test: 'App.cy' },
{ projectName: 'react18', test: 'App.cy' },
{ projectName: 'vueclivue3-configured', test: 'HelloWorld.cy' },
{ projectName: 'next-14', test: 'index.cy' },
{ projectName: 'vue3-vite-ts-configured', test: 'HelloWorld.cy' },
{ projectName: 'vue3-webpack-ts-configured', test: 'HelloWorld.cy' },
{ projectName: 'svelte-vite', test: 'App.cy' },
]

// These are especially flaky on windows, skipping them there.
Expand Down
14 changes: 7 additions & 7 deletions packages/data-context/test/unit/codegen/spec-options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('spec-options', () => {
codeGenPath: `${tmpPath}/MyComponent.vue`,
codeGenType: 'component',
isDefaultSpecPattern: true,
framework: CT_FRAMEWORKS[0],
framework: CT_FRAMEWORKS[1],
specPattern: [defaultSpecPattern.component],
})

Expand All @@ -108,7 +108,7 @@ describe('spec-options', () => {
codeGenPath: `${tmpPath}/MyComponent.vue`,
codeGenType: 'component',
isDefaultSpecPattern: true,
framework: CT_FRAMEWORKS[0],
framework: CT_FRAMEWORKS[1],
specPattern: [defaultSpecPattern.component],
})

Expand All @@ -127,7 +127,7 @@ describe('spec-options', () => {
codeGenPath: `${tmpPath}/Counter.tsx`,
codeGenType: 'component',
isDefaultSpecPattern: true,
framework: CT_FRAMEWORKS[3],
framework: CT_FRAMEWORKS[2],
specPattern: [defaultSpecPattern.component],
componentName: 'Counter',
isDefault: true,
Expand All @@ -146,7 +146,7 @@ describe('spec-options', () => {
codeGenPath: `${tmpPath}/Counter.tsx`,
codeGenType: 'component',
isDefaultSpecPattern: true,
framework: CT_FRAMEWORKS[3],
framework: CT_FRAMEWORKS[2],
specPattern: [defaultSpecPattern.component],
componentName: 'View',
})
Expand All @@ -166,7 +166,7 @@ describe('spec-options', () => {
codeGenPath: `${tmpPath}/Counter.tsx`,
codeGenType: 'component',
isDefaultSpecPattern: true,
framework: CT_FRAMEWORKS[3],
framework: CT_FRAMEWORKS[2],
specPattern: [defaultSpecPattern.component],
componentName: 'View',
})
Expand Down Expand Up @@ -212,7 +212,7 @@ describe('spec-options', () => {
codeGenPath: `${tmpPath}/${componentPath}`,
codeGenType: 'component',
isDefaultSpecPattern: false,
framework: CT_FRAMEWORKS[0],
framework: CT_FRAMEWORKS[1],
specPattern,
specs,
})
Expand Down Expand Up @@ -322,7 +322,7 @@ describe('spec-options', () => {
codeGenType: 'component',
isDefaultSpecPattern: true,
specPattern: [defaultSpecPattern.component],
framework: CT_FRAMEWORKS[0],
framework: CT_FRAMEWORKS[1],
})

await fs.outputFile(`${tmpPath}/${fileName}`, '// foo')
Expand Down
Loading