feat: Add cache... options for instrument command#9
Conversation
| instrument: [null, 'instrument'], | ||
| checkCoverage: [null, 'report', 'check-coverage'], | ||
| report: [null, 'report'], | ||
| cache: [null, 'instrument'], |
There was a problem hiding this comment.
This is not needed as we can just use nycCommands.instrument (see suggested code changes below).
There was a problem hiding this comment.
I've pushed up the recommended changes, but I'm still a little confused as to the purpose of the nycCommands block at the top of the schema file. What does it do?
There was a problem hiding this comment.
It serves the same purpose as code such as const MAGIC_VALUE = 53;. Instead of repeating [null, 'instrument'] for each option we reference nycCommands.instrument. This module was created without much feedback so if you have suggestions for how to improve the code readability I'm 👍, but any such changes would need to be a separate PR.
Makes the 'cache' and 'cacheDir' options available for the instrument command
b9c28eb to
41591d3
Compare
|
@AndrewFinlay thanks for the PR. I'm buried with $dayjob work currently, it'll take me some time to move forward with merging this. Once the matching nyc PR is fixed I will try setting aside time to take another look. |
|
No worries @coreyfarrell, that sounds good and I'm not in any particular rush. I'll try and progress it, take a look when you have some time. |
Makes the
cacheandcacheDiroptions available for the instrument command.This change is a prerequisite to implementing this functionality in
nyc. There will be a PR in thenycrepo accompanying this PR.