Skip to content

[epic] warn users when altering package.json during publish #672

@wraithgar

Description

@wraithgar

Epic

There is a lot of manipulation that read-package-json does when preparing a manifest for publishing. Not all of it can be removed but some if it can (such as typo corrections). In order to stop doing that in the next semver-major we need to identify which changes we can stop doing, and start warning the user about them now.

A command to apply the fixes needs to also exist to easily clear the warnings.

### Tasks
- [x] move read-package-json functionality into `@npmcli/package-json` as-is
- [x] move npm publish to use `@npmcli/package-json`
- [x] identify which changes to warn about
- [x] research if `readme` attribute is load bearing for website
- [x] add discrete `bundleDepencies: false` step to `@npmcli/package-json`
- [x] come up with the mechanism that will warn in 9 and throw in 10
- [ ] add new dev/dependency step to `prepare`
- [x] write `npm pkg fix`
- [x] separate npm's call of `prepare` into warn/don't warn lanes

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions