Skip to content

Commit

Permalink
breaking: remove Svelte 3 support (#30572)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile authored Nov 9, 2024
1 parent 37b944f commit 249da65
Show file tree
Hide file tree
Showing 12 changed files with 1,266 additions and 928 deletions.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ _Released 12/3/2024 (PENDING)_
- Cypress Component Testing no longer supports `Vue` version 2. Addresses [#30295](https://github.com/cypress-io/cypress/issues/30295).
- Cypress Component Testing no longer supports `Next.js` versions 10, 11, 12, and 13. Addresses [#29583](https://github.com/cypress-io/cypress/issues/29583).
- 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).
- Cypress Component Testing no longer supports `Svelte` version 3. Addresses [#30492](https://github.com/cypress-io/cypress/issues/30492).
- 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).

Expand Down
6 changes: 3 additions & 3 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3392,7 +3392,7 @@ declare namespace Cypress {
type: string

/**
* Used as the flag for `getPreset` for meta framworks, such as finding the webpack config for CRA, Angular, etc.
* Used as the flag for `getPreset` for meta frameworks, such as finding the webpack config for CRA, Angular, etc.
* It is also the name of the string added to `cypress.config`
*
* @example
Expand Down Expand Up @@ -3444,12 +3444,12 @@ declare namespace Cypress {
dependencies: (bundler: 'webpack' | 'vite', projectPath: string) => Promise<DependencyToInstall[]>

/**
* This is used interally by Cypress for the "Create From Component" feature.
* This is used internally by Cypress for the "Create From Component" feature.
*/
codeGenFramework?: 'react' | 'vue' | 'svelte' | 'angular'

/**
* This is used interally by Cypress for the "Create From Component" feature.
* This is used internally by Cypress for the "Create From Component" feature.
* @example '*.{js,jsx,tsx}'
*/
glob?: string
Expand Down
4 changes: 2 additions & 2 deletions npm/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
},
"devDependencies": {
"@cypress/mount-utils": "0.0.0-development",
"svelte": "^3.49.0",
"svelte": "^4.2.19",
"typescript": "~5.4.5"
},
"peerDependencies": {
"cypress": ">=10.6.0",
"svelte": ">=3.0.0"
"svelte": ">=4.0.0"
},
"files": [
"dist/**/*"
Expand Down
3 changes: 2 additions & 1 deletion npm/svelte/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { createEntries } from '@cypress/mount-utils/create-rollup-entry.mjs'

export default createEntries({ formats: ['es', 'cjs'], input: 'src/index.ts' })
// updated respectExternal to false due to this issue: https://github.com/Swatinem/rollup-plugin-dts/issues/162#issuecomment-1702374232
export default createEntries({ formats: ['es', 'cjs'], input: 'src/index.ts', dtsOptions: { respectExternal: false } })
2 changes: 1 addition & 1 deletion packages/scaffold-config/src/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const WIZARD_DEPENDENCY_SVELTE: Cypress.CypressComponentDependency = {
package: 'svelte',
installer: 'svelte',
description: 'Cybernetically enhanced web apps',
minVersion: '^3.0.0 || ^4.0.0',
minVersion: '^4.0.0',
} as const

export const WIZARD_DEPENDENCIES = [
Expand Down
4 changes: 2 additions & 2 deletions packages/scaffold-config/test/unit/detect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe('detectFramework', () => {
const projectPath = await scaffoldMigrationProject('svelte-vite-unconfigured')

fakeDepsInNodeModules(projectPath, [
{ dependency: 'svelte', version: '3.0.0' },
{ dependency: 'svelte', version: '4.0.0' },
{ dependency: 'vite', version: v },
])

Expand All @@ -197,7 +197,7 @@ describe('detectFramework', () => {
const projectPath = await scaffoldMigrationProject('svelte-webpack-unconfigured')

fakeDepsInNodeModules(projectPath, [
{ dependency: 'svelte', version: '3.0.0' },
{ dependency: 'svelte', version: '4.0.0' },
{ dependency: 'webpack', version: '5.0.0' },
])

Expand Down
154 changes: 77 additions & 77 deletions system-tests/projects/svelte-vite/yarn.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"cross-env": "^7.0.3",
"css-loader": "^5.0.1",
"mini-css-extract-plugin": "^2.9.1",
"svelte": "^3.31.2",
"svelte": "^4.2.19",
"svelte-loader": "^3.0.0",
"webpack": "^5.16.0",
"webpack-cli": "^4.10.0",
Expand Down
1,103 changes: 621 additions & 482 deletions system-tests/projects/svelte-webpack-unconfigured/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion system-tests/projects/svelte-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"css-loader": "^6.7.1",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.9.1",
"svelte": "^3.44.0",
"svelte": "^4.2.19",
"svelte-loader": "^3.1.3",
"webpack": "^5.74.0",
"webpack-dev-server": "^4.10.0"
Expand Down
Loading

4 comments on commit 249da65

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 249da65 Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.0/linux-x64/release/14.0.0-249da654bd7d1350d031c12044933b9228e367dc/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 249da65 Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.0/linux-arm64/release/14.0.0-249da654bd7d1350d031c12044933b9228e367dc/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 249da65 Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.0/darwin-arm64/release/14.0.0-249da654bd7d1350d031c12044933b9228e367dc/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 249da65 Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.0/darwin-x64/release/14.0.0-249da654bd7d1350d031c12044933b9228e367dc/cypress.tgz

Please sign in to comment.