Skip to content

Commit

Permalink
Merge pull request #17758 from cypress-io/fix/vite-dev-server-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthélémy Ledoux authored Aug 17, 2021
2 parents 98f6718 + a204f5e commit c88f424
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions npm/vite-dev-server/src/makeCypressPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ export const makeCypressPlugin = (
// there could be other spec files to re-run
// see https://github.com/cypress-io/cypress/issues/17691
}

// to avoid circular updates, keep track of what we updated
if (mod.file) {
exploredFiles.add(mod.file)
}
}

// get all the modules that import the current one
Expand All @@ -139,12 +134,21 @@ export const makeCypressPlugin = (
}
}

/**
* Gets all the modules that import the set of modules passed in parameters
* @param modules the set of module whose dependents to return
* @param alreadyExploredFiles set of files that have already been looked at and should be avoided in case of circular dependency
* @returns a set of ModuleMode that import directly the current modules
*/
function getImporters (modules: Set<ModuleNode>, alreadyExploredFiles: Set<string>): Set<ModuleNode> {
const allImporters = new Set<ModuleNode>()

modules.forEach((m) => {
if (m.file && !alreadyExploredFiles.has(m.file)) {
m.importers.forEach((imp) => allImporters.add(imp))
alreadyExploredFiles.add(m.file)
m.importers.forEach((imp) => {
allImporters.add(imp)
})
}
})

Expand Down

4 comments on commit c88f424

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on c88f424 Aug 17, 2021

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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.3.1/circle-develop-c88f424c0008e2e50aeb641dfc5624241d86ef31/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on c88f424 Aug 17, 2021

Choose a reason for hiding this comment

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

AppVeyor has built the win32 ia32 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.3.1/appveyor-develop-c88f424c0008e2e50aeb641dfc5624241d86ef31/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on c88f424 Aug 17, 2021

Choose a reason for hiding this comment

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

AppVeyor has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.3.1/appveyor-develop-c88f424c0008e2e50aeb641dfc5624241d86ef31/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on c88f424 Aug 17, 2021

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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.3.1/circle-develop-c88f424c0008e2e50aeb641dfc5624241d86ef31/cypress.tgz

Please sign in to comment.