-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Not able to exclude from rollup bundle #1099
Comments
The branch that I want to land is AttemptTsAndRollup |
@StoneCypher if you could provide a reduced reproduction it would be helpful. Unfortunately I do not have time to actually test with large projects right now. One thing I noticed immediately, you have
|
Sorry, yeah, I've had it on both booleans and undefined too. That's something I found in a ticket that was later corrected. Removed just now .
I don't know how to exclude something from just a sourcemap. I'd be happy to try if you can tell me what to look for? .
I'll try, but also, if you know a place that has this working already, maybe I can figure it out by staring at their thing |
What I mean is set |
uh. a ... a different piece of source (i don't care if it's covered or not, it's a one-liner) gets removed, but the desired removal does not occur. i had not realized that the target directory needed to be without that exclude:
with it:
|
the difference being that in some sense this makes sense: |
Maybe I misunderstood, looks like the bundles in |
you understand correctly. generated code is in i will exclude |
I have no idea what happened here. I went back that night, tried it, made no change Today I had a few minutes to kill at work while I waited on something, so I tried your instructions again. It just worked? What's weirder, I can look in I assume that what this actually means is that one of my other flailing changes was breaking whatever parsed the config, and that that change wasn't checked in, and since I'm on a different machine, I'm not stuck with it This works fine. I can no longer repro. I will reopen this if the problem returns. I believe this is PEBKAC. Sorry. Thanks for your time |
Explanation
So, there's a couple other issues about this, and one of them seems to suggest this is solved already. I'm not sure if that means my situation is different, or if I used the fix incorrectly, or what.
It doesn't help that my understanding of the situation is shaky.
I am in the process of moving a library from an older build process using
flow
,babel
, andbrowserify
to a newer build process usingtypescript
androllup
. For the most part, the results are much better.I would like to run my existing test set, which performed as 100% coverage under my old setup, to get 100% coverage under my new setup.
Rollup now folds all contents into a single file, in a way that
istanbul
appears to be telling apart possibly through sourcemaps.Problematically, one of the involved files is a generated parser from
peg.js
. Previously, I simply excluded it from my coverage reports, because getting coverage on apeg
parser isn't particularly meaningful or practical. However, as I've moved torollup
, I seem to be unable to find a way to exclude the file.Goal
I would like to exclude
src/js/jssm-dot.js
from my coverage results, so that they can be shipped tocoveralls
.Struggle
I've tried:
--exclude
on the command line-x
on the command line-n
on the command lineexclude:
in a.nycrc
excludes:
in a.nycrc
exclude:
inpackage.json
excludes:
inpackage.json
include:
in.nycrc
exclude-after-remap
, which I believe should betrue
all
, which I believe should befalse
istanbul.yml
exclusionAt all times, the generated parser remains in my coverage, ruining my beautiful 100%.
Research
Issue 1042 seems to suggest that patch 1010 was meant to fix this, with inclusion in
14.0.0
, and seems to have for someone whose situation appears to be similar to my own. It looks like this is what pull 982 and pull 275 on istanbul support.I wasn't able to understand whether pull 1007 was relevant.
I think issue 956 is something different, though I'm not really sure.
Issue 953 seems tangentially related but points to the same 1010 resolution as the others.
Config
I have upgraded to
14.1.0
(which is current as of writing - I was on 11 prior to this refab) andava 1.4.1
(was on 0.22.0).Repo for reference
You can see 100% coverage here and the drop to 77% here. That drop is entirely about being unable to exclude the 2 megabyte generated
peg
parser.Mainline coveralls at 100%, branch coveralls at 77%.
Appeal
Can you help me? I think I'm missing something.☹️
The text was updated successfully, but these errors were encountered: