release: 1.0.1 — instant cards + Node 20 - #51
Merged
Merged
Conversation
card UX: - `npx mcp-context-card card` at a terminal now writes context-card.html and opens it in the browser (no host, no redirect). Piped / redirected / --stdout keep the raw-HTML-to-stdout path unchanged. - a bare `card` run used to dump raw HTML at the prompt — noise. Node 20: - engines.node ">=22" -> ">=20". Nothing in the code needed 22; the published package runs identically on Node 20 (verified). Ends `npm warn EBADENGINE` on the current LTS. - CI node matrix 22 -> [20, 22, 24] across all three OSes. - new scripts/check-engines.mjs (engines:check, wired into CI + prepublishOnly): the engines floor must equal the lowest Node in the CI matrix, and be an even (LTS) major. Guards against another casual floor bump that CI never exercises. No API change. Nine tools, three concerns, two transports, two discovery mechanisms — as 1.0.0. 104/104 tests, tsc clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aij9ReMwQeQTVSnYUZ4Qdt
The test-runner glob arg and --test-coverage-* flags need Node 22.5/22.8. The shipped code runs on Node 20 (verified) — so the Node 20 matrix job now proves the published entry points (--version / --help / card) and the end-to-end demo, while 22/24 run the coverage-gated unit suite. This IS the "terminal test on release" gate: the npx entry path exercised on the engines floor, every CI run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aij9ReMwQeQTVSnYUZ4Qdt
The bin main-guard compared import.meta.url (always resolved) to an unresolved process.argv[1]. Run via `npx`, a global install, or ./node_modules/.bin, argv[1] is the bin *symlink* — the check failed and the CLI exited 0 with no output. Direct `node dist/bin.js` was fine, which is why CI + the client conformance passes stayed green. - realpath process.argv[1] before the comparison - CI: new "Packaged npx entry" step — pack, install into a temp project, assert `npx mcp-context-card --version` prints a version. The unit suite spawns `node <path>` and never touches the symlink. - .gitignore: *.tgz (stray npm pack output) - CHANGELOG lead reframed — this is the headline fix 104/104 tests, tsc clean, engines/version/faf checks green. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aij9ReMwQeQTVSnYUZ4Qdt
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
npx mcp-context-card cardat a terminal now writescontext-card.htmland opens it in your browser — one command, no MCP host, no redirect. The fastest way to see what an agent actually gets from a project. Piped / redirected /--stdoutkeep the raw-HTML-to-stdout path unchanged.Node 20 is supported.
engines.nodewas>=22, set casually in a pre-publish housekeeping commit — nothing in the code needs 22, and the published1.0.0runs identically on Node 20 (verified against the npm tarball). Every Node-20 user gotnpm warn EBADENGINEon firstnpx. Caught by luck.Changes
src/bin.tscardmode: TTY → write file + open; piped/--stdout→ raw stdout (unchanged). HELP + header updated.package.json1.0.1;engines.node>=22→>=20; newengines:checkscript.github/workflows/ci.yml'22'→['20','22','24'](× 3 OSes);engines:checkstepscripts/check-engines.mjsREADME.mdcardsection rewritten for the new UXCHANGELOG.mdserver.json×2,.well-known/fafa,demo.ts×2,docs/MECHANISMS.md,examples/README.md,docs/card*.htmlpill,package-lock.jsonVerified
tscclean,version:check/engines:check/faf:checkgreen1.0.0and this build run clean on Node 20.20.2 (--version,--help,cardpiped) — byte-identical card output to Node 22cardall three paths tested: piped → raw HTML;--stdout→ raw HTML; TTY → writescontext-card.html+ opens🤖 Generated with Claude Code
https://claude.ai/code/session_01Aij9ReMwQeQTVSnYUZ4Qdt