Skip to content

Create .npmignore for npm publishing - #8

Merged
Coderrob merged 6 commits into
mainfrom
copilot/setup-package-json-for-npm
Apr 2, 2026
Merged

Coderrob merged 6 commits into
mainfrom
copilot/setup-package-json-for-npm

Conversation

@Coderrob

@Coderrob Coderrob commented Mar 31, 2026 •

Copy link
Copy Markdown
Owner

Prepares the package for npm publishing by ensuring only compiled output is shipped.

Changes

package.json

No changes — publishConfig.access was evaluated but removed as it is only applicable to scoped packages and this package is unscoped (typescript-type-guards).

.npmignore (new)

Introduces a minimal .npmignore that excludes build artifacts (*.tsbuildinfo, *.js.map) from within the dist/ directory. The existing "files": ["dist"] whitelist in package.json already handles root-level exclusions, so the .npmignore complements it with a clarifying comment and targets only artifacts that could appear inside dist/.

Copilot AI review requested due to automatic review settings March 31, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts npm publishing behavior by adding an npm publishConfig and introducing a .npmignore file to control what gets included/excluded in the published package.

Changes:

  • Add publishConfig.access: "public" to package.json.
  • Add a new .npmignore with exclusions for sources, config, CI files, coverage, and certain build artifacts.

Reviewed changes

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

File Description
package.json Adds publishConfig intended to influence npm publish access level.
.npmignore Introduces ignore rules intended to reduce what gets published to npm.

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

Comment thread package.json
Comment thread .npmignore Outdated
@Coderrob

Coderrob commented Apr 2, 2026

Copy link
Copy Markdown
Owner Author

@copilot apply changes based on the comments in this thread

Copilot AI commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Applied both changes in commit 4a82f24:

  1. package.json — Removed publishConfig.access since it only applies to scoped packages; this unscoped package doesn't need it.
  2. .npmignore — Simplified to only exclude *.tsbuildinfo and *.js.map within dist/, with a comment clarifying that "files": ["dist"] already handles root-level exclusions.

Copilot AI changed the title Add publishConfig to package.json and create .npmignore Create .npmignore for npm publishing Apr 2, 2026
@Coderrob
Coderrob requested a review from Copilot April 2, 2026 02:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

Comment thread .npmignore Outdated
Coderrob and others added 2 commits April 1, 2026 21:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Coderrob
Coderrob merged commit 270f31d into main Apr 2, 2026
1 check passed
@Coderrob
Coderrob deleted the copilot/setup-package-json-for-npm branch April 2, 2026 02:38
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.

3 participants