From 1c14127c4f54d815b3e1be48bddd5198dcb33a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 22 Feb 2023 23:21:05 +0100 Subject: feat: support bare specifier resolution with package.json (#17864) This commit enables resolution of "bare specifiers" (eg. "import express from 'express';") if a "package.json" file is discovered. It's a step towards being able to run projects authored for Node.js without any changes. With this commit we are able to successfully run Vite projects without any changes to the user code. --------- Co-authored-by: David Sherret --- cli/tests/integration/run_tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/tests/integration') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 10ff6d2e0..f30e7ce69 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2750,7 +2750,7 @@ itest!(config_not_auto_discovered_for_remote_script { }); itest!(package_json_auto_discovered_for_local_script_log { - args: "run -L debug no_deno_json/main.ts", + args: "run -L debug -A no_deno_json/main.ts", output: "run/with_package_json/no_deno_json/main.out", maybe_cwd: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), @@ -2766,6 +2766,7 @@ itest!( maybe_cwd: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, + exit_code: 1, } ); -- cgit v1.2.3