diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-09-24 12:23:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 19:23:57 +0000 |
commit | 36ebc03f177cc7db5deb93f4d403cafbed756eb5 (patch) | |
tree | c36af6c9b7093d3191de3cd6e60c4ce9dca4151a /tests/specs/npm/lifecycle_scripts/only_warns_first1.out | |
parent | ba5b8d0213cde2585236098b00beb8a512889626 (diff) |
fix(cli): Warn on not-run lifecycle scripts with global cache (#25786)
Refactors the lifecycle scripts code to extract out the common
functionality and then uses that to provide a warning in the global
resolver.
While ideally we would still support them with the global cache, for now
a warning is at least better than the status quo (where people are
unaware why their packages aren't working).
Diffstat (limited to 'tests/specs/npm/lifecycle_scripts/only_warns_first1.out')
-rw-r--r-- | tests/specs/npm/lifecycle_scripts/only_warns_first1.out | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/specs/npm/lifecycle_scripts/only_warns_first1.out b/tests/specs/npm/lifecycle_scripts/only_warns_first1.out index e1985d08c..947777b5b 100644 --- a/tests/specs/npm/lifecycle_scripts/only_warns_first1.out +++ b/tests/specs/npm/lifecycle_scripts/only_warns_first1.out @@ -6,11 +6,11 @@ Download http://localhost:4260/@denotest/bin/1.0.0.tgz Initialize @denotest/node-lifecycle-scripts@1.0.0 Initialize @denotest/bin@1.0.0 [UNORDERED_END] -Warning Following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed: +Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed: ┠─ npm:@denotest/node-lifecycle-scripts@1.0.0 ┃ ┠─ This may cause the packages to not work correctly. -┗─ To run lifecycle scripts, use the `--allow-scripts` flag with `deno install`: +┖─ To run lifecycle scripts, use the `--allow-scripts` flag with `deno install`: deno install --allow-scripts=npm:@denotest/node-lifecycle-scripts@1.0.0 error: Uncaught SyntaxError: The requested module 'npm:@denotest/node-lifecycle-scripts' does not provide an export named 'value' [WILDCARD] |