Skip to content

fix(npm): update incompatible npm scripts#1137

Merged
fdncred merged 3 commits into
nushell:mainfrom
gin-lsl:fix/npm-script
Jun 24, 2025
Merged

fix(npm): update incompatible npm scripts#1137
fdncred merged 3 commits into
nushell:mainfrom
gin-lsl:fix/npm-script

Conversation

@gin-lsl

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

Copy link
Copy Markdown
Contributor

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

fdncred commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

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