-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 support for vite 2 and 3 from @cypress/vite-dev-server
#30489
Changes from all commits
c6d5bf0
1fb5074
2f98064
aa2050c
f52481e
9124023
11f0a36
83c4261
694385f
678b9a1
78d7286
47c9f0d
a7fec73
00e60b1
1bde344
6c8df83
e0e361f
3b4c8a4
1fe87dc
ecf3fe0
e8d6352
656fd22
f9201e1
0065168
f105854
1135b68
149f592
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,7 @@ describe('scaffolding component testing', { | |
await ctx.actions.file.writeFileInProject( | ||
ctx.path.join('node_modules', 'react-dom', 'package.json'), | ||
JSON.stringify({ | ||
'version': '17.0.0', | ||
'version': '18.3.1', | ||
}), | ||
) | ||
}) | ||
|
@@ -112,6 +112,11 @@ describe('scaffolding component testing', { | |
cy.findByTestId('dependency-react-dom').within(() => { | ||
cy.get('[aria-label="installed"]').should('exist') | ||
}) | ||
|
||
// now clean up the state that we mutated | ||
cy.withCtx(async (ctx) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not a problem in CI but when rerunning this spec locally it fails due to polluted state in the project under test's dependencies |
||
await ctx.fs.rmSync(ctx.path.join(ctx.currentProject!, 'node_modules', 'react-dom', 'package.json')) | ||
}) | ||
}) | ||
}) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,22 +144,8 @@ describe('detectFramework', () => { | |
const projectPath = await scaffoldMigrationProject('react-vite-ts-unconfigured') | ||
|
||
fakeDepsInNodeModules(projectPath, [ | ||
{ devDependency: 'vite', version: '2.0.0' }, | ||
{ dependency: 'react', version: '17.0.0' }, | ||
]) | ||
|
||
const actual = await detectFramework(projectPath, resolvedCtFrameworks) | ||
|
||
expect(actual.framework?.type).to.eq('react') | ||
expect(actual.bundler).to.eq('vite') | ||
}) | ||
|
||
it(`React with Vite using pre-release version`, async () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we support installing a pre release if we support that major version, which is kind of weird because we don't know if we will be compatible with the next major version, so we shouldn't actually support this OOTB and instead let users skip the install step to try the test harness |
||
const projectPath = await scaffoldMigrationProject('react-vite-ts-unconfigured') | ||
|
||
fakeDepsInNodeModules(projectPath, [ | ||
{ devDependency: 'vite', version: '2.5.0-alpha.4' }, | ||
{ dependency: 'react', version: '17.0.0' }, | ||
{ devDependency: 'vite', version: '5.0.0' }, | ||
{ dependency: 'react', version: '18.0.0' }, | ||
]) | ||
|
||
const actual = await detectFramework(projectPath, resolvedCtFrameworks) | ||
|
@@ -172,7 +158,7 @@ describe('detectFramework', () => { | |
const projectPath = await scaffoldMigrationProject('vue3-vite-ts-unconfigured') | ||
|
||
fakeDepsInNodeModules(projectPath, [ | ||
{ devDependency: 'vite', version: '2.0.0' }, | ||
{ devDependency: 'vite', version: '5.0.0' }, | ||
{ dependency: 'vue', version: '3.0.0' }, | ||
]) | ||
|
||
|
@@ -213,7 +199,7 @@ describe('detectFramework', () => { | |
}) | ||
}) | ||
|
||
;['2.0.0', '3.0.0'].forEach((v) => { | ||
;['4.0.0', '5.0.0'].forEach((v) => { | ||
it(`Svelte and Vite v${v}`, async () => { | ||
const projectPath = await scaffoldMigrationProject('svelte-vite-unconfigured') | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly not sure why this ever passed initially, but I would argue this is the correct behavior since there is no mount function.