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

Do not watch any files in run mode #4458

Merged
merged 2 commits into from
Jun 14, 2019
Merged

Do not watch any files in run mode #4458

merged 2 commits into from
Jun 14, 2019

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Jun 13, 2019

Fixes #4283

Files are watched in 3 places:

  • In openProject, getSpecChanges watches files to see if any are added or removed:
    createSpecsWatcher = (cfg) ->
    return if specsWatcher
    debug("watch test files: %s in %s", cfg.testFiles, cfg.integrationFolder)
    specsWatcher = chokidar.watch(cfg.testFiles, {
    cwd: cfg.integrationFolder
    ignored: cfg.ignoreTestFiles
    ignoreInitial: true
    })
    specsWatcher.on("add", checkForSpecUpdates)
    specsWatcher.on("unlink", checkForSpecUpdates)
  • In project, cypress.json, cypress.env.json, and the pluginsFile are watched
    • pluginsFile is watched in run mode, so added a guard - normally watches all files in dependency tree outside of node_modules:
      watchTree: (filePath, options = {}) ->
      files = dependencyTree.toList({
      filename: filePath
      directory: process.cwd()
      filter: (filePath) ->
      filePath.indexOf("node_modules") is -1
      })
  • by the bundler itself
    • shouldWatch: false is passed in run mode which tells the preprocessor not to use watchify

@flotwig flotwig changed the title [WIP] Do not watch any files in run mode Do not watch any files in run mode Jun 13, 2019
@flotwig flotwig requested a review from brian-mann June 13, 2019 17:23
@brian-mann brian-mann merged commit 387ca00 into develop Jun 14, 2019
@flotwig flotwig deleted the issue-4283 branch January 24, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress v3.3.0 crashes with ENOSPC in AWS CodeBuild
2 participants