summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2024-09-26 02:50:54 +0100
committerGitHub <noreply@github.com>2024-09-26 01:50:54 +0000
commit5504acea6751480f1425c88353ad5d36257bdce7 (patch)
treefa02e6c546eae469aac894bfc71600ab4eccad28
parent05415bb9de475aa8646985a545f30fe93136207e (diff)
feat: add `--allow-import` flag (#25469)
This replaces `--allow-net` for import permissions and makes the security sandbox stricter by also checking permissions for statically analyzable imports. By default, this has a value of `--allow-import=deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,gist.githubusercontent.com:443`, but that can be overridden by providing a different set of hosts. Additionally, when no value is provided, import permissions are inferred from the CLI arguments so the following works because `fresh.deno.dev:443` will be added to the list of allowed imports: ```ts deno run -A -r https://fresh.deno.dev ``` --------- Co-authored-by: David Sherret <dsherret@gmail.com>
-rw-r--r--Cargo.lock8
-rw-r--r--cli/Cargo.toml2
-rw-r--r--cli/args/flags.rs253
-rw-r--r--cli/args/mod.rs102
-rw-r--r--cli/cache/mod.rs42
-rw-r--r--cli/factory.rs25
-rw-r--r--cli/file_fetcher.rs48
-rw-r--r--cli/graph_container.rs7
-rw-r--r--cli/graph_util.rs38
-rw-r--r--cli/lsp/language_server.rs5
-rw-r--r--cli/module_loader.rs41
-rw-r--r--cli/standalone/mod.rs19
-rw-r--r--cli/tools/check.rs3
-rw-r--r--cli/tools/compile.rs2
-rw-r--r--cli/tools/info.rs17
-rw-r--r--cli/tools/registry/diagnostics.rs14
-rw-r--r--cli/tools/registry/mod.rs6
-rw-r--r--cli/tools/registry/pm/cache_deps.rs3
-rw-r--r--cli/tools/repl/mod.rs6
-rw-r--r--cli/tools/run/mod.rs12
-rw-r--r--cli/tools/serve.rs17
-rw-r--r--cli/worker.rs21
-rw-r--r--runtime/permissions.rs8
-rw-r--r--runtime/permissions/lib.rs326
-rw-r--r--tests/integration/cache_tests.rs2
-rw-r--r--tests/integration/check_tests.rs5
-rw-r--r--tests/integration/compile_tests.rs2
-rw-r--r--tests/integration/coverage_tests.rs1
-rw-r--r--tests/integration/install_tests.rs4
-rw-r--r--tests/integration/lsp_tests.rs2
-rw-r--r--tests/integration/run_tests.rs199
-rw-r--r--tests/integration/watcher_tests.rs1
-rw-r--r--tests/specs/bench/check_local_by_default/__test__.jsonc2
-rw-r--r--tests/specs/bench/check_local_by_default2/__test__.jsonc2
-rw-r--r--tests/specs/cache/check_local_by_default/__test__.jsonc2
-rw-r--r--tests/specs/cache/check_local_by_default2/__test__.jsonc2
-rw-r--r--tests/specs/cache/fetch_multiple/__test__.jsonc2
-rw-r--r--tests/specs/cache/globbing/__test__.jsonc2
-rw-r--r--tests/specs/cache/redirect/__test__.jsonc2
-rw-r--r--tests/specs/cert/cafile_ts_fetch/__test__.jsonc6
-rw-r--r--tests/specs/cert/cafile_url_imports/__test__.jsonc2
-rw-r--r--tests/specs/cert/cafile_url_imports_unsafe_ssl/__test__.jsonc2
-rw-r--r--tests/specs/cert/localhost_unsafe_ssl/__test__.jsonc2
-rw-r--r--tests/specs/check/jsx_import_source_types/__test__.jsonc2
-rw-r--r--tests/specs/check/jsx_import_source_types_config/__test__.jsonc2
-rw-r--r--tests/specs/check/remote_missing_override/__test__.jsonc2
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/__test__.jsonc1
-rw-r--r--tests/specs/doc/types_header/__test__.jsonc2
-rw-r--r--tests/specs/doc/types_header_direct/__test__.jsonc2
-rw-r--r--tests/specs/info/_054_info_local_imports/005_more_imports.ts (renamed from tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts)0
-rw-r--r--tests/specs/info/_054_info_local_imports/054_info_local_imports.out (renamed from tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out)0
-rw-r--r--tests/specs/info/_054_info_local_imports/__test__.jsonc (renamed from tests/specs/info_tests/_054_info_local_imports/__test__.jsonc)0
-rw-r--r--tests/specs/info/_054_info_local_imports/mod1.ts (renamed from tests/specs/info_tests/_054_info_local_imports/mod1.ts)0
-rw-r--r--tests/specs/info/_054_info_local_imports/mod2.ts (renamed from tests/specs/info_tests/_054_info_local_imports/mod2.ts)0
-rw-r--r--tests/specs/info/_054_info_local_imports/print_hello.ts (renamed from tests/specs/info_tests/_054_info_local_imports/print_hello.ts)0
-rw-r--r--tests/specs/info/_054_info_local_imports/subdir2/dynamic_import.ts (renamed from tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts)0
-rw-r--r--tests/specs/info/_054_info_local_imports/subdir2/mod2.ts (renamed from tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts)0
-rw-r--r--tests/specs/info/data_null_error/__test__.jsonc (renamed from tests/specs/info_tests/data_null_error/__test__.jsonc)0
-rw-r--r--tests/specs/info/data_null_error/data_null_error/data_null_error.out (renamed from tests/specs/info_tests/data_null_error/data_null_error/data_null_error.out)0
-rw-r--r--tests/specs/info/data_null_error/data_null_error/mod.ts (renamed from tests/specs/info_tests/data_null_error/data_null_error/mod.ts)0
-rw-r--r--tests/specs/info/data_null_error/data_null_error/types.d.ts (renamed from tests/specs/info_tests/data_null_error/data_null_error/types.d.ts)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/__test__.jsonc (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js)0
-rw-r--r--tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts (renamed from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts)0
-rw-r--r--tests/specs/info/flag/041_info_flag.out (renamed from tests/specs/info_tests/info_flag/041_info_flag.out)0
-rw-r--r--tests/specs/info/flag/__test__.jsonc (renamed from tests/specs/info_tests/info_flag/__test__.jsonc)0
-rw-r--r--tests/specs/info/flag_location/041_info_flag_location.out (renamed from tests/specs/info_tests/info_flag_location/041_info_flag_location.out)0
-rw-r--r--tests/specs/info/flag_location/__test__.jsonc (renamed from tests/specs/info_tests/info_flag_location/__test__.jsonc)0
-rw-r--r--tests/specs/info/flag_script_jsx/049_info_flag_script_jsx.out (renamed from tests/specs/info_tests/info_flag_script_jsx/049_info_flag_script_jsx.out)0
-rw-r--r--tests/specs/info/flag_script_jsx/__test__.jsonc4
-rw-r--r--tests/specs/info/import_map/__test__.jsonc (renamed from tests/specs/info_tests/info_import_map/__test__.jsonc)0
-rw-r--r--tests/specs/info/import_map/deno.json (renamed from tests/specs/info_tests/info_import_map/deno.json)0
-rw-r--r--tests/specs/info/import_map/deno.lock (renamed from tests/specs/info_tests/info_import_map/deno.lock)0
-rw-r--r--tests/specs/info/import_map/main.tsx (renamed from tests/specs/info_tests/info_import_map/main.tsx)0
-rw-r--r--tests/specs/info/import_map/with_import_map.out (renamed from tests/specs/info_tests/info_import_map/with_import_map.out)0
-rw-r--r--tests/specs/info/json/__test__.jsonc (renamed from tests/specs/info_tests/info_json/__test__.jsonc)0
-rw-r--r--tests/specs/info/json/info_json.out (renamed from tests/specs/info_tests/info_json/info_json.out)0
-rw-r--r--tests/specs/info/json_deps_order/076_info_json_deps_order.out (renamed from tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.out)0
-rw-r--r--tests/specs/info/json_deps_order/076_info_json_deps_order.ts (renamed from tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.ts)0
-rw-r--r--tests/specs/info/json_deps_order/__test__.jsonc (renamed from tests/specs/info_tests/info_json_deps_order/__test__.jsonc)0
-rw-r--r--tests/specs/info/json_deps_order/recursive_imports/A.ts (renamed from tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts)0
-rw-r--r--tests/specs/info/json_deps_order/recursive_imports/B.ts (renamed from tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts)0
-rw-r--r--tests/specs/info/json_deps_order/recursive_imports/C.ts (renamed from tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts)0
-rw-r--r--tests/specs/info/json_deps_order/recursive_imports/common.ts (renamed from tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts)0
-rw-r--r--tests/specs/info/json_file/__test__.jsonc (renamed from tests/specs/info_tests/json_file/__test__.jsonc)0
-rw-r--r--tests/specs/info/json_file/json_output/main.out (renamed from tests/specs/info_tests/json_file/json_output/main.out)0
-rw-r--r--tests/specs/info/json_file/json_output/main.ts (renamed from tests/specs/info_tests/json_file/json_output/main.ts)0
-rw-r--r--tests/specs/info/json_file/mod1.ts (renamed from tests/specs/info_tests/json_file/mod1.ts)0
-rw-r--r--tests/specs/info/json_file/mod2.ts (renamed from tests/specs/info_tests/json_file/mod2.ts)0
-rw-r--r--tests/specs/info/json_file/print_hello.ts (renamed from tests/specs/info_tests/json_file/print_hello.ts)0
-rw-r--r--tests/specs/info/json_file/subdir2/dynamic_import.ts (renamed from tests/specs/info_tests/json_file/subdir2/dynamic_import.ts)0
-rw-r--r--tests/specs/info/json_file/subdir2/mod2.ts (renamed from tests/specs/info_tests/json_file/subdir2/mod2.ts)0
-rw-r--r--tests/specs/info/json_location/__test__.jsonc (renamed from tests/specs/info_tests/info_json_location/__test__.jsonc)0
-rw-r--r--tests/specs/info/json_location/info_json_location.out (renamed from tests/specs/info_tests/info_json_location/info_json_location.out)0
-rw-r--r--tests/specs/info/missing_module/__test__.jsonc (renamed from tests/specs/info_tests/info_missing_module/__test__.jsonc)0
-rw-r--r--tests/specs/info/missing_module/error_009_missing_js_module.js (renamed from tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js)0
-rw-r--r--tests/specs/info/missing_module/info_missing_module.out (renamed from tests/specs/info_tests/info_missing_module/info_missing_module.out)0
-rw-r--r--tests/specs/info/multiple_imports/__test__.jsonc4
-rw-r--r--tests/specs/info/multiple_imports/multiple_imports.out (renamed from tests/specs/info_tests/multiple_imports/multiple_imports.out)0
-rw-r--r--tests/specs/info/multiple_redirects/__test__.jsonc2
-rw-r--r--tests/specs/info/recursive_modules/__test__.jsonc (renamed from tests/specs/info_tests/info_recursive_modules/__test__.jsonc)0
-rw-r--r--tests/specs/info/recursive_modules/info_recursive_imports_test.out (renamed from tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.out)0
-rw-r--r--tests/specs/info/recursive_modules/info_recursive_imports_test.ts (renamed from tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts)0
-rw-r--r--tests/specs/info/recursive_modules/recursive_imports/A.ts (renamed from tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts)0
-rw-r--r--tests/specs/info/recursive_modules/recursive_imports/B.ts (renamed from tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts)0
-rw-r--r--tests/specs/info/recursive_modules/recursive_imports/C.ts (renamed from tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts)0
-rw-r--r--tests/specs/info/recursive_modules/recursive_imports/common.ts (renamed from tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts)0
-rw-r--r--tests/specs/info/type_import/__test__.jsonc (renamed from tests/specs/info_tests/info_type_import/__test__.jsonc)0
-rw-r--r--tests/specs/info/type_import/info_type_import.out (renamed from tests/specs/info_tests/info_type_import/info_type_import.out)0
-rw-r--r--tests/specs/info/type_import/info_type_import.ts (renamed from tests/specs/info_tests/info_type_import/info_type_import.ts)0
-rw-r--r--tests/specs/info/type_import/type_and_code.ts (renamed from tests/specs/info_tests/info_type_import/type_and_code.ts)0
-rw-r--r--tests/specs/info/types_header_direct/__test__.jsonc4
-rw-r--r--tests/specs/info/types_header_direct/type_directives_01.ts (renamed from tests/specs/info_tests/types_header_direct/type_directives_01.ts)0
-rw-r--r--tests/specs/info/types_header_direct/types_header.out (renamed from tests/specs/info_tests/types_header_direct/types_header.out)0
-rw-r--r--tests/specs/info/with_config_override/__test__.jsonc (renamed from tests/specs/info_tests/with_config_override/__test__.jsonc)0
-rw-r--r--tests/specs/info/with_config_override/with_config/deno-override.json (renamed from tests/specs/info_tests/with_config_override/with_config/deno-override.json)0
-rw-r--r--tests/specs/info/with_config_override/with_config/deno.json (renamed from tests/specs/info_tests/with_config_override/with_config/deno.json)0
-rw-r--r--tests/specs/info/with_config_override/with_config/import_map.json (renamed from tests/specs/info_tests/with_config_override/with_config/import_map.json)0
-rw-r--r--tests/specs/info/with_config_override/with_config/test.ts (renamed from tests/specs/info_tests/with_config_override/with_config/test.ts)0
-rw-r--r--tests/specs/info/with_config_override/with_config/with_config.out (renamed from tests/specs/info_tests/with_config_override/with_config/with_config.out)0
-rw-r--r--tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc4
-rw-r--r--tests/specs/info_tests/multiple_imports/__test__.jsonc4
-rw-r--r--tests/specs/info_tests/types_header_direct/__test__.jsonc4
-rw-r--r--tests/specs/install/future_install_local_deno/__test__.jsonc4
-rw-r--r--tests/specs/lockfile/adding_redirect/__test__.jsonc4
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc2
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc4
-rw-r--r--tests/specs/lockfile/config_file_lock_path/__test__.jsonc4
-rw-r--r--tests/specs/lockfile/frozen_lockfile/__test__.jsonc2
-rw-r--r--tests/specs/lockfile/no_declaration_files/__test__.jsonc2
-rw-r--r--tests/specs/lockfile/no_lock/__test__.jsonc16
-rw-r--r--tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc (renamed from tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc)0
-rw-r--r--tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out (renamed from tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out)0
-rw-r--r--tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts (renamed from tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts)0
-rw-r--r--tests/specs/node/node_test_module/__test__.jsonc (renamed from tests/specs/node_compat_tests/node_test_module/__test__.jsonc)0
-rw-r--r--tests/specs/node/node_test_module/test.js (renamed from tests/specs/node_compat_tests/node_test_module/test.js)0
-rw-r--r--tests/specs/node/node_test_module/test.out (renamed from tests/specs/node_compat_tests/node_test_module/test.out)0
-rw-r--r--tests/specs/node/node_test_module_no_sanitizers/__test__.jsonc (renamed from tests/specs/node_compat_tests/node_test_module_no_sanitizers/__test__.jsonc)0
-rw-r--r--tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts (renamed from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts)0
-rw-r--r--tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/test.js (renamed from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.js)0
-rw-r--r--tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/test.out (renamed from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.out)0
-rw-r--r--tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts (renamed from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts)0
-rw-r--r--tests/specs/node/web_node_events_dispatched_in_correct_order/__test__.jsonc (renamed from tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/__test__.jsonc)0
-rw-r--r--tests/specs/node/web_node_events_dispatched_in_correct_order/events_order.out (renamed from tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.out)0
-rw-r--r--tests/specs/node/web_node_events_dispatched_in_correct_order/events_order.ts (renamed from tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.ts)0
-rw-r--r--tests/specs/npm/builtin_module_module/__test__.jsonc (renamed from tests/specs/npm_tests/builtin_module_module/__test__.jsonc)0
-rw-r--r--tests/specs/npm/builtin_module_module/builtin_module_module/main.js (renamed from tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js)0
-rw-r--r--tests/specs/npm/builtin_module_module/builtin_module_module/main.out (renamed from tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out)0
-rw-r--r--tests/specs/npm/cached_only/__test__.jsonc (renamed from tests/specs/npm_tests/cached_only/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cached_only/cached_only/main.out (renamed from tests/specs/npm_tests/cached_only/cached_only/main.out)2
-rw-r--r--tests/specs/npm/cached_only/cached_only/main.ts (renamed from tests/specs/npm_tests/cached_only/cached_only/main.ts)0
-rw-r--r--tests/specs/npm/check_all/__test__.jsonc (renamed from tests/specs/npm_tests/check_all/__test__.jsonc)0
-rw-r--r--tests/specs/npm/check_all/check_errors/main.ts (renamed from tests/specs/npm_tests/check_all/check_errors/main.ts)0
-rw-r--r--tests/specs/npm/check_all/check_errors/main_all.out (renamed from tests/specs/npm_tests/check_all/check_errors/main_all.out)0
-rw-r--r--tests/specs/npm/check_all/check_errors/main_local.out (renamed from tests/specs/npm_tests/check_all/check_errors/main_local.out)0
-rw-r--r--tests/specs/npm/check_local/__test__.jsonc (renamed from tests/specs/npm_tests/check_local/__test__.jsonc)0
-rw-r--r--tests/specs/npm/check_local/check_errors/main.ts (renamed from tests/specs/npm_tests/check_local/check_errors/main.ts)0
-rw-r--r--tests/specs/npm/check_local/check_errors/main_all.out (renamed from tests/specs/npm_tests/check_local/check_errors/main_all.out)0
-rw-r--r--tests/specs/npm/check_local/check_errors/main_local.out (renamed from tests/specs/npm_tests/check_local/check_errors/main_local.out)0
-rw-r--r--tests/specs/npm/check_package_file_dts_dmts_dcts/__test__.jsonc (renamed from tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc)0
-rw-r--r--tests/specs/npm/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out (renamed from tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out)0
-rw-r--r--tests/specs/npm/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts (renamed from tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts)0
-rw-r--r--tests/specs/npm/child_process_fork_test/__test__.jsonc (renamed from tests/specs/npm_tests/child_process_fork_test/__test__.jsonc)0
-rw-r--r--tests/specs/npm/child_process_fork_test/child_process_fork_test/main.out (renamed from tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out)0
-rw-r--r--tests/specs/npm/child_process_fork_test/child_process_fork_test/main.ts (renamed from tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts)0
-rw-r--r--tests/specs/npm/cjs_invalid_name_exports/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out (renamed from tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out)0
-rw-r--r--tests/specs/npm/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts (renamed from tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts)0
-rw-r--r--tests/specs/npm/cjs_local_global_decls/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_local_global_decls/cjs_local_global_decls/main.out (renamed from tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out)0
-rw-r--r--tests/specs/npm/cjs_local_global_decls/cjs_local_global_decls/main.ts (renamed from tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts)0
-rw-r--r--tests/specs/npm/cjs_module_export_assignment/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_module_export_assignment/cjs_module_export_assignment/main.out (renamed from tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out)0
-rw-r--r--tests/specs/npm/cjs_module_export_assignment/cjs_module_export_assignment/main.ts (renamed from tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts)0
-rw-r--r--tests/specs/npm/cjs_module_export_assignment_number/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out (renamed from tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out)0
-rw-r--r--tests/specs/npm/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts (renamed from tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts)0
-rw-r--r--tests/specs/npm/cjs_pkg_imports/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_pkg_imports/cjs_pkg_imports/main.out (renamed from tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out)0
-rw-r--r--tests/specs/npm/cjs_pkg_imports/cjs_pkg_imports/main.ts (renamed from tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts)0
-rw-r--r--tests/specs/npm/cjs_reexport_collision/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_reexport_collision/cjs_reexport_collision/main.out (renamed from tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out)0
-rw-r--r--tests/specs/npm/cjs_reexport_collision/cjs_reexport_collision/main.ts (renamed from tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts)0
-rw-r--r--tests/specs/npm/cjs_require_esm/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_require_esm/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_require_esm/cjs_require_esm/main.out (renamed from tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out)0
-rw-r--r--tests/specs/npm/cjs_require_esm/cjs_require_esm/main.ts (renamed from tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts)0
-rw-r--r--tests/specs/npm/cjs_require_esm_mjs/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out (renamed from tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out)0
-rw-r--r--tests/specs/npm/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts (renamed from tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts)0
-rw-r--r--tests/specs/npm/cjs_sub_path/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_sub_path/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_sub_path/cjs_sub_path/main.js (renamed from tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js)0
-rw-r--r--tests/specs/npm/cjs_sub_path/cjs_sub_path/main.out (renamed from tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out)0
-rw-r--r--tests/specs/npm/cjs_this_in_exports/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.js (renamed from tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js)0
-rw-r--r--tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.out (renamed from tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out)2
-rw-r--r--tests/specs/npm/cjs_with_deps/__test__.jsonc (renamed from tests/specs/npm_tests/cjs_with_deps/__test__.jsonc)0
-rw-r--r--tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js (renamed from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js)0
-rw-r--r--tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out (renamed from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out)0
-rw-r--r--tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out (renamed from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out)0
-rw-r--r--tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out (renamed from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out)0
-rw-r--r--tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out (renamed from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out)0
-rw-r--r--tests/specs/npm/compare_globals/__test__.jsonc (renamed from tests/specs/npm_tests/compare_globals/__test__.jsonc)0
-rw-r--r--tests/specs/npm/compare_globals/compare_globals/main.out (renamed from tests/specs/npm_tests/compare_globals/compare_globals/main.out)0
-rw-r--r--tests/specs/npm/compare_globals/compare_globals/main.ts (renamed from tests/specs/npm_tests/compare_globals/compare_globals/main.ts)0
-rw-r--r--tests/specs/npm/create_require/__test__.jsonc (renamed from tests/specs/npm_tests/create_require/__test__.jsonc)0
-rw-r--r--tests/specs/npm/create_require/create_require/main.out (renamed from tests/specs/npm_tests/create_require/create_require/main.out)0
-rw-r--r--tests/specs/npm/create_require/create_require/main.ts (renamed from tests/specs/npm_tests/create_require/create_require/main.ts)0
-rw-r--r--tests/specs/npm/deno_cache/__test__.jsonc (renamed from tests/specs/npm_tests/deno_cache/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_cache/deno_cache.out (renamed from tests/specs/npm_tests/deno_cache/deno_cache.out)0
-rw-r--r--tests/specs/npm/deno_run_bin_cjs/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_bin_cjs/deno_run_cjs.out (renamed from tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out)0
-rw-r--r--tests/specs/npm/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out (renamed from tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out)0
-rw-r--r--tests/specs/npm/deno_run_bin_esm/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_bin_esm/deno_run_esm.out (renamed from tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out)0
-rw-r--r--tests/specs/npm/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out (renamed from tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out)0
-rw-r--r--tests/specs/npm/deno_run_bin_no_ext/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_bin_no_ext/deno_run_no_ext.out (renamed from tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out)0
-rw-r--r--tests/specs/npm/deno_run_bin_special_chars/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out (renamed from tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out)0
-rw-r--r--tests/specs/npm/deno_run_cowsay/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_cowsay/deno_run_cowsay.out (renamed from tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out)0
-rw-r--r--tests/specs/npm/deno_run_cowsay_explicit/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_cowsay_explicit/deno_run_cowsay.out (renamed from tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out)0
-rw-r--r--tests/specs/npm/deno_run_cowsay_with_node_modules_dir/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc)1
-rw-r--r--tests/specs/npm/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out (renamed from tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out)0
-rw-r--r--tests/specs/npm/deno_run_cowthink/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_cowthink/deno_run_cowthink.out (renamed from tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out)0
-rw-r--r--tests/specs/npm/deno_run_no_bin_entrypoint/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out (renamed from tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out)0
-rw-r--r--tests/specs/npm/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out (renamed from tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out)0
-rw-r--r--tests/specs/npm/deno_run_non_existent/__test__.jsonc (renamed from tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc)0
-rw-r--r--tests/specs/npm/deno_run_non_existent/deno_run_non_existent.out (renamed from tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_false/__test__.jsonc (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_true/__test__.jsonc (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc)1
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out)0
-rw-r--r--tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json (renamed from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json)0
-rw-r--r--tests/specs/npm/directory_import_folder_index_js/__test__.jsonc (renamed from tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc)0
-rw-r--r--tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out (renamed from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out)0
-rw-r--r--tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts (renamed from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts)0
-rw-r--r--tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out (renamed from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out)0
-rw-r--r--tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts (renamed from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts)0
-rw-r--r--tests/specs/npm/directory_import_folder_no_index/__test__.jsonc (renamed from tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc)0
-rw-r--r--tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out (renamed from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out)0
-rw-r--r--tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts (renamed from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts)0
-rw-r--r--tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out (renamed from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out)0
-rw-r--r--tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts (renamed from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts)0
-rw-r--r--tests/specs/npm/dual_cjs_esm/__test__.jsonc (renamed from tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc)0
-rw-r--r--tests/specs/npm/dual_cjs_esm/dual_cjs_esm/main.out (renamed from tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out)0
-rw-r--r--tests/specs/npm/dual_cjs_esm/dual_cjs_esm/main.ts (renamed from tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts)0
-rw-r--r--tests/specs/npm/dynamic_import_deno_ts_from_npm/__test__.jsonc (renamed from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc)0
-rw-r--r--tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts (renamed from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts)0
-rw-r--r--tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out (renamed from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out)0
-rw-r--r--tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts (renamed from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts)0
-rw-r--r--tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts (renamed from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts)0
-rw-r--r--tests/specs/npm/dynamic_import_invalid_package_name/__test__.jsonc (renamed from tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc)0
-rw-r--r--tests/specs/npm/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out (renamed from tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out)0
-rw-r--r--tests/specs/npm/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts (renamed from tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts)0
-rw-r--r--tests/specs/npm/dynamic_import_json/__test__.jsonc (renamed from tests/specs/npm_tests/dynamic_import_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/dynamic_import_json/import_json/main.js (renamed from tests/specs/npm_tests/dynamic_import_json/import_json/main.js)0
-rw-r--r--tests/specs/npm/dynamic_import_json/import_json/main.out (renamed from tests/specs/npm_tests/dynamic_import_json/import_json/main.out)0
-rw-r--r--tests/specs/npm/dynamic_import_reload_same_package/__test__.jsonc (renamed from tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc)0
-rw-r--r--tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out (renamed from tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out)0
-rw-r--r--tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts (renamed from tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts)0
-rw-r--r--tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts (renamed from tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts)0
-rw-r--r--tests/specs/npm/env_var_re_export_dev/__test__.jsonc (renamed from tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc)0
-rw-r--r--tests/specs/npm/env_var_re_export_dev/env_var_re_export/main.js (renamed from tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js)0
-rw-r--r--tests/specs/npm/env_var_re_export_prod/__test__.jsonc (renamed from tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc)0
-rw-r--r--tests/specs/npm/env_var_re_export_prod/env_var_re_export/main.js (renamed from tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js)0
-rw-r--r--tests/specs/npm/error_version_after_subpath/__test__.jsonc (renamed from tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc)0
-rw-r--r--tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.js (renamed from tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js)0
-rw-r--r--tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out (renamed from tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out)0
-rw-r--r--tests/specs/npm/import_json/__test__.jsonc (renamed from tests/specs/npm_tests/import_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/import_json/import_json/main.js (renamed from tests/specs/npm_tests/import_json/import_json/main.js)0
-rw-r--r--tests/specs/npm/import_json/import_json/main.out (renamed from tests/specs/npm_tests/import_json/import_json/main.out)0
-rw-r--r--tests/specs/npm/import_map/__test__.jsonc (renamed from tests/specs/npm_tests/import_map/__test__.jsonc)0
-rw-r--r--tests/specs/npm/import_map/import_map/import_map.json (renamed from tests/specs/npm_tests/import_map/import_map/import_map.json)0
-rw-r--r--tests/specs/npm/import_map/import_map/main.js (renamed from tests/specs/npm_tests/import_map/import_map/main.js)0
-rw-r--r--tests/specs/npm/import_map/import_map/main.out (renamed from tests/specs/npm_tests/import_map/import_map/main.out)0
-rw-r--r--tests/specs/npm/imports_package_json/__test__.jsonc (renamed from tests/specs/npm_tests/imports_package_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/main.js (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/main.js)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/main.out (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/main.out)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/package.json (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/package.json)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js)0
-rw-r--r--tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out (renamed from tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js)0
-rw-r--r--tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out (renamed from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js)0
-rw-r--r--tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out (renamed from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out)0
-rw-r--r--tests/specs/npm/info_chalk_display/__test__.jsonc (renamed from tests/specs/npm_tests/info_chalk_display/__test__.jsonc)0
-rw-r--r--tests/specs/npm/info_chalk_display/cjs_with_deps/main.js (renamed from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js)0
-rw-r--r--tests/specs/npm/info_chalk_display/cjs_with_deps/main.out (renamed from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out)0
-rw-r--r--tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out (renamed from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out)0
-rw-r--r--tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out (renamed from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out)0
-rw-r--r--tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out (renamed from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out)0
-rw-r--r--tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc (renamed from tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc)1
-rw-r--r--tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js (renamed from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js)0
-rw-r--r--tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out (renamed from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out)0
-rw-r--r--tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out (renamed from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out)0
-rw-r--r--tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out (renamed from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out)0
-rw-r--r--tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out (renamed from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out)0
-rw-r--r--tests/specs/npm/info_chalk_json/__test__.jsonc (renamed from tests/specs/npm_tests/info_chalk_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/info_chalk_json/cjs_with_deps/main.js (renamed from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js)0
-rw-r--r--tests/specs/npm/info_chalk_json/cjs_with_deps/main.out (renamed from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out)0
-rw-r--r--tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out (renamed from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out)0
-rw-r--r--tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out (renamed from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out)0
-rw-r--r--tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out (renamed from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out)0
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc (renamed from tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc)1
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js (renamed from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js)0
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out (renamed from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out)0
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out (renamed from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out)0
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out (renamed from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out)0
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out (renamed from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out)0
-rw-r--r--tests/specs/npm/info_cli_chalk_display/__test__.jsonc (renamed from tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc)0
-rw-r--r--tests/specs/npm/info_cli_chalk_display/info/chalk.out (renamed from tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out)0
-rw-r--r--tests/specs/npm/info_cli_chalk_display/info/chalk_json.out (renamed from tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out)0
-rw-r--r--tests/specs/npm/info_cli_chalk_json/__test__.jsonc (renamed from tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/info_cli_chalk_json/info/chalk.out (renamed from tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out)0
-rw-r--r--tests/specs/npm/info_cli_chalk_json/info/chalk_json.out (renamed from tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out)0
-rw-r--r--tests/specs/npm/info_peer_deps/__test__.jsonc (renamed from tests/specs/npm_tests/info_peer_deps/__test__.jsonc)0
-rw-r--r--tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out (renamed from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out)0
-rw-r--r--tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts (renamed from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts)0
-rw-r--r--tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out (renamed from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out)0
-rw-r--r--tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out (renamed from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out)0
-rw-r--r--tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out (renamed from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out)0
-rw-r--r--tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out (renamed from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/__test__.jsonc (renamed from tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out (renamed from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts (renamed from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out (renamed from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out (renamed from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out (renamed from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out)0
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out (renamed from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc (renamed from tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out (renamed from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts (renamed from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out (renamed from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts (renamed from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc (renamed from tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc)1
-rw-r--r--tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out (renamed from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts (renamed from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out (renamed from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out)0
-rw-r--r--tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts (renamed from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts)0
-rw-r--r--tests/specs/npm/node_modules_deno_node_modules/__test__.jsonc (renamed from tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc)0
-rw-r--r--tests/specs/npm/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out (renamed from tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out)0
-rw-r--r--tests/specs/npm/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts (renamed from tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts)0
-rw-r--r--tests/specs/npm/node_modules_deno_node_modules_local/__test__.jsonc (renamed from tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc)1
-rw-r--r--tests/specs/npm/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out (renamed from tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out)0
-rw-r--r--tests/specs/npm/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts (renamed from tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts)0
-rw-r--r--tests/specs/npm/node_modules_dir_require_added_node_modules_folder/__test__.jsonc (renamed from tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc)1
-rw-r--r--tests/specs/npm/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js (renamed from tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js)0
-rw-r--r--tests/specs/npm/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out (renamed from tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out)0
-rw-r--r--tests/specs/npm/node_modules_dir_require_main_entry/__test__.jsonc (renamed from tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc)1
-rw-r--r--tests/specs/npm/node_modules_dir_require_main_entry/require_main/main.js (renamed from tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js)0
-rw-r--r--tests/specs/npm/node_modules_dir_require_main_entry/require_main/main.out (renamed from tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out)0
-rw-r--r--tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc (renamed from tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc)1
-rw-r--r--tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js (renamed from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js)0
-rw-r--r--tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out (renamed from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out)0
-rw-r--r--tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out (renamed from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out)0
-rw-r--r--tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out (renamed from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out)0
-rw-r--r--tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out (renamed from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out)0
-rw-r--r--tests/specs/npm/node_modules_dir_yargs/__test__.jsonc (renamed from tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc)1
-rw-r--r--tests/specs/npm/node_modules_dir_yargs/cjs_yargs/main.js (renamed from tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js)0
-rw-r--r--tests/specs/npm/node_modules_dir_yargs/cjs_yargs/main.out (renamed from tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out)0
-rw-r--r--tests/specs/npm/non_existent_dep/__test__.jsonc (renamed from tests/specs/npm_tests/non_existent_dep/__test__.jsonc)0
-rw-r--r--tests/specs/npm/non_existent_dep_version/__test__.jsonc (renamed from tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc)0
-rw-r--r--tests/specs/npm/nonexistent_file/__test__.jsonc (renamed from tests/specs/npm_tests/nonexistent_file/__test__.jsonc)0
-rw-r--r--tests/specs/npm/nonexistent_file/nonexistent_file/main.js (renamed from tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js)0
-rw-r--r--tests/specs/npm/nonexistent_file/nonexistent_file/main.out (renamed from tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out)0
-rw-r--r--tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc (renamed from tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc)1
-rw-r--r--tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js (renamed from tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js)0
-rw-r--r--tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out (renamed from tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out)0
-rw-r--r--tests/specs/npm/permissions_outside_package/__test__.jsonc (renamed from tests/specs/npm_tests/permissions_outside_package/__test__.jsonc)0
-rw-r--r--tests/specs/npm/permissions_outside_package/permissions_outside_package/foo/config.js (renamed from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js)0
-rw-r--r--tests/specs/npm/permissions_outside_package/permissions_outside_package/foo/package.json (renamed from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json)0
-rw-r--r--tests/specs/npm/permissions_outside_package/permissions_outside_package/main.out (renamed from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out)0
-rw-r--r--tests/specs/npm/permissions_outside_package/permissions_outside_package/main.ts (renamed from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts)0
-rw-r--r--tests/specs/npm/remote_npm_specifier/__test__.jsonc (renamed from tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc)0
-rw-r--r--tests/specs/npm/remote_npm_specifier/remote_npm_specifier/main.out (renamed from tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out)0
-rw-r--r--tests/specs/npm/remote_npm_specifier/remote_npm_specifier/main.ts (renamed from tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts)0
-rw-r--r--tests/specs/npm/remote_npm_specifier/remote_npm_specifier/remote.ts (renamed from tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts)0
-rw-r--r--tests/specs/npm/require_esm/__test__.jsonc (renamed from tests/specs/npm_tests/require_esm/__test__.jsonc)0
-rw-r--r--tests/specs/npm/require_esm/require_esm/esm.js (renamed from tests/specs/npm_tests/require_esm/require_esm/esm.js)0
-rw-r--r--tests/specs/npm/require_esm/require_esm/main.out (renamed from tests/specs/npm_tests/require_esm/require_esm/main.out)0
-rw-r--r--tests/specs/npm/require_esm/require_esm/main.ts (renamed from tests/specs/npm_tests/require_esm/require_esm/main.ts)0
-rw-r--r--tests/specs/npm/require_json/__test__.jsonc (renamed from tests/specs/npm_tests/require_json/__test__.jsonc)0
-rw-r--r--tests/specs/npm/require_json/require_json/main.js (renamed from tests/specs/npm_tests/require_json/require_json/main.js)0
-rw-r--r--tests/specs/npm/require_json/require_json/main.out (renamed from tests/specs/npm_tests/require_json/require_json/main.out)0
-rw-r--r--tests/specs/npm/reserved_word_exports/__test__.jsonc (renamed from tests/specs/npm_tests/reserved_word_exports/__test__.jsonc)0
-rw-r--r--tests/specs/npm/reserved_word_exports/reserved_word_exports/main.out (renamed from tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out)0
-rw-r--r--tests/specs/npm/reserved_word_exports/reserved_word_exports/main.ts (renamed from tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts)0
-rw-r--r--tests/specs/npm/run_existing_npm_package_with_subpath/__test__.jsonc (renamed from tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc)1
-rw-r--r--tests/specs/npm/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out (renamed from tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out)0
-rw-r--r--tests/specs/npm/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json (renamed from tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json)0
-rw-r--r--tests/specs/npm/sub_paths/__test__.jsonc (renamed from tests/specs/npm_tests/sub_paths/__test__.jsonc)0
-rw-r--r--tests/specs/npm/sub_paths/sub_paths/main.jsx (renamed from tests/specs/npm_tests/sub_paths/sub_paths/main.jsx)0
-rw-r--r--tests/specs/npm/sub_paths/sub_paths/main.out (renamed from tests/specs/npm_tests/sub_paths/sub_paths/main.out)0
-rw-r--r--tests/specs/npm/tarball_with_global_header/__test__.jsonc (renamed from tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc)0
-rw-r--r--tests/specs/npm/tarball_with_global_header/tarball_with_global_header/main.js (renamed from tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js)0
-rw-r--r--tests/specs/npm/tarball_with_global_header/tarball_with_global_header/main.out (renamed from tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out)0
-rw-r--r--tests/specs/npm/translate_cjs_to_esm/__test__.jsonc (renamed from tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc)0
-rw-r--r--tests/specs/npm/translate_cjs_to_esm/translate_cjs_to_esm/main.js (renamed from tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js)0
-rw-r--r--tests/specs/npm/translate_cjs_to_esm/translate_cjs_to_esm/main.out (renamed from tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out)0
-rw-r--r--tests/specs/npm/types_ambient_module/__test__.jsonc (renamed from tests/specs/npm_tests/types_ambient_module/__test__.jsonc)0
-rw-r--r--tests/specs/npm/types_ambient_module/types_ambient_module/import_map.json (renamed from tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json)0
-rw-r--r--tests/specs/npm/types_ambient_module/types_ambient_module/main.out (renamed from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out)0
-rw-r--r--tests/specs/npm/types_ambient_module/types_ambient_module/main.ts (renamed from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts)0
-rw-r--r--tests/specs/npm/types_ambient_module/types_ambient_module/main_import_map.out (renamed from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out)0
-rw-r--r--tests/specs/npm/types_ambient_module/types_ambient_module/main_import_map.ts (renamed from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts)0
-rw-r--r--tests/specs/npm/types_ambient_module_import_map/__test__.jsonc (renamed from tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc)0
-rw-r--r--tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json (renamed from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json)0
-rw-r--r--tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out (renamed from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out)0
-rw-r--r--tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts (renamed from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts)0
-rw-r--r--tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out (renamed from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out)0
-rw-r--r--tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts (renamed from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts)0
-rw-r--r--tests/specs/npm/types_d_ext/__test__.jsonc (renamed from tests/specs/npm_tests/types_d_ext/__test__.jsonc)0
-rw-r--r--tests/specs/npm/types_d_ext/d_ext/main.out (renamed from tests/specs/npm_tests/types_d_ext/d_ext/main.out)0
-rw-r--r--tests/specs/npm/types_d_ext/d_ext/main.ts (renamed from tests/specs/npm_tests/types_d_ext/d_ext/main.ts)0
-rw-r--r--tests/specs/npm/types_entry_value_not_exists/__test__.jsonc (renamed from tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc)0
-rw-r--r--tests/specs/npm/types_entry_value_not_exists/types_entry_value_not_exists/main.out (renamed from tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out)0
-rw-r--r--tests/specs/npm/types_entry_value_not_exists/types_entry_value_not_exists/main.ts (renamed from tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts)0
-rw-r--r--tests/specs/npm/types_exports_import_types/__test__.jsonc (renamed from tests/specs/npm_tests/types_exports_import_types/__test__.jsonc)0
-rw-r--r--tests/specs/npm/types_exports_import_types/types_exports_import_types/main.out (renamed from tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out)0
-rw-r--r--tests/specs/npm/types_exports_import_types/types_exports_import_types/main.ts (renamed from tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts)0
-rw-r--r--tests/specs/npm/types_no_types_entry/__test__.jsonc (renamed from tests/specs/npm_tests/types_no_types_entry/__test__.jsonc)0
-rw-r--r--tests/specs/npm/types_no_types_entry/types_no_types_entry/main.out (renamed from tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out)0
-rw-r--r--tests/specs/npm/types_no_types_entry/types_no_types_entry/main.ts (renamed from tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts)0
-rw-r--r--tests/specs/npm/typescript_file_in_package/__test__.jsonc (renamed from tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc)0
-rw-r--r--tests/specs/npm/typescript_file_in_package/typescript_file_in_package/main.out (renamed from tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out)0
-rw-r--r--tests/specs/npm/typescript_file_in_package/typescript_file_in_package/main.ts (renamed from tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts)0
-rw-r--r--tests/specs/permission/allow_import/__test__.jsonc52
-rw-r--r--tests/specs/permission/allow_import/builtin_host.ts4
-rw-r--r--tests/specs/permission/allow_import/cache.out2
-rw-r--r--tests/specs/permission/allow_import/check.out2
-rw-r--r--tests/specs/permission/allow_import/compile.out2
-rw-r--r--tests/specs/permission/allow_import/doc.out6
-rw-r--r--tests/specs/permission/allow_import/doc.ts3
-rw-r--r--tests/specs/permission/allow_import/doc_allowed.out10
-rw-r--r--tests/specs/permission/allow_import/info.out7
-rw-r--r--tests/specs/permission/allow_import/main.ts1
-rw-r--r--tests/specs/permission/allow_import/run.out2
-rw-r--r--tests/specs/permission/allow_import/serve.out2
-rw-r--r--tests/specs/permission/allow_import_jsx/__test__.jsonc5
-rw-r--r--tests/specs/permission/allow_import_jsx/deno.jsonc6
-rw-r--r--tests/specs/permission/allow_import_jsx/main.out3
-rw-r--r--tests/specs/permission/allow_import_jsx/main.tsx3
-rw-r--r--tests/specs/permission/allow_import_main_module/__test__.jsonc17
-rw-r--r--tests/specs/permission/allow_import_not_on_redirect/__test__.jsonc5
-rw-r--r--tests/specs/permission/allow_import_not_on_redirect/main.js2
-rw-r--r--tests/specs/permission/allow_import_not_on_redirect/main.out2
-rw-r--r--tests/specs/publish/banned_triple_slash_directives/publish.out1
-rw-r--r--tests/specs/publish/invalid_import/invalid_import.out5
-rw-r--r--tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out3
-rw-r--r--tests/specs/publish/missing_constraint/publish.out20
-rw-r--r--tests/specs/publish/missing_constraint_jsx_import_source/mod.out11
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/main.out3
-rw-r--r--tests/specs/run/redirect_javascript/__test__.jsonc2
-rw-r--r--tests/specs/test/check_local_by_default/__test__.jsonc2
-rw-r--r--tests/specs/test/check_local_by_default2/__test__.jsonc2
-rw-r--r--tests/specs/worker/error_worker_permissions_remote/__test__.jsonc2
-rw-r--r--tests/specs/worker/error_worker_permissions_remote/error_worker_permissions_remote.ts.out2
-rw-r--r--tests/specs/worker/worker_permissions_blob_remote/permissions_blob_remote.ts.out2
-rw-r--r--tests/specs/worker/worker_permissions_data_remote/permissions_data_remote.ts.out2
-rw-r--r--tests/specs/worker/worker_permissions_dynamic_remote/__test__.jsonc4
-rw-r--r--tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts (renamed from tests/testdata/workers/permissions_dynamic_remote.ts)3
-rw-r--r--tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts.out (renamed from tests/testdata/workers/permissions_dynamic_remote.ts.out)2
-rw-r--r--tests/specs/worker/worker_permissions_remote_remote/__test__.jsonc2
-rw-r--r--tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts (renamed from tests/testdata/workers/permissions_remote_remote.ts)0
-rw-r--r--tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts.out2
-rw-r--r--tests/testdata/add.ts3
-rw-r--r--tests/testdata/dynamic_import/permissions_blob_local.ts2
-rw-r--r--tests/testdata/dynamic_import/permissions_blob_remote.ts1
-rw-r--r--tests/testdata/dynamic_import/permissions_blob_remote.ts.out4
-rw-r--r--tests/testdata/dynamic_import/permissions_data_local.ts2
-rw-r--r--tests/testdata/dynamic_import/permissions_data_remote.ts.out2
-rw-r--r--tests/testdata/dynamic_import/permissions_remote_remote.ts.out2
-rw-r--r--tests/testdata/run/error_015_dynamic_import_permissions.js2
-rw-r--r--tests/testdata/run/error_015_dynamic_import_permissions.out4
-rw-r--r--tests/testdata/run/lock_write_fetch/main.ts3
-rw-r--r--tests/testdata/run/type_directives_01.ts2
-rw-r--r--tests/testdata/run/type_directives_01.ts.out2
-rw-r--r--tests/testdata/run/type_headers_deno_types.ts4
-rw-r--r--tests/testdata/workers/static_remote.ts2
507 files changed, 1116 insertions, 483 deletions
diff --git a/Cargo.lock b/Cargo.lock
index bec2ec12c..854d8310b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1584,9 +1584,9 @@ dependencies = [
[[package]]
name = "deno_graph"
-version = "0.82.2"
+version = "0.82.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9328b62ffc7e806f1c92fd7a22e4ff3046fcb53f2d46e3e1297482b2c4c2bb9d"
+checksum = "938ed2efa1dd9fdcceeebc169b2b7910506b8dacc992cfdcffd84aa6a3eb8db0"
dependencies = [
"anyhow",
"async-trait",
@@ -8119,9 +8119,9 @@ dependencies = [
[[package]]
name = "webpki-root-certs"
-version = "0.26.5"
+version = "0.26.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6d93b773107ba49bc84dd3b241e019c702d886fd5c457defe2ea8b1123a5dcd"
+checksum = "e8c6dfa3ac045bc517de14c7b1384298de1dbd229d38e08e169d9ae8c170937c"
dependencies = [
"rustls-pki-types",
]
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index ec2243a81..ede5cc15c 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -68,7 +68,7 @@ deno_cache_dir = { workspace = true }
deno_config = { version = "=0.35.0", features = ["workspace", "sync"] }
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_doc = { version = "0.148.0", features = ["html", "syntect"] }
-deno_graph = { version = "=0.82.2" }
+deno_graph = { version = "=0.82.3" }
deno_lint = { version = "=0.67.0", features = ["docs"] }
deno_lockfile.workspace = true
deno_npm = "=0.25.2"
diff --git a/cli/args/flags.rs b/cli/args/flags.rs
index 10fa07bed..74ccb512f 100644
--- a/cli/args/flags.rs
+++ b/cli/args/flags.rs
@@ -1,5 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+use std::borrow::Cow;
use std::collections::HashSet;
use std::env;
use std::ffi::OsString;
@@ -44,6 +45,7 @@ use crate::args::resolve_no_prompt;
use crate::util::fs::canonicalize_path;
use super::flags_net;
+use super::jsr_url;
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub enum ConfigFlag {
@@ -639,6 +641,7 @@ pub struct PermissionFlags {
pub allow_write: Option<Vec<String>>,
pub deny_write: Option<Vec<String>>,
pub no_prompt: bool,
+ pub allow_import: Option<Vec<String>>,
}
impl PermissionFlags {
@@ -658,9 +661,10 @@ impl PermissionFlags {
|| self.deny_sys.is_some()
|| self.allow_write.is_some()
|| self.deny_write.is_some()
+ || self.allow_import.is_some()
}
- pub fn to_options(&self) -> PermissionsOptions {
+ pub fn to_options(&self, cli_arg_urls: &[Cow<Url>]) -> PermissionsOptions {
fn handle_allow<T: Default>(
allow_all: bool,
value: Option<T>,
@@ -673,6 +677,41 @@ impl PermissionFlags {
}
}
+ fn handle_imports(
+ cli_arg_urls: &[Cow<Url>],
+ imports: Option<Vec<String>>,
+ ) -> Option<Vec<String>> {
+ if imports.is_some() {
+ return imports;
+ }
+
+ let builtin_allowed_import_hosts = [
+ "deno.land:443",
+ "esm.sh:443",
+ "jsr.io:443",
+ "raw.githubusercontent.com:443",
+ "gist.githubusercontent.com:443",
+ ];
+
+ let mut imports =
+ Vec::with_capacity(builtin_allowed_import_hosts.len() + 1);
+ imports
+ .extend(builtin_allowed_import_hosts.iter().map(|s| s.to_string()));
+
+ // also add the JSR_URL env var
+ if let Some(jsr_host) = allow_import_host_from_url(jsr_url()) {
+ imports.push(jsr_host);
+ }
+ // include the cli arg urls
+ for url in cli_arg_urls {
+ if let Some(host) = allow_import_host_from_url(url) {
+ imports.push(host);
+ }
+ }
+
+ Some(imports)
+ }
+
PermissionsOptions {
allow_all: self.allow_all,
allow_env: handle_allow(self.allow_all, self.allow_env.clone()),
@@ -689,11 +728,33 @@ impl PermissionFlags {
deny_sys: self.deny_sys.clone(),
allow_write: handle_allow(self.allow_all, self.allow_write.clone()),
deny_write: self.deny_write.clone(),
+ allow_import: handle_imports(
+ cli_arg_urls,
+ handle_allow(self.allow_all, self.allow_import.clone()),
+ ),
prompt: !resolve_no_prompt(self),
}
}
}
+/// Gets the --allow-import host from the provided url
+fn allow_import_host_from_url(url: &Url) -> Option<String> {
+ let host = url.host()?;
+ if let Some(port) = url.port() {
+ Some(format!("{}:{}", host, port))
+ } else {
+ use deno_core::url::Host::*;
+ match host {
+ Domain(domain) if domain == "jsr.io" && url.scheme() == "https" => None,
+ _ => match url.scheme() {
+ "https" => Some(format!("{}:443", host)),
+ "http" => Some(format!("{}:80", host)),
+ _ => None,
+ },
+ }
+ }
+}
+
fn join_paths(allowlist: &[String], d: &str) -> String {
allowlist
.iter()
@@ -881,6 +942,17 @@ impl Flags {
_ => {}
}
+ match &self.permissions.allow_import {
+ Some(allowlist) if allowlist.is_empty() => {
+ args.push("--allow-import".to_string());
+ }
+ Some(allowlist) => {
+ let s = format!("--allow-import={}", allowlist.join(","));
+ args.push(s);
+ }
+ _ => {}
+ }
+
args
}
@@ -991,6 +1063,7 @@ impl Flags {
self.permissions.allow_write = None;
self.permissions.allow_sys = None;
self.permissions.allow_ffi = None;
+ self.permissions.allow_import = None;
}
pub fn resolve_watch_exclude_set(
@@ -1707,6 +1780,7 @@ Future runs of this module will trigger no downloads or compilation unless --rel
)
.arg(frozen_lockfile_arg())
.arg(allow_scripts_arg())
+ .arg(allow_import_arg())
})
}
@@ -1766,6 +1840,7 @@ Unless --reload is specified, this command will not re-download already cached d
.required_unless_present("help")
.value_hint(ValueHint::FilePath),
)
+ .arg(allow_import_arg())
}
)
}
@@ -1994,6 +2069,7 @@ Show documentation for runtime built-ins:
.arg(no_lock_arg())
.arg(no_npm_arg())
.arg(no_remote_arg())
+ .arg(allow_import_arg())
.arg(
Arg::new("json")
.long("json")
@@ -2358,6 +2434,7 @@ The following information is shown:
.help("UNSTABLE: Outputs the information in JSON format")
.action(ArgAction::SetTrue),
))
+ .arg(allow_import_arg())
}
fn install_subcommand() -> Command {
@@ -3151,47 +3228,44 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
.after_help(cstr!(r#"<y>Permission options:</>
<y>Docs</>: <c>https://docs.deno.com/go/permissions</>
- <g>-A, --allow-all</> Allow all permissions.
- <g>--no-prompt</> Always throw if required permission wasn't passed.
- <p(245)>Can also be set via the DENO_NO_PROMPT environment variable.</>
- <g>-R, --allow-read[=<<PATH>...]</> Allow file system read access. Optionally specify allowed paths.
- <p(245)>--allow-read | --allow-read="/etc,/var/log.txt"</>
- <g>-W, --allow-write[=<<PATH>...]</> Allow file system write access. Optionally specify allowed paths.
- <p(245)>--allow-write | --allow-write="/etc,/var/log.txt"</>
- <g>-N, --allow-net[=<<IP_OR_HOSTNAME>...]</> Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary.
- <p(245)>--allow-net | --allow-net="localhost:8080,deno.land"</>
- <g>-E, --allow-env[=<<VARIABLE_NAME>...]</> Allow access to environment variables. Optionally specify accessible environment variables.
- <p(245)>--allow-env | --allow-env="PORT,HOME,PATH"</>
- <g>-S, --allow-sys[=<<API_NAME>...]</> Allow access to OS information. Optionally allow specific APIs by function name.
- <p(245)>--allow-sys | --allow-sys="systemMemoryInfo,osRelease"</>
- <g>--allow-run[=<<PROGRAM_NAME>...]</> Allow running subprocesses. Optionally specify allowed runnable program names.
- <p(245)>--allow-run | --allow-run="whoami,ps"</>
- <g>--allow-ffi[=<<PATH>...]</> (Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files.
- <p(245)>--allow-ffi | --allow-ffi="./libfoo.so"</>
- <g> --deny-read[=<<PATH>...]</> Deny file system read access. Optionally specify denied paths.
- <p(245)>--deny-read | --deny-read="/etc,/var/log.txt"</>
- <g> --deny-write[=<<PATH>...]</> Deny file system write access. Optionally specify denied paths.
- <p(245)>--deny-write | --deny-write="/etc,/var/log.txt"</>
- <g> --deny-net[=<<IP_OR_HOSTNAME>...]</> Deny network access. Optionally specify defined IP addresses and host names, with ports as necessary.
- <p(245)>--deny-net | --deny-net="localhost:8080,deno.land"</>
- <g> --deny-env[=<<VARIABLE_NAME>...]</> Deny access to environment variables. Optionally specify inacessible environment variables.
- <p(245)>--deny-env | --deny-env="PORT,HOME,PATH"</>
- <g>-S, --deny-sys[=<<API_NAME>...]</> Deny access to OS information. Optionally deny specific APIs by function name.
- <p(245)>--deny-sys | --deny-sys="systemMemoryInfo,osRelease"</>
- <g>--deny-run[=<<PROGRAM_NAME>...]</> Deny running subprocesses. Optionally specify denied runnable program names.
- <p(245)>--deny-run | --deny-run="whoami,ps"</>
- <g>--deny-ffi[=<<PATH>...]</> (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files.
- <p(245)>--deny-ffi | --deny-ffi="./libfoo.so"</>
+ <g>-A, --allow-all</> Allow all permissions.
+ <g>--no-prompt</> Always throw if required permission wasn't passed.
+ <p(245)>Can also be set via the DENO_NO_PROMPT environment variable.</>
+ <g>-R, --allow-read[=<<PATH>...]</> Allow file system read access. Optionally specify allowed paths.
+ <p(245)>--allow-read | --allow-read="/etc,/var/log.txt"</>
+ <g>-W, --allow-write[=<<PATH>...]</> Allow file system write access. Optionally specify allowed paths.
+ <p(245)>--allow-write | --allow-write="/etc,/var/log.txt"</>
+ <g>-I, --allow-import[=<<IP_OR_HOSTNAME>...]</> Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary.
+ Default value: <p(245)>deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,user.githubusercontent.com:443</>
+ <p(245)>--allow-import | --allow-import="example.com,github.com"</>
+ <g>-N, --allow-net[=<<IP_OR_HOSTNAME>...]</> Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary.
+ <p(245)>--allow-net | --allow-net="localhost:8080,deno.land"</>
+ <g>-E, --allow-env[=<<VARIABLE_NAME>...]</> Allow access to environment variables. Optionally specify accessible environment variables.
+ <p(245)>--allow-env | --allow-env="PORT,HOME,PATH"</>
+ <g>-S, --allow-sys[=<<API_NAME>...]</> Allow access to OS information. Optionally allow specific APIs by function name.
+ <p(245)>--allow-sys | --allow-sys="systemMemoryInfo,osRelease"</>
+ <g>--allow-run[=<<PROGRAM_NAME>...]</> Allow running subprocesses. Optionally specify allowed runnable program names.
+ <p(245)>--allow-run | --allow-run="whoami,ps"</>
+ <g>--allow-ffi[=<<PATH>...]</> (Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files.
+ <p(245)>--allow-ffi | --allow-ffi="./libfoo.so"</>
+ <g> --deny-read[=<<PATH>...]</> Deny file system read access. Optionally specify denied paths.
+ <p(245)>--deny-read | --deny-read="/etc,/var/log.txt"</>
+ <g> --deny-write[=<<PATH>...]</> Deny file system write access. Optionally specify denied paths.
+ <p(245)>--deny-write | --deny-write="/etc,/var/log.txt"</>
+ <g> --deny-net[=<<IP_OR_HOSTNAME>...]</> Deny network access. Optionally specify defined IP addresses and host names, with ports as necessary.
+ <p(245)>--deny-net | --deny-net="localhost:8080,deno.land"</>
+ <g> --deny-env[=<<VARIABLE_NAME>...]</> Deny access to environment variables. Optionally specify inacessible environment variables.
+ <p(245)>--deny-env | --deny-env="PORT,HOME,PATH"</>
+ <g>-S, --deny-sys[=<<API_NAME>...]</> Deny access to OS information. Optionally deny specific APIs by function name.
+ <p(245)>--deny-sys | --deny-sys="systemMemoryInfo,osRelease"</>
+ <g>--deny-run[=<<PROGRAM_NAME>...]</> Deny running subprocesses. Optionally specify denied runnable program names.
+ <p(245)>--deny-run | --deny-run="whoami,ps"</>
+ <g>--deny-ffi[=<<PATH>...]</> (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files.
+ <p(245)>--deny-ffi | --deny-ffi="./libfoo.so"</>
"#))
.arg(
{
- let mut arg = Arg::new("allow-all")
- .short('A')
- .long("allow-all")
- .action(ArgAction::SetTrue)
- .help("Allow all permissions")
- .hide(true)
- ;
+ let mut arg = allow_all_arg().hide(true);
if let Some(requires) = requires {
arg = arg.requires(requires)
}
@@ -3200,7 +3274,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("allow-read")
+ let mut arg = Arg::new("allow-read")
.long("allow-read")
.short('R')
.num_args(0..)
@@ -3218,7 +3292,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("deny-read")
+ let mut arg = Arg::new("deny-read")
.long("deny-read")
.num_args(0..)
.action(ArgAction::Append)
@@ -3235,7 +3309,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("allow-write")
+ let mut arg = Arg::new("allow-write")
.long("allow-write")
.short('W')
.num_args(0..)
@@ -3253,7 +3327,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("deny-write")
+ let mut arg = Arg::new("deny-write")
.long("deny-write")
.num_args(0..)
.action(ArgAction::Append)
@@ -3270,7 +3344,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("allow-net")
+ let mut arg = Arg::new("allow-net")
.long("allow-net")
.short('N')
.num_args(0..)
@@ -3289,7 +3363,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("deny-net")
+ let mut arg = Arg::new("deny-net")
.long("deny-net")
.num_args(0..)
.use_value_delimiter(true)
@@ -3383,7 +3457,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("deny-sys")
+ let mut arg = Arg::new("deny-sys")
.long("deny-sys")
.num_args(0..)
.use_value_delimiter(true)
@@ -3418,7 +3492,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
)
.arg(
{
- let mut arg = Arg::new("deny-run")
+ let mut arg = Arg::new("deny-run")
.long("deny-run")
.num_args(0..)
.use_value_delimiter(true)
@@ -3509,6 +3583,26 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
arg
}
)
+ .arg(
+ {
+ let mut arg = allow_import_arg().hide(true);
+ if let Some(requires) = requires {
+ // allow this for install --global
+ if requires != "global" {
+ arg = arg.requires(requires)
+ }
+ }
+ arg
+ }
+ )
+}
+
+fn allow_all_arg() -> Arg {
+ Arg::new("allow-all")
+ .short('A')
+ .long("allow-all")
+ .action(ArgAction::SetTrue)
+ .help("Allow all permissions")
}
fn runtime_args(
@@ -3537,6 +3631,20 @@ fn runtime_args(
.arg(strace_ops_arg())
}
+fn allow_import_arg() -> Arg {
+ Arg::new("allow-import")
+ .long("allow-import")
+ .short('I')
+ .num_args(0..)
+ .use_value_delimiter(true)
+ .require_equals(true)
+ .value_name("IP_OR_HOSTNAME")
+ .help(cstr!(
+ "Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value: <p(245)>deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,user.githubusercontent.com:443</>"
+ ))
+ .value_parser(flags_net::validator)
+}
+
fn inspect_args(app: Command) -> Command {
app
.arg(
@@ -4174,6 +4282,7 @@ fn cache_parse(
unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionOnly);
frozen_lockfile_arg_parse(flags, matches);
allow_scripts_arg_parse(flags, matches)?;
+ allow_import_parse(flags, matches);
let files = matches.remove_many::<String>("file").unwrap().collect();
flags.subcommand = DenoSubcommand::Cache(CacheFlags { files });
Ok(())
@@ -4195,6 +4304,7 @@ fn check_parse(
doc: matches.get_flag("doc"),
doc_only: matches.get_flag("doc-only"),
});
+ allow_import_parse(flags, matches);
Ok(())
}
@@ -4320,6 +4430,7 @@ fn doc_parse(
no_lock_arg_parse(flags, matches);
no_npm_arg_parse(flags, matches);
no_remote_arg_parse(flags, matches);
+ allow_import_parse(flags, matches);
let source_files_val = matches.remove_many::<String>("source_file");
let source_files = if let Some(val) = source_files_val {
@@ -4460,6 +4571,7 @@ fn info_parse(
lock_args_parse(flags, matches);
no_remote_arg_parse(flags, matches);
no_npm_arg_parse(flags, matches);
+ allow_import_parse(flags, matches);
let json = matches.get_flag("json");
flags.subcommand = DenoSubcommand::Info(InfoFlags {
file: matches.remove_one::<String>("file"),
@@ -4495,6 +4607,7 @@ fn install_parse(
force,
}),
});
+
return Ok(());
}
@@ -5175,13 +5288,22 @@ fn permission_args_parse(
}
if matches.get_flag("allow-hrtime") || matches.get_flag("deny-hrtime") {
- log::warn!("⚠️ Warning: `allow-hrtime` and `deny-hrtime` have been removed in Deno 2, as high resolution time is now always allowed.");
+ // use eprintln instead of log::warn because logging hasn't been initialized yet
+ #[allow(clippy::print_stderr)]
+ {
+ eprintln!(
+ "{} `allow-hrtime` and `deny-hrtime` have been removed in Deno 2, as high resolution time is now always allowed",
+ deno_runtime::colors::yellow("Warning")
+ );
+ }
}
if matches.get_flag("allow-all") {
flags.allow_all();
}
+ allow_import_parse(flags, matches);
+
if matches.get_flag("no-prompt") {
flags.permissions.no_prompt = true;
}
@@ -5189,6 +5311,13 @@ fn permission_args_parse(
Ok(())
}
+fn allow_import_parse(flags: &mut Flags, matches: &mut ArgMatches) {
+ if let Some(imports_wl) = matches.remove_many::<String>("allow-import") {
+ let imports_allowlist = flags_net::parse(imports_wl.collect()).unwrap();
+ flags.permissions.allow_import = Some(imports_allowlist);
+ }
+}
+
fn unsafely_ignore_certificate_errors_parse(
flags: &mut Flags,
matches: &mut ArgMatches,
@@ -6215,7 +6344,7 @@ mod tests {
#[test]
fn short_permission_flags() {
- let r = flags_from_vec(svec!["deno", "run", "-RNESW", "gist.ts"]);
+ let r = flags_from_vec(svec!["deno", "run", "-RNESWI", "gist.ts"]);
assert_eq!(
r.unwrap(),
Flags {
@@ -6226,6 +6355,7 @@ mod tests {
allow_read: Some(vec![]),
allow_write: Some(vec![]),
allow_env: Some(vec![]),
+ allow_import: Some(vec![]),
allow_net: Some(vec![]),
allow_sys: Some(vec![]),
..Default::default()
@@ -10777,7 +10907,7 @@ mod tests {
}
);
// just make sure this doesn't panic
- let _ = flags.permissions.to_options();
+ let _ = flags.permissions.to_options(&[]);
}
#[test]
@@ -10852,4 +10982,27 @@ mod tests {
Usage: deno repl [OPTIONS] [-- [ARGS]...]\n"
)
}
+
+ #[test]
+ fn test_allow_import_host_from_url() {
+ fn parse(text: &str) -> Option<String> {
+ allow_import_host_from_url(&Url::parse(text).unwrap())
+ }
+
+ assert_eq!(parse("https://jsr.io"), None);
+ assert_eq!(
+ parse("http://127.0.0.1:4250"),
+ Some("127.0.0.1:4250".to_string())
+ );
+ assert_eq!(parse("http://jsr.io"), Some("jsr.io:80".to_string()));
+ assert_eq!(
+ parse("https://example.com"),
+ Some("example.com:443".to_string())
+ );
+ assert_eq!(
+ parse("http://example.com"),
+ Some("example.com:80".to_string())
+ );
+ assert_eq!(parse("file:///example.com"), None);
+ }
}
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 1c92777ae..80b9afb24 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -769,6 +769,7 @@ pub struct CliOptions {
// application need not concern itself with, so keep these private
flags: Arc<Flags>,
initial_cwd: PathBuf,
+ main_module_cell: std::sync::OnceLock<Result<ModuleSpecifier, AnyError>>,
maybe_node_modules_folder: Option<PathBuf>,
npmrc: Arc<ResolvedNpmRc>,
maybe_lockfile: Option<Arc<CliLockfile>>,
@@ -825,6 +826,7 @@ impl CliOptions {
npmrc,
maybe_node_modules_folder,
overrides: Default::default(),
+ main_module_cell: std::sync::OnceLock::new(),
start_dir,
deno_dir_provider,
})
@@ -1105,40 +1107,43 @@ impl CliOptions {
self.flags.env_file.as_ref()
}
- pub fn resolve_main_module(&self) -> Result<ModuleSpecifier, AnyError> {
- let main_module = match &self.flags.subcommand {
- DenoSubcommand::Compile(compile_flags) => {
- resolve_url_or_path(&compile_flags.source_file, self.initial_cwd())?
- }
- DenoSubcommand::Eval(_) => {
- resolve_url_or_path("./$deno$eval.ts", self.initial_cwd())?
- }
- DenoSubcommand::Repl(_) => {
- resolve_url_or_path("./$deno$repl.ts", self.initial_cwd())?
- }
- DenoSubcommand::Run(run_flags) => {
- if run_flags.is_stdin() {
- std::env::current_dir()
- .context("Unable to get CWD")
- .and_then(|cwd| {
- resolve_url_or_path("./$deno$stdin.ts", &cwd)
- .map_err(AnyError::from)
- })?
- } else if NpmPackageReqReference::from_str(&run_flags.script).is_ok() {
- ModuleSpecifier::parse(&run_flags.script)?
- } else {
- resolve_url_or_path(&run_flags.script, self.initial_cwd())?
- }
- }
- DenoSubcommand::Serve(run_flags) => {
- resolve_url_or_path(&run_flags.script, self.initial_cwd())?
- }
- _ => {
- bail!("No main module.")
- }
- };
+ pub fn resolve_main_module(&self) -> Result<&ModuleSpecifier, AnyError> {
+ self
+ .main_module_cell
+ .get_or_init(|| {
+ let main_module = match &self.flags.subcommand {
+ DenoSubcommand::Compile(compile_flags) => {
+ resolve_url_or_path(&compile_flags.source_file, self.initial_cwd())?
+ }
+ DenoSubcommand::Eval(_) => {
+ resolve_url_or_path("./$deno$eval.ts", self.initial_cwd())?
+ }
+ DenoSubcommand::Repl(_) => {
+ resolve_url_or_path("./$deno$repl.ts", self.initial_cwd())?
+ }
+ DenoSubcommand::Run(run_flags) => {
+ if run_flags.is_stdin() {
+ resolve_url_or_path("./$deno$stdin.ts", self.initial_cwd())?
+ } else if NpmPackageReqReference::from_str(&run_flags.script)
+ .is_ok()
+ {
+ ModuleSpecifier::parse(&run_flags.script)?
+ } else {
+ resolve_url_or_path(&run_flags.script, self.initial_cwd())?
+ }
+ }
+ DenoSubcommand::Serve(run_flags) => {
+ resolve_url_or_path(&run_flags.script, self.initial_cwd())?
+ }
+ _ => {
+ bail!("No main module.")
+ }
+ };
- Ok(main_module)
+ Ok(main_module)
+ })
+ .as_ref()
+ .map_err(|err| deno_core::anyhow::anyhow!("{}", err))
}
pub fn resolve_file_header_overrides(
@@ -1159,7 +1164,7 @@ impl CliOptions {
(maybe_main_specifier, maybe_content_type)
{
HashMap::from([(
- main_specifier,
+ main_specifier.clone(),
HashMap::from([("content-type".to_string(), content_type.to_string())]),
)])
} else {
@@ -1480,7 +1485,34 @@ impl CliOptions {
}
pub fn permissions_options(&self) -> PermissionsOptions {
- self.flags.permissions.to_options()
+ fn files_to_urls(files: &[String]) -> Vec<Cow<'_, Url>> {
+ files
+ .iter()
+ .filter_map(|f| Url::parse(f).ok().map(Cow::Owned))
+ .collect()
+ }
+
+ // get a list of urls to imply for --allow-import
+ let cli_arg_urls = self
+ .resolve_main_module()
+ .ok()
+ .map(|url| vec![Cow::Borrowed(url)])
+ .or_else(|| match &self.flags.subcommand {
+ DenoSubcommand::Cache(cache_flags) => {
+ Some(files_to_urls(&cache_flags.files))
+ }
+ DenoSubcommand::Check(check_flags) => {
+ Some(files_to_urls(&check_flags.files))
+ }
+ DenoSubcommand::Install(InstallFlags {
+ kind: InstallKind::Global(flags),
+ }) => Url::parse(&flags.module_url)
+ .ok()
+ .map(|url| vec![Cow::Owned(url)]),
+ _ => None,
+ })
+ .unwrap_or_default();
+ self.flags.permissions.to_options(&cli_arg_urls)
}
pub fn reload_flag(&self) -> bool {
diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs
index a95c35086..2d8813716 100644
--- a/cli/cache/mod.rs
+++ b/cli/cache/mod.rs
@@ -1,10 +1,11 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+use crate::args::jsr_url;
use crate::args::CacheSetting;
use crate::errors::get_error_class_name;
use crate::file_fetcher::FetchNoFollowOptions;
use crate::file_fetcher::FetchOptions;
-use crate::file_fetcher::FetchPermissionsOption;
+use crate::file_fetcher::FetchPermissionsOptionRef;
use crate::file_fetcher::FileFetcher;
use crate::file_fetcher::FileOrRedirect;
use crate::npm::CliNpmResolver;
@@ -19,6 +20,7 @@ use deno_graph::source::CacheInfo;
use deno_graph::source::LoadFuture;
use deno_graph::source::LoadResponse;
use deno_graph::source::Loader;
+use deno_runtime::deno_permissions::PermissionsContainer;
use std::collections::HashMap;
use std::path::Path;
use std::path::PathBuf;
@@ -104,6 +106,13 @@ pub type LocalLspHttpCache =
deno_cache_dir::LocalLspHttpCache<RealDenoCacheEnv>;
pub use deno_cache_dir::HttpCache;
+pub struct FetchCacherOptions {
+ pub file_header_overrides: HashMap<ModuleSpecifier, HashMap<String, String>>,
+ pub permissions: PermissionsContainer,
+ /// If we're publishing for `deno publish`.
+ pub is_deno_publish: bool,
+}
+
/// A "wrapper" for the FileFetcher and DiskCache for the Deno CLI that provides
/// a concise interface to the DENO_DIR when building module graphs.
pub struct FetchCacher {
@@ -112,26 +121,27 @@ pub struct FetchCacher {
global_http_cache: Arc<GlobalHttpCache>,
npm_resolver: Arc<dyn CliNpmResolver>,
module_info_cache: Arc<ModuleInfoCache>,
- permissions: FetchPermissionsOption,
+ permissions: PermissionsContainer,
cache_info_enabled: bool,
+ is_deno_publish: bool,
}
impl FetchCacher {
pub fn new(
file_fetcher: Arc<FileFetcher>,
- file_header_overrides: HashMap<ModuleSpecifier, HashMap<String, String>>,
global_http_cache: Arc<GlobalHttpCache>,
npm_resolver: Arc<dyn CliNpmResolver>,
module_info_cache: Arc<ModuleInfoCache>,
- permissions: FetchPermissionsOption,
+ options: FetchCacherOptions,
) -> Self {
Self {
file_fetcher,
- file_header_overrides,
global_http_cache,
npm_resolver,
module_info_cache,
- permissions,
+ file_header_overrides: options.file_header_overrides,
+ permissions: options.permissions,
+ is_deno_publish: options.is_deno_publish,
cache_info_enabled: false,
}
}
@@ -208,10 +218,24 @@ impl Loader for FetchCacher {
}
}
+ if self.is_deno_publish
+ && matches!(specifier.scheme(), "http" | "https")
+ && !specifier.as_str().starts_with(jsr_url().as_str())
+ {
+ // mark non-JSR remote modules as external so we don't need --allow-import
+ // permissions as these will error out later when publishing
+ return Box::pin(futures::future::ready(Ok(Some(
+ LoadResponse::External {
+ specifier: specifier.clone(),
+ },
+ ))));
+ }
+
let file_fetcher = self.file_fetcher.clone();
let file_header_overrides = self.file_header_overrides.clone();
let permissions = self.permissions.clone();
let specifier = specifier.clone();
+ let is_statically_analyzable = !options.was_dynamic_root;
async move {
let maybe_cache_setting = match options.cache_setting {
@@ -230,7 +254,11 @@ impl Loader for FetchCacher {
.fetch_no_follow_with_options(FetchNoFollowOptions {
fetch_options: FetchOptions {
specifier: &specifier,
- permissions: permissions.as_ref(),
+ permissions: if is_statically_analyzable {
+ FetchPermissionsOptionRef::StaticContainer(&permissions)
+ } else {
+ FetchPermissionsOptionRef::DynamicContainer(&permissions)
+ },
maybe_accept: None,
maybe_cache_setting: maybe_cache_setting.as_ref(),
},
diff --git a/cli/factory.rs b/cli/factory.rs
index 0f49546d0..8aea635d2 100644
--- a/cli/factory.rs
+++ b/cli/factory.rs
@@ -185,6 +185,7 @@ struct CliFactoryServices {
node_resolver: Deferred<Arc<NodeResolver>>,
npm_resolver: Deferred<Arc<dyn CliNpmResolver>>,
permission_desc_parser: Deferred<Arc<RuntimePermissionDescriptorParser>>,
+ root_permissions_container: Deferred<PermissionsContainer>,
sloppy_imports_resolver: Deferred<Option<Arc<SloppyImportsResolver>>>,
text_only_progress_bar: Deferred<ProgressBar>,
type_checker: Deferred<Arc<TypeChecker>>,
@@ -626,6 +627,7 @@ impl CliFactory {
self.maybe_file_watcher_reporter().clone(),
self.file_fetcher()?.clone(),
self.global_http_cache()?.clone(),
+ self.root_permissions_container()?.clone(),
)))
})
.await
@@ -659,6 +661,7 @@ impl CliFactory {
Ok(Arc::new(MainModuleGraphContainer::new(
self.cli_options()?.clone(),
self.module_load_preparer().await?.clone(),
+ self.root_permissions_container()?.clone(),
)))
})
.await
@@ -755,15 +758,20 @@ impl CliFactory {
))
}
- pub fn create_permissions_container(
+ pub fn root_permissions_container(
&self,
- ) -> Result<PermissionsContainer, AnyError> {
- let desc_parser = self.permission_desc_parser()?.clone();
- let permissions = Permissions::from_options(
- desc_parser.as_ref(),
- &self.cli_options()?.permissions_options(),
- )?;
- Ok(PermissionsContainer::new(desc_parser, permissions))
+ ) -> Result<&PermissionsContainer, AnyError> {
+ self
+ .services
+ .root_permissions_container
+ .get_or_try_init(|| {
+ let desc_parser = self.permission_desc_parser()?.clone();
+ let permissions = Permissions::from_options(
+ desc_parser.as_ref(),
+ &self.cli_options()?.permissions_options(),
+ )?;
+ Ok(PermissionsContainer::new(desc_parser, permissions))
+ })
}
pub async fn create_cli_main_worker_factory(
@@ -816,6 +824,7 @@ impl CliFactory {
npm_resolver.clone(),
self.permission_desc_parser()?.clone(),
self.root_cert_store_provider().clone(),
+ self.root_permissions_container()?.clone(),
StorageKeyResolver::from_options(cli_options),
cli_options.sub_command().clone(),
self.create_cli_main_worker_options()?,
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs
index 2f4b0b3dc..ca1144939 100644
--- a/cli/file_fetcher.rs
+++ b/cli/file_fetcher.rs
@@ -23,6 +23,7 @@ use deno_graph::source::LoaderChecksum;
use deno_runtime::deno_permissions::PermissionsContainer;
use deno_runtime::deno_web::BlobStore;
+use deno_runtime::fs_util::specifier_to_file_path;
use log::debug;
use std::borrow::Cow;
use std::collections::HashMap;
@@ -135,7 +136,7 @@ impl MemoryFiles {
/// Fetch a source file from the local file system.
fn fetch_local(specifier: &ModuleSpecifier) -> Result<File, AnyError> {
- let local = specifier.to_file_path().map_err(|_| {
+ let local = specifier_to_file_path(specifier).map_err(|_| {
uri_error(format!("Invalid file path.\n Specifier: {specifier}"))
})?;
// If it doesnt have a extension, we want to treat it as typescript by default
@@ -173,30 +174,8 @@ fn get_validated_scheme(
#[derive(Debug, Copy, Clone)]
pub enum FetchPermissionsOptionRef<'a> {
AllowAll,
- Container(&'a PermissionsContainer),
-}
-
-#[derive(Debug, Clone)]
-pub enum FetchPermissionsOption {
- AllowAll,
- Container(PermissionsContainer),
-}
-
-impl FetchPermissionsOption {
- pub fn as_ref(&self) -> FetchPermissionsOptionRef {
- match self {
- FetchPermissionsOption::AllowAll => FetchPermissionsOptionRef::AllowAll,
- FetchPermissionsOption::Container(container) => {
- FetchPermissionsOptionRef::Container(container)
- }
- }
- }
-}
-
-impl From<PermissionsContainer> for FetchPermissionsOption {
- fn from(value: PermissionsContainer) -> Self {
- Self::Container(value)
- }
+ DynamicContainer(&'a PermissionsContainer),
+ StaticContainer(&'a PermissionsContainer),
}
pub struct FetchOptions<'a> {
@@ -564,7 +543,6 @@ impl FileFetcher {
}
/// Fetch a source file and asynchronously return it.
- #[allow(dead_code)] // todo(25469): undo when merging
#[inline(always)]
pub async fn fetch(
&self,
@@ -572,7 +550,10 @@ impl FileFetcher {
permissions: &PermissionsContainer,
) -> Result<File, AnyError> {
self
- .fetch_inner(specifier, FetchPermissionsOptionRef::Container(permissions))
+ .fetch_inner(
+ specifier,
+ FetchPermissionsOptionRef::StaticContainer(permissions),
+ )
.await
}
@@ -647,8 +628,17 @@ impl FileFetcher {
FetchPermissionsOptionRef::AllowAll => {
// allow
}
- FetchPermissionsOptionRef::Container(permissions) => {
- permissions.check_specifier(specifier)?;
+ FetchPermissionsOptionRef::StaticContainer(permissions) => {
+ permissions.check_specifier(
+ specifier,
+ deno_runtime::deno_permissions::CheckSpecifierKind::Static,
+ )?;
+ }
+ FetchPermissionsOptionRef::DynamicContainer(permissions) => {
+ permissions.check_specifier(
+ specifier,
+ deno_runtime::deno_permissions::CheckSpecifierKind::Dynamic,
+ )?;
}
}
if let Some(file) = self.memory_files.get(specifier) {
diff --git a/cli/graph_container.rs b/cli/graph_container.rs
index 211b278e0..c463d71a6 100644
--- a/cli/graph_container.rs
+++ b/cli/graph_container.rs
@@ -9,9 +9,9 @@ use deno_core::error::AnyError;
use deno_core::parking_lot::RwLock;
use deno_graph::ModuleGraph;
use deno_runtime::colors;
+use deno_runtime::deno_permissions::PermissionsContainer;
use crate::args::CliOptions;
-use crate::file_fetcher::FetchPermissionsOption;
use crate::module_loader::ModuleLoadPreparer;
use crate::util::fs::collect_specifiers;
use crate::util::path::is_script_ext;
@@ -45,12 +45,14 @@ pub struct MainModuleGraphContainer {
inner: Arc<RwLock<Arc<ModuleGraph>>>,
cli_options: Arc<CliOptions>,
module_load_preparer: Arc<ModuleLoadPreparer>,
+ root_permissions: PermissionsContainer,
}
impl MainModuleGraphContainer {
pub fn new(
cli_options: Arc<CliOptions>,
module_load_preparer: Arc<ModuleLoadPreparer>,
+ root_permissions: PermissionsContainer,
) -> Self {
Self {
update_queue: Default::default(),
@@ -59,6 +61,7 @@ impl MainModuleGraphContainer {
)))),
cli_options,
module_load_preparer,
+ root_permissions,
}
}
@@ -76,7 +79,7 @@ impl MainModuleGraphContainer {
specifiers,
false,
self.cli_options.ts_type_lib_window(),
- FetchPermissionsOption::AllowAll,
+ self.root_permissions.clone(),
ext_overwrite,
)
.await?;
diff --git a/cli/graph_util.rs b/cli/graph_util.rs
index 1add83eb9..d8f7ae749 100644
--- a/cli/graph_util.rs
+++ b/cli/graph_util.rs
@@ -11,7 +11,6 @@ use crate::cache::ModuleInfoCache;
use crate::cache::ParsedSourceCache;
use crate::colors;
use crate::errors::get_error_class_name;
-use crate::file_fetcher::FetchPermissionsOption;
use crate::file_fetcher::FileFetcher;
use crate::npm::CliNpmResolver;
use crate::resolver::CliGraphResolver;
@@ -41,6 +40,7 @@ use deno_graph::ResolutionError;
use deno_graph::SpecifierError;
use deno_runtime::deno_fs::FileSystem;
use deno_runtime::deno_node;
+use deno_runtime::deno_permissions::PermissionsContainer;
use deno_runtime::fs_util::specifier_to_file_path;
use deno_semver::jsr::JsrDepPackageReq;
use deno_semver::package::PackageNv;
@@ -249,6 +249,19 @@ impl ModuleGraphCreator {
package_configs: &[JsrPackageConfig],
build_fast_check_graph: bool,
) -> Result<ModuleGraph, AnyError> {
+ fn graph_has_external_remote(graph: &ModuleGraph) -> bool {
+ // Earlier on, we marked external non-JSR modules as external.
+ // If the graph contains any of those, it would cause type checking
+ // to crash, so since publishing is going to fail anyway, skip type
+ // checking.
+ graph.modules().any(|module| match module {
+ deno_graph::Module::External(external_module) => {
+ matches!(external_module.specifier.scheme(), "http" | "https")
+ }
+ _ => false,
+ })
+ }
+
let mut roots = Vec::new();
for package_config in package_configs {
roots.extend(package_config.config_file.resolve_export_value_urls()?);
@@ -262,9 +275,12 @@ impl ModuleGraphCreator {
})
.await?;
self.graph_valid(&graph)?;
- if self.options.type_check_mode().is_true() {
+ if self.options.type_check_mode().is_true()
+ && !graph_has_external_remote(&graph)
+ {
self.type_check_graph(graph.clone()).await?;
}
+
if build_fast_check_graph {
let fast_check_workspace_members = package_configs
.iter()
@@ -279,6 +295,7 @@ impl ModuleGraphCreator {
},
)?;
}
+
Ok(graph)
}
@@ -370,6 +387,7 @@ pub struct ModuleGraphBuilder {
maybe_file_watcher_reporter: Option<FileWatcherReporter>,
file_fetcher: Arc<FileFetcher>,
global_http_cache: Arc<GlobalHttpCache>,
+ root_permissions_container: PermissionsContainer,
}
impl ModuleGraphBuilder {
@@ -386,6 +404,7 @@ impl ModuleGraphBuilder {
maybe_file_watcher_reporter: Option<FileWatcherReporter>,
file_fetcher: Arc<FileFetcher>,
global_http_cache: Arc<GlobalHttpCache>,
+ root_permissions_container: PermissionsContainer,
) -> Self {
Self {
options,
@@ -399,6 +418,7 @@ impl ModuleGraphBuilder {
maybe_file_watcher_reporter,
file_fetcher,
global_http_cache,
+ root_permissions_container,
}
}
@@ -670,20 +690,26 @@ impl ModuleGraphBuilder {
/// Creates the default loader used for creating a graph.
pub fn create_graph_loader(&self) -> cache::FetchCacher {
- self.create_fetch_cacher(FetchPermissionsOption::AllowAll)
+ self.create_fetch_cacher(self.root_permissions_container.clone())
}
pub fn create_fetch_cacher(
&self,
- permissions: FetchPermissionsOption,
+ permissions: PermissionsContainer,
) -> cache::FetchCacher {
cache::FetchCacher::new(
self.file_fetcher.clone(),
- self.options.resolve_file_header_overrides(),
self.global_http_cache.clone(),
self.npm_resolver.clone(),
self.module_info_cache.clone(),
- permissions,
+ cache::FetchCacherOptions {
+ file_header_overrides: self.options.resolve_file_header_overrides(),
+ permissions,
+ is_deno_publish: matches!(
+ self.options.sub_command(),
+ crate::args::DenoSubcommand::Publish { .. }
+ ),
+ },
)
}
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 85daa4e28..aed4b47ef 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -3614,6 +3614,11 @@ impl Inner {
}),
// bit of a hack to force the lsp to cache the @types/node package
type_check_mode: crate::args::TypeCheckMode::Local,
+ permissions: crate::args::PermissionFlags {
+ // allow remote import permissions in the lsp for now
+ allow_import: Some(vec![]),
+ ..Default::default()
+ },
..Default::default()
}),
initial_cwd,
diff --git a/cli/module_loader.rs b/cli/module_loader.rs
index a81c5a0aa..f4e219bea 100644
--- a/cli/module_loader.rs
+++ b/cli/module_loader.rs
@@ -104,7 +104,7 @@ impl ModuleLoadPreparer {
roots: &[ModuleSpecifier],
is_dynamic: bool,
lib: TsTypeLib,
- permissions: crate::file_fetcher::FetchPermissionsOption,
+ permissions: PermissionsContainer,
ext_overwrite: Option<&String>,
) -> Result<(), AnyError> {
log::debug!("Preparing module load.");
@@ -252,13 +252,15 @@ impl CliModuleLoaderFactory {
&self,
graph_container: TGraphContainer,
lib: TsTypeLib,
- root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
+ is_worker: bool,
+ parent_permissions: PermissionsContainer,
+ permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter {
let loader = Rc::new(CliModuleLoader(Rc::new(CliModuleLoaderInner {
lib,
- root_permissions,
- dynamic_permissions,
+ is_worker,
+ parent_permissions,
+ permissions,
graph_container,
emitter: self.shared.emitter.clone(),
parsed_source_cache: self.shared.parsed_source_cache.clone(),
@@ -274,20 +276,20 @@ impl ModuleLoaderFactory for CliModuleLoaderFactory {
fn create_for_main(
&self,
root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter {
self.create_with_lib(
(*self.shared.main_module_graph_container).clone(),
self.shared.lib_window,
+ /* is worker */ false,
+ root_permissions.clone(),
root_permissions,
- dynamic_permissions,
)
}
fn create_for_worker(
&self,
- root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
+ parent_permissions: PermissionsContainer,
+ permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter {
self.create_with_lib(
// create a fresh module graph for the worker
@@ -295,21 +297,21 @@ impl ModuleLoaderFactory for CliModuleLoaderFactory {
self.shared.graph_kind,
))),
self.shared.lib_worker,
- root_permissions,
- dynamic_permissions,
+ /* is worker */ true,
+ parent_permissions,
+ permissions,
)
}
}
struct CliModuleLoaderInner<TGraphContainer: ModuleGraphContainer> {
lib: TsTypeLib,
+ is_worker: bool,
/// The initial set of permissions used to resolve the static imports in the
/// worker. These are "allow all" for main worker, and parent thread
/// permissions for Web Worker.
- root_permissions: PermissionsContainer,
- /// Permissions used to resolve dynamic imports, these get passed as
- /// "root permissions" for Web Worker.
- dynamic_permissions: PermissionsContainer,
+ parent_permissions: PermissionsContainer,
+ permissions: PermissionsContainer,
shared: Arc<SharedCliModuleLoaderState>,
emitter: Arc<Emitter>,
parsed_source_cache: Arc<ParsedSourceCache>,
@@ -769,11 +771,12 @@ impl<TGraphContainer: ModuleGraphContainer> ModuleLoader
}
}
- let root_permissions = if is_dynamic {
- inner.dynamic_permissions.clone()
+ let permissions = if is_dynamic {
+ inner.permissions.clone()
} else {
- inner.root_permissions.clone()
+ inner.parent_permissions.clone()
};
+ let is_dynamic = is_dynamic || inner.is_worker; // consider workers as dynamic for permissions
let lib = inner.lib;
let mut update_permit = graph_container.acquire_update_permit().await;
let graph = update_permit.graph_mut();
@@ -783,7 +786,7 @@ impl<TGraphContainer: ModuleGraphContainer> ModuleLoader
&[specifier],
is_dynamic,
lib,
- root_permissions.into(),
+ permissions,
None,
)
.await?;
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs
index bab266734..c501d2d6b 100644
--- a/cli/standalone/mod.rs
+++ b/cli/standalone/mod.rs
@@ -130,8 +130,6 @@ struct SharedModuleLoaderState {
#[derive(Clone)]
struct EmbeddedModuleLoader {
shared: Arc<SharedModuleLoaderState>,
- root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
}
pub const MODULE_NOT_FOUND: &str = "Module not found";
@@ -402,28 +400,23 @@ struct StandaloneModuleLoaderFactory {
impl ModuleLoaderFactory for StandaloneModuleLoaderFactory {
fn create_for_main(
&self,
- root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
+ _root_permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter {
ModuleLoaderAndSourceMapGetter {
module_loader: Rc::new(EmbeddedModuleLoader {
shared: self.shared.clone(),
- root_permissions,
- dynamic_permissions,
}),
}
}
fn create_for_worker(
&self,
- root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
+ _parent_permissions: PermissionsContainer,
+ _permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter {
ModuleLoaderAndSourceMapGetter {
module_loader: Rc::new(EmbeddedModuleLoader {
shared: self.shared.clone(),
- root_permissions,
- dynamic_permissions,
}),
}
}
@@ -664,7 +657,8 @@ pub async fn run(
};
let permissions = {
- let mut permissions = metadata.permissions.to_options();
+ let mut permissions =
+ metadata.permissions.to_options(/* cli_arg_urls */ &[]);
// if running with an npm vfs, grant read access to it
if let Some(vfs_root) = maybe_vfs_root {
match &mut permissions.allow_read {
@@ -713,6 +707,7 @@ pub async fn run(
npm_resolver,
permission_desc_parser,
root_cert_store_provider,
+ permissions,
StorageKeyResolver::empty(),
crate::args::DenoSubcommand::Run(Default::default()),
CliMainWorkerOptions {
@@ -752,7 +747,7 @@ pub async fn run(
deno_core::JsRuntime::init_platform(None, true);
let mut worker = worker_factory
- .create_main_worker(WorkerExecutionMode::Run, main_module, permissions)
+ .create_main_worker(WorkerExecutionMode::Run, main_module)
.await?;
let exit_code = worker.run().await?;
diff --git a/cli/tools/check.rs b/cli/tools/check.rs
index c22afbb9a..7edb392d4 100644
--- a/cli/tools/check.rs
+++ b/cli/tools/check.rs
@@ -51,6 +51,7 @@ pub async fn check(
let specifiers_for_typecheck = if check_flags.doc || check_flags.doc_only {
let file_fetcher = factory.file_fetcher()?;
+ let root_permissions = factory.root_permissions_container()?;
let mut specifiers_for_typecheck = if check_flags.doc {
specifiers.clone()
@@ -59,7 +60,7 @@ pub async fn check(
};
for s in specifiers {
- let file = file_fetcher.fetch_bypass_permissions(&s).await?;
+ let file = file_fetcher.fetch(&s, root_permissions).await?;
let snippet_files = extract::extract_snippet_files(file)?;
for snippet_file in snippet_files {
specifiers_for_typecheck.push(snippet_file.specifier.clone());
diff --git a/cli/tools/compile.rs b/cli/tools/compile.rs
index b9620cfde..c1f98bc08 100644
--- a/cli/tools/compile.rs
+++ b/cli/tools/compile.rs
@@ -135,7 +135,7 @@ pub async fn compile(
file,
eszip,
root_dir_url,
- &module_specifier,
+ module_specifier,
&compile_flags,
cli_options,
)
diff --git a/cli/tools/info.rs b/cli/tools/info.rs
index d78b83cbe..174785631 100644
--- a/cli/tools/info.rs
+++ b/cli/tools/info.rs
@@ -644,8 +644,21 @@ impl<'a> GraphDisplayContext<'a> {
ModuleError::InvalidTypeAssertion { .. } => {
self.build_error_msg(specifier, "(invalid import attribute)")
}
- ModuleError::LoadingErr(_, _, _) => {
- self.build_error_msg(specifier, "(loading error)")
+ ModuleError::LoadingErr(_, _, err) => {
+ use deno_graph::ModuleLoadError::*;
+ let message = match err {
+ HttpsChecksumIntegrity(_) => "(checksum integrity error)",
+ Decode(_) => "(loading decode error)",
+ Loader(err) => match deno_core::error::get_custom_error_class(err) {
+ Some("NotCapable") => "(not capable, requires --allow-import)",
+ _ => "(loading error)",
+ },
+ Jsr(_) => "(loading error)",
+ NodeUnknownBuiltinModule(_) => "(unknown node built-in error)",
+ Npm(_) => "(npm loading error)",
+ TooManyRedirects => "(too many redirects error)",
+ };
+ self.build_error_msg(specifier, message.as_ref())
}
ModuleError::ParseErr(_, _) => {
self.build_error_msg(specifier, "(parsing error)")
diff --git a/cli/tools/registry/diagnostics.rs b/cli/tools/registry/diagnostics.rs
index c53a39683..733a78dda 100644
--- a/cli/tools/registry/diagnostics.rs
+++ b/cli/tools/registry/diagnostics.rs
@@ -3,7 +3,6 @@
use std::borrow::Cow;
use std::path::PathBuf;
use std::sync::Arc;
-use std::sync::Mutex;
use deno_ast::diagnostics::Diagnostic;
use deno_ast::diagnostics::DiagnosticLevel;
@@ -21,6 +20,7 @@ use deno_ast::SourceRanged;
use deno_ast::SourceTextInfo;
use deno_core::anyhow::anyhow;
use deno_core::error::AnyError;
+use deno_core::parking_lot::Mutex;
use deno_core::url::Url;
use deno_graph::FastCheckDiagnostic;
use deno_semver::Version;
@@ -36,7 +36,7 @@ impl PublishDiagnosticsCollector {
pub fn print_and_error(&self) -> Result<(), AnyError> {
let mut errors = 0;
let mut has_slow_types_errors = false;
- let mut diagnostics = self.diagnostics.lock().unwrap().take();
+ let mut diagnostics = self.diagnostics.lock().take();
diagnostics.sort_by_cached_key(|d| d.sorting_key());
@@ -75,8 +75,16 @@ impl PublishDiagnosticsCollector {
}
}
+ pub fn has_error(&self) -> bool {
+ self
+ .diagnostics
+ .lock()
+ .iter()
+ .any(|d| matches!(d.level(), DiagnosticLevel::Error))
+ }
+
pub fn push(&self, diagnostic: PublishDiagnostic) {
- self.diagnostics.lock().unwrap().push(diagnostic);
+ self.diagnostics.lock().push(diagnostic);
}
}
diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs
index fbdcd9e77..941514b04 100644
--- a/cli/tools/registry/mod.rs
+++ b/cli/tools/registry/mod.rs
@@ -341,13 +341,11 @@ impl PublishPreparer {
bail!("Exiting due to DENO_INTERNAL_FAST_CHECK_OVERWRITE")
} else {
log::info!("Checking for slow types in the public API...");
- let mut any_pkg_had_diagnostics = false;
for package in package_configs {
let export_urls = package.config_file.resolve_export_value_urls()?;
let diagnostics =
collect_no_slow_type_diagnostics(&graph, &export_urls);
if !diagnostics.is_empty() {
- any_pkg_had_diagnostics = true;
for diagnostic in diagnostics {
diagnostics_collector
.push(PublishDiagnostic::FastCheck(diagnostic));
@@ -355,7 +353,9 @@ impl PublishPreparer {
}
}
- if any_pkg_had_diagnostics {
+ // skip type checking the slow type graph if there are any errors because
+ // errors like remote modules existing will cause type checking to crash
+ if diagnostics_collector.has_error() {
Ok(Arc::new(graph))
} else {
// fast check passed, type check the output as a temporary measure
diff --git a/cli/tools/registry/pm/cache_deps.rs b/cli/tools/registry/pm/cache_deps.rs
index a59817055..7d1773b34 100644
--- a/cli/tools/registry/pm/cache_deps.rs
+++ b/cli/tools/registry/pm/cache_deps.rs
@@ -16,6 +16,7 @@ pub async fn cache_top_level_deps(
) -> Result<(), AnyError> {
let npm_resolver = factory.npm_resolver().await?;
let cli_options = factory.cli_options()?;
+ let root_permissions = factory.root_permissions_container()?;
if let Some(npm_resolver) = npm_resolver.as_managed() {
if !npm_resolver.ensure_top_level_package_json_install().await? {
if let Some(lockfile) = cli_options.maybe_lockfile() {
@@ -106,7 +107,7 @@ pub async fn cache_top_level_deps(
&roots,
false,
deno_config::deno_json::TsTypeLib::DenoWorker,
- crate::file_fetcher::FetchPermissionsOption::AllowAll,
+ root_permissions.clone(),
None,
)
.await?;
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs
index 24bc8e30a..a30304687 100644
--- a/cli/tools/repl/mod.rs
+++ b/cli/tools/repl/mod.rs
@@ -162,7 +162,7 @@ pub async fn run(
let factory = CliFactory::from_flags(flags);
let cli_options = factory.cli_options()?;
let main_module = cli_options.resolve_main_module()?;
- let permissions = factory.create_permissions_container()?;
+ let permissions = factory.root_permissions_container()?;
let npm_resolver = factory.npm_resolver().await?.clone();
let resolver = factory.resolver().await?.clone();
let file_fetcher = factory.file_fetcher()?;
@@ -177,7 +177,7 @@ pub async fn run(
.create_custom_worker(
WorkerExecutionMode::Repl,
main_module.clone(),
- permissions,
+ permissions.clone(),
vec![crate::ops::testing::deno_test::init_ops(test_event_sender)],
Default::default(),
)
@@ -189,7 +189,7 @@ pub async fn run(
npm_resolver,
resolver,
worker,
- main_module,
+ main_module.clone(),
test_event_receiver,
)
.await?;
diff --git a/cli/tools/run/mod.rs b/cli/tools/run/mod.rs
index 200644490..152e2650b 100644
--- a/cli/tools/run/mod.rs
+++ b/cli/tools/run/mod.rs
@@ -60,10 +60,9 @@ pub async fn run_script(
maybe_npm_install(&factory).await?;
- let permissions = factory.create_permissions_container()?;
let worker_factory = factory.create_cli_main_worker_factory().await?;
let mut worker = worker_factory
- .create_main_worker(mode, main_module, permissions)
+ .create_main_worker(mode, main_module.clone())
.await?;
let exit_code = worker.run().await?;
@@ -79,7 +78,6 @@ pub async fn run_from_stdin(flags: Arc<Flags>) -> Result<i32, AnyError> {
let file_fetcher = factory.file_fetcher()?;
let worker_factory = factory.create_cli_main_worker_factory().await?;
- let permissions = factory.create_permissions_container()?;
let mut source = Vec::new();
std::io::stdin().read_to_end(&mut source)?;
// Save a fake file into file fetcher cache
@@ -91,7 +89,7 @@ pub async fn run_from_stdin(flags: Arc<Flags>) -> Result<i32, AnyError> {
});
let mut worker = worker_factory
- .create_main_worker(WorkerExecutionMode::Run, main_module, permissions)
+ .create_main_worker(WorkerExecutionMode::Run, main_module.clone())
.await?;
let exit_code = worker.run().await?;
Ok(exit_code)
@@ -125,11 +123,10 @@ async fn run_with_watch(
let _ = watcher_communicator.watch_paths(cli_options.watch_paths());
- let permissions = factory.create_permissions_container()?;
let mut worker = factory
.create_cli_main_worker_factory()
.await?
- .create_main_worker(mode, main_module, permissions)
+ .create_main_worker(mode, main_module.clone())
.await?;
if watch_flags.hmr {
@@ -173,10 +170,9 @@ pub async fn eval_command(
source: source_code.into_bytes().into(),
});
- let permissions = factory.create_permissions_container()?;
let worker_factory = factory.create_cli_main_worker_factory().await?;
let mut worker = worker_factory
- .create_main_worker(WorkerExecutionMode::Eval, main_module, permissions)
+ .create_main_worker(WorkerExecutionMode::Eval, main_module.clone())
.await?;
let exit_code = worker.run().await?;
Ok(exit_code)
diff --git a/cli/tools/serve.rs b/cli/tools/serve.rs
index 2f553cf1e..4ce1cad6f 100644
--- a/cli/tools/serve.rs
+++ b/cli/tools/serve.rs
@@ -5,7 +5,6 @@ use std::sync::Arc;
use deno_core::error::AnyError;
use deno_core::futures::TryFutureExt;
use deno_core::ModuleSpecifier;
-use deno_runtime::deno_permissions::PermissionsContainer;
use super::run::check_permission_before_script;
use super::run::maybe_npm_install;
@@ -44,13 +43,11 @@ pub async fn serve(
maybe_npm_install(&factory).await?;
- let permissions = factory.create_permissions_container()?;
let worker_factory = factory.create_cli_main_worker_factory().await?;
do_serve(
worker_factory,
- main_module,
- permissions,
+ main_module.clone(),
serve_flags.worker_count,
false,
)
@@ -60,7 +57,6 @@ pub async fn serve(
async fn do_serve(
worker_factory: CliMainWorkerFactory,
main_module: ModuleSpecifier,
- permissions: PermissionsContainer,
worker_count: Option<usize>,
hmr: bool,
) -> Result<i32, AnyError> {
@@ -71,7 +67,6 @@ async fn do_serve(
worker_count,
},
main_module.clone(),
- permissions.clone(),
)
.await?;
let worker_count = match worker_count {
@@ -87,15 +82,13 @@ async fn do_serve(
for i in 0..extra_workers {
let worker_factory = worker_factory.clone();
let main_module = main_module.clone();
- let permissions = permissions.clone();
let (tx, rx) = tokio::sync::oneshot::channel();
channels.push(rx);
std::thread::Builder::new()
.name(format!("serve-worker-{i}"))
.spawn(move || {
deno_runtime::tokio_util::create_and_run_current_thread(async move {
- let result =
- run_worker(i, worker_factory, main_module, permissions, hmr).await;
+ let result = run_worker(i, worker_factory, main_module, hmr).await;
let _ = tx.send(result);
});
})?;
@@ -124,7 +117,6 @@ async fn run_worker(
worker_count: usize,
worker_factory: CliMainWorkerFactory,
main_module: ModuleSpecifier,
- permissions: PermissionsContainer,
hmr: bool,
) -> Result<i32, AnyError> {
let mut worker = worker_factory
@@ -134,7 +126,6 @@ async fn run_worker(
worker_count: Some(worker_count),
},
main_module,
- permissions,
)
.await?;
if hmr {
@@ -171,11 +162,9 @@ async fn serve_with_watch(
maybe_npm_install(&factory).await?;
let _ = watcher_communicator.watch_paths(cli_options.watch_paths());
-
- let permissions = factory.create_permissions_container()?;
let worker_factory = factory.create_cli_main_worker_factory().await?;
- do_serve(worker_factory, main_module, permissions, worker_count, hmr)
+ do_serve(worker_factory, main_module.clone(), worker_count, hmr)
.await?;
Ok(())
diff --git a/cli/worker.rs b/cli/worker.rs
index 6176398d5..861419f1e 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -62,13 +62,12 @@ pub trait ModuleLoaderFactory: Send + Sync {
fn create_for_main(
&self,
root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter;
fn create_for_worker(
&self,
- root_permissions: PermissionsContainer,
- dynamic_permissions: PermissionsContainer,
+ parent_permissions: PermissionsContainer,
+ permissions: PermissionsContainer,
) -> ModuleLoaderAndSourceMapGetter;
}
@@ -136,6 +135,7 @@ struct SharedWorkerState {
npm_resolver: Arc<dyn CliNpmResolver>,
permission_desc_parser: Arc<RuntimePermissionDescriptorParser>,
root_cert_store_provider: Arc<dyn RootCertStoreProvider>,
+ root_permissions: PermissionsContainer,
shared_array_buffer_store: SharedArrayBufferStore,
storage_key_resolver: StorageKeyResolver,
options: CliMainWorkerOptions,
@@ -432,6 +432,7 @@ impl CliMainWorkerFactory {
npm_resolver: Arc<dyn CliNpmResolver>,
permission_parser: Arc<RuntimePermissionDescriptorParser>,
root_cert_store_provider: Arc<dyn RootCertStoreProvider>,
+ root_permissions: PermissionsContainer,
storage_key_resolver: StorageKeyResolver,
subcommand: DenoSubcommand,
options: CliMainWorkerOptions,
@@ -452,6 +453,7 @@ impl CliMainWorkerFactory {
npm_resolver,
permission_desc_parser: permission_parser,
root_cert_store_provider,
+ root_permissions,
shared_array_buffer_store: Default::default(),
storage_key_resolver,
options,
@@ -464,13 +466,12 @@ impl CliMainWorkerFactory {
&self,
mode: WorkerExecutionMode,
main_module: ModuleSpecifier,
- permissions: PermissionsContainer,
) -> Result<CliMainWorker, AnyError> {
self
.create_custom_worker(
mode,
main_module,
- permissions,
+ self.shared.root_permissions.clone(),
vec![],
Default::default(),
)
@@ -530,13 +531,9 @@ impl CliMainWorkerFactory {
(main_module, is_cjs)
};
- let ModuleLoaderAndSourceMapGetter { module_loader } =
- shared.module_loader_factory.create_for_main(
- PermissionsContainer::allow_all(
- self.shared.permission_desc_parser.clone(),
- ),
- permissions.clone(),
- );
+ let ModuleLoaderAndSourceMapGetter { module_loader } = shared
+ .module_loader_factory
+ .create_for_main(permissions.clone());
let maybe_inspector_server = shared.maybe_inspector_server.clone();
let create_web_worker_cb =
diff --git a/runtime/permissions.rs b/runtime/permissions.rs
index a28ba35b1..9b2737b4f 100644
--- a/runtime/permissions.rs
+++ b/runtime/permissions.rs
@@ -12,6 +12,7 @@ use deno_permissions::AllowRunDescriptorParseResult;
use deno_permissions::DenyRunDescriptor;
use deno_permissions::EnvDescriptor;
use deno_permissions::FfiDescriptor;
+use deno_permissions::ImportDescriptor;
use deno_permissions::NetDescriptor;
use deno_permissions::PathQueryDescriptor;
use deno_permissions::ReadDescriptor;
@@ -75,6 +76,13 @@ impl deno_permissions::PermissionDescriptorParser
NetDescriptor::parse(text)
}
+ fn parse_import_descriptor(
+ &self,
+ text: &str,
+ ) -> Result<ImportDescriptor, AnyError> {
+ ImportDescriptor::parse(text)
+ }
+
fn parse_env_descriptor(
&self,
text: &str,
diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs
index c7ef864db..5d8e76125 100644
--- a/runtime/permissions/lib.rs
+++ b/runtime/permissions/lib.rs
@@ -14,7 +14,6 @@ use deno_core::serde::Deserializer;
use deno_core::serde::Serialize;
use deno_core::serde_json;
use deno_core::unsync::sync::AtomicFlag;
-use deno_core::url;
use deno_core::url::Url;
use deno_core::ModuleSpecifier;
use deno_terminal::colors;
@@ -950,6 +949,15 @@ impl NetDescriptor {
Ok(NetDescriptor(host, port))
}
+
+ pub fn from_url(url: &Url) -> Result<Self, AnyError> {
+ let host = url
+ .host_str()
+ .ok_or_else(|| type_error(format!("Missing host in url: '{}'", url)))?;
+ let host = Host::parse(host)?;
+ let port = url.port_or_known_default();
+ Ok(NetDescriptor(host, port))
+ }
}
impl fmt::Display for NetDescriptor {
@@ -967,6 +975,73 @@ impl fmt::Display for NetDescriptor {
}
#[derive(Clone, Eq, PartialEq, Hash, Debug)]
+pub struct ImportDescriptor(NetDescriptor);
+
+impl QueryDescriptor for ImportDescriptor {
+ type AllowDesc = ImportDescriptor;
+ type DenyDesc = ImportDescriptor;
+
+ fn flag_name() -> &'static str {
+ "import"
+ }
+
+ fn display_name(&self) -> Cow<str> {
+ self.0.display_name()
+ }
+
+ fn from_allow(allow: &Self::AllowDesc) -> Self {
+ Self(NetDescriptor::from_allow(&allow.0))
+ }
+
+ fn as_allow(&self) -> Option<Self::AllowDesc> {
+ self.0.as_allow().map(ImportDescriptor)
+ }
+
+ fn as_deny(&self) -> Self::DenyDesc {
+ Self(self.0.as_deny())
+ }
+
+ fn check_in_permission(
+ &self,
+ perm: &mut UnaryPermission<Self>,
+ api_name: Option<&str>,
+ ) -> Result<(), AnyError> {
+ skip_check_if_is_permission_fully_granted!(perm);
+ perm.check_desc(Some(self), false, api_name)
+ }
+
+ fn matches_allow(&self, other: &Self::AllowDesc) -> bool {
+ self.0.matches_allow(&other.0)
+ }
+
+ fn matches_deny(&self, other: &Self::DenyDesc) -> bool {
+ self.0.matches_deny(&other.0)
+ }
+
+ fn revokes(&self, other: &Self::AllowDesc) -> bool {
+ self.0.revokes(&other.0)
+ }
+
+ fn stronger_than_deny(&self, other: &Self::DenyDesc) -> bool {
+ self.0.stronger_than_deny(&other.0)
+ }
+
+ fn overlaps_deny(&self, other: &Self::DenyDesc) -> bool {
+ self.0.overlaps_deny(&other.0)
+ }
+}
+
+impl ImportDescriptor {
+ pub fn parse(specifier: &str) -> Result<Self, AnyError> {
+ Ok(ImportDescriptor(NetDescriptor::parse(specifier)?))
+ }
+
+ pub fn from_url(url: &Url) -> Result<Self, AnyError> {
+ Ok(ImportDescriptor(NetDescriptor::from_url(url)?))
+ }
+}
+
+#[derive(Clone, Eq, PartialEq, Hash, Debug)]
pub struct EnvDescriptor(EnvVarName);
impl EnvDescriptor {
@@ -1519,19 +1594,35 @@ impl UnaryPermission<NetDescriptor> {
self.check_desc(Some(host), false, api_name)
}
- pub fn check_url(
+ pub fn check_all(&mut self) -> Result<(), AnyError> {
+ skip_check_if_is_permission_fully_granted!(self);
+ self.check_desc(None, false, None)
+ }
+}
+
+impl UnaryPermission<ImportDescriptor> {
+ pub fn query(&self, host: Option<&ImportDescriptor>) -> PermissionState {
+ self.query_desc(host, AllowPartial::TreatAsPartialGranted)
+ }
+
+ pub fn request(
&mut self,
- url: &url::Url,
+ host: Option<&ImportDescriptor>,
+ ) -> PermissionState {
+ self.request_desc(host)
+ }
+
+ pub fn revoke(&mut self, host: Option<&ImportDescriptor>) -> PermissionState {
+ self.revoke_desc(host)
+ }
+
+ pub fn check(
+ &mut self,
+ host: &ImportDescriptor,
api_name: Option<&str>,
) -> Result<(), AnyError> {
skip_check_if_is_permission_fully_granted!(self);
- let host = url
- .host_str()
- .ok_or_else(|| type_error(format!("Missing host in url: '{}'", url)))?;
- let host = Host::parse(host)?;
- let port = url.port_or_known_default();
- let descriptor = NetDescriptor(host, port);
- self.check_desc(Some(&descriptor), false, api_name)
+ self.check_desc(Some(host), false, api_name)
}
pub fn check_all(&mut self) -> Result<(), AnyError> {
@@ -1700,6 +1791,7 @@ pub struct Permissions {
pub sys: UnaryPermission<SysDescriptor>,
pub run: UnaryPermission<RunQueryDescriptor>,
pub ffi: UnaryPermission<FfiQueryDescriptor>,
+ pub import: UnaryPermission<ImportDescriptor>,
pub all: UnitPermission,
}
@@ -1720,6 +1812,7 @@ pub struct PermissionsOptions {
pub deny_sys: Option<Vec<String>>,
pub allow_write: Option<Vec<String>>,
pub deny_write: Option<Vec<String>>,
+ pub allow_import: Option<Vec<String>>,
pub prompt: bool,
}
@@ -1888,6 +1981,13 @@ impl Permissions {
})?,
opts.prompt,
)?,
+ import: Permissions::new_unary(
+ parse_maybe_vec(opts.allow_import.as_deref(), |item| {
+ parser.parse_import_descriptor(item)
+ })?,
+ None,
+ opts.prompt,
+ )?,
all: Permissions::new_all(opts.allow_all),
})
}
@@ -1902,6 +2002,7 @@ impl Permissions {
sys: UnaryPermission::allow_all(),
run: UnaryPermission::allow_all(),
ffi: UnaryPermission::allow_all(),
+ import: UnaryPermission::allow_all(),
all: Permissions::new_all(true),
}
}
@@ -1925,35 +2026,10 @@ impl Permissions {
sys: Permissions::new_unary(None, None, prompt).unwrap(),
run: Permissions::new_unary(None, None, prompt).unwrap(),
ffi: Permissions::new_unary(None, None, prompt).unwrap(),
+ import: Permissions::new_unary(None, None, prompt).unwrap(),
all: Permissions::new_all(false),
}
}
-
- /// A helper function that determines if the module specifier is a local or
- /// remote, and performs a read or net check for the specifier.
- pub fn check_specifier(
- &mut self,
- specifier: &ModuleSpecifier,
- ) -> Result<(), AnyError> {
- match specifier.scheme() {
- "file" => match specifier_to_file_path(specifier) {
- Ok(path) => self.read.check(
- &PathQueryDescriptor {
- requested: path.to_string_lossy().into_owned(),
- resolved: path,
- }
- .into_read(),
- Some("import()"),
- ),
- Err(_) => Err(uri_error(format!(
- "Invalid file path.\n Specifier: {specifier}"
- ))),
- },
- "data" => Ok(()),
- "blob" => Ok(()),
- _ => self.net.check_url(specifier, Some("import()")),
- }
- }
}
/// Attempts to convert a specifier to a file path. By default, uses the Url
@@ -2002,6 +2078,12 @@ pub fn specifier_to_file_path(
}
}
+#[derive(Debug, Clone, Copy, Eq, PartialEq)]
+pub enum CheckSpecifierKind {
+ Static,
+ Dynamic,
+}
+
/// Wrapper struct for `Permissions` that can be shared across threads.
///
/// We need a way to have internal mutability for permissions as they might get
@@ -2039,8 +2121,43 @@ impl PermissionsContainer {
pub fn check_specifier(
&self,
specifier: &ModuleSpecifier,
+ kind: CheckSpecifierKind,
) -> Result<(), AnyError> {
- self.inner.lock().check_specifier(specifier)
+ let mut inner = self.inner.lock();
+ match specifier.scheme() {
+ "file" => {
+ if inner.read.is_allow_all() || kind == CheckSpecifierKind::Static {
+ return Ok(());
+ }
+
+ match specifier_to_file_path(specifier) {
+ Ok(path) => inner.read.check(
+ &PathQueryDescriptor {
+ requested: path.to_string_lossy().into_owned(),
+ resolved: path,
+ }
+ .into_read(),
+ Some("import()"),
+ ),
+ Err(_) => Err(uri_error(format!(
+ "Invalid file path.\n Specifier: {specifier}"
+ ))),
+ }
+ }
+ "data" => Ok(()),
+ "blob" => Ok(()),
+ _ => {
+ if inner.import.is_allow_all() {
+ return Ok(()); // avoid allocation below
+ }
+
+ let desc = self
+ .descriptor_parser
+ .parse_import_descriptor_from_url(specifier)?;
+ inner.import.check(&desc, Some("import()"))?;
+ Ok(())
+ }
+ }
}
#[must_use = "the resolved return value to mitigate time-of-check to time-of-use issues"]
@@ -2375,7 +2492,12 @@ impl PermissionsContainer {
url: &Url,
api_name: &str,
) -> Result<(), AnyError> {
- self.inner.lock().net.check_url(url, Some(api_name))
+ let mut inner = self.inner.lock();
+ if inner.net.is_allow_all() {
+ return Ok(());
+ }
+ let desc = self.descriptor_parser.parse_net_descriptor_from_url(url)?;
+ inner.net.check(&desc, Some(api_name))
}
#[inline(always)]
@@ -2589,6 +2711,7 @@ pub struct ChildPermissionsArg {
env: ChildUnaryPermissionArg,
net: ChildUnaryPermissionArg,
ffi: ChildUnaryPermissionArg,
+ import: ChildUnaryPermissionArg,
read: ChildUnaryPermissionArg,
run: ChildUnaryPermissionArg,
sys: ChildUnaryPermissionArg,
@@ -2601,6 +2724,7 @@ impl ChildPermissionsArg {
env: ChildUnaryPermissionArg::Inherit,
net: ChildUnaryPermissionArg::Inherit,
ffi: ChildUnaryPermissionArg::Inherit,
+ import: ChildUnaryPermissionArg::Inherit,
read: ChildUnaryPermissionArg::Inherit,
run: ChildUnaryPermissionArg::Inherit,
sys: ChildUnaryPermissionArg::Inherit,
@@ -2613,6 +2737,7 @@ impl ChildPermissionsArg {
env: ChildUnaryPermissionArg::NotGranted,
net: ChildUnaryPermissionArg::NotGranted,
ffi: ChildUnaryPermissionArg::NotGranted,
+ import: ChildUnaryPermissionArg::NotGranted,
read: ChildUnaryPermissionArg::NotGranted,
run: ChildUnaryPermissionArg::NotGranted,
sys: ChildUnaryPermissionArg::NotGranted,
@@ -2677,6 +2802,11 @@ impl<'de> Deserialize<'de> for ChildPermissionsArg {
child_permissions_arg.ffi = arg.map_err(|e| {
de::Error::custom(format!("(deno.permissions.ffi) {e}"))
})?;
+ } else if key == "import" {
+ let arg = serde_json::from_value::<ChildUnaryPermissionArg>(value);
+ child_permissions_arg.import = arg.map_err(|e| {
+ de::Error::custom(format!("(deno.permissions.import) {e}"))
+ })?;
} else if key == "read" {
let arg = serde_json::from_value::<ChildUnaryPermissionArg>(value);
child_permissions_arg.read = arg.map_err(|e| {
@@ -2726,6 +2856,25 @@ pub trait PermissionDescriptorParser: Debug + Send + Sync {
fn parse_net_descriptor(&self, text: &str)
-> Result<NetDescriptor, AnyError>;
+ fn parse_net_descriptor_from_url(
+ &self,
+ url: &Url,
+ ) -> Result<NetDescriptor, AnyError> {
+ NetDescriptor::from_url(url)
+ }
+
+ fn parse_import_descriptor(
+ &self,
+ text: &str,
+ ) -> Result<ImportDescriptor, AnyError>;
+
+ fn parse_import_descriptor_from_url(
+ &self,
+ url: &Url,
+ ) -> Result<ImportDescriptor, AnyError> {
+ ImportDescriptor::from_url(url)
+ }
+
fn parse_env_descriptor(&self, text: &str)
-> Result<EnvDescriptor, AnyError>;
@@ -2785,6 +2934,7 @@ pub fn create_child_permissions(
&child_permissions_arg.read,
&child_permissions_arg.write,
&child_permissions_arg.net,
+ &child_permissions_arg.import,
&child_permissions_arg.env,
&child_permissions_arg.sys,
&child_permissions_arg.run,
@@ -2808,6 +2958,11 @@ pub fn create_child_permissions(
.create_child_permissions(child_permissions_arg.write, |text| {
Ok(Some(parser.parse_write_descriptor(text)?))
})?;
+ worker_perms.import = main_perms
+ .import
+ .create_child_permissions(child_permissions_arg.import, |text| {
+ Ok(Some(parser.parse_import_descriptor(text)?))
+ })?;
worker_perms.net = main_perms
.net
.create_child_permissions(child_permissions_arg.net, |text| {
@@ -2897,6 +3052,13 @@ mod tests {
NetDescriptor::parse(text)
}
+ fn parse_import_descriptor(
+ &self,
+ text: &str,
+ ) -> Result<ImportDescriptor, AnyError> {
+ ImportDescriptor::parse(text)
+ }
+
fn parse_env_descriptor(
&self,
text: &str,
@@ -3153,8 +3315,9 @@ mod tests {
#[test]
fn test_check_net_url() {
- let mut perms = Permissions::from_options(
- &TestPermissionDescriptorParser,
+ let parser = TestPermissionDescriptorParser;
+ let perms = Permissions::from_options(
+ &parser,
&PermissionsOptions {
allow_net: Some(svec![
"localhost",
@@ -3168,6 +3331,7 @@ mod tests {
},
)
.unwrap();
+ let mut perms = PermissionsContainer::new(Arc::new(parser), perms);
let url_tests = vec![
// Any protocol + port for localhost should be ok, since we don't specify
@@ -3209,8 +3373,8 @@ mod tests {
];
for (url_str, is_ok) in url_tests {
- let u = url::Url::parse(url_str).unwrap();
- assert_eq!(is_ok, perms.net.check_url(&u, None).is_ok(), "{}", u);
+ let u = Url::parse(url_str).unwrap();
+ assert_eq!(is_ok, perms.check_net_url(&u, "api()").is_ok(), "{}", u);
}
}
@@ -3222,48 +3386,78 @@ mod tests {
} else {
svec!["/a"]
};
- let mut perms = Permissions::from_options(
- &TestPermissionDescriptorParser,
+ let parser = TestPermissionDescriptorParser;
+ let perms = Permissions::from_options(
+ &parser,
&PermissionsOptions {
allow_read: Some(read_allowlist),
- allow_net: Some(svec!["localhost"]),
+ allow_import: Some(svec!["localhost"]),
..Default::default()
},
)
.unwrap();
+ let perms = PermissionsContainer::new(Arc::new(parser), perms);
let mut fixtures = vec![
(
ModuleSpecifier::parse("http://localhost:4545/mod.ts").unwrap(),
+ CheckSpecifierKind::Static,
+ true,
+ ),
+ (
+ ModuleSpecifier::parse("http://localhost:4545/mod.ts").unwrap(),
+ CheckSpecifierKind::Dynamic,
true,
),
(
ModuleSpecifier::parse("http://deno.land/x/mod.ts").unwrap(),
+ CheckSpecifierKind::Dynamic,
false,
),
(
ModuleSpecifier::parse("data:text/plain,Hello%2C%20Deno!").unwrap(),
+ CheckSpecifierKind::Dynamic,
true,
),
];
if cfg!(target_os = "windows") {
- fixtures
- .push((ModuleSpecifier::parse("file:///C:/a/mod.ts").unwrap(), true));
+ fixtures.push((
+ ModuleSpecifier::parse("file:///C:/a/mod.ts").unwrap(),
+ CheckSpecifierKind::Dynamic,
+ true,
+ ));
fixtures.push((
ModuleSpecifier::parse("file:///C:/b/mod.ts").unwrap(),
+ CheckSpecifierKind::Static,
+ true,
+ ));
+ fixtures.push((
+ ModuleSpecifier::parse("file:///C:/b/mod.ts").unwrap(),
+ CheckSpecifierKind::Dynamic,
false,
));
} else {
- fixtures
- .push((ModuleSpecifier::parse("file:///a/mod.ts").unwrap(), true));
- fixtures
- .push((ModuleSpecifier::parse("file:///b/mod.ts").unwrap(), false));
+ fixtures.push((
+ ModuleSpecifier::parse("file:///a/mod.ts").unwrap(),
+ CheckSpecifierKind::Dynamic,
+ true,
+ ));
+ fixtures.push((
+ ModuleSpecifier::parse("file:///b/mod.ts").unwrap(),
+ CheckSpecifierKind::Static,
+ true,
+ ));
+ fixtures.push((
+ ModuleSpecifier::parse("file:///b/mod.ts").unwrap(),
+ CheckSpecifierKind::Dynamic,
+ false,
+ ));
}
- for (specifier, expected) in fixtures {
+ for (specifier, kind, expected) in fixtures {
assert_eq!(
- perms.check_specifier(&specifier).is_ok(),
+ perms.check_specifier(&specifier, kind).is_ok(),
expected,
"{}",
specifier,
@@ -3272,24 +3466,6 @@ mod tests {
}
#[test]
- fn check_invalid_specifiers() {
- set_prompter(Box::new(TestPrompter));
- let mut perms = Permissions::allow_all();
-
- let mut test_cases = vec![];
-
- test_cases.push("file://dir");
- test_cases.push("file://asdf/");
- test_cases.push("file://remotehost/");
-
- for url in test_cases {
- assert!(perms
- .check_specifier(&ModuleSpecifier::parse(url).unwrap())
- .is_err());
- }
- }
-
- #[test]
fn test_query() {
set_prompter(Box::new(TestPrompter));
let parser = TestPermissionDescriptorParser;
@@ -3885,6 +4061,7 @@ mod tests {
env: ChildUnaryPermissionArg::Inherit,
net: ChildUnaryPermissionArg::Inherit,
ffi: ChildUnaryPermissionArg::Inherit,
+ import: ChildUnaryPermissionArg::Inherit,
read: ChildUnaryPermissionArg::Inherit,
run: ChildUnaryPermissionArg::Inherit,
sys: ChildUnaryPermissionArg::Inherit,
@@ -3897,6 +4074,7 @@ mod tests {
env: ChildUnaryPermissionArg::NotGranted,
net: ChildUnaryPermissionArg::NotGranted,
ffi: ChildUnaryPermissionArg::NotGranted,
+ import: ChildUnaryPermissionArg::NotGranted,
read: ChildUnaryPermissionArg::NotGranted,
run: ChildUnaryPermissionArg::NotGranted,
sys: ChildUnaryPermissionArg::NotGranted,
@@ -3930,6 +4108,7 @@ mod tests {
"env": true,
"net": true,
"ffi": true,
+ "import": true,
"read": true,
"run": true,
"sys": true,
@@ -3940,6 +4119,7 @@ mod tests {
env: ChildUnaryPermissionArg::Granted,
net: ChildUnaryPermissionArg::Granted,
ffi: ChildUnaryPermissionArg::Granted,
+ import: ChildUnaryPermissionArg::Granted,
read: ChildUnaryPermissionArg::Granted,
run: ChildUnaryPermissionArg::Granted,
sys: ChildUnaryPermissionArg::Granted,
@@ -3951,6 +4131,7 @@ mod tests {
"env": false,
"net": false,
"ffi": false,
+ "import": false,
"read": false,
"run": false,
"sys": false,
@@ -3961,6 +4142,7 @@ mod tests {
env: ChildUnaryPermissionArg::NotGranted,
net: ChildUnaryPermissionArg::NotGranted,
ffi: ChildUnaryPermissionArg::NotGranted,
+ import: ChildUnaryPermissionArg::NotGranted,
read: ChildUnaryPermissionArg::NotGranted,
run: ChildUnaryPermissionArg::NotGranted,
sys: ChildUnaryPermissionArg::NotGranted,
@@ -3972,6 +4154,7 @@ mod tests {
"env": ["foo", "bar"],
"net": ["foo", "bar:8000"],
"ffi": ["foo", "file:///bar/baz"],
+ "import": ["example.com"],
"read": ["foo", "file:///bar/baz"],
"run": ["foo", "file:///bar/baz", "./qux"],
"sys": ["hostname", "osRelease"],
@@ -3985,6 +4168,7 @@ mod tests {
"foo",
"file:///bar/baz"
]),
+ import: ChildUnaryPermissionArg::GrantedList(svec!["example.com"]),
read: ChildUnaryPermissionArg::GrantedList(svec![
"foo",
"file:///bar/baz"
diff --git a/tests/integration/cache_tests.rs b/tests/integration/cache_tests.rs
index 9c6f1f7f1..d9fb8e38e 100644
--- a/tests/integration/cache_tests.rs
+++ b/tests/integration/cache_tests.rs
@@ -18,7 +18,7 @@ fn xdg_cache_home_dir() {
.env_clear()
.env("XDG_CACHE_HOME", &xdg_cache_home)
.args(
- "cache --reload --no-check http://localhost:4548/subdir/redirects/a.ts",
+ "cache --allow-import --reload --no-check http://localhost:4548/subdir/redirects/a.ts",
)
.run()
.skip_output_check()
diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs
index 121dcb837..f30828a66 100644
--- a/tests/integration/check_tests.rs
+++ b/tests/integration/check_tests.rs
@@ -9,14 +9,14 @@ use util::TestContext;
use util::TestContextBuilder;
itest!(check_all {
- args: "check --quiet --all check/all/check_all.ts",
+ args: "check --allow-import --quiet --all check/all/check_all.ts",
output: "check/all/check_all.out",
http_server: true,
exit_code: 1,
});
itest!(check_all_local {
- args: "check --quiet check/all/check_all.ts",
+ args: "check --allow-import --quiet check/all/check_all.ts",
output_str: Some(""),
http_server: true,
});
@@ -227,6 +227,7 @@ fn ts_no_recheck_on_redirect() {
let test_context = TestContext::default();
let check_command = test_context.new_command().args_vec([
"run",
+ "--allow-import",
"--check",
"run/017_import_redirect.ts",
]);
diff --git a/tests/integration/compile_tests.rs b/tests/integration/compile_tests.rs
index 215b956fd..0a5916f6f 100644
--- a/tests/integration/compile_tests.rs
+++ b/tests/integration/compile_tests.rs
@@ -539,6 +539,7 @@ fn check_local_by_default() {
.new_command()
.args_vec([
"compile",
+ "--allow-import",
"--output",
&exe.to_string_lossy(),
"./compile/check_local_by_default.ts",
@@ -561,6 +562,7 @@ fn check_local_by_default2() {
.new_command()
.args_vec([
"compile",
+ "--allow-import",
"--output",
&exe.to_string_lossy(),
"./compile/check_local_by_default2.ts"
diff --git a/tests/integration/coverage_tests.rs b/tests/integration/coverage_tests.rs
index 9509ddcb7..ab18ef76d 100644
--- a/tests/integration/coverage_tests.rs
+++ b/tests/integration/coverage_tests.rs
@@ -456,6 +456,7 @@ fn no_http_coverage_data() {
.new_command()
.args_vec(vec![
"test".to_string(),
+ "--allow-import".to_string(),
"--quiet".to_string(),
"--no-check".to_string(),
format!("--coverage={}", tempdir),
diff --git a/tests/integration/install_tests.rs b/tests/integration/install_tests.rs
index 2c7725443..4dfd00146 100644
--- a/tests/integration/install_tests.rs
+++ b/tests/integration/install_tests.rs
@@ -294,7 +294,7 @@ fn check_local_by_default() {
let script_path_str = script_path.to_string_lossy().to_string();
context
.new_command()
- .args_vec(["install", "-g", script_path_str.as_str()])
+ .args_vec(["install", "-g", "--allow-import", script_path_str.as_str()])
.envs([
("HOME", temp_dir_str.as_str()),
("USERPROFILE", temp_dir_str.as_str()),
@@ -318,7 +318,7 @@ fn check_local_by_default2() {
let script_path_str = script_path.to_string_lossy().to_string();
context
.new_command()
- .args_vec(["install", "-g", script_path_str.as_str()])
+ .args_vec(["install", "-g", "--allow-import", script_path_str.as_str()])
.envs([
("HOME", temp_dir_str.as_str()),
("NO_COLOR", "1"),
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index a0368d8d1..539e3cc7e 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -890,7 +890,7 @@ fn lsp_format_vendor_path() {
// put this dependency in the global cache
context
.new_command()
- .args("cache http://localhost:4545/run/002_hello.ts")
+ .args("cache --allow-import http://localhost:4545/run/002_hello.ts")
.run()
.skip_output_check();
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index 6b0901e26..1e1d6ed61 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -73,7 +73,7 @@ itest!(_005_more_imports {
});
itest!(_006_url_imports {
- args: "run --quiet --reload run/006_url_imports.ts",
+ args: "run --quiet --reload --allow-import run/006_url_imports.ts",
output: "run/006_url_imports.ts.out",
http_server: true,
});
@@ -105,24 +105,25 @@ itest!(_016_double_await {
});
itest!(_017_import_redirect {
- args: "run --quiet --reload run/017_import_redirect.ts",
+ args: "run --quiet --allow-import --reload run/017_import_redirect.ts",
output: "run/017_import_redirect.ts.out",
});
itest!(_017_import_redirect_check {
- args: "run --quiet --reload --check run/017_import_redirect.ts",
+ args:
+ "run --quiet --allow-import --reload --check run/017_import_redirect.ts",
output: "run/017_import_redirect.ts.out",
});
itest!(_017_import_redirect_vendor_dir {
args:
- "run --quiet --reload --vendor --check $TESTDATA/run/017_import_redirect.ts",
+ "run --quiet --allow-import --reload --vendor --check $TESTDATA/run/017_import_redirect.ts",
output: "run/017_import_redirect.ts.out",
temp_cwd: true,
});
itest!(_017_import_redirect_info {
- args: "info --quiet --reload run/017_import_redirect.ts",
+ args: "info --quiet --allow-import --reload run/017_import_redirect.ts",
output: "run/017_import_redirect_info.out",
});
@@ -132,7 +133,7 @@ itest!(_018_async_catch {
});
itest!(_019_media_types {
- args: "run --reload run/019_media_types.ts",
+ args: "run --reload --allow-import run/019_media_types.ts",
output: "run/019_media_types.ts.out",
http_server: true,
});
@@ -154,14 +155,14 @@ itest!(_025_reload_js_type_error {
});
itest!(_027_redirect_typescript {
- args: "run --quiet --reload run/027_redirect_typescript.ts",
+ args: "run --quiet --reload --allow-import run/027_redirect_typescript.ts",
output: "run/027_redirect_typescript.ts.out",
http_server: true,
});
itest!(_027_redirect_typescript_vendor_dir {
args:
- "run --quiet --reload --vendor $TESTDATA/run/027_redirect_typescript.ts",
+ "run --quiet --reload --vendor --allow-import $TESTDATA/run/027_redirect_typescript.ts",
output: "run/027_redirect_typescript.ts.out",
http_server: true,
temp_cwd: true,
@@ -175,14 +176,14 @@ itest!(_028_args {
itest!(_033_import_map_remote {
args:
- "run --quiet --reload --import-map=http://127.0.0.1:4545/import_maps/import_map_remote.json import_maps/test_remote.ts",
+ "run --quiet --reload --allow-import --import-map=http://127.0.0.1:4545/import_maps/import_map_remote.json import_maps/test_remote.ts",
output: "run/033_import_map_remote.out",
http_server: true,
});
itest!(_033_import_map_vendor_dir_remote {
args:
- "run --quiet --reload --import-map=http://127.0.0.1:4545/import_maps/import_map_remote.json --vendor $TESTDATA/import_maps/test_remote.ts",
+ "run --quiet --reload --allow-import --import-map=http://127.0.0.1:4545/import_maps/import_map_remote.json --vendor $TESTDATA/import_maps/test_remote.ts",
output: "run/033_import_map_remote.out",
http_server: true,
temp_cwd: true,
@@ -190,7 +191,7 @@ itest!(_033_import_map_vendor_dir_remote {
itest!(_033_import_map_data_uri {
args:
- "run --quiet --reload --import-map=data:application/json;charset=utf-8;base64,ewogICJpbXBvcnRzIjogewogICAgInRlc3Rfc2VydmVyLyI6ICJodHRwOi8vbG9jYWxob3N0OjQ1NDUvIgogIH0KfQ== run/import_maps/test_data.ts",
+ "run --quiet --reload --allow-import --import-map=data:application/json;charset=utf-8;base64,ewogICJpbXBvcnRzIjogewogICAgInRlc3Rfc2VydmVyLyI6ICJodHRwOi8vbG9jYWxob3N0OjQ1NDUvIgogIH0KfQ== run/import_maps/test_data.ts",
output: "run/import_maps/test_data.ts.out",
http_server: true,
});
@@ -201,7 +202,7 @@ itest!(onload {
});
itest!(_035_cached_only_flag {
- args: "run --reload --check --cached-only http://127.0.0.1:4545/run/019_media_types.ts",
+ args: "run --reload --check --allow-import --cached-only http://127.0.0.1:4545/run/019_media_types.ts",
output: "run/035_cached_only_flag.out",
exit_code: 1,
http_server: true,
@@ -237,14 +238,14 @@ itest!(_047_jsx {
});
itest!(_048_media_types_jsx {
- args: "run --reload run/048_media_types_jsx.ts",
+ args: "run --reload --allow-import run/048_media_types_jsx.ts",
output: "run/048_media_types_jsx.ts.out",
http_server: true,
});
itest!(_052_no_remote_flag {
args:
- "run --reload --check --no-remote http://127.0.0.1:4545/run/019_media_types.ts",
+ "run --reload --check --allow-import --no-remote http://127.0.0.1:4545/run/019_media_types.ts",
output: "run/052_no_remote_flag.out",
exit_code: 1,
http_server: true,
@@ -467,7 +468,7 @@ itest!(dynamic_import_already_rejected {
});
itest!(dynamic_import_concurrent_non_statically_analyzable {
- args: "run --allow-read --allow-net --quiet run/dynamic_import_concurrent_non_statically_analyzable/main.ts",
+ args: "run --allow-import --allow-read --allow-net --quiet run/dynamic_import_concurrent_non_statically_analyzable/main.ts",
output: "run/dynamic_import_concurrent_non_statically_analyzable/main.out",
http_server: true,
});
@@ -802,7 +803,7 @@ itest!(private_field_presence_no_check {
itest!(lock_write_fetch {
args:
- "run --quiet --allow-read --allow-write --allow-env --allow-run run/lock_write_fetch/main.ts",
+ "run --quiet --allow-import --allow-read --allow-write --allow-env --allow-run run/lock_write_fetch/main.ts",
output: "run/lock_write_fetch/main.out",
http_server: true,
exit_code: 0,
@@ -810,26 +811,27 @@ itest!(lock_write_fetch {
itest!(lock_check_ok {
args:
- "run --quiet --lock=run/lock_check_ok.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ "run --quiet --allow-import --lock=run/lock_check_ok.json http://127.0.0.1:4545/run/003_relative_import.ts",
output: "run/003_relative_import.ts.out",
http_server: true,
});
itest!(lock_check_ok2 {
- args: "run --lock=run/lock_check_ok2.json run/019_media_types.ts",
+ args:
+ "run --allow-import --lock=run/lock_check_ok2.json run/019_media_types.ts",
output: "run/019_media_types.ts.out",
http_server: true,
});
itest!(lock_v2_check_ok {
args:
- "run --quiet --lock=run/lock_v2_check_ok.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ "run --allow-import --quiet --lock=run/lock_v2_check_ok.json http://127.0.0.1:4545/run/003_relative_import.ts",
output: "run/003_relative_import.ts.out",
http_server: true,
});
itest!(lock_v2_check_ok2 {
- args: "run --lock=run/lock_v2_check_ok2.json run/019_media_types.ts",
+ args: "run --allow-import --lock=run/lock_v2_check_ok2.json run/019_media_types.ts",
output: "run/019_media_types.ts.out",
http_server: true,
});
@@ -849,7 +851,7 @@ fn lock_redirects() {
);
context
.new_command()
- .args("run main.ts")
+ .args("run --allow-import main.ts")
.run()
.skip_output_check();
let initial_lockfile_text = r#"{
@@ -865,7 +867,7 @@ fn lock_redirects() {
assert_eq!(temp_dir.read_to_string("deno.lock"), initial_lockfile_text);
context
.new_command()
- .args("run main.ts")
+ .args("run --allow-import main.ts")
.run()
.assert_matches_text("Hello World\n");
assert_eq!(temp_dir.read_to_string("deno.lock"), initial_lockfile_text);
@@ -892,7 +894,7 @@ fn lock_redirects() {
// it should use the echo script instead
context
.new_command()
- .args("run main.ts Hi there")
+ .args("run --allow-import main.ts Hi there")
.run()
.assert_matches_text(concat!(
"Download http://localhost:4545/echo.ts\n",
@@ -1260,7 +1262,7 @@ itest!(config_types {
itest!(config_types_remote {
http_server: true,
- args: "run --reload --quiet --check=all --config run/config_types/remote.tsconfig.json run/config_types/main.ts",
+ args: "run --allow-import --reload --quiet --check=all --config run/config_types/remote.tsconfig.json run/config_types/main.ts",
output: "run/config_types/main.out",
});
@@ -1365,9 +1367,10 @@ itest!(error_015_dynamic_import_permissions {
http_server: true,
});
-// We have an allow-net flag but not allow-read, it should still result in error.
+// We have an allow-import flag but not allow-read, it should still result in error.
itest!(error_016_dynamic_import_permissions2 {
- args: "run --reload --allow-net run/error_016_dynamic_import_permissions2.js",
+ args:
+ "run --reload --allow-import run/error_016_dynamic_import_permissions2.js",
output: "run/error_016_dynamic_import_permissions2.out",
exit_code: 1,
http_server: true,
@@ -1428,7 +1431,7 @@ itest!(error_025_tab_indent {
});
itest!(error_026_remote_import_error {
- args: "run run/error_026_remote_import_error.ts",
+ args: "run --allow-import run/error_026_remote_import_error.ts",
output: "run/error_026_remote_import_error.ts.out",
exit_code: 1,
http_server: true,
@@ -1471,18 +1474,18 @@ itest!(error_type_definitions {
});
itest!(error_local_static_import_from_remote_ts {
- args: "run --reload http://localhost:4545/run/error_local_static_import_from_remote.ts",
- exit_code: 1,
- http_server: true,
- output: "run/error_local_static_import_from_remote.ts.out",
- });
+ args: "run --allow-import --reload http://localhost:4545/run/error_local_static_import_from_remote.ts",
+ exit_code: 1,
+ http_server: true,
+ output: "run/error_local_static_import_from_remote.ts.out",
+});
itest!(error_local_static_import_from_remote_js {
- args: "run --reload http://localhost:4545/run/error_local_static_import_from_remote.js",
- exit_code: 1,
- http_server: true,
- output: "run/error_local_static_import_from_remote.js.out",
- });
+ args: "run --allow-import --reload http://localhost:4545/run/error_local_static_import_from_remote.js",
+ exit_code: 1,
+ http_server: true,
+ output: "run/error_local_static_import_from_remote.js.out",
+});
itest!(exit_error42 {
exit_code: 42,
@@ -1531,7 +1534,7 @@ itest!(finalization_registry {
});
itest!(https_import {
- args: "run --quiet --reload --cert tls/RootCA.pem run/https_import.ts",
+ args: "run --allow-import --quiet --reload --cert tls/RootCA.pem run/https_import.ts",
output: "run/https_import.ts.out",
http_server: true,
});
@@ -1542,18 +1545,18 @@ itest!(if_main {
});
itest!(import_meta {
- args: "run --quiet --reload --import-map=run/import_meta/importmap.json run/import_meta/main.ts",
+ args: "run --allow-import --quiet --reload --import-map=run/import_meta/importmap.json run/import_meta/main.ts",
output: "run/import_meta/main.out",
http_server: true,
});
itest!(main_module {
- args: "run --quiet --reload run/main_module/main.ts",
+ args: "run --quiet --reload run/main_module/main.ts",
output: "run/main_module/main.out",
});
itest!(no_check {
- args: "run --quiet --reload --no-check run/006_url_imports.ts",
+ args: "run --allow-import --quiet --reload --no-check run/006_url_imports.ts",
output: "run/006_url_imports.ts.out",
http_server: true,
});
@@ -1569,14 +1572,15 @@ itest!(decorators_tc39_proposal {
});
itest!(check_remote {
- args: "run --quiet --reload --check=all run/no_check_remote.ts",
+ args:
+ "run --quiet --allow-import --reload --check=all run/no_check_remote.ts",
output: "run/no_check_remote.ts.disabled.out",
exit_code: 1,
http_server: true,
});
itest!(no_check_remote {
- args: "run --quiet --reload --no-check=remote run/no_check_remote.ts",
+ args: "run --allow-import --quiet --reload --no-check=remote run/no_check_remote.ts",
output: "run/no_check_remote.ts.enabled.out",
http_server: true,
});
@@ -1603,13 +1607,15 @@ itest!(type_definitions_for_export {
});
itest!(type_directives_01 {
- args: "run --reload --check=all -L debug run/type_directives_01.ts",
+ args:
+ "run --allow-import --reload --check=all -L debug run/type_directives_01.ts",
output: "run/type_directives_01.ts.out",
http_server: true,
});
itest!(type_directives_02 {
- args: "run --reload --check=all -L debug run/type_directives_02.ts",
+ args:
+ "run --allow-import --reload --check=all -L debug run/type_directives_02.ts",
output: "run/type_directives_02.ts.out",
});
@@ -1629,13 +1635,13 @@ fn type_directives_js_main() {
}
itest!(type_directives_redirect {
- args: "run --reload --check run/type_directives_redirect.ts",
+ args: "run --allow-import --reload --check run/type_directives_redirect.ts",
output: "run/type_directives_redirect.ts.out",
http_server: true,
});
itest!(type_headers_deno_types {
- args: "run --reload --check run/type_headers_deno_types.ts",
+ args: "run --allow-import --reload --check run/type_headers_deno_types.ts",
output: "run/type_headers_deno_types.ts.out",
http_server: true,
});
@@ -1839,20 +1845,20 @@ itest!(unstable_kv_enabled {
});
itest!(import_compression {
- args: "run --quiet --reload --allow-net run/import_compression/main.ts",
+ args: "run --allow-import --quiet --reload --allow-net run/import_compression/main.ts",
output: "run/import_compression/main.out",
http_server: true,
});
itest!(disallow_http_from_https_js {
- args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/run/disallow_http_from_https.js",
+ args: "run --allow-import --quiet --reload --cert tls/RootCA.pem https://localhost:5545/run/disallow_http_from_https.js",
output: "run/disallow_http_from_https_js.out",
http_server: true,
exit_code: 1,
});
itest!(disallow_http_from_https_ts {
- args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/run/disallow_http_from_https.ts",
+ args: "run --allow-import --quiet --reload --cert tls/RootCA.pem https://localhost:5545/run/disallow_http_from_https.ts",
output: "run/disallow_http_from_https_ts.out",
http_server: true,
exit_code: 1,
@@ -1904,7 +1910,7 @@ itest!(es_private_fields {
});
itest!(ts_import_from_js {
- args: "run --quiet --reload run/ts_import_from_js/main.js",
+ args: "run --allow-import --quiet --reload run/ts_import_from_js/main.js",
output: "run/ts_import_from_js/main.out",
http_server: true,
});
@@ -1915,100 +1921,101 @@ itest!(jsx_import_from_ts {
});
itest!(jsx_import_source_pragma {
- args: "run --reload run/jsx_import_source_pragma.tsx",
+ args: "run --reload --allow-import run/jsx_import_source_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_config {
args:
- "run --reload --config jsx/deno-jsx.jsonc --no-lock run/jsx_import_source_pragma.tsx",
+ "run --reload --allow-import --config jsx/deno-jsx.jsonc --no-lock run/jsx_import_source_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_dev_config {
args:
- "run --reload --config jsx/deno-jsxdev.jsonc --no-lock run/jsx_import_source_pragma.tsx",
+ "run --reload --allow-import --config jsx/deno-jsxdev.jsonc --no-lock run/jsx_import_source_pragma.tsx",
output: "run/jsx_import_source_dev.out",
http_server: true,
});
itest!(jsx_import_source_no_pragma {
args:
- "run --reload --config jsx/deno-jsx.jsonc --no-lock run/jsx_import_source_no_pragma.tsx",
+ "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock run/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_no_pragma_dev {
- args: "run --reload --config jsx/deno-jsxdev.jsonc --no-lock run/jsx_import_source_no_pragma.tsx",
+ args: "run --allow-import --reload --config jsx/deno-jsxdev.jsonc --no-lock run/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source_dev.out",
http_server: true,
});
itest!(jsx_import_source_pragma_import_map {
- args: "run --reload --import-map jsx/import-map.json run/jsx_import_source_pragma_import_map.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map.json run/jsx_import_source_pragma_import_map.tsx",
output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_pragma_import_map_dev {
- args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc run/jsx_import_source_pragma_import_map.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc run/jsx_import_source_pragma_import_map.tsx",
output: "run/jsx_import_source_import_map_dev.out",
http_server: true,
});
itest!(jsx_import_source_precompile_import_map {
- args: "run --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile.jsonc run/jsx_precompile/no_pragma.tsx",
+ args: "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile.jsonc run/jsx_precompile/no_pragma.tsx",
output: "run/jsx_precompile/no_pragma.out",
http_server: true,
});
itest!(jsx_import_source_precompile_import_map_skip_element {
- args: "run --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile-skip.jsonc run/jsx_precompile/skip.tsx",
+ args: "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile-skip.jsonc run/jsx_precompile/skip.tsx",
output: "run/jsx_precompile/skip.out",
http_server: true,
});
itest!(jsx_import_source_import_map {
- args: "run --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc run/jsx_import_source_no_pragma.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc run/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_import_map_dev {
- args: "run --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc run/jsx_import_source_no_pragma.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc run/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source_import_map_dev.out",
http_server: true,
});
itest!(jsx_import_source_import_map_scoped {
- args: "run --reload --import-map jsx/import-map-scoped.json --no-lock --config jsx/deno-jsx-import-map.jsonc subdir/jsx_import_source_no_pragma.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map-scoped.json --no-lock --config jsx/deno-jsx-import-map.jsonc subdir/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_import_map_scoped_dev {
- args: "run --reload --import-map jsx/import-map-scoped.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc subdir/jsx_import_source_no_pragma.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map-scoped.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc subdir/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source_import_map_dev.out",
http_server: true,
});
itest!(jsx_import_source_pragma_no_check {
- args: "run --reload --no-check run/jsx_import_source_pragma.tsx",
+ args:
+ "run --allow-import --reload --no-check run/jsx_import_source_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_config_no_check {
- args: "run --reload --config jsx/deno-jsx.jsonc --no-lock --no-check run/jsx_import_source_pragma.tsx",
+ args: "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check run/jsx_import_source_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_config_vendor_dir {
- args: "run --reload --config jsx/deno-jsx.jsonc --no-lock --vendor $TESTDATA/run/jsx_import_source_pragma.tsx",
+ args: "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --vendor $TESTDATA/run/jsx_import_source_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
temp_cwd: true,
@@ -2017,19 +2024,19 @@ itest!(jsx_import_source_pragma_with_config_vendor_dir {
itest!(jsx_import_source_no_pragma_no_check {
args:
- "run --reload --config jsx/deno-jsx.jsonc --no-lock --no-check run/jsx_import_source_no_pragma.tsx",
+ "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check run/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_import_map_no_check {
- args: "run --reload --import-map jsx/import-map.json --no-check run/jsx_import_source_pragma_import_map.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map.json --no-check run/jsx_import_source_pragma_import_map.tsx",
output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_import_map_no_check {
- args: "run --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc --no-check run/jsx_import_source_no_pragma.tsx",
+ args: "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc --no-check run/jsx_import_source_no_pragma.tsx",
output: "run/jsx_import_source_import_map.out",
http_server: true,
});
@@ -2093,7 +2100,7 @@ itest!(import_data_url_import_relative {
});
itest!(import_data_url_imports {
- args: "run --quiet --reload run/import_data_url_imports.ts",
+ args: "run --allow-import --quiet --reload run/import_data_url_imports.ts",
output: "run/import_data_url_imports.ts.out",
http_server: true,
});
@@ -2127,7 +2134,7 @@ itest!(import_blob_url_import_relative {
itest!(import_blob_url_imports {
args:
- "run --quiet --reload --allow-net=localhost:4545 run/import_blob_url_imports.ts",
+ "run --allow-import --quiet --reload --allow-net=localhost:4545 run/import_blob_url_imports.ts",
output: "run/import_blob_url_imports.ts.out",
http_server: true,
});
@@ -2143,13 +2150,13 @@ itest!(import_blob_url {
});
itest!(import_file_with_colon {
- args: "run --quiet --reload run/import_file_with_colon.ts",
+ args: "run --allow-import --quiet --reload run/import_file_with_colon.ts",
output: "run/import_file_with_colon.ts.out",
http_server: true,
});
itest!(import_extensionless {
- args: "run --quiet --reload run/import_extensionless.ts",
+ args: "run --allow-import --quiet --reload run/import_extensionless.ts",
output: "run/import_extensionless.ts.out",
http_server: true,
});
@@ -2195,7 +2202,7 @@ itest!(inline_js_source_map_2_with_inline_contents {
// was not commented out. The source line is remapped using source contents that
// from the module graph.
itest!(inline_js_source_map_with_contents_from_graph {
- args: "run --quiet run/inline_js_source_map_with_contents_from_graph.js",
+ args: "run --allow-import --quiet run/inline_js_source_map_with_contents_from_graph.js",
output: "run/inline_js_source_map_with_contents_from_graph.js.out",
exit_code: 1,
http_server: true,
@@ -3031,14 +3038,14 @@ mod permissions {
});
itest!(dynamic_import_permissions_remote_remote {
- args: "run --quiet --reload --allow-net=localhost:4545 dynamic_import/permissions_remote_remote.ts",
+ args: "run --quiet --reload --allow-import=localhost:4545 dynamic_import/permissions_remote_remote.ts",
output: "dynamic_import/permissions_remote_remote.ts.out",
http_server: true,
exit_code: 1,
});
itest!(dynamic_import_permissions_data_remote {
- args: "run --quiet --reload --allow-net=localhost:4545 dynamic_import/permissions_data_remote.ts",
+ args: "run --quiet --reload --allow-import=localhost:4545 dynamic_import/permissions_data_remote.ts",
output: "dynamic_import/permissions_data_remote.ts.out",
http_server: true,
exit_code: 1,
@@ -3329,7 +3336,7 @@ itest!(no_config_auto_discovery_for_local_script {
});
itest!(config_not_auto_discovered_for_remote_script {
- args: "run --quiet http://127.0.0.1:4545/run/with_config/server_side_work.ts",
+ args: "run --allow-import --quiet http://127.0.0.1:4545/run/with_config/server_side_work.ts",
output_str: Some("ok\n"),
http_server: true,
});
@@ -3468,6 +3475,7 @@ fn check_local_then_remote() {
let output = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--allow-import")
.arg("--check")
.arg("run/remote_type_error/main.ts")
.spawn()
@@ -3478,6 +3486,7 @@ fn check_local_then_remote() {
let output = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--allow-import")
.arg("--check=all")
.arg("run/remote_type_error/main.ts")
.env("NO_COLOR", "1")
@@ -3655,6 +3664,7 @@ fn cache_test() {
.env("DENO_DIR", deno_dir.path())
.current_dir(util::testdata_path())
.arg("cache")
+ .arg("--allow-import=localhost:4545")
.arg("--check=all")
.arg("-L")
.arg("debug")
@@ -3670,6 +3680,7 @@ fn cache_test() {
.env("NO_COLOR", "1")
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--allow-import=localhost:4545")
.arg(module_url.to_string())
.output()
.expect("Failed to spawn script");
@@ -3819,6 +3830,7 @@ fn basic_auth_tokens() {
let output = util::deno_cmd()
.current_dir(util::root_path())
.arg("run")
+ .arg("--allow-import")
.arg("http://127.0.0.1:4554/run/001_hello.js")
.piped_output()
.spawn()
@@ -3840,6 +3852,7 @@ fn basic_auth_tokens() {
let output = util::deno_cmd()
.current_dir(util::root_path())
.arg("run")
+ .arg("--allow-import")
.arg("http://127.0.0.1:4554/run/001_hello.js")
.env("DENO_AUTH_TOKENS", "testuser123:testpassabc@127.0.0.1:4554")
.piped_output()
@@ -4404,7 +4417,7 @@ async fn websocket_server_idletimeout() {
}
itest!(no_lock_flag {
- args: "run --no-lock run/no_lock_flag/main.ts",
+ args: "run --allow-import --no-lock run/no_lock_flag/main.ts",
output: "run/no_lock_flag/main.out",
http_server: true,
exit_code: 0,
@@ -4563,7 +4576,9 @@ pub fn vendor_dir_config_file() {
console.log(returnsHi());"#,
);
- let deno_run_cmd = test_context.new_command().args("run --quiet main.ts");
+ let deno_run_cmd = test_context
+ .new_command()
+ .args("run --allow-import --quiet main.ts");
deno_run_cmd.run().assert_matches_text("Hi\n");
assert!(vendor_dir.exists());
@@ -4574,13 +4589,15 @@ console.log(returnsHi());"#,
assert!(!vendor_dir.exists());
test_context
.new_command()
- .args("cache --quiet --vendor main.ts")
+ .args("cache --allow-import --quiet --vendor main.ts")
.run();
assert!(vendor_dir.exists());
rm_vendor_dir();
temp_dir.write("deno.json", r#"{ "vendor": true }"#);
- let cache_command = test_context.new_command().args("cache --quiet main.ts");
+ let cache_command = test_context
+ .new_command()
+ .args("cache --allow-import --quiet main.ts");
cache_command.run();
assert!(vendor_dir.exists());
@@ -4608,7 +4625,7 @@ console.log(returnsHi());"#,
test_context
.new_command()
// http_localhost_4545/subdir/#capitals_c75d7/main.js
- .args("cache http://localhost:4545/subdir/CAPITALS/main.js")
+ .args("cache --allow-import http://localhost:4545/subdir/CAPITALS/main.js")
.run()
.skip_output_check();
assert_eq!(
@@ -4625,7 +4642,7 @@ console.log(returnsHi());"#,
test_context
.new_command()
// todo(dsherret): seems wrong that we don't auto-discover the config file to get the vendor directory for this
- .args("run --vendor http://localhost:4545/subdir/CAPITALS/hello_there.ts")
+ .args("run --allow-import --vendor http://localhost:4545/subdir/CAPITALS/hello_there.ts")
.run()
.assert_matches_text("hello there\n");
@@ -5120,21 +5137,23 @@ fn emit_failed_readonly_file_system() {
fn handle_invalid_path_error() {
let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
let output = deno_cmd.arg("run").arg("file://asdf").output().unwrap();
- assert!(
- String::from_utf8_lossy(&output.stderr).contains("Invalid file path.")
+ assert_contains!(
+ String::from_utf8_lossy(&output.stderr),
+ "Invalid file path."
);
let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
let output = deno_cmd.arg("run").arg("/a/b").output().unwrap();
- assert!(String::from_utf8_lossy(&output.stderr).contains("Module not found"));
+ assert_contains!(String::from_utf8_lossy(&output.stderr), "Module not found");
let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
let output = deno_cmd.arg("run").arg("//a/b").output().unwrap();
- assert!(
- String::from_utf8_lossy(&output.stderr).contains("Invalid file path.")
+ assert_contains!(
+ String::from_utf8_lossy(&output.stderr),
+ "Invalid file path."
);
let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
let output = deno_cmd.arg("run").arg("///a/b").output().unwrap();
- assert!(String::from_utf8_lossy(&output.stderr).contains("Module not found"));
+ assert_contains!(String::from_utf8_lossy(&output.stderr), "Module not found");
}
diff --git a/tests/integration/watcher_tests.rs b/tests/integration/watcher_tests.rs
index 56686cd14..122353bba 100644
--- a/tests/integration/watcher_tests.rs
+++ b/tests/integration/watcher_tests.rs
@@ -1399,6 +1399,7 @@ async fn run_watch_reload_once() {
let mut child = util::deno_cmd()
.current_dir(t.path())
.arg("run")
+ .arg("--allow-import")
.arg("--watch")
.arg("--reload")
.arg(&file_to_watch)
diff --git a/tests/specs/bench/check_local_by_default/__test__.jsonc b/tests/specs/bench/check_local_by_default/__test__.jsonc
index 76dd80b7b..42dbe57d3 100644
--- a/tests/specs/bench/check_local_by_default/__test__.jsonc
+++ b/tests/specs/bench/check_local_by_default/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "bench --quiet check_local_by_default.ts",
+ "args": "bench --allow-import --quiet check_local_by_default.ts",
"output": "check_local_by_default.out"
}
diff --git a/tests/specs/bench/check_local_by_default2/__test__.jsonc b/tests/specs/bench/check_local_by_default2/__test__.jsonc
index 5f2366d1e..7f4ca0e39 100644
--- a/tests/specs/bench/check_local_by_default2/__test__.jsonc
+++ b/tests/specs/bench/check_local_by_default2/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "bench --quiet check_local_by_default2.ts",
+ "args": "bench --allow-import --quiet check_local_by_default2.ts",
"output": "check_local_by_default2.out",
"exitCode": 1
}
diff --git a/tests/specs/cache/check_local_by_default/__test__.jsonc b/tests/specs/cache/check_local_by_default/__test__.jsonc
index e6d0829fd..e3ce115d8 100644
--- a/tests/specs/cache/check_local_by_default/__test__.jsonc
+++ b/tests/specs/cache/check_local_by_default/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "cache --quiet check_local_by_default.ts",
+ "args": "cache --quiet --allow-import check_local_by_default.ts",
"output": "check_local_by_default.out"
}
diff --git a/tests/specs/cache/check_local_by_default2/__test__.jsonc b/tests/specs/cache/check_local_by_default2/__test__.jsonc
index a9e70dcd9..36bcd6ee6 100644
--- a/tests/specs/cache/check_local_by_default2/__test__.jsonc
+++ b/tests/specs/cache/check_local_by_default2/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "cache --quiet check_local_by_default2.ts",
+ "args": "cache --quiet --allow-import check_local_by_default2.ts",
"output": "check_local_by_default2.out"
}
diff --git a/tests/specs/cache/fetch_multiple/__test__.jsonc b/tests/specs/cache/fetch_multiple/__test__.jsonc
index a5cf41113..934b65499 100644
--- a/tests/specs/cache/fetch_multiple/__test__.jsonc
+++ b/tests/specs/cache/fetch_multiple/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "cache --reload --check=all test.ts other.ts",
+ "args": "cache --reload --allow-import --check=all test.ts other.ts",
"output": "fetch_multiple.out"
}
diff --git a/tests/specs/cache/globbing/__test__.jsonc b/tests/specs/cache/globbing/__test__.jsonc
index 9bf210bb4..2dfb49ffb 100644
--- a/tests/specs/cache/globbing/__test__.jsonc
+++ b/tests/specs/cache/globbing/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "cache *.ts",
+ "args": "cache --allow-import *.ts",
"output": "Download http://localhost:4545/echo.ts\n",
"exitCode": 0
}
diff --git a/tests/specs/cache/redirect/__test__.jsonc b/tests/specs/cache/redirect/__test__.jsonc
index 251bc6174..6c0ab3c9f 100644
--- a/tests/specs/cache/redirect/__test__.jsonc
+++ b/tests/specs/cache/redirect/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "cache --reload --check=all http://localhost:4548/subdir/redirects/a.ts",
+ "args": "cache --reload --allow-import --check=all http://localhost:4548/subdir/redirects/a.ts",
"output": "redirect_cache.out"
}
diff --git a/tests/specs/cert/cafile_ts_fetch/__test__.jsonc b/tests/specs/cert/cafile_ts_fetch/__test__.jsonc
index 8ace23f25..35573839c 100644
--- a/tests/specs/cert/cafile_ts_fetch/__test__.jsonc
+++ b/tests/specs/cert/cafile_ts_fetch/__test__.jsonc
@@ -1,6 +1,6 @@
{
"steps": [{
- "args": "run --quiet --reload --allow-net --cert RootCA.pem cafile_ts_fetch.ts",
+ "args": "run --quiet --reload --allow-net --allow-import --cert RootCA.pem cafile_ts_fetch.ts",
"flaky": true,
"output": "cafile_ts_fetch.ts.out"
}, {
@@ -8,11 +8,11 @@
"flaky": true,
"output": "cafile_ts_fetch.ts.out"
}, {
- "args": "info --quiet --cert RootCA.pem https://localhost:5545/cert/cafile_info.ts",
+ "args": "info --quiet --allow-import --cert RootCA.pem https://localhost:5545/cert/cafile_info.ts",
"flaky": true,
"output": "cafile_info.ts.out"
}, {
- "args": "cache --quiet --cert RootCA.pem http://localhost:4545/cert/cafile_url_imports.ts",
+ "args": "cache --quiet --allow-import --cert RootCA.pem http://localhost:4545/cert/cafile_url_imports.ts",
"flaky": true,
"output": ""
}]
diff --git a/tests/specs/cert/cafile_url_imports/__test__.jsonc b/tests/specs/cert/cafile_url_imports/__test__.jsonc
index f52bb7068..4375f6027 100644
--- a/tests/specs/cert/cafile_url_imports/__test__.jsonc
+++ b/tests/specs/cert/cafile_url_imports/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --quiet --reload --cert RootCA.pem cafile_url_imports.ts",
+ "args": "run --quiet --reload --allow-import --cert RootCA.pem cafile_url_imports.ts",
"flaky": true,
"output": "cafile_url_imports.ts.out"
}
diff --git a/tests/specs/cert/cafile_url_imports_unsafe_ssl/__test__.jsonc b/tests/specs/cert/cafile_url_imports_unsafe_ssl/__test__.jsonc
index 526649aa1..67df193b6 100644
--- a/tests/specs/cert/cafile_url_imports_unsafe_ssl/__test__.jsonc
+++ b/tests/specs/cert/cafile_url_imports_unsafe_ssl/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --quiet --reload --unsafely-ignore-certificate-errors=localhost cafile_url_imports.ts",
+ "args": "run --quiet --allow-import --reload --unsafely-ignore-certificate-errors=localhost cafile_url_imports.ts",
"flaky": true,
"output": "cafile_url_imports_unsafe_ssl.ts.out"
}
diff --git a/tests/specs/cert/localhost_unsafe_ssl/__test__.jsonc b/tests/specs/cert/localhost_unsafe_ssl/__test__.jsonc
index 90ca827dc..f0c1895f4 100644
--- a/tests/specs/cert/localhost_unsafe_ssl/__test__.jsonc
+++ b/tests/specs/cert/localhost_unsafe_ssl/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=deno.land cafile_url_imports.ts",
+ "args": "run --quiet --reload --allow-import --allow-net --unsafely-ignore-certificate-errors=deno.land cafile_url_imports.ts",
"output": "localhost_unsafe_ssl.ts.out",
"exitCode": 1
}
diff --git a/tests/specs/check/jsx_import_source_types/__test__.jsonc b/tests/specs/check/jsx_import_source_types/__test__.jsonc
index 4cd2aa423..18ff8cd07 100644
--- a/tests/specs/check/jsx_import_source_types/__test__.jsonc
+++ b/tests/specs/check/jsx_import_source_types/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "check --all main.tsx",
+ "args": "check --allow-import --all main.tsx",
"output": "main.out"
}
diff --git a/tests/specs/check/jsx_import_source_types_config/__test__.jsonc b/tests/specs/check/jsx_import_source_types_config/__test__.jsonc
index 4cd2aa423..18ff8cd07 100644
--- a/tests/specs/check/jsx_import_source_types_config/__test__.jsonc
+++ b/tests/specs/check/jsx_import_source_types_config/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "check --all main.tsx",
+ "args": "check --allow-import --all main.tsx",
"output": "main.out"
}
diff --git a/tests/specs/check/remote_missing_override/__test__.jsonc b/tests/specs/check/remote_missing_override/__test__.jsonc
index db79e3737..9eb58dcc5 100644
--- a/tests/specs/check/remote_missing_override/__test__.jsonc
+++ b/tests/specs/check/remote_missing_override/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "check --all main.ts",
+ "args": "check --allow-import --all main.ts",
"output": "Download [WILDLINE]\nCheck [WILDLINE]\n"
}
diff --git a/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc b/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc
index 00d38bee6..3f6ea62e5 100644
--- a/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc
+++ b/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"steps": [
{
"args": "compile --unstable-kv -A --output out main.ts",
diff --git a/tests/specs/doc/types_header/__test__.jsonc b/tests/specs/doc/types_header/__test__.jsonc
index 586fca28b..2fa4c3381 100644
--- a/tests/specs/doc/types_header/__test__.jsonc
+++ b/tests/specs/doc/types_header/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "doc --reload types_header.ts",
+ "args": "doc --allow-import --reload types_header.ts",
"output": "types_header.out"
}
diff --git a/tests/specs/doc/types_header_direct/__test__.jsonc b/tests/specs/doc/types_header_direct/__test__.jsonc
index 1dc5b8069..25418655a 100644
--- a/tests/specs/doc/types_header_direct/__test__.jsonc
+++ b/tests/specs/doc/types_header_direct/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "doc --reload http://127.0.0.1:4545/xTypeScriptTypes.js",
+ "args": "doc --allow-import --reload http://127.0.0.1:4545/xTypeScriptTypes.js",
"output": "types_header.out"
}
diff --git a/tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts b/tests/specs/info/_054_info_local_imports/005_more_imports.ts
index c69556be1..c69556be1 100644
--- a/tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts
+++ b/tests/specs/info/_054_info_local_imports/005_more_imports.ts
diff --git a/tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out b/tests/specs/info/_054_info_local_imports/054_info_local_imports.out
index 388168a8b..388168a8b 100644
--- a/tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out
+++ b/tests/specs/info/_054_info_local_imports/054_info_local_imports.out
diff --git a/tests/specs/info_tests/_054_info_local_imports/__test__.jsonc b/tests/specs/info/_054_info_local_imports/__test__.jsonc
index 4bfdfe155..4bfdfe155 100644
--- a/tests/specs/info_tests/_054_info_local_imports/__test__.jsonc
+++ b/tests/specs/info/_054_info_local_imports/__test__.jsonc
diff --git a/tests/specs/info_tests/_054_info_local_imports/mod1.ts b/tests/specs/info/_054_info_local_imports/mod1.ts
index 5e58f432e..5e58f432e 100644
--- a/tests/specs/info_tests/_054_info_local_imports/mod1.ts
+++ b/tests/specs/info/_054_info_local_imports/mod1.ts
diff --git a/tests/specs/info_tests/_054_info_local_imports/mod2.ts b/tests/specs/info/_054_info_local_imports/mod2.ts
index ce1adc0e8..ce1adc0e8 100644
--- a/tests/specs/info_tests/_054_info_local_imports/mod2.ts
+++ b/tests/specs/info/_054_info_local_imports/mod2.ts
diff --git a/tests/specs/info_tests/_054_info_local_imports/print_hello.ts b/tests/specs/info/_054_info_local_imports/print_hello.ts
index b9c0ad527..b9c0ad527 100644
--- a/tests/specs/info_tests/_054_info_local_imports/print_hello.ts
+++ b/tests/specs/info/_054_info_local_imports/print_hello.ts
diff --git a/tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts b/tests/specs/info/_054_info_local_imports/subdir2/dynamic_import.ts
index 59beb64c3..59beb64c3 100644
--- a/tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts
+++ b/tests/specs/info/_054_info_local_imports/subdir2/dynamic_import.ts
diff --git a/tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts b/tests/specs/info/_054_info_local_imports/subdir2/mod2.ts
index 9071d0aeb..9071d0aeb 100644
--- a/tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts
+++ b/tests/specs/info/_054_info_local_imports/subdir2/mod2.ts
diff --git a/tests/specs/info_tests/data_null_error/__test__.jsonc b/tests/specs/info/data_null_error/__test__.jsonc
index 782cca43d..782cca43d 100644
--- a/tests/specs/info_tests/data_null_error/__test__.jsonc
+++ b/tests/specs/info/data_null_error/__test__.jsonc
diff --git a/tests/specs/info_tests/data_null_error/data_null_error/data_null_error.out b/tests/specs/info/data_null_error/data_null_error/data_null_error.out
index 065396f18..065396f18 100644
--- a/tests/specs/info_tests/data_null_error/data_null_error/data_null_error.out
+++ b/tests/specs/info/data_null_error/data_null_error/data_null_error.out
diff --git a/tests/specs/info_tests/data_null_error/data_null_error/mod.ts b/tests/specs/info/data_null_error/data_null_error/mod.ts
index 6e3e99bd4..6e3e99bd4 100644
--- a/tests/specs/info_tests/data_null_error/data_null_error/mod.ts
+++ b/tests/specs/info/data_null_error/data_null_error/mod.ts
diff --git a/tests/specs/info_tests/data_null_error/data_null_error/types.d.ts b/tests/specs/info/data_null_error/data_null_error/types.d.ts
index 6ecc85676..6ecc85676 100644
--- a/tests/specs/info_tests/data_null_error/data_null_error/types.d.ts
+++ b/tests/specs/info/data_null_error/data_null_error/types.d.ts
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc b/tests/specs/info/dynamic_imports_tmpl_lit/__test__.jsonc
index 71f823a46..71f823a46 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/__test__.jsonc
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out
index 57d730a64..57d730a64 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js
index 3bda59772..3bda59772 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json
index 0131e01e4..0131e01e4 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json
index 858a13cdd..858a13cdd 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js
index 7b2a34601..7b2a34601 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js
diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts
index 6d012e7f1..6d012e7f1 100644
--- a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts
+++ b/tests/specs/info/dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts
diff --git a/tests/specs/info_tests/info_flag/041_info_flag.out b/tests/specs/info/flag/041_info_flag.out
index 3506a29e4..3506a29e4 100644
--- a/tests/specs/info_tests/info_flag/041_info_flag.out
+++ b/tests/specs/info/flag/041_info_flag.out
diff --git a/tests/specs/info_tests/info_flag/__test__.jsonc b/tests/specs/info/flag/__test__.jsonc
index 39b50c960..39b50c960 100644
--- a/tests/specs/info_tests/info_flag/__test__.jsonc
+++ b/tests/specs/info/flag/__test__.jsonc
diff --git a/tests/specs/info_tests/info_flag_location/041_info_flag_location.out b/tests/specs/info/flag_location/041_info_flag_location.out
index b9e72f659..b9e72f659 100644
--- a/tests/specs/info_tests/info_flag_location/041_info_flag_location.out
+++ b/tests/specs/info/flag_location/041_info_flag_location.out
diff --git a/tests/specs/info_tests/info_flag_location/__test__.jsonc b/tests/specs/info/flag_location/__test__.jsonc
index 436e7cd9a..436e7cd9a 100644
--- a/tests/specs/info_tests/info_flag_location/__test__.jsonc
+++ b/tests/specs/info/flag_location/__test__.jsonc
diff --git a/tests/specs/info_tests/info_flag_script_jsx/049_info_flag_script_jsx.out b/tests/specs/info/flag_script_jsx/049_info_flag_script_jsx.out
index f49fc2356..f49fc2356 100644
--- a/tests/specs/info_tests/info_flag_script_jsx/049_info_flag_script_jsx.out
+++ b/tests/specs/info/flag_script_jsx/049_info_flag_script_jsx.out
diff --git a/tests/specs/info/flag_script_jsx/__test__.jsonc b/tests/specs/info/flag_script_jsx/__test__.jsonc
new file mode 100644
index 000000000..6b6cdc4e1
--- /dev/null
+++ b/tests/specs/info/flag_script_jsx/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "info --allow-import http://127.0.0.1:4545/run/048_media_types_jsx.ts",
+ "output": "049_info_flag_script_jsx.out"
+}
diff --git a/tests/specs/info_tests/info_import_map/__test__.jsonc b/tests/specs/info/import_map/__test__.jsonc
index 725276925..725276925 100644
--- a/tests/specs/info_tests/info_import_map/__test__.jsonc
+++ b/tests/specs/info/import_map/__test__.jsonc
diff --git a/tests/specs/info_tests/info_import_map/deno.json b/tests/specs/info/import_map/deno.json
index aaf7260c6..aaf7260c6 100644
--- a/tests/specs/info_tests/info_import_map/deno.json
+++ b/tests/specs/info/import_map/deno.json
diff --git a/tests/specs/info_tests/info_import_map/deno.lock b/tests/specs/info/import_map/deno.lock
index cb5c6ca45..cb5c6ca45 100644
--- a/tests/specs/info_tests/info_import_map/deno.lock
+++ b/tests/specs/info/import_map/deno.lock
diff --git a/tests/specs/info_tests/info_import_map/main.tsx b/tests/specs/info/import_map/main.tsx
index e38f14a58..e38f14a58 100644
--- a/tests/specs/info_tests/info_import_map/main.tsx
+++ b/tests/specs/info/import_map/main.tsx
diff --git a/tests/specs/info_tests/info_import_map/with_import_map.out b/tests/specs/info/import_map/with_import_map.out
index 29dc17737..29dc17737 100644
--- a/tests/specs/info_tests/info_import_map/with_import_map.out
+++ b/tests/specs/info/import_map/with_import_map.out
diff --git a/tests/specs/info_tests/info_json/__test__.jsonc b/tests/specs/info/json/__test__.jsonc
index 4b50dc32b..4b50dc32b 100644
--- a/tests/specs/info_tests/info_json/__test__.jsonc
+++ b/tests/specs/info/json/__test__.jsonc
diff --git a/tests/specs/info_tests/info_json/info_json.out b/tests/specs/info/json/info_json.out
index 607489ca3..607489ca3 100644
--- a/tests/specs/info_tests/info_json/info_json.out
+++ b/tests/specs/info/json/info_json.out
diff --git a/tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.out b/tests/specs/info/json_deps_order/076_info_json_deps_order.out
index 33d58da16..33d58da16 100644
--- a/tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.out
+++ b/tests/specs/info/json_deps_order/076_info_json_deps_order.out
diff --git a/tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.ts b/tests/specs/info/json_deps_order/076_info_json_deps_order.ts
index b1ae75e68..b1ae75e68 100644
--- a/tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.ts
+++ b/tests/specs/info/json_deps_order/076_info_json_deps_order.ts
diff --git a/tests/specs/info_tests/info_json_deps_order/__test__.jsonc b/tests/specs/info/json_deps_order/__test__.jsonc
index f474f4d38..f474f4d38 100644
--- a/tests/specs/info_tests/info_json_deps_order/__test__.jsonc
+++ b/tests/specs/info/json_deps_order/__test__.jsonc
diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts b/tests/specs/info/json_deps_order/recursive_imports/A.ts
index 43ecdbe5e..43ecdbe5e 100644
--- a/tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts
+++ b/tests/specs/info/json_deps_order/recursive_imports/A.ts
diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts b/tests/specs/info/json_deps_order/recursive_imports/B.ts
index 9fff0fdc9..9fff0fdc9 100644
--- a/tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts
+++ b/tests/specs/info/json_deps_order/recursive_imports/B.ts
diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts b/tests/specs/info/json_deps_order/recursive_imports/C.ts
index e47e77b41..e47e77b41 100644
--- a/tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts
+++ b/tests/specs/info/json_deps_order/recursive_imports/C.ts
diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts b/tests/specs/info/json_deps_order/recursive_imports/common.ts
index 2b16a7bf1..2b16a7bf1 100644
--- a/tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts
+++ b/tests/specs/info/json_deps_order/recursive_imports/common.ts
diff --git a/tests/specs/info_tests/json_file/__test__.jsonc b/tests/specs/info/json_file/__test__.jsonc
index 61289da94..61289da94 100644
--- a/tests/specs/info_tests/json_file/__test__.jsonc
+++ b/tests/specs/info/json_file/__test__.jsonc
diff --git a/tests/specs/info_tests/json_file/json_output/main.out b/tests/specs/info/json_file/json_output/main.out
index d4c2f234d..d4c2f234d 100644
--- a/tests/specs/info_tests/json_file/json_output/main.out
+++ b/tests/specs/info/json_file/json_output/main.out
diff --git a/tests/specs/info_tests/json_file/json_output/main.ts b/tests/specs/info/json_file/json_output/main.ts
index d9029af8a..d9029af8a 100644
--- a/tests/specs/info_tests/json_file/json_output/main.ts
+++ b/tests/specs/info/json_file/json_output/main.ts
diff --git a/tests/specs/info_tests/json_file/mod1.ts b/tests/specs/info/json_file/mod1.ts
index 5e58f432e..5e58f432e 100644
--- a/tests/specs/info_tests/json_file/mod1.ts
+++ b/tests/specs/info/json_file/mod1.ts
diff --git a/tests/specs/info_tests/json_file/mod2.ts b/tests/specs/info/json_file/mod2.ts
index ce1adc0e8..ce1adc0e8 100644
--- a/tests/specs/info_tests/json_file/mod2.ts
+++ b/tests/specs/info/json_file/mod2.ts
diff --git a/tests/specs/info_tests/json_file/print_hello.ts b/tests/specs/info/json_file/print_hello.ts
index b9c0ad527..b9c0ad527 100644
--- a/tests/specs/info_tests/json_file/print_hello.ts
+++ b/tests/specs/info/json_file/print_hello.ts
diff --git a/tests/specs/info_tests/json_file/subdir2/dynamic_import.ts b/tests/specs/info/json_file/subdir2/dynamic_import.ts
index 59beb64c3..59beb64c3 100644
--- a/tests/specs/info_tests/json_file/subdir2/dynamic_import.ts
+++ b/tests/specs/info/json_file/subdir2/dynamic_import.ts
diff --git a/tests/specs/info_tests/json_file/subdir2/mod2.ts b/tests/specs/info/json_file/subdir2/mod2.ts
index 9071d0aeb..9071d0aeb 100644
--- a/tests/specs/info_tests/json_file/subdir2/mod2.ts
+++ b/tests/specs/info/json_file/subdir2/mod2.ts
diff --git a/tests/specs/info_tests/info_json_location/__test__.jsonc b/tests/specs/info/json_location/__test__.jsonc
index 0c1acc3d9..0c1acc3d9 100644
--- a/tests/specs/info_tests/info_json_location/__test__.jsonc
+++ b/tests/specs/info/json_location/__test__.jsonc
diff --git a/tests/specs/info_tests/info_json_location/info_json_location.out b/tests/specs/info/json_location/info_json_location.out
index 004bf03db..004bf03db 100644
--- a/tests/specs/info_tests/info_json_location/info_json_location.out
+++ b/tests/specs/info/json_location/info_json_location.out
diff --git a/tests/specs/info_tests/info_missing_module/__test__.jsonc b/tests/specs/info/missing_module/__test__.jsonc
index edc151972..edc151972 100644
--- a/tests/specs/info_tests/info_missing_module/__test__.jsonc
+++ b/tests/specs/info/missing_module/__test__.jsonc
diff --git a/tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js b/tests/specs/info/missing_module/error_009_missing_js_module.js
index e6ca88934..e6ca88934 100644
--- a/tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js
+++ b/tests/specs/info/missing_module/error_009_missing_js_module.js
diff --git a/tests/specs/info_tests/info_missing_module/info_missing_module.out b/tests/specs/info/missing_module/info_missing_module.out
index c62d690c1..c62d690c1 100644
--- a/tests/specs/info_tests/info_missing_module/info_missing_module.out
+++ b/tests/specs/info/missing_module/info_missing_module.out
diff --git a/tests/specs/info/multiple_imports/__test__.jsonc b/tests/specs/info/multiple_imports/__test__.jsonc
new file mode 100644
index 000000000..32d72bcb3
--- /dev/null
+++ b/tests/specs/info/multiple_imports/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "info --allow-import http://127.0.0.1:4545/run/019_media_types.ts",
+ "output": "multiple_imports.out"
+}
diff --git a/tests/specs/info_tests/multiple_imports/multiple_imports.out b/tests/specs/info/multiple_imports/multiple_imports.out
index cb13318ca..cb13318ca 100644
--- a/tests/specs/info_tests/multiple_imports/multiple_imports.out
+++ b/tests/specs/info/multiple_imports/multiple_imports.out
diff --git a/tests/specs/info/multiple_redirects/__test__.jsonc b/tests/specs/info/multiple_redirects/__test__.jsonc
index 0e1808e0a..205d21c13 100644
--- a/tests/specs/info/multiple_redirects/__test__.jsonc
+++ b/tests/specs/info/multiple_redirects/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "info --json main.ts",
+ "args": "info --allow-import --json main.ts",
"output": "main.out"
}
diff --git a/tests/specs/info_tests/info_recursive_modules/__test__.jsonc b/tests/specs/info/recursive_modules/__test__.jsonc
index c4313a2fb..c4313a2fb 100644
--- a/tests/specs/info_tests/info_recursive_modules/__test__.jsonc
+++ b/tests/specs/info/recursive_modules/__test__.jsonc
diff --git a/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.out b/tests/specs/info/recursive_modules/info_recursive_imports_test.out
index 3340f3859..3340f3859 100644
--- a/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.out
+++ b/tests/specs/info/recursive_modules/info_recursive_imports_test.out
diff --git a/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts b/tests/specs/info/recursive_modules/info_recursive_imports_test.ts
index c9ba44755..c9ba44755 100644
--- a/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts
+++ b/tests/specs/info/recursive_modules/info_recursive_imports_test.ts
diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts b/tests/specs/info/recursive_modules/recursive_imports/A.ts
index 43ecdbe5e..43ecdbe5e 100644
--- a/tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts
+++ b/tests/specs/info/recursive_modules/recursive_imports/A.ts
diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts b/tests/specs/info/recursive_modules/recursive_imports/B.ts
index 9fff0fdc9..9fff0fdc9 100644
--- a/tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts
+++ b/tests/specs/info/recursive_modules/recursive_imports/B.ts
diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts b/tests/specs/info/recursive_modules/recursive_imports/C.ts
index e47e77b41..e47e77b41 100644
--- a/tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts
+++ b/tests/specs/info/recursive_modules/recursive_imports/C.ts
diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts b/tests/specs/info/recursive_modules/recursive_imports/common.ts
index 2b16a7bf1..2b16a7bf1 100644
--- a/tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts
+++ b/tests/specs/info/recursive_modules/recursive_imports/common.ts
diff --git a/tests/specs/info_tests/info_type_import/__test__.jsonc b/tests/specs/info/type_import/__test__.jsonc
index 2092ecf08..2092ecf08 100644
--- a/tests/specs/info_tests/info_type_import/__test__.jsonc
+++ b/tests/specs/info/type_import/__test__.jsonc
diff --git a/tests/specs/info_tests/info_type_import/info_type_import.out b/tests/specs/info/type_import/info_type_import.out
index 0423efe82..0423efe82 100644
--- a/tests/specs/info_tests/info_type_import/info_type_import.out
+++ b/tests/specs/info/type_import/info_type_import.out
diff --git a/tests/specs/info_tests/info_type_import/info_type_import.ts b/tests/specs/info/type_import/info_type_import.ts
index 5d8ca21ce..5d8ca21ce 100644
--- a/tests/specs/info_tests/info_type_import/info_type_import.ts
+++ b/tests/specs/info/type_import/info_type_import.ts
diff --git a/tests/specs/info_tests/info_type_import/type_and_code.ts b/tests/specs/info/type_import/type_and_code.ts
index b14713419..b14713419 100644
--- a/tests/specs/info_tests/info_type_import/type_and_code.ts
+++ b/tests/specs/info/type_import/type_and_code.ts
diff --git a/tests/specs/info/types_header_direct/__test__.jsonc b/tests/specs/info/types_header_direct/__test__.jsonc
new file mode 100644
index 000000000..df0c1e573
--- /dev/null
+++ b/tests/specs/info/types_header_direct/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "info --allow-import --reload type_directives_01.ts",
+ "output": "types_header.out"
+}
diff --git a/tests/specs/info_tests/types_header_direct/type_directives_01.ts b/tests/specs/info/types_header_direct/type_directives_01.ts
index 71305824c..71305824c 100644
--- a/tests/specs/info_tests/types_header_direct/type_directives_01.ts
+++ b/tests/specs/info/types_header_direct/type_directives_01.ts
diff --git a/tests/specs/info_tests/types_header_direct/types_header.out b/tests/specs/info/types_header_direct/types_header.out
index 722e02f77..722e02f77 100644
--- a/tests/specs/info_tests/types_header_direct/types_header.out
+++ b/tests/specs/info/types_header_direct/types_header.out
diff --git a/tests/specs/info_tests/with_config_override/__test__.jsonc b/tests/specs/info/with_config_override/__test__.jsonc
index 02c7d2a78..02c7d2a78 100644
--- a/tests/specs/info_tests/with_config_override/__test__.jsonc
+++ b/tests/specs/info/with_config_override/__test__.jsonc
diff --git a/tests/specs/info_tests/with_config_override/with_config/deno-override.json b/tests/specs/info/with_config_override/with_config/deno-override.json
index ee44ba947..ee44ba947 100644
--- a/tests/specs/info_tests/with_config_override/with_config/deno-override.json
+++ b/tests/specs/info/with_config_override/with_config/deno-override.json
diff --git a/tests/specs/info_tests/with_config_override/with_config/deno.json b/tests/specs/info/with_config_override/with_config/deno.json
index 0967ef424..0967ef424 100644
--- a/tests/specs/info_tests/with_config_override/with_config/deno.json
+++ b/tests/specs/info/with_config_override/with_config/deno.json
diff --git a/tests/specs/info_tests/with_config_override/with_config/import_map.json b/tests/specs/info/with_config_override/with_config/import_map.json
index 0967ef424..0967ef424 100644
--- a/tests/specs/info_tests/with_config_override/with_config/import_map.json
+++ b/tests/specs/info/with_config_override/with_config/import_map.json
diff --git a/tests/specs/info_tests/with_config_override/with_config/test.ts b/tests/specs/info/with_config_override/with_config/test.ts
index 85ce559e8..85ce559e8 100644
--- a/tests/specs/info_tests/with_config_override/with_config/test.ts
+++ b/tests/specs/info/with_config_override/with_config/test.ts
diff --git a/tests/specs/info_tests/with_config_override/with_config/with_config.out b/tests/specs/info/with_config_override/with_config/with_config.out
index 95a1f30bc..95a1f30bc 100644
--- a/tests/specs/info_tests/with_config_override/with_config/with_config.out
+++ b/tests/specs/info/with_config_override/with_config/with_config.out
diff --git a/tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc b/tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc
deleted file mode 100644
index b8dc305ae..000000000
--- a/tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "args": "info http://127.0.0.1:4545/run/048_media_types_jsx.ts",
- "output": "049_info_flag_script_jsx.out"
-}
diff --git a/tests/specs/info_tests/multiple_imports/__test__.jsonc b/tests/specs/info_tests/multiple_imports/__test__.jsonc
deleted file mode 100644
index b110b2d4c..000000000
--- a/tests/specs/info_tests/multiple_imports/__test__.jsonc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "args": "info http://127.0.0.1:4545/run/019_media_types.ts",
- "output": "multiple_imports.out"
-}
diff --git a/tests/specs/info_tests/types_header_direct/__test__.jsonc b/tests/specs/info_tests/types_header_direct/__test__.jsonc
deleted file mode 100644
index 7f9b462ef..000000000
--- a/tests/specs/info_tests/types_header_direct/__test__.jsonc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "args": "info --reload type_directives_01.ts",
- "output": "types_header.out"
-}
diff --git a/tests/specs/install/future_install_local_deno/__test__.jsonc b/tests/specs/install/future_install_local_deno/__test__.jsonc
index bbfee2d9d..d257fbc1f 100644
--- a/tests/specs/install/future_install_local_deno/__test__.jsonc
+++ b/tests/specs/install/future_install_local_deno/__test__.jsonc
@@ -2,12 +2,12 @@
"tempDir": true,
"steps": [
{
- "args": "install",
+ "args": "install --allow-import",
"output": "install.out"
},
{
// ensure deps are actually cached
- "args": "run --cached-only main.js",
+ "args": "run --cached-only --allow-import main.js",
"output": ""
},
{
diff --git a/tests/specs/lockfile/adding_redirect/__test__.jsonc b/tests/specs/lockfile/adding_redirect/__test__.jsonc
index d53beedbd..75933a6b4 100644
--- a/tests/specs/lockfile/adding_redirect/__test__.jsonc
+++ b/tests/specs/lockfile/adding_redirect/__test__.jsonc
@@ -1,13 +1,13 @@
{
"tempDir": true,
"steps": [{
- "args": "run 1.ts",
+ "args": "run --allow-import 1.ts",
"output": "[WILDCARD]"
}, {
"args": "task --quiet cat deno.lock",
"output": "lock01.out"
}, {
- "args": "run 2.ts",
+ "args": "run --allow-import 2.ts",
"output": "[WILDCARD]"
}, {
"args": "task --quiet cat deno.lock",
diff --git a/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc b/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
index 50213381a..27f6d9787 100644
--- a/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
+++ b/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run main.ts",
+ "args": "run --allow-import main.ts",
"output": "main.out",
"exitCode": 10
}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc b/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
index 65679a1c8..651ed113d 100644
--- a/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
+++ b/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
@@ -1,12 +1,12 @@
{
"tests": {
"true": {
- "args": "run --config=true.json main.ts",
+ "args": "run --allow-import --config=true.json main.ts",
"output": "true.main.out",
"exitCode": 10
},
"false": {
- "args": "run --config=false.json main.ts",
+ "args": "run --allow-import --config=false.json main.ts",
"output": "false.main.out"
}
}
diff --git a/tests/specs/lockfile/config_file_lock_path/__test__.jsonc b/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
index defb113b3..5c901e709 100644
--- a/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
+++ b/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
@@ -1,12 +1,12 @@
{
"tests": {
"error_bad_checksum": {
- "args": "run --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
+ "args": "run --allow-import --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
"output": "config_file_lock_path.out",
"exitCode": 10
},
"lock_flag_override": {
- "args": "run --lock=run/lock_check_ok2.json --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
+ "args": "run --allow-import --lock=run/lock_check_ok2.json --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
"output": "019_media_types.ts.out"
}
}
diff --git a/tests/specs/lockfile/frozen_lockfile/__test__.jsonc b/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
index 36a1fc71e..8179052e1 100644
--- a/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
+++ b/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
@@ -180,7 +180,7 @@
"output": "[WILDCARD]"
},
{
- "args": "run --frozen --allow-net http-dynamic.ts",
+ "args": "run --frozen --allow-import http-dynamic.ts",
"output": "frozen_new_dep_dynamic_http.out",
"exitCode": 1
}
diff --git a/tests/specs/lockfile/no_declaration_files/__test__.jsonc b/tests/specs/lockfile/no_declaration_files/__test__.jsonc
index 3238416b0..3c8282825 100644
--- a/tests/specs/lockfile/no_declaration_files/__test__.jsonc
+++ b/tests/specs/lockfile/no_declaration_files/__test__.jsonc
@@ -1,7 +1,7 @@
{
"tempDir": true,
"steps": [{
- "args": "cache --lock --frozen=false main.ts",
+ "args": "cache --allow-import --lock --frozen=false main.ts",
"output": "main.cache.out"
}, {
"args": [
diff --git a/tests/specs/lockfile/no_lock/__test__.jsonc b/tests/specs/lockfile/no_lock/__test__.jsonc
index 75821ac64..d8172a7ca 100644
--- a/tests/specs/lockfile/no_lock/__test__.jsonc
+++ b/tests/specs/lockfile/no_lock/__test__.jsonc
@@ -1,39 +1,39 @@
{
"tests": {
"info": {
- "args": "info main.ts",
+ "args": "info --allow-import main.ts",
"output": "fail.out",
"exitCode": 10
},
"info_no_lock": {
- "args": "info --no-lock main.ts",
+ "args": "info --allow-import --no-lock main.ts",
"output": "info.nolock.out"
},
"bench": {
- "args": "bench",
+ "args": "bench --allow-import",
"output": "fail.out",
"exitCode": 10
},
"bench_no_lock": {
- "args": "bench --no-lock",
+ "args": "bench --allow-import --no-lock",
"output": "bench.nolock.out"
},
"doc": {
- "args": "doc main.ts",
+ "args": "doc --allow-import main.ts",
"exitCode": 10,
"output": "fail.out"
},
"doc_no_lock": {
- "args": "doc --no-lock main.ts",
+ "args": "doc --allow-import --no-lock main.ts",
"output": "doc.nolock.out"
},
"test": {
- "args": "test",
+ "args": "test --allow-import",
"exitCode": 10,
"output": "fail.out"
},
"test_no_lock": {
- "args": "test --no-lock",
+ "args": "test --allow-import --no-lock",
"output": "test.nolock.out"
}
}
diff --git a/tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc b/tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc
index 0f3b33300..0f3b33300 100644
--- a/tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc
+++ b/tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc
diff --git a/tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out b/tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out
index 740ef6ffb..740ef6ffb 100644
--- a/tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out
+++ b/tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out
diff --git a/tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts b/tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts
index a4c87f27e..a4c87f27e 100644
--- a/tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts
+++ b/tests/specs/node/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts
diff --git a/tests/specs/node_compat_tests/node_test_module/__test__.jsonc b/tests/specs/node/node_test_module/__test__.jsonc
index ef93b6673..ef93b6673 100644
--- a/tests/specs/node_compat_tests/node_test_module/__test__.jsonc
+++ b/tests/specs/node/node_test_module/__test__.jsonc
diff --git a/tests/specs/node_compat_tests/node_test_module/test.js b/tests/specs/node/node_test_module/test.js
index 0f0f9b6b6..0f0f9b6b6 100644
--- a/tests/specs/node_compat_tests/node_test_module/test.js
+++ b/tests/specs/node/node_test_module/test.js
diff --git a/tests/specs/node_compat_tests/node_test_module/test.out b/tests/specs/node/node_test_module/test.out
index c37fb355f..c37fb355f 100644
--- a/tests/specs/node_compat_tests/node_test_module/test.out
+++ b/tests/specs/node/node_test_module/test.out
diff --git a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/__test__.jsonc b/tests/specs/node/node_test_module_no_sanitizers/__test__.jsonc
index 0a9a9524b..0a9a9524b 100644
--- a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/__test__.jsonc
+++ b/tests/specs/node/node_test_module_no_sanitizers/__test__.jsonc
diff --git a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts
index 62c82ebca..62c82ebca 100644
--- a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts
+++ b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts
diff --git a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.js b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/test.js
index 52d0f1325..52d0f1325 100644
--- a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.js
+++ b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/test.js
diff --git a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.out b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/test.out
index dc5ab7cfd..dc5ab7cfd 100644
--- a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.out
+++ b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/test.out
diff --git a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts
index f983ca89b..f983ca89b 100644
--- a/tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts
+++ b/tests/specs/node/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts
diff --git a/tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/__test__.jsonc b/tests/specs/node/web_node_events_dispatched_in_correct_order/__test__.jsonc
index cb5e48878..cb5e48878 100644
--- a/tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/__test__.jsonc
+++ b/tests/specs/node/web_node_events_dispatched_in_correct_order/__test__.jsonc
diff --git a/tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.out b/tests/specs/node/web_node_events_dispatched_in_correct_order/events_order.out
index 270384d8d..270384d8d 100644
--- a/tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.out
+++ b/tests/specs/node/web_node_events_dispatched_in_correct_order/events_order.out
diff --git a/tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.ts b/tests/specs/node/web_node_events_dispatched_in_correct_order/events_order.ts
index 263f46b4c..263f46b4c 100644
--- a/tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.ts
+++ b/tests/specs/node/web_node_events_dispatched_in_correct_order/events_order.ts
diff --git a/tests/specs/npm_tests/builtin_module_module/__test__.jsonc b/tests/specs/npm/builtin_module_module/__test__.jsonc
index 2f26a95d4..2f26a95d4 100644
--- a/tests/specs/npm_tests/builtin_module_module/__test__.jsonc
+++ b/tests/specs/npm/builtin_module_module/__test__.jsonc
diff --git a/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js b/tests/specs/npm/builtin_module_module/builtin_module_module/main.js
index 9a036791b..9a036791b 100644
--- a/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js
+++ b/tests/specs/npm/builtin_module_module/builtin_module_module/main.js
diff --git a/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out b/tests/specs/npm/builtin_module_module/builtin_module_module/main.out
index 160ba6503..160ba6503 100644
--- a/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out
+++ b/tests/specs/npm/builtin_module_module/builtin_module_module/main.out
diff --git a/tests/specs/npm_tests/cached_only/__test__.jsonc b/tests/specs/npm/cached_only/__test__.jsonc
index 764f702d2..764f702d2 100644
--- a/tests/specs/npm_tests/cached_only/__test__.jsonc
+++ b/tests/specs/npm/cached_only/__test__.jsonc
diff --git a/tests/specs/npm_tests/cached_only/cached_only/main.out b/tests/specs/npm/cached_only/cached_only/main.out
index 31113eef3..0d0cdad09 100644
--- a/tests/specs/npm_tests/cached_only/cached_only/main.out
+++ b/tests/specs/npm/cached_only/cached_only/main.out
@@ -1,2 +1,2 @@
error: Error getting response at http://localhost:4260/chalk for package "chalk": An npm specifier not found in cache: "chalk", --cached-only is specified.
- at file:///[WILDCARD]/specs/npm_tests/cached_only/cached_only/main.ts:1:19
+ at file:///[WILDCARD]/main.ts:1:19
diff --git a/tests/specs/npm_tests/cached_only/cached_only/main.ts b/tests/specs/npm/cached_only/cached_only/main.ts
index 1ccc441a1..1ccc441a1 100644
--- a/tests/specs/npm_tests/cached_only/cached_only/main.ts
+++ b/tests/specs/npm/cached_only/cached_only/main.ts
diff --git a/tests/specs/npm_tests/check_all/__test__.jsonc b/tests/specs/npm/check_all/__test__.jsonc
index 427524305..427524305 100644
--- a/tests/specs/npm_tests/check_all/__test__.jsonc
+++ b/tests/specs/npm/check_all/__test__.jsonc
diff --git a/tests/specs/npm_tests/check_all/check_errors/main.ts b/tests/specs/npm/check_all/check_errors/main.ts
index 4b8684195..4b8684195 100644
--- a/tests/specs/npm_tests/check_all/check_errors/main.ts
+++ b/tests/specs/npm/check_all/check_errors/main.ts
diff --git a/tests/specs/npm_tests/check_all/check_errors/main_all.out b/tests/specs/npm/check_all/check_errors/main_all.out
index 4c624c0ea..4c624c0ea 100644
--- a/tests/specs/npm_tests/check_all/check_errors/main_all.out
+++ b/tests/specs/npm/check_all/check_errors/main_all.out
diff --git a/tests/specs/npm_tests/check_all/check_errors/main_local.out b/tests/specs/npm/check_all/check_errors/main_local.out
index 4d3a892e7..4d3a892e7 100644
--- a/tests/specs/npm_tests/check_all/check_errors/main_local.out
+++ b/tests/specs/npm/check_all/check_errors/main_local.out
diff --git a/tests/specs/npm_tests/check_local/__test__.jsonc b/tests/specs/npm/check_local/__test__.jsonc
index 1bffa5eed..1bffa5eed 100644
--- a/tests/specs/npm_tests/check_local/__test__.jsonc
+++ b/tests/specs/npm/check_local/__test__.jsonc
diff --git a/tests/specs/npm_tests/check_local/check_errors/main.ts b/tests/specs/npm/check_local/check_errors/main.ts
index 4b8684195..4b8684195 100644
--- a/tests/specs/npm_tests/check_local/check_errors/main.ts
+++ b/tests/specs/npm/check_local/check_errors/main.ts
diff --git a/tests/specs/npm_tests/check_local/check_errors/main_all.out b/tests/specs/npm/check_local/check_errors/main_all.out
index 4c624c0ea..4c624c0ea 100644
--- a/tests/specs/npm_tests/check_local/check_errors/main_all.out
+++ b/tests/specs/npm/check_local/check_errors/main_all.out
diff --git a/tests/specs/npm_tests/check_local/check_errors/main_local.out b/tests/specs/npm/check_local/check_errors/main_local.out
index 1a150b5e6..1a150b5e6 100644
--- a/tests/specs/npm_tests/check_local/check_errors/main_local.out
+++ b/tests/specs/npm/check_local/check_errors/main_local.out
diff --git a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc b/tests/specs/npm/check_package_file_dts_dmts_dcts/__test__.jsonc
index 675051a69..675051a69 100644
--- a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc
+++ b/tests/specs/npm/check_package_file_dts_dmts_dcts/__test__.jsonc
diff --git a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out b/tests/specs/npm/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out
index 507d2c2f7..507d2c2f7 100644
--- a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out
+++ b/tests/specs/npm/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out
diff --git a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts b/tests/specs/npm/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts
index 63686e2d3..63686e2d3 100644
--- a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts
+++ b/tests/specs/npm/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts
diff --git a/tests/specs/npm_tests/child_process_fork_test/__test__.jsonc b/tests/specs/npm/child_process_fork_test/__test__.jsonc
index f83cb051e..f83cb051e 100644
--- a/tests/specs/npm_tests/child_process_fork_test/__test__.jsonc
+++ b/tests/specs/npm/child_process_fork_test/__test__.jsonc
diff --git a/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out b/tests/specs/npm/child_process_fork_test/child_process_fork_test/main.out
index d5bc57741..d5bc57741 100644
--- a/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out
+++ b/tests/specs/npm/child_process_fork_test/child_process_fork_test/main.out
diff --git a/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts b/tests/specs/npm/child_process_fork_test/child_process_fork_test/main.ts
index e560edb7e..e560edb7e 100644
--- a/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts
+++ b/tests/specs/npm/child_process_fork_test/child_process_fork_test/main.ts
diff --git a/tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc b/tests/specs/npm/cjs_invalid_name_exports/__test__.jsonc
index a38b8d035..a38b8d035 100644
--- a/tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc
+++ b/tests/specs/npm/cjs_invalid_name_exports/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out b/tests/specs/npm/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out
index 45ec15d0e..45ec15d0e 100644
--- a/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out
+++ b/tests/specs/npm/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out
diff --git a/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts b/tests/specs/npm/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts
index 9bdf0e43b..9bdf0e43b 100644
--- a/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts
+++ b/tests/specs/npm/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts
diff --git a/tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc b/tests/specs/npm/cjs_local_global_decls/__test__.jsonc
index 8bf847873..8bf847873 100644
--- a/tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc
+++ b/tests/specs/npm/cjs_local_global_decls/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out b/tests/specs/npm/cjs_local_global_decls/cjs_local_global_decls/main.out
index 5e7a36c8d..5e7a36c8d 100644
--- a/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out
+++ b/tests/specs/npm/cjs_local_global_decls/cjs_local_global_decls/main.out
diff --git a/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts b/tests/specs/npm/cjs_local_global_decls/cjs_local_global_decls/main.ts
index 04074057b..04074057b 100644
--- a/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts
+++ b/tests/specs/npm/cjs_local_global_decls/cjs_local_global_decls/main.ts
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc b/tests/specs/npm/cjs_module_export_assignment/__test__.jsonc
index e9be6361a..e9be6361a 100644
--- a/tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc
+++ b/tests/specs/npm/cjs_module_export_assignment/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out b/tests/specs/npm/cjs_module_export_assignment/cjs_module_export_assignment/main.out
index dea185e38..dea185e38 100644
--- a/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out
+++ b/tests/specs/npm/cjs_module_export_assignment/cjs_module_export_assignment/main.out
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts b/tests/specs/npm/cjs_module_export_assignment/cjs_module_export_assignment/main.ts
index 93d3db1c3..93d3db1c3 100644
--- a/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts
+++ b/tests/specs/npm/cjs_module_export_assignment/cjs_module_export_assignment/main.ts
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc b/tests/specs/npm/cjs_module_export_assignment_number/__test__.jsonc
index d70f82e50..d70f82e50 100644
--- a/tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc
+++ b/tests/specs/npm/cjs_module_export_assignment_number/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out b/tests/specs/npm/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out
index e559775cf..e559775cf 100644
--- a/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out
+++ b/tests/specs/npm/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts b/tests/specs/npm/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts
index aee24bf19..aee24bf19 100644
--- a/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts
+++ b/tests/specs/npm/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts
diff --git a/tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc b/tests/specs/npm/cjs_pkg_imports/__test__.jsonc
index c51f14b56..c51f14b56 100644
--- a/tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc
+++ b/tests/specs/npm/cjs_pkg_imports/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out b/tests/specs/npm/cjs_pkg_imports/cjs_pkg_imports/main.out
index 661146bd0..661146bd0 100644
--- a/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out
+++ b/tests/specs/npm/cjs_pkg_imports/cjs_pkg_imports/main.out
diff --git a/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts b/tests/specs/npm/cjs_pkg_imports/cjs_pkg_imports/main.ts
index b30a3f85c..b30a3f85c 100644
--- a/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts
+++ b/tests/specs/npm/cjs_pkg_imports/cjs_pkg_imports/main.ts
diff --git a/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc b/tests/specs/npm/cjs_reexport_collision/__test__.jsonc
index 0b9d1e621..0b9d1e621 100644
--- a/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc
+++ b/tests/specs/npm/cjs_reexport_collision/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out b/tests/specs/npm/cjs_reexport_collision/cjs_reexport_collision/main.out
index ed3193f8d..ed3193f8d 100644
--- a/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out
+++ b/tests/specs/npm/cjs_reexport_collision/cjs_reexport_collision/main.out
diff --git a/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts b/tests/specs/npm/cjs_reexport_collision/cjs_reexport_collision/main.ts
index 4bfcd89b1..4bfcd89b1 100644
--- a/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts
+++ b/tests/specs/npm/cjs_reexport_collision/cjs_reexport_collision/main.ts
diff --git a/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc b/tests/specs/npm/cjs_require_esm/__test__.jsonc
index 172f1ca65..172f1ca65 100644
--- a/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc
+++ b/tests/specs/npm/cjs_require_esm/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out b/tests/specs/npm/cjs_require_esm/cjs_require_esm/main.out
index 4afceccc9..4afceccc9 100644
--- a/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out
+++ b/tests/specs/npm/cjs_require_esm/cjs_require_esm/main.out
diff --git a/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts b/tests/specs/npm/cjs_require_esm/cjs_require_esm/main.ts
index 069d4b60e..069d4b60e 100644
--- a/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts
+++ b/tests/specs/npm/cjs_require_esm/cjs_require_esm/main.ts
diff --git a/tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc b/tests/specs/npm/cjs_require_esm_mjs/__test__.jsonc
index 3a1323127..3a1323127 100644
--- a/tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc
+++ b/tests/specs/npm/cjs_require_esm_mjs/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out b/tests/specs/npm/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out
index 4afceccc9..4afceccc9 100644
--- a/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out
+++ b/tests/specs/npm/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out
diff --git a/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts b/tests/specs/npm/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts
index d753c2a83..d753c2a83 100644
--- a/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts
+++ b/tests/specs/npm/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts
diff --git a/tests/specs/npm_tests/cjs_sub_path/__test__.jsonc b/tests/specs/npm/cjs_sub_path/__test__.jsonc
index dbec76a13..dbec76a13 100644
--- a/tests/specs/npm_tests/cjs_sub_path/__test__.jsonc
+++ b/tests/specs/npm/cjs_sub_path/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js b/tests/specs/npm/cjs_sub_path/cjs_sub_path/main.js
index b71360959..b71360959 100644
--- a/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js
+++ b/tests/specs/npm/cjs_sub_path/cjs_sub_path/main.js
diff --git a/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out b/tests/specs/npm/cjs_sub_path/cjs_sub_path/main.out
index 868733775..868733775 100644
--- a/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out
+++ b/tests/specs/npm/cjs_sub_path/cjs_sub_path/main.out
diff --git a/tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc b/tests/specs/npm/cjs_this_in_exports/__test__.jsonc
index 251691ca8..251691ca8 100644
--- a/tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc
+++ b/tests/specs/npm/cjs_this_in_exports/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js b/tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.js
index 03aaabe05..03aaabe05 100644
--- a/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js
+++ b/tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.js
diff --git a/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out b/tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.out
index 9517015ae..88c18dbe4 100644
--- a/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out
+++ b/tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.out
@@ -2,4 +2,4 @@
1
error: Uncaught (in promise) TypeError: this.otherMethod is not a function
at getValue (file://[WILDCARD]/@denotest/cjs-this-in-exports/1.0.0/index.js:3:17)
- at file://[WILDCARD]/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js:11:1
+ at file://[WILDCARD]/main.js:11:1
diff --git a/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc b/tests/specs/npm/cjs_with_deps/__test__.jsonc
index d9014f102..d9014f102 100644
--- a/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc
+++ b/tests/specs/npm/cjs_with_deps/__test__.jsonc
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js
index 568726874..568726874 100644
--- a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js
+++ b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out
index 7051c2395..7051c2395 100644
--- a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out
+++ b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out
index 8e37c88eb..8e37c88eb 100644
--- a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out
+++ b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out
index af1ef1351..af1ef1351 100644
--- a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out
index 1ab367952..1ab367952 100644
--- a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out
+++ b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out
diff --git a/tests/specs/npm_tests/compare_globals/__test__.jsonc b/tests/specs/npm/compare_globals/__test__.jsonc
index d86a76dbc..d86a76dbc 100644
--- a/tests/specs/npm_tests/compare_globals/__test__.jsonc
+++ b/tests/specs/npm/compare_globals/__test__.jsonc
diff --git a/tests/specs/npm_tests/compare_globals/compare_globals/main.out b/tests/specs/npm/compare_globals/compare_globals/main.out
index a1b0a566d..a1b0a566d 100644
--- a/tests/specs/npm_tests/compare_globals/compare_globals/main.out
+++ b/tests/specs/npm/compare_globals/compare_globals/main.out
diff --git a/tests/specs/npm_tests/compare_globals/compare_globals/main.ts b/tests/specs/npm/compare_globals/compare_globals/main.ts
index 9482798d8..9482798d8 100644
--- a/tests/specs/npm_tests/compare_globals/compare_globals/main.ts
+++ b/tests/specs/npm/compare_globals/compare_globals/main.ts
diff --git a/tests/specs/npm_tests/create_require/__test__.jsonc b/tests/specs/npm/create_require/__test__.jsonc
index 40d9ce066..40d9ce066 100644
--- a/tests/specs/npm_tests/create_require/__test__.jsonc
+++ b/tests/specs/npm/create_require/__test__.jsonc
diff --git a/tests/specs/npm_tests/create_require/create_require/main.out b/tests/specs/npm/create_require/create_require/main.out
index 70b0415b3..70b0415b3 100644
--- a/tests/specs/npm_tests/create_require/create_require/main.out
+++ b/tests/specs/npm/create_require/create_require/main.out
diff --git a/tests/specs/npm_tests/create_require/create_require/main.ts b/tests/specs/npm/create_require/create_require/main.ts
index 625c734aa..625c734aa 100644
--- a/tests/specs/npm_tests/create_require/create_require/main.ts
+++ b/tests/specs/npm/create_require/create_require/main.ts
diff --git a/tests/specs/npm_tests/deno_cache/__test__.jsonc b/tests/specs/npm/deno_cache/__test__.jsonc
index 93b204c03..93b204c03 100644
--- a/tests/specs/npm_tests/deno_cache/__test__.jsonc
+++ b/tests/specs/npm/deno_cache/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_cache/deno_cache.out b/tests/specs/npm/deno_cache/deno_cache.out
index d723293a8..d723293a8 100644
--- a/tests/specs/npm_tests/deno_cache/deno_cache.out
+++ b/tests/specs/npm/deno_cache/deno_cache.out
diff --git a/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc b/tests/specs/npm/deno_run_bin_cjs/__test__.jsonc
index 9eb8e9bfe..9eb8e9bfe 100644
--- a/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc
+++ b/tests/specs/npm/deno_run_bin_cjs/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out b/tests/specs/npm/deno_run_bin_cjs/deno_run_cjs.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out
+++ b/tests/specs/npm/deno_run_bin_cjs/deno_run_cjs.out
diff --git a/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc
index 6ee5a326b..6ee5a326b 100644
--- a/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc
+++ b/tests/specs/npm/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out b/tests/specs/npm/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out
+++ b/tests/specs/npm/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out
diff --git a/tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc b/tests/specs/npm/deno_run_bin_esm/__test__.jsonc
index fc48451bb..fc48451bb 100644
--- a/tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc
+++ b/tests/specs/npm/deno_run_bin_esm/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out b/tests/specs/npm/deno_run_bin_esm/deno_run_esm.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out
+++ b/tests/specs/npm/deno_run_bin_esm/deno_run_esm.out
diff --git a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc
index 956755b30..956755b30 100644
--- a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc
+++ b/tests/specs/npm/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out b/tests/specs/npm/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out
+++ b/tests/specs/npm/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out
diff --git a/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc b/tests/specs/npm/deno_run_bin_no_ext/__test__.jsonc
index 71877b399..71877b399 100644
--- a/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc
+++ b/tests/specs/npm/deno_run_bin_no_ext/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out b/tests/specs/npm/deno_run_bin_no_ext/deno_run_no_ext.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out
+++ b/tests/specs/npm/deno_run_bin_no_ext/deno_run_no_ext.out
diff --git a/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc b/tests/specs/npm/deno_run_bin_special_chars/__test__.jsonc
index c3e14c0b7..c3e14c0b7 100644
--- a/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc
+++ b/tests/specs/npm/deno_run_bin_special_chars/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out b/tests/specs/npm/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out
+++ b/tests/specs/npm/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out
diff --git a/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc b/tests/specs/npm/deno_run_cowsay/__test__.jsonc
index 0015b88be..0015b88be 100644
--- a/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc
+++ b/tests/specs/npm/deno_run_cowsay/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out b/tests/specs/npm/deno_run_cowsay/deno_run_cowsay.out
index 46de82730..46de82730 100644
--- a/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out
+++ b/tests/specs/npm/deno_run_cowsay/deno_run_cowsay.out
diff --git a/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc b/tests/specs/npm/deno_run_cowsay_explicit/__test__.jsonc
index 1ecce925e..1ecce925e 100644
--- a/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc
+++ b/tests/specs/npm/deno_run_cowsay_explicit/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out b/tests/specs/npm/deno_run_cowsay_explicit/deno_run_cowsay.out
index 46de82730..46de82730 100644
--- a/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out
+++ b/tests/specs/npm/deno_run_cowsay_explicit/deno_run_cowsay.out
diff --git a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc b/tests/specs/npm/deno_run_cowsay_with_node_modules_dir/__test__.jsonc
index 8671ed1fe..d2c95f072 100644
--- a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc
+++ b/tests/specs/npm/deno_run_cowsay_with_node_modules_dir/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run -A --quiet --node-modules-dir npm:cowsay@1.5.0 Hello",
"output": "deno_run_cowsay.out",
"envs": {
diff --git a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out b/tests/specs/npm/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out
index 46de82730..46de82730 100644
--- a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out
+++ b/tests/specs/npm/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out
diff --git a/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc b/tests/specs/npm/deno_run_cowthink/__test__.jsonc
index 2acc84e7b..2acc84e7b 100644
--- a/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc
+++ b/tests/specs/npm/deno_run_cowthink/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out b/tests/specs/npm/deno_run_cowthink/deno_run_cowthink.out
index 8dd990ed6..8dd990ed6 100644
--- a/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out
+++ b/tests/specs/npm/deno_run_cowthink/deno_run_cowthink.out
diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm/deno_run_no_bin_entrypoint/__test__.jsonc
index 5331ec9c4..5331ec9c4 100644
--- a/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc
+++ b/tests/specs/npm/deno_run_no_bin_entrypoint/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out b/tests/specs/npm/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out
index 2b885ed59..2b885ed59 100644
--- a/tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out
+++ b/tests/specs/npm/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out
diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc b/tests/specs/npm/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc
index 3eaa8274c..3eaa8274c 100644
--- a/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc
+++ b/tests/specs/npm/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out b/tests/specs/npm/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out
index 525fe4b4f..525fe4b4f 100644
--- a/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out
+++ b/tests/specs/npm/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out
diff --git a/tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc b/tests/specs/npm/deno_run_non_existent/__test__.jsonc
index 72dc01450..72dc01450 100644
--- a/tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc
+++ b/tests/specs/npm/deno_run_non_existent/__test__.jsonc
diff --git a/tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out b/tests/specs/npm/deno_run_non_existent/deno_run_non_existent.out
index 247e650e6..247e650e6 100644
--- a/tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out
+++ b/tests/specs/npm/deno_run_non_existent/deno_run_non_existent.out
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc b/tests/specs/npm/different_nested_dep_node_modules_dir_false/__test__.jsonc
index 24587d928..24587d928 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_false/__test__.jsonc
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js b/tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js
index 5677eb094..5677eb094 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out b/tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out
index 1191247b6..1191247b6 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json b/tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json
index c20425851..c20425851 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc b/tests/specs/npm/different_nested_dep_node_modules_dir_true/__test__.jsonc
index 0533a992b..a5c40cdd9 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_true/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --no-lock --quiet --node-modules-dir=auto different_nested_dep/main.js",
"output": "different_nested_dep/main.out",
"envs": {
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js b/tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js
index 5677eb094..5677eb094 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out b/tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out
index 1191247b6..1191247b6 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json b/tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json
index c20425851..c20425851 100644
--- a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json
+++ b/tests/specs/npm/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json
diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc b/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc
index 8eb6226d6..8eb6226d6 100644
--- a/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc
+++ b/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc
diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out
index a700b8fdb..a700b8fdb 100644
--- a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out
+++ b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out
diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts
index b0d51fcd9..b0d51fcd9 100644
--- a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts
+++ b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts
diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out
index 844419b4c..844419b4c 100644
--- a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out
+++ b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out
diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts
index 4c5fb7ec0..4c5fb7ec0 100644
--- a/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts
+++ b/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc b/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc
index 613747998..613747998 100644
--- a/tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc
+++ b/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out
index a700b8fdb..a700b8fdb 100644
--- a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out
+++ b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts
index b0d51fcd9..b0d51fcd9 100644
--- a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts
+++ b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out
index 844419b4c..844419b4c 100644
--- a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out
+++ b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts
index 4c5fb7ec0..4c5fb7ec0 100644
--- a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts
+++ b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts
diff --git a/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc b/tests/specs/npm/dual_cjs_esm/__test__.jsonc
index 5ace51cec..5ace51cec 100644
--- a/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc
+++ b/tests/specs/npm/dual_cjs_esm/__test__.jsonc
diff --git a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out b/tests/specs/npm/dual_cjs_esm/dual_cjs_esm/main.out
index 32e232f11..32e232f11 100644
--- a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out
+++ b/tests/specs/npm/dual_cjs_esm/dual_cjs_esm/main.out
diff --git a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts b/tests/specs/npm/dual_cjs_esm/dual_cjs_esm/main.ts
index 4f3b79667..4f3b79667 100644
--- a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts
+++ b/tests/specs/npm/dual_cjs_esm/dual_cjs_esm/main.ts
diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc b/tests/specs/npm/dynamic_import_deno_ts_from_npm/__test__.jsonc
index 8dbee51c7..8dbee51c7 100644
--- a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc
+++ b/tests/specs/npm/dynamic_import_deno_ts_from_npm/__test__.jsonc
diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts
index 3b399665d..3b399665d 100644
--- a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts
+++ b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts
diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out
index 81d7aba8a..81d7aba8a 100644
--- a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out
+++ b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out
diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts
index 4d5deec48..4d5deec48 100644
--- a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts
+++ b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts
diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts
index 4bf634170..4bf634170 100644
--- a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts
+++ b/tests/specs/npm/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts
diff --git a/tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc b/tests/specs/npm/dynamic_import_invalid_package_name/__test__.jsonc
index a15cabf83..a15cabf83 100644
--- a/tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc
+++ b/tests/specs/npm/dynamic_import_invalid_package_name/__test__.jsonc
diff --git a/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out b/tests/specs/npm/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out
index 414d08795..414d08795 100644
--- a/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out
+++ b/tests/specs/npm/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out
diff --git a/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts b/tests/specs/npm/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts
index 368ccc282..368ccc282 100644
--- a/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts
+++ b/tests/specs/npm/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts
diff --git a/tests/specs/npm_tests/dynamic_import_json/__test__.jsonc b/tests/specs/npm/dynamic_import_json/__test__.jsonc
index 9b4f5a212..9b4f5a212 100644
--- a/tests/specs/npm_tests/dynamic_import_json/__test__.jsonc
+++ b/tests/specs/npm/dynamic_import_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/dynamic_import_json/import_json/main.js b/tests/specs/npm/dynamic_import_json/import_json/main.js
index ac6cee9a8..ac6cee9a8 100644
--- a/tests/specs/npm_tests/dynamic_import_json/import_json/main.js
+++ b/tests/specs/npm/dynamic_import_json/import_json/main.js
diff --git a/tests/specs/npm_tests/dynamic_import_json/import_json/main.out b/tests/specs/npm/dynamic_import_json/import_json/main.out
index 7db7ec4ea..7db7ec4ea 100644
--- a/tests/specs/npm_tests/dynamic_import_json/import_json/main.out
+++ b/tests/specs/npm/dynamic_import_json/import_json/main.out
diff --git a/tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc b/tests/specs/npm/dynamic_import_reload_same_package/__test__.jsonc
index d255b9a87..d255b9a87 100644
--- a/tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc
+++ b/tests/specs/npm/dynamic_import_reload_same_package/__test__.jsonc
diff --git a/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out b/tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out
index b2f99b465..b2f99b465 100644
--- a/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out
+++ b/tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out
diff --git a/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts b/tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts
index 7c7ee7d55..7c7ee7d55 100644
--- a/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts
+++ b/tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts
diff --git a/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts b/tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts
index 28e3da14f..28e3da14f 100644
--- a/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts
+++ b/tests/specs/npm/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts
diff --git a/tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc b/tests/specs/npm/env_var_re_export_dev/__test__.jsonc
index e65ae0308..e65ae0308 100644
--- a/tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc
+++ b/tests/specs/npm/env_var_re_export_dev/__test__.jsonc
diff --git a/tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js b/tests/specs/npm/env_var_re_export_dev/env_var_re_export/main.js
index ed91487a0..ed91487a0 100644
--- a/tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js
+++ b/tests/specs/npm/env_var_re_export_dev/env_var_re_export/main.js
diff --git a/tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc b/tests/specs/npm/env_var_re_export_prod/__test__.jsonc
index 6c206ba3e..6c206ba3e 100644
--- a/tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc
+++ b/tests/specs/npm/env_var_re_export_prod/__test__.jsonc
diff --git a/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js b/tests/specs/npm/env_var_re_export_prod/env_var_re_export/main.js
index ed91487a0..ed91487a0 100644
--- a/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js
+++ b/tests/specs/npm/env_var_re_export_prod/env_var_re_export/main.js
diff --git a/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc b/tests/specs/npm/error_version_after_subpath/__test__.jsonc
index 157e238d8..157e238d8 100644
--- a/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc
+++ b/tests/specs/npm/error_version_after_subpath/__test__.jsonc
diff --git a/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js b/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.js
index 77c7a017c..77c7a017c 100644
--- a/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js
+++ b/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.js
diff --git a/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out b/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out
index 4e5f03e23..4e5f03e23 100644
--- a/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out
+++ b/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out
diff --git a/tests/specs/npm_tests/import_json/__test__.jsonc b/tests/specs/npm/import_json/__test__.jsonc
index 9b4f5a212..9b4f5a212 100644
--- a/tests/specs/npm_tests/import_json/__test__.jsonc
+++ b/tests/specs/npm/import_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/import_json/import_json/main.js b/tests/specs/npm/import_json/import_json/main.js
index ac6cee9a8..ac6cee9a8 100644
--- a/tests/specs/npm_tests/import_json/import_json/main.js
+++ b/tests/specs/npm/import_json/import_json/main.js
diff --git a/tests/specs/npm_tests/import_json/import_json/main.out b/tests/specs/npm/import_json/import_json/main.out
index 7db7ec4ea..7db7ec4ea 100644
--- a/tests/specs/npm_tests/import_json/import_json/main.out
+++ b/tests/specs/npm/import_json/import_json/main.out
diff --git a/tests/specs/npm_tests/import_map/__test__.jsonc b/tests/specs/npm/import_map/__test__.jsonc
index 822acbbe4..822acbbe4 100644
--- a/tests/specs/npm_tests/import_map/__test__.jsonc
+++ b/tests/specs/npm/import_map/__test__.jsonc
diff --git a/tests/specs/npm_tests/import_map/import_map/import_map.json b/tests/specs/npm/import_map/import_map/import_map.json
index 1c3baacd1..1c3baacd1 100644
--- a/tests/specs/npm_tests/import_map/import_map/import_map.json
+++ b/tests/specs/npm/import_map/import_map/import_map.json
diff --git a/tests/specs/npm_tests/import_map/import_map/main.js b/tests/specs/npm/import_map/import_map/main.js
index e354b7e92..e354b7e92 100644
--- a/tests/specs/npm_tests/import_map/import_map/main.js
+++ b/tests/specs/npm/import_map/import_map/main.js
diff --git a/tests/specs/npm_tests/import_map/import_map/main.out b/tests/specs/npm/import_map/import_map/main.out
index 05f313d4e..05f313d4e 100644
--- a/tests/specs/npm_tests/import_map/import_map/main.out
+++ b/tests/specs/npm/import_map/import_map/main.out
diff --git a/tests/specs/npm_tests/imports_package_json/__test__.jsonc b/tests/specs/npm/imports_package_json/__test__.jsonc
index e11b92132..e11b92132 100644
--- a/tests/specs/npm_tests/imports_package_json/__test__.jsonc
+++ b/tests/specs/npm/imports_package_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js
index dc4d2df16..dc4d2df16 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js
+++ b/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out
index 70d1145a3..70d1145a3 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out
+++ b/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/main.js b/tests/specs/npm/imports_package_json/imports_package_json/main.js
index 53090dd94..53090dd94 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/main.js
+++ b/tests/specs/npm/imports_package_json/imports_package_json/main.js
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/main.out b/tests/specs/npm/imports_package_json/imports_package_json/main.out
index 979e35576..979e35576 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/main.out
+++ b/tests/specs/npm/imports_package_json/imports_package_json/main.out
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/package.json b/tests/specs/npm/imports_package_json/imports_package_json/package.json
index cb6a08d1a..cb6a08d1a 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/package.json
+++ b/tests/specs/npm/imports_package_json/imports_package_json/package.json
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js
index f1097aa06..f1097aa06 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js
+++ b/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js
diff --git a/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out
index 7c803f2bf..7c803f2bf 100644
--- a/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out
+++ b/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc b/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc
index 0f094838c..0f094838c 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc
+++ b/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js
index dc4d2df16..dc4d2df16 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out
index 70d1145a3..70d1145a3 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js
index 53090dd94..53090dd94 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out
index 979e35576..979e35576 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json
index cb6a08d1a..cb6a08d1a 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js
index f1097aa06..f1097aa06 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out
index 7c803f2bf..7c803f2bf 100644
--- a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out
+++ b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc
index f862dc58e..f862dc58e 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js
index dc4d2df16..dc4d2df16 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out
index 70d1145a3..70d1145a3 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js
index 53090dd94..53090dd94 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out
index 979e35576..979e35576 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json
index cb6a08d1a..cb6a08d1a 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js
index f1097aa06..f1097aa06 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out
index 7c803f2bf..7c803f2bf 100644
--- a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out
+++ b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out
diff --git a/tests/specs/npm_tests/info_chalk_display/__test__.jsonc b/tests/specs/npm/info_chalk_display/__test__.jsonc
index 998aa6f1d..998aa6f1d 100644
--- a/tests/specs/npm_tests/info_chalk_display/__test__.jsonc
+++ b/tests/specs/npm/info_chalk_display/__test__.jsonc
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_display/cjs_with_deps/main.js
index 568726874..568726874 100644
--- a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js
+++ b/tests/specs/npm/info_chalk_display/cjs_with_deps/main.js
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main.out
index 7051c2395..7051c2395 100644
--- a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out
+++ b/tests/specs/npm/info_chalk_display/cjs_with_deps/main.out
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out
index 8e37c88eb..8e37c88eb 100644
--- a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out
+++ b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out
index af1ef1351..af1ef1351 100644
--- a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out
index 1ab367952..1ab367952 100644
--- a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out
+++ b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc b/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc
index 5dd35f5a4..1e6ef8284 100644
--- a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc
+++ b/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "info --quiet --node-modules-dir cjs_with_deps/main.js",
"output": "cjs_with_deps/main_info.out",
"exitCode": 0,
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js
index 568726874..568726874 100644
--- a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js
+++ b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out
index 7051c2395..7051c2395 100644
--- a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out
+++ b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out
index 8e37c88eb..8e37c88eb 100644
--- a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out
+++ b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out
index af1ef1351..af1ef1351 100644
--- a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out
index 1ab367952..1ab367952 100644
--- a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out
+++ b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out
diff --git a/tests/specs/npm_tests/info_chalk_json/__test__.jsonc b/tests/specs/npm/info_chalk_json/__test__.jsonc
index 12c8b9b61..12c8b9b61 100644
--- a/tests/specs/npm_tests/info_chalk_json/__test__.jsonc
+++ b/tests/specs/npm/info_chalk_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_json/cjs_with_deps/main.js
index 568726874..568726874 100644
--- a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js
+++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main.js
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out
index 7051c2395..7051c2395 100644
--- a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out
+++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out
index 8e37c88eb..8e37c88eb 100644
--- a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out
+++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out
index af1ef1351..af1ef1351 100644
--- a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out
index 1ab367952..1ab367952 100644
--- a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out
+++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc b/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc
index 1b34f4813..37b510488 100644
--- a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "info --quiet --node-modules-dir --json cjs_with_deps/main.js",
"output": "cjs_with_deps/main_info_json.out",
"exitCode": 0,
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js
index 568726874..568726874 100644
--- a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out
index 7051c2395..7051c2395 100644
--- a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out
index 8e37c88eb..8e37c88eb 100644
--- a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
index af1ef1351..af1ef1351 100644
--- a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out
index 1ab367952..1ab367952 100644
--- a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out
diff --git a/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc b/tests/specs/npm/info_cli_chalk_display/__test__.jsonc
index 7587fbcb6..7587fbcb6 100644
--- a/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc
+++ b/tests/specs/npm/info_cli_chalk_display/__test__.jsonc
diff --git a/tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out b/tests/specs/npm/info_cli_chalk_display/info/chalk.out
index 63fa20da5..63fa20da5 100644
--- a/tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out
+++ b/tests/specs/npm/info_cli_chalk_display/info/chalk.out
diff --git a/tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out
index d54155270..d54155270 100644
--- a/tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out
+++ b/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out
diff --git a/tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc b/tests/specs/npm/info_cli_chalk_json/__test__.jsonc
index b5173fd93..b5173fd93 100644
--- a/tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc
+++ b/tests/specs/npm/info_cli_chalk_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out b/tests/specs/npm/info_cli_chalk_json/info/chalk.out
index 63fa20da5..63fa20da5 100644
--- a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out
+++ b/tests/specs/npm/info_cli_chalk_json/info/chalk.out
diff --git a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out
index d54155270..d54155270 100644
--- a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out
+++ b/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out
diff --git a/tests/specs/npm_tests/info_peer_deps/__test__.jsonc b/tests/specs/npm/info_peer_deps/__test__.jsonc
index e505f3077..e505f3077 100644
--- a/tests/specs/npm_tests/info_peer_deps/__test__.jsonc
+++ b/tests/specs/npm/info_peer_deps/__test__.jsonc
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out
index 3c133bcde..3c133bcde 100644
--- a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out
+++ b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts
index a8ea8104a..a8ea8104a 100644
--- a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts
+++ b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out
index e8b92399d..e8b92399d 100644
--- a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out
+++ b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out
index 1a5f07c97..1a5f07c97 100644
--- a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out
+++ b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out
index 02b5cbafd..02b5cbafd 100644
--- a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out
+++ b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out
index 9c8145211..9c8145211 100644
--- a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out
+++ b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out
diff --git a/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc b/tests/specs/npm/info_peer_deps_json/__test__.jsonc
index 9a630add4..9a630add4 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc
+++ b/tests/specs/npm/info_peer_deps_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out
index 3c133bcde..3c133bcde 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts
index a8ea8104a..a8ea8104a 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out
index e8b92399d..e8b92399d 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
index 1a5f07c97..1a5f07c97 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out
index 02b5cbafd..02b5cbafd 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out
index 9c8145211..9c8145211 100644
--- a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out
diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc b/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc
index cc9359aab..cc9359aab 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc
+++ b/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc
diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out
index fdacea385..fdacea385 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out
+++ b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out
diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts
index a721b3d78..a721b3d78 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts
+++ b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts
diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out
index 6ab989d80..6ab989d80 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out
+++ b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out
diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts
index 6ca6cb581..6ca6cb581 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts
+++ b/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc b/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc
index 0778cb562..1f568e286 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc
+++ b/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --node-modules-dir=auto -A mixed_case_package_name/local.ts",
"output": "mixed_case_package_name/local.out",
"exitCode": 0,
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out
index fdacea385..fdacea385 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out
+++ b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts
index a721b3d78..a721b3d78 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts
+++ b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out
index 6ab989d80..6ab989d80 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out
+++ b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts
index 6ca6cb581..6ca6cb581 100644
--- a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts
+++ b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc b/tests/specs/npm/node_modules_deno_node_modules/__test__.jsonc
index 377fd05ea..377fd05ea 100644
--- a/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc
+++ b/tests/specs/npm/node_modules_deno_node_modules/__test__.jsonc
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out b/tests/specs/npm/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out
index 1ebdb2dd5..1ebdb2dd5 100644
--- a/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out
+++ b/tests/specs/npm/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts b/tests/specs/npm/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts
index 6e4a32d8e..6e4a32d8e 100644
--- a/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts
+++ b/tests/specs/npm/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc b/tests/specs/npm/node_modules_deno_node_modules_local/__test__.jsonc
index a1e67b32b..caa34f67c 100644
--- a/tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc
+++ b/tests/specs/npm/node_modules_deno_node_modules_local/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --quiet --node-modules-dir node_modules_deno_node_modules/main.ts",
"output": "node_modules_deno_node_modules/main.out",
"exitCode": 0,
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out b/tests/specs/npm/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out
index 1ebdb2dd5..1ebdb2dd5 100644
--- a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out
+++ b/tests/specs/npm/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts b/tests/specs/npm/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts
index 6e4a32d8e..6e4a32d8e 100644
--- a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts
+++ b/tests/specs/npm/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts
diff --git a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc b/tests/specs/npm/node_modules_dir_require_added_node_modules_folder/__test__.jsonc
index 5813bb3f2..c20c92924 100644
--- a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc
+++ b/tests/specs/npm/node_modules_dir_require_added_node_modules_folder/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --node-modules-dir=auto -A --quiet require_added_nm_folder/main.js",
"output": "require_added_nm_folder/main.out",
"envs": {
diff --git a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js b/tests/specs/npm/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js
index 723b2023a..723b2023a 100644
--- a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js
+++ b/tests/specs/npm/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js
diff --git a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out b/tests/specs/npm/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out
index 7ed6ff82d..7ed6ff82d 100644
--- a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out
+++ b/tests/specs/npm/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out
diff --git a/tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc b/tests/specs/npm/node_modules_dir_require_main_entry/__test__.jsonc
index 45936f1de..1a0dfba32 100644
--- a/tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc
+++ b/tests/specs/npm/node_modules_dir_require_main_entry/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --node-modules-dir -A --quiet require_main/main.js",
"output": "require_main/main.out",
"envs": {
diff --git a/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js b/tests/specs/npm/node_modules_dir_require_main_entry/require_main/main.js
index ddecd4fdb..ddecd4fdb 100644
--- a/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js
+++ b/tests/specs/npm/node_modules_dir_require_main_entry/require_main/main.js
diff --git a/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out b/tests/specs/npm/node_modules_dir_require_main_entry/require_main/main.out
index e2dbde096..e2dbde096 100644
--- a/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out
+++ b/tests/specs/npm/node_modules_dir_require_main_entry/require_main/main.out
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc b/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc
index ae79e8a47..75488e1b5 100644
--- a/tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc
+++ b/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --allow-read --allow-env --node-modules-dir=auto cjs_with_deps/main.js",
"output": "cjs_with_deps/main_node_modules.out",
"envs": {
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js
index 568726874..568726874 100644
--- a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js
+++ b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out
index 7051c2395..7051c2395 100644
--- a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out
+++ b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out
index bcaaf1eec..bcaaf1eec 100644
--- a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out
+++ b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out
index af1ef1351..af1ef1351 100644
--- a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out
index 1ab367952..1ab367952 100644
--- a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out
+++ b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out
diff --git a/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc b/tests/specs/npm/node_modules_dir_yargs/__test__.jsonc
index 8aa139a51..df28ea7ef 100644
--- a/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc
+++ b/tests/specs/npm/node_modules_dir_yargs/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --allow-read --allow-env --node-modules-dir=auto cjs_yargs/main.js",
"output": "cjs_yargs/main.out",
"envs": {
diff --git a/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js b/tests/specs/npm/node_modules_dir_yargs/cjs_yargs/main.js
index 832fd053c..832fd053c 100644
--- a/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js
+++ b/tests/specs/npm/node_modules_dir_yargs/cjs_yargs/main.js
diff --git a/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out b/tests/specs/npm/node_modules_dir_yargs/cjs_yargs/main.out
index 938d7a771..938d7a771 100644
--- a/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out
+++ b/tests/specs/npm/node_modules_dir_yargs/cjs_yargs/main.out
diff --git a/tests/specs/npm_tests/non_existent_dep/__test__.jsonc b/tests/specs/npm/non_existent_dep/__test__.jsonc
index a43708421..a43708421 100644
--- a/tests/specs/npm_tests/non_existent_dep/__test__.jsonc
+++ b/tests/specs/npm/non_existent_dep/__test__.jsonc
diff --git a/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc b/tests/specs/npm/non_existent_dep_version/__test__.jsonc
index 19cd713e2..19cd713e2 100644
--- a/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc
+++ b/tests/specs/npm/non_existent_dep_version/__test__.jsonc
diff --git a/tests/specs/npm_tests/nonexistent_file/__test__.jsonc b/tests/specs/npm/nonexistent_file/__test__.jsonc
index efbda98d2..efbda98d2 100644
--- a/tests/specs/npm_tests/nonexistent_file/__test__.jsonc
+++ b/tests/specs/npm/nonexistent_file/__test__.jsonc
diff --git a/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js b/tests/specs/npm/nonexistent_file/nonexistent_file/main.js
index c480b0548..c480b0548 100644
--- a/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js
+++ b/tests/specs/npm/nonexistent_file/nonexistent_file/main.js
diff --git a/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out b/tests/specs/npm/nonexistent_file/nonexistent_file/main.out
index baa79b1ce..baa79b1ce 100644
--- a/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out
+++ b/tests/specs/npm/nonexistent_file/nonexistent_file/main.out
diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc b/tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc
index 28da47300..66595558f 100644
--- a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc
+++ b/tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run -A --quiet --node-modules-dir nonexistent_file/main.js",
"output": "nonexistent_file/main.out",
"envs": {
diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js
index c480b0548..c480b0548 100644
--- a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js
+++ b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js
diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out
index baa79b1ce..baa79b1ce 100644
--- a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out
+++ b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out
diff --git a/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc b/tests/specs/npm/permissions_outside_package/__test__.jsonc
index 58f917f73..58f917f73 100644
--- a/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc
+++ b/tests/specs/npm/permissions_outside_package/__test__.jsonc
diff --git a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js b/tests/specs/npm/permissions_outside_package/permissions_outside_package/foo/config.js
index e667790d2..e667790d2 100644
--- a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js
+++ b/tests/specs/npm/permissions_outside_package/permissions_outside_package/foo/config.js
diff --git a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json b/tests/specs/npm/permissions_outside_package/permissions_outside_package/foo/package.json
index cc049e6ce..cc049e6ce 100644
--- a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json
+++ b/tests/specs/npm/permissions_outside_package/permissions_outside_package/foo/package.json
diff --git a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out b/tests/specs/npm/permissions_outside_package/permissions_outside_package/main.out
index 089f329c4..089f329c4 100644
--- a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out
+++ b/tests/specs/npm/permissions_outside_package/permissions_outside_package/main.out
diff --git a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts b/tests/specs/npm/permissions_outside_package/permissions_outside_package/main.ts
index 934a3eebc..934a3eebc 100644
--- a/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts
+++ b/tests/specs/npm/permissions_outside_package/permissions_outside_package/main.ts
diff --git a/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc b/tests/specs/npm/remote_npm_specifier/__test__.jsonc
index 416024f0c..416024f0c 100644
--- a/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc
+++ b/tests/specs/npm/remote_npm_specifier/__test__.jsonc
diff --git a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out b/tests/specs/npm/remote_npm_specifier/remote_npm_specifier/main.out
index 9daeafb98..9daeafb98 100644
--- a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out
+++ b/tests/specs/npm/remote_npm_specifier/remote_npm_specifier/main.out
diff --git a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts b/tests/specs/npm/remote_npm_specifier/remote_npm_specifier/main.ts
index ea9442059..ea9442059 100644
--- a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts
+++ b/tests/specs/npm/remote_npm_specifier/remote_npm_specifier/main.ts
diff --git a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts b/tests/specs/npm/remote_npm_specifier/remote_npm_specifier/remote.ts
index 923ed3ed8..923ed3ed8 100644
--- a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts
+++ b/tests/specs/npm/remote_npm_specifier/remote_npm_specifier/remote.ts
diff --git a/tests/specs/npm_tests/require_esm/__test__.jsonc b/tests/specs/npm/require_esm/__test__.jsonc
index 83859c8f1..83859c8f1 100644
--- a/tests/specs/npm_tests/require_esm/__test__.jsonc
+++ b/tests/specs/npm/require_esm/__test__.jsonc
diff --git a/tests/specs/npm_tests/require_esm/require_esm/esm.js b/tests/specs/npm/require_esm/require_esm/esm.js
index 0613f1911..0613f1911 100644
--- a/tests/specs/npm_tests/require_esm/require_esm/esm.js
+++ b/tests/specs/npm/require_esm/require_esm/esm.js
diff --git a/tests/specs/npm_tests/require_esm/require_esm/main.out b/tests/specs/npm/require_esm/require_esm/main.out
index aab0d5c28..aab0d5c28 100644
--- a/tests/specs/npm_tests/require_esm/require_esm/main.out
+++ b/tests/specs/npm/require_esm/require_esm/main.out
diff --git a/tests/specs/npm_tests/require_esm/require_esm/main.ts b/tests/specs/npm/require_esm/require_esm/main.ts
index 67ac808f0..67ac808f0 100644
--- a/tests/specs/npm_tests/require_esm/require_esm/main.ts
+++ b/tests/specs/npm/require_esm/require_esm/main.ts
diff --git a/tests/specs/npm_tests/require_json/__test__.jsonc b/tests/specs/npm/require_json/__test__.jsonc
index 43af6230f..43af6230f 100644
--- a/tests/specs/npm_tests/require_json/__test__.jsonc
+++ b/tests/specs/npm/require_json/__test__.jsonc
diff --git a/tests/specs/npm_tests/require_json/require_json/main.js b/tests/specs/npm/require_json/require_json/main.js
index d11e85305..d11e85305 100644
--- a/tests/specs/npm_tests/require_json/require_json/main.js
+++ b/tests/specs/npm/require_json/require_json/main.js
diff --git a/tests/specs/npm_tests/require_json/require_json/main.out b/tests/specs/npm/require_json/require_json/main.out
index 97db68e1b..97db68e1b 100644
--- a/tests/specs/npm_tests/require_json/require_json/main.out
+++ b/tests/specs/npm/require_json/require_json/main.out
diff --git a/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc b/tests/specs/npm/reserved_word_exports/__test__.jsonc
index d2f6ae7c2..d2f6ae7c2 100644
--- a/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc
+++ b/tests/specs/npm/reserved_word_exports/__test__.jsonc
diff --git a/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out b/tests/specs/npm/reserved_word_exports/reserved_word_exports/main.out
index ccfd35bc8..ccfd35bc8 100644
--- a/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out
+++ b/tests/specs/npm/reserved_word_exports/reserved_word_exports/main.out
diff --git a/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts b/tests/specs/npm/reserved_word_exports/reserved_word_exports/main.ts
index 33cf183d3..33cf183d3 100644
--- a/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts
+++ b/tests/specs/npm/reserved_word_exports/reserved_word_exports/main.ts
diff --git a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc b/tests/specs/npm/run_existing_npm_package_with_subpath/__test__.jsonc
index bc76b00be..bb02973c4 100644
--- a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc
+++ b/tests/specs/npm/run_existing_npm_package_with_subpath/__test__.jsonc
@@ -1,4 +1,5 @@
{
+ "tempDir": true,
"args": "run --allow-read --node-modules-dir=auto npm:@denotest/bin/cli-esm dev --help",
"output": "run_existing_npm_package_with_subpath/main.out",
"envs": {
diff --git a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out b/tests/specs/npm/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out
index f6ee03ef1..f6ee03ef1 100644
--- a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out
+++ b/tests/specs/npm/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out
diff --git a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json b/tests/specs/npm/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json
index e9a7e84ce..e9a7e84ce 100644
--- a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json
+++ b/tests/specs/npm/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json
diff --git a/tests/specs/npm_tests/sub_paths/__test__.jsonc b/tests/specs/npm/sub_paths/__test__.jsonc
index 88ccbc3ac..88ccbc3ac 100644
--- a/tests/specs/npm_tests/sub_paths/__test__.jsonc
+++ b/tests/specs/npm/sub_paths/__test__.jsonc
diff --git a/tests/specs/npm_tests/sub_paths/sub_paths/main.jsx b/tests/specs/npm/sub_paths/sub_paths/main.jsx
index 0c712b9ff..0c712b9ff 100644
--- a/tests/specs/npm_tests/sub_paths/sub_paths/main.jsx
+++ b/tests/specs/npm/sub_paths/sub_paths/main.jsx
diff --git a/tests/specs/npm_tests/sub_paths/sub_paths/main.out b/tests/specs/npm/sub_paths/sub_paths/main.out
index f034585a7..f034585a7 100644
--- a/tests/specs/npm_tests/sub_paths/sub_paths/main.out
+++ b/tests/specs/npm/sub_paths/sub_paths/main.out
diff --git a/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc b/tests/specs/npm/tarball_with_global_header/__test__.jsonc
index 7cf4a6083..7cf4a6083 100644
--- a/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc
+++ b/tests/specs/npm/tarball_with_global_header/__test__.jsonc
diff --git a/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js b/tests/specs/npm/tarball_with_global_header/tarball_with_global_header/main.js
index d1bb40fbc..d1bb40fbc 100644
--- a/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js
+++ b/tests/specs/npm/tarball_with_global_header/tarball_with_global_header/main.js
diff --git a/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out b/tests/specs/npm/tarball_with_global_header/tarball_with_global_header/main.out
index ff211087b..ff211087b 100644
--- a/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out
+++ b/tests/specs/npm/tarball_with_global_header/tarball_with_global_header/main.out
diff --git a/tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc b/tests/specs/npm/translate_cjs_to_esm/__test__.jsonc
index e1344493c..e1344493c 100644
--- a/tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc
+++ b/tests/specs/npm/translate_cjs_to_esm/__test__.jsonc
diff --git a/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js b/tests/specs/npm/translate_cjs_to_esm/translate_cjs_to_esm/main.js
index 04a86fbf1..04a86fbf1 100644
--- a/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js
+++ b/tests/specs/npm/translate_cjs_to_esm/translate_cjs_to_esm/main.js
diff --git a/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out b/tests/specs/npm/translate_cjs_to_esm/translate_cjs_to_esm/main.out
index c21a965b8..c21a965b8 100644
--- a/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out
+++ b/tests/specs/npm/translate_cjs_to_esm/translate_cjs_to_esm/main.out
diff --git a/tests/specs/npm_tests/types_ambient_module/__test__.jsonc b/tests/specs/npm/types_ambient_module/__test__.jsonc
index fc60b3433..fc60b3433 100644
--- a/tests/specs/npm_tests/types_ambient_module/__test__.jsonc
+++ b/tests/specs/npm/types_ambient_module/__test__.jsonc
diff --git a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json b/tests/specs/npm/types_ambient_module/types_ambient_module/import_map.json
index f61d99b47..f61d99b47 100644
--- a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json
+++ b/tests/specs/npm/types_ambient_module/types_ambient_module/import_map.json
diff --git a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out b/tests/specs/npm/types_ambient_module/types_ambient_module/main.out
index c84130707..c84130707 100644
--- a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out
+++ b/tests/specs/npm/types_ambient_module/types_ambient_module/main.out
diff --git a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts b/tests/specs/npm/types_ambient_module/types_ambient_module/main.ts
index 8f77cabe8..8f77cabe8 100644
--- a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts
+++ b/tests/specs/npm/types_ambient_module/types_ambient_module/main.ts
diff --git a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out b/tests/specs/npm/types_ambient_module/types_ambient_module/main_import_map.out
index 548f9b479..548f9b479 100644
--- a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out
+++ b/tests/specs/npm/types_ambient_module/types_ambient_module/main_import_map.out
diff --git a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts b/tests/specs/npm/types_ambient_module/types_ambient_module/main_import_map.ts
index 2694c94b7..2694c94b7 100644
--- a/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts
+++ b/tests/specs/npm/types_ambient_module/types_ambient_module/main_import_map.ts
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc b/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc
index 2e8c9b60b..2e8c9b60b 100644
--- a/tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc
+++ b/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json
index f61d99b47..f61d99b47 100644
--- a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json
+++ b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out
index c84130707..c84130707 100644
--- a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out
+++ b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts
index 8f77cabe8..8f77cabe8 100644
--- a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts
+++ b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out
index 548f9b479..548f9b479 100644
--- a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out
+++ b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts
index 2694c94b7..2694c94b7 100644
--- a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts
+++ b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts
diff --git a/tests/specs/npm_tests/types_d_ext/__test__.jsonc b/tests/specs/npm/types_d_ext/__test__.jsonc
index daa0f26ff..daa0f26ff 100644
--- a/tests/specs/npm_tests/types_d_ext/__test__.jsonc
+++ b/tests/specs/npm/types_d_ext/__test__.jsonc
diff --git a/tests/specs/npm_tests/types_d_ext/d_ext/main.out b/tests/specs/npm/types_d_ext/d_ext/main.out
index e99df6696..e99df6696 100644
--- a/tests/specs/npm_tests/types_d_ext/d_ext/main.out
+++ b/tests/specs/npm/types_d_ext/d_ext/main.out
diff --git a/tests/specs/npm_tests/types_d_ext/d_ext/main.ts b/tests/specs/npm/types_d_ext/d_ext/main.ts
index c92dbe065..c92dbe065 100644
--- a/tests/specs/npm_tests/types_d_ext/d_ext/main.ts
+++ b/tests/specs/npm/types_d_ext/d_ext/main.ts
diff --git a/tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc b/tests/specs/npm/types_entry_value_not_exists/__test__.jsonc
index 1c2e8735f..1c2e8735f 100644
--- a/tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc
+++ b/tests/specs/npm/types_entry_value_not_exists/__test__.jsonc
diff --git a/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out b/tests/specs/npm/types_entry_value_not_exists/types_entry_value_not_exists/main.out
index 017a17ea2..017a17ea2 100644
--- a/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out
+++ b/tests/specs/npm/types_entry_value_not_exists/types_entry_value_not_exists/main.out
diff --git a/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts b/tests/specs/npm/types_entry_value_not_exists/types_entry_value_not_exists/main.ts
index 04374ef87..04374ef87 100644
--- a/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts
+++ b/tests/specs/npm/types_entry_value_not_exists/types_entry_value_not_exists/main.ts
diff --git a/tests/specs/npm_tests/types_exports_import_types/__test__.jsonc b/tests/specs/npm/types_exports_import_types/__test__.jsonc
index fbb6a918a..fbb6a918a 100644
--- a/tests/specs/npm_tests/types_exports_import_types/__test__.jsonc
+++ b/tests/specs/npm/types_exports_import_types/__test__.jsonc
diff --git a/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out b/tests/specs/npm/types_exports_import_types/types_exports_import_types/main.out
index 10f9425ca..10f9425ca 100644
--- a/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out
+++ b/tests/specs/npm/types_exports_import_types/types_exports_import_types/main.out
diff --git a/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts b/tests/specs/npm/types_exports_import_types/types_exports_import_types/main.ts
index 3ae3e92a3..3ae3e92a3 100644
--- a/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts
+++ b/tests/specs/npm/types_exports_import_types/types_exports_import_types/main.ts
diff --git a/tests/specs/npm_tests/types_no_types_entry/__test__.jsonc b/tests/specs/npm/types_no_types_entry/__test__.jsonc
index bae02f3a8..bae02f3a8 100644
--- a/tests/specs/npm_tests/types_no_types_entry/__test__.jsonc
+++ b/tests/specs/npm/types_no_types_entry/__test__.jsonc
diff --git a/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out b/tests/specs/npm/types_no_types_entry/types_no_types_entry/main.out
index 53e872eaf..53e872eaf 100644
--- a/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out
+++ b/tests/specs/npm/types_no_types_entry/types_no_types_entry/main.out
diff --git a/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts b/tests/specs/npm/types_no_types_entry/types_no_types_entry/main.ts
index eef53b681..eef53b681 100644
--- a/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts
+++ b/tests/specs/npm/types_no_types_entry/types_no_types_entry/main.ts
diff --git a/tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc b/tests/specs/npm/typescript_file_in_package/__test__.jsonc
index c5bd61ca2..c5bd61ca2 100644
--- a/tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc
+++ b/tests/specs/npm/typescript_file_in_package/__test__.jsonc
diff --git a/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out b/tests/specs/npm/typescript_file_in_package/typescript_file_in_package/main.out
index 3c3b97190..3c3b97190 100644
--- a/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out
+++ b/tests/specs/npm/typescript_file_in_package/typescript_file_in_package/main.out
diff --git a/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts b/tests/specs/npm/typescript_file_in_package/typescript_file_in_package/main.ts
index aefc38ebe..aefc38ebe 100644
--- a/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts
+++ b/tests/specs/npm/typescript_file_in_package/typescript_file_in_package/main.ts
diff --git a/tests/specs/permission/allow_import/__test__.jsonc b/tests/specs/permission/allow_import/__test__.jsonc
new file mode 100644
index 000000000..21a3cb7b5
--- /dev/null
+++ b/tests/specs/permission/allow_import/__test__.jsonc
@@ -0,0 +1,52 @@
+{
+ "tests": {
+ "info": {
+ "args": "info main.ts",
+ "output": "info.out"
+ },
+ "cache": {
+ "args": "cache main.ts",
+ "output": "cache.out",
+ "exitCode": 1
+ },
+ "check": {
+ "args": "check main.ts",
+ "output": "check.out",
+ "exitCode": 1
+ },
+ "compile": {
+ "args": "compile main.ts",
+ "output": "compile.out",
+ "exitCode": 1
+ },
+ "doc": {
+ "args": "doc doc.ts",
+ "output": "doc.out",
+ "exitCode": 0
+ },
+ "doc_allowed": {
+ "args": "doc --allow-import doc.ts",
+ "output": "doc_allowed.out",
+ "exitCode": 0
+ },
+ "run": {
+ "args": "run main.ts",
+ "output": "run.out",
+ "exitCode": 1
+ },
+ "serve": {
+ "args": "serve main.ts",
+ "output": "serve.out",
+ "exitCode": 1
+ },
+ "builtin_host": {
+ "args": "run --quiet builtin_host.ts",
+ "output": "3\n"
+ },
+ "builtin_host_replaced": {
+ "args": "run --quiet --allow-import=other.host builtin_host.ts",
+ "output": "[WILDCARD]Requires import access[WILDCARD]",
+ "exitCode": 1
+ }
+ }
+}
diff --git a/tests/specs/permission/allow_import/builtin_host.ts b/tests/specs/permission/allow_import/builtin_host.ts
new file mode 100644
index 000000000..a3ca2df76
--- /dev/null
+++ b/tests/specs/permission/allow_import/builtin_host.ts
@@ -0,0 +1,4 @@
+// this is the JSR url for the test server
+import { add } from "http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts";
+
+console.log(add(1, 2));
diff --git a/tests/specs/permission/allow_import/cache.out b/tests/specs/permission/allow_import/cache.out
new file mode 100644
index 000000000..da40ede3a
--- /dev/null
+++ b/tests/specs/permission/allow_import/cache.out
@@ -0,0 +1,2 @@
+error: Requires import access to "example.com:443", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.ts:1:8
diff --git a/tests/specs/permission/allow_import/check.out b/tests/specs/permission/allow_import/check.out
new file mode 100644
index 000000000..da40ede3a
--- /dev/null
+++ b/tests/specs/permission/allow_import/check.out
@@ -0,0 +1,2 @@
+error: Requires import access to "example.com:443", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.ts:1:8
diff --git a/tests/specs/permission/allow_import/compile.out b/tests/specs/permission/allow_import/compile.out
new file mode 100644
index 000000000..da40ede3a
--- /dev/null
+++ b/tests/specs/permission/allow_import/compile.out
@@ -0,0 +1,2 @@
+error: Requires import access to "example.com:443", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.ts:1:8
diff --git a/tests/specs/permission/allow_import/doc.out b/tests/specs/permission/allow_import/doc.out
new file mode 100644
index 000000000..bc748d726
--- /dev/null
+++ b/tests/specs/permission/allow_import/doc.out
@@ -0,0 +1,6 @@
+[# todo(dsherret): we should probably at least show a warning here]
+Defined in file:///[WILDLINE]/doc.ts:3:1
+
+class Test
+
+
diff --git a/tests/specs/permission/allow_import/doc.ts b/tests/specs/permission/allow_import/doc.ts
new file mode 100644
index 000000000..622506c9b
--- /dev/null
+++ b/tests/specs/permission/allow_import/doc.ts
@@ -0,0 +1,3 @@
+export * from "http://localhost:4545/add.ts";
+
+export class Test {}
diff --git a/tests/specs/permission/allow_import/doc_allowed.out b/tests/specs/permission/allow_import/doc_allowed.out
new file mode 100644
index 000000000..61886be38
--- /dev/null
+++ b/tests/specs/permission/allow_import/doc_allowed.out
@@ -0,0 +1,10 @@
+Download http://localhost:4545/add.ts
+Defined in http://localhost:4545/add.ts:1:1
+
+function add(a: number, b: number): number
+
+Defined in file:///[WILDLINE]/doc.ts:3:1
+
+class Test
+
+
diff --git a/tests/specs/permission/allow_import/info.out b/tests/specs/permission/allow_import/info.out
new file mode 100644
index 000000000..2e364ff27
--- /dev/null
+++ b/tests/specs/permission/allow_import/info.out
@@ -0,0 +1,7 @@
+local: [WILDLINE]main.ts
+type: TypeScript
+dependencies: 0 unique
+size: [WILDLINE]
+
+file:///[WILDLINE]/main.ts ([WILDLINE])
+└── https://example.com/malicious_string (not capable, requires --allow-import)
diff --git a/tests/specs/permission/allow_import/main.ts b/tests/specs/permission/allow_import/main.ts
new file mode 100644
index 000000000..8dfed682e
--- /dev/null
+++ b/tests/specs/permission/allow_import/main.ts
@@ -0,0 +1 @@
+import "https://example.com/malicious_string";
diff --git a/tests/specs/permission/allow_import/run.out b/tests/specs/permission/allow_import/run.out
new file mode 100644
index 000000000..da40ede3a
--- /dev/null
+++ b/tests/specs/permission/allow_import/run.out
@@ -0,0 +1,2 @@
+error: Requires import access to "example.com:443", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.ts:1:8
diff --git a/tests/specs/permission/allow_import/serve.out b/tests/specs/permission/allow_import/serve.out
new file mode 100644
index 000000000..da40ede3a
--- /dev/null
+++ b/tests/specs/permission/allow_import/serve.out
@@ -0,0 +1,2 @@
+error: Requires import access to "example.com:443", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.ts:1:8
diff --git a/tests/specs/permission/allow_import_jsx/__test__.jsonc b/tests/specs/permission/allow_import_jsx/__test__.jsonc
new file mode 100644
index 000000000..cb80deb72
--- /dev/null
+++ b/tests/specs/permission/allow_import_jsx/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run main.tsx",
+ "output": "main.out",
+ "exitCode": 1
+}
diff --git a/tests/specs/permission/allow_import_jsx/deno.jsonc b/tests/specs/permission/allow_import_jsx/deno.jsonc
new file mode 100644
index 000000000..311409ea3
--- /dev/null
+++ b/tests/specs/permission/allow_import_jsx/deno.jsonc
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "http://localhost:4545/jsx"
+ }
+}
diff --git a/tests/specs/permission/allow_import_jsx/main.out b/tests/specs/permission/allow_import_jsx/main.out
new file mode 100644
index 000000000..fda79f89d
--- /dev/null
+++ b/tests/specs/permission/allow_import_jsx/main.out
@@ -0,0 +1,3 @@
+[# do not allow exfiltrating data via the deno.json]
+error: Requires import access to "localhost:4545", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.tsx:1:1
diff --git a/tests/specs/permission/allow_import_jsx/main.tsx b/tests/specs/permission/allow_import_jsx/main.tsx
new file mode 100644
index 000000000..f03d10c5b
--- /dev/null
+++ b/tests/specs/permission/allow_import_jsx/main.tsx
@@ -0,0 +1,3 @@
+export function Component() {
+ return <div>Hi</div>;
+}
diff --git a/tests/specs/permission/allow_import_main_module/__test__.jsonc b/tests/specs/permission/allow_import_main_module/__test__.jsonc
new file mode 100644
index 000000000..c0a92bfc3
--- /dev/null
+++ b/tests/specs/permission/allow_import_main_module/__test__.jsonc
@@ -0,0 +1,17 @@
+{
+ // won't need --allow-import because it's implied from the main module
+ "tests": {
+ "run": {
+ "args": "run http://localhost:4545/run/002_hello.ts",
+ "output": "Download http://localhost:4545/run/002_hello.ts\nHello World\n"
+ },
+ "cache": {
+ "args": "cache http://localhost:4545/run/002_hello.ts",
+ "output": "Download http://localhost:4545/run/002_hello.ts\n"
+ },
+ "check": {
+ "args": "check http://localhost:4545/run/002_hello.ts",
+ "output": "Download http://localhost:4545/run/002_hello.ts\nCheck http://localhost:4545/run/002_hello.ts\n"
+ }
+ }
+}
diff --git a/tests/specs/permission/allow_import_not_on_redirect/__test__.jsonc b/tests/specs/permission/allow_import_not_on_redirect/__test__.jsonc
new file mode 100644
index 000000000..b05d0c0cb
--- /dev/null
+++ b/tests/specs/permission/allow_import_not_on_redirect/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --allow-import=localhost:4547 --quiet --reload main.js",
+ "output": "main.out",
+ "exitCode": 1
+}
diff --git a/tests/specs/permission/allow_import_not_on_redirect/main.js b/tests/specs/permission/allow_import_not_on_redirect/main.js
new file mode 100644
index 000000000..226a6b622
--- /dev/null
+++ b/tests/specs/permission/allow_import_not_on_redirect/main.js
@@ -0,0 +1,2 @@
+import { value } from "http://localhost:4547/redirects/redirect3.js";
+console.log(value);
diff --git a/tests/specs/permission/allow_import_not_on_redirect/main.out b/tests/specs/permission/allow_import_not_on_redirect/main.out
new file mode 100644
index 000000000..3cab01e14
--- /dev/null
+++ b/tests/specs/permission/allow_import_not_on_redirect/main.out
@@ -0,0 +1,2 @@
+error: Requires import access to "localhost:4545", run again with the --allow-import flag
+ at file:///[WILDLINE]/main.js:1:23
diff --git a/tests/specs/publish/banned_triple_slash_directives/publish.out b/tests/specs/publish/banned_triple_slash_directives/publish.out
index f1827538a..ab5db6f6e 100644
--- a/tests/specs/publish/banned_triple_slash_directives/publish.out
+++ b/tests/specs/publish/banned_triple_slash_directives/publish.out
@@ -1,6 +1,5 @@
Check file:///[WILDLINE]/mod.ts
Checking for slow types in the public API...
-Check file:///[WILDLINE]/mod.ts
error[banned-triple-slash-directives]: triple slash directives that modify globals are not allowed
--> [WILDLINE]mod.ts:1:1
|
diff --git a/tests/specs/publish/invalid_import/invalid_import.out b/tests/specs/publish/invalid_import/invalid_import.out
index 929fc72cd..6914dc51e 100644
--- a/tests/specs/publish/invalid_import/invalid_import.out
+++ b/tests/specs/publish/invalid_import/invalid_import.out
@@ -1,10 +1,7 @@
-Download http://localhost:4545/welcome.ts
-Download http://localhost:4545/echo.ts
+[# notice that the remote module is not downloaded here. This is so we do not need to add an --allow-import permission here]
Download http://localhost:4260/chalk
Download http://localhost:4260/chalk/chalk-5.0.1.tgz
-Check file:///[WILDCARD]/mod.ts
Checking for slow types in the public API...
-Check file://[WILDCARD]mod.ts
error[invalid-external-import]: invalid import to a non-JSR 'http' specifier
--> [WILDCARD]mod.ts:1:8
|
diff --git a/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out b/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out
index a7235cbf1..b0a544df8 100644
--- a/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out
+++ b/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out
@@ -1,7 +1,4 @@
-[WILDCARD]
-Check file:///[WILDCARD]/mod.ts
Checking for slow types in the public API...
-Check file:///[WILDCARD]mod.ts
error[invalid-external-import]: invalid import to a non-JSR 'http' specifier
--> [WILDCARD]mod.ts:1:8
|
diff --git a/tests/specs/publish/missing_constraint/publish.out b/tests/specs/publish/missing_constraint/publish.out
index 601035b05..d9fb6408f 100644
--- a/tests/specs/publish/missing_constraint/publish.out
+++ b/tests/specs/publish/missing_constraint/publish.out
@@ -1,6 +1,22 @@
-[WILDCARD]
-Checking for slow types in the public API...
+[UNORDERED_START]
+Download http://127.0.0.1:4250/@denotest/add/meta.json
+Download http://127.0.0.1:4250/@denotest/deps/meta.json
+Download http://localhost:4260/@denotest/esm-basic
+Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json
+Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1_meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/mod.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts
+Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
+[UNORDERED_END]
Check file:///[WILDLINE]/mod.ts
+Checking for slow types in the public API...
error[missing-constraint]: specifier 'jsr:@denotest/add' is missing a version constraint
--> [WILDLINE]mod.ts:[WILDLINE]
|
diff --git a/tests/specs/publish/missing_constraint_jsx_import_source/mod.out b/tests/specs/publish/missing_constraint_jsx_import_source/mod.out
index d1da06be8..fa06d8c38 100644
--- a/tests/specs/publish/missing_constraint_jsx_import_source/mod.out
+++ b/tests/specs/publish/missing_constraint_jsx_import_source/mod.out
@@ -1,6 +1,13 @@
-[WILDCARD]
+[UNORDERED_START]
+Download http://localhost:4260/preact
+Download http://localhost:4260/preact-render-to-string
+Download http://localhost:4260/pretty-format
+Download http://localhost:4260/preact-render-to-string/preact-render-to-string-6.4.0.tgz
+Download http://localhost:4260/preact/preact-10.19.6.tgz
+Download http://localhost:4260/pretty-format/pretty-format-3.8.0.tgz
+[UNORDERED_END]
+Check file:///[WILDLINE]/mod.ts
Checking for slow types in the public API...
-Check file:///[WILDCARD]/mod.ts
error[missing-constraint]: specifier 'npm:preact/jsx-runtime' is missing a version constraint
--> [WILDLINE]
= hint: specify a version constraint for the specifier
diff --git a/tests/specs/publish/prefer_fast_check_graph/main.out b/tests/specs/publish/prefer_fast_check_graph/main.out
index 64296206f..dd7d052c9 100644
--- a/tests/specs/publish/prefer_fast_check_graph/main.out
+++ b/tests/specs/publish/prefer_fast_check_graph/main.out
@@ -1,7 +1,4 @@
-[WILDCARD]
-Check [WILDLINE]/tests/specs/publish/prefer_fast_check_graph/mod.ts
Checking for slow types in the public API...
-Check [WILDLINE]/tests/specs/publish/prefer_fast_check_graph/mod.ts
error[invalid-external-import]: invalid import to a non-JSR 'https' specifier
--> [WILDLINE]deps.ts:1:15
|
diff --git a/tests/specs/run/redirect_javascript/__test__.jsonc b/tests/specs/run/redirect_javascript/__test__.jsonc
index 1fd0b4cb1..d999a67f9 100644
--- a/tests/specs/run/redirect_javascript/__test__.jsonc
+++ b/tests/specs/run/redirect_javascript/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "run --quiet --reload main.js",
+ "args": "run --allow-import --quiet --reload main.js",
"output": "main.out"
}
diff --git a/tests/specs/test/check_local_by_default/__test__.jsonc b/tests/specs/test/check_local_by_default/__test__.jsonc
index 602250082..138d007ad 100644
--- a/tests/specs/test/check_local_by_default/__test__.jsonc
+++ b/tests/specs/test/check_local_by_default/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "test --quiet main.ts",
+ "args": "test --allow-import --quiet main.ts",
"output": "main.out"
}
diff --git a/tests/specs/test/check_local_by_default2/__test__.jsonc b/tests/specs/test/check_local_by_default2/__test__.jsonc
index 59774f938..79068d63f 100644
--- a/tests/specs/test/check_local_by_default2/__test__.jsonc
+++ b/tests/specs/test/check_local_by_default2/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "test --quiet main.ts",
+ "args": "test --allow-import --quiet main.ts",
"output": "main.out",
"exitCode": 1
}
diff --git a/tests/specs/worker/error_worker_permissions_remote/__test__.jsonc b/tests/specs/worker/error_worker_permissions_remote/__test__.jsonc
index 06a439fd4..d40e31a49 100644
--- a/tests/specs/worker/error_worker_permissions_remote/__test__.jsonc
+++ b/tests/specs/worker/error_worker_permissions_remote/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --reload error_worker_permissions_remote.ts",
+ "args": "run --reload --allow-import=other.host error_worker_permissions_remote.ts",
"output": "error_worker_permissions_remote.ts.out",
"exitCode": 1
}
diff --git a/tests/specs/worker/error_worker_permissions_remote/error_worker_permissions_remote.ts.out b/tests/specs/worker/error_worker_permissions_remote/error_worker_permissions_remote.ts.out
index afecff0a8..8019bb46d 100644
--- a/tests/specs/worker/error_worker_permissions_remote/error_worker_permissions_remote.ts.out
+++ b/tests/specs/worker/error_worker_permissions_remote/error_worker_permissions_remote.ts.out
@@ -1,2 +1,2 @@
-error: Uncaught (in worker "") Requires net access to "localhost:4545", run again with the --allow-net flag
+error: Uncaught (in worker "") Requires import access to "localhost:4545", run again with the --allow-import flag
[WILDCARD]
diff --git a/tests/specs/worker/worker_permissions_blob_remote/permissions_blob_remote.ts.out b/tests/specs/worker/worker_permissions_blob_remote/permissions_blob_remote.ts.out
index 6dc4f0f5f..67b817d6d 100644
--- a/tests/specs/worker/worker_permissions_blob_remote/permissions_blob_remote.ts.out
+++ b/tests/specs/worker/worker_permissions_blob_remote/permissions_blob_remote.ts.out
@@ -1,4 +1,4 @@
-error: Uncaught (in worker "") Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in worker "") Requires import access to "example.com:443", run again with the --allow-import flag
at blob:null/[WILDCARD]:1:8
error: Uncaught (in promise) Error: Unhandled error in child worker.
at Worker.#pollControl[WILDCARD]
diff --git a/tests/specs/worker/worker_permissions_data_remote/permissions_data_remote.ts.out b/tests/specs/worker/worker_permissions_data_remote/permissions_data_remote.ts.out
index e7af110bb..0f5a99434 100644
--- a/tests/specs/worker/worker_permissions_data_remote/permissions_data_remote.ts.out
+++ b/tests/specs/worker/worker_permissions_data_remote/permissions_data_remote.ts.out
@@ -1,4 +1,4 @@
-error: Uncaught (in worker "") Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in worker "") Requires import access to "example.com:443", run again with the --allow-import flag
at data:application/javascript;base64,aW1wb3J0ICJodHRwczovL2V4YW1wbGUuY29tL3NvbWUvZmlsZS50cyI7:1:8
error: Uncaught (in promise) Error: Unhandled error in child worker.
at Worker.#pollControl[WILDCARD]
diff --git a/tests/specs/worker/worker_permissions_dynamic_remote/__test__.jsonc b/tests/specs/worker/worker_permissions_dynamic_remote/__test__.jsonc
index 8343b17f6..498d9d507 100644
--- a/tests/specs/worker/worker_permissions_dynamic_remote/__test__.jsonc
+++ b/tests/specs/worker/worker_permissions_dynamic_remote/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --quiet --reload --allow-net --unstable-worker-options ../../../testdata/workers/permissions_dynamic_remote.ts",
- "output": "../../../testdata/workers/permissions_dynamic_remote.ts.out",
+ "args": "run --quiet --reload --allow-import --unstable-worker-options permissions_dynamic_remote.ts",
+ "output": "permissions_dynamic_remote.ts.out",
"exitCode": 1
}
diff --git a/tests/testdata/workers/permissions_dynamic_remote.ts b/tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts
index 54a361bc0..5f0fdf7a1 100644
--- a/tests/testdata/workers/permissions_dynamic_remote.ts
+++ b/tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts
@@ -4,7 +4,8 @@ new Worker(
type: "module",
deno: {
permissions: {
- net: false,
+ // dynamic_remote.ts will import from example.com
+ import: false,
},
},
},
diff --git a/tests/testdata/workers/permissions_dynamic_remote.ts.out b/tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts.out
index 4fb2c2234..fa4232efd 100644
--- a/tests/testdata/workers/permissions_dynamic_remote.ts.out
+++ b/tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts.out
@@ -1,4 +1,4 @@
-error: Uncaught (in worker "") (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in worker "") (in promise) TypeError: Requires import access to "example.com:443", run again with the --allow-import flag
await import("" + "https://example.com/some/file.ts");
^
at async http://localhost:4545/workers/dynamic_remote.ts:2:1
diff --git a/tests/specs/worker/worker_permissions_remote_remote/__test__.jsonc b/tests/specs/worker/worker_permissions_remote_remote/__test__.jsonc
index 8cf700158..00fd2a6e4 100644
--- a/tests/specs/worker/worker_permissions_remote_remote/__test__.jsonc
+++ b/tests/specs/worker/worker_permissions_remote_remote/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --quiet --reload --allow-net=localhost:4545 ../../../testdata/workers/permissions_remote_remote.ts",
+ "args": "run --quiet --reload --allow-import=localhost:4545 permissions_remote_remote.ts",
"output": "permissions_remote_remote.ts.out",
"exitCode": 1
}
diff --git a/tests/testdata/workers/permissions_remote_remote.ts b/tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts
index 4df2a8a5d..4df2a8a5d 100644
--- a/tests/testdata/workers/permissions_remote_remote.ts
+++ b/tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts
diff --git a/tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts.out b/tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts.out
index e5bdfc2dc..423120bb0 100644
--- a/tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts.out
+++ b/tests/specs/worker/worker_permissions_remote_remote/permissions_remote_remote.ts.out
@@ -1,4 +1,4 @@
-error: Uncaught (in worker "") Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in worker "") Requires import access to "example.com:443", run again with the --allow-import flag
at http://localhost:4545/[WILDCARD]/static_remote.ts:2:8
error: Uncaught (in promise) Error: Unhandled error in child worker.
at Worker.#pollControl [WILDCARD]
diff --git a/tests/testdata/add.ts b/tests/testdata/add.ts
new file mode 100644
index 000000000..8d9b8a22a
--- /dev/null
+++ b/tests/testdata/add.ts
@@ -0,0 +1,3 @@
+export function add(a: number, b: number): number {
+ return a + b;
+}
diff --git a/tests/testdata/dynamic_import/permissions_blob_local.ts b/tests/testdata/dynamic_import/permissions_blob_local.ts
index 9ef4158ce..865c1777a 100644
--- a/tests/testdata/dynamic_import/permissions_blob_local.ts
+++ b/tests/testdata/dynamic_import/permissions_blob_local.ts
@@ -1,4 +1,4 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
+// This file doesn't really exist, but it doesn't matter, a "NotCapable" error should be thrown.
const code = `import "file:///${
Deno.build.os == "windows" ? "C:/" : ""
}local_file.ts";`;
diff --git a/tests/testdata/dynamic_import/permissions_blob_remote.ts b/tests/testdata/dynamic_import/permissions_blob_remote.ts
index 1e2c8c21a..569b1f84c 100644
--- a/tests/testdata/dynamic_import/permissions_blob_remote.ts
+++ b/tests/testdata/dynamic_import/permissions_blob_remote.ts
@@ -1,4 +1,3 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
const code = `import "https://example.com/some/file.ts";`;
const blob = new Blob([code]);
await import(URL.createObjectURL(blob));
diff --git a/tests/testdata/dynamic_import/permissions_blob_remote.ts.out b/tests/testdata/dynamic_import/permissions_blob_remote.ts.out
index f436a5eb8..20b6839e4 100644
--- a/tests/testdata/dynamic_import/permissions_blob_remote.ts.out
+++ b/tests/testdata/dynamic_import/permissions_blob_remote.ts.out
@@ -1,5 +1,5 @@
-error: Uncaught (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in promise) TypeError: Requires import access to "example.com:443", run again with the --allow-import flag
at blob:null/[WILDCARD]:1:8
await import(URL.createObjectURL(blob));
^
- at async file:///[WILDCARD]/dynamic_import/permissions_blob_remote.ts:4:1
+ at async file:///[WILDCARD]/dynamic_import/permissions_blob_remote.ts:3:1
diff --git a/tests/testdata/dynamic_import/permissions_data_local.ts b/tests/testdata/dynamic_import/permissions_data_local.ts
index be4fc1c34..01bff7d7a 100644
--- a/tests/testdata/dynamic_import/permissions_data_local.ts
+++ b/tests/testdata/dynamic_import/permissions_data_local.ts
@@ -1,4 +1,4 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
+// This file doesn't really exist, but it doesn't matter, a "NotCapable" error should be thrown.
const code = `import "file:///${
Deno.build.os == "windows" ? "C:/" : ""
}local_file.ts";`;
diff --git a/tests/testdata/dynamic_import/permissions_data_remote.ts.out b/tests/testdata/dynamic_import/permissions_data_remote.ts.out
index 00248e277..67c851205 100644
--- a/tests/testdata/dynamic_import/permissions_data_remote.ts.out
+++ b/tests/testdata/dynamic_import/permissions_data_remote.ts.out
@@ -1,4 +1,4 @@
-error: Uncaught (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in promise) TypeError: Requires import access to "example.com:443", run again with the --allow-import flag
at data:application/javascript;base64,aW1wb3J0ICJodHRwczovL2V4YW1wbGUuY29tL3NvbWUvZmlsZS50cyI7:1:8
await import(`data:application/javascript;base64,${btoa(code)}`);
^
diff --git a/tests/testdata/dynamic_import/permissions_remote_remote.ts.out b/tests/testdata/dynamic_import/permissions_remote_remote.ts.out
index 0e8b0fc1f..2676d7551 100644
--- a/tests/testdata/dynamic_import/permissions_remote_remote.ts.out
+++ b/tests/testdata/dynamic_import/permissions_remote_remote.ts.out
@@ -1,4 +1,4 @@
-error: Uncaught (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag
+error: Uncaught (in promise) TypeError: Requires import access to "example.com:443", run again with the --allow-import flag
at http://localhost:4545/dynamic_import/static_remote.ts:2:8
await import(
^
diff --git a/tests/testdata/run/error_015_dynamic_import_permissions.js b/tests/testdata/run/error_015_dynamic_import_permissions.js
index 47961cf63..bdf423b59 100644
--- a/tests/testdata/run/error_015_dynamic_import_permissions.js
+++ b/tests/testdata/run/error_015_dynamic_import_permissions.js
@@ -1,3 +1,3 @@
(async () => {
- await import("" + "http://localhost:4545/subdir/mod4.js");
+ await import("" + "http://example.com/subdir/mod4.js");
})();
diff --git a/tests/testdata/run/error_015_dynamic_import_permissions.out b/tests/testdata/run/error_015_dynamic_import_permissions.out
index 87ce43e9c..15c26b425 100644
--- a/tests/testdata/run/error_015_dynamic_import_permissions.out
+++ b/tests/testdata/run/error_015_dynamic_import_permissions.out
@@ -1,4 +1,4 @@
-error: Uncaught (in promise) TypeError: Requires net access to "localhost:4545", run again with the --allow-net flag
- await import("" + "http://localhost:4545/subdir/mod4.js");
+error: Uncaught (in promise) TypeError: Requires import access to "example.com:80", run again with the --allow-import flag
+ await import("" + "http://example.com/subdir/mod4.js");
^
at async file://[WILDCARD]/error_015_dynamic_import_permissions.js:2:3
diff --git a/tests/testdata/run/lock_write_fetch/main.ts b/tests/testdata/run/lock_write_fetch/main.ts
index 4ce631311..d8a50a9aa 100644
--- a/tests/testdata/run/lock_write_fetch/main.ts
+++ b/tests/testdata/run/lock_write_fetch/main.ts
@@ -9,6 +9,7 @@ const fetchProc = await new Deno.Command(Deno.execPath(), {
stderr: "null",
args: [
"cache",
+ "--allow-import",
"--reload",
"--lock=lock_write_fetch.json",
"--cert=tls/RootCA.pem",
@@ -23,6 +24,7 @@ const fetchCheckProc = await new Deno.Command(Deno.execPath(), {
stderr: "null",
args: [
"cache",
+ "--allow-import",
"--lock=lock_write_fetch.json",
"--cert=tls/RootCA.pem",
"run/https_import.ts",
@@ -38,6 +40,7 @@ const runProc = await new Deno.Command(Deno.execPath(), {
stderr: "null",
args: [
"run",
+ "--allow-import",
"--lock=lock_write_fetch.json",
"--allow-read",
"--cert=tls/RootCA.pem",
diff --git a/tests/testdata/run/type_directives_01.ts b/tests/testdata/run/type_directives_01.ts
index 71305824c..2129d90b4 100644
--- a/tests/testdata/run/type_directives_01.ts
+++ b/tests/testdata/run/type_directives_01.ts
@@ -1,3 +1,3 @@
-import * as foo from "http://127.0.0.1:4545/xTypeScriptTypes.js";
+import * as foo from "http://localhost:4545/xTypeScriptTypes.js";
console.log(foo.foo);
diff --git a/tests/testdata/run/type_directives_01.ts.out b/tests/testdata/run/type_directives_01.ts.out
index 77ed3ae26..466218a96 100644
--- a/tests/testdata/run/type_directives_01.ts.out
+++ b/tests/testdata/run/type_directives_01.ts.out
@@ -1,3 +1,3 @@
[WILDCARD]
-DEBUG TS - host.getSourceFile("http://127.0.0.1:4545/xTypeScriptTypes.d.ts", Latest)
+DEBUG TS - host.getSourceFile("http://localhost:4545/xTypeScriptTypes.d.ts", Latest)
[WILDCARD] \ No newline at end of file
diff --git a/tests/testdata/run/type_headers_deno_types.ts b/tests/testdata/run/type_headers_deno_types.ts
index 9670f68cd..197ac1801 100644
--- a/tests/testdata/run/type_headers_deno_types.ts
+++ b/tests/testdata/run/type_headers_deno_types.ts
@@ -12,7 +12,7 @@
* header.
*/
-// @deno-types="http://127.0.0.1:4545/run/type_headers_deno_types.foo.d.ts"
-import { foo } from "http://127.0.0.1:4545/run/type_headers_deno_types.foo.js";
+// @deno-types="http://localhost:4545/run/type_headers_deno_types.foo.d.ts"
+import { foo } from "http://localhost:4545/run/type_headers_deno_types.foo.js";
foo("hello");
diff --git a/tests/testdata/workers/static_remote.ts b/tests/testdata/workers/static_remote.ts
index 2d6e820fd..6bb64eccd 100644
--- a/tests/testdata/workers/static_remote.ts
+++ b/tests/testdata/workers/static_remote.ts
@@ -1,2 +1,2 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
+// This file doesn't really exist, but it doesn't matter, a "NotCapable" error should be thrown.
import "https://example.com/some/file.ts";