Skip to content

Commit b615e8a

Browse files
authored
fix: don't show deps warning for projects that don't require bundler (#23598)
1 parent 95b6849 commit b615e8a

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

packages/data-context/src/data/ProjectConfigManager.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ export class ProjectConfigManager {
191191
return
192192
}
193193

194-
const result = await isDependencyInstalled(bundler, this.options.projectRoot)
195-
196-
if (!result.satisfied) {
197-
unsupportedDeps.set(result.dependency.type, result)
198-
}
199-
200194
const isFrameworkSatisfied = async (bundler: typeof WIZARD_BUNDLERS[number], framework: typeof WIZARD_FRAMEWORKS[number]) => {
201195
for (const dep of await (framework.dependencies(bundler.type, this.options.projectRoot))) {
202196
const res = await isDependencyInstalled(dep.dependency, this.options.projectRoot)

packages/data-context/test/unit/sources/WizardDataSource.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('packagesToInstall', () => {
2727

2828
const actual = await ctx.wizard.installDependenciesCommand()
2929

30-
expect(actual).to.eq(`npm install -D react-scripts webpack react-dom react`)
30+
expect(actual).to.eq(`npm install -D react-scripts react-dom react`)
3131
})
3232

3333
it('vueclivue2-unconfigured', async () => {
@@ -43,7 +43,7 @@ describe('packagesToInstall', () => {
4343

4444
const actual = await ctx.wizard.installDependenciesCommand()
4545

46-
expect(actual).to.eq(`npm install -D @vue/cli-service webpack vue@2`)
46+
expect(actual).to.eq(`npm install -D @vue/cli-service vue@2`)
4747
})
4848

4949
it('vueclivue3-unconfigured', async () => {
@@ -59,7 +59,7 @@ describe('packagesToInstall', () => {
5959

6060
const actual = await ctx.wizard.installDependenciesCommand()
6161

62-
expect(actual).to.eq(`npm install -D @vue/cli-service webpack vue`)
62+
expect(actual).to.eq(`npm install -D @vue/cli-service vue`)
6363
})
6464

6565
it('vuecli5vue3-unconfigured', async () => {
@@ -75,7 +75,7 @@ describe('packagesToInstall', () => {
7575

7676
const actual = await ctx.wizard.installDependenciesCommand()
7777

78-
expect(actual).to.eq(`npm install -D @vue/cli-service webpack vue`)
78+
expect(actual).to.eq(`npm install -D @vue/cli-service vue`)
7979
})
8080

8181
it('regular react project with vite', async () => {

packages/launchpad/cypress/e2e/config-warning.cy.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,14 @@ describe('component testing dependency warnings', () => {
187187
cy.contains('Choose a Browser', { timeout: 12000 })
188188
cy.get('[data-cy="warning-alert"]').should('not.exist')
189189
})
190+
191+
it('does not show warning for project that does not require bundler to be installed', () => {
192+
cy.scaffoldProject('next-12')
193+
cy.openProject('next-12')
194+
cy.visitLaunchpad()
195+
cy.get('[data-cy="warning-alert"]').should('not.exist')
196+
cy.get('[data-cy-testingtype="component"]').click()
197+
cy.contains('Choose a Browser', { timeout: 12000 })
198+
cy.get('[data-cy="warning-alert"]').should('not.exist')
199+
})
190200
})

packages/launchpad/cypress/e2e/project-setup.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,9 @@ describe('Launchpad: Setup Project', () => {
379379
cy.findByRole('button', { name: 'Next Step' }).click()
380380
cy.findByRole('button', { name: 'Waiting for you to install the dependencies...' })
381381

382-
cy.contains('li', 'webpack')
383382
cy.contains('li', 'react-scripts')
384383
cy.contains('li', 'react')
384+
cy.contains('li', 'react-dom')
385385

386386
cy.findByRole('button', { name: 'Skip' }).click()
387387

packages/scaffold-config/src/frameworks.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export const WIZARD_FRAMEWORKS = [
8686
dependencies: (bundler: WizardBundler['type'], projectPath: string): Promise<DependencyToInstall[]> => {
8787
return Promise.all([
8888
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_REACT_SCRIPTS, projectPath),
89-
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_WEBPACK, projectPath),
9089
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_REACT_DOM, projectPath),
9190
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_REACT, projectPath),
9291
])
@@ -107,7 +106,6 @@ export const WIZARD_FRAMEWORKS = [
107106
dependencies: (bundler: WizardBundler['type'], projectPath: string): Promise<DependencyToInstall[]> => {
108107
return Promise.all([
109108
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_VUE_CLI_SERVICE, projectPath),
110-
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_WEBPACK, projectPath),
111109
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_VUE_2, projectPath),
112110
])
113111
},
@@ -127,7 +125,6 @@ export const WIZARD_FRAMEWORKS = [
127125
dependencies: (bundler: WizardBundler['type'], projectPath: string): Promise<DependencyToInstall[]> => {
128126
return Promise.all([
129127
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_VUE_CLI_SERVICE, projectPath),
130-
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_WEBPACK, projectPath),
131128
isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_VUE_3, projectPath),
132129
])
133130
},

system-tests/__snapshots__/component_testing_spec.ts.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -533,13 +533,6 @@ exports['React major versions with Vite executes all of the tests for React v18
533533
`
534534

535535
exports['experimentalSingleTabRunMode / executes all specs in a single tab'] = `
536-
We detected that you have versions of dependencies that are not officially supported:
537-
538-
- \`webpack\`. Expected >=4.0.0 || >=5.0.0 but dependency was not found.
539-
540-
If you're experiencing problems, downgrade dependencies and restart Cypress.
541-
542-
30 modules
543536
544537
====================================================================================================
545538
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
module.exports = {}
1+
module.exports = {
2+
stats: 'errors-warnings',
3+
}

0 commit comments

Comments
 (0)