-
Notifications
You must be signed in to change notification settings - Fork 64
Conversation
Removes lib/update-root-package-json.js in favor of using @npmcli/package-json for reading and modifying package.json during reify. Relates to: npm/statusboard#368
7a8c339
to
15c4903
Compare
@@ -31952,7 +31952,7 @@ exports[`test/arborist/reify.js TAP save proper lockfile with bins when upgradin | |||
` | |||
|
|||
exports[`test/arborist/reify.js TAP save-prod, with optional > must match snapshot 1`] = ` | |||
{"optionalDependencies":{},"dependencies":{"abbrev":"^1.1.1"}} | |||
{"dependencies":{"abbrev":"^1.1.1"}} |
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.
:chef-kiss:
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.
Consolidates "write to package json" logic and even fixes an inconsistency in the one-off implementation that was being done here before.
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.
very nice! left one request, but it doesn't belong in this repo and i do not believe needs to hold up this pull request
) | ||
}) | ||
|
||
t.test('custom formatting', async t => { |
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.
we don't have a test for this in @npmcli/package-json
, feels like we should add one. i see the code that should do this, but it's always a good idea to prove it works as intended
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.
we actually have! 😅 I added it as part of https://github.com/npm/package-json/blob/main/test/index.js#L50 which is easy to see in the snapshot: https://github.com/npm/package-json/blob/main/tap-snapshots/test/index.js.test.cjs#L12 but I see how confusing that is from a maintenance point of view! 😬
I'll swap that test to just use regular formatting and move that check to a custom formatting
separated test! thanks for bringing that up!
Removes
lib/update-root-package-json.js
in favor of using@npmcli/package-json
for reading and modifyingpackage.json
duringreify.
References
Relates to: npm/statusboard#368