fix: trim published package, dead scripts, and lint config#2026
Merged
Conversation
- ship only dist-modules via a files allowlist; delete .npmignore (blocklist was leaking dev configs into the published tarball now 5 files instead of 12) - drop dead precommit/prepush scripts and pretty-quick (no husky/git hooks were wired, so they never ran) - drop @testing-library/jest-dom; rewrite the 4 toBeInTheDocument() asserts as toBeTruthy() (findByText already throws when absent) - collapse the eslint config to recommended + strictTypeChecked + stylisticTypeChecked (the removed presets were subsets) Removes 15 npm packages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 4.5.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
Leanness pass following the Parcel→Vite swap (#2025). Mostly a packaging-correctness fix plus dead-weight removal.
🔴 Published package was shipping junk
npm pack --dry-runonmasterships 12 files including a 413 kByarn-error.logand the dev configs (vite.config.ts,vitest.config.ts,vitest.setup.ts,eslint.config.mjs). Cause:.npmignoreis a blocklist and silently leaks any file it doesn't enumerate.Fix: replace
.npmignorewith a"files": ["dist-modules"]allowlist. Tarball is now 5 files (dist-modules/,README,LICENSE,package.json; npm also force-includesCHANGELOG). New dev files can never leak again.Other cleanups
precommit/prepush— no husky or git hooks are installed, so npm never ran them. Removespretty-quick(its only consumer).@testing-library/jest-dom: rewrite the 4toBeInTheDocument()asserts astoBeTruthy().findByTextalready rejects when the element is absent, so the assertion still holds.recommended+strictTypeChecked+stylisticTypeChecked— the removed presets (recommended,strict,stylistic,recommendedTypeChecked) are all subsets of those.dist/(old Parcel output) andyarn-error.log.Removes 15 npm packages.
Verification
npm run test:lint→ clean (trimmed config, same results)npm test→ 4/4 pass (after jest-dom removal)npm run dist→ cleannpm pack --dry-run→ 5 files, no log, no configs🤖 Generated with Claude Code