Skip to content

[RRFC] npm publish should fail when the files is misconfig in package.json #390

@aladdin-add

Description

@aladdin-add

this is from npm/feedback#425

Motivation ("The Why")

it's a common error there is something wrong in the files in package.json.

  • typo, e.g. mian.js( should be main.js)
  • files been renamed, but pkg.files not updated, e.g. template => templates.

currently npm will publish successfully even with no warnings. I think it make sense to throw an error in this kind of cases.

Example

example in the OP npm/feedback#425

How

Current Behaviour

Desired Behaviour

throw an error/warning if found unmatched patterns (might be a breaking change).

References

  • n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions