You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Wouldn't it be best if npm publish rejects a package.json that generates a warning?
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
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.
The text was updated successfully, but these errors were encountered: