Skip to content

feat: add istanbul-lib-coverage to preferred replacements - #1028

Open
ChrisJr404 wants to merge 2 commits into
e18e:mainfrom
ChrisJr404:istanbul-lib-coverage-replacement
Open

feat: add istanbul-lib-coverage to preferred replacements#1028
ChrisJr404 wants to merge 2 commits into
e18e:mainfrom
ChrisJr404:istanbul-lib-coverage-replacement

Conversation

@ChrisJr404

Copy link
Copy Markdown

Adds istanbul-lib-coverage to the preferred manifest, pointing at the maintained @vitest/istanbul-lib-coverage fork, since the original is no longer maintained.

The fork keeps the same API so migrating is mostly just swapping the import, and it ships as ESM with its own types. I added a docs page covering that.

Closes #993

@gameroman

Copy link
Copy Markdown
Contributor

Should we also add other istanbul-* packages in the same PR?

@dreyfus92 dreyfus92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @ChrisJr404 for putting this together, and @AriPerkkio for the quick review.

one thing I was wondering about while reading the docs page: the fork has engines: node >=22 and ships ESM-only, which is a bigger jump than "just swap the import" for some projects. would it be worth a line or two mentioning that, so people on older Node or CJS aren't caught off guard?

@gameroman good call on the other istanbul-* packages, but i'd rather keep this PR scoped to istanbul-lib-coverage since the linked issue covers just this one and it's already approved. would you mind opening a tracking issue for the rest?

Comment thread docs/modules/istanbul-lib-coverage.md Outdated
@@ -0,0 +1,31 @@
---
description: Replace the unmaintained istanbul-lib-coverage package with the maintained @vitest/istanbul-lib-coverage fork

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be worded similar to the others, "Modern alternatives to ..."

Comment thread docs/modules/istanbul-lib-coverage.md Outdated

# Replacements for `istanbul-lib-coverage`

`istanbul-lib-coverage` is no longer maintained. The Vitest team publishes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the context around the vitest fork should be in the vitest section, leaving only the "no longer maintained" message here i think

@ChrisJr404

Copy link
Copy Markdown
Author

Updated the doc per the review:

  • Frontmatter now uses the "Modern alternatives to ..." wording like the other pages.
  • The intro is just the "no longer maintained" line; the fork context now lives under the @vitest/istanbul-lib-coverage section.
  • Added a note that the fork is ESM-only and sets engines.node to >=22, so it is a bigger jump than a plain import swap for CommonJS or older-Node projects (thanks @dreyfus92).

@gameroman I'd like to keep this PR scoped to istanbul-lib-coverage since that is what the linked issue covers; happy to see the other istanbul-* packages tracked separately.

Heads up on the validate check: it fails because @vitest/istanbul-lib-coverage is at ~1.9k weekly downloads, under the 10k threshold in scripts/validate-pr.ts. That is a policy call on a maintained-but-low-traffic fork rather than something I can change, so I will leave that decision to you all.

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.

[Replacement]: istanbul-lib-coverage

5 participants