Add CI matrix and npm publish hygiene (files whitelist, exports, license) - #4
Open
uuzzrm wants to merge 2 commits into
Open
Add CI matrix and npm publish hygiene (files whitelist, exports, license)#4uuzzrm wants to merge 2 commits into
uuzzrm wants to merge 2 commits into
Conversation
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.
Why this is core
Two market-facing gaps in one PR:
Zero CI. The repo advertises
engines: >=18.17and anpm testflow, but nothing verifies either — there is no pipeline, no green-badge trust signal, and a regression can land silently. (The Node 18 leg matters: until nownpm testsilently broke on Node 18 becausenode --testglob expansion is a Node 21+ feature — verified on a real Node 18.20.8 install. This PR stacks on the CLI-contract fix that replaces the glob with a cross-version runner.)The published package ships test source. Without a
fileswhitelist,npm publishpackssrc/,tests/,scripts/,.github/anddist/tests/— and the package has noexportsmap, no repository metadata, no keywords, and declares MIT with no LICENSE file.Changes
CI (
.github/workflows/ci.yml)enginesplus current LTS lines, on every OS the CLI targets.npm ci,npm test, plus offline-demo and--versionsmoke checks.npm pack --dry-runprints the tarball contents so a wrongfileswhitelist fails loudly.fail-fast: falseso one platform's failure doesn't mask the others.Publish hygiene (
package.json)files:["dist/src", "README.md", "LICENSE"]— the tarball drops from ~everything to 60 files / 49 kB (verified vianpm pack --dry-run): compiled JS + d.ts + maps only, no tests or sources.exportsmap (types/import/default) so TS consumers and bundlers resolve the package deterministically.keywords,repository,bugs,homepage,sideEffects: false, andprepublishOnly: npm run buildso a staledistcan never be published.LICENSE
package.jsonalready declares but never shipped. Copyright line uses the repo owner handle (nullcache) — adjust the holder name if you prefer a legal name.Verification
npm test: 26/26 pass on Node 24 and on Node 18.20.8 (the engines floor).npm pack --dry-run: tarball = LICENSE + README + dist/src + package.json only.