summaryrefslogtreecommitdiff
path: root/tests/specs/npm/lifecycle_scripts
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2024-09-18 20:04:25 +0100
committerGitHub <noreply@github.com>2024-09-18 19:04:25 +0000
commit5b14c71dafc119d5cf251d6e63cb5f53a661a391 (patch)
tree422fdffecbd2bfc3d75536fb5fc48ba18f08b7fb /tests/specs/npm/lifecycle_scripts
parentfd860260ad0fd72d638c4cc69ff45c25dbaafaa6 (diff)
feat: improve warnings for deprecations and lifecycle script for npm packages (#25694)
This commit improves warning messages for deprecated npm packages and packages that rely on lifecycle script.
Diffstat (limited to 'tests/specs/npm/lifecycle_scripts')
-rw-r--r--tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run.out10
-rw-r--r--tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles_not_run.out10
-rw-r--r--tests/specs/npm/lifecycle_scripts/node_gyp_not_run.out10
-rw-r--r--tests/specs/npm/lifecycle_scripts/only_warns_first1.out10
4 files changed, 24 insertions, 16 deletions
diff --git a/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run.out b/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run.out
index eff0ae250..e63e2d22b 100644
--- a/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run.out
+++ b/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run.out
@@ -6,7 +6,9 @@ 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 Packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed.
- This may cause the packages to not work correctly. To run them, use the `--allow-scripts` flag with `deno cache` or `deno install`
- (e.g. `deno cache --allow-scripts=pkg1,pkg2 <entrypoint>` or `deno install --allow-scripts=pkg1,pkg2`):
- npm:@denotest/node-lifecycle-scripts@1.0.0
+Warning 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`:
+ deno install --allow-scripts=npm:@denotest/node-lifecycle-scripts@1.0.0
diff --git a/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles_not_run.out b/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles_not_run.out
index eff0ae250..e63e2d22b 100644
--- a/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles_not_run.out
+++ b/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles_not_run.out
@@ -6,7 +6,9 @@ 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 Packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed.
- This may cause the packages to not work correctly. To run them, use the `--allow-scripts` flag with `deno cache` or `deno install`
- (e.g. `deno cache --allow-scripts=pkg1,pkg2 <entrypoint>` or `deno install --allow-scripts=pkg1,pkg2`):
- npm:@denotest/node-lifecycle-scripts@1.0.0
+Warning 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`:
+ deno install --allow-scripts=npm:@denotest/node-lifecycle-scripts@1.0.0
diff --git a/tests/specs/npm/lifecycle_scripts/node_gyp_not_run.out b/tests/specs/npm/lifecycle_scripts/node_gyp_not_run.out
index a462d3465..2803bcb4d 100644
--- a/tests/specs/npm/lifecycle_scripts/node_gyp_not_run.out
+++ b/tests/specs/npm/lifecycle_scripts/node_gyp_not_run.out
@@ -1,9 +1,11 @@
Download http://localhost:4260/@denotest/node-addon
Download http://localhost:4260/node-gyp
[WILDCARD]
-Warning Packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed.
- This may cause the packages to not work correctly. To run them, use the `--allow-scripts` flag with `deno cache` or `deno install`
- (e.g. `deno cache --allow-scripts=pkg1,pkg2 <entrypoint>` or `deno install --allow-scripts=pkg1,pkg2`):
- npm:@denotest/node-addon@1.0.0
+Warning Following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:
+┠─ npm:@denotest/node-addon@1.0.0
+┃
+┠─ This may cause the packages to not work correctly.
+┗─ To run lifecycle scripts, use the `--allow-scripts` flag with `deno install`:
+ deno install --allow-scripts=npm:@denotest/node-addon@1.0.0
error: Uncaught (in promise) Error: Cannot find module './build/Release/node_addon'
[WILDCARD]
diff --git a/tests/specs/npm/lifecycle_scripts/only_warns_first1.out b/tests/specs/npm/lifecycle_scripts/only_warns_first1.out
index cd27c80d5..e1985d08c 100644
--- a/tests/specs/npm/lifecycle_scripts/only_warns_first1.out
+++ b/tests/specs/npm/lifecycle_scripts/only_warns_first1.out
@@ -6,9 +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 Packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed.
- This may cause the packages to not work correctly. To run them, use the `--allow-scripts` flag with `deno cache` or `deno install`
- (e.g. `deno cache --allow-scripts=pkg1,pkg2 <entrypoint>` or `deno install --allow-scripts=pkg1,pkg2`):
- npm:@denotest/node-lifecycle-scripts@1.0.0
+Warning 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`:
+ 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]