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

Add friendly error for npm bug #5267

Merged

Conversation

sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Nov 23, 2023

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

npm has a bug related to optional dependencies (npm/cli#4828).
I reproduced this bug with npm@10.1.0, npm@9.8.1, npm@8.19.4.

This PR adds a message about that when the optional dependency was not found.

Copy link

vercel bot commented Nov 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2023 5:27am

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (2e94641) 98.87% compared to head (074547f) 98.86%.

❗ Current head 074547f differs from pull request most recent head a98219f. Consider uploading reports for the commit a98219f to get more accurate results

Files Patch % Lines
native.js 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5267      +/-   ##
==========================================
- Coverage   98.87%   98.86%   -0.02%     
==========================================
  Files         232      232              
  Lines        8946     8950       +4     
  Branches     2334     2334              
==========================================
+ Hits         8845     8848       +3     
- Misses         42       43       +1     
  Partials       59       59              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

native.js Outdated Show resolved Hide resolved
Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
@lukastaegert lukastaegert merged commit 465ae03 into rollup:master Nov 25, 2023
6 of 7 checks passed
Copy link

This PR has been released as part of rollup@4.6.0. You can test it via npm install rollup.

@sapphi-red sapphi-red deleted the feat/add-friendly-error-for-npm-bug branch November 27, 2023 06:57
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

2 participants