Skip to content

fix: restrict npm package to essential files only - #13

Merged
fx merged 1 commit into
mainfrom
fix/npm-package-files
Feb 17, 2026
Merged

fx merged 1 commit into
mainfrom
fix/npm-package-files

Conversation

@fx

@fx fx commented Feb 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add files field to package.json to whitelist only dist/, README.md, LICENSE, and CHANGELOG.md
  • Remove the .npmignore workaround
  • Prevents publishing dev files (.claude/, .env.local, .github/, .husky/, .mcp.json, CLAUDE.md, docs/, etc.)
  • Package size reduced from 29.9 kB to 20.4 kB

Test plan

  • npm pack --dry-run confirms only essential files included
  • Merge and verify release-please creates 1.1.1 release PR

Add "files" field to package.json to prevent publishing dev files
(.claude/, .env.local, .github/, .husky/, .mcp.json, etc.)
Copilot AI review requested due to automatic review settings February 17, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves npm package publishing by implementing a whitelist approach for included files, replacing the previous blacklist approach using .npmignore. The change reduces package size from 29.9 kB to 20.4 kB by explicitly including only essential files needed for package consumers.

Changes:

  • Added files field to package.json to whitelist dist/, README.md, LICENSE, and CHANGELOG.md
  • Removed .npmignore file that was previously used to blacklist development and configuration files

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
package.json Added files array to explicitly whitelist essential files for npm publishing
.npmignore Removed blacklist approach in favor of whitelist via files field in package.json

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fx
fx merged commit b1564e6 into main Feb 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants