-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add filterNodeArgumentsForWorkerThreads
option
#3336
Conversation
Conforms to eslint rule for safe Array#filter usage.
Necessary due to default being removed, in favor of explicit filtered execArgv constructed at higher level.
This check is failing: Install and test AVA / Install dependencies without using a lockfile (pull_request) I'm not clear why, and the new tests passed in the log. Is it possible this failure is unrelated? |
Co-authored-by: Tommy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Don't worry about unrelated test breakage, I can resolve those.
Co-authored-by: Mark Wubben <[email protected]>
The Linux tests compare reporter output against a known-good version. That specific suite only runs on Linux because it's finicky enough as it is, without adding other environments into the mix. However, it's failing through what looks like a change in this PR:
|
Not really sure what to change here but I'm moving toward an internal test runner anyway so I'm just dropping it. |
That's fine, I can take over. |
lib/fork.js
Outdated
@@ -60,7 +60,7 @@ const createWorker = (options, execArgv) => { | |||
}; | |||
}; | |||
|
|||
export default function loadFork(file, options, execArgv = process.execArgv) { | |||
export default function loadFork(file, options, execArgv) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default assignment is still required.
threadArgumentsFilter
optionfilterNodeArgumentsForWorkerThreads
option
Adds a configuration option
threadArgumentsFilter
for filteringnodeArguments
sent to worker threads. The option is supported only in config files due to accepting a function. When threads are disabled, the filter is ignored and the full unfiltered list of arguments is sent to worker processes.main
is currently failing tests. This patch adds no new failures. All new tests pass. The new feature is documented in06-configuration.md
.This enabled me to use natives syntax in threads.
Closes #3207.