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

Expand default extension list #1103

Closed
coreyfarrell opened this issue May 6, 2019 · 7 comments · Fixed by #1110 · May be fixed by sthamizhselvan/postManCollection#8
Closed

Expand default extension list #1103

coreyfarrell opened this issue May 6, 2019 · 7 comments · Fixed by #1110 · May be fixed by sthamizhselvan/postManCollection#8

Comments

@coreyfarrell
Copy link
Member

Since enabling --exclude-after-remap we've had some issue with TS projects. We need to add .ts to the default extension list. While we're at it we should also add .cjs and .mjs. Any other extensions we should instrument or report on by default?

This is a potentially breaking change so it will be for nyc@15.

CC @bcoe @JaKXz

@bcoe
Copy link
Member

bcoe commented May 7, 2019

@coreyfarrell this seems like a reasonable list to me 👍

@JaKXz
Copy link
Member

JaKXz commented May 7, 2019

.jsx and .tsx would be good to add

@coreyfarrell
Copy link
Member Author

Additional question, should we continue to "force" .js into the list? Should these other extensions be similarly forced? I'm leaning towards yes for .js and no for others. Though this is inconsistent with how exclude works (replacing defaults), I'd rather not deal with the fallout if some people configured extension: ['.ts'] but need .js to be included.

@bcoe
Copy link
Member

bcoe commented May 8, 2019

I don't know the answer to the forcing question off the top of my head; perhaps when we have a bit of time we could setup a .jsx and .ts repo for both ts-node and an explicit compile step -- see if we can figure out default configuration that works relatively well for both use-cases, and is easy to modify where it doesn't work well.

@Raynos
Copy link

Raynos commented May 27, 2019

I ran into this as well when upgrading nyc. Thanks for fixing this.

@Enet4
Copy link

Enet4 commented Jul 17, 2019

Just to let the devs know that I'm looking forward to a new release of nyc. I was expecting the default extensions to include .ts, but it appears that these changes are still not applicable to the latest version.

@coreyfarrell
Copy link
Member Author

@Enet4 the next release will be semver-major, you can watch for progress at #1104. We're working on it but are still dealing with some blockers. No ETA yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants