Skip to content

Conversation

@MiroslavDionisiev
Copy link
Contributor

Resolves

Executing npm publish --access=public --workspace={package-name} packs and publishes a package in the context of a workspace but it doesn't ignore only the files in the .npmignore in the workspace but looks into the root as well. Because .npmignore file is missing in the root of the editor npm uses the .gitignore one. This leads to publishing wrong files and directories.
In addition the standalone repositories publish unnecessary content for the functioning of the package. Setting files in package.jsons allows to list what we want to be included in the published package. Current packages will contain only:

  • dist output
  • package.json
  • README
  • LICENSE

Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

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

I'm not sure what to do about it yet, but it seems like a published package should not have exports entries that refer to files that are excluded from its published contents. This change makes the package less broken, though, so 👍

@MiroslavDionisiev MiroslavDionisiev merged commit 31b0750 into scratchfoundation:develop Jan 27, 2025
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants