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

Fix use of --all when instrumentation is disabled #482

Merged
merged 1 commit into from Jan 17, 2017

Conversation

wbyoung
Copy link
Contributor

@wbyoung wbyoung commented Jan 6, 2017

This allows the use of --all with babel-transform-istanbul, for instance.

This allows the use of --all with `babel-transform-istanbul`, for
instance.
@coveralls
Copy link

coveralls commented Jan 6, 2017

Coverage Status

Changes Unknown when pulling 384aef8 on wbyoung:fix-noop-all into ** on istanbuljs:master**.

@bcoe
Copy link
Member

bcoe commented Jan 16, 2017

@wbyoung this looks good; seems like adding empty coverage is pretty cheap, and if it corrects some upstream bugs worth doing.

how hard would it be to add an integration test; even if it's just in the cli test suite.

@wbyoung
Copy link
Contributor Author

wbyoung commented Jan 17, 2017

@bcoe I gave it a shot, but after copying one of the other tests that seemed related, I wasn't able to get it failing as expected with the current code.

I can try again when I have some free time if it's important. Any suggestions on which test to model it after?

@bcoe
Copy link
Member

bcoe commented Jan 17, 2017

@wbyoung I don't think this needs to be a blocker; could you provide an example using babel-transform-istanbul that fails without the FileCoverage object being instantiated?

@wbyoung
Copy link
Contributor Author

wbyoung commented Jan 17, 2017

@bcoe see https://github.com/wbyoung/nyc-issue-482-example and the fact that src/not-included.js is not part of the test result files.

@bcoe bcoe merged commit 8c58d68 into istanbuljs:master Jan 17, 2017
@wbyoung wbyoung deleted the fix-noop-all branch January 18, 2017 04:15
@wbyoung
Copy link
Contributor Author

wbyoung commented Jan 18, 2017

FYI, the comment I left over here about the builds wbyoung/relateify#1 and wbyoung/babel-plugin-transform-postcss#3 failing appears to be "fixed" by removing the all config option, so it's probably more related to this PR.

@bcoe
Copy link
Member

bcoe commented Jan 18, 2017

see: istanbuljs-archived-repos/istanbul-lib-coverage#5

landing a hot-fix now.

bcoe pushed a commit that referenced this pull request Jan 18, 2017
@bcoe
Copy link
Member

bcoe commented Jan 18, 2017

@wbyoung this hot-fix didn't do the trick; it seems as though defaulting to an empty FileCoverage report causes quite a few issues when the file is then, in turn, covered later on.

I'm rolling back this change for the time being -- I don't think it should actually be necessary if we can get --all walking all the files in a project appropriately.

@bcoe
Copy link
Member

bcoe commented Jan 18, 2017

@wbyoung nyc@latest should be fixed 👍

jimthedev pushed a commit to commitizen/cz-cli that referenced this pull request May 24, 2018
This Pull Request updates dependency [nyc](https://github.com/istanbuljs/nyc) from `v10.0.0` to `v10.3.2`



<details>
<summary>Release Notes</summary>

### [`v10.3.2`](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#&#8203;1100httpsgithubcomistanbuljsnyccomparev1032v1100-2017-05-31)
[Compare Source](istanbuljs/nyc@e062a86...v10.3.2)
##### Bug Fixes

* add support for ES6 modules ([f18f780](istanbuljs/nyc@f18f780))
##### Features

* allow .nycrc.json ([#&#8203;580](`istanbuljs/nyc#580)) ([a1a457f](istanbuljs/nyc@a1a457f))
* upgrade to version of yargs with support for presets ([33829b8](istanbuljs/nyc@33829b8))
##### BREAKING CHANGES

* new version of find-up requires dropping 0.10/0.12 support (which we had already been planning).
#### [10.3.2](istanbuljs/nyc@v10.3.1...v10.3.2) (2017-05-05)
##### Bug Fixes

* we should not create a cache folder if cache is false ([#&#8203;567](`istanbuljs/nyc#567)) ([213206f](istanbuljs/nyc@213206f))
#### [10.3.1](istanbuljs/nyc@v10.3.0...v10.3.1) (2017-05-04)
##### Bug Fixes

* introduced a bug that resulted in source-maps not being loaded approriately on second test run ([#&#8203;566](`istanbuljs/nyc#566)) ([1bf74fd](istanbuljs/nyc@1bf74fd))

---

### [`v10.3.1`](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#&#8203;1032httpsgithubcomistanbuljsnyccomparev1031v1032-2017-05-05)
[Compare Source](istanbuljs/nyc@v10.3.0...v10.3.1)
##### Bug Fixes

* we should not create a cache folder if cache is false ([#&#8203;567](`istanbuljs/nyc#567)) ([213206f](istanbuljs/nyc@213206f))

---

### [`v10.3.0`](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#&#8203;1030httpsgithubcomistanbuljsnyccomparev1020v1030-2017-04-29)
[Compare Source](istanbuljs/nyc@55e826d...v10.3.0)
##### Bug Fixes

* source-maps were not being cached in the parent process when --all was being used ([#&#8203;556](`istanbuljs/nyc#556)) ([ff73b18](istanbuljs/nyc@ff73b18))
##### Features

* add support for --no-clean, to disable deleting raw coverage output ([#&#8203;558](`istanbuljs/nyc#558)) ([1887d1c](istanbuljs/nyc@1887d1c))

---

### [`v10.2.2`](istanbuljs/nyc@2ff8f3b...2ff8f3b)
[Compare Source](istanbuljs/nyc@2ff8f3b...2ff8f3b)


---

### [`v10.2.1`](istanbuljs/nyc@v10.2.0...2ff8f3b)
[Compare Source](istanbuljs/nyc@v10.2.0...2ff8f3b)


---

### [`v10.2.0`](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#&#8203;1030httpsgithubcomistanbuljsnyccomparev1020v1030-2017-04-29)
[Compare Source](istanbuljs/nyc@43535f9...v10.2.0)
##### Bug Fixes

* source-maps were not being cached in the parent process when --all was being used ([#&#8203;556](`istanbuljs/nyc#556)) ([ff73b18](istanbuljs/nyc@ff73b18))
##### Features

* add support for --no-clean, to disable deleting raw coverage output ([#&#8203;558](`istanbuljs/nyc#558)) ([1887d1c](istanbuljs/nyc@1887d1c))

---

### [`v10.1.2`](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#&#8203;1012httpsgithubcomistanbuljsnyccomparev1011v1012-2017-01-18)
[Compare Source](istanbuljs/nyc@e46335f...v10.1.2)
##### Bug Fixes

* revert defaulting to empty file-coverage report, this caused too many issues ([25aec77](istanbuljs/nyc@25aec77))

---

### [`v10.1.0`](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#&#8203;1020httpsgithubcomistanbuljsnyccomparev1010v1020-2017-03-28)
[Compare Source](istanbuljs/nyc@8f7af3a...v10.1.0)
##### Bug Fixes

* fix bug related to merging coverage reports see [#&#8203;482](`istanbuljs/nyc#482) ([81229a0](istanbuljs/nyc@81229a0))
* revert defaulting to empty file-coverage report, this caused too many issues ([25aec77](istanbuljs/nyc@25aec77))
##### Features

* allow babel cache to be enabled ([#&#8203;517](`istanbuljs/nyc#517)) ([98ebdff](istanbuljs/nyc@98ebdff))
* exclude the coverage/ folder by default 🚀 ([#&#8203;502](`istanbuljs/nyc#502)) ([50adde4](istanbuljs/nyc@50adde4))
* upgrade to version of yargs with extend support ([#&#8203;541](`istanbuljs/nyc#541)) ([95cc09a](istanbuljs/nyc@95cc09a))
#### [10.1.2](istanbuljs/nyc@v10.1.1...v10.1.2) (2017-01-18)
##### Bug Fixes

* revert defaulting to empty file-coverage report, this caused too many issues ([25aec77](istanbuljs/nyc@25aec77))
#### [10.1.1](istanbuljs/nyc@v10.1.0...v10.1.1) (2017-01-18)
##### Bug Fixes

* fix bug related to merging coverage reports see [#&#8203;482](`istanbuljs/nyc#482) ([81229a0](istanbuljs/nyc@81229a0))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants