Skip to content

Conversation

@devdumpling
Copy link
Contributor

@devdumpling devdumpling commented Jan 24, 2026

Overview

I've been spending some time trying to better understand the repo and like to start by running tests to get a sense of where testing is at.

However, I was hitting quite a bit of noise, and noticed it seems to be mostly two issues:

double sharp dep

We have two versions of sharp being installed by dependencies, which is then causing objc to complain down the line. I'd think it's safe to resolve this by overriding the sharp dep. It's only a single minor diff between the two if you look at pnpm why sharp -r. Doing this both resolves the issue and cleans up the double dep.

Additionally, I've pinned the onlyBuiltDeps to specific versions. This is a recent pnpm feature that I've been implementing at work since there have been a lot of accidental builds (e.g. shai hulud). pnpm already catches a lot, but this makes it even more explicit.

vitest / rolldown unable to parse issues

Currently if you run pnpm test:unit you'll get a slew of noise around parsing errors. I believe what's happening is that they're trying to parse coverage for some top level async await patterns in specific files. This might be fixed by moving from v8 as the provider to istanbul, but didn't want to shake it up too much.

I thought for now it might be reasonable to simply ignore the offending files from coverage to limit the noise, but if people feel this loss of visibility is dangerous (it only affects coverage) or illusory, then we can keep it off.

Before / After

This is what you see before (note all the parsing noise that makes TDD hard if you're into that)

Screen.Recording.2026-01-24.at.5.38.07.PM.mov

aaaaand after!

Screen.Recording.2026-01-24.at.5.39.18.PM.mov

@vercel
Copy link

vercel bot commented Jan 24, 2026

@devdumpling is attempting to deploy a commit to the danielroe Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedlint-staged@​16.2.710010010089100

View full report

@devdumpling devdumpling mentioned this pull request Jan 24, 2026
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

so much nicer - thank you! ❤️

@danielroe danielroe merged commit 5b618d8 into npmx-dev:main Jan 24, 2026
7 of 8 checks passed
vinnymac pushed a commit to vinnymac/npmx.dev that referenced this pull request Jan 28, 2026
Comment on lines +43 to +54
// Exclude files that cause parse errors during coverage remapping.
// The V8 coverage provider uses rolldown to parse source files, but
// rolldown seems to currently fail on Vite's SSR transform output (`await __vite_ssr_import__`).
exclude: [
'**/node_modules/**',
'cli/**',
'server/utils/readme.ts',
'server/utils/code-highlight.ts',
'server/utils/npm.ts',
'server/utils/shiki.ts',
'server/utils/jsr.ts',
],

Choose a reason for hiding this comment

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

Sorry to ping on closed PR @devdumpling - happy to discuss this else where too.

How do I reproduce these errors? Even after removing the exclude array here I don't see any parsing errors 🤔

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.

3 participants