Skip to content

Suggestion: --exclude-after-remap #224

Closed
@robpalme

Description

@robpalme

The exclusions (--include/--exclude) for the recently introduced --all feature are applied to the executable script paths rather than the source script paths. So when working with compiled code the user needs to know the filepaths of the generated code. This is awkward for users of systems like ours that perform filepath mangling during compilation.

nyc used to have this behavior, but it was swapped via the awesome --exclude-after-remap feature that later became the default behavior via istanbuljs/nyc#1010. So in nyc now, exclusions are applied to the source script paths.

I'd like to propose that c8 should match the nyc behavior. As this would be a breaking change, I guess we should introduce it behind a similar opt-in flag (--exclude-after-remap).

If you are happy with the suggestion, I'll work with @j03m to prepare a PR tomorrow.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions