fix: resolve socket.dev supply chain alerts and slim npm package#2
Merged
Conversation
Custom env var access was flagged by socket.dev supply chain scanner. NODE_ENV is the standard way to detect production; the custom var added no meaningful control that NODE_ENV doesn't already provide. Closes socket.dev alert: Environment variables — dist/dev.js
The string "http-verb" starts with "http" and was triggering socket.dev's URL-strings supply chain alert (false positive). Replace with "method", which conveys the same intent without the false URL pattern. Closes socket.dev alert: URL strings — Package overview
The MATCHIGO_DEV env var was removed in the previous fix(dev) commit. Update both EN and FR READMEs to reflect that NODE_ENV is the sole mechanism for controlling dev warnings.
Add terms that reflect the actual architecture (compile, dispatch, rule-engine, data-driven) and common search intents (switch, discriminated-union, narrowing, zero-dependency, bun, node).
Remove src/, FAQ, and CONTRIBUTING files from npm bundle. End-users only need dist/ + READMEs + LICENSE. Everything else is for contributors and lives on GitHub.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
socket.dev supply chain alerts (score: 77 → expected improvement)
Alert 1 — Environment variables (
dist/dev.js):dev.tsread thecustom
MATCHIGO_DEVenv var, which socket.dev flags as a supply chainrisk. Removed it —
NODE_ENV(production/prod) is the sole controlnow. Updated both READMEs and the
silenceWarnings()hint accordingly.Alert 2 — URL strings (
P.unionJSDoc): The string"http-verb"inthe example triggered socket.dev's URL detector (false positive — starts
with
http). Replaced with"method".npm package hygiene
keywordsfrom 6 to 18 for better search visibility(
dispatch,compile,rule-engine,narrowing,discriminated-union,zero-dependency,bun,node, …).src/,FAQ.md,FAQ.fr.md,CONTRIBUTING.md,CONTRIBUTING.fr.mdfrom the published bundle. End-users only needdist/+ READMEs +LICENSE— everything else lives on GitHub.Why
socket.dev flagged these on the 1.0.0 release. No logic change, no API
change, no breaking change.
Checklist