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

feat: display overrides in ls, explain and query #5306

Merged
merged 5 commits into from Aug 17, 2022
Merged

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Aug 16, 2022

No description provided.

@nlf nlf requested a review from a team as a code owner August 16, 2022 17:30
@nlf
Copy link
Contributor Author

nlf commented Aug 16, 2022

example npm ls output:
Screen Shot 2022-08-15 at 2 54 58 PM

example npm explain output:
Screen Shot 2022-08-16 at 10 01 50 AM

lib/commands/ls.js Outdated Show resolved Hide resolved
@npm-cli-bot
Copy link
Collaborator

npm-cli-bot commented Aug 16, 2022

no statistically significant performance changes detected

timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 40.598 ±2.07 20.406 ±0.04 18.150 ±0.24 21.496 ±1.07 3.185 ±0.06 3.164 ±0.00 2.726 ±0.03 12.358 ±0.03 2.619 ±0.06 4.384 ±0.71
#5306 40.728 ±0.06 20.194 ±0.29 18.068 ±0.25 21.061 ±0.94 3.227 ±0.10 3.145 ±0.04 2.533 ±0.03 12.429 ±0.17 2.601 ±0.04 3.788 ±0.12
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 28.956 ±0.29 15.298 ±0.11 13.861 ±0.24 14.782 ±0.80 2.966 ±0.08 3.025 ±0.04 2.667 ±0.03 9.252 ±0.15 2.492 ±0.00 3.365 ±0.07
#5306 30.059 ±0.32 15.410 ±0.15 13.679 ±0.11 14.322 ±0.10 2.919 ±0.02 2.969 ±0.01 2.652 ±0.11 9.139 ±0.01 2.462 ±0.00 3.363 ±0.00

@ljharb
Copy link
Collaborator

ljharb commented Aug 16, 2022

it would be super nice if there was a way to view the actual shell diff (with full color) in-PR - i wonder if there's some kind of fancy github annotation action for that.

@nlf
Copy link
Contributor Author

nlf commented Aug 16, 2022

it would be super nice if there was a way to view the actual shell diff (with full color) in-PR - i wonder if there's some kind of fancy github annotation action for that.

i'm not sure what you mean, can you elaborate?

Copy link
Member

@wraithgar wraithgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay new query selectors

@ljharb
Copy link
Collaborator

ljharb commented Aug 16, 2022

@nlf i mean that viewing the raw snapshot diff is unhelpful; whereas getting a visual diff of the "before" and "after" shell output would make it quite clear what's changing.

@nlf
Copy link
Contributor Author

nlf commented Aug 16, 2022

oooo, that would be nice if we could get an automatic before/after into the issue. sounds like a lot of work, but i made a note in my mad science notebook

@ljharb
Copy link
Collaborator

ljharb commented Aug 16, 2022

i was thinking an annotation, which is a github PR feature that would show it inline in the "diff" view and not on the discussion view.

@fritzy fritzy merged commit 0d4ed0f into latest Aug 17, 2022
@fritzy fritzy deleted the nlf/display-overrides branch August 17, 2022 00:54
@@ -54,7 +54,7 @@ The [`npm query`](/commands/npm-query) commmand exposes a new dependency selecto
- [`:private`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#private) when a dependency is private
- `:link` when a dependency is linked (for instance, workspaces or packages manually [`linked`](https://docs.npmjs.com/cli/v8/commands/npm-link)
- `:deduped` when a dependency has been deduped (note that this does *not* always mean the dependency has been hoisted to the root of node_modules)
- `:override` when a dependency is an override (not implemented yet)
- `:overridden` when a dependency has been overridden
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HELL YEAH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants