Skip to content

fix(npm): update incompatible npm scripts #1137

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

Merged
merged 3 commits into from
Jun 24, 2025
Merged

Conversation

gin-lsl
Copy link
Contributor

@gin-lsl gin-lsl commented Jun 24, 2025

I use Nushell and npm, and noticed that the npm section hasn't been updated for a long time, to the point where it no longer works with current npm versions. In fact, the current script produces the following result:
image

So I've updated the npm-related scripts to fix this issue. Now it works correctly:
image

Additionally, since npm -l | lines generates over 900 lines of output, this causes each run to take a long time (at least on my machine). Therefore, I've implemented caching using stor to store the results, which significantly reduces the execution time for subsequent calls. With caching enabled, the delay is now barely noticeable.

@fdncred fdncred merged commit 156a011 into nushell:main Jun 24, 2025
1 check passed
@fdncred
Copy link
Contributor

fdncred commented Jun 24, 2025

interesting use of the stor command. thanks!

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.

2 participants