Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Have a way to just check for correctness (i.e. whether there are warnings) ? #12

Open
myrne opened this issue Apr 8, 2013 · 1 comment
Labels

Comments

@myrne
Copy link
Contributor

myrne commented Apr 8, 2013

Originally, I thought that it would be best to separate the code for generating warnings from the code that make changes to data. But that was before I thought of the (quite elegant) solution of passing a warn function along.

However, it may be interesting to check for package.json validity (perhaps on several levels of correctness) while leaving the package data alone.

The consumer of this function could also do it by himself, by calling normalize on a cloned object, and pass a "warn" function that (for example) sets a "hasWarned" to true, then check this hasWarnings value afterwards.

@myrne
Copy link
Contributor Author

myrne commented Apr 8, 2013

Wouldn't it be best if npm publish rejects a package.json that generates a warning?

@darcyclarke darcyclarke changed the title Have a way to just check for correctness (i.e. whether there are warnings) ? [QUESTION] Have a way to just check for correctness (i.e. whether there are warnings) ? Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants