-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
chore: switch nyc to c8 #16263
chore: switch nyc to c8 #16263
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coverage summary looks significantly different?
This branch (c8):
=============================== Coverage summary ===============================
Statements : 99.09% ( 76580/77279 )
Branches : 98.27% ( 14688/14946 )
Functions : 99% ( 3200/3232 )
Lines : 99.09% ( 76580/77279 )
================================================================================
main branch (nyc):
=============================== Coverage summary ===============================
Statements : 98.53% ( 16639/16886 )
Branches : 97.31% ( 13882/14265 )
Functions : 99.27% ( 3717/3744 )
Lines : 98.53% ( 16367/16611 )
================================================================================
not sure why, I'll try to investigate it later. |
I had compared the 2 result: seems c8 has differently counted linebreaks/comments(as it's using Node.js' built in functionality). another issue is related to v8 itself: bcoe/c8#227 |
Yeah, nyc uses instrumentation, which can affect the results. I think c8 is likely more accurate than nyc was. |
f0f1a30
to
d0808c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just want another set of eyes to review before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, nyc uses instrumentation, which can affect the results. I think c8 is likely more accurate than nyc was.
Just out of curiosity - more accurate in what way? With istanbul it's possible to be very precise where exactly the coverage is wanted to collect from. Native v8 coverage doesn't provide such control. Also processing the v8's results seems very difficult and is thus limited.
There is a great summary from jest regarding istanbul -> c8 migrations, jestjs/jest#11188. This explains some of the coverage differences between the two.
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
@AriPerkkio One thing I should have mentioned earilier: the main reason migrating to c8 is we want to migrate eslint codebase to esm: #15560 |
it does not have an `else`, so seems no longer needed.
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | patch | [`8.23.0` -> `8.23.1`](https://renovatebot.com/diffs/npm/eslint/8.23.0/8.23.1) | --- ### Release Notes <details> <summary>eslint/eslint</summary> ### [`v8.23.1`](https://github.com/eslint/eslint/releases/tag/v8.23.1) [Compare Source](eslint/eslint@v8.23.0...v8.23.1) #### Bug Fixes - [`b719893`](eslint/eslint@b719893) fix: Upgrade eslintrc to stop redefining plugins ([#​16297](eslint/eslint#16297)) (Brandon Mills) - [`734b54e`](eslint/eslint@734b54e) fix: improve autofix for the `prefer-const` rule ([#​16292](eslint/eslint#16292)) (Nitin Kumar) - [`6a923ff`](eslint/eslint@6a923ff) fix: Ensure that glob patterns are normalized ([#​16287](eslint/eslint#16287)) (Nicholas C. Zakas) - [`c6900f8`](eslint/eslint@c6900f8) fix: Ensure globbing doesn't include subdirectories ([#​16272](eslint/eslint#16272)) (Nicholas C. Zakas) #### Documentation - [`16cba3f`](eslint/eslint@16cba3f) docs: fix mobile double tap issue ([#​16293](eslint/eslint#16293)) (Sam Chen) - [`e098b5f`](eslint/eslint@e098b5f) docs: keyboard control to search results ([#​16222](eslint/eslint#16222)) (Shanmughapriyan S) - [`1b5b2a7`](eslint/eslint@1b5b2a7) docs: add Consolas font and prioritize resource loading ([#​16225](eslint/eslint#16225)) (Amaresh S M) - [`1ae8236`](eslint/eslint@1ae8236) docs: copy & use main package version in docs on release ([#​16252](eslint/eslint#16252)) (Jugal Thakkar) - [`279f0af`](eslint/eslint@279f0af) docs: Improve id-denylist documentation ([#​16223](eslint/eslint#16223)) (Mert Ciflikli) #### Chores - [`38e8171`](eslint/eslint@38e8171) perf: migrate rbTree to js-sdsl ([#​16267](eslint/eslint#16267)) (Zilong Yao) - [`1c388fb`](eslint/eslint@1c388fb) chore: switch nyc to c8 ([#​16263](eslint/eslint#16263)) (唯然) - [`67db10c`](eslint/eslint@67db10c) chore: enable linting `.eleventy.js` again ([#​16274](eslint/eslint#16274)) (Milos Djermanovic) - [`42bfbd7`](eslint/eslint@42bfbd7) chore: fix `npm run perf` crashes ([#​16258](eslint/eslint#16258)) (唯然) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTQuNSIsInVwZGF0ZWRJblZlciI6IjMyLjE5NC41In0=--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1543 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ x] Other, please explain:
What changes did you make? (Give an overview)
change nyc => c8, just like we had done in other eslint repos like eslint/eslintrc, eslint/espree.
Is there anything you'd like reviewers to focus on?
I encountered an issue: bcoe/c8#411, but seems it has been fixed after upgrade c8 to v7.12.0(latest).