fix: update .npmignore comments and refine build script for npm publishing#13
Merged
fix: update .npmignore comments and refine build script for npm publishing#13
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates publishing-related docs and npm scripts to better control what gets shipped to npm and to make publishing steps more explicit within the repository’s workflows.
Changes:
- Updated
buildto stop emitting source maps. - Expanded
publish:packageto run verification/coverage, perform a dry-run pack, and publish with provenance. - Clarified package contents in
README.mdand adjusted.npmignorecomments/patterns.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Documents that npm includes top-level README/LICENSE/package.json in the published tarball. |
| package.json | Removes sourcemap generation from builds and refines the publish:package script. |
| .npmignore | Updates guidance/patterns intended to prevent unwanted artifacts from being published. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ESLint config and consumer scripts
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.
This pull request makes several improvements to the package publishing process, documentation, and configuration files. The main focus is on ensuring that only the intended files are published, improving the reliability of the publish workflow, and clarifying documentation about what is included in the published package.
Publishing process improvements:
publish:packagescript inpackage.jsonto add verification, coverage testing, a dry-run packaging step, and to usenpm publish --access public --provenancefor enhanced security and reliability.Configuration and file filtering:
.npmignoreto clarify its role as a secondary safeguard, explicitly allowlistingREADME.mdandLICENSE, and ensuring only the correct files are included in the published package.--sourcemapoption from thebuildscript inpackage.json, so source maps are no longer generated during builds.Documentation updates:
README.mdto clarify which files are included in the published tarball, specifically mentioning thatREADME.md,LICENSE, andpackage.jsonare included automatically by npm and not copied intodist/.