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

Migrate to use nyc from istanbul #375

Closed
RinMinase opened this issue Apr 4, 2019 · 8 comments
Closed

Migrate to use nyc from istanbul #375

RinMinase opened this issue Apr 4, 2019 · 8 comments

Comments

@RinMinase
Copy link

Upon installing, this shows up:

warning karma-coverage > istanbul@0.4.5: 
This module is no longer maintained, try this instead:
  npm i nyc

Would it be possible to move to use nyc instead of istanbul?

@dogoku
Copy link

dogoku commented Apr 10, 2019

I believe that warning is misleading, sincenycis a command line tool.
What we probably need is to migrate to one of the other istanbul packages like istanbul-api or istanbul-coverage

There's another karma istanbul reporter, that uses the istanbul-api
https://github.com/mattlewis92/karma-coverage-istanbul-reporter/blob/master/src/reporter.js

@coreyfarrell
Copy link

istanbul was also a command-line tool but yes the warning is inaccurate for how karma-coverage uses it. Just to give you heads up we are planning to deprecate istanbul-api after the current semver-major. A big part of the reason is that when we upgrade istanbul-lib-source-maps to use source-map@^0.7.3 this will force some of those API's to become async. Many of the most commonly used parts of istanbul-api simply re-export the real modules. The modules which would likely be used by this module:

  • istanbul-lib-instrument - modify sources to include coverage counters (alt babel-plugin-istanbul if babel is being used)
  • istanbul-lib-coverage - merge coverage results from multiple tests into a single dataset for reporting
  • istanbul-lib-source-maps - process source-maps before generating reports
  • istanbul-lib-report - the reporting system
  • istanbul-reports - these are the actual reports (text-summary report, html report, etc)

I noticed this bug while investigating another issue and wanted to share my knowledge of future plans so you don't switch to a module that we intend to stop supporting.

@dogoku
Copy link

dogoku commented Apr 10, 2019

haha, i was planning to work on a PR, glad you did

@Goran216
Copy link

Is there any work in progress to migrate to use nyc?

@dogoku
Copy link

dogoku commented Aug 20, 2019

Is there any work in progress to migrate to use nyc?

PR #377 has already done the work, it just needs to be released

@dogoku
Copy link

dogoku commented Aug 20, 2019

no idea, maybe ask the maintainer @johnjbarton.
also try to sound less entitled next time. people are doing this in their own time, they have no obligation to serve your timeline...

@RinMinase
Copy link
Author

RinMinase commented Aug 24, 2019

Since #377 has been merged and released on v2.0.0 🎊, issue has been addressed. I'm now closing this issue. Cheers! 😁

@Aaronius
Copy link

When I install karma-coverage 2.0.1, I'm still seeing:

npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated   npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.

If I run npm ls istanbul, I see the following:

@adobe/alloy@0.0.1-alpha.8 /Users/aahardy/dev/alloy
└─┬ karma-coverage@2.0.1
  └── istanbul@0.4.5 

and in package-lock.json, I see:

    "karma-coverage": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.0.1.tgz",
      "integrity": "sha512-SnFkHsnLsaXfxkey51rRN9JDLAEKYW2Lb0qOEvcruukk0NkSNDkjobNDZPt9Ni3kIhLZkLtpGOz661hN7OaZvQ==",
      "dev": true,
      "requires": {
        "dateformat": "^1.0.6",
        "istanbul": "^0.4.0",
        "istanbul-lib-coverage": "^2.0.5",
        "istanbul-lib-instrument": "^3.3.0",
        "istanbul-lib-report": "^2.0.8",
        "istanbul-lib-source-maps": "^3.0.6",
        "istanbul-reports": "^2.2.4",
        "lodash": "^4.17.11",
        "minimatch": "^3.0.0",
        "source-map": "^0.5.1"
      }
    },

I'm not sure why istanbul is marked as required there.

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

No branches or pull requests

5 participants