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

Regression: Still watching too many files #1364

Closed
alexilyaev opened this issue Jun 10, 2018 · 7 comments · Fixed by #1384
Closed

Regression: Still watching too many files #1364

alexilyaev opened this issue Jun 10, 2018 · 7 comments · Fixed by #1384
Labels

Comments

@alexilyaev
Copy link

  • nodemon -v: 1.15.1 and 1.17.1 and 1.17.5
  • node -v: v9.6.1 and v10.3.0
  • Operating system/terminal environment: Mac OS X 10.12.6, iTerm

Expected behaviour

Should watch only the files set in --watch or watch config in nodemon.json

Actual behaviour

Watches many files beyond the defined directories and files

Steps to reproduce

1.14.12

https://github.com/alexilyaev/express-github-login/tree/nodemon-v1.14.12

[nodemon] 1.14.12
[nodemon] reading config ./nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 30181 to restart
[nodemon] ignoring: *.log **/.DS_Store
[nodemon] watching: package.json nodemon.json /Users/alex/www/Node/Personal/express-github-login/server/**/* .eslintrc
[nodemon] watching extensions: js,json
[nodemon] starting `eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js --debug server/server.js`
[nodemon] spawning
[nodemon] child pid: 30183
[nodemon] watching 8 files

1.15.1

https://github.com/alexilyaev/express-github-login/tree/nodemon-v1.15.1

[nodemon] 1.15.1
[nodemon] reading config ./nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 31199 to restart
[nodemon] ignoring: *.log **/.DS_Store
[nodemon] watching: package.json nodemon.json /Users/alex/www/Node/Personal/express-github-login/server/**/* .eslintrc
[nodemon] watching extensions: js,json
[nodemon] starting `eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js --debug server/server.js`
[nodemon] spawning
[nodemon] child pid: 31201
[nodemon] watching 34 files

1.17.1

https://github.com/alexilyaev/express-github-login/tree/nodemon-v1.17.1

[nodemon] 1.17.1
[nodemon] reading config ./nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 33032 to restart
[nodemon] ignoring: *.log **/.DS_Store
[nodemon] watching: package.json nodemon.json /Users/alex/www/Node/Personal/express-github-login/server/**/* .eslintrc
[nodemon] watching extensions: js,json
[nodemon] starting `eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js --debug server/server.js`
[nodemon] spawning
[nodemon] child pid: 33034
[nodemon] watching 34 files

Note

If I remove the single file matches it works ok.


If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.

@alexilyaev
Copy link
Author

@remy This is still an issue...

1.17.5

https://github.com/alexilyaev/express-github-login/tree/nodemon-v1.17.5

[nodemon] 1.17.5
[nodemon] reading config ./nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 45850 to restart
[nodemon] ignoring: *.log **/.DS_Store
[nodemon] watching: package.json nodemon.json /Users/alex/www/Node/Personal/express-github-login/server/**/* .eslintrc
[nodemon] watching extensions: js,json
[nodemon] starting `eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js --debug server/server.js`
[nodemon] spawning
[nodemon] child pid: 45852
[nodemon] watching 29 files

Dunp

[nodemon] 1.17.5
[nodemon] reading config ./nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 45874 to restart
[nodemon] ignoring: *.log **/.DS_Store
[nodemon] watching: package.json nodemon.json /Users/alex/www/Node/Personal/express-github-login/server/**/* .eslintrc
[nodemon] watching extensions: js,json
--------------
node: v10.3.0
nodemon: 1.17.5
command: /usr/local/bin/node /Users/alex/www/Node/Personal/express-github-login/node_modules/.bin/nodemon --debug server/server.js --dump
cwd: /Users/alex/www/Node/Personal/express-github-login
OS: darwin x64
--------------
{ run: false,
  system:
   { cwd: '/Users/alex/www/Node/Personal/express-github-login' },
  required: false,
  dirs:
   [ '/Users/alex/www/Node/Personal/express-github-login/package.json',
     '/Users/alex/www/Node/Personal/express-github-login/nodemon.json',
     '/Users/alex/www/Node/Personal/express-github-login/server',
     '/Users/alex/www/Node/Personal/express-github-login/.eslintrc' ],
  timeout: 1000,
  options:
   { dump: true,
     verbose: true,
     ignore:
      [ '**/.git/**',
        '**/.nyc_output/**',
        '**/.sass-cache/**',
        '**/bower_components/**',
        '**/coverage/**',
        '**/node_modules/**',
        '*.log',
        '**/.DS_Store',
        re: /.*.*\/\.git\/.*.*|.*.*\/\.nyc_output\/.*.*|.*.*\/\.sass\-cache\/.*.*|.*.*\/bower_components\/.*.*|.*.*\/coverage\/.*.*|.*.*\/node_modules\/.*.*|.*\.log|.*.*\/\.DS_Store/ ],
     exec:
      'eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js',
     watch:
      [ 'package.json',
        'nodemon.json',
        'server/',
        '.eslintrc',
        re: /package\.json|nodemon\.json|server\/|\.eslintrc/ ],
     ignoreRoot:
      [ '**/.git/**',
        '**/.nyc_output/**',
        '**/.sass-cache/**',
        '**/bower_components/**',
        '**/coverage/**',
        '**/node_modules/**' ],
     restartable: 'rs',
     colours: true,
     execMap: { py: 'python', rb: 'ruby' },
     stdin: true,
     runOnChangeOnly: false,
     signal: 'SIGUSR2',
     stdout: true,
     watchOptions: {},
     execOptions:
      { script: 'server/server.js',
        exec:
         'eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js',
        args: [ '--debug' ],
        scriptPosition: 1,
        nodeArgs: undefined,
        execArgs: [],
        ext: 'js,json',
        env: {} },
     monitor:
      [ 'package.json',
        'nodemon.json',
        '/Users/alex/www/Node/Personal/express-github-login/server/**/*',
        '.eslintrc',
        '!**/.git/**',
        '!**/.nyc_output/**',
        '!**/.sass-cache/**',
        '!**/bower_components/**',
        '!**/coverage/**',
        '!**/node_modules/**',
        '!*.log',
        '!**/.DS_Store' ] },
  load: [Function],
  reset: [Function: reset],
  lastStarted: 0,
  loaded:
   [ '/Users/alex/www/Node/Personal/express-github-login/nodemon.json' ],
  watchInterval: null,
  signal: 'SIGUSR2',
  command:
   { raw:
      { executable:
         'eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js',
        args: [ '--debug', 'server/server.js' ] },
     string:
      'eslint -c .eslintrc --ignore-path .gitignore . && node server/server.js --debug server/server.js' } }
--------------
[nodemon] exiting

@baileyandy
Copy link

I saw and reported the same behaviour before - see #1320 (specifically my comment). Including a file in the watch list causes the entire project project directory to be watched for me.

@stale
Copy link

stale bot commented Jun 25, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Jun 25, 2018
@alexilyaev
Copy link
Author

@remy The stale bot compelled me to mention you :-)

@stale stale bot removed the stale no activity for 2 weeks label Jun 25, 2018
@stale
Copy link

stale bot commented Jul 9, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Jul 9, 2018
@remy
Copy link
Owner

remy commented Jul 10, 2018

Wow, stalebot is persistant.

This is related to #1320

When watching a file, nodemon switches to watching the dir, and then recursively watches the sub dirs.

@stale stale bot removed the stale no activity for 2 weeks label Jul 10, 2018
@remy remy added the has PR label Jul 10, 2018
@alexilyaev
Copy link
Author

Confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants