-
Notifications
You must be signed in to change notification settings - Fork 10
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
normalize #30
Conversation
this[_filename] = resolve(path, 'package.json') | ||
this[_manifest] = {} | ||
this[_readFileContent] = '' | ||
this.#path = path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the read-package-json
code will need this
Need to come up with a better name than One is intended for reading from node_modules in a tree, one is intended for reading before publishing. |
Maybe |
This brings in parity with `read-package-json-fast`, which is a normalization method intended for parsing package.json files inside of an existing node_modules. Tests were copied straight from that package to ensure functionality was compatible. The only tests that weren't copied were the ones testing down into the bin normalization. That is delegated to a subdependency so these tests only ensure that *some* normalization is happening. Eventually as we consolidate our package.json reading libs, bin normalization can live in this package and be tested here. Finally, the errors that this package was throwing now include the metadata from the original errors (such as code) instead of making new errors with no context.
#32 will be where this lands. One more fix to go. |
Two commits here, one deps and one feat. Please rebase to merge.
This brings in parity with
read-package-json-fast
, which is anormalization method intended for parsing package.json files inside of
an existing node_modules.
Tests were copied straight from that package to ensure functionality was
compatible. The only tests that weren't copied were the ones testing
down into the bin normalization. That is delegated to a subdependency so
these tests only ensure that some normalization is happening.
Eventually as we consolidate our package.json reading libs, bin
normalization can live in this package and be tested here.
Finally, the errors that this package was throwing now include the
metadata from the original errors (such as code) instead of making new
errors with no context.