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

feat: Allow nyc instrument to instrument code in place #1149

Merged
merged 3 commits into from Aug 1, 2019

Commits on Jul 21, 2019

  1. feat: Allow nyc instrument to instrument code in place

    This change adds the `--in-place` switch to nyc instrument
    If `--in-place` is specified, the output directory will be set to equal the input directory for the instrument command.
    This has the effect of replacing any file in the input directory that should be instrumented, with its instrumented counterpart.
    The command will throw an error if the --delete option is specified.
    The only way to instrument in place is with the --in-place switch, setting the input and output directories to be the same will not work
    If `--in-place` is set the instrument command ignores any output directory specified with the command
    If `--in-place` is set the instrument command will disable the `--complete-copy` switch as it is unnecessary.
    
    I've made a few small code improvements to the instrument command spec.
    I've also added tests to the old integration tests folder, I figured I could put tests here for the time being before they get moved to the new tap format.
    Andrew Finlay committed Jul 21, 2019
    Copy the full SHA
    6cfbdbb View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2019

  1. Update snapshot and address review concerns

    The instrument --in-place test now runs in a copy of the instrument in place test directory, this means that running tests locally doesn't change your local environment.
    Andrew Finlay committed Jul 22, 2019
    Copy the full SHA
    bfd6e62 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2019

  1. Remove unnecessary console.log statement

    Andrew Finlay committed Jul 31, 2019
    Copy the full SHA
    6b1dbc9 View commit details
    Browse the repository at this point in the history