-
-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(JavaScript) Throw a more descriptive error when the package name is …
…missing (#21159) Closes #20859. While this is a simple fix and addresses the linked issue, there is an interesting edge case to discuss: Internal packages do not necessarily have a name field in `package.json` (see wireapp/wire-desktop#1692, facebook/react#13107 for examples). The JavaScript backend in Pants does require that each package.json define a name, but I'm not so sure that's necessarily the right behavior. It's worth considering whether we should make names optional in Pants, given that larger JavaScript monorepos may have internal packages that are not meant to be published. Furthermore, different JS package managers handle this situation differently - * [Bun doesn't handle package.json files without a name](oven-sh/bun#6317) * [npm assigns the parent directory name as the name](npm/cli#2264)
- Loading branch information
1 parent
bbe10a0
commit 7b2dcad
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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