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

rfc: Don't add metadata to package.json #38

Closed
wants to merge 1 commit into from

Conversation

@isaacs
Copy link
Member

commented Aug 1, 2019

No description provided.

@isaacs isaacs force-pushed the isaacs/no-package-json-_fields branch 3 times, most recently from a73f413 to c35c78b Aug 1, 2019


## Motivation

These fields are only relevant to npm, and as of version 6, npm relies on

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 1, 2019

This is incorrect; the requiredBy field has been incredibly invaluable when debugging dep graph issues. Could we find a way to have a simple answer to "what package(s) required package x"?

Perhaps a v6 minor that adds a CLI command that can show this info; then you could change the behind the scenes source of that info without breaking anyone?

This comment has been minimized.

Copy link
@isaacs

isaacs Aug 1, 2019

Author Member

Ack! I forgot _requiredBy, yeah, that's one of the most interesting ones. I'll get to it tomorrow.

Could we find a way to have a simple answer to "what package(s) required package x"?

How would that differ from npm ls x today?

And don't worry, there is no way we're gonna land this before v7, it's definitely a breaking change :)

This comment has been minimized.

Copy link
@isaacs

isaacs Aug 1, 2019

Author Member

I guess you're suggesting something where you can specify a single instance of a package folder in the tree, and it'd show all the cases where a dependency deduped to it?

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 1, 2019

That sounds like what I'm asking for - essentially, I want the answer to the question "why is this dependency here".

This comment has been minimized.

Copy link
@isaacs

isaacs Aug 2, 2019

Author Member

Updated this PR to include _requiredBy and note the intention to create npm ls <location>, where <location> can be either a logical path, like /tap/react or a physical path like ./node_modules/tap/node_modules/react.

@isaacs isaacs force-pushed the isaacs/no-package-json-_fields branch from c35c78b to 90613e9 Aug 2, 2019

isaacs added a commit that referenced this pull request Aug 2, 2019

rfc: Don't add metadata to package.json
Edit: add note about _requiredBy and `npm ls <location>`, prompted by
@ljharb in #38 (comment)

@isaacs isaacs force-pushed the isaacs/no-package-json-_fields branch from 90613e9 to 5bac23c Aug 4, 2019

isaacs added a commit that referenced this pull request Aug 4, 2019

rfc: Don't add metadata to package.json
Edit: add note about _requiredBy and `npm ls <location>`, prompted by
@ljharb in #38 (comment)

Edit: add _shrinkwrap field.

@isaacs isaacs force-pushed the isaacs/no-package-json-_fields branch from 5bac23c to d9615e5 Aug 15, 2019

@isaacs isaacs closed this in 2177cc9 Aug 15, 2019

@isaacs isaacs deleted the isaacs/no-package-json-_fields branch Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.