Repository navigation
Trim the npm package and correct the Node requirement - #220
Merged
Merged
Conversation
With no .npmignore or files list, npm falls back on .gitignore and ships nearly everything: 148 files, 8.9 MB unpacked, of which the results (now carrying traces) are 5 MB and the annotated spec 2.4 MB. .npmignore drops the website (index.html, results/, spec/, CNAME), the scripts that assume a git checkout (test-docker.sh and test-browser.sh write into results/; docker/ builds the image the former pulls), and repository tooling. The package comes to 73 files and 1.5 MB unpacked, and still runs the server, the CLI and the browser test page. engines said Node 14.8.0 or later, but undici 8.12.3 needs 22.19.0, so engines and the README now say that. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both were excluded because their full runs write into results/, which the package doesn't contain. They now create results/ if it's missing, so they can be shipped, and only docker/ (the image's build files, which test-docker.sh pulls rather than builds) stays out. The package is 75 files and 1.5 MB unpacked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
index.html is how results are viewed locally, and it needs results/ (the implementation list and each implementation's JSON) and links to the annotated specification at spec/rfc9111.html. Excluding them left a package that could run the tests but not show the outcome. They now ship, as do the built spec page and its three assets; the spec's build inputs (Makefile, the XML sources and lib/) stay out, along with docker/ and repository tooling. The package is 92 files and 6.8 MB unpacked, 0.93 MB packed (the results compress well). From an extracted tarball, index.html renders the results table with no console errors. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
npm publishforhttp-cache-testscurrently ships almost the whole repository, because there's no.npmignoreorfileslist and npm falls back on.gitignore: 148 files, 8.9 MB unpacked (0.4.5 on the registry is 3.2 MB). The results, now carrying traces, are 5 MB of that and the annotated spec is 2.4 MB..npmignore: leaves out the annotated spec's build inputs (spec/Makefile,spec/*.xml,spec/lib/),docker/(the image's build files;test-docker.shpulls the image) and repository tooling (.editorconfig,.github/,CNAME,server.pid). Everything else ships, includingindex.html,results/, the builtspec/rfc9111.htmlwith its three assets, andtest-docker.shandtest-browser.sh. Having the file means.gitignoreis no longer consulted, which is whyserver.pidis listed. The patterns are anchored to the root so they can't match nested paths.results/, which the package doesn't have, so each now runsmkdir -p resultsbefore writing.engines: was>=14.8.0, but the pinnedundici8.12.3 requires>=22.19.0, sopackage.jsonand the README's Node requirement now say that.The package comes to 92 files, 6.8 MB unpacked, 0.93 MB packed (it was 148 files, 8.9 MB unpacked, 1.34 MB packed; the results compress well, so keeping them costs little in the download). I packed it, extracted the tarball, and from there ran the server, fetched
index.html,results/index.mjs, a results file,spec/rfc9111.htmland its assets (all 200), and loadedindex.htmlin a browser: the results table renders with every implementation's column and no console errors. An earlier version of this change (beforeindex.html, the results and the scripts were added) was also checked from a tarball with the CLI for one test and for the whole suite (365 results with 365 traces) and withnpm test. I haven't runtest-docker.shortest-browser.shfrom an extracted package, so themkdir -p resultschange is untested end to end, and I haven't run it throughnpm publishor installed it from the registry.asset/(1.2 MB, mostly Font Awesome) is needed by both the results page and the browser test page.test.ymlandlint.ymlstill use Node 14; I left them alone.AI-generated: written with Claude Code. Mark Nottingham asked for the PR and a sensible
.npmignore; the choices of what to include are mine (shipping the scripts,index.htmland the results were Mark's calls) and haven't had a separate human review yet.🤖 Generated with Claude Code