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

coverage map path in extended configs should be relative to the extended config, not the original config #1023

Open
isaacs opened this issue Apr 25, 2024 · 0 comments
Labels
approved feature a feature that is a good idea and will be accepted, but might not yet be planned feature a thing you'd like to see plan a feature that is accepted and planned

Comments

@isaacs
Copy link
Member

isaacs commented Apr 25, 2024

I have a monorepo where each workspace has "tap": { "extends": "../../.taprc" } in their package.json.

Then, in the root, i have a ./coverage-map.js and a .taprc. I'd like that .taprc to have coverage-map: ./coverage-map.js, but that would be wrong, because it'd resolve the file against the original config, not the extended config.

This makes it annoying to have a package or other external config that contains a coverage map, because it'd have to know where it's being imported from.

Solution: coverage-map config should be resolved against the config being applied. Same with a reporter that's a relative path.

The include and exclude should still be relative to the project, because that's where they'd live, not in an extended config.

@isaacs isaacs added approved feature a feature that is a good idea and will be accepted, but might not yet be planned plan a feature that is accepted and planned feature a thing you'd like to see labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved feature a feature that is a good idea and will be accepted, but might not yet be planned feature a thing you'd like to see plan a feature that is accepted and planned
Projects
None yet
Development

No branches or pull requests

1 participant