Skip to content

fix: resolve socket.dev supply chain alerts and slim npm package#2

Merged
SUP2Ak merged 5 commits into
mainfrom
fix/socket-supply-chain
Apr 25, 2026
Merged

fix: resolve socket.dev supply chain alerts and slim npm package#2
SUP2Ak merged 5 commits into
mainfrom
fix/socket-supply-chain

Conversation

@SUP2Ak

@SUP2Ak SUP2Ak commented Apr 25, 2026

Copy link
Copy Markdown
Owner

What changed

socket.dev supply chain alerts (score: 77 → expected improvement)

Alert 1 — Environment variables (dist/dev.js): dev.ts read the
custom MATCHIGO_DEV env var, which socket.dev flags as a supply chain
risk. Removed it — NODE_ENV (production/prod) is the sole control
now. Updated both READMEs and the silenceWarnings() hint accordingly.

Alert 2 — URL strings (P.union JSDoc): The string "http-verb" in
the example triggered socket.dev's URL detector (false positive — starts
with http). Replaced with "method".

npm package hygiene

  • Expanded keywords from 6 to 18 for better search visibility
    (dispatch, compile, rule-engine, narrowing,
    discriminated-union, zero-dependency, bun, node, …).
  • Removed src/, FAQ.md, FAQ.fr.md, CONTRIBUTING.md,
    CONTRIBUTING.fr.md from the published bundle. End-users only need
    dist/ + 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

  • No engine files touched — no bench delta needed.
  • No runtime-facing change — no new tests needed.

SUP2Ak added 5 commits April 25, 2026 12:18
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.
@SUP2Ak SUP2Ak added documentation Improvements or additions to documentation security chore labels Apr 25, 2026
@SUP2Ak SUP2Ak merged commit ca2476d into main Apr 25, 2026
1 check passed
@SUP2Ak SUP2Ak deleted the fix/socket-supply-chain branch April 25, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore documentation Improvements or additions to documentation security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant