Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Make npm run-script completion faster with `jq` #4241
When jq is available, it's actually faster to invoke jq and parse the
Also, prior to this commit, both
When jq is available, it's actually faster to invoke jq and parse the `package.json` invoking the `npm` command. Also, prior to this commit, both `__fish_complete_npm` and `__fish_npm_run` were being run whenever completions for `npm run` subcommand was being used, which was actually making repetitive work (invoking npm command twice). This pull request is supposed to make completion without `jq` faster as well
Ideally, yes. But at this time we do not have any unit tests specifically for completions. If you think you can implement unit tests for your completions we would be happy to consider how that could be expanded to all completion scripts.
We do that via
The real problem with tests for completions is a different one:
Currently, this hasn't been done. I'd appreciate any good ideas.
@faho I've refactor my original pull request. Would you be kind to take a look?
Regarding completion testing, would it be reasonable to use docker as a dependency for testing the project?
By doing so, it would be possible to many different test environments, so it would be possible to test completions.
Also, I think it would be pretty straightforward to execute only one test script using docker, or maybe skip completion testing in the main test suite. What do you think?
That could be accomplished with a fixtures directory. Would be complicated, but doable, I think.
By using docker, we could guarantee we're always testing the same environment.
Anyhow, all of these look like a lot of changes for a simple pull request regarding a small completion improvement. Maybe we could foward this discussion to an issue?