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

List of patterns to preprocess are saved in a closure too early #1340

Closed
andersekdahl opened this issue Mar 7, 2015 · 0 comments · Fixed by #1341 · May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Closed

Comments

@andersekdahl
Copy link
Contributor

Currently the config value for which files to preprocess are saved in a closure when a preprocessor is created. Which means that if a pattern is removed or added after the preprocessor is created, the new pattern is missed because the patterns were saved in a closure.

This is an issue when you're creating a plugin and you want to add a file that you also want to preprocess. That is, in your framework factory function, you add an entry to config.files and add an entry to config.preprocessors for that file. Because of this bug, the preprocessor is never run for the added file.

andersekdahl added a commit to andersekdahl/karma that referenced this issue Mar 7, 2015
Don't lookup the list of patterns of files to preprocess until the
preprocessor is called. This because patterns might be added after the
preprocessor is created, and those will be missed if the patterns are
looked up too early.

Closes karma-runner#1340
andersekdahl added a commit to andersekdahl/karma-common-js that referenced this issue Mar 7, 2015
Don't expose Buffer by replacing use with a require call, but
expose Buffer and process as real globals instead, since they are
globals in Node.js.

Note that this depends on these issues to be fixed:
karma-runner/karma#1340
alexgorbatchev/node-browser-builtins#50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant