From c232ecc6af5a09a8f0480e3b2b87ef2cd2b3a348 Mon Sep 17 00:00:00 2001 From: Mohammad Sulaiman Date: Wed, 25 Sep 2024 21:46:18 +0300 Subject: [PATCH 001/436] chore: deprecate npm itests (#25804) --- tests/integration/npm_tests.rs | 713 +----------------- .../builtin_module_module/__test__.jsonc | 8 + .../builtin_module_module/main.js | 0 .../builtin_module_module/main.out | 0 .../npm_tests/cached_only/__test__.jsonc | 9 + .../cached_only/cached_only/main.out | 2 + .../npm_tests/cached_only/cached_only/main.ts | 3 + .../specs/npm_tests/check_all/__test__.jsonc | 9 + .../npm_tests/check_all}/check_errors/main.ts | 0 .../check_all}/check_errors/main_all.out | 0 .../check_all}/check_errors/main_local.out | 0 .../npm_tests/check_local/__test__.jsonc | 9 + .../check_local/check_errors/main.ts | 3 + .../check_local/check_errors/main_all.out | 19 + .../check_local/check_errors/main_local.out | 7 + .../__test__.jsonc | 9 + .../file_dts_dmts_dcts/main.out | 0 .../file_dts_dmts_dcts/main.ts | 0 .../child_process_fork_test/__test__.jsonc | 8 + .../child_process_fork_test/main.out | 0 .../child_process_fork_test/main.ts | 0 .../cjs_invalid_name_exports/__test__.jsonc | 8 + .../cjs-invalid-name-exports/main.out | 0 .../cjs-invalid-name-exports/main.ts | 0 .../cjs_local_global_decls/__test__.jsonc | 8 + .../cjs_local_global_decls/main.out | 0 .../cjs_local_global_decls/main.ts | 0 .../__test__.jsonc | 8 + .../cjs_module_export_assignment/main.out | 0 .../cjs_module_export_assignment/main.ts | 0 .../__test__.jsonc | 8 + .../main.out | 0 .../main.ts | 0 .../npm_tests/cjs_pkg_imports/__test__.jsonc | 8 + .../cjs_pkg_imports}/cjs_pkg_imports/main.out | 0 .../cjs_pkg_imports}/cjs_pkg_imports/main.ts | 0 .../cjs_reexport_collision/__test__.jsonc | 8 + .../cjs_reexport_collision/main.out | 0 .../cjs_reexport_collision/main.ts | 0 .../npm_tests/cjs_require_esm/__test__.jsonc | 8 + .../cjs_require_esm}/cjs_require_esm/main.out | 0 .../cjs_require_esm}/cjs_require_esm/main.ts | 0 .../cjs_require_esm_mjs/__test__.jsonc | 8 + .../cjs_require_esm_mjs/main.out | 0 .../cjs_require_esm_mjs/main.ts | 0 .../npm_tests/cjs_sub_path/__test__.jsonc | 8 + .../cjs_sub_path}/cjs_sub_path/main.js | 0 .../cjs_sub_path}/cjs_sub_path/main.out | 0 .../cjs_this_in_exports/__test__.jsonc | 9 + .../cjs_this_in_exports/main.js | 0 .../cjs_this_in_exports/main.out | 2 +- .../npm_tests/cjs_with_deps/__test__.jsonc | 8 + .../cjs_with_deps/cjs_with_deps/main.js | 12 + .../cjs_with_deps/cjs_with_deps/main.out | 33 + .../cjs_with_deps/cjs_with_deps/main_info.out | 22 + .../cjs_with_deps/main_info_json.out | 148 ++++ .../cjs_with_deps/main_node_modules.out | 47 ++ .../npm_tests/compare_globals/__test__.jsonc | 8 + .../compare_globals}/compare_globals/main.out | 2 +- .../compare_globals}/compare_globals/main.ts | 0 .../npm_tests/create_require/__test__.jsonc | 9 + .../create_require}/create_require/main.out | 0 .../create_require}/create_require/main.ts | 0 .../specs/npm_tests/deno_cache/__test__.jsonc | 8 + .../npm_tests/deno_cache}/deno_cache.out | 0 .../npm_tests/deno_run_bin_cjs/__test__.jsonc | 8 + .../deno_run_bin_cjs/deno_run_cjs.out} | 0 .../__test__.jsonc | 8 + .../deno_run_cjs.out} | 0 .../npm_tests/deno_run_bin_esm/__test__.jsonc | 8 + .../deno_run_bin_esm/deno_run_esm.out | 4 + .../__test__.jsonc | 8 + .../deno_run_esm.out | 4 + .../deno_run_bin_no_ext/__test__.jsonc | 8 + .../deno_run_bin_no_ext/deno_run_no_ext.out | 4 + .../deno_run_bin_special_chars/__test__.jsonc | 8 + .../deno_run_special_chars_in_bin_name.out | 4 + .../npm_tests/deno_run_cowsay/__test__.jsonc | 8 + .../deno_run_cowsay/deno_run_cowsay.out | 8 + .../deno_run_cowsay_explicit/__test__.jsonc | 8 + .../deno_run_cowsay.out | 8 + .../__test__.jsonc | 8 + .../deno_run_cowsay.out | 8 + .../deno_run_cowthink/__test__.jsonc | 8 + .../deno_run_cowthink/deno_run_cowthink.out | 8 + .../deno_run_no_bin_entrypoint/__test__.jsonc | 9 + .../deno_run_no_bin_entrypoint.out | 0 .../__test__.jsonc | 9 + ...no_bin_entrypoint_non_existent_subpath.out | 0 .../deno_run_non_existent/__test__.jsonc | 9 + .../deno_run_non_existent.out | 0 .../__test__.jsonc | 9 + .../different_nested_dep/main.js | 5 + .../different_nested_dep/main.out | 2 + .../different_nested_dep/package.json | 6 + .../__test__.jsonc | 9 + .../different_nested_dep/main.js | 5 + .../different_nested_dep/main.out | 2 + .../different_nested_dep/package.json | 6 + .../__test__.jsonc | 9 + .../directory_import/folder_index_js.out | 0 .../directory_import/folder_index_js.ts | 0 .../directory_import/folder_no_index.out | 0 .../directory_import/folder_no_index.ts | 0 .../__test__.jsonc | 9 + .../directory_import/folder_index_js.out | 7 + .../directory_import/folder_index_js.ts | 2 + .../directory_import/folder_no_index.out | 6 + .../directory_import/folder_no_index.ts | 2 + .../npm_tests/dual_cjs_esm/__test__.jsonc | 8 + .../dual_cjs_esm/dual_cjs_esm/main.out | 3 + .../dual_cjs_esm/dual_cjs_esm/main.ts | 6 + .../__test__.jsonc | 8 + .../dynamic_import_deno_ts_from_npm/add.ts | 0 .../dynamic_import_deno_ts_from_npm/main.out | 0 .../dynamic_import_deno_ts_from_npm/main.ts | 0 .../subtract.mts | 0 .../__test__.jsonc | 8 + .../main.out | 0 .../main.ts | 0 .../dynamic_import_json/__test__.jsonc | 8 + .../dynamic_import_json}/import_json/main.js | 0 .../dynamic_import_json}/import_json/main.out | 0 .../__test__.jsonc | 8 + .../main.out | 0 .../main.ts | 0 .../other.ts | 0 .../env_var_re_export_dev/__test__.jsonc | 8 + .../env_var_re_export/main.js | 0 .../env_var_re_export_prod/__test__.jsonc | 9 + .../env_var_re_export/main.js | 3 + .../__test__.jsonc | 9 + .../error_version_after_subpath/main.js | 0 .../error_version_after_subpath/main.out | 2 +- .../npm_tests/import_json/__test__.jsonc | 8 + .../npm_tests/import_json/import_json/main.js | 4 + .../import_json/import_json/main.out | 10 + .../specs/npm_tests/import_map/__test__.jsonc | 8 + .../import_map}/import_map/import_map.json | 0 .../npm_tests/import_map}/import_map/main.js | 0 .../npm_tests/import_map}/import_map/main.out | 0 .../imports_package_json/__test__.jsonc | 8 + .../import_not_defined.js | 0 .../import_not_defined.out | 0 .../imports_package_json/main.js | 0 .../imports_package_json/main.out | 0 .../imports_package_json/package.json | 0 .../sub_path_import_not_defined.js | 0 .../sub_path_import_not_defined.out | 0 .../__test__.jsonc | 9 + .../import_not_defined.js | 3 + .../import_not_defined.out | 3 + .../imports_package_json/main.js | 7 + .../imports_package_json/main.out | 7 + .../imports_package_json/package.json | 6 + .../sub_path_import_not_defined.js | 3 + .../sub_path_import_not_defined.out | 3 + .../__test__.jsonc | 9 + .../import_not_defined.js | 3 + .../import_not_defined.out | 3 + .../imports_package_json/main.js | 7 + .../imports_package_json/main.out | 7 + .../imports_package_json/package.json | 6 + .../sub_path_import_not_defined.js | 3 + .../sub_path_import_not_defined.out | 3 + .../info_chalk_display/__test__.jsonc | 9 + .../info_chalk_display/cjs_with_deps/main.js | 12 + .../info_chalk_display/cjs_with_deps/main.out | 33 + .../cjs_with_deps/main_info.out | 22 + .../cjs_with_deps/main_info_json.out | 148 ++++ .../cjs_with_deps/main_node_modules.out | 47 ++ .../__test__.jsonc | 9 + .../cjs_with_deps/main.js | 12 + .../cjs_with_deps/main.out | 33 + .../cjs_with_deps/main_info.out | 22 + .../cjs_with_deps/main_info_json.out | 148 ++++ .../cjs_with_deps/main_node_modules.out | 47 ++ .../npm_tests/info_chalk_json/__test__.jsonc | 9 + .../info_chalk_json/cjs_with_deps/main.js | 12 + .../info_chalk_json/cjs_with_deps/main.out | 33 + .../cjs_with_deps/main_info.out | 22 + .../cjs_with_deps/main_info_json.out | 148 ++++ .../cjs_with_deps/main_node_modules.out | 47 ++ .../__test__.jsonc | 9 + .../cjs_with_deps/main.js | 12 + .../cjs_with_deps/main.out | 33 + .../cjs_with_deps/main_info.out | 22 + .../cjs_with_deps/main_info_json.out | 148 ++++ .../cjs_with_deps/main_node_modules.out | 47 ++ .../info_cli_chalk_display/__test__.jsonc | 9 + .../info_cli_chalk_display}/info/chalk.out | 0 .../info/chalk_json.out | 0 .../info_cli_chalk_json/__test__.jsonc | 9 + .../info_cli_chalk_json/info/chalk.out | 9 + .../info_cli_chalk_json/info/chalk_json.out | 57 ++ .../npm_tests/info_peer_deps/__test__.jsonc | 9 + .../peer_deps_with_copied_folders/main.out | 14 + .../peer_deps_with_copied_folders/main.ts | 5 + .../main_info.out | 14 + .../main_info_json.out | 97 +++ .../main_node_modules.out | 9 + .../main_node_modules_reload.out | 19 + .../info_peer_deps_json/__test__.jsonc | 9 + .../peer_deps_with_copied_folders/main.out | 14 + .../peer_deps_with_copied_folders/main.ts | 5 + .../main_info.out | 14 + .../main_info_json.out | 97 +++ .../main_node_modules.out | 9 + .../main_node_modules_reload.out | 19 + .../__test__.jsonc | 9 + .../mixed_case_package_name/global.out | 0 .../mixed_case_package_name/global.ts | 0 .../mixed_case_package_name/local.out | 0 .../mixed_case_package_name/local.ts | 0 .../__test__.jsonc | 9 + .../mixed_case_package_name/global.out | 9 + .../mixed_case_package_name/global.ts | 2 + .../mixed_case_package_name/local.out | 13 + .../mixed_case_package_name/local.ts | 18 + .../__test__.jsonc | 9 + .../node_modules_deno_node_modules/main.out | 0 .../node_modules_deno_node_modules/main.ts | 0 .../__test__.jsonc | 9 + .../node_modules_deno_node_modules/main.out | 2 + .../node_modules_deno_node_modules/main.ts | 7 + .../__test__.jsonc | 9 + .../require_added_nm_folder/main.js | 0 .../require_added_nm_folder/main.out | 0 .../__test__.jsonc | 9 + .../require_main/main.js | 0 .../require_main/main.out | 0 .../node_modules_dir_with_deps/__test__.jsonc | 8 + .../cjs_with_deps/main.js | 12 + .../cjs_with_deps/main.out | 33 + .../cjs_with_deps/main_info.out | 22 + .../cjs_with_deps/main_info_json.out | 148 ++++ .../cjs_with_deps/main_node_modules.out | 47 ++ .../node_modules_dir_yargs/__test__.jsonc | 8 + .../node_modules_dir_yargs}/cjs_yargs/main.js | 0 .../cjs_yargs/main.out | 0 .../npm_tests/non_existent_dep/__test__.jsonc | 9 + .../non_existent_dep_version/__test__.jsonc | 9 + .../npm_tests/nonexistent_file/__test__.jsonc | 9 + .../nonexistent_file/main.js | 0 .../nonexistent_file/main.out | 0 .../__test__.jsonc | 9 + .../nonexistent_file/main.js | 2 + .../nonexistent_file/main.out | 4 + .../__test__.jsonc | 8 + .../permissions_outside_package/foo/config.js | 0 .../foo/package.json | 0 .../permissions_outside_package/main.out | 0 .../permissions_outside_package/main.ts | 2 +- .../remote_npm_specifier/__test__.jsonc | 9 + .../remote_npm_specifier/main.out | 0 .../remote_npm_specifier/main.ts | 1 + .../remote_npm_specifier/remote.ts | 0 .../npm_tests/require_esm/__test__.jsonc | 4 + .../npm_tests/require_esm/require_esm/esm.js | 1 + .../require_esm/require_esm/main.out | 1 + .../npm_tests/require_esm/require_esm/main.ts | 5 + .../npm_tests/require_json/__test__.jsonc | 8 + .../require_json}/require_json/main.js | 0 .../require_json}/require_json/main.out | 0 .../reserved_word_exports/__test__.jsonc | 8 + .../reserved_word_exports/main.out | 0 .../reserved_word_exports/main.ts | 0 .../__test__.jsonc | 8 + .../main.out | 0 .../package.json | 0 .../specs/npm_tests/sub_paths/__test__.jsonc | 8 + .../npm_tests/sub_paths}/sub_paths/main.jsx | 0 .../npm_tests/sub_paths}/sub_paths/main.out | 0 .../tarball_with_global_header/__test__.jsonc | 8 + .../tarball_with_global_header/main.js | 0 .../tarball_with_global_header/main.out | 0 .../translate_cjs_to_esm/__test__.jsonc | 8 + .../translate_cjs_to_esm/main.js | 0 .../translate_cjs_to_esm/main.out | 0 .../types_ambient_module/__test__.jsonc | 9 + .../types_ambient_module/import_map.json | 0 .../types_ambient_module/main.out | 0 .../types_ambient_module/main.ts | 0 .../types_ambient_module/main_import_map.out | 0 .../types_ambient_module/main_import_map.ts | 0 .../__test__.jsonc | 9 + .../types_ambient_module/import_map.json | 5 + .../types_ambient_module/main.out | 21 + .../types_ambient_module/main.ts | 7 + .../types_ambient_module/main_import_map.out | 9 + .../types_ambient_module/main_import_map.ts | 4 + .../npm_tests/types_d_ext/__test__.jsonc | 8 + .../npm_tests/types_d_ext}/d_ext/main.out | 2 +- .../npm_tests/types_d_ext}/d_ext/main.ts | 0 .../__test__.jsonc | 9 + .../types_entry_value_not_exists/main.out | 0 .../types_entry_value_not_exists/main.ts | 0 .../types_exports_import_types/__test__.jsonc | 9 + .../types_exports_import_types/main.out | 0 .../types_exports_import_types/main.ts | 0 .../types_no_types_entry/__test__.jsonc | 9 + .../types_no_types_entry/main.out | 0 .../types_no_types_entry/main.ts | 0 .../typescript_file_in_package/__test__.jsonc | 9 + .../typescript_file_in_package/main.out | 0 .../typescript_file_in_package/main.ts | 0 .../testdata/npm/remote_npm_specifier/main.ts | 1 - tools/lint.js | 2 +- 308 files changed, 3038 insertions(+), 694 deletions(-) create mode 100644 tests/specs/npm_tests/builtin_module_module/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/builtin_module_module}/builtin_module_module/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/builtin_module_module}/builtin_module_module/main.out (100%) create mode 100644 tests/specs/npm_tests/cached_only/__test__.jsonc create mode 100644 tests/specs/npm_tests/cached_only/cached_only/main.out create mode 100644 tests/specs/npm_tests/cached_only/cached_only/main.ts create mode 100644 tests/specs/npm_tests/check_all/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/check_all}/check_errors/main.ts (100%) rename tests/{testdata/npm => specs/npm_tests/check_all}/check_errors/main_all.out (100%) rename tests/{testdata/npm => specs/npm_tests/check_all}/check_errors/main_local.out (100%) create mode 100644 tests/specs/npm_tests/check_local/__test__.jsonc create mode 100644 tests/specs/npm_tests/check_local/check_errors/main.ts create mode 100644 tests/specs/npm_tests/check_local/check_errors/main_all.out create mode 100644 tests/specs/npm_tests/check_local/check_errors/main_local.out create mode 100644 tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/check_package_file_dts_dmts_dcts}/file_dts_dmts_dcts/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/check_package_file_dts_dmts_dcts}/file_dts_dmts_dcts/main.ts (100%) create mode 100644 tests/specs/npm_tests/child_process_fork_test/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/child_process_fork_test}/child_process_fork_test/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/child_process_fork_test}/child_process_fork_test/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_invalid_name_exports}/cjs-invalid-name-exports/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_invalid_name_exports}/cjs-invalid-name-exports/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_local_global_decls}/cjs_local_global_decls/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_local_global_decls}/cjs_local_global_decls/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_module_export_assignment}/cjs_module_export_assignment/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_module_export_assignment}/cjs_module_export_assignment/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_module_export_assignment_number}/cjs_module_export_assignment_number/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_module_export_assignment_number}/cjs_module_export_assignment_number/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_pkg_imports}/cjs_pkg_imports/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_pkg_imports}/cjs_pkg_imports/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_reexport_collision}/cjs_reexport_collision/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_reexport_collision}/cjs_reexport_collision/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_require_esm/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_require_esm}/cjs_require_esm/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_require_esm}/cjs_require_esm/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_require_esm_mjs}/cjs_require_esm_mjs/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_require_esm_mjs}/cjs_require_esm_mjs/main.ts (100%) create mode 100644 tests/specs/npm_tests/cjs_sub_path/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_sub_path}/cjs_sub_path/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_sub_path}/cjs_sub_path/main.out (100%) create mode 100644 tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/cjs_this_in_exports}/cjs_this_in_exports/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/cjs_this_in_exports}/cjs_this_in_exports/main.out (63%) create mode 100644 tests/specs/npm_tests/cjs_with_deps/__test__.jsonc create mode 100644 tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js create mode 100644 tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out create mode 100644 tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out create mode 100644 tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out create mode 100644 tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out create mode 100644 tests/specs/npm_tests/compare_globals/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/compare_globals}/compare_globals/main.out (91%) rename tests/{testdata/npm => specs/npm_tests/compare_globals}/compare_globals/main.ts (100%) create mode 100644 tests/specs/npm_tests/create_require/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/create_require}/create_require/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/create_require}/create_require/main.ts (100%) create mode 100644 tests/specs/npm_tests/deno_cache/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/deno_cache}/deno_cache.out (100%) create mode 100644 tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc rename tests/{testdata/npm/deno_run_no_ext.out => specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out} (100%) create mode 100644 tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc rename tests/{testdata/npm/deno_run_special_chars_in_bin_name.out => specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out} (100%) create mode 100644 tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out create mode 100644 tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out create mode 100644 tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out create mode 100644 tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out create mode 100644 tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out create mode 100644 tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out create mode 100644 tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out create mode 100644 tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc create mode 100644 tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out create mode 100644 tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/deno_run_no_bin_entrypoint}/deno_run_no_bin_entrypoint.out (100%) create mode 100644 tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath}/deno_run_no_bin_entrypoint_non_existent_subpath.out (100%) create mode 100644 tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/deno_run_non_existent}/deno_run_non_existent.out (100%) create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out create mode 100644 tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json create mode 100644 tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/directory_import_folder_index_js}/directory_import/folder_index_js.out (100%) rename tests/{testdata/npm => specs/npm_tests/directory_import_folder_index_js}/directory_import/folder_index_js.ts (100%) rename tests/{testdata/npm => specs/npm_tests/directory_import_folder_index_js}/directory_import/folder_no_index.out (100%) rename tests/{testdata/npm => specs/npm_tests/directory_import_folder_index_js}/directory_import/folder_no_index.ts (100%) create mode 100644 tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc create mode 100644 tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out create mode 100644 tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts create mode 100644 tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out create mode 100644 tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts create mode 100644 tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc create mode 100644 tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out create mode 100644 tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts create mode 100644 tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/dynamic_import_deno_ts_from_npm}/dynamic_import_deno_ts_from_npm/add.ts (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_deno_ts_from_npm}/dynamic_import_deno_ts_from_npm/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_deno_ts_from_npm}/dynamic_import_deno_ts_from_npm/main.ts (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_deno_ts_from_npm}/dynamic_import_deno_ts_from_npm/subtract.mts (100%) create mode 100644 tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/dynamic_import_invalid_package_name}/dynamic_import_invalid_package_name/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_invalid_package_name}/dynamic_import_invalid_package_name/main.ts (100%) create mode 100644 tests/specs/npm_tests/dynamic_import_json/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/dynamic_import_json}/import_json/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_json}/import_json/main.out (100%) create mode 100644 tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/dynamic_import_reload_same_package}/dynamic_import_reload_same_package/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_reload_same_package}/dynamic_import_reload_same_package/main.ts (100%) rename tests/{testdata/npm => specs/npm_tests/dynamic_import_reload_same_package}/dynamic_import_reload_same_package/other.ts (100%) create mode 100644 tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/env_var_re_export_dev}/env_var_re_export/main.js (100%) create mode 100644 tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc create mode 100644 tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js create mode 100644 tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/error_version_after_subpath}/error_version_after_subpath/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/error_version_after_subpath}/error_version_after_subpath/main.out (65%) create mode 100644 tests/specs/npm_tests/import_json/__test__.jsonc create mode 100644 tests/specs/npm_tests/import_json/import_json/main.js create mode 100644 tests/specs/npm_tests/import_json/import_json/main.out create mode 100644 tests/specs/npm_tests/import_map/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/import_map}/import_map/import_map.json (100%) rename tests/{testdata/npm => specs/npm_tests/import_map}/import_map/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/import_map}/import_map/main.out (100%) create mode 100644 tests/specs/npm_tests/imports_package_json/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/import_not_defined.js (100%) rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/import_not_defined.out (100%) rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/package.json (100%) rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/sub_path_import_not_defined.js (100%) rename tests/{testdata/npm => specs/npm_tests/imports_package_json}/imports_package_json/sub_path_import_not_defined.out (100%) create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js create mode 100644 tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js create mode 100644 tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out create mode 100644 tests/specs/npm_tests/info_chalk_display/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js create mode 100644 tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out create mode 100644 tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out create mode 100644 tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out create mode 100644 tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out create mode 100644 tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js create mode 100644 tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out create mode 100644 tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out create mode 100644 tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out create mode 100644 tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out create mode 100644 tests/specs/npm_tests/info_chalk_json/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js create mode 100644 tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out create mode 100644 tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out create mode 100644 tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out create mode 100644 tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out create mode 100644 tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js create mode 100644 tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out create mode 100644 tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out create mode 100644 tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out create mode 100644 tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out create mode 100644 tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/info_cli_chalk_display}/info/chalk.out (100%) rename tests/{testdata/npm => specs/npm_tests/info_cli_chalk_display}/info/chalk_json.out (100%) create mode 100644 tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out create mode 100644 tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out create mode 100644 tests/specs/npm_tests/info_peer_deps/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out create mode 100644 tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts create mode 100644 tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out create mode 100644 tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out create mode 100644 tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out create mode 100644 tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out create mode 100644 tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc create mode 100644 tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out create mode 100644 tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts create mode 100644 tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out create mode 100644 tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out create mode 100644 tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out create mode 100644 tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out create mode 100644 tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/mixed_case_package_name_global_dir}/mixed_case_package_name/global.out (100%) rename tests/{testdata/npm => specs/npm_tests/mixed_case_package_name_global_dir}/mixed_case_package_name/global.ts (100%) rename tests/{testdata/npm => specs/npm_tests/mixed_case_package_name_global_dir}/mixed_case_package_name/local.out (100%) rename tests/{testdata/npm => specs/npm_tests/mixed_case_package_name_global_dir}/mixed_case_package_name/local.ts (100%) create mode 100644 tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc create mode 100644 tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out create mode 100644 tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts create mode 100644 tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out create mode 100644 tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts create mode 100644 tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/node_modules_deno_node_modules}/node_modules_deno_node_modules/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/node_modules_deno_node_modules}/node_modules_deno_node_modules/main.ts (100%) create mode 100644 tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc create mode 100644 tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out create mode 100644 tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts create mode 100644 tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/node_modules_dir_require_added_node_modules_folder}/require_added_nm_folder/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/node_modules_dir_require_added_node_modules_folder}/require_added_nm_folder/main.out (100%) create mode 100644 tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/node_modules_dir_require_main_entry}/require_main/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/node_modules_dir_require_main_entry}/require_main/main.out (100%) create mode 100644 tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc create mode 100644 tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js create mode 100644 tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out create mode 100644 tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out create mode 100644 tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out create mode 100644 tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out create mode 100644 tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/node_modules_dir_yargs}/cjs_yargs/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/node_modules_dir_yargs}/cjs_yargs/main.out (100%) create mode 100644 tests/specs/npm_tests/non_existent_dep/__test__.jsonc create mode 100644 tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc create mode 100644 tests/specs/npm_tests/nonexistent_file/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/nonexistent_file}/nonexistent_file/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/nonexistent_file}/nonexistent_file/main.out (100%) create mode 100644 tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc create mode 100644 tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js create mode 100644 tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out create mode 100644 tests/specs/npm_tests/permissions_outside_package/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/permissions_outside_package}/permissions_outside_package/foo/config.js (100%) rename tests/{testdata/npm => specs/npm_tests/permissions_outside_package}/permissions_outside_package/foo/package.json (100%) rename tests/{testdata/npm => specs/npm_tests/permissions_outside_package}/permissions_outside_package/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/permissions_outside_package}/permissions_outside_package/main.ts (63%) create mode 100644 tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/remote_npm_specifier}/remote_npm_specifier/main.out (100%) create mode 100644 tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts rename tests/{testdata/npm => specs/npm_tests/remote_npm_specifier}/remote_npm_specifier/remote.ts (100%) create mode 100644 tests/specs/npm_tests/require_esm/__test__.jsonc create mode 100644 tests/specs/npm_tests/require_esm/require_esm/esm.js create mode 100644 tests/specs/npm_tests/require_esm/require_esm/main.out create mode 100644 tests/specs/npm_tests/require_esm/require_esm/main.ts create mode 100644 tests/specs/npm_tests/require_json/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/require_json}/require_json/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/require_json}/require_json/main.out (100%) create mode 100644 tests/specs/npm_tests/reserved_word_exports/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/reserved_word_exports}/reserved_word_exports/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/reserved_word_exports}/reserved_word_exports/main.ts (100%) create mode 100644 tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/run_existing_npm_package_with_subpath}/run_existing_npm_package_with_subpath/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/run_existing_npm_package_with_subpath}/run_existing_npm_package_with_subpath/package.json (100%) create mode 100644 tests/specs/npm_tests/sub_paths/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/sub_paths}/sub_paths/main.jsx (100%) rename tests/{testdata/npm => specs/npm_tests/sub_paths}/sub_paths/main.out (100%) create mode 100644 tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/tarball_with_global_header}/tarball_with_global_header/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/tarball_with_global_header}/tarball_with_global_header/main.out (100%) create mode 100644 tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/translate_cjs_to_esm}/translate_cjs_to_esm/main.js (100%) rename tests/{testdata/npm => specs/npm_tests/translate_cjs_to_esm}/translate_cjs_to_esm/main.out (100%) create mode 100644 tests/specs/npm_tests/types_ambient_module/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/types_ambient_module}/types_ambient_module/import_map.json (100%) rename tests/{testdata/npm => specs/npm_tests/types_ambient_module}/types_ambient_module/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/types_ambient_module}/types_ambient_module/main.ts (100%) rename tests/{testdata/npm => specs/npm_tests/types_ambient_module}/types_ambient_module/main_import_map.out (100%) rename tests/{testdata/npm => specs/npm_tests/types_ambient_module}/types_ambient_module/main_import_map.ts (100%) create mode 100644 tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc create mode 100644 tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json create mode 100644 tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out create mode 100644 tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts create mode 100644 tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out create mode 100644 tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts create mode 100644 tests/specs/npm_tests/types_d_ext/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/types_d_ext}/d_ext/main.out (70%) rename tests/{testdata/npm => specs/npm_tests/types_d_ext}/d_ext/main.ts (100%) create mode 100644 tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/types_entry_value_not_exists}/types_entry_value_not_exists/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/types_entry_value_not_exists}/types_entry_value_not_exists/main.ts (100%) create mode 100644 tests/specs/npm_tests/types_exports_import_types/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/types_exports_import_types}/types_exports_import_types/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/types_exports_import_types}/types_exports_import_types/main.ts (100%) create mode 100644 tests/specs/npm_tests/types_no_types_entry/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/types_no_types_entry}/types_no_types_entry/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/types_no_types_entry}/types_no_types_entry/main.ts (100%) create mode 100644 tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc rename tests/{testdata/npm => specs/npm_tests/typescript_file_in_package}/typescript_file_in_package/main.out (100%) rename tests/{testdata/npm => specs/npm_tests/typescript_file_in_package}/typescript_file_in_package/main.ts (100%) delete mode 100644 tests/testdata/npm/remote_npm_specifier/main.ts diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs index 004136ae7fef0f..f47b1bdd4aea0d 100644 --- a/tests/integration/npm_tests.rs +++ b/tests/integration/npm_tests.rs @@ -15,136 +15,6 @@ use util::TestContextBuilder; // NOTE: See how to make test npm packages at ./testdata/npm/README.md -itest!(cjs_with_deps { - args: "run --allow-read --allow-env npm/cjs_with_deps/main.js", - output: "npm/cjs_with_deps/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_sub_path { - args: "run --allow-read npm/cjs_sub_path/main.js", - output: "npm/cjs_sub_path/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_local_global_decls { - args: "run --allow-read npm/cjs_local_global_decls/main.ts", - output: "npm/cjs_local_global_decls/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_reexport_collision { - args: "run -A --quiet npm/cjs_reexport_collision/main.ts", - output: "npm/cjs_reexport_collision/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_this_in_exports { - args: "run --allow-read --quiet npm/cjs_this_in_exports/main.js", - output: "npm/cjs_this_in_exports/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(cjs_invalid_name_exports { - args: "run --allow-read --quiet npm/cjs-invalid-name-exports/main.ts", - output: "npm/cjs-invalid-name-exports/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_require_esm { - args: "run --allow-read --quiet npm/cjs_require_esm/main.ts", - output: "npm/cjs_require_esm/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_require_esm_mjs { - args: "run --allow-read --quiet npm/cjs_require_esm_mjs/main.ts", - output: "npm/cjs_require_esm_mjs/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(require_esm { - args: "run --allow-read --quiet node/require_esm/main.ts", - output: "node/require_esm/main.out", -}); - -itest!(dynamic_import_deno_ts_from_npm { - args: "run --allow-read --quiet npm/dynamic_import_deno_ts_from_npm/main.ts", - output: "npm/dynamic_import_deno_ts_from_npm/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(translate_cjs_to_esm { - args: "run -A --quiet npm/translate_cjs_to_esm/main.js", - output: "npm/translate_cjs_to_esm/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(compare_globals { - args: "run --allow-read --check=all npm/compare_globals/main.ts", - output: "npm/compare_globals/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(dual_cjs_esm { - args: "run -A --quiet npm/dual_cjs_esm/main.ts", - output: "npm/dual_cjs_esm/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(child_process_fork_test { - args: "run -A --quiet npm/child_process_fork_test/main.ts", - output: "npm/child_process_fork_test/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_module_export_assignment { - args: "run -A --quiet --check=all npm/cjs_module_export_assignment/main.ts", - output: "npm/cjs_module_export_assignment/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(cjs_module_export_assignment_number { - args: - "run -A --quiet --check=all npm/cjs_module_export_assignment_number/main.ts", - output: "npm/cjs_module_export_assignment_number/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(mixed_case_package_name_global_dir { - args: "run npm/mixed_case_package_name/global.ts", - output: "npm/mixed_case_package_name/global.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(mixed_case_package_name_local_dir { - args: - "run --node-modules-dir=auto -A $TESTDATA/npm/mixed_case_package_name/local.ts", - output: "npm/mixed_case_package_name/local.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, - temp_cwd: true, -}); - // FIXME(bartlomieju): npm: specifiers are not handled in dynamic imports // at the moment // itest!(dynamic_import { @@ -154,211 +24,6 @@ itest!(mixed_case_package_name_local_dir { // http_server: true, // }); -itest!(dynamic_import_reload_same_package { - args: "run -A --reload npm/dynamic_import_reload_same_package/main.ts", - output: "npm/dynamic_import_reload_same_package/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(dynamic_import_invalid_package_name { - args: "run -A --reload npm/dynamic_import_invalid_package_name/main.ts", - output: "npm/dynamic_import_invalid_package_name/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(env_var_re_export_dev { - args: "run --allow-read --allow-env --quiet npm/env_var_re_export/main.js", - output_str: Some("dev\n"), - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(env_var_re_export_prod { - args: "run --allow-read --allow-env --quiet npm/env_var_re_export/main.js", - output_str: Some("prod\n"), - envs: { - let mut vars = env_vars_for_npm_tests(); - vars.push(("NODE_ENV".to_string(), "production".to_string())); - vars - }, - http_server: true, -}); - -itest!(cached_only { - args: "run --cached-only npm/cached_only/main.ts", - output: "npm/cached_only/main.out", - envs: env_vars_for_npm_tests(), - exit_code: 1, -}); - -itest!(import_map { - args: "run --allow-read --allow-env --import-map npm/import_map/import_map.json npm/import_map/main.js", - output: "npm/import_map/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(sub_paths { - args: "run -A --quiet npm/sub_paths/main.jsx", - output: "npm/sub_paths/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(remote_npm_specifier { - args: "run --quiet -A npm/remote_npm_specifier/main.ts", - output: "npm/remote_npm_specifier/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 0, -}); - -itest!(tarball_with_global_header { - args: "run -A --quiet npm/tarball_with_global_header/main.js", - output: "npm/tarball_with_global_header/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(node_modules_deno_node_modules { - args: "run --quiet npm/node_modules_deno_node_modules/main.ts", - output: "npm/node_modules_deno_node_modules/main.out", - copy_temp_dir: Some("npm/node_modules_deno_node_modules/"), - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(node_modules_deno_node_modules_local { - args: - "run --quiet --node-modules-dir npm/node_modules_deno_node_modules/main.ts", - output: "npm/node_modules_deno_node_modules/main.out", - copy_temp_dir: Some("npm/node_modules_deno_node_modules/"), - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(nonexistent_file { - args: "run -A --quiet npm/nonexistent_file/main.js", - output: "npm/nonexistent_file/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(nonexistent_file_node_modules_dir { - // there was a bug where the message was different when using a node_modules dir - args: "run -A --quiet --node-modules-dir npm/nonexistent_file/main.js", - output: "npm/nonexistent_file/main.out", - copy_temp_dir: Some("npm/nonexistent_file/"), - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(require_json { - args: "run -A --quiet npm/require_json/main.js", - output: "npm/require_json/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(error_version_after_subpath { - args: "run -A --quiet npm/error_version_after_subpath/main.js", - output: "npm/error_version_after_subpath/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(deno_cache { - args: "cache --reload npm:chalk npm:mkdirp", - output: "npm/deno_cache.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(check_all { - args: "check --all npm/check_errors/main.ts", - output: "npm/check_errors/main_all.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(check_local { - args: "check npm/check_errors/main.ts", - output: "npm/check_errors/main_local.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(types_ambient_module { - args: "check --quiet npm/types_ambient_module/main.ts", - output: "npm/types_ambient_module/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(types_ambient_module_import_map { - args: "check --quiet --import-map=npm/types_ambient_module/import_map.json npm/types_ambient_module/main_import_map.ts", - output: "npm/types_ambient_module/main_import_map.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(types_entry_value_not_exists { - args: "check --all npm/types_entry_value_not_exists/main.ts", - output: "npm/types_entry_value_not_exists/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(types_exports_import_types { - args: "check --all npm/types_exports_import_types/main.ts", - output: "npm/types_exports_import_types/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(types_no_types_entry { - args: "check --all npm/types_no_types_entry/main.ts", - output: "npm/types_no_types_entry/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(types_d_ext { - args: "check --all npm/d_ext/main.ts", - output: "npm/d_ext/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(typescript_file_in_package { - args: "run npm/typescript_file_in_package/main.ts", - output: "npm/typescript_file_in_package/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(permissions_outside_package { - args: "run --allow-read npm/permissions_outside_package/main.ts", - output: "npm/permissions_outside_package/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - itest!(run_existing_npm_package { args: "run --allow-read --node-modules-dir=auto npm:@denotest/bin", output: "npm/run_existing_npm_package/main.out", @@ -369,24 +34,15 @@ itest!(run_existing_npm_package { copy_temp_dir: Some("npm/run_existing_npm_package/"), }); -itest!(run_existing_npm_package_with_subpath { - args: - "run --allow-read --node-modules-dir=auto npm:@denotest/bin/cli-esm dev --help", - output: "npm/run_existing_npm_package_with_subpath/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - temp_cwd: true, - cwd: Some("npm/run_existing_npm_package_with_subpath/"), - copy_temp_dir: Some("npm/run_existing_npm_package_with_subpath/"), -}); - -itest!(cjs_pkg_imports { - args: "run -A npm/cjs_pkg_imports/main.ts", - output: "npm/cjs_pkg_imports/main.out", +itest!(require_resolve_url_paths { + args: "run -A --quiet --node-modules-dir=auto url_paths.ts", + output: "npm/require_resolve_url/url_paths.out", envs: env_vars_for_npm_tests(), http_server: true, + exit_code: 0, + cwd: Some("npm/require_resolve_url/"), + copy_temp_dir: Some("npm/require_resolve_url/"), }); - #[test] fn parallel_downloading() { let (out, _err) = util::run_and_collect_output_with_args( @@ -666,77 +322,6 @@ fn deno_run_cjs_module() { assert!(deno_dir.path().join("test_dir").exists()); } -itest!(deno_run_cowsay { - args: "run -A --quiet npm:cowsay@1.5.0 Hello", - output: "npm/deno_run_cowsay.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_cowsay_with_node_modules_dir { - args: "run -A --quiet --node-modules-dir npm:cowsay@1.5.0 Hello", - temp_cwd: true, - output: "npm/deno_run_cowsay.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_cowsay_explicit { - args: "run -A --quiet npm:cowsay@1.5.0/cowsay Hello", - output: "npm/deno_run_cowsay.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_cowthink { - args: "run -A --quiet npm:cowsay@1.5.0/cowthink Hello", - output: "npm/deno_run_cowthink.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_bin_esm { - args: "run -A --quiet npm:@denotest/bin/cli-esm this is a test", - output: "npm/deno_run_esm.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_bin_esm_no_bin_entrypoint { - args: "run -A --quiet npm:@denotest/bin@0.6.0/cli.mjs this is a test", - output: "npm/deno_run_esm.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_bin_cjs_no_bin_entrypoint { - args: "run -A --quiet npm:@denotest/bin@0.6.0/cli-cjs.js this is a test", - output: "npm/deno_run_cjs.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_bin_special_chars { - args: "run -A --quiet npm:@denotest/special-chars-in-bin-name/\\foo\" this is a test", - output: "npm/deno_run_special_chars_in_bin_name.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_bin_no_ext { - args: "run -A --quiet npm:@denotest/bin/cli-no-ext this is a test", - output: "npm/deno_run_no_ext.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(deno_run_bin_cjs { - args: "run -A --quiet npm:@denotest/bin/cli-cjs this is a test", - output: "npm/deno_run_cjs.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - #[test] fn deno_run_bin_lockfile() { let context = TestContextBuilder::for_npm().use_temp_cwd().build(); @@ -750,88 +335,6 @@ fn deno_run_bin_lockfile() { assert!(temp_dir.path().join("deno.lock").exists()); } -itest!(deno_run_non_existent { - args: "run npm:mkdirp@0.5.125", - output: "npm/deno_run_non_existent.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(deno_run_no_bin_entrypoint { - args: "run -A --quiet npm:@denotest/esm-basic", - output: "npm/deno_run_no_bin_entrypoint.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(deno_run_no_bin_entrypoint_non_existent_subpath { - args: "run -A --quiet npm:@denotest/esm-basic/non-existent.js", - output: "npm/deno_run_no_bin_entrypoint_non_existent_subpath.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(directory_import_folder_index_js { - args: "run npm/directory_import/folder_index_js.ts", - output: "npm/directory_import/folder_index_js.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(directory_import_folder_no_index { - args: "run npm/directory_import/folder_no_index.ts", - output: "npm/directory_import/folder_no_index.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(builtin_module_module { - args: "run --allow-read --quiet npm/builtin_module_module/main.js", - output: "npm/builtin_module_module/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(node_modules_dir_require_added_node_modules_folder { - args: - "run --node-modules-dir=auto -A --quiet $TESTDATA/npm/require_added_nm_folder/main.js", - output: "npm/require_added_nm_folder/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 0, - temp_cwd: true, -}); - -itest!(node_modules_dir_require_main_entry { - args: "run --node-modules-dir -A --quiet $TESTDATA/npm/require_main/main.js", - output: "npm/require_main/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 0, - temp_cwd: true, -}); - -itest!(node_modules_dir_with_deps { - args: "run --allow-read --allow-env --node-modules-dir=auto $TESTDATA/npm/cjs_with_deps/main.js", - output: "npm/cjs_with_deps/main_node_modules.out", - envs: env_vars_for_npm_tests(), - http_server: true, - temp_cwd: true, -}); - -itest!(node_modules_dir_yargs { - args: "run --allow-read --allow-env --node-modules-dir=auto $TESTDATA/npm/cjs_yargs/main.js", - output: "npm/cjs_yargs/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - temp_cwd: true, -}); - #[test] fn node_modules_dir_cache() { let _server = http_server(); @@ -916,57 +419,6 @@ fn ensure_registry_files_local() { } } -itest!(info_chalk_display { - args: "info --quiet npm/cjs_with_deps/main.js", - output: "npm/cjs_with_deps/main_info.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(info_chalk_display_node_modules_dir { - args: "info --quiet --node-modules-dir $TESTDATA/npm/cjs_with_deps/main.js", - output: "npm/cjs_with_deps/main_info.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, - temp_cwd: true, -}); - -itest!(info_chalk_json { - args: "info --quiet --json npm/cjs_with_deps/main.js", - output: "npm/cjs_with_deps/main_info_json.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(info_chalk_json_node_modules_dir { - args: - "info --quiet --node-modules-dir --json $TESTDATA/npm/cjs_with_deps/main.js", - output: "npm/cjs_with_deps/main_info_json.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, - temp_cwd: true, -}); - -itest!(info_cli_chalk_display { - args: "info --quiet npm:chalk@4", - output: "npm/info/chalk.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(info_cli_chalk_json { - args: "info --quiet --json npm:chalk@4", - output: "npm/info/chalk_json.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - #[test] fn lock_file_missing_top_level_package() { let _server = http_server(); @@ -1526,57 +978,27 @@ fn peer_deps_with_copied_folders_and_lockfile() { ); } -itest!(info_peer_deps { - args: "info --quiet npm/peer_deps_with_copied_folders/main.ts", - output: "npm/peer_deps_with_copied_folders/main_info.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(info_peer_deps_json { - args: "info --quiet --json npm/peer_deps_with_copied_folders/main.ts", - output: "npm/peer_deps_with_copied_folders/main_info_json.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(create_require { - args: "run --reload --allow-read npm/create_require/main.ts", - output: "npm/create_require/main.out", - exit_code: 0, - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(non_existent_dep { - args: "cache npm:@denotest/non-existent-dep", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, - output_str: Some(concat!( - "[UNORDERED_START]\n", - "Download http://localhost:4260/@denotest/non-existent-dep\n", - "Download http://localhost:4260/@denotest/non-existent\n", - "[UNORDERED_END]\n", - "error: npm package '@denotest/non-existent' does not exist.\n" - )), -}); +// TODO(2.0): this should be rewritten to a spec test and first run `deno install` +// itest!(node_modules_import_run { +// args: "run --quiet main.ts", +// output: "npm/node_modules_import/main.out", +// http_server: true, +// copy_temp_dir: Some("npm/node_modules_import/"), +// cwd: Some("npm/node_modules_import/"), +// envs: env_vars_for_npm_tests(), +// exit_code: 0, +// }); -itest!(non_existent_dep_version { - args: "cache npm:@denotest/non-existent-dep-version", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, - output_str: Some(concat!( - "[UNORDERED_START]\n", - "Download http://localhost:4260/@denotest/non-existent-dep-version\n", - "Download http://localhost:4260/@denotest/esm-basic\n", - "[UNORDERED_END]\n", - "error: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n" - )), -}); +// TODO(2.0): this should be rewritten to a spec test and first run `deno install` +// itest!(node_modules_import_check { +// args: "check --quiet main.ts", +// output: "npm/node_modules_import/main_check.out", +// envs: env_vars_for_npm_tests(), +// http_server: true, +// cwd: Some("npm/node_modules_import/"), +// copy_temp_dir: Some("npm/node_modules_import/"), +// exit_code: 1, +// }); // TODO(2.0): this should be rewritten to a spec test and first run `deno install` #[test] @@ -2047,45 +1469,6 @@ fn top_level_install_package_json_explicit_opt_in() { assert!(node_modules_dir.join("@denotest").exists()); } -itest!(reserved_word_exports { - args: "run npm/reserved_word_exports/main.ts", - output: "npm/reserved_word_exports/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(import_json { - args: "run -A --quiet npm/import_json/main.js", - output: "npm/import_json/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(dynamic_import_json { - args: "run -A --quiet npm/import_json/main.js", - output: "npm/import_json/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(check_package_file_dts_dmts_dcts { - args: "check npm/file_dts_dmts_dcts/main.ts", - output: "npm/file_dts_dmts_dcts/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 1, -}); - -itest!(require_resolve_url_paths { - args: "run -A --quiet --node-modules-dir=auto url_paths.ts", - output: "npm/require_resolve_url/url_paths.out", - envs: env_vars_for_npm_tests(), - http_server: true, - exit_code: 0, - cwd: Some("npm/require_resolve_url/"), - copy_temp_dir: Some("npm/require_resolve_url/"), -}); - #[test] fn byonm_cjs_esm_packages() { let test_context = TestContextBuilder::for_npm().use_temp_cwd().build(); @@ -2688,50 +2071,6 @@ fn cjs_export_analysis_import_cjs_directly_relative_import() { output.assert_matches_text("2\n"); } -itest!(imports_package_json { - args: - "run --no-lock --node-modules-dir=none npm/imports_package_json/main.js", - output: "npm/imports_package_json/main.out", - envs: env_vars_for_npm_tests(), - http_server: true, -}); - -itest!(imports_package_json_import_not_defined { - args: - "run --no-lock --node-modules-dir=none npm/imports_package_json/import_not_defined.js", - output: "npm/imports_package_json/import_not_defined.out", - envs: env_vars_for_npm_tests(), - exit_code: 1, - http_server: true, -}); - -itest!(imports_package_json_sub_path_import_not_defined { - args: - "run --no-lock --node-modules-dir=none npm/imports_package_json/sub_path_import_not_defined.js", - output: "npm/imports_package_json/sub_path_import_not_defined.out", - envs: env_vars_for_npm_tests(), - exit_code: 1, - http_server: true, -}); - -itest!(different_nested_dep_node_modules_dir_false { - args: "run --quiet --no-lock --node-modules-dir=none npm/different_nested_dep/main.js", - output: "npm/different_nested_dep/main.out", - envs: env_vars_for_npm_tests(), - exit_code: 0, - http_server: true, -}); - -itest!(different_nested_dep_node_modules_dir_true { - args: "run --no-lock --quiet --node-modules-dir=auto main.js", - output: "npm/different_nested_dep/main.out", - copy_temp_dir: Some("npm/different_nested_dep/"), - cwd: Some("npm/different_nested_dep/"), - envs: env_vars_for_npm_tests(), - exit_code: 0, - http_server: true, -}); - #[test] fn different_nested_dep_byonm() { let test_context = TestContextBuilder::for_npm() diff --git a/tests/specs/npm_tests/builtin_module_module/__test__.jsonc b/tests/specs/npm_tests/builtin_module_module/__test__.jsonc new file mode 100644 index 00000000000000..2f26a95d4aa92d --- /dev/null +++ b/tests/specs/npm_tests/builtin_module_module/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --quiet builtin_module_module/main.js", + "output": "builtin_module_module/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/builtin_module_module/main.js b/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js similarity index 100% rename from tests/testdata/npm/builtin_module_module/main.js rename to tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js diff --git a/tests/testdata/npm/builtin_module_module/main.out b/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out similarity index 100% rename from tests/testdata/npm/builtin_module_module/main.out rename to tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out diff --git a/tests/specs/npm_tests/cached_only/__test__.jsonc b/tests/specs/npm_tests/cached_only/__test__.jsonc new file mode 100644 index 00000000000000..764f702d2c55df --- /dev/null +++ b/tests/specs/npm_tests/cached_only/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --cached-only cached_only/main.ts", + "output": "cached_only/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/specs/npm_tests/cached_only/cached_only/main.out b/tests/specs/npm_tests/cached_only/cached_only/main.out new file mode 100644 index 00000000000000..31113eef3a133a --- /dev/null +++ b/tests/specs/npm_tests/cached_only/cached_only/main.out @@ -0,0 +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 diff --git a/tests/specs/npm_tests/cached_only/cached_only/main.ts b/tests/specs/npm_tests/cached_only/cached_only/main.ts new file mode 100644 index 00000000000000..1ccc441a15a0ea --- /dev/null +++ b/tests/specs/npm_tests/cached_only/cached_only/main.ts @@ -0,0 +1,3 @@ +import chalk from "npm:chalk@5"; + +console.log(chalk); diff --git a/tests/specs/npm_tests/check_all/__test__.jsonc b/tests/specs/npm_tests/check_all/__test__.jsonc new file mode 100644 index 00000000000000..4275243056f9ca --- /dev/null +++ b/tests/specs/npm_tests/check_all/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check --all check_errors/main.ts", + "output": "check_errors/main_all.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/check_errors/main.ts b/tests/specs/npm_tests/check_all/check_errors/main.ts similarity index 100% rename from tests/testdata/npm/check_errors/main.ts rename to tests/specs/npm_tests/check_all/check_errors/main.ts diff --git a/tests/testdata/npm/check_errors/main_all.out b/tests/specs/npm_tests/check_all/check_errors/main_all.out similarity index 100% rename from tests/testdata/npm/check_errors/main_all.out rename to tests/specs/npm_tests/check_all/check_errors/main_all.out diff --git a/tests/testdata/npm/check_errors/main_local.out b/tests/specs/npm_tests/check_all/check_errors/main_local.out similarity index 100% rename from tests/testdata/npm/check_errors/main_local.out rename to tests/specs/npm_tests/check_all/check_errors/main_local.out diff --git a/tests/specs/npm_tests/check_local/__test__.jsonc b/tests/specs/npm_tests/check_local/__test__.jsonc new file mode 100644 index 00000000000000..1bffa5eed09c35 --- /dev/null +++ b/tests/specs/npm_tests/check_local/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check check_errors/main.ts", + "output": "check_errors/main_local.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/specs/npm_tests/check_local/check_errors/main.ts b/tests/specs/npm_tests/check_local/check_errors/main.ts new file mode 100644 index 00000000000000..4b868419563494 --- /dev/null +++ b/tests/specs/npm_tests/check_local/check_errors/main.ts @@ -0,0 +1,3 @@ +import * as test from "npm:@denotest/check-error"; + +console.log(test.Asdf); // should error diff --git a/tests/specs/npm_tests/check_local/check_errors/main_all.out b/tests/specs/npm_tests/check_local/check_errors/main_all.out new file mode 100644 index 00000000000000..4c624c0eaa9a26 --- /dev/null +++ b/tests/specs/npm_tests/check_local/check_errors/main_all.out @@ -0,0 +1,19 @@ +Download http://localhost:4260/@denotest/check-error +Download http://localhost:4260/@denotest/check-error/1.0.0.tgz +Check file:///[WILDCARD]/check_errors/main.ts +error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression. +export class Class1 extends Class2 { + ~~~~~~ + at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:2:14 + +TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression. +export class Class2 extends Class1 { + ~~~~~~ + at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:5:14 + +TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. +console.log(test.Asdf); // should error + ~~~~ + at file:///[WILDCARD]/check_errors/main.ts:3:18 + +Found 3 errors. diff --git a/tests/specs/npm_tests/check_local/check_errors/main_local.out b/tests/specs/npm_tests/check_local/check_errors/main_local.out new file mode 100644 index 00000000000000..1a150b5e692a0f --- /dev/null +++ b/tests/specs/npm_tests/check_local/check_errors/main_local.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/@denotest/check-error +Download http://localhost:4260/@denotest/check-error/1.0.0.tgz +Check file:///[WILDCARD]/check_errors/main.ts +error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. +console.log(test.Asdf); // should error + ~~~~ + at file:///[WILDCARD]/check_errors/main.ts:3:18 diff --git a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc new file mode 100644 index 00000000000000..675051a69ed0c1 --- /dev/null +++ b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check file_dts_dmts_dcts/main.ts", + "output": "file_dts_dmts_dcts/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/file_dts_dmts_dcts/main.out b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out similarity index 100% rename from tests/testdata/npm/file_dts_dmts_dcts/main.out rename to tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out diff --git a/tests/testdata/npm/file_dts_dmts_dcts/main.ts b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts similarity index 100% rename from tests/testdata/npm/file_dts_dmts_dcts/main.ts rename to tests/specs/npm_tests/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_tests/child_process_fork_test/__test__.jsonc new file mode 100644 index 00000000000000..f83cb051e1ebb5 --- /dev/null +++ b/tests/specs/npm_tests/child_process_fork_test/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet child_process_fork_test/main.ts", + "output": "child_process_fork_test/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/child_process_fork_test/main.out b/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out similarity index 100% rename from tests/testdata/npm/child_process_fork_test/main.out rename to tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out diff --git a/tests/testdata/npm/child_process_fork_test/main.ts b/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts similarity index 100% rename from tests/testdata/npm/child_process_fork_test/main.ts rename to tests/specs/npm_tests/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_tests/cjs_invalid_name_exports/__test__.jsonc new file mode 100644 index 00000000000000..a38b8d0356eaee --- /dev/null +++ b/tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --quiet cjs-invalid-name-exports/main.ts", + "output": "cjs-invalid-name-exports/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs-invalid-name-exports/main.out b/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out similarity index 100% rename from tests/testdata/npm/cjs-invalid-name-exports/main.out rename to tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out diff --git a/tests/testdata/npm/cjs-invalid-name-exports/main.ts b/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts similarity index 100% rename from tests/testdata/npm/cjs-invalid-name-exports/main.ts rename to tests/specs/npm_tests/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_tests/cjs_local_global_decls/__test__.jsonc new file mode 100644 index 00000000000000..8bf847873f087f --- /dev/null +++ b/tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read cjs_local_global_decls/main.ts", + "output": "cjs_local_global_decls/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_local_global_decls/main.out b/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out similarity index 100% rename from tests/testdata/npm/cjs_local_global_decls/main.out rename to tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out diff --git a/tests/testdata/npm/cjs_local_global_decls/main.ts b/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts similarity index 100% rename from tests/testdata/npm/cjs_local_global_decls/main.ts rename to tests/specs/npm_tests/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_tests/cjs_module_export_assignment/__test__.jsonc new file mode 100644 index 00000000000000..e9be6361a19151 --- /dev/null +++ b/tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet --check=all cjs_module_export_assignment/main.ts", + "output": "cjs_module_export_assignment/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_module_export_assignment/main.out b/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out similarity index 100% rename from tests/testdata/npm/cjs_module_export_assignment/main.out rename to tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out diff --git a/tests/testdata/npm/cjs_module_export_assignment/main.ts b/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts similarity index 100% rename from tests/testdata/npm/cjs_module_export_assignment/main.ts rename to tests/specs/npm_tests/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_tests/cjs_module_export_assignment_number/__test__.jsonc new file mode 100644 index 00000000000000..d70f82e5033ce3 --- /dev/null +++ b/tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet --check=all cjs_module_export_assignment_number/main.ts", + "output": "cjs_module_export_assignment_number/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_module_export_assignment_number/main.out b/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out similarity index 100% rename from tests/testdata/npm/cjs_module_export_assignment_number/main.out rename to tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out diff --git a/tests/testdata/npm/cjs_module_export_assignment_number/main.ts b/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts similarity index 100% rename from tests/testdata/npm/cjs_module_export_assignment_number/main.ts rename to tests/specs/npm_tests/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_tests/cjs_pkg_imports/__test__.jsonc new file mode 100644 index 00000000000000..c51f14b5602a22 --- /dev/null +++ b/tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A cjs_pkg_imports/main.ts", + "output": "cjs_pkg_imports/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_pkg_imports/main.out b/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out similarity index 100% rename from tests/testdata/npm/cjs_pkg_imports/main.out rename to tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out diff --git a/tests/testdata/npm/cjs_pkg_imports/main.ts b/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts similarity index 100% rename from tests/testdata/npm/cjs_pkg_imports/main.ts rename to tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts diff --git a/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc b/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc new file mode 100644 index 00000000000000..0b9d1e621124ee --- /dev/null +++ b/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet cjs_reexport_collision/main.ts", + "output": "cjs_reexport_collision/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_reexport_collision/main.out b/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out similarity index 100% rename from tests/testdata/npm/cjs_reexport_collision/main.out rename to tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out diff --git a/tests/testdata/npm/cjs_reexport_collision/main.ts b/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts similarity index 100% rename from tests/testdata/npm/cjs_reexport_collision/main.ts rename to tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts diff --git a/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc b/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc new file mode 100644 index 00000000000000..172f1ca650d557 --- /dev/null +++ b/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --quiet cjs_require_esm/main.ts", + "output": "cjs_require_esm/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_require_esm/main.out b/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out similarity index 100% rename from tests/testdata/npm/cjs_require_esm/main.out rename to tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out diff --git a/tests/testdata/npm/cjs_require_esm/main.ts b/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts similarity index 100% rename from tests/testdata/npm/cjs_require_esm/main.ts rename to tests/specs/npm_tests/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_tests/cjs_require_esm_mjs/__test__.jsonc new file mode 100644 index 00000000000000..3a1323127292a8 --- /dev/null +++ b/tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --quiet cjs_require_esm_mjs/main.ts", + "output": "cjs_require_esm_mjs/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_require_esm_mjs/main.out b/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out similarity index 100% rename from tests/testdata/npm/cjs_require_esm_mjs/main.out rename to tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out diff --git a/tests/testdata/npm/cjs_require_esm_mjs/main.ts b/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts similarity index 100% rename from tests/testdata/npm/cjs_require_esm_mjs/main.ts rename to tests/specs/npm_tests/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_tests/cjs_sub_path/__test__.jsonc new file mode 100644 index 00000000000000..dbec76a13ba21d --- /dev/null +++ b/tests/specs/npm_tests/cjs_sub_path/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read cjs_sub_path/main.js", + "output": "cjs_sub_path/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_sub_path/main.js b/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js similarity index 100% rename from tests/testdata/npm/cjs_sub_path/main.js rename to tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js diff --git a/tests/testdata/npm/cjs_sub_path/main.out b/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out similarity index 100% rename from tests/testdata/npm/cjs_sub_path/main.out rename to tests/specs/npm_tests/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_tests/cjs_this_in_exports/__test__.jsonc new file mode 100644 index 00000000000000..251691ca8ed47b --- /dev/null +++ b/tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --allow-read --quiet cjs_this_in_exports/main.js", + "output": "cjs_this_in_exports/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/cjs_this_in_exports/main.js b/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js similarity index 100% rename from tests/testdata/npm/cjs_this_in_exports/main.js rename to tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js diff --git a/tests/testdata/npm/cjs_this_in_exports/main.out b/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out similarity index 63% rename from tests/testdata/npm/cjs_this_in_exports/main.out rename to tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out index ba436bddc90a62..9517015ae5051e 100644 --- a/tests/testdata/npm/cjs_this_in_exports/main.out +++ b/tests/specs/npm_tests/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]/testdata/npm/cjs_this_in_exports/main.js:11:1 + at file://[WILDCARD]/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js:11:1 diff --git a/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc b/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc new file mode 100644 index 00000000000000..d9014f102aeadb --- /dev/null +++ b/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --allow-env cjs_with_deps/main.js", + "output": "cjs_with_deps/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js new file mode 100644 index 00000000000000..568726874ec4ac --- /dev/null +++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js @@ -0,0 +1,12 @@ +import chalk from "npm:chalk@4"; +import { expect } from "npm:chai@4.3"; + +console.log(chalk.green("chalk cjs loads")); + +const timeout = setTimeout(() => {}, 0); +expect(timeout).to.be.a("number"); +clearTimeout(timeout); + +const interval = setInterval(() => {}, 100); +expect(interval).to.be.a("number"); +clearInterval(interval); diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out new file mode 100644 index 00000000000000..7051c239538def --- /dev/null +++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out @@ -0,0 +1,33 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Download http://localhost:4260/chai/chai-4.3.6.tgz +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..8e37c88eb00f0c --- /dev/null +++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..af1ef1351880a7 --- /dev/null +++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out @@ -0,0 +1,148 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out new file mode 100644 index 00000000000000..1ab3679521744d --- /dev/null +++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out @@ -0,0 +1,47 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Initialize ansi-styles@4.3.0 +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Initialize assertion-error@1.1.0 +Download http://localhost:4260/chai/chai-4.3.6.tgz +Initialize chai@4.3.6 +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Initialize chalk@4.1.2 +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Initialize check-error@1.0.2 +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Initialize color-convert@2.0.1 +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Initialize color-name@1.1.4 +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Initialize deep-eql@3.0.1 +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Initialize get-func-name@2.0.0 +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Initialize has-flag@4.0.0 +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Initialize loupe@2.3.4 +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Initialize pathval@1.1.1 +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Initialize supports-color@7.2.0 +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +Initialize type-detect@4.0.8 +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/compare_globals/__test__.jsonc b/tests/specs/npm_tests/compare_globals/__test__.jsonc new file mode 100644 index 00000000000000..d86a76dbc793eb --- /dev/null +++ b/tests/specs/npm_tests/compare_globals/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --check=all compare_globals/main.ts", + "output": "compare_globals/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/compare_globals/main.out b/tests/specs/npm_tests/compare_globals/compare_globals/main.out similarity index 91% rename from tests/testdata/npm/compare_globals/main.out rename to tests/specs/npm_tests/compare_globals/compare_globals/main.out index 234a68971fa538..a1b0a566d519dc 100644 --- a/tests/testdata/npm/compare_globals/main.out +++ b/tests/specs/npm_tests/compare_globals/compare_globals/main.out @@ -8,7 +8,7 @@ Download http://localhost:4260/@denotest/globals/1.0.0.tgz Download http://localhost:4260/@types/node/node-22.5.4.tgz Download http://localhost:4260/undici-types/undici-types-6.19.8.tgz [UNORDERED_END] -Check file:///[WILDCARD]/npm/compare_globals/main.ts +Check file:///[WILDCARD]/compare_globals/main.ts true true [] diff --git a/tests/testdata/npm/compare_globals/main.ts b/tests/specs/npm_tests/compare_globals/compare_globals/main.ts similarity index 100% rename from tests/testdata/npm/compare_globals/main.ts rename to tests/specs/npm_tests/compare_globals/compare_globals/main.ts diff --git a/tests/specs/npm_tests/create_require/__test__.jsonc b/tests/specs/npm_tests/create_require/__test__.jsonc new file mode 100644 index 00000000000000..40d9ce0669f61d --- /dev/null +++ b/tests/specs/npm_tests/create_require/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --reload --allow-read create_require/main.ts", + "output": "create_require/main.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/create_require/main.out b/tests/specs/npm_tests/create_require/create_require/main.out similarity index 100% rename from tests/testdata/npm/create_require/main.out rename to tests/specs/npm_tests/create_require/create_require/main.out diff --git a/tests/testdata/npm/create_require/main.ts b/tests/specs/npm_tests/create_require/create_require/main.ts similarity index 100% rename from tests/testdata/npm/create_require/main.ts rename to tests/specs/npm_tests/create_require/create_require/main.ts diff --git a/tests/specs/npm_tests/deno_cache/__test__.jsonc b/tests/specs/npm_tests/deno_cache/__test__.jsonc new file mode 100644 index 00000000000000..93b204c03341a9 --- /dev/null +++ b/tests/specs/npm_tests/deno_cache/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "cache --reload npm:chalk npm:mkdirp", + "output": "deno_cache.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/deno_cache.out b/tests/specs/npm_tests/deno_cache/deno_cache.out similarity index 100% rename from tests/testdata/npm/deno_cache.out rename to tests/specs/npm_tests/deno_cache/deno_cache.out diff --git a/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc new file mode 100644 index 00000000000000..9eb8e9bfec0be7 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:@denotest/bin/cli-cjs this is a test", + "output": "deno_run_cjs.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/deno_run_no_ext.out b/tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out similarity index 100% rename from tests/testdata/npm/deno_run_no_ext.out rename to tests/specs/npm_tests/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_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc new file mode 100644 index 00000000000000..6ee5a326ba84a2 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:@denotest/bin@0.6.0/cli-cjs.js this is a test", + "output": "deno_run_cjs.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/deno_run_special_chars_in_bin_name.out b/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out similarity index 100% rename from tests/testdata/npm/deno_run_special_chars_in_bin_name.out rename to tests/specs/npm_tests/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_tests/deno_run_bin_esm/__test__.jsonc new file mode 100644 index 00000000000000..fc48451bb675f4 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:@denotest/bin/cli-esm this is a test", + "output": "deno_run_esm.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out b/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out new file mode 100644 index 00000000000000..ffe7cbd8910de9 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out @@ -0,0 +1,4 @@ +this +is +a +test diff --git a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc new file mode 100644 index 00000000000000..956755b306a0b9 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:@denotest/bin@0.6.0/cli.mjs this is a test", + "output": "deno_run_esm.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out new file mode 100644 index 00000000000000..ffe7cbd8910de9 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out @@ -0,0 +1,4 @@ +this +is +a +test diff --git a/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc new file mode 100644 index 00000000000000..71877b399b1293 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:@denotest/bin/cli-no-ext this is a test", + "output": "deno_run_no_ext.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out b/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out new file mode 100644 index 00000000000000..ffe7cbd8910de9 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out @@ -0,0 +1,4 @@ +this +is +a +test diff --git a/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc new file mode 100644 index 00000000000000..c3e14c0b71a8a2 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:@denotest/special-chars-in-bin-name/\\foo\" this is a test", + "output": "deno_run_special_chars_in_bin_name.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out b/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out new file mode 100644 index 00000000000000..ffe7cbd8910de9 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out @@ -0,0 +1,4 @@ +this +is +a +test diff --git a/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc new file mode 100644 index 00000000000000..0015b88be8f668 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:cowsay@1.5.0 Hello", + "output": "deno_run_cowsay.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out b/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out new file mode 100644 index 00000000000000..46de827306c326 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out @@ -0,0 +1,8 @@ + _______ +< Hello > + ------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || diff --git a/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc new file mode 100644 index 00000000000000..1ecce925e87187 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:cowsay@1.5.0/cowsay Hello", + "output": "deno_run_cowsay.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out b/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out new file mode 100644 index 00000000000000..46de827306c326 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out @@ -0,0 +1,8 @@ + _______ +< Hello > + ------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || diff --git a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc new file mode 100644 index 00000000000000..8671ed1fea1b0d --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet --node-modules-dir npm:cowsay@1.5.0 Hello", + "output": "deno_run_cowsay.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out new file mode 100644 index 00000000000000..46de827306c326 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out @@ -0,0 +1,8 @@ + _______ +< Hello > + ------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || diff --git a/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc new file mode 100644 index 00000000000000..2acc84e7b91cca --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet npm:cowsay@1.5.0/cowthink Hello", + "output": "deno_run_cowthink.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out b/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out new file mode 100644 index 00000000000000..8dd990ed6f9173 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out @@ -0,0 +1,8 @@ + _______ +( Hello ) + ------- + o ^__^ + o (oo)\_______ + (__)\ )\/\ + ||----w | + || || diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc new file mode 100644 index 00000000000000..5331ec9c4126e0 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run -A --quiet npm:@denotest/esm-basic", + "output": "deno_run_no_bin_entrypoint.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/deno_run_no_bin_entrypoint.out b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out similarity index 100% rename from tests/testdata/npm/deno_run_no_bin_entrypoint.out rename to tests/specs/npm_tests/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_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc new file mode 100644 index 00000000000000..3eaa8274c6f783 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run -A --quiet npm:@denotest/esm-basic/non-existent.js", + "output": "deno_run_no_bin_entrypoint_non_existent_subpath.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/deno_run_no_bin_entrypoint_non_existent_subpath.out b/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out similarity index 100% rename from tests/testdata/npm/deno_run_no_bin_entrypoint_non_existent_subpath.out rename to tests/specs/npm_tests/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_tests/deno_run_non_existent/__test__.jsonc new file mode 100644 index 00000000000000..72dc01450b5da7 --- /dev/null +++ b/tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run npm:mkdirp@0.5.125", + "output": "deno_run_non_existent.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/deno_run_non_existent.out b/tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out similarity index 100% rename from tests/testdata/npm/deno_run_non_existent.out rename to tests/specs/npm_tests/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_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc new file mode 100644 index 00000000000000..24587d928ea91d --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --quiet --no-lock --node-modules-dir=none different_nested_dep/main.js", + "output": "different_nested_dep/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 0 +} diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js new file mode 100644 index 00000000000000..5677eb094a143b --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js @@ -0,0 +1,5 @@ +import dep from "@denotest/different-nested-dep"; +import childDep from "@denotest/different-nested-dep-child"; + +console.log(dep); +console.log(childDep); diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out new file mode 100644 index 00000000000000..1191247b6d9a20 --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out @@ -0,0 +1,2 @@ +1 +2 diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json new file mode 100644 index 00000000000000..c20425851456a7 --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "@denotest/different-nested-dep": "1.0.0", + "@denotest/different-nested-dep-child": "2.0.0" + } +} diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc new file mode 100644 index 00000000000000..0533a992bf21c6 --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --no-lock --quiet --node-modules-dir=auto different_nested_dep/main.js", + "output": "different_nested_dep/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 0 +} diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js new file mode 100644 index 00000000000000..5677eb094a143b --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js @@ -0,0 +1,5 @@ +import dep from "@denotest/different-nested-dep"; +import childDep from "@denotest/different-nested-dep-child"; + +console.log(dep); +console.log(childDep); diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out new file mode 100644 index 00000000000000..1191247b6d9a20 --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out @@ -0,0 +1,2 @@ +1 +2 diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json new file mode 100644 index 00000000000000..c20425851456a7 --- /dev/null +++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "@denotest/different-nested-dep": "1.0.0", + "@denotest/different-nested-dep-child": "2.0.0" + } +} diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc b/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc new file mode 100644 index 00000000000000..8eb6226d6a1cd4 --- /dev/null +++ b/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run directory_import/folder_index_js.ts", + "output": "directory_import/folder_index_js.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/directory_import/folder_index_js.out b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out similarity index 100% rename from tests/testdata/npm/directory_import/folder_index_js.out rename to tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out diff --git a/tests/testdata/npm/directory_import/folder_index_js.ts b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts similarity index 100% rename from tests/testdata/npm/directory_import/folder_index_js.ts rename to tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts diff --git a/tests/testdata/npm/directory_import/folder_no_index.out b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out similarity index 100% rename from tests/testdata/npm/directory_import/folder_no_index.out rename to tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out diff --git a/tests/testdata/npm/directory_import/folder_no_index.ts b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts similarity index 100% rename from tests/testdata/npm/directory_import/folder_no_index.ts rename to tests/specs/npm_tests/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_tests/directory_import_folder_no_index/__test__.jsonc new file mode 100644 index 00000000000000..6137479980c916 --- /dev/null +++ b/tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run directory_import/folder_no_index.ts", + "output": "directory_import/folder_no_index.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out new file mode 100644 index 00000000000000..a700b8fdb6c188 --- /dev/null +++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/@denotest/sub-folders +Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz +error: Directory import [WILDCARD]folder_index_js is not supported resolving import from file:///[WILDCARD]/directory_import/folder_index_js.ts +Did you mean to import index.js within the directory? + +Caused by: + [WILDCARD] diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts new file mode 100644 index 00000000000000..b0d51fcd97d9dc --- /dev/null +++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts @@ -0,0 +1,2 @@ +import test from "npm:@denotest/sub-folders/folder_index_js"; +console.log(test); diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out new file mode 100644 index 00000000000000..844419b4c6a3b1 --- /dev/null +++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out @@ -0,0 +1,6 @@ +Download http://localhost:4260/@denotest/sub-folders +Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz +error: Directory import [WILDCARD]folder_no_index is not supported resolving import from file:///[WILDCARD]/folder_no_index.ts + +Caused by: + [WILDCARD] diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts new file mode 100644 index 00000000000000..4c5fb7ec09e723 --- /dev/null +++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts @@ -0,0 +1,2 @@ +import test from "npm:@denotest/sub-folders/folder_no_index"; +console.log(test); diff --git a/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc b/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc new file mode 100644 index 00000000000000..5ace51cecb8747 --- /dev/null +++ b/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet dual_cjs_esm/main.ts", + "output": "dual_cjs_esm/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out new file mode 100644 index 00000000000000..32e232f11c8c29 --- /dev/null +++ b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out @@ -0,0 +1,3 @@ +esm +cjs +cjs diff --git a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts new file mode 100644 index 00000000000000..4f3b7966789ace --- /dev/null +++ b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts @@ -0,0 +1,6 @@ +import { getKind } from "npm:@denotest/dual-cjs-esm@latest"; // test out @latest dist tag +import * as cjs from "npm:@denotest/dual-cjs-esm@latest/cjs/main.cjs"; + +console.log(getKind()); +console.log(cjs.getKind()); +console.log(cjs.getSubPathKind()); diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc new file mode 100644 index 00000000000000..8dbee51c7ed7d8 --- /dev/null +++ b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --quiet dynamic_import_deno_ts_from_npm/main.ts", + "output": "dynamic_import_deno_ts_from_npm/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/add.ts b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts similarity index 100% rename from tests/testdata/npm/dynamic_import_deno_ts_from_npm/add.ts rename to tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.out b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out similarity index 100% rename from tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.out rename to tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.ts b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts similarity index 100% rename from tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.ts rename to tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/subtract.mts b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts similarity index 100% rename from tests/testdata/npm/dynamic_import_deno_ts_from_npm/subtract.mts rename to tests/specs/npm_tests/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_tests/dynamic_import_invalid_package_name/__test__.jsonc new file mode 100644 index 00000000000000..a15cabf83a0489 --- /dev/null +++ b/tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --reload dynamic_import_invalid_package_name/main.ts", + "output": "dynamic_import_invalid_package_name/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/dynamic_import_invalid_package_name/main.out b/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out similarity index 100% rename from tests/testdata/npm/dynamic_import_invalid_package_name/main.out rename to tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out diff --git a/tests/testdata/npm/dynamic_import_invalid_package_name/main.ts b/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts similarity index 100% rename from tests/testdata/npm/dynamic_import_invalid_package_name/main.ts rename to tests/specs/npm_tests/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_tests/dynamic_import_json/__test__.jsonc new file mode 100644 index 00000000000000..9b4f5a21242a1e --- /dev/null +++ b/tests/specs/npm_tests/dynamic_import_json/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet import_json/main.js", + "output": "import_json/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/import_json/main.js b/tests/specs/npm_tests/dynamic_import_json/import_json/main.js similarity index 100% rename from tests/testdata/npm/import_json/main.js rename to tests/specs/npm_tests/dynamic_import_json/import_json/main.js diff --git a/tests/testdata/npm/import_json/main.out b/tests/specs/npm_tests/dynamic_import_json/import_json/main.out similarity index 100% rename from tests/testdata/npm/import_json/main.out rename to tests/specs/npm_tests/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_tests/dynamic_import_reload_same_package/__test__.jsonc new file mode 100644 index 00000000000000..d255b9a8724b5d --- /dev/null +++ b/tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --reload dynamic_import_reload_same_package/main.ts", + "output": "dynamic_import_reload_same_package/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/dynamic_import_reload_same_package/main.out b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out similarity index 100% rename from tests/testdata/npm/dynamic_import_reload_same_package/main.out rename to tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out diff --git a/tests/testdata/npm/dynamic_import_reload_same_package/main.ts b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts similarity index 100% rename from tests/testdata/npm/dynamic_import_reload_same_package/main.ts rename to tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts diff --git a/tests/testdata/npm/dynamic_import_reload_same_package/other.ts b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts similarity index 100% rename from tests/testdata/npm/dynamic_import_reload_same_package/other.ts rename to tests/specs/npm_tests/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_tests/env_var_re_export_dev/__test__.jsonc new file mode 100644 index 00000000000000..e65ae0308def45 --- /dev/null +++ b/tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --allow-env --quiet env_var_re_export/main.js", + "output": "dev\n", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/env_var_re_export/main.js b/tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js similarity index 100% rename from tests/testdata/npm/env_var_re_export/main.js rename to tests/specs/npm_tests/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_tests/env_var_re_export_prod/__test__.jsonc new file mode 100644 index 00000000000000..6c206ba3e9aeb1 --- /dev/null +++ b/tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --allow-read --allow-env --quiet env_var_re_export/main.js", + "output": "prod\n", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/", + "NODE_ENV": "production" + } +} diff --git a/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js b/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js new file mode 100644 index 00000000000000..ed91487a0ba36b --- /dev/null +++ b/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js @@ -0,0 +1,3 @@ +import { getEnv } from "npm:@denotest/env-var-re-export"; + +console.log(getEnv()); diff --git a/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc b/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc new file mode 100644 index 00000000000000..157e238d8aee21 --- /dev/null +++ b/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run -A --quiet error_version_after_subpath/main.js", + "output": "error_version_after_subpath/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/error_version_after_subpath/main.js b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js similarity index 100% rename from tests/testdata/npm/error_version_after_subpath/main.js rename to tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js diff --git a/tests/testdata/npm/error_version_after_subpath/main.out b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out similarity index 65% rename from tests/testdata/npm/error_version_after_subpath/main.out rename to tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out index 0cdd1b6da01fd1..4e5f03e23c067f 100644 --- a/tests/testdata/npm/error_version_after_subpath/main.out +++ b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out @@ -1,2 +1,2 @@ error: Invalid package specifier 'npm:react-dom/server@18.2.0'. Did you mean to write 'npm:react-dom@18.2.0/server'? - at [WILDCARD]/npm/error_version_after_subpath/main.js:1:8 + at [WILDCARD]/error_version_after_subpath/main.js:1:8 diff --git a/tests/specs/npm_tests/import_json/__test__.jsonc b/tests/specs/npm_tests/import_json/__test__.jsonc new file mode 100644 index 00000000000000..9b4f5a21242a1e --- /dev/null +++ b/tests/specs/npm_tests/import_json/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet import_json/main.js", + "output": "import_json/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/import_json/import_json/main.js b/tests/specs/npm_tests/import_json/import_json/main.js new file mode 100644 index 00000000000000..ac6cee9a830df1 --- /dev/null +++ b/tests/specs/npm_tests/import_json/import_json/main.js @@ -0,0 +1,4 @@ +import json from "npm:@denotest/binary-package@1/package.json" with { + type: "json", +}; +console.log(json); diff --git a/tests/specs/npm_tests/import_json/import_json/main.out b/tests/specs/npm_tests/import_json/import_json/main.out new file mode 100644 index 00000000000000..7db7ec4ea49888 --- /dev/null +++ b/tests/specs/npm_tests/import_json/import_json/main.out @@ -0,0 +1,10 @@ +{ + name: "@denotest/binary-package", + version: "1.0.0", + main: "index.js", + optionalDependencies: { + "@denotest/binary-package-linux": "1.0.0", + "@denotest/binary-package-mac": "1.0.0", + "@denotest/binary-package-windows": "1.0.0" + } +} diff --git a/tests/specs/npm_tests/import_map/__test__.jsonc b/tests/specs/npm_tests/import_map/__test__.jsonc new file mode 100644 index 00000000000000..822acbbe4e17d4 --- /dev/null +++ b/tests/specs/npm_tests/import_map/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --allow-env --import-map import_map/import_map.json import_map/main.js", + "output": "import_map/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/import_map/import_map.json b/tests/specs/npm_tests/import_map/import_map/import_map.json similarity index 100% rename from tests/testdata/npm/import_map/import_map.json rename to tests/specs/npm_tests/import_map/import_map/import_map.json diff --git a/tests/testdata/npm/import_map/main.js b/tests/specs/npm_tests/import_map/import_map/main.js similarity index 100% rename from tests/testdata/npm/import_map/main.js rename to tests/specs/npm_tests/import_map/import_map/main.js diff --git a/tests/testdata/npm/import_map/main.out b/tests/specs/npm_tests/import_map/import_map/main.out similarity index 100% rename from tests/testdata/npm/import_map/main.out rename to tests/specs/npm_tests/import_map/import_map/main.out diff --git a/tests/specs/npm_tests/imports_package_json/__test__.jsonc b/tests/specs/npm_tests/imports_package_json/__test__.jsonc new file mode 100644 index 00000000000000..e11b92132e9d77 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --no-lock --node-modules-dir=none imports_package_json/main.js", + "output": "imports_package_json/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/imports_package_json/import_not_defined.js b/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js similarity index 100% rename from tests/testdata/npm/imports_package_json/import_not_defined.js rename to tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js diff --git a/tests/testdata/npm/imports_package_json/import_not_defined.out b/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out similarity index 100% rename from tests/testdata/npm/imports_package_json/import_not_defined.out rename to tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out diff --git a/tests/testdata/npm/imports_package_json/main.js b/tests/specs/npm_tests/imports_package_json/imports_package_json/main.js similarity index 100% rename from tests/testdata/npm/imports_package_json/main.js rename to tests/specs/npm_tests/imports_package_json/imports_package_json/main.js diff --git a/tests/testdata/npm/imports_package_json/main.out b/tests/specs/npm_tests/imports_package_json/imports_package_json/main.out similarity index 100% rename from tests/testdata/npm/imports_package_json/main.out rename to tests/specs/npm_tests/imports_package_json/imports_package_json/main.out diff --git a/tests/testdata/npm/imports_package_json/package.json b/tests/specs/npm_tests/imports_package_json/imports_package_json/package.json similarity index 100% rename from tests/testdata/npm/imports_package_json/package.json rename to tests/specs/npm_tests/imports_package_json/imports_package_json/package.json diff --git a/tests/testdata/npm/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js similarity index 100% rename from tests/testdata/npm/imports_package_json/sub_path_import_not_defined.js rename to tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js diff --git a/tests/testdata/npm/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out similarity index 100% rename from tests/testdata/npm/imports_package_json/sub_path_import_not_defined.out rename to tests/specs/npm_tests/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_tests/imports_package_json_import_not_defined/__test__.jsonc new file mode 100644 index 00000000000000..0f094838c12441 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --no-lock --node-modules-dir=none imports_package_json/import_not_defined.js", + "output": "imports_package_json/import_not_defined.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js new file mode 100644 index 00000000000000..dc4d2df165e5d7 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js @@ -0,0 +1,3 @@ +import data from "@denotest/imports-package-json/import-not-defined"; + +console.log(data); diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out new file mode 100644 index 00000000000000..70d1145a3741df --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/imports-package-json +Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz +error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js new file mode 100644 index 00000000000000..53090dd948b9af --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js @@ -0,0 +1,7 @@ +import data from "@denotest/imports-package-json"; + +console.log(data.hi); +console.log(data.bye); +console.log(typeof data.fs.readFile); +console.log(typeof data.path.join); +console.log(typeof data.fs2.writeFile); diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out new file mode 100644 index 00000000000000..979e355765e73b --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/@denotest/imports-package-json +Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz +hi +bye +function +function +function diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json new file mode 100644 index 00000000000000..cb6a08d1a51c02 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json @@ -0,0 +1,6 @@ +{ + "name": "my-test", + "dependencies": { + "@denotest/imports-package-json": "1.0.0" + } +} 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_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js new file mode 100644 index 00000000000000..f1097aa0646450 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js @@ -0,0 +1,3 @@ +import data from "@denotest/imports-package-json/sub-path-import-not-defined"; + +console.log(data); 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_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out new file mode 100644 index 00000000000000..7c803f2bf13625 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/imports-package-json +Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz +error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc new file mode 100644 index 00000000000000..f862dc58e41b19 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --no-lock --node-modules-dir=none imports_package_json/sub_path_import_not_defined.js", + "output": "imports_package_json/sub_path_import_not_defined.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} 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_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js new file mode 100644 index 00000000000000..dc4d2df165e5d7 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js @@ -0,0 +1,3 @@ +import data from "@denotest/imports-package-json/import-not-defined"; + +console.log(data); 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_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out new file mode 100644 index 00000000000000..70d1145a3741df --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/imports-package-json +Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz +error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js new file mode 100644 index 00000000000000..53090dd948b9af --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js @@ -0,0 +1,7 @@ +import data from "@denotest/imports-package-json"; + +console.log(data.hi); +console.log(data.bye); +console.log(typeof data.fs.readFile); +console.log(typeof data.path.join); +console.log(typeof data.fs2.writeFile); diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out new file mode 100644 index 00000000000000..979e355765e73b --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/@denotest/imports-package-json +Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz +hi +bye +function +function +function diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json new file mode 100644 index 00000000000000..cb6a08d1a51c02 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json @@ -0,0 +1,6 @@ +{ + "name": "my-test", + "dependencies": { + "@denotest/imports-package-json": "1.0.0" + } +} 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_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js new file mode 100644 index 00000000000000..f1097aa0646450 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js @@ -0,0 +1,3 @@ +import data from "@denotest/imports-package-json/sub-path-import-not-defined"; + +console.log(data); 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_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out new file mode 100644 index 00000000000000..7c803f2bf13625 --- /dev/null +++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/imports-package-json +Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz +error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm_tests/info_chalk_display/__test__.jsonc b/tests/specs/npm_tests/info_chalk_display/__test__.jsonc new file mode 100644 index 00000000000000..998aa6f1db51e2 --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet cjs_with_deps/main.js", + "output": "cjs_with_deps/main_info.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js new file mode 100644 index 00000000000000..568726874ec4ac --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js @@ -0,0 +1,12 @@ +import chalk from "npm:chalk@4"; +import { expect } from "npm:chai@4.3"; + +console.log(chalk.green("chalk cjs loads")); + +const timeout = setTimeout(() => {}, 0); +expect(timeout).to.be.a("number"); +clearTimeout(timeout); + +const interval = setInterval(() => {}, 100); +expect(interval).to.be.a("number"); +clearInterval(interval); diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out new file mode 100644 index 00000000000000..7051c239538def --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out @@ -0,0 +1,33 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Download http://localhost:4260/chai/chai-4.3.6.tgz +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..8e37c88eb00f0c --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..af1ef1351880a7 --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out @@ -0,0 +1,148 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out new file mode 100644 index 00000000000000..1ab3679521744d --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out @@ -0,0 +1,47 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Initialize ansi-styles@4.3.0 +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Initialize assertion-error@1.1.0 +Download http://localhost:4260/chai/chai-4.3.6.tgz +Initialize chai@4.3.6 +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Initialize chalk@4.1.2 +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Initialize check-error@1.0.2 +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Initialize color-convert@2.0.1 +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Initialize color-name@1.1.4 +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Initialize deep-eql@3.0.1 +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Initialize get-func-name@2.0.0 +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Initialize has-flag@4.0.0 +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Initialize loupe@2.3.4 +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Initialize pathval@1.1.1 +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Initialize supports-color@7.2.0 +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +Initialize type-detect@4.0.8 +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc new file mode 100644 index 00000000000000..5dd35f5a4a2b9a --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet --node-modules-dir cjs_with_deps/main.js", + "output": "cjs_with_deps/main_info.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js new file mode 100644 index 00000000000000..568726874ec4ac --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js @@ -0,0 +1,12 @@ +import chalk from "npm:chalk@4"; +import { expect } from "npm:chai@4.3"; + +console.log(chalk.green("chalk cjs loads")); + +const timeout = setTimeout(() => {}, 0); +expect(timeout).to.be.a("number"); +clearTimeout(timeout); + +const interval = setInterval(() => {}, 100); +expect(interval).to.be.a("number"); +clearInterval(interval); diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out new file mode 100644 index 00000000000000..7051c239538def --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out @@ -0,0 +1,33 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Download http://localhost:4260/chai/chai-4.3.6.tgz +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..8e37c88eb00f0c --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..af1ef1351880a7 --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out @@ -0,0 +1,148 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out new file mode 100644 index 00000000000000..1ab3679521744d --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out @@ -0,0 +1,47 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Initialize ansi-styles@4.3.0 +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Initialize assertion-error@1.1.0 +Download http://localhost:4260/chai/chai-4.3.6.tgz +Initialize chai@4.3.6 +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Initialize chalk@4.1.2 +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Initialize check-error@1.0.2 +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Initialize color-convert@2.0.1 +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Initialize color-name@1.1.4 +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Initialize deep-eql@3.0.1 +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Initialize get-func-name@2.0.0 +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Initialize has-flag@4.0.0 +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Initialize loupe@2.3.4 +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Initialize pathval@1.1.1 +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Initialize supports-color@7.2.0 +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +Initialize type-detect@4.0.8 +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_json/__test__.jsonc b/tests/specs/npm_tests/info_chalk_json/__test__.jsonc new file mode 100644 index 00000000000000..12c8b9b615a188 --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet --json cjs_with_deps/main.js", + "output": "cjs_with_deps/main_info_json.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js new file mode 100644 index 00000000000000..568726874ec4ac --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js @@ -0,0 +1,12 @@ +import chalk from "npm:chalk@4"; +import { expect } from "npm:chai@4.3"; + +console.log(chalk.green("chalk cjs loads")); + +const timeout = setTimeout(() => {}, 0); +expect(timeout).to.be.a("number"); +clearTimeout(timeout); + +const interval = setInterval(() => {}, 100); +expect(interval).to.be.a("number"); +clearInterval(interval); diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out new file mode 100644 index 00000000000000..7051c239538def --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out @@ -0,0 +1,33 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Download http://localhost:4260/chai/chai-4.3.6.tgz +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..8e37c88eb00f0c --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..af1ef1351880a7 --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out @@ -0,0 +1,148 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out new file mode 100644 index 00000000000000..1ab3679521744d --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out @@ -0,0 +1,47 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Initialize ansi-styles@4.3.0 +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Initialize assertion-error@1.1.0 +Download http://localhost:4260/chai/chai-4.3.6.tgz +Initialize chai@4.3.6 +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Initialize chalk@4.1.2 +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Initialize check-error@1.0.2 +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Initialize color-convert@2.0.1 +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Initialize color-name@1.1.4 +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Initialize deep-eql@3.0.1 +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Initialize get-func-name@2.0.0 +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Initialize has-flag@4.0.0 +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Initialize loupe@2.3.4 +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Initialize pathval@1.1.1 +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Initialize supports-color@7.2.0 +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +Initialize type-detect@4.0.8 +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc new file mode 100644 index 00000000000000..1b34f48137c2ba --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet --node-modules-dir --json cjs_with_deps/main.js", + "output": "cjs_with_deps/main_info_json.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js new file mode 100644 index 00000000000000..568726874ec4ac --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js @@ -0,0 +1,12 @@ +import chalk from "npm:chalk@4"; +import { expect } from "npm:chai@4.3"; + +console.log(chalk.green("chalk cjs loads")); + +const timeout = setTimeout(() => {}, 0); +expect(timeout).to.be.a("number"); +clearTimeout(timeout); + +const interval = setInterval(() => {}, 100); +expect(interval).to.be.a("number"); +clearInterval(interval); diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out new file mode 100644 index 00000000000000..7051c239538def --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out @@ -0,0 +1,33 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Download http://localhost:4260/chai/chai-4.3.6.tgz +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..8e37c88eb00f0c --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..af1ef1351880a7 --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out @@ -0,0 +1,148 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out new file mode 100644 index 00000000000000..1ab3679521744d --- /dev/null +++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out @@ -0,0 +1,47 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Initialize ansi-styles@4.3.0 +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Initialize assertion-error@1.1.0 +Download http://localhost:4260/chai/chai-4.3.6.tgz +Initialize chai@4.3.6 +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Initialize chalk@4.1.2 +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Initialize check-error@1.0.2 +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Initialize color-convert@2.0.1 +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Initialize color-name@1.1.4 +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Initialize deep-eql@3.0.1 +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Initialize get-func-name@2.0.0 +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Initialize has-flag@4.0.0 +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Initialize loupe@2.3.4 +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Initialize pathval@1.1.1 +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Initialize supports-color@7.2.0 +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +Initialize type-detect@4.0.8 +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc b/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc new file mode 100644 index 00000000000000..7587fbcb6e962e --- /dev/null +++ b/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet npm:chalk@4", + "output": "info/chalk.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/info/chalk.out b/tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out similarity index 100% rename from tests/testdata/npm/info/chalk.out rename to tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out diff --git a/tests/testdata/npm/info/chalk_json.out b/tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out similarity index 100% rename from tests/testdata/npm/info/chalk_json.out rename to tests/specs/npm_tests/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_tests/info_cli_chalk_json/__test__.jsonc new file mode 100644 index 00000000000000..b5173fd93fbec2 --- /dev/null +++ b/tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet --json npm:chalk@4", + "output": "info/chalk_json.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out new file mode 100644 index 00000000000000..63fa20da54a509 --- /dev/null +++ b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out @@ -0,0 +1,9 @@ +dependencies: 5 unique +size: [WILDCARD] + +npm:/chalk@4.1.2 ([WILDCARD]) +├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ └── npm:/color-name@1.1.4 ([WILDCARD]) +└─┬ npm:/supports-color@7.2.0 ([WILDCARD]) + └── npm:/has-flag@4.0.0 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out new file mode 100644 index 00000000000000..d54155270b1679 --- /dev/null +++ b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out @@ -0,0 +1,57 @@ +{ + "roots": [ + "npm:chalk@4" + ], + "modules": [ + { + "kind": "npm", + "specifier": "npm:/chalk@4.1.2", + "npmPackage": "chalk@4.1.2" + } + ], + "redirects": { + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + } + } +} diff --git a/tests/specs/npm_tests/info_peer_deps/__test__.jsonc b/tests/specs/npm_tests/info_peer_deps/__test__.jsonc new file mode 100644 index 00000000000000..e505f30774aba6 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet peer_deps_with_copied_folders/main.ts", + "output": "peer_deps_with_copied_folders/main_info.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out new file mode 100644 index 00000000000000..3c133bcde42a3b --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out @@ -0,0 +1,14 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child +Download http://localhost:4260/@denotest/peer-dep-test-grandchild +Download http://localhost:4260/@denotest/peer-dep-test-peer +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz +[UNORDERED_END] +1 +2 diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts new file mode 100644 index 00000000000000..a8ea8104a9daf9 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts @@ -0,0 +1,5 @@ +import version1 from "npm:@denotest/peer-dep-test-child@1"; +import version2 from "npm:@denotest/peer-dep-test-child@2"; + +console.error(version1); +console.error(version2); diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out new file mode 100644 index 00000000000000..e8b92399df6c47 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out @@ -0,0 +1,14 @@ +local: [WILDCARD]main.ts +type: TypeScript +dependencies: 6 unique +size: [WILDCARD] + +file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B) +├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) +│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) +│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) +│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) +└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD]) + ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD]) + │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) + └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out new file mode 100644 index 00000000000000..1a5f07c9712201 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out @@ -0,0 +1,97 @@ +{ + "roots": [ + "[WILDCARD]/peer_deps_with_copied_folders/main.ts" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:@denotest/peer-dep-test-child@1", + "code": { + "specifier": "npm:@denotest/peer-dep-test-child@1", + "span": { + "start": { + "line": 0, + "character": 21 + }, + "end": { + "line": 0, + "character": 58 + } + } + }, + "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0" + }, + { + "specifier": "npm:@denotest/peer-dep-test-child@2", + "code": { + "specifier": "npm:@denotest/peer-dep-test-child@2", + "span": { + "start": { + "line": 1, + "character": 21 + }, + "end": { + "line": 1, + "character": 58 + } + } + }, + "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0" + } + ], + "local": "[WILDCARD]main.ts", + "size": 171, + "mediaType": "TypeScript", + "specifier": "file://[WILDCARD]/main.ts" + } + ], + "redirects": { + "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", + "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" + }, + "version": 1, + "npmPackages": { + "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { + "name": "@denotest/peer-dep-test-child", + "version": "1.0.0", + "dependencies": [ + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0", + "@denotest/peer-dep-test-peer@1.0.0" + ] + }, + "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": { + "name": "@denotest/peer-dep-test-child", + "version": "2.0.0", + "dependencies": [ + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0", + "@denotest/peer-dep-test-peer@2.0.0" + ] + }, + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { + "name": "@denotest/peer-dep-test-grandchild", + "version": "1.0.0", + "dependencies": [ + "@denotest/peer-dep-test-peer@1.0.0" + ] + }, + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": { + "name": "@denotest/peer-dep-test-grandchild", + "version": "1.0.0", + "dependencies": [ + "@denotest/peer-dep-test-peer@2.0.0" + ] + }, + "@denotest/peer-dep-test-peer@1.0.0": { + "name": "@denotest/peer-dep-test-peer", + "version": "1.0.0", + "dependencies": [] + }, + "@denotest/peer-dep-test-peer@2.0.0": { + "name": "@denotest/peer-dep-test-peer", + "version": "2.0.0", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out new file mode 100644 index 00000000000000..02b5cbafd65ee9 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out @@ -0,0 +1,9 @@ +[UNORDERED_START] +Initialize @denotest/peer-dep-test-child@1.0.0 +Initialize @denotest/peer-dep-test-child@2.0.0 +Initialize @denotest/peer-dep-test-grandchild@1.0.0 +Initialize @denotest/peer-dep-test-peer@1.0.0 +Initialize @denotest/peer-dep-test-peer@2.0.0 +[UNORDERED_END] +1 +2 diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out new file mode 100644 index 00000000000000..9c8145211899e1 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out @@ -0,0 +1,19 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child +Download http://localhost:4260/@denotest/peer-dep-test-grandchild +Download http://localhost:4260/@denotest/peer-dep-test-peer +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz +Initialize @denotest/peer-dep-test-child@1.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz +Initialize @denotest/peer-dep-test-child@2.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz +Initialize @denotest/peer-dep-test-grandchild@1.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz +Initialize @denotest/peer-dep-test-peer@1.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz +Initialize @denotest/peer-dep-test-peer@2.0.0 +[UNORDERED_END] +1 +2 diff --git a/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc b/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc new file mode 100644 index 00000000000000..9a630add4505f9 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "info --quiet --json peer_deps_with_copied_folders/main.ts", + "output": "peer_deps_with_copied_folders/main_info_json.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out new file mode 100644 index 00000000000000..3c133bcde42a3b --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out @@ -0,0 +1,14 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child +Download http://localhost:4260/@denotest/peer-dep-test-grandchild +Download http://localhost:4260/@denotest/peer-dep-test-peer +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz +Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz +[UNORDERED_END] +1 +2 diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts new file mode 100644 index 00000000000000..a8ea8104a9daf9 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts @@ -0,0 +1,5 @@ +import version1 from "npm:@denotest/peer-dep-test-child@1"; +import version2 from "npm:@denotest/peer-dep-test-child@2"; + +console.error(version1); +console.error(version2); diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out new file mode 100644 index 00000000000000..e8b92399df6c47 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out @@ -0,0 +1,14 @@ +local: [WILDCARD]main.ts +type: TypeScript +dependencies: 6 unique +size: [WILDCARD] + +file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B) +├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) +│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) +│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) +│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) +└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD]) + ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD]) + │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) + └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out new file mode 100644 index 00000000000000..1a5f07c9712201 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out @@ -0,0 +1,97 @@ +{ + "roots": [ + "[WILDCARD]/peer_deps_with_copied_folders/main.ts" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:@denotest/peer-dep-test-child@1", + "code": { + "specifier": "npm:@denotest/peer-dep-test-child@1", + "span": { + "start": { + "line": 0, + "character": 21 + }, + "end": { + "line": 0, + "character": 58 + } + } + }, + "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0" + }, + { + "specifier": "npm:@denotest/peer-dep-test-child@2", + "code": { + "specifier": "npm:@denotest/peer-dep-test-child@2", + "span": { + "start": { + "line": 1, + "character": 21 + }, + "end": { + "line": 1, + "character": 58 + } + } + }, + "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0" + } + ], + "local": "[WILDCARD]main.ts", + "size": 171, + "mediaType": "TypeScript", + "specifier": "file://[WILDCARD]/main.ts" + } + ], + "redirects": { + "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", + "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" + }, + "version": 1, + "npmPackages": { + "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { + "name": "@denotest/peer-dep-test-child", + "version": "1.0.0", + "dependencies": [ + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0", + "@denotest/peer-dep-test-peer@1.0.0" + ] + }, + "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": { + "name": "@denotest/peer-dep-test-child", + "version": "2.0.0", + "dependencies": [ + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0", + "@denotest/peer-dep-test-peer@2.0.0" + ] + }, + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { + "name": "@denotest/peer-dep-test-grandchild", + "version": "1.0.0", + "dependencies": [ + "@denotest/peer-dep-test-peer@1.0.0" + ] + }, + "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": { + "name": "@denotest/peer-dep-test-grandchild", + "version": "1.0.0", + "dependencies": [ + "@denotest/peer-dep-test-peer@2.0.0" + ] + }, + "@denotest/peer-dep-test-peer@1.0.0": { + "name": "@denotest/peer-dep-test-peer", + "version": "1.0.0", + "dependencies": [] + }, + "@denotest/peer-dep-test-peer@2.0.0": { + "name": "@denotest/peer-dep-test-peer", + "version": "2.0.0", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out new file mode 100644 index 00000000000000..02b5cbafd65ee9 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out @@ -0,0 +1,9 @@ +[UNORDERED_START] +Initialize @denotest/peer-dep-test-child@1.0.0 +Initialize @denotest/peer-dep-test-child@2.0.0 +Initialize @denotest/peer-dep-test-grandchild@1.0.0 +Initialize @denotest/peer-dep-test-peer@1.0.0 +Initialize @denotest/peer-dep-test-peer@2.0.0 +[UNORDERED_END] +1 +2 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_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out new file mode 100644 index 00000000000000..9c8145211899e1 --- /dev/null +++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out @@ -0,0 +1,19 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child +Download http://localhost:4260/@denotest/peer-dep-test-grandchild +Download http://localhost:4260/@denotest/peer-dep-test-peer +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz +Initialize @denotest/peer-dep-test-child@1.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz +Initialize @denotest/peer-dep-test-child@2.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz +Initialize @denotest/peer-dep-test-grandchild@1.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz +Initialize @denotest/peer-dep-test-peer@1.0.0 +Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz +Initialize @denotest/peer-dep-test-peer@2.0.0 +[UNORDERED_END] +1 +2 diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc b/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc new file mode 100644 index 00000000000000..cc9359aab250bd --- /dev/null +++ b/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run mixed_case_package_name/global.ts", + "output": "mixed_case_package_name/global.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/mixed_case_package_name/global.out b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out similarity index 100% rename from tests/testdata/npm/mixed_case_package_name/global.out rename to tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out diff --git a/tests/testdata/npm/mixed_case_package_name/global.ts b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts similarity index 100% rename from tests/testdata/npm/mixed_case_package_name/global.ts rename to tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts diff --git a/tests/testdata/npm/mixed_case_package_name/local.out b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out similarity index 100% rename from tests/testdata/npm/mixed_case_package_name/local.out rename to tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out diff --git a/tests/testdata/npm/mixed_case_package_name/local.ts b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts similarity index 100% rename from tests/testdata/npm/mixed_case_package_name/local.ts rename to tests/specs/npm_tests/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_tests/mixed_case_package_name_local_dir/__test__.jsonc new file mode 100644 index 00000000000000..0778cb56244745 --- /dev/null +++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --node-modules-dir=auto -A mixed_case_package_name/local.ts", + "output": "mixed_case_package_name/local.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out new file mode 100644 index 00000000000000..fdacea3852735e --- /dev/null +++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out @@ -0,0 +1,9 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/MixedCase +Download http://localhost:4260/@denotest/CAPITALS +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz +Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz +[UNORDERED_END] +5 diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts new file mode 100644 index 00000000000000..a721b3d7846fee --- /dev/null +++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts @@ -0,0 +1,2 @@ +import value from "npm:@denotest/MixedCase"; +console.log(value); diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out new file mode 100644 index 00000000000000..6ab989d80c3d13 --- /dev/null +++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out @@ -0,0 +1,13 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/MixedCase +Download http://localhost:4260/@denotest/CAPITALS +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz +Initialize @denotest/CAPITALS@1.0.0 +Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz +Initialize @denotest/MixedCase@1.0.0 +[UNORDERED_END] +5 +true +true diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts new file mode 100644 index 00000000000000..6ca6cb581a503e --- /dev/null +++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts @@ -0,0 +1,18 @@ +import value from "npm:@denotest/MixedCase"; +console.log(value); +console.log(pathExists("./node_modules/.deno")); +console.log( + pathExists("./node_modules/.deno/_ibsgk3tporsxg5bpinavaskuifgfg@1.0.0"), +); + +function pathExists(filePath: string) { + try { + Deno.lstatSync(filePath); + return true; + } catch (error) { + if (error instanceof Deno.errors.NotFound) { + return false; + } + throw error; + } +} diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc b/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc new file mode 100644 index 00000000000000..377fd05eabc049 --- /dev/null +++ b/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --quiet node_modules_deno_node_modules/main.ts", + "output": "node_modules_deno_node_modules/main.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/node_modules_deno_node_modules/main.out b/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out similarity index 100% rename from tests/testdata/npm/node_modules_deno_node_modules/main.out rename to tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out diff --git a/tests/testdata/npm/node_modules_deno_node_modules/main.ts b/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts similarity index 100% rename from tests/testdata/npm/node_modules_deno_node_modules/main.ts rename to tests/specs/npm_tests/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_tests/node_modules_deno_node_modules_local/__test__.jsonc new file mode 100644 index 00000000000000..a1e67b32bad7bf --- /dev/null +++ b/tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --quiet --node-modules-dir node_modules_deno_node_modules/main.ts", + "output": "node_modules_deno_node_modules/main.out", + "exitCode": 0, + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out new file mode 100644 index 00000000000000..1ebdb2dd57bb55 --- /dev/null +++ b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out @@ -0,0 +1,2 @@ +esm +esm diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts new file mode 100644 index 00000000000000..6e4a32d8e838b8 --- /dev/null +++ b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts @@ -0,0 +1,7 @@ +import { getKind as getKind1 } from "npm:@denotest/dual-cjs-esm-dep"; +// this should still be able to be resolved even though it's missing the +// "@denotest/dual-cjs-esm" package because the above import will resolve it +import { getKind as getKind2 } from "npm:@denotest/dual-cjs-esm-dep-missing"; + +console.log(getKind1()); +console.log(getKind2()); diff --git a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc new file mode 100644 index 00000000000000..5813bb3f21f35b --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --node-modules-dir=auto -A --quiet require_added_nm_folder/main.js", + "output": "require_added_nm_folder/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 0 +} diff --git a/tests/testdata/npm/require_added_nm_folder/main.js b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js similarity index 100% rename from tests/testdata/npm/require_added_nm_folder/main.js rename to tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js diff --git a/tests/testdata/npm/require_added_nm_folder/main.out b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out similarity index 100% rename from tests/testdata/npm/require_added_nm_folder/main.out rename to tests/specs/npm_tests/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_tests/node_modules_dir_require_main_entry/__test__.jsonc new file mode 100644 index 00000000000000..45936f1de2a638 --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --node-modules-dir -A --quiet require_main/main.js", + "output": "require_main/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 0 +} diff --git a/tests/testdata/npm/require_main/main.js b/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js similarity index 100% rename from tests/testdata/npm/require_main/main.js rename to tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js diff --git a/tests/testdata/npm/require_main/main.out b/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out similarity index 100% rename from tests/testdata/npm/require_main/main.out rename to tests/specs/npm_tests/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_tests/node_modules_dir_with_deps/__test__.jsonc new file mode 100644 index 00000000000000..ae79e8a47263bc --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --allow-env --node-modules-dir=auto cjs_with_deps/main.js", + "output": "cjs_with_deps/main_node_modules.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js new file mode 100644 index 00000000000000..568726874ec4ac --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js @@ -0,0 +1,12 @@ +import chalk from "npm:chalk@4"; +import { expect } from "npm:chai@4.3"; + +console.log(chalk.green("chalk cjs loads")); + +const timeout = setTimeout(() => {}, 0); +expect(timeout).to.be.a("number"); +clearTimeout(timeout); + +const interval = setInterval(() => {}, 100); +expect(interval).to.be.a("number"); +clearInterval(interval); diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out new file mode 100644 index 00000000000000..7051c239538def --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out @@ -0,0 +1,33 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Download http://localhost:4260/chai/chai-4.3.6.tgz +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..bcaaf1eecf26fe --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/npm/cjs_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..af1ef1351880a7 --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out @@ -0,0 +1,148 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "version": 1, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out new file mode 100644 index 00000000000000..1ab3679521744d --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out @@ -0,0 +1,47 @@ +[UNORDERED_START] +Download http://localhost:4260/chalk +Download http://localhost:4260/chai +Download http://localhost:4260/ansi-styles +Download http://localhost:4260/supports-color +Download http://localhost:4260/assertion-error +Download http://localhost:4260/check-error +Download http://localhost:4260/deep-eql +Download http://localhost:4260/get-func-name +Download http://localhost:4260/loupe +Download http://localhost:4260/pathval +Download http://localhost:4260/type-detect +Download http://localhost:4260/color-convert +Download http://localhost:4260/has-flag +Download http://localhost:4260/color-name +[UNORDERED_END] +[UNORDERED_START] +Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz +Initialize ansi-styles@4.3.0 +Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz +Initialize assertion-error@1.1.0 +Download http://localhost:4260/chai/chai-4.3.6.tgz +Initialize chai@4.3.6 +Download http://localhost:4260/chalk/chalk-4.1.2.tgz +Initialize chalk@4.1.2 +Download http://localhost:4260/check-error/check-error-1.0.2.tgz +Initialize check-error@1.0.2 +Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz +Initialize color-convert@2.0.1 +Download http://localhost:4260/color-name/color-name-1.1.4.tgz +Initialize color-name@1.1.4 +Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz +Initialize deep-eql@3.0.1 +Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz +Initialize get-func-name@2.0.0 +Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz +Initialize has-flag@4.0.0 +Download http://localhost:4260/loupe/loupe-2.3.4.tgz +Initialize loupe@2.3.4 +Download http://localhost:4260/pathval/pathval-1.1.1.tgz +Initialize pathval@1.1.1 +Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz +Initialize supports-color@7.2.0 +Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz +Initialize type-detect@4.0.8 +[UNORDERED_END] +chalk cjs loads diff --git a/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc b/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc new file mode 100644 index 00000000000000..8aa139a51da8c8 --- /dev/null +++ b/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read --allow-env --node-modules-dir=auto cjs_yargs/main.js", + "output": "cjs_yargs/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/cjs_yargs/main.js b/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js similarity index 100% rename from tests/testdata/npm/cjs_yargs/main.js rename to tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js diff --git a/tests/testdata/npm/cjs_yargs/main.out b/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out similarity index 100% rename from tests/testdata/npm/cjs_yargs/main.out rename to tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out diff --git a/tests/specs/npm_tests/non_existent_dep/__test__.jsonc b/tests/specs/npm_tests/non_existent_dep/__test__.jsonc new file mode 100644 index 00000000000000..a437084210c082 --- /dev/null +++ b/tests/specs/npm_tests/non_existent_dep/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "cache npm:@denotest/non-existent-dep", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1, + "output": "[UNORDERED_START]\nDownload http://localhost:4260/@denotest/non-existent-dep\nDownload http://localhost:4260/@denotest/non-existent\n[UNORDERED_END]\nerror: npm package '@denotest/non-existent' does not exist.\n" +} diff --git a/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc b/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc new file mode 100644 index 00000000000000..19cd713e2e3897 --- /dev/null +++ b/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "cache npm:@denotest/non-existent-dep-version", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1, + "output": "[UNORDERED_START]\nDownload http://localhost:4260/@denotest/non-existent-dep-version\nDownload http://localhost:4260/@denotest/esm-basic\n[UNORDERED_END]\nerror: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n" +} diff --git a/tests/specs/npm_tests/nonexistent_file/__test__.jsonc b/tests/specs/npm_tests/nonexistent_file/__test__.jsonc new file mode 100644 index 00000000000000..efbda98d28964e --- /dev/null +++ b/tests/specs/npm_tests/nonexistent_file/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run -A --quiet nonexistent_file/main.js", + "output": "nonexistent_file/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/nonexistent_file/main.js b/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js similarity index 100% rename from tests/testdata/npm/nonexistent_file/main.js rename to tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js diff --git a/tests/testdata/npm/nonexistent_file/main.out b/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out similarity index 100% rename from tests/testdata/npm/nonexistent_file/main.out rename to tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc new file mode 100644 index 00000000000000..28da47300b3ecb --- /dev/null +++ b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run -A --quiet --node-modules-dir nonexistent_file/main.js", + "output": "nonexistent_file/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js new file mode 100644 index 00000000000000..c480b0548fdfcd --- /dev/null +++ b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js @@ -0,0 +1,2 @@ +import hmacSHA512 from "npm:crypto-js/non-existent"; +console.log(hmacSHA512); diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out new file mode 100644 index 00000000000000..baa79b1ceff9e3 --- /dev/null +++ b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out @@ -0,0 +1,4 @@ +error: Unable to load [WILDCARD]non-existent imported from [WILDCARD]main.js + +Caused by: +[WILDCARD] diff --git a/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc b/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc new file mode 100644 index 00000000000000..58f917f7359e37 --- /dev/null +++ b/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run --allow-read permissions_outside_package/main.ts", + "output": "permissions_outside_package/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/permissions_outside_package/foo/config.js b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js similarity index 100% rename from tests/testdata/npm/permissions_outside_package/foo/config.js rename to tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js diff --git a/tests/testdata/npm/permissions_outside_package/foo/package.json b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json similarity index 100% rename from tests/testdata/npm/permissions_outside_package/foo/package.json rename to tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json diff --git a/tests/testdata/npm/permissions_outside_package/main.out b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out similarity index 100% rename from tests/testdata/npm/permissions_outside_package/main.out rename to tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out diff --git a/tests/testdata/npm/permissions_outside_package/main.ts b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts similarity index 63% rename from tests/testdata/npm/permissions_outside_package/main.ts rename to tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts index b0b82b6260cc8c..934a3eebcfaf7c 100644 --- a/tests/testdata/npm/permissions_outside_package/main.ts +++ b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts @@ -1,5 +1,5 @@ import { loadConfigFile } from "npm:@denotest/permissions-outside-package"; -const fileName = `${Deno.cwd()}/npm/permissions_outside_package/foo/config.js`; +const fileName = `${Deno.cwd()}/permissions_outside_package/foo/config.js`; const config = loadConfigFile(fileName); console.log(config); diff --git a/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc b/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc new file mode 100644 index 00000000000000..416024f0cd5cd4 --- /dev/null +++ b/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run --quiet -A remote_npm_specifier/main.ts", + "output": "remote_npm_specifier/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 0 +} diff --git a/tests/testdata/npm/remote_npm_specifier/main.out b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out similarity index 100% rename from tests/testdata/npm/remote_npm_specifier/main.out rename to tests/specs/npm_tests/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_tests/remote_npm_specifier/remote_npm_specifier/main.ts new file mode 100644 index 00000000000000..ea9442059edcd6 --- /dev/null +++ b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts @@ -0,0 +1 @@ +import "./remote.ts"; diff --git a/tests/testdata/npm/remote_npm_specifier/remote.ts b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts similarity index 100% rename from tests/testdata/npm/remote_npm_specifier/remote.ts rename to tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts diff --git a/tests/specs/npm_tests/require_esm/__test__.jsonc b/tests/specs/npm_tests/require_esm/__test__.jsonc new file mode 100644 index 00000000000000..83859c8f102d57 --- /dev/null +++ b/tests/specs/npm_tests/require_esm/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --allow-read --quiet require_esm/main.ts", + "output": "require_esm/main.out" +} diff --git a/tests/specs/npm_tests/require_esm/require_esm/esm.js b/tests/specs/npm_tests/require_esm/require_esm/esm.js new file mode 100644 index 00000000000000..0613f1911a3a75 --- /dev/null +++ b/tests/specs/npm_tests/require_esm/require_esm/esm.js @@ -0,0 +1 @@ +export class Test {} diff --git a/tests/specs/npm_tests/require_esm/require_esm/main.out b/tests/specs/npm_tests/require_esm/require_esm/main.out new file mode 100644 index 00000000000000..aab0d5c28565ea --- /dev/null +++ b/tests/specs/npm_tests/require_esm/require_esm/main.out @@ -0,0 +1 @@ +[Module: null prototype] { Test: [class Test] } diff --git a/tests/specs/npm_tests/require_esm/require_esm/main.ts b/tests/specs/npm_tests/require_esm/require_esm/main.ts new file mode 100644 index 00000000000000..67ac808f06fe49 --- /dev/null +++ b/tests/specs/npm_tests/require_esm/require_esm/main.ts @@ -0,0 +1,5 @@ +import { createRequire } from "node:module"; + +const require = createRequire(import.meta.url); + +console.log(require("./esm.js")); diff --git a/tests/specs/npm_tests/require_json/__test__.jsonc b/tests/specs/npm_tests/require_json/__test__.jsonc new file mode 100644 index 00000000000000..43af6230f6860a --- /dev/null +++ b/tests/specs/npm_tests/require_json/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet require_json/main.js", + "output": "require_json/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/require_json/main.js b/tests/specs/npm_tests/require_json/require_json/main.js similarity index 100% rename from tests/testdata/npm/require_json/main.js rename to tests/specs/npm_tests/require_json/require_json/main.js diff --git a/tests/testdata/npm/require_json/main.out b/tests/specs/npm_tests/require_json/require_json/main.out similarity index 100% rename from tests/testdata/npm/require_json/main.out rename to tests/specs/npm_tests/require_json/require_json/main.out diff --git a/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc b/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc new file mode 100644 index 00000000000000..d2f6ae7c29b559 --- /dev/null +++ b/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run reserved_word_exports/main.ts", + "output": "reserved_word_exports/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/reserved_word_exports/main.out b/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out similarity index 100% rename from tests/testdata/npm/reserved_word_exports/main.out rename to tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out diff --git a/tests/testdata/npm/reserved_word_exports/main.ts b/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts similarity index 100% rename from tests/testdata/npm/reserved_word_exports/main.ts rename to tests/specs/npm_tests/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_tests/run_existing_npm_package_with_subpath/__test__.jsonc new file mode 100644 index 00000000000000..bc76b00be5c810 --- /dev/null +++ b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "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": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/run_existing_npm_package_with_subpath/main.out b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out similarity index 100% rename from tests/testdata/npm/run_existing_npm_package_with_subpath/main.out rename to tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out diff --git a/tests/testdata/npm/run_existing_npm_package_with_subpath/package.json b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json similarity index 100% rename from tests/testdata/npm/run_existing_npm_package_with_subpath/package.json rename to tests/specs/npm_tests/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_tests/sub_paths/__test__.jsonc new file mode 100644 index 00000000000000..88ccbc3ac4d5c3 --- /dev/null +++ b/tests/specs/npm_tests/sub_paths/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet sub_paths/main.jsx", + "output": "sub_paths/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/sub_paths/main.jsx b/tests/specs/npm_tests/sub_paths/sub_paths/main.jsx similarity index 100% rename from tests/testdata/npm/sub_paths/main.jsx rename to tests/specs/npm_tests/sub_paths/sub_paths/main.jsx diff --git a/tests/testdata/npm/sub_paths/main.out b/tests/specs/npm_tests/sub_paths/sub_paths/main.out similarity index 100% rename from tests/testdata/npm/sub_paths/main.out rename to tests/specs/npm_tests/sub_paths/sub_paths/main.out diff --git a/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc b/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc new file mode 100644 index 00000000000000..7cf4a608300a85 --- /dev/null +++ b/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet tarball_with_global_header/main.js", + "output": "tarball_with_global_header/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/tarball_with_global_header/main.js b/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js similarity index 100% rename from tests/testdata/npm/tarball_with_global_header/main.js rename to tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js diff --git a/tests/testdata/npm/tarball_with_global_header/main.out b/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out similarity index 100% rename from tests/testdata/npm/tarball_with_global_header/main.out rename to tests/specs/npm_tests/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_tests/translate_cjs_to_esm/__test__.jsonc new file mode 100644 index 00000000000000..e1344493cd7a18 --- /dev/null +++ b/tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "run -A --quiet translate_cjs_to_esm/main.js", + "output": "translate_cjs_to_esm/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/translate_cjs_to_esm/main.js b/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js similarity index 100% rename from tests/testdata/npm/translate_cjs_to_esm/main.js rename to tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js diff --git a/tests/testdata/npm/translate_cjs_to_esm/main.out b/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out similarity index 100% rename from tests/testdata/npm/translate_cjs_to_esm/main.out rename to tests/specs/npm_tests/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_tests/types_ambient_module/__test__.jsonc new file mode 100644 index 00000000000000..fc60b34332e253 --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check --quiet types_ambient_module/main.ts", + "output": "types_ambient_module/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/types_ambient_module/import_map.json b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json similarity index 100% rename from tests/testdata/npm/types_ambient_module/import_map.json rename to tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json diff --git a/tests/testdata/npm/types_ambient_module/main.out b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out similarity index 100% rename from tests/testdata/npm/types_ambient_module/main.out rename to tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out diff --git a/tests/testdata/npm/types_ambient_module/main.ts b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts similarity index 100% rename from tests/testdata/npm/types_ambient_module/main.ts rename to tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts diff --git a/tests/testdata/npm/types_ambient_module/main_import_map.out b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out similarity index 100% rename from tests/testdata/npm/types_ambient_module/main_import_map.out rename to tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out diff --git a/tests/testdata/npm/types_ambient_module/main_import_map.ts b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts similarity index 100% rename from tests/testdata/npm/types_ambient_module/main_import_map.ts rename to tests/specs/npm_tests/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_tests/types_ambient_module_import_map/__test__.jsonc new file mode 100644 index 00000000000000..2e8c9b60b93198 --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check --quiet --import-map=types_ambient_module/import_map.json types_ambient_module/main_import_map.ts", + "output": "types_ambient_module/main_import_map.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json new file mode 100644 index 00000000000000..f61d99b474f319 --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json @@ -0,0 +1,5 @@ +{ + "imports": { + "types-ambient": "npm:@denotest/types-ambient" + } +} diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out new file mode 100644 index 00000000000000..c84130707ef3b5 --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out @@ -0,0 +1,21 @@ +error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? +console.log(import1.Test2); // should error + ~~~~~ + at file:///[WILDCARD]/types_ambient_module/main.ts:5:21 + + 'Test' is declared here. + class Test { + ~~~~ + at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 + +TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? +console.log(import2.Test2); // should error + ~~~~~ + at file:///[WILDCARD]/types_ambient_module/main.ts:7:21 + + 'Test' is declared here. + class Test { + ~~~~ + at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 + +Found 2 errors. diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts new file mode 100644 index 00000000000000..8f77cabe8e7490 --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts @@ -0,0 +1,7 @@ +import * as import1 from "npm:@denotest/types-ambient"; +import * as import2 from "npm:@denotest/types-ambient@1"; + +console.log(import1.Test); +console.log(import1.Test2); // should error +console.log(import2.Test); +console.log(import2.Test2); // should error diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out new file mode 100644 index 00000000000000..548f9b479cfadb --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out @@ -0,0 +1,9 @@ +error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? +console.log(mod.Test2); // should error + ~~~~~ + at file:///[WILDCARD]/main_import_map.ts:4:17 + + 'Test' is declared here. + class Test { + ~~~~ + at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts new file mode 100644 index 00000000000000..2694c94b7aebaa --- /dev/null +++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts @@ -0,0 +1,4 @@ +import * as mod from "npm:@denotest/types-ambient"; + +console.log(mod.Test); +console.log(mod.Test2); // should error diff --git a/tests/specs/npm_tests/types_d_ext/__test__.jsonc b/tests/specs/npm_tests/types_d_ext/__test__.jsonc new file mode 100644 index 00000000000000..daa0f26ff044b2 --- /dev/null +++ b/tests/specs/npm_tests/types_d_ext/__test__.jsonc @@ -0,0 +1,8 @@ +{ + "args": "check --all d_ext/main.ts", + "output": "d_ext/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + } +} diff --git a/tests/testdata/npm/d_ext/main.out b/tests/specs/npm_tests/types_d_ext/d_ext/main.out similarity index 70% rename from tests/testdata/npm/d_ext/main.out rename to tests/specs/npm_tests/types_d_ext/d_ext/main.out index 5c22a76a0cb204..e99df66965d3e7 100644 --- a/tests/testdata/npm/d_ext/main.out +++ b/tests/specs/npm_tests/types_d_ext/d_ext/main.out @@ -1,3 +1,3 @@ Download http://localhost:4260/@denotest/d-ext Download http://localhost:4260/@denotest/d-ext/1.0.0.tgz -Check file:///[WILDCARD]/npm/d_ext/main.ts +Check file:///[WILDCARD]/d_ext/main.ts diff --git a/tests/testdata/npm/d_ext/main.ts b/tests/specs/npm_tests/types_d_ext/d_ext/main.ts similarity index 100% rename from tests/testdata/npm/d_ext/main.ts rename to tests/specs/npm_tests/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_tests/types_entry_value_not_exists/__test__.jsonc new file mode 100644 index 00000000000000..1c2e8735fb9a73 --- /dev/null +++ b/tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check --all types_entry_value_not_exists/main.ts", + "output": "types_entry_value_not_exists/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/types_entry_value_not_exists/main.out b/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out similarity index 100% rename from tests/testdata/npm/types_entry_value_not_exists/main.out rename to tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out diff --git a/tests/testdata/npm/types_entry_value_not_exists/main.ts b/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts similarity index 100% rename from tests/testdata/npm/types_entry_value_not_exists/main.ts rename to tests/specs/npm_tests/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_tests/types_exports_import_types/__test__.jsonc new file mode 100644 index 00000000000000..fbb6a918a268ac --- /dev/null +++ b/tests/specs/npm_tests/types_exports_import_types/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check --all types_exports_import_types/main.ts", + "output": "types_exports_import_types/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/types_exports_import_types/main.out b/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out similarity index 100% rename from tests/testdata/npm/types_exports_import_types/main.out rename to tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out diff --git a/tests/testdata/npm/types_exports_import_types/main.ts b/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts similarity index 100% rename from tests/testdata/npm/types_exports_import_types/main.ts rename to tests/specs/npm_tests/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_tests/types_no_types_entry/__test__.jsonc new file mode 100644 index 00000000000000..bae02f3a843f0a --- /dev/null +++ b/tests/specs/npm_tests/types_no_types_entry/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "check --all types_no_types_entry/main.ts", + "output": "types_no_types_entry/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/types_no_types_entry/main.out b/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out similarity index 100% rename from tests/testdata/npm/types_no_types_entry/main.out rename to tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out diff --git a/tests/testdata/npm/types_no_types_entry/main.ts b/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts similarity index 100% rename from tests/testdata/npm/types_no_types_entry/main.ts rename to tests/specs/npm_tests/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_tests/typescript_file_in_package/__test__.jsonc new file mode 100644 index 00000000000000..c5bd61ca27c888 --- /dev/null +++ b/tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "args": "run typescript_file_in_package/main.ts", + "output": "typescript_file_in_package/main.out", + "envs": { + "NO_COLOR": "1", + "NPM_CONFIG_REGISTRY": "http://localhost:4260/" + }, + "exitCode": 1 +} diff --git a/tests/testdata/npm/typescript_file_in_package/main.out b/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out similarity index 100% rename from tests/testdata/npm/typescript_file_in_package/main.out rename to tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out diff --git a/tests/testdata/npm/typescript_file_in_package/main.ts b/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts similarity index 100% rename from tests/testdata/npm/typescript_file_in_package/main.ts rename to tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts diff --git a/tests/testdata/npm/remote_npm_specifier/main.ts b/tests/testdata/npm/remote_npm_specifier/main.ts deleted file mode 100644 index 20a99b68839595..00000000000000 --- a/tests/testdata/npm/remote_npm_specifier/main.ts +++ /dev/null @@ -1 +0,0 @@ -import "http://localhost:4545/npm/remote_npm_specifier/remote.ts"; diff --git a/tools/lint.js b/tools/lint.js index 6cb27f8dc9c1de..04e72c4c9080df 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -214,7 +214,7 @@ async function ensureNoNewITests() { "lsp_tests.rs": 0, "node_compat_tests.rs": 0, "node_unit_tests.rs": 2, - "npm_tests.rs": 89, + "npm_tests.rs": 5, "pm_tests.rs": 0, "publish_tests.rs": 0, "repl_tests.rs": 0, From 49366ef6c26be74a7bf53a5f639d88108ddc246a Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 26 Sep 2024 10:21:38 +1000 Subject: [PATCH 002/436] chore: cleanup unused deprecated code (#25839) --- runtime/js/90_deno_ns.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 2448bc3bc60b46..fd2ac00f2004c0 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -81,9 +81,7 @@ const denoNs = { env: os.env, exit: os.exit, execPath: os.execPath, - copy: io.copy, SeekMode: io.SeekMode, - File: fs.File, FsFile: fs.FsFile, open: fs.open, openSync: fs.openSync, From 05415bb9de475aa8646985a545f30fe93136207e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 26 Sep 2024 01:40:35 +0100 Subject: [PATCH 003/436] fix(compile): support 'deno compile' in RC and LTS releases (#25875) This was missed previously. There's no problem support RC and LTS releases. --- cli/standalone/binary.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 1e84e13986c067..1290a238f33add 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -427,13 +427,9 @@ impl<'a> DenoCompileBinaryWriter<'a> { binary_name ) } - ReleaseChannel::Stable => { + _ => { format!("release/v{}/{}", env!("CARGO_PKG_VERSION"), binary_name) } - _ => bail!( - "`deno compile` current doesn't support {} release channel", - crate::version::DENO_VERSION_INFO.release_channel.name() - ), }; let download_directory = self.deno_dir.dl_folder_path(); From 5504acea6751480f1425c88353ad5d36257bdce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 26 Sep 2024 02:50:54 +0100 Subject: [PATCH 004/436] 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 --- Cargo.lock | 8 +- cli/Cargo.toml | 2 +- cli/args/flags.rs | 253 +++++++++++--- cli/args/mod.rs | 102 ++++-- cli/cache/mod.rs | 42 ++- cli/factory.rs | 25 +- cli/file_fetcher.rs | 48 +-- cli/graph_container.rs | 7 +- cli/graph_util.rs | 38 +- cli/lsp/language_server.rs | 5 + cli/module_loader.rs | 41 ++- cli/standalone/mod.rs | 19 +- cli/tools/check.rs | 3 +- cli/tools/compile.rs | 2 +- cli/tools/info.rs | 17 +- cli/tools/registry/diagnostics.rs | 14 +- cli/tools/registry/mod.rs | 6 +- cli/tools/registry/pm/cache_deps.rs | 3 +- cli/tools/repl/mod.rs | 6 +- cli/tools/run/mod.rs | 12 +- cli/tools/serve.rs | 17 +- cli/worker.rs | 21 +- runtime/permissions.rs | 8 + runtime/permissions/lib.rs | 326 ++++++++++++++---- tests/integration/cache_tests.rs | 2 +- tests/integration/check_tests.rs | 5 +- tests/integration/compile_tests.rs | 2 + tests/integration/coverage_tests.rs | 1 + tests/integration/install_tests.rs | 4 +- tests/integration/lsp_tests.rs | 2 +- tests/integration/run_tests.rs | 199 ++++++----- tests/integration/watcher_tests.rs | 1 + .../check_local_by_default/__test__.jsonc | 2 +- .../check_local_by_default2/__test__.jsonc | 2 +- .../check_local_by_default/__test__.jsonc | 2 +- .../check_local_by_default2/__test__.jsonc | 2 +- .../specs/cache/fetch_multiple/__test__.jsonc | 2 +- tests/specs/cache/globbing/__test__.jsonc | 2 +- tests/specs/cache/redirect/__test__.jsonc | 2 +- .../specs/cert/cafile_ts_fetch/__test__.jsonc | 6 +- .../cert/cafile_url_imports/__test__.jsonc | 2 +- .../__test__.jsonc | 2 +- .../cert/localhost_unsafe_ssl/__test__.jsonc | 2 +- .../jsx_import_source_types/__test__.jsonc | 2 +- .../__test__.jsonc | 2 +- .../remote_missing_override/__test__.jsonc | 2 +- .../repetitive_unstable_flag/__test__.jsonc | 1 + tests/specs/doc/types_header/__test__.jsonc | 2 +- .../doc/types_header_direct/__test__.jsonc | 2 +- .../005_more_imports.ts | 0 .../054_info_local_imports.out | 0 .../_054_info_local_imports/__test__.jsonc | 0 .../_054_info_local_imports/mod1.ts | 0 .../_054_info_local_imports/mod2.ts | 0 .../_054_info_local_imports/print_hello.ts | 0 .../subdir2/dynamic_import.ts | 0 .../_054_info_local_imports/subdir2/mod2.ts | 0 .../data_null_error/__test__.jsonc | 0 .../data_null_error/data_null_error.out | 0 .../data_null_error/data_null_error/mod.ts | 0 .../data_null_error/types.d.ts | 0 .../dynamic_imports_tmpl_lit}/__test__.jsonc | 0 .../dynamic_imports_tmp_lit/main.info.out | 0 .../dynamic_imports_tmp_lit/main.js | 0 .../dynamic_imports_tmp_lit/other/data.json | 0 .../other/sub/data2.json | 0 .../dynamic_imports_tmp_lit/sub/a.js | 0 .../dynamic_imports_tmp_lit/sub/b.ts | 0 .../info_flag => info/flag}/041_info_flag.out | 0 .../info_flag => info/flag}/__test__.jsonc | 0 .../flag_location}/041_info_flag_location.out | 0 .../flag_location}/__test__.jsonc | 0 .../049_info_flag_script_jsx.out | 0 .../specs/info/flag_script_jsx/__test__.jsonc | 4 + .../import_map}/__test__.jsonc | 0 .../import_map}/deno.json | 0 .../import_map}/deno.lock | 0 .../import_map}/main.tsx | 0 .../import_map}/with_import_map.out | 0 .../info_json => info/json}/__test__.jsonc | 0 .../info_json => info/json}/info_json.out | 0 .../076_info_json_deps_order.out | 0 .../076_info_json_deps_order.ts | 0 .../json_deps_order}/__test__.jsonc | 0 .../json_deps_order}/recursive_imports/A.ts | 0 .../json_deps_order}/recursive_imports/B.ts | 0 .../json_deps_order}/recursive_imports/C.ts | 0 .../recursive_imports/common.ts | 0 .../json_file/__test__.jsonc | 0 .../json_file/json_output/main.out | 0 .../json_file/json_output/main.ts | 0 .../{info_tests => info}/json_file/mod1.ts | 0 .../{info_tests => info}/json_file/mod2.ts | 0 .../json_file/print_hello.ts | 0 .../json_file/subdir2/dynamic_import.ts | 0 .../json_file/subdir2/mod2.ts | 0 .../json_location}/__test__.jsonc | 0 .../json_location}/info_json_location.out | 0 .../missing_module}/__test__.jsonc | 0 .../error_009_missing_js_module.js | 0 .../missing_module}/info_missing_module.out | 0 .../info/multiple_imports/__test__.jsonc | 4 + .../multiple_imports/multiple_imports.out | 0 .../info/multiple_redirects/__test__.jsonc | 2 +- .../recursive_modules}/__test__.jsonc | 0 .../info_recursive_imports_test.out | 0 .../info_recursive_imports_test.ts | 0 .../recursive_modules}/recursive_imports/A.ts | 0 .../recursive_modules}/recursive_imports/B.ts | 0 .../recursive_modules}/recursive_imports/C.ts | 0 .../recursive_imports/common.ts | 0 .../type_import}/__test__.jsonc | 0 .../type_import}/info_type_import.out | 0 .../type_import}/info_type_import.ts | 0 .../type_import}/type_and_code.ts | 0 .../info/types_header_direct/__test__.jsonc | 4 + .../types_header_direct/type_directives_01.ts | 0 .../types_header_direct/types_header.out | 0 .../with_config_override/__test__.jsonc | 0 .../with_config/deno-override.json | 0 .../with_config/deno.json | 0 .../with_config/import_map.json | 0 .../with_config_override/with_config/test.ts | 0 .../with_config/with_config.out | 0 .../info_flag_script_jsx/__test__.jsonc | 4 - .../multiple_imports/__test__.jsonc | 4 - .../types_header_direct/__test__.jsonc | 4 - .../future_install_local_deno/__test__.jsonc | 4 +- .../lockfile/adding_redirect/__test__.jsonc | 4 +- .../auto_discover_lockfile/__test__.jsonc | 2 +- .../config_file_lock_boolean/__test__.jsonc | 4 +- .../config_file_lock_path/__test__.jsonc | 4 +- .../lockfile/frozen_lockfile/__test__.jsonc | 2 +- .../no_declaration_files/__test__.jsonc | 2 +- tests/specs/lockfile/no_lock/__test__.jsonc | 16 +- .../__test__.jsonc | 0 .../process_beforeexit_exit_events.out | 0 .../process_beforeexit_exit_events.ts | 0 .../node_test_module/__test__.jsonc | 0 .../node_test_module/test.js | 0 .../node_test_module/test.out | 0 .../__test__.jsonc | 0 .../test_no_sanitizers/cat.ts | 0 .../test_no_sanitizers/test.js | 0 .../test_no_sanitizers/test.out | 0 .../test_no_sanitizers/welcome.ts | 0 .../__test__.jsonc | 0 .../events_order.out | 0 .../events_order.ts | 0 .../builtin_module_module/__test__.jsonc | 0 .../builtin_module_module/main.js | 0 .../builtin_module_module/main.out | 0 .../cached_only/__test__.jsonc | 0 .../cached_only/cached_only/main.out | 2 +- .../cached_only/cached_only/main.ts | 0 .../check_all/__test__.jsonc | 0 .../check_all/check_errors/main.ts | 0 .../check_all/check_errors/main_all.out | 0 .../check_all/check_errors/main_local.out | 0 .../check_local/__test__.jsonc | 0 .../check_local/check_errors/main.ts | 0 .../check_local/check_errors/main_all.out | 0 .../check_local/check_errors/main_local.out | 0 .../__test__.jsonc | 0 .../file_dts_dmts_dcts/main.out | 0 .../file_dts_dmts_dcts/main.ts | 0 .../child_process_fork_test/__test__.jsonc | 0 .../child_process_fork_test/main.out | 0 .../child_process_fork_test/main.ts | 0 .../cjs_invalid_name_exports/__test__.jsonc | 0 .../cjs-invalid-name-exports/main.out | 0 .../cjs-invalid-name-exports/main.ts | 0 .../cjs_local_global_decls/__test__.jsonc | 0 .../cjs_local_global_decls/main.out | 0 .../cjs_local_global_decls/main.ts | 0 .../__test__.jsonc | 0 .../cjs_module_export_assignment/main.out | 0 .../cjs_module_export_assignment/main.ts | 0 .../__test__.jsonc | 0 .../main.out | 0 .../main.ts | 0 .../cjs_pkg_imports/__test__.jsonc | 0 .../cjs_pkg_imports/cjs_pkg_imports/main.out | 0 .../cjs_pkg_imports/cjs_pkg_imports/main.ts | 0 .../cjs_reexport_collision/__test__.jsonc | 0 .../cjs_reexport_collision/main.out | 0 .../cjs_reexport_collision/main.ts | 0 .../cjs_require_esm/__test__.jsonc | 0 .../cjs_require_esm/cjs_require_esm/main.out | 0 .../cjs_require_esm/cjs_require_esm/main.ts | 0 .../cjs_require_esm_mjs/__test__.jsonc | 0 .../cjs_require_esm_mjs/main.out | 0 .../cjs_require_esm_mjs/main.ts | 0 .../cjs_sub_path/__test__.jsonc | 0 .../cjs_sub_path/cjs_sub_path/main.js | 0 .../cjs_sub_path/cjs_sub_path/main.out | 0 .../cjs_this_in_exports/__test__.jsonc | 0 .../cjs_this_in_exports/main.js | 0 .../cjs_this_in_exports/main.out | 2 +- .../cjs_with_deps/__test__.jsonc | 0 .../cjs_with_deps/cjs_with_deps/main.js | 0 .../cjs_with_deps/cjs_with_deps/main.out | 0 .../cjs_with_deps/cjs_with_deps/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 0 .../cjs_with_deps/main_node_modules.out | 0 .../compare_globals/__test__.jsonc | 0 .../compare_globals/compare_globals/main.out | 0 .../compare_globals/compare_globals/main.ts | 0 .../create_require/__test__.jsonc | 0 .../create_require/create_require/main.out | 0 .../create_require/create_require/main.ts | 0 .../deno_cache/__test__.jsonc | 0 .../deno_cache/deno_cache.out | 0 .../deno_run_bin_cjs/__test__.jsonc | 0 .../deno_run_bin_cjs/deno_run_cjs.out | 0 .../__test__.jsonc | 0 .../deno_run_cjs.out | 0 .../deno_run_bin_esm/__test__.jsonc | 0 .../deno_run_bin_esm/deno_run_esm.out | 0 .../__test__.jsonc | 0 .../deno_run_esm.out | 0 .../deno_run_bin_no_ext/__test__.jsonc | 0 .../deno_run_bin_no_ext/deno_run_no_ext.out | 0 .../deno_run_bin_special_chars/__test__.jsonc | 0 .../deno_run_special_chars_in_bin_name.out | 0 .../deno_run_cowsay/__test__.jsonc | 0 .../deno_run_cowsay/deno_run_cowsay.out | 0 .../deno_run_cowsay_explicit/__test__.jsonc | 0 .../deno_run_cowsay.out | 0 .../__test__.jsonc | 1 + .../deno_run_cowsay.out | 0 .../deno_run_cowthink/__test__.jsonc | 0 .../deno_run_cowthink/deno_run_cowthink.out | 0 .../deno_run_no_bin_entrypoint/__test__.jsonc | 0 .../deno_run_no_bin_entrypoint.out | 0 .../__test__.jsonc | 0 ...no_bin_entrypoint_non_existent_subpath.out | 0 .../deno_run_non_existent/__test__.jsonc | 0 .../deno_run_non_existent.out | 0 .../__test__.jsonc | 0 .../different_nested_dep/main.js | 0 .../different_nested_dep/main.out | 0 .../different_nested_dep/package.json | 0 .../__test__.jsonc | 1 + .../different_nested_dep/main.js | 0 .../different_nested_dep/main.out | 0 .../different_nested_dep/package.json | 0 .../__test__.jsonc | 0 .../directory_import/folder_index_js.out | 0 .../directory_import/folder_index_js.ts | 0 .../directory_import/folder_no_index.out | 0 .../directory_import/folder_no_index.ts | 0 .../__test__.jsonc | 0 .../directory_import/folder_index_js.out | 0 .../directory_import/folder_index_js.ts | 0 .../directory_import/folder_no_index.out | 0 .../directory_import/folder_no_index.ts | 0 .../dual_cjs_esm/__test__.jsonc | 0 .../dual_cjs_esm/dual_cjs_esm/main.out | 0 .../dual_cjs_esm/dual_cjs_esm/main.ts | 0 .../__test__.jsonc | 0 .../dynamic_import_deno_ts_from_npm/add.ts | 0 .../dynamic_import_deno_ts_from_npm/main.out | 0 .../dynamic_import_deno_ts_from_npm/main.ts | 0 .../subtract.mts | 0 .../__test__.jsonc | 0 .../main.out | 0 .../main.ts | 0 .../dynamic_import_json/__test__.jsonc | 0 .../dynamic_import_json/import_json/main.js | 0 .../dynamic_import_json/import_json/main.out | 0 .../__test__.jsonc | 0 .../main.out | 0 .../main.ts | 0 .../other.ts | 0 .../env_var_re_export_dev/__test__.jsonc | 0 .../env_var_re_export/main.js | 0 .../env_var_re_export_prod/__test__.jsonc | 0 .../env_var_re_export/main.js | 0 .../__test__.jsonc | 0 .../error_version_after_subpath/main.js | 0 .../error_version_after_subpath/main.out | 0 .../import_json/__test__.jsonc | 0 .../import_json/import_json/main.js | 0 .../import_json/import_json/main.out | 0 .../import_map/__test__.jsonc | 0 .../import_map/import_map/import_map.json | 0 .../import_map/import_map/main.js | 0 .../import_map/import_map/main.out | 0 .../imports_package_json/__test__.jsonc | 0 .../import_not_defined.js | 0 .../import_not_defined.out | 0 .../imports_package_json/main.js | 0 .../imports_package_json/main.out | 0 .../imports_package_json/package.json | 0 .../sub_path_import_not_defined.js | 0 .../sub_path_import_not_defined.out | 0 .../__test__.jsonc | 0 .../import_not_defined.js | 0 .../import_not_defined.out | 0 .../imports_package_json/main.js | 0 .../imports_package_json/main.out | 0 .../imports_package_json/package.json | 0 .../sub_path_import_not_defined.js | 0 .../sub_path_import_not_defined.out | 0 .../__test__.jsonc | 0 .../import_not_defined.js | 0 .../import_not_defined.out | 0 .../imports_package_json/main.js | 0 .../imports_package_json/main.out | 0 .../imports_package_json/package.json | 0 .../sub_path_import_not_defined.js | 0 .../sub_path_import_not_defined.out | 0 .../info_chalk_display/__test__.jsonc | 0 .../info_chalk_display/cjs_with_deps/main.js | 0 .../info_chalk_display/cjs_with_deps/main.out | 0 .../cjs_with_deps/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 0 .../cjs_with_deps/main_node_modules.out | 0 .../__test__.jsonc | 1 + .../cjs_with_deps/main.js | 0 .../cjs_with_deps/main.out | 0 .../cjs_with_deps/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 0 .../cjs_with_deps/main_node_modules.out | 0 .../info_chalk_json/__test__.jsonc | 0 .../info_chalk_json/cjs_with_deps/main.js | 0 .../info_chalk_json/cjs_with_deps/main.out | 0 .../cjs_with_deps/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 0 .../cjs_with_deps/main_node_modules.out | 0 .../__test__.jsonc | 1 + .../cjs_with_deps/main.js | 0 .../cjs_with_deps/main.out | 0 .../cjs_with_deps/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 0 .../cjs_with_deps/main_node_modules.out | 0 .../info_cli_chalk_display/__test__.jsonc | 0 .../info_cli_chalk_display/info/chalk.out | 0 .../info/chalk_json.out | 0 .../info_cli_chalk_json/__test__.jsonc | 0 .../info_cli_chalk_json/info/chalk.out | 0 .../info_cli_chalk_json/info/chalk_json.out | 0 .../info_peer_deps/__test__.jsonc | 0 .../peer_deps_with_copied_folders/main.out | 0 .../peer_deps_with_copied_folders/main.ts | 0 .../main_info.out | 0 .../main_info_json.out | 0 .../main_node_modules.out | 0 .../main_node_modules_reload.out | 0 .../info_peer_deps_json/__test__.jsonc | 0 .../peer_deps_with_copied_folders/main.out | 0 .../peer_deps_with_copied_folders/main.ts | 0 .../main_info.out | 0 .../main_info_json.out | 0 .../main_node_modules.out | 0 .../main_node_modules_reload.out | 0 .../__test__.jsonc | 0 .../mixed_case_package_name/global.out | 0 .../mixed_case_package_name/global.ts | 0 .../mixed_case_package_name/local.out | 0 .../mixed_case_package_name/local.ts | 0 .../__test__.jsonc | 1 + .../mixed_case_package_name/global.out | 0 .../mixed_case_package_name/global.ts | 0 .../mixed_case_package_name/local.out | 0 .../mixed_case_package_name/local.ts | 0 .../__test__.jsonc | 0 .../node_modules_deno_node_modules/main.out | 0 .../node_modules_deno_node_modules/main.ts | 0 .../__test__.jsonc | 1 + .../node_modules_deno_node_modules/main.out | 0 .../node_modules_deno_node_modules/main.ts | 0 .../__test__.jsonc | 1 + .../require_added_nm_folder/main.js | 0 .../require_added_nm_folder/main.out | 0 .../__test__.jsonc | 1 + .../require_main/main.js | 0 .../require_main/main.out | 0 .../node_modules_dir_with_deps/__test__.jsonc | 1 + .../cjs_with_deps/main.js | 0 .../cjs_with_deps/main.out | 0 .../cjs_with_deps/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 0 .../cjs_with_deps/main_node_modules.out | 0 .../node_modules_dir_yargs/__test__.jsonc | 1 + .../node_modules_dir_yargs/cjs_yargs/main.js | 0 .../node_modules_dir_yargs/cjs_yargs/main.out | 0 .../non_existent_dep/__test__.jsonc | 0 .../non_existent_dep_version/__test__.jsonc | 0 .../nonexistent_file/__test__.jsonc | 0 .../nonexistent_file/nonexistent_file/main.js | 0 .../nonexistent_file/main.out | 0 .../__test__.jsonc | 1 + .../nonexistent_file/main.js | 0 .../nonexistent_file/main.out | 0 .../__test__.jsonc | 0 .../permissions_outside_package/foo/config.js | 0 .../foo/package.json | 0 .../permissions_outside_package/main.out | 0 .../permissions_outside_package/main.ts | 0 .../remote_npm_specifier/__test__.jsonc | 0 .../remote_npm_specifier/main.out | 0 .../remote_npm_specifier/main.ts | 0 .../remote_npm_specifier/remote.ts | 0 .../require_esm/__test__.jsonc | 0 .../require_esm/require_esm/esm.js | 0 .../require_esm/require_esm/main.out | 0 .../require_esm/require_esm/main.ts | 0 .../require_json/__test__.jsonc | 0 .../require_json/require_json/main.js | 0 .../require_json/require_json/main.out | 0 .../reserved_word_exports/__test__.jsonc | 0 .../reserved_word_exports/main.out | 0 .../reserved_word_exports/main.ts | 0 .../__test__.jsonc | 1 + .../main.out | 0 .../package.json | 0 .../sub_paths/__test__.jsonc | 0 .../sub_paths/sub_paths/main.jsx | 0 .../sub_paths/sub_paths/main.out | 0 .../tarball_with_global_header/__test__.jsonc | 0 .../tarball_with_global_header/main.js | 0 .../tarball_with_global_header/main.out | 0 .../translate_cjs_to_esm/__test__.jsonc | 0 .../translate_cjs_to_esm/main.js | 0 .../translate_cjs_to_esm/main.out | 0 .../types_ambient_module/__test__.jsonc | 0 .../types_ambient_module/import_map.json | 0 .../types_ambient_module/main.out | 0 .../types_ambient_module/main.ts | 0 .../types_ambient_module/main_import_map.out | 0 .../types_ambient_module/main_import_map.ts | 0 .../__test__.jsonc | 0 .../types_ambient_module/import_map.json | 0 .../types_ambient_module/main.out | 0 .../types_ambient_module/main.ts | 0 .../types_ambient_module/main_import_map.out | 0 .../types_ambient_module/main_import_map.ts | 0 .../types_d_ext/__test__.jsonc | 0 .../types_d_ext/d_ext/main.out | 0 .../types_d_ext/d_ext/main.ts | 0 .../__test__.jsonc | 0 .../types_entry_value_not_exists/main.out | 0 .../types_entry_value_not_exists/main.ts | 0 .../types_exports_import_types/__test__.jsonc | 0 .../types_exports_import_types/main.out | 0 .../types_exports_import_types/main.ts | 0 .../types_no_types_entry/__test__.jsonc | 0 .../types_no_types_entry/main.out | 0 .../types_no_types_entry/main.ts | 0 .../typescript_file_in_package/__test__.jsonc | 0 .../typescript_file_in_package/main.out | 0 .../typescript_file_in_package/main.ts | 0 .../permission/allow_import/__test__.jsonc | 52 +++ .../permission/allow_import/builtin_host.ts | 4 + tests/specs/permission/allow_import/cache.out | 2 + tests/specs/permission/allow_import/check.out | 2 + .../specs/permission/allow_import/compile.out | 2 + tests/specs/permission/allow_import/doc.out | 6 + tests/specs/permission/allow_import/doc.ts | 3 + .../permission/allow_import/doc_allowed.out | 10 + tests/specs/permission/allow_import/info.out | 7 + tests/specs/permission/allow_import/main.ts | 1 + tests/specs/permission/allow_import/run.out | 2 + tests/specs/permission/allow_import/serve.out | 2 + .../allow_import_jsx/__test__.jsonc | 5 + .../permission/allow_import_jsx/deno.jsonc | 6 + .../permission/allow_import_jsx/main.out | 3 + .../permission/allow_import_jsx/main.tsx | 3 + .../allow_import_main_module/__test__.jsonc | 17 + .../__test__.jsonc | 5 + .../allow_import_not_on_redirect/main.js | 2 + .../allow_import_not_on_redirect/main.out | 2 + .../publish.out | 1 - .../publish/invalid_import/invalid_import.out | 5 +- .../invalid_import_esm_sh_suggestion.out | 3 - .../publish/missing_constraint/publish.out | 20 +- .../mod.out | 11 +- .../publish/prefer_fast_check_graph/main.out | 3 - .../run/redirect_javascript/__test__.jsonc | 2 +- .../check_local_by_default/__test__.jsonc | 2 +- .../check_local_by_default2/__test__.jsonc | 2 +- .../__test__.jsonc | 2 +- .../error_worker_permissions_remote.ts.out | 2 +- .../permissions_blob_remote.ts.out | 2 +- .../permissions_data_remote.ts.out | 2 +- .../__test__.jsonc | 4 +- .../permissions_dynamic_remote.ts | 3 +- .../permissions_dynamic_remote.ts.out | 2 +- .../__test__.jsonc | 2 +- .../permissions_remote_remote.ts | 0 .../permissions_remote_remote.ts.out | 2 +- tests/testdata/add.ts | 3 + .../dynamic_import/permissions_blob_local.ts | 2 +- .../dynamic_import/permissions_blob_remote.ts | 1 - .../permissions_blob_remote.ts.out | 4 +- .../dynamic_import/permissions_data_local.ts | 2 +- .../permissions_data_remote.ts.out | 2 +- .../permissions_remote_remote.ts.out | 2 +- .../error_015_dynamic_import_permissions.js | 2 +- .../error_015_dynamic_import_permissions.out | 4 +- tests/testdata/run/lock_write_fetch/main.ts | 3 + tests/testdata/run/type_directives_01.ts | 2 +- tests/testdata/run/type_directives_01.ts.out | 2 +- tests/testdata/run/type_headers_deno_types.ts | 4 +- tests/testdata/workers/static_remote.ts | 2 +- 507 files changed, 1116 insertions(+), 483 deletions(-) rename tests/specs/{info_tests => info}/_054_info_local_imports/005_more_imports.ts (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/054_info_local_imports.out (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/__test__.jsonc (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/mod1.ts (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/mod2.ts (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/print_hello.ts (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/subdir2/dynamic_import.ts (100%) rename tests/specs/{info_tests => info}/_054_info_local_imports/subdir2/mod2.ts (100%) rename tests/specs/{info_tests => info}/data_null_error/__test__.jsonc (100%) rename tests/specs/{info_tests => info}/data_null_error/data_null_error/data_null_error.out (100%) rename tests/specs/{info_tests => info}/data_null_error/data_null_error/mod.ts (100%) rename tests/specs/{info_tests => info}/data_null_error/data_null_error/types.d.ts (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/dynamic_imports_tmp_lit/main.info.out (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/dynamic_imports_tmp_lit/main.js (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/dynamic_imports_tmp_lit/other/data.json (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/dynamic_imports_tmp_lit/other/sub/data2.json (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/dynamic_imports_tmp_lit/sub/a.js (100%) rename tests/specs/{info_tests/info_dynamic_imports_tmpl_lit => info/dynamic_imports_tmpl_lit}/dynamic_imports_tmp_lit/sub/b.ts (100%) rename tests/specs/{info_tests/info_flag => info/flag}/041_info_flag.out (100%) rename tests/specs/{info_tests/info_flag => info/flag}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_flag_location => info/flag_location}/041_info_flag_location.out (100%) rename tests/specs/{info_tests/info_flag_location => info/flag_location}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_flag_script_jsx => info/flag_script_jsx}/049_info_flag_script_jsx.out (100%) create mode 100644 tests/specs/info/flag_script_jsx/__test__.jsonc rename tests/specs/{info_tests/info_import_map => info/import_map}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_import_map => info/import_map}/deno.json (100%) rename tests/specs/{info_tests/info_import_map => info/import_map}/deno.lock (100%) rename tests/specs/{info_tests/info_import_map => info/import_map}/main.tsx (100%) rename tests/specs/{info_tests/info_import_map => info/import_map}/with_import_map.out (100%) rename tests/specs/{info_tests/info_json => info/json}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_json => info/json}/info_json.out (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/076_info_json_deps_order.out (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/076_info_json_deps_order.ts (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/recursive_imports/A.ts (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/recursive_imports/B.ts (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/recursive_imports/C.ts (100%) rename tests/specs/{info_tests/info_json_deps_order => info/json_deps_order}/recursive_imports/common.ts (100%) rename tests/specs/{info_tests => info}/json_file/__test__.jsonc (100%) rename tests/specs/{info_tests => info}/json_file/json_output/main.out (100%) rename tests/specs/{info_tests => info}/json_file/json_output/main.ts (100%) rename tests/specs/{info_tests => info}/json_file/mod1.ts (100%) rename tests/specs/{info_tests => info}/json_file/mod2.ts (100%) rename tests/specs/{info_tests => info}/json_file/print_hello.ts (100%) rename tests/specs/{info_tests => info}/json_file/subdir2/dynamic_import.ts (100%) rename tests/specs/{info_tests => info}/json_file/subdir2/mod2.ts (100%) rename tests/specs/{info_tests/info_json_location => info/json_location}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_json_location => info/json_location}/info_json_location.out (100%) rename tests/specs/{info_tests/info_missing_module => info/missing_module}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_missing_module => info/missing_module}/error_009_missing_js_module.js (100%) rename tests/specs/{info_tests/info_missing_module => info/missing_module}/info_missing_module.out (100%) create mode 100644 tests/specs/info/multiple_imports/__test__.jsonc rename tests/specs/{info_tests => info}/multiple_imports/multiple_imports.out (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/info_recursive_imports_test.out (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/info_recursive_imports_test.ts (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/recursive_imports/A.ts (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/recursive_imports/B.ts (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/recursive_imports/C.ts (100%) rename tests/specs/{info_tests/info_recursive_modules => info/recursive_modules}/recursive_imports/common.ts (100%) rename tests/specs/{info_tests/info_type_import => info/type_import}/__test__.jsonc (100%) rename tests/specs/{info_tests/info_type_import => info/type_import}/info_type_import.out (100%) rename tests/specs/{info_tests/info_type_import => info/type_import}/info_type_import.ts (100%) rename tests/specs/{info_tests/info_type_import => info/type_import}/type_and_code.ts (100%) create mode 100644 tests/specs/info/types_header_direct/__test__.jsonc rename tests/specs/{info_tests => info}/types_header_direct/type_directives_01.ts (100%) rename tests/specs/{info_tests => info}/types_header_direct/types_header.out (100%) rename tests/specs/{info_tests => info}/with_config_override/__test__.jsonc (100%) rename tests/specs/{info_tests => info}/with_config_override/with_config/deno-override.json (100%) rename tests/specs/{info_tests => info}/with_config_override/with_config/deno.json (100%) rename tests/specs/{info_tests => info}/with_config_override/with_config/import_map.json (100%) rename tests/specs/{info_tests => info}/with_config_override/with_config/test.ts (100%) rename tests/specs/{info_tests => info}/with_config_override/with_config/with_config.out (100%) delete mode 100644 tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc delete mode 100644 tests/specs/info_tests/multiple_imports/__test__.jsonc delete mode 100644 tests/specs/info_tests/types_header_direct/__test__.jsonc rename tests/specs/{node_compat_tests => node}/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc (100%) rename tests/specs/{node_compat_tests => node}/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out (100%) rename tests/specs/{node_compat_tests => node}/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts (100%) rename tests/specs/{node_compat_tests => node}/node_test_module/__test__.jsonc (100%) rename tests/specs/{node_compat_tests => node}/node_test_module/test.js (100%) rename tests/specs/{node_compat_tests => node}/node_test_module/test.out (100%) rename tests/specs/{node_compat_tests => node}/node_test_module_no_sanitizers/__test__.jsonc (100%) rename tests/specs/{node_compat_tests => node}/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts (100%) rename tests/specs/{node_compat_tests => node}/node_test_module_no_sanitizers/test_no_sanitizers/test.js (100%) rename tests/specs/{node_compat_tests => node}/node_test_module_no_sanitizers/test_no_sanitizers/test.out (100%) rename tests/specs/{node_compat_tests => node}/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts (100%) rename tests/specs/{node_compat_tests => node}/web_node_events_dispatched_in_correct_order/__test__.jsonc (100%) rename tests/specs/{node_compat_tests => node}/web_node_events_dispatched_in_correct_order/events_order.out (100%) rename tests/specs/{node_compat_tests => node}/web_node_events_dispatched_in_correct_order/events_order.ts (100%) rename tests/specs/{npm_tests => npm}/builtin_module_module/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/builtin_module_module/builtin_module_module/main.js (100%) rename tests/specs/{npm_tests => npm}/builtin_module_module/builtin_module_module/main.out (100%) rename tests/specs/{npm_tests => npm}/cached_only/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cached_only/cached_only/main.out (66%) rename tests/specs/{npm_tests => npm}/cached_only/cached_only/main.ts (100%) rename tests/specs/{npm_tests => npm}/check_all/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/check_all/check_errors/main.ts (100%) rename tests/specs/{npm_tests => npm}/check_all/check_errors/main_all.out (100%) rename tests/specs/{npm_tests => npm}/check_all/check_errors/main_local.out (100%) rename tests/specs/{npm_tests => npm}/check_local/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/check_local/check_errors/main.ts (100%) rename tests/specs/{npm_tests => npm}/check_local/check_errors/main_all.out (100%) rename tests/specs/{npm_tests => npm}/check_local/check_errors/main_local.out (100%) rename tests/specs/{npm_tests => npm}/check_package_file_dts_dmts_dcts/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out (100%) rename tests/specs/{npm_tests => npm}/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts (100%) rename tests/specs/{npm_tests => npm}/child_process_fork_test/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/child_process_fork_test/child_process_fork_test/main.out (100%) rename tests/specs/{npm_tests => npm}/child_process_fork_test/child_process_fork_test/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_invalid_name_exports/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_local_global_decls/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_local_global_decls/cjs_local_global_decls/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_local_global_decls/cjs_local_global_decls/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_module_export_assignment/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_module_export_assignment/cjs_module_export_assignment/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_module_export_assignment/cjs_module_export_assignment/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_module_export_assignment_number/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_pkg_imports/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_pkg_imports/cjs_pkg_imports/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_pkg_imports/cjs_pkg_imports/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_reexport_collision/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_reexport_collision/cjs_reexport_collision/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_reexport_collision/cjs_reexport_collision/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_require_esm/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_require_esm/cjs_require_esm/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_require_esm/cjs_require_esm/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_require_esm_mjs/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts (100%) rename tests/specs/{npm_tests => npm}/cjs_sub_path/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_sub_path/cjs_sub_path/main.js (100%) rename tests/specs/{npm_tests => npm}/cjs_sub_path/cjs_sub_path/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_this_in_exports/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_this_in_exports/cjs_this_in_exports/main.js (100%) rename tests/specs/{npm_tests => npm}/cjs_this_in_exports/cjs_this_in_exports/main.out (63%) rename tests/specs/{npm_tests => npm}/cjs_with_deps/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/cjs_with_deps/cjs_with_deps/main.js (100%) rename tests/specs/{npm_tests => npm}/cjs_with_deps/cjs_with_deps/main.out (100%) rename tests/specs/{npm_tests => npm}/cjs_with_deps/cjs_with_deps/main_info.out (100%) rename tests/specs/{npm_tests => npm}/cjs_with_deps/cjs_with_deps/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/cjs_with_deps/cjs_with_deps/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/compare_globals/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/compare_globals/compare_globals/main.out (100%) rename tests/specs/{npm_tests => npm}/compare_globals/compare_globals/main.ts (100%) rename tests/specs/{npm_tests => npm}/create_require/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/create_require/create_require/main.out (100%) rename tests/specs/{npm_tests => npm}/create_require/create_require/main.ts (100%) rename tests/specs/{npm_tests => npm}/deno_cache/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_cache/deno_cache.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_cjs/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_cjs/deno_run_cjs.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_esm/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_esm/deno_run_esm.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_no_ext/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_no_ext/deno_run_no_ext.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_special_chars/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowsay/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowsay/deno_run_cowsay.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowsay_explicit/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowsay_explicit/deno_run_cowsay.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowsay_with_node_modules_dir/__test__.jsonc (91%) rename tests/specs/{npm_tests => npm}/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowthink/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_cowthink/deno_run_cowthink.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_no_bin_entrypoint/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out (100%) rename tests/specs/{npm_tests => npm}/deno_run_non_existent/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/deno_run_non_existent/deno_run_non_existent.out (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_false/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_true/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out (100%) rename tests/specs/{npm_tests => npm}/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_index_js/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_index_js/directory_import/folder_index_js.out (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_index_js/directory_import/folder_index_js.ts (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_index_js/directory_import/folder_no_index.out (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_index_js/directory_import/folder_no_index.ts (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_no_index/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_no_index/directory_import/folder_index_js.out (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_no_index/directory_import/folder_index_js.ts (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_no_index/directory_import/folder_no_index.out (100%) rename tests/specs/{npm_tests => npm}/directory_import_folder_no_index/directory_import/folder_no_index.ts (100%) rename tests/specs/{npm_tests => npm}/dual_cjs_esm/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/dual_cjs_esm/dual_cjs_esm/main.out (100%) rename tests/specs/{npm_tests => npm}/dual_cjs_esm/dual_cjs_esm/main.ts (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_deno_ts_from_npm/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_invalid_package_name/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_json/import_json/main.js (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_json/import_json/main.out (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_reload_same_package/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts (100%) rename tests/specs/{npm_tests => npm}/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts (100%) rename tests/specs/{npm_tests => npm}/env_var_re_export_dev/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/env_var_re_export_dev/env_var_re_export/main.js (100%) rename tests/specs/{npm_tests => npm}/env_var_re_export_prod/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/env_var_re_export_prod/env_var_re_export/main.js (100%) rename tests/specs/{npm_tests => npm}/error_version_after_subpath/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/error_version_after_subpath/error_version_after_subpath/main.js (100%) rename tests/specs/{npm_tests => npm}/error_version_after_subpath/error_version_after_subpath/main.out (100%) rename tests/specs/{npm_tests => npm}/import_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/import_json/import_json/main.js (100%) rename tests/specs/{npm_tests => npm}/import_json/import_json/main.out (100%) rename tests/specs/{npm_tests => npm}/import_map/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/import_map/import_map/import_map.json (100%) rename tests/specs/{npm_tests => npm}/import_map/import_map/main.js (100%) rename tests/specs/{npm_tests => npm}/import_map/import_map/main.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/import_not_defined.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/import_not_defined.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/main.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/main.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/package.json (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/sub_path_import_not_defined.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json/imports_package_json/sub_path_import_not_defined.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/main.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/main.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/package.json (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js (100%) rename tests/specs/{npm_tests => npm}/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display/cjs_with_deps/main.js (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display/cjs_with_deps/main.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display/cjs_with_deps/main_info.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display/cjs_with_deps/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display/cjs_with_deps/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display_node_modules_dir/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/info_chalk_display_node_modules_dir/cjs_with_deps/main.js (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display_node_modules_dir/cjs_with_deps/main.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json/cjs_with_deps/main.js (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json/cjs_with_deps/main.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json/cjs_with_deps/main_info.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json/cjs_with_deps/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json/cjs_with_deps/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json_node_modules_dir/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/info_chalk_json_node_modules_dir/cjs_with_deps/main.js (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json_node_modules_dir/cjs_with_deps/main.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/info_cli_chalk_display/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/info_cli_chalk_display/info/chalk.out (100%) rename tests/specs/{npm_tests => npm}/info_cli_chalk_display/info/chalk_json.out (100%) rename tests/specs/{npm_tests => npm}/info_cli_chalk_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/info_cli_chalk_json/info/chalk.out (100%) rename tests/specs/{npm_tests => npm}/info_cli_chalk_json/info/chalk_json.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/peer_deps_with_copied_folders/main.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/peer_deps_with_copied_folders/main.ts (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/peer_deps_with_copied_folders/main_info.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/peer_deps_with_copied_folders/main.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/peer_deps_with_copied_folders/main.ts (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_global_dir/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_global_dir/mixed_case_package_name/global.out (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_global_dir/mixed_case_package_name/local.out (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_local_dir/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_local_dir/mixed_case_package_name/global.out (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_local_dir/mixed_case_package_name/local.out (100%) rename tests/specs/{npm_tests => npm}/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts (100%) rename tests/specs/{npm_tests => npm}/node_modules_deno_node_modules/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts (100%) rename tests/specs/{npm_tests => npm}/node_modules_deno_node_modules_local/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_require_added_node_modules_folder/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_require_main_entry/__test__.jsonc (91%) rename tests/specs/{npm_tests => npm}/node_modules_dir_require_main_entry/require_main/main.js (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_require_main_entry/require_main/main.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_with_deps/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/node_modules_dir_with_deps/cjs_with_deps/main.js (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_with_deps/cjs_with_deps/main.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_with_deps/cjs_with_deps/main_info.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_yargs/__test__.jsonc (91%) rename tests/specs/{npm_tests => npm}/node_modules_dir_yargs/cjs_yargs/main.js (100%) rename tests/specs/{npm_tests => npm}/node_modules_dir_yargs/cjs_yargs/main.out (100%) rename tests/specs/{npm_tests => npm}/non_existent_dep/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/non_existent_dep_version/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/nonexistent_file/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/nonexistent_file/nonexistent_file/main.js (100%) rename tests/specs/{npm_tests => npm}/nonexistent_file/nonexistent_file/main.out (100%) rename tests/specs/{npm_tests => npm}/nonexistent_file_node_modules_dir/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/nonexistent_file_node_modules_dir/nonexistent_file/main.js (100%) rename tests/specs/{npm_tests => npm}/nonexistent_file_node_modules_dir/nonexistent_file/main.out (100%) rename tests/specs/{npm_tests => npm}/permissions_outside_package/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/permissions_outside_package/permissions_outside_package/foo/config.js (100%) rename tests/specs/{npm_tests => npm}/permissions_outside_package/permissions_outside_package/foo/package.json (100%) rename tests/specs/{npm_tests => npm}/permissions_outside_package/permissions_outside_package/main.out (100%) rename tests/specs/{npm_tests => npm}/permissions_outside_package/permissions_outside_package/main.ts (100%) rename tests/specs/{npm_tests => npm}/remote_npm_specifier/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/remote_npm_specifier/remote_npm_specifier/main.out (100%) rename tests/specs/{npm_tests => npm}/remote_npm_specifier/remote_npm_specifier/main.ts (100%) rename tests/specs/{npm_tests => npm}/remote_npm_specifier/remote_npm_specifier/remote.ts (100%) rename tests/specs/{npm_tests => npm}/require_esm/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/require_esm/require_esm/esm.js (100%) rename tests/specs/{npm_tests => npm}/require_esm/require_esm/main.out (100%) rename tests/specs/{npm_tests => npm}/require_esm/require_esm/main.ts (100%) rename tests/specs/{npm_tests => npm}/require_json/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/require_json/require_json/main.js (100%) rename tests/specs/{npm_tests => npm}/require_json/require_json/main.out (100%) rename tests/specs/{npm_tests => npm}/reserved_word_exports/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/reserved_word_exports/reserved_word_exports/main.out (100%) rename tests/specs/{npm_tests => npm}/reserved_word_exports/reserved_word_exports/main.ts (100%) rename tests/specs/{npm_tests => npm}/run_existing_npm_package_with_subpath/__test__.jsonc (92%) rename tests/specs/{npm_tests => npm}/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out (100%) rename tests/specs/{npm_tests => npm}/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json (100%) rename tests/specs/{npm_tests => npm}/sub_paths/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/sub_paths/sub_paths/main.jsx (100%) rename tests/specs/{npm_tests => npm}/sub_paths/sub_paths/main.out (100%) rename tests/specs/{npm_tests => npm}/tarball_with_global_header/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/tarball_with_global_header/tarball_with_global_header/main.js (100%) rename tests/specs/{npm_tests => npm}/tarball_with_global_header/tarball_with_global_header/main.out (100%) rename tests/specs/{npm_tests => npm}/translate_cjs_to_esm/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/translate_cjs_to_esm/translate_cjs_to_esm/main.js (100%) rename tests/specs/{npm_tests => npm}/translate_cjs_to_esm/translate_cjs_to_esm/main.out (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module/types_ambient_module/import_map.json (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module/types_ambient_module/main.out (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module/types_ambient_module/main.ts (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module/types_ambient_module/main_import_map.out (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module/types_ambient_module/main_import_map.ts (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module_import_map/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module_import_map/types_ambient_module/import_map.json (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module_import_map/types_ambient_module/main.out (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module_import_map/types_ambient_module/main.ts (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module_import_map/types_ambient_module/main_import_map.out (100%) rename tests/specs/{npm_tests => npm}/types_ambient_module_import_map/types_ambient_module/main_import_map.ts (100%) rename tests/specs/{npm_tests => npm}/types_d_ext/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/types_d_ext/d_ext/main.out (100%) rename tests/specs/{npm_tests => npm}/types_d_ext/d_ext/main.ts (100%) rename tests/specs/{npm_tests => npm}/types_entry_value_not_exists/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/types_entry_value_not_exists/types_entry_value_not_exists/main.out (100%) rename tests/specs/{npm_tests => npm}/types_entry_value_not_exists/types_entry_value_not_exists/main.ts (100%) rename tests/specs/{npm_tests => npm}/types_exports_import_types/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/types_exports_import_types/types_exports_import_types/main.out (100%) rename tests/specs/{npm_tests => npm}/types_exports_import_types/types_exports_import_types/main.ts (100%) rename tests/specs/{npm_tests => npm}/types_no_types_entry/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/types_no_types_entry/types_no_types_entry/main.out (100%) rename tests/specs/{npm_tests => npm}/types_no_types_entry/types_no_types_entry/main.ts (100%) rename tests/specs/{npm_tests => npm}/typescript_file_in_package/__test__.jsonc (100%) rename tests/specs/{npm_tests => npm}/typescript_file_in_package/typescript_file_in_package/main.out (100%) rename tests/specs/{npm_tests => npm}/typescript_file_in_package/typescript_file_in_package/main.ts (100%) create mode 100644 tests/specs/permission/allow_import/__test__.jsonc create mode 100644 tests/specs/permission/allow_import/builtin_host.ts create mode 100644 tests/specs/permission/allow_import/cache.out create mode 100644 tests/specs/permission/allow_import/check.out create mode 100644 tests/specs/permission/allow_import/compile.out create mode 100644 tests/specs/permission/allow_import/doc.out create mode 100644 tests/specs/permission/allow_import/doc.ts create mode 100644 tests/specs/permission/allow_import/doc_allowed.out create mode 100644 tests/specs/permission/allow_import/info.out create mode 100644 tests/specs/permission/allow_import/main.ts create mode 100644 tests/specs/permission/allow_import/run.out create mode 100644 tests/specs/permission/allow_import/serve.out create mode 100644 tests/specs/permission/allow_import_jsx/__test__.jsonc create mode 100644 tests/specs/permission/allow_import_jsx/deno.jsonc create mode 100644 tests/specs/permission/allow_import_jsx/main.out create mode 100644 tests/specs/permission/allow_import_jsx/main.tsx create mode 100644 tests/specs/permission/allow_import_main_module/__test__.jsonc create mode 100644 tests/specs/permission/allow_import_not_on_redirect/__test__.jsonc create mode 100644 tests/specs/permission/allow_import_not_on_redirect/main.js create mode 100644 tests/specs/permission/allow_import_not_on_redirect/main.out rename tests/{testdata/workers => specs/worker/worker_permissions_dynamic_remote}/permissions_dynamic_remote.ts (64%) rename tests/{testdata/workers => specs/worker/worker_permissions_dynamic_remote}/permissions_dynamic_remote.ts.out (80%) rename tests/{testdata/workers => specs/worker/worker_permissions_remote_remote}/permissions_remote_remote.ts (100%) create mode 100644 tests/testdata/add.ts diff --git a/Cargo.lock b/Cargo.lock index bec2ec12cc0282..854d8310bfc4c8 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 ec2243a818b7a7..ede5cc15cd89e7 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 10fa07bed2a5b2..74ccb512f37336 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>, pub deny_write: Option>, pub no_prompt: bool, + pub allow_import: Option>, } 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]) -> PermissionsOptions { fn handle_allow( allow_all: bool, value: Option, @@ -673,6 +677,41 @@ impl PermissionFlags { } } + fn handle_imports( + cli_arg_urls: &[Cow], + imports: Option>, + ) -> Option> { + 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 { + 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#"Permission options: Docs: https://docs.deno.com/go/permissions - -A, --allow-all Allow all permissions. - --no-prompt Always throw if required permission wasn't passed. - Can also be set via the DENO_NO_PROMPT environment variable. - -R, --allow-read[=<...] Allow file system read access. Optionally specify allowed paths. - --allow-read | --allow-read="/etc,/var/log.txt" - -W, --allow-write[=<...] Allow file system write access. Optionally specify allowed paths. - --allow-write | --allow-write="/etc,/var/log.txt" - -N, --allow-net[=<...] Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary. - --allow-net | --allow-net="localhost:8080,deno.land" - -E, --allow-env[=<...] Allow access to environment variables. Optionally specify accessible environment variables. - --allow-env | --allow-env="PORT,HOME,PATH" - -S, --allow-sys[=<...] Allow access to OS information. Optionally allow specific APIs by function name. - --allow-sys | --allow-sys="systemMemoryInfo,osRelease" - --allow-run[=<...] Allow running subprocesses. Optionally specify allowed runnable program names. - --allow-run | --allow-run="whoami,ps" - --allow-ffi[=<...] (Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files. - --allow-ffi | --allow-ffi="./libfoo.so" - --deny-read[=<...] Deny file system read access. Optionally specify denied paths. - --deny-read | --deny-read="/etc,/var/log.txt" - --deny-write[=<...] Deny file system write access. Optionally specify denied paths. - --deny-write | --deny-write="/etc,/var/log.txt" - --deny-net[=<...] Deny network access. Optionally specify defined IP addresses and host names, with ports as necessary. - --deny-net | --deny-net="localhost:8080,deno.land" - --deny-env[=<...] Deny access to environment variables. Optionally specify inacessible environment variables. - --deny-env | --deny-env="PORT,HOME,PATH" - -S, --deny-sys[=<...] Deny access to OS information. Optionally deny specific APIs by function name. - --deny-sys | --deny-sys="systemMemoryInfo,osRelease" - --deny-run[=<...] Deny running subprocesses. Optionally specify denied runnable program names. - --deny-run | --deny-run="whoami,ps" - --deny-ffi[=<...] (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files. - --deny-ffi | --deny-ffi="./libfoo.so" + -A, --allow-all Allow all permissions. + --no-prompt Always throw if required permission wasn't passed. + Can also be set via the DENO_NO_PROMPT environment variable. + -R, --allow-read[=<...] Allow file system read access. Optionally specify allowed paths. + --allow-read | --allow-read="/etc,/var/log.txt" + -W, --allow-write[=<...] Allow file system write access. Optionally specify allowed paths. + --allow-write | --allow-write="/etc,/var/log.txt" + -I, --allow-import[=<...] Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. + Default value: deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,user.githubusercontent.com:443 + --allow-import | --allow-import="example.com,github.com" + -N, --allow-net[=<...] Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary. + --allow-net | --allow-net="localhost:8080,deno.land" + -E, --allow-env[=<...] Allow access to environment variables. Optionally specify accessible environment variables. + --allow-env | --allow-env="PORT,HOME,PATH" + -S, --allow-sys[=<...] Allow access to OS information. Optionally allow specific APIs by function name. + --allow-sys | --allow-sys="systemMemoryInfo,osRelease" + --allow-run[=<...] Allow running subprocesses. Optionally specify allowed runnable program names. + --allow-run | --allow-run="whoami,ps" + --allow-ffi[=<...] (Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files. + --allow-ffi | --allow-ffi="./libfoo.so" + --deny-read[=<...] Deny file system read access. Optionally specify denied paths. + --deny-read | --deny-read="/etc,/var/log.txt" + --deny-write[=<...] Deny file system write access. Optionally specify denied paths. + --deny-write | --deny-write="/etc,/var/log.txt" + --deny-net[=<...] Deny network access. Optionally specify defined IP addresses and host names, with ports as necessary. + --deny-net | --deny-net="localhost:8080,deno.land" + --deny-env[=<...] Deny access to environment variables. Optionally specify inacessible environment variables. + --deny-env | --deny-env="PORT,HOME,PATH" + -S, --deny-sys[=<...] Deny access to OS information. Optionally deny specific APIs by function name. + --deny-sys | --deny-sys="systemMemoryInfo,osRelease" + --deny-run[=<...] Deny running subprocesses. Optionally specify denied runnable program names. + --deny-run | --deny-run="whoami,ps" + --deny-ffi[=<...] (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files. + --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: 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::("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::("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::("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::("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 { + 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 1c92777ae3e0cf..80b9afb24a5118 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, initial_cwd: PathBuf, + main_module_cell: std::sync::OnceLock>, maybe_node_modules_folder: Option, npmrc: Arc, maybe_lockfile: Option>, @@ -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 { - 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> { + 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 a95c3508661ce9..2d88137165eac8 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; pub use deno_cache_dir::HttpCache; +pub struct FetchCacherOptions { + pub file_header_overrides: HashMap>, + 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, npm_resolver: Arc, module_info_cache: Arc, - permissions: FetchPermissionsOption, + permissions: PermissionsContainer, cache_info_enabled: bool, + is_deno_publish: bool, } impl FetchCacher { pub fn new( file_fetcher: Arc, - file_header_overrides: HashMap>, global_http_cache: Arc, npm_resolver: Arc, module_info_cache: Arc, - 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 0f49546d07f742..8aea635d2dd5b8 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -185,6 +185,7 @@ struct CliFactoryServices { node_resolver: Deferred>, npm_resolver: Deferred>, permission_desc_parser: Deferred>, + root_permissions_container: Deferred, sloppy_imports_resolver: Deferred>>, text_only_progress_bar: Deferred, type_checker: Deferred>, @@ -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 { - 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 2f4b0b3dc5016f..ca11449393b1bf 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 { - 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 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 { 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 211b278e08166f..c463d71a6a44fe 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>>, cli_options: Arc, module_load_preparer: Arc, + root_permissions: PermissionsContainer, } impl MainModuleGraphContainer { pub fn new( cli_options: Arc, module_load_preparer: Arc, + 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 1add83eb990a0f..d8f7ae749cb283 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 { + 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, file_fetcher: Arc, global_http_cache: Arc, + root_permissions_container: PermissionsContainer, } impl ModuleGraphBuilder { @@ -386,6 +404,7 @@ impl ModuleGraphBuilder { maybe_file_watcher_reporter: Option, file_fetcher: Arc, global_http_cache: Arc, + 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 85daa4e289bf30..aed4b47efcca5e 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 a81c5a0aa8a7c6..f4e219bea12d01 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 { 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, emitter: Arc, parsed_source_cache: Arc, @@ -769,11 +771,12 @@ impl 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 ModuleLoader &[specifier], is_dynamic, lib, - root_permissions.into(), + permissions, None, ) .await?; diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index bab26673479167..c501d2d6bcfbc5 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -130,8 +130,6 @@ struct SharedModuleLoaderState { #[derive(Clone)] struct EmbeddedModuleLoader { shared: Arc, - 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 c22afbb9a7fb86..7edb392d48ba85 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 b9620cfded8d99..c1f98bc08ae9d1 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 d78b83cbe3bd0b..174785631eebea 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 c53a39683ed64a..733a78ddacae2f 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 fbdcd9e779fc59..941514b0456e0e 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 a598170557dc19..7d1773b34305ea 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 24bc8e30a5a104..a30304687983d8 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 2006444904380b..152e2650bd7a69 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) -> Result { 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) -> Result { }); 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 2f553cf1ed0657..4ce1cad6f2c2e1 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, hmr: bool, ) -> Result { @@ -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 { 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 6176398d54778f..861419f1ec0b9d 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, permission_desc_parser: Arc, root_cert_store_provider: Arc, + root_permissions: PermissionsContainer, shared_array_buffer_store: SharedArrayBufferStore, storage_key_resolver: StorageKeyResolver, options: CliMainWorkerOptions, @@ -432,6 +432,7 @@ impl CliMainWorkerFactory { npm_resolver: Arc, permission_parser: Arc, root_cert_store_provider: Arc, + 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 { 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 a28ba35b146745..9b2737b4fcd342 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::parse(text) + } + fn parse_env_descriptor( &self, text: &str, diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index c7ef864dbc4345..5d8e76125eb364 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 { + 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 { @@ -966,6 +974,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 { + self.0.display_name() + } + + fn from_allow(allow: &Self::AllowDesc) -> Self { + Self(NetDescriptor::from_allow(&allow.0)) + } + + fn as_allow(&self) -> Option { + 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, + 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 { + Ok(ImportDescriptor(NetDescriptor::parse(specifier)?)) + } + + pub fn from_url(url: &Url) -> Result { + Ok(ImportDescriptor(NetDescriptor::from_url(url)?)) + } +} + #[derive(Clone, Eq, PartialEq, Hash, Debug)] pub struct EnvDescriptor(EnvVarName); @@ -1519,19 +1594,35 @@ impl UnaryPermission { 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 { + 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, pub run: UnaryPermission, pub ffi: UnaryPermission, + pub import: UnaryPermission, pub all: UnitPermission, } @@ -1720,6 +1812,7 @@ pub struct PermissionsOptions { pub deny_sys: Option>, pub allow_write: Option>, pub deny_write: Option>, + pub allow_import: Option>, 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::(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::(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; + fn parse_net_descriptor_from_url( + &self, + url: &Url, + ) -> Result { + NetDescriptor::from_url(url) + } + + fn parse_import_descriptor( + &self, + text: &str, + ) -> Result; + + fn parse_import_descriptor_from_url( + &self, + url: &Url, + ) -> Result { + ImportDescriptor::from_url(url) + } + fn parse_env_descriptor(&self, text: &str) -> Result; @@ -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::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, @@ -3271,24 +3465,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)); @@ -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 9c6f1f7f182d67..d9fb8e38e52aa7 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 121dcb837c80df..f30828a6651544 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 215b956fdd8b20..0a5916f6f72047 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 9509ddcb786fcc..ab18ef76d3491d 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 2c7725443cdb0d..4dfd00146d50f6 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 a0368d8d1ff793..539e3cc7e25259 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 6b0901e267ecb8..1e1d6ed61b0c2f 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 56686cd14ab5b5..122353bba9a1b9 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 76dd80b7bd7676..42dbe57d31b9e9 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 5f2366d1e1c045..7f4ca0e3928047 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 e6d0829fd54833..e3ce115d87cac2 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 a9e70dcd94146f..36bcd6ee6f651a 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 a5cf41113111d2..934b65499c3ccb 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 9bf210bb413aa2..2dfb49ffbdc313 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 251bc617496265..6c0ab3c9fea1f5 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 8ace23f25a5200..35573839c8b8b3 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 f52bb7068b5e12..4375f60273e3bc 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 526649aa156cd6..67df193b6e53cc 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 90ca827dcbbfe9..f0c1895f4e4d1b 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 4cd2aa4235ee5d..18ff8cd079f9ed 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 4cd2aa4235ee5d..18ff8cd079f9ed 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 db79e373735686..9eb58dcc5dba3e 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 00d38bee6e6a03..3f6ea62e507da2 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 586fca28b9a7f4..2fa4c3381005d7 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 1dc5b8069304e8..25418655abac2c 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/mod1.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/mod2.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/print_hello.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/data_null_error/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/data_null_error/data_null_error/data_null_error.out rename to 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 similarity index 100% rename from tests/specs/info_tests/data_null_error/data_null_error/mod.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/data_null_error/data_null_error/types.d.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js rename to 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 similarity index 100% rename from tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_flag/041_info_flag.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_flag/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_flag_location/041_info_flag_location.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_flag_location/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_flag_script_jsx/049_info_flag_script_jsx.out rename to 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 00000000000000..6b6cdc4e1200de --- /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 similarity index 100% rename from tests/specs/info_tests/info_import_map/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_import_map/deno.json rename to 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 similarity index 100% rename from tests/specs/info_tests/info_import_map/deno.lock rename to 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 similarity index 100% rename from tests/specs/info_tests/info_import_map/main.tsx rename to 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 similarity index 100% rename from tests/specs/info_tests/info_import_map/with_import_map.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json/info_json.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/json_output/main.out rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/json_output/main.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/mod1.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/mod2.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/print_hello.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/subdir2/dynamic_import.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/json_file/subdir2/mod2.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_location/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_json_location/info_json_location.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_missing_module/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js rename to 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 similarity index 100% rename from tests/specs/info_tests/info_missing_module/info_missing_module.out rename to 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 00000000000000..32d72bcb3ada94 --- /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 similarity index 100% rename from tests/specs/info_tests/multiple_imports/multiple_imports.out rename to 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 0e1808e0a95f2f..205d21c130eaab 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_type_import/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/info_type_import/info_type_import.out rename to 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 similarity index 100% rename from tests/specs/info_tests/info_type_import/info_type_import.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/info_type_import/type_and_code.ts rename to 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 00000000000000..df0c1e573302e7 --- /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 similarity index 100% rename from tests/specs/info_tests/types_header_direct/type_directives_01.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/types_header_direct/types_header.out rename to 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 similarity index 100% rename from tests/specs/info_tests/with_config_override/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/info_tests/with_config_override/with_config/deno-override.json rename to 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 similarity index 100% rename from tests/specs/info_tests/with_config_override/with_config/deno.json rename to 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 similarity index 100% rename from tests/specs/info_tests/with_config_override/with_config/import_map.json rename to 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 similarity index 100% rename from tests/specs/info_tests/with_config_override/with_config/test.ts rename to 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 similarity index 100% rename from tests/specs/info_tests/with_config_override/with_config/with_config.out rename to 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 b8dc305aea8990..00000000000000 --- 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 b110b2d4c6ccde..00000000000000 --- 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 7f9b462efa5b6a..00000000000000 --- 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 bbfee2d9de07a4..d257fbc1ff3a7e 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 d53beedbd415e1..75933a6b4efa20 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 50213381ad5f12..27f6d9787160c9 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 65679a1c813205..651ed113dc50a6 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 defb113b383a34..5c901e709e5eda 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 36a1fc71ef6b86..8179052e19d94b 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 3238416b0db3bc..3c82828253622a 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 75821ac64c108a..d8172a7ca7fd6b 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 similarity index 100% rename from tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.out rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_process_beforeexit_exit_events_emitted_without_listeners/process_beforeexit_exit_events.ts rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module/test.js rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module/test.out rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module_no_sanitizers/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/cat.ts rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.js rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/test.out rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/node_test_module_no_sanitizers/test_no_sanitizers/welcome.ts rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.out rename to 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 similarity index 100% rename from tests/specs/node_compat_tests/web_node_events_dispatched_in_correct_order/events_order.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/builtin_module_module/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cached_only/__test__.jsonc rename to 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 similarity index 66% rename from tests/specs/npm_tests/cached_only/cached_only/main.out rename to tests/specs/npm/cached_only/cached_only/main.out index 31113eef3a133a..0d0cdad0947e4d 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 similarity index 100% rename from tests/specs/npm_tests/cached_only/cached_only/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_all/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_all/check_errors/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_all/check_errors/main_all.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_all/check_errors/main_local.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_local/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_local/check_errors/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_local/check_errors/main_all.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_local/check_errors/main_local.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/child_process_fork_test/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_require_esm/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_sub_path/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js rename to 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 similarity index 63% rename from tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out rename to tests/specs/npm/cjs_this_in_exports/cjs_this_in_exports/main.out index 9517015ae5051e..88c18dbe4e8bcc 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 similarity index 100% rename from tests/specs/npm_tests/cjs_with_deps/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/compare_globals/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/compare_globals/compare_globals/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/compare_globals/compare_globals/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/create_require/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/create_require/create_require/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/create_require/create_require/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_cache/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_cache/deno_cache.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out rename to 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 similarity index 91% rename from tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc rename to tests/specs/npm/deno_run_cowsay_with_node_modules_dir/__test__.jsonc index 8671ed1fea1b0d..d2c95f0728ad93 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json rename to 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 similarity index 92% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc rename to tests/specs/npm/different_nested_dep_node_modules_dir_true/__test__.jsonc index 0533a992bf21c6..a5c40cdd957f12 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_json/import_json/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_json/import_json/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_json/import_json/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_json/import_json/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_map/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_map/import_map/import_map.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_map/import_map/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/import_map/import_map/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/package.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out rename to 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 similarity index 92% rename from tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc rename to tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc index 5dd35f5a4a2b9a..1e6ef8284ac2d5 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out rename to 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 similarity index 92% rename from tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc rename to tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc index 1b34f48137c2ba..37b510488eecb9 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts rename to 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 similarity index 92% rename from tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc rename to tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc index 0778cb56244745..1f568e2861ca3a 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts rename to 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 similarity index 92% rename from tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc rename to tests/specs/npm/node_modules_deno_node_modules_local/__test__.jsonc index a1e67b32bad7bf..caa34f67cb3ddc 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts rename to 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 similarity index 92% rename from tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc rename to tests/specs/npm/node_modules_dir_require_added_node_modules_folder/__test__.jsonc index 5813bb3f21f35b..c20c9292485893 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out rename to 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 similarity index 91% rename from tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc rename to tests/specs/npm/node_modules_dir_require_main_entry/__test__.jsonc index 45936f1de2a638..1a0dfba321539c 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out rename to 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 similarity index 92% rename from tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc rename to tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc index ae79e8a47263bc..75488e1b5d9a67 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out rename to 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 similarity index 91% rename from tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc rename to tests/specs/npm/node_modules_dir_yargs/__test__.jsonc index 8aa139a51da8c8..df28ea7eff05bd 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/non_existent_dep/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/nonexistent_file/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out rename to 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 similarity index 92% rename from tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc rename to tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc index 28da47300b3ecb..66595558f1667a 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 similarity index 100% rename from tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/permissions_outside_package/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_esm/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_esm/require_esm/esm.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_esm/require_esm/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_esm/require_esm/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_json/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_json/require_json/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/require_json/require_json/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/reserved_word_exports/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts rename to 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 similarity index 92% rename from tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc rename to tests/specs/npm/run_existing_npm_package_with_subpath/__test__.jsonc index bc76b00be5c810..bb02973c4d910d 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 similarity index 100% rename from tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/sub_paths/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/sub_paths/sub_paths/main.jsx rename to 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 similarity index 100% rename from tests/specs/npm_tests/sub_paths/sub_paths/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js rename to 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 similarity index 100% rename from tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_d_ext/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_d_ext/d_ext/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_d_ext/d_ext/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_exports_import_types/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_no_types_entry/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts rename to 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 similarity index 100% rename from tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc rename to 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 similarity index 100% rename from tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out rename to 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 similarity index 100% rename from tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts rename to 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 00000000000000..21a3cb7b591330 --- /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 00000000000000..a3ca2df76a1d39 --- /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 00000000000000..da40ede3a83d3b --- /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 00000000000000..da40ede3a83d3b --- /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 00000000000000..da40ede3a83d3b --- /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 00000000000000..bc748d7260d4e9 --- /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 00000000000000..622506c9bfe5de --- /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 00000000000000..61886be383d319 --- /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 00000000000000..2e364ff278dbf9 --- /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 00000000000000..8dfed682e4dbc0 --- /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 00000000000000..da40ede3a83d3b --- /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 00000000000000..da40ede3a83d3b --- /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 00000000000000..cb80deb72c628b --- /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 00000000000000..311409ea370e75 --- /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 00000000000000..fda79f89d2e0ec --- /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 00000000000000..f03d10c5b0eb98 --- /dev/null +++ b/tests/specs/permission/allow_import_jsx/main.tsx @@ -0,0 +1,3 @@ +export function Component() { + return
Hi
; +} 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 00000000000000..c0a92bfc310487 --- /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 00000000000000..b05d0c0cbdf4f7 --- /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 00000000000000..226a6b622c8571 --- /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 00000000000000..3cab01e14c721d --- /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 f1827538ae6d3e..ab5db6f6e1a71c 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 929fc72cd30d30..6914dc51e08768 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 a7235cbf166c96..b0a544df892885 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 601035b059a324..d9fb6408fb69c0 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 d1da06be8146a0..fa06d8c38952b6 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 64296206f0e1b4..dd7d052c923a67 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 1fd0b4cb12f6ac..d999a67f91e9cc 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 602250082b54a6..138d007adb8c5f 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 59774f938a836f..79068d63f02941 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 06a439fd47afae..d40e31a49fb865 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 afecff0a88b73b..8019bb46d1bfcb 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 6dc4f0f5fa15e9..67b817d6dfae83 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 e7af110bb56fde..0f5a9943452236 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 8343b17f690859..498d9d5079a828 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 similarity index 64% rename from tests/testdata/workers/permissions_dynamic_remote.ts rename to tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts index 54a361bc0055b7..5f0fdf7a171aec 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 similarity index 80% rename from tests/testdata/workers/permissions_dynamic_remote.ts.out rename to tests/specs/worker/worker_permissions_dynamic_remote/permissions_dynamic_remote.ts.out index 4fb2c2234f86b4..fa4232efd06477 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 8cf7001586a943..00fd2a6e4cc446 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 similarity index 100% rename from tests/testdata/workers/permissions_remote_remote.ts rename to 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 e5bdfc2dc10864..423120bb0c36d7 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 00000000000000..8d9b8a22a101a9 --- /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 9ef4158ce9e9fe..865c1777a96332 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 1e2c8c21a4b40c..569b1f84c594b6 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 f436a5eb84534a..20b6839e4c9a18 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 be4fc1c34665cd..01bff7d7a2205b 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 00248e2778166a..67c851205017fa 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 0e8b0fc1f16d95..2676d7551f9bc9 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 47961cf63b8790..bdf423b59c950a 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 87ce43e9cd013c..15c26b42519a2a 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 4ce63131192537..d8a50a9aa6e7f9 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 71305824c70120..2129d90b4ad54c 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 77ed3ae264b430..466218a9652d2e 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 9670f68cd202a7..197ac1801d8050 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 2d6e820fd687a6..6bb64eccdb14c6 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"; From 121d9697a17c66fce2ba974cb0b0f735ca420fce Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 26 Sep 2024 08:47:29 +0530 Subject: [PATCH 005/436] fix(ext/node): fix process.stdin.pause() (#25864) Fixes https://github.com/denoland/deno/issues/25844 --- ext/node/polyfills/net.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/node/polyfills/net.ts b/ext/node/polyfills/net.ts index 6625ce7b50044e..48e1d0de8778f7 100644 --- a/ext/node/polyfills/net.ts +++ b/ext/node/polyfills/net.ts @@ -951,7 +951,6 @@ export class Socket extends Duplex { */ override pause(): this { if ( - this[kBuffer] && !this.connecting && this._handle && this._handle.reading From 6be7d5139870ddbfef8f13dbe8cd4c59c34acc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 26 Sep 2024 10:27:44 +0100 Subject: [PATCH 006/436] v2.0.0-rc.6 (#25877) --- Cargo.lock | 2 +- cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 854d8310bfc4c8..bc110351143fc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1146,7 +1146,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.0-rc.5" +version = "2.0.0-rc.6" dependencies = [ "anstream", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ede5cc15cd89e7..42ac2853085498 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.0.0-rc.5" +version = "2.0.0-rc.6" authors.workspace = true default-run = "deno" edition.workspace = true From 92529697807a652b627a7dbd4f5d0c3ad7bacf59 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Thu, 26 Sep 2024 06:08:03 -0700 Subject: [PATCH 007/436] feat(tools/doc): display subitems in symbol overviews where applicable (#25885) For https://github.com/denoland/deno_doc/pull/635 --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc110351143fc3..0638118486a577 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1489,9 +1489,9 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.148.0" +version = "0.150.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144fa07977ba9eeeb98bcd267b7f0a6f8033f0f1f20fd210e669b3c4f30cefa2" +checksum = "c762829006b555837691b7016828eb1f93acf0a4ff344357b946898ea5b5610d" dependencies = [ "ammonia", "anyhow", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 42ac2853085498..b4fd053d76e119 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -67,7 +67,7 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa 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_doc = { version = "0.150.0", features = ["html", "syntect"] } deno_graph = { version = "=0.82.3" } deno_lint = { version = "=0.67.0", features = ["docs"] } deno_lockfile.workspace = true From b80cf1f5e7a10567f2a39b2f3872735f951dd3a4 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 26 Sep 2024 10:24:49 -0400 Subject: [PATCH 008/436] refactor: use ModuleGraph::fill_from_lockfile (#25887) --- cli/graph_util.rs | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/cli/graph_util.rs b/cli/graph_util.rs index d8f7ae749cb283..8a68399193c075 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -21,6 +21,7 @@ use crate::util::file_watcher::WatcherCommunicator; use crate::util::fs::canonicalize_path; use deno_config::workspace::JsrPackageConfig; use deno_graph::source::LoaderChecksum; +use deno_graph::FillFromLockfileOptions; use deno_graph::JsrLoadError; use deno_graph::ModuleLoadError; use deno_graph::WorkspaceFastCheckOption; @@ -44,7 +45,6 @@ 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; -use deno_semver::Version; use import_map::ImportMapError; use std::collections::HashSet; use std::error::Error; @@ -573,33 +573,19 @@ impl ModuleGraphBuilder { // populate the information from the lockfile if let Some(lockfile) = &self.lockfile { let lockfile = lockfile.lock(); - for (from, to) in &lockfile.content.redirects { - if let Ok(from) = ModuleSpecifier::parse(from) { - if let Ok(to) = ModuleSpecifier::parse(to) { - if !matches!(from.scheme(), "file" | "npm" | "jsr") { - graph.redirects.insert(from, to); - } - } - } - } - for (req_dep, value) in &lockfile.content.packages.specifiers { - match req_dep.kind { - deno_semver::package::PackageKind::Jsr => { - if let Ok(version) = Version::parse_standard(value) { - graph.packages.add_nv( - req_dep.req.clone(), - PackageNv { - name: req_dep.req.name.clone(), - version, - }, - ); - } - } - deno_semver::package::PackageKind::Npm => { - // ignore - } - } - } + graph.fill_from_lockfile(FillFromLockfileOptions { + redirects: lockfile + .content + .redirects + .iter() + .map(|(from, to)| (from.as_str(), to.as_str())), + package_specifiers: lockfile + .content + .packages + .specifiers + .iter() + .map(|(dep, id)| (dep, id.as_str())), + }); } } From 7437f9d944175d7d62fa34c6a2a186c0cd1684a0 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 26 Sep 2024 12:31:03 -0400 Subject: [PATCH 009/436] fix(doc): surface graph errors as warnings (#25888) --- cli/graph_util.rs | 110 ++++++++++---------- cli/lsp/language_server.rs | 3 +- cli/tools/doc.rs | 20 +++- cli/tools/info.rs | 4 +- tests/specs/permission/allow_import/doc.out | 3 +- 5 files changed, 75 insertions(+), 65 deletions(-) diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 8a68399193c075..17f7d6739f4ccd 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -52,14 +52,14 @@ use std::ops::Deref; use std::path::PathBuf; use std::sync::Arc; -#[derive(Clone, Copy)] +#[derive(Clone)] pub struct GraphValidOptions { pub check_js: bool, pub kind: GraphKind, - pub is_vendoring: bool, - /// Whether to exit the process for lockfile errors. - /// Otherwise, surfaces lockfile errors as errors. - pub exit_lockfile_errors: bool, + /// Whether to exit the process for integrity check errors such as + /// lockfile checksum mismatches and JSR integrity failures. + /// Otherwise, surfaces integrity errors as errors. + pub exit_integrity_errors: bool, } /// Check if `roots` and their deps are available. Returns `Ok(())` if @@ -75,17 +75,54 @@ pub fn graph_valid( roots: &[ModuleSpecifier], options: GraphValidOptions, ) -> Result<(), AnyError> { - if options.exit_lockfile_errors { - graph_exit_lock_errors(graph); + if options.exit_integrity_errors { + graph_exit_integrity_errors(graph); } - let mut errors = graph + let mut errors = graph_walk_errors( + graph, + fs, + roots, + GraphWalkErrorsOptions { + check_js: options.check_js, + kind: options.kind, + }, + ); + if let Some(error) = errors.next() { + Err(error) + } else { + // finally surface the npm resolution result + if let Err(err) = &graph.npm_dep_graph_result { + return Err(custom_error( + get_error_class_name(err), + format_deno_graph_error(err.as_ref().deref()), + )); + } + Ok(()) + } +} + +#[derive(Clone)] +pub struct GraphWalkErrorsOptions { + pub check_js: bool, + pub kind: GraphKind, +} + +/// Walks the errors found in the module graph that should be surfaced to users +/// and enhances them with CLI information. +pub fn graph_walk_errors<'a>( + graph: &'a ModuleGraph, + fs: &'a Arc, + roots: &'a [ModuleSpecifier], + options: GraphWalkErrorsOptions, +) -> impl Iterator + 'a { + graph .walk( roots.iter(), deno_graph::WalkOptions { check_js: options.check_js, kind: options.kind, - follow_dynamic: options.is_vendoring, + follow_dynamic: false, prefer_fast_check_graph: false, }, ) @@ -109,7 +146,7 @@ pub fn graph_valid( ) } ModuleGraphError::ModuleError(error) => { - enhanced_lockfile_error_message(error) + enhanced_integrity_error_message(error) .or_else(|| enhanced_sloppy_imports_error_message(fs, error)) .unwrap_or_else(|| format_deno_graph_error(error)) } @@ -132,56 +169,18 @@ pub fn graph_valid( return None; } - if options.is_vendoring { - // warn about failing dynamic imports when vendoring, but don't fail completely - if matches!( - error, - ModuleGraphError::ModuleError(ModuleError::MissingDynamic(_, _)) - ) { - log::warn!("Ignoring: {}", message); - return None; - } - - // ignore invalid downgrades and invalid local imports when vendoring - match &error { - ModuleGraphError::ResolutionError(err) - | ModuleGraphError::TypesResolutionError(err) => { - if matches!( - err, - ResolutionError::InvalidDowngrade { .. } - | ResolutionError::InvalidLocalImport { .. } - ) { - return None; - } - } - ModuleGraphError::ModuleError(_) => {} - } - } - Some(custom_error(get_error_class_name(&error.into()), message)) - }); - if let Some(error) = errors.next() { - Err(error) - } else { - // finally surface the npm resolution result - if let Err(err) = &graph.npm_dep_graph_result { - return Err(custom_error( - get_error_class_name(err), - format_deno_graph_error(err.as_ref().deref()), - )); - } - Ok(()) - } + }) } -pub fn graph_exit_lock_errors(graph: &ModuleGraph) { +pub fn graph_exit_integrity_errors(graph: &ModuleGraph) { for error in graph.module_errors() { - exit_for_lockfile_error(error); + exit_for_integrity_error(error); } } -fn exit_for_lockfile_error(err: &ModuleError) { - if let Some(err_message) = enhanced_lockfile_error_message(err) { +fn exit_for_integrity_error(err: &ModuleError) { + if let Some(err_message) = enhanced_integrity_error_message(err) { log::error!("{} {}", colors::red("error:"), err_message); std::process::exit(10); } @@ -719,14 +718,13 @@ impl ModuleGraphBuilder { &self.fs, roots, GraphValidOptions { - is_vendoring: false, kind: if self.options.type_check_mode().is_true() { GraphKind::All } else { GraphKind::CodeOnly }, check_js: self.options.check_js(), - exit_lockfile_errors: true, + exit_integrity_errors: true, }, ) } @@ -780,7 +778,7 @@ fn enhanced_sloppy_imports_error_message( } } -fn enhanced_lockfile_error_message(err: &ModuleError) -> Option { +fn enhanced_integrity_error_message(err: &ModuleError) -> Option { match err { ModuleError::LoadingErr( specifier, diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index aed4b47efcca5e..216b14de620e53 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -274,10 +274,9 @@ impl LanguageServer { factory.fs(), &roots, graph_util::GraphValidOptions { - is_vendoring: false, kind: GraphKind::All, check_js: false, - exit_lockfile_errors: false, + exit_integrity_errors: false, }, )?; diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 0ba3b84fbba3b7..8f37632c84c17b 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -7,7 +7,9 @@ use crate::args::Flags; use crate::colors; use crate::display; use crate::factory::CliFactory; -use crate::graph_util::graph_exit_lock_errors; +use crate::graph_util::graph_exit_integrity_errors; +use crate::graph_util::graph_walk_errors; +use crate::graph_util::GraphWalkErrorsOptions; use crate::tsc::get_types_declaration_file_text; use crate::util::fs::collect_specifiers; use deno_ast::diagnostics::Diagnostic; @@ -107,7 +109,7 @@ pub async fn doc( } DocSourceFileFlag::Paths(ref source_files) => { let module_graph_creator = factory.module_graph_creator().await?; - let maybe_lockfile = cli_options.maybe_lockfile(); + let fs = factory.fs(); let module_specifiers = collect_specifiers( FilePatterns { @@ -127,8 +129,18 @@ pub async fn doc( .create_graph(GraphKind::TypesOnly, module_specifiers.clone()) .await?; - if maybe_lockfile.is_some() { - graph_exit_lock_errors(&graph); + graph_exit_integrity_errors(&graph); + let errors = graph_walk_errors( + &graph, + fs, + &module_specifiers, + GraphWalkErrorsOptions { + check_js: false, + kind: GraphKind::TypesOnly, + }, + ); + for error in errors { + log::warn!("{} {}", colors::yellow("Warning"), error); } let doc_parser = doc::DocParser::new( diff --git a/cli/tools/info.rs b/cli/tools/info.rs index 174785631eebea..b92887d53a9c41 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -29,7 +29,7 @@ use crate::args::Flags; use crate::args::InfoFlags; use crate::display; use crate::factory::CliFactory; -use crate::graph_util::graph_exit_lock_errors; +use crate::graph_util::graph_exit_integrity_errors; use crate::npm::CliNpmResolver; use crate::npm::ManagedCliNpmResolver; use crate::util::checksum; @@ -75,7 +75,7 @@ pub async fn info( // write out the lockfile if there is one if let Some(lockfile) = &maybe_lockfile { - graph_exit_lock_errors(&graph); + graph_exit_integrity_errors(&graph); lockfile.write_if_changed()?; } diff --git a/tests/specs/permission/allow_import/doc.out b/tests/specs/permission/allow_import/doc.out index bc748d7260d4e9..6a57eafe69a54a 100644 --- a/tests/specs/permission/allow_import/doc.out +++ b/tests/specs/permission/allow_import/doc.out @@ -1,4 +1,5 @@ -[# todo(dsherret): we should probably at least show a warning here] +Warning Requires import access to "localhost:4545", run again with the --allow-import flag + at file:///[WILDLINE]/doc.ts:1:15 Defined in file:///[WILDLINE]/doc.ts:3:1 class Test From 13c53d9727e0e529d04fd8b7709cb84b723fb0d8 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:36:25 -0700 Subject: [PATCH 010/436] fix(installl): make bin entries executable even if not put in `node_modules/.bin` (#25873) Fixes https://github.com/denoland/deno/issues/25862. npm only makes bin entries executable if they get linked into `.bin`, as we did before this PR. So this PR actually deviates from npm, because it's the only reasonable way to fix this that I can think of. --- The reason this was broken in moment is the following: Moment has dependencies on two typescript versions: 1.8 and 3.1 If you have two packages with conflicting bin entries (i.e. two typescript versions which both have a bin entry `tsc`), in npm it is non-deterministic and undefined which one will end up in `.bin`. npm, due to implementation differences, chooses to put typescript 1.8 into the `.bin` directory, and so `node_modules/typescript/bin/tsc` ends up getting marked executable. We, however, choose typescript 3.2, and so we end up making `node_modules/typescript3/bin/tsc` executable. As part of its tests, moment executes `node_modules/typescript/bin/tsc`. Because we didn't make it executable, this fails. Since the conflict resolution is undefined in npm, instead of trying to match it, I think it makes more sense to just make bin entries executable even if they aren't chosen in the case of a conflict. --- .../managed/resolvers/common/bin_entries.rs | 117 ++++++++++++------ .../npm/@denotest/bin/1.0.0/cli-cjs.js | 2 + .../bin_entries_prefer_closer/__test__.jsonc | 7 ++ 3 files changed, 85 insertions(+), 41 deletions(-) diff --git a/cli/npm/managed/resolvers/common/bin_entries.rs b/cli/npm/managed/resolvers/common/bin_entries.rs index 25a020c2bc614a..4524ce83265929 100644 --- a/cli/npm/managed/resolvers/common/bin_entries.rs +++ b/cli/npm/managed/resolvers/common/bin_entries.rs @@ -69,7 +69,11 @@ impl<'a> BinEntries<'a> { fn for_each_entry( &mut self, snapshot: &NpmResolutionSnapshot, - mut f: impl FnMut( + mut already_seen: impl FnMut( + &Path, + &str, // bin script + ) -> Result<(), AnyError>, + mut new: impl FnMut( &NpmResolutionPackage, &Path, &str, // bin name @@ -90,18 +94,20 @@ impl<'a> BinEntries<'a> { deno_npm::registry::NpmPackageVersionBinEntry::String(script) => { let name = default_bin_name(package); if !seen.insert(name) { + already_seen(package_path, script)?; // we already set up a bin entry with this name continue; } - f(package, package_path, name, script)?; + new(package, package_path, name, script)?; } deno_npm::registry::NpmPackageVersionBinEntry::Map(entries) => { for (name, script) in entries { if !seen.insert(name) { + already_seen(package_path, script)?; // we already set up a bin entry with this name continue; } - f(package, package_path, name, script)?; + new(package, package_path, name, script)?; } } } @@ -118,10 +124,14 @@ impl<'a> BinEntries<'a> { ) -> Vec<(String, PathBuf)> { let mut bins = Vec::new(); self - .for_each_entry(snapshot, |_, package_path, name, script| { - bins.push((name.to_string(), package_path.join(script))); - Ok(()) - }) + .for_each_entry( + snapshot, + |_, _| Ok(()), + |_, package_path, name, script| { + bins.push((name.to_string(), package_path.join(script))); + Ok(()) + }, + ) .unwrap(); bins } @@ -139,15 +149,26 @@ impl<'a> BinEntries<'a> { )?; } - self.for_each_entry(snapshot, |package, package_path, name, script| { - set_up_bin_entry( - package, - name, - script, - package_path, - bin_node_modules_dir_path, - ) - })?; + self.for_each_entry( + snapshot, + |_package_path, _script| { + #[cfg(unix)] + { + let path = _package_path.join(_script); + make_executable_if_exists(&path)?; + } + Ok(()) + }, + |package, package_path, name, script| { + set_up_bin_entry( + package, + name, + script, + package_path, + bin_node_modules_dir_path, + ) + }, + )?; Ok(()) } @@ -255,44 +276,58 @@ fn set_up_bin_shim( } #[cfg(unix)] -fn symlink_bin_entry( - _package: &NpmResolutionPackage, - bin_name: &str, - bin_script: &str, - package_path: &Path, - bin_node_modules_dir_path: &Path, -) -> Result<(), AnyError> { +/// Make the file at `path` executable if it exists. +/// Returns `true` if the file exists, `false` otherwise. +fn make_executable_if_exists(path: &Path) -> Result { use std::io; - use std::os::unix::fs::symlink; - let link = bin_node_modules_dir_path.join(bin_name); - let original = package_path.join(bin_script); - use std::os::unix::fs::PermissionsExt; - let mut perms = match std::fs::metadata(&original) { + let mut perms = match std::fs::metadata(path) { Ok(metadata) => metadata.permissions(), Err(err) => { if err.kind() == io::ErrorKind::NotFound { - log::warn!( - "{} Trying to set up '{}' bin for \"{}\", but the entry point \"{}\" doesn't exist.", - deno_terminal::colors::yellow("Warning"), - bin_name, - package_path.display(), - original.display() - ); - return Ok(()); + return Ok(false); } - return Err(err).with_context(|| { - format!("Can't set up '{}' bin at {}", bin_name, original.display()) - }); + return Err(err.into()); } }; if perms.mode() & 0o111 == 0 { // if the original file is not executable, make it executable perms.set_mode(perms.mode() | 0o111); - std::fs::set_permissions(&original, perms).with_context(|| { - format!("Setting permissions on '{}'", original.display()) + std::fs::set_permissions(path, perms).with_context(|| { + format!("Setting permissions on '{}'", path.display()) })?; } + + Ok(true) +} + +#[cfg(unix)] +fn symlink_bin_entry( + _package: &NpmResolutionPackage, + bin_name: &str, + bin_script: &str, + package_path: &Path, + bin_node_modules_dir_path: &Path, +) -> Result<(), AnyError> { + use std::io; + use std::os::unix::fs::symlink; + let link = bin_node_modules_dir_path.join(bin_name); + let original = package_path.join(bin_script); + + let found = make_executable_if_exists(&original).with_context(|| { + format!("Can't set up '{}' bin at {}", bin_name, original.display()) + })?; + if !found { + log::warn!( + "{} Trying to set up '{}' bin for \"{}\", but the entry point \"{}\" doesn't exist.", + deno_terminal::colors::yellow("Warning"), + bin_name, + package_path.display(), + original.display() + ); + return Ok(()); + } + let original_relative = crate::util::path::relative_path(bin_node_modules_dir_path, &original) .unwrap_or(original); diff --git a/tests/registry/npm/@denotest/bin/1.0.0/cli-cjs.js b/tests/registry/npm/@denotest/bin/1.0.0/cli-cjs.js index 7b6ba272416a0b..671e0c4a5aecb9 100644 --- a/tests/registry/npm/@denotest/bin/1.0.0/cli-cjs.js +++ b/tests/registry/npm/@denotest/bin/1.0.0/cli-cjs.js @@ -1,3 +1,5 @@ +#!/usr/bin/env -S node + const process = require("process"); for (const arg of process.argv.slice(2)) { diff --git a/tests/specs/npm/bin_entries_prefer_closer/__test__.jsonc b/tests/specs/npm/bin_entries_prefer_closer/__test__.jsonc index 92d43e7617c2ef..4e9c682df32326 100644 --- a/tests/specs/npm/bin_entries_prefer_closer/__test__.jsonc +++ b/tests/specs/npm/bin_entries_prefer_closer/__test__.jsonc @@ -18,6 +18,13 @@ { "args": "task run-no-ext", "output": "Task run-no-ext cli-no-ext hello world\n@denotest/bin 0.7.0\n" + }, + { + // even though we didn't put it in .bin, make sure the bin entry is marked executable + "if": "unix", + "commandName": "node_modules/.deno/@denotest+bin@1.0.0/node_modules/@denotest/bin/cli-cjs.js", + "args": "hello", + "output": "hello\n" } ] } From 543c687c3474233d674ba9938c40c9a33fab61e8 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:13:33 -0700 Subject: [PATCH 011/436] feat(install): warn repeatedly about not-run lifecycle scripts on explicit installs (#25878) Currently we only warn once. With this PR, we continue to warn about not-run scripts on explicit `deno install` (or cache). For `run` (or other subcommands) we only warn the once, as we do currently. --- cli/args/flags.rs | 2 ++ cli/args/mod.rs | 6 ++++++ .../managed/resolvers/common/lifecycle_scripts.rs | 2 +- tests/specs/npm/lifecycle_scripts/__test__.jsonc | 14 ++++++++++++-- .../npm/lifecycle_scripts/all_lifecycles_global.js | 3 +++ .../all_lifecycles_not_run_global_cached.out | 7 +++++++ .../lifecycle_scripts/warns_again_on_install.out | 6 ++++++ 7 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 tests/specs/npm/lifecycle_scripts/all_lifecycles_global.js create mode 100644 tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run_global_cached.out create mode 100644 tests/specs/npm/lifecycle_scripts/warns_again_on_install.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 74ccb512f37336..4e151d7d9f3e00 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -548,6 +548,8 @@ pub struct LifecycleScriptsConfig { pub allowed: PackagesAllowedScripts, pub initial_cwd: PathBuf, pub root_dir: PathBuf, + /// Part of an explicit `deno install` + pub explicit_install: bool, } #[derive(Debug, Clone, Eq, PartialEq, Default)] diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 80b9afb24a5118..a11d3bc10c0cac 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1686,6 +1686,12 @@ impl CliOptions { allowed: self.flags.allow_scripts.clone(), initial_cwd: self.initial_cwd.clone(), root_dir: self.workspace().root_dir_path(), + explicit_install: matches!( + self.sub_command(), + DenoSubcommand::Install(_) + | DenoSubcommand::Cache(_) + | DenoSubcommand::Add(_) + ), } } } diff --git a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs index a3c72634b3552e..35040386c050a4 100644 --- a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs +++ b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs @@ -111,7 +111,7 @@ impl<'a> LifecycleScripts<'a> { .push((package, package_path.into_owned())); } } else if !self.strategy.has_run(package) - && !self.strategy.has_warned(package) + && (self.config.explicit_install || !self.strategy.has_warned(package)) { self .packages_with_scripts_not_run diff --git a/tests/specs/npm/lifecycle_scripts/__test__.jsonc b/tests/specs/npm/lifecycle_scripts/__test__.jsonc index 201e424974e3e5..b798b968ff1865 100644 --- a/tests/specs/npm/lifecycle_scripts/__test__.jsonc +++ b/tests/specs/npm/lifecycle_scripts/__test__.jsonc @@ -64,12 +64,17 @@ }, { // should not warn - "args": "install -e all_lifecycles.js", + "args": "run all_lifecycles_global.js", "output": "" + }, + { + // should warn still + "args": "install -e all_lifecycles.js", + "output": "all_lifecycles_not_run_global_cached.out" } ] }, - "only_warns_first": { + "only_warns_first_run": { "steps": [ { // without running scripts (should warn) @@ -82,6 +87,11 @@ "args": "run all_lifecycles.js", "output": "only_warns_first2.out", "exitCode": 1 + }, + { + // should warn because this is an explicit install + "args": "install -e all_lifecycles.js", + "output": "warns_again_on_install.out" } ] }, diff --git a/tests/specs/npm/lifecycle_scripts/all_lifecycles_global.js b/tests/specs/npm/lifecycle_scripts/all_lifecycles_global.js new file mode 100644 index 00000000000000..eccf11a6db8abe --- /dev/null +++ b/tests/specs/npm/lifecycle_scripts/all_lifecycles_global.js @@ -0,0 +1,3 @@ +try { + const _ = await import("npm:@denotest/node-lifecycle-scripts"); +} catch (_) {} diff --git a/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run_global_cached.out b/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run_global_cached.out new file mode 100644 index 00000000000000..789c9346ab9515 --- /dev/null +++ b/tests/specs/npm/lifecycle_scripts/all_lifecycles_not_run_global_cached.out @@ -0,0 +1,7 @@ +Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed: +┠─ npm:@denotest/node-lifecycle-scripts@1.0.0 +┃ +┠─ This may cause the packages to not work correctly. +┠─ Lifecycle scripts are only supported when using a `node_modules` directory. +┠─ Enable it in your deno config file: +┖─ "nodeModulesDir": "auto" diff --git a/tests/specs/npm/lifecycle_scripts/warns_again_on_install.out b/tests/specs/npm/lifecycle_scripts/warns_again_on_install.out new file mode 100644 index 00000000000000..fe7eedc564de1d --- /dev/null +++ b/tests/specs/npm/lifecycle_scripts/warns_again_on_install.out @@ -0,0 +1,6 @@ +Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed: +┠─ npm:@denotest/node-lifecycle-scripts@1.0.0 +┃ +┠─ This may cause the packages to not work correctly. +┖─ To run lifecycle scripts, use the `--allow-scripts` flag with `deno install`: + deno install --allow-scripts=npm:@denotest/node-lifecycle-scripts@1.0.0 From 7cccb7422bb9be7a2e87d71ca59c8dabd32c07ec Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 26 Sep 2024 15:57:12 -0400 Subject: [PATCH 012/436] fix(info): move "version" field to top of json output (#25890) --- cli/tools/info.rs | 6 +++++- .../specs/info/json_deps_order/076_info_json_deps_order.out | 2 +- tests/specs/info/json_file/json_output/main.out | 2 +- tests/specs/info/multiple_redirects/main.out | 2 +- .../npm/cjs_with_deps/cjs_with_deps/main_info_json.out | 2 +- .../npm/info_chalk_display/cjs_with_deps/main_info_json.out | 2 +- .../cjs_with_deps/main_info_json.out | 2 +- .../npm/info_chalk_json/cjs_with_deps/main_info_json.out | 2 +- .../cjs_with_deps/main_info_json.out | 2 +- tests/specs/npm/info_cli_chalk_display/info/chalk_json.out | 2 +- tests/specs/npm/info_cli_chalk_json/info/chalk_json.out | 2 +- .../peer_deps_with_copied_folders/main_info_json.out | 2 +- .../peer_deps_with_copied_folders/main_info_json.out | 2 +- .../cjs_with_deps/main_info_json.out | 2 +- tests/testdata/npm/cjs_with_deps/main_info_json.out | 2 +- .../npm/peer_deps_with_copied_folders/main_info_json.out | 2 +- 16 files changed, 20 insertions(+), 16 deletions(-) diff --git a/cli/tools/info.rs b/cli/tools/info.rs index b92887d53a9c41..1c83abe3bb43cb 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -82,7 +82,11 @@ pub async fn info( if info_flags.json { let mut json_graph = serde_json::json!(graph); if let Some(output) = json_graph.as_object_mut() { - output.insert("version".to_string(), JSON_SCHEMA_VERSION.into()); + output.shift_insert( + 0, + "version".to_string(), + JSON_SCHEMA_VERSION.into(), + ); } add_npm_packages_to_json(&mut json_graph, npm_resolver.as_ref()); display::write_json_to_stdout(&json_graph)?; diff --git a/tests/specs/info/json_deps_order/076_info_json_deps_order.out b/tests/specs/info/json_deps_order/076_info_json_deps_order.out index 33d58da16a64a4..92bf1d0130425b 100644 --- a/tests/specs/info/json_deps_order/076_info_json_deps_order.out +++ b/tests/specs/info/json_deps_order/076_info_json_deps_order.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/076_info_json_deps_order.ts" ], @@ -160,6 +161,5 @@ } ], "redirects": {}, - "version": 1, "npmPackages": {} } diff --git a/tests/specs/info/json_file/json_output/main.out b/tests/specs/info/json_file/json_output/main.out index d4c2f234da3199..bc8f4d0f840d82 100644 --- a/tests/specs/info/json_file/json_output/main.out +++ b/tests/specs/info/json_file/json_output/main.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/json_output/main.ts" ], @@ -87,6 +88,5 @@ } ], "redirects": {}, - "version": 1, "npmPackages": {} } diff --git a/tests/specs/info/multiple_redirects/main.out b/tests/specs/info/multiple_redirects/main.out index 9cc1066a93b23c..0021047deb4d2c 100644 --- a/tests/specs/info/multiple_redirects/main.out +++ b/tests/specs/info/multiple_redirects/main.out @@ -2,6 +2,7 @@ Download http://localhost:4548/subdir/redirects/redirect1.js Download http://localhost:4546/subdir/redirects/redirect1.js Download http://localhost:4545/subdir/redirects/redirect1.js { + "version": 1, "roots": [ "file:///[WILDLINE]/multiple_redirects/main.ts" ], @@ -43,6 +44,5 @@ Download http://localhost:4545/subdir/redirects/redirect1.js "http://localhost:4546/subdir/redirects/redirect1.js": "http://localhost:4545/subdir/redirects/redirect1.js", "http://localhost:4548/subdir/redirects/redirect1.js": "http://localhost:4546/subdir/redirects/redirect1.js" }, - "version": 1, "npmPackages": {} } diff --git a/tests/specs/npm/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 af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out +++ b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/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 af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out +++ b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/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 af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/specs/npm/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 @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/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 af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out +++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/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 af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/specs/npm/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 @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out index d54155270b1679..21fc7edf1a1917 100644 --- a/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out +++ b/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "npm:chalk@4" ], @@ -12,7 +13,6 @@ "redirects": { "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out index d54155270b1679..21fc7edf1a1917 100644 --- a/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out +++ b/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "npm:chalk@4" ], @@ -12,7 +13,6 @@ "redirects": { "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/specs/npm/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 1a5f07c9712201..46cc35c650e572 100644 --- a/tests/specs/npm/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 @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "[WILDCARD]/peer_deps_with_copied_folders/main.ts" ], @@ -51,7 +52,6 @@ "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" }, - "version": 1, "npmPackages": { "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { "name": "@denotest/peer-dep-test-child", diff --git a/tests/specs/npm/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 1a5f07c9712201..46cc35c650e572 100644 --- a/tests/specs/npm/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 @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "[WILDCARD]/peer_deps_with_copied_folders/main.ts" ], @@ -51,7 +52,6 @@ "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" }, - "version": 1, "npmPackages": { "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { "name": "@denotest/peer-dep-test-child", diff --git a/tests/specs/npm/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 af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/specs/npm/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 @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/testdata/npm/cjs_with_deps/main_info_json.out b/tests/testdata/npm/cjs_with_deps/main_info_json.out index af1ef1351880a7..137b9f8ce56c3d 100644 --- a/tests/testdata/npm/cjs_with_deps/main_info_json.out +++ b/tests/testdata/npm/cjs_with_deps/main_info_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "file://[WILDCARD]/main.js" ], @@ -51,7 +52,6 @@ "npm:chai@4.3": "npm:/chai@4.3.6", "npm:chalk@4": "npm:/chalk@4.1.2" }, - "version": 1, "npmPackages": { "ansi-styles@4.3.0": { "name": "ansi-styles", diff --git a/tests/testdata/npm/peer_deps_with_copied_folders/main_info_json.out b/tests/testdata/npm/peer_deps_with_copied_folders/main_info_json.out index df6541aa8e83ad..d87496d6d54b6d 100644 --- a/tests/testdata/npm/peer_deps_with_copied_folders/main_info_json.out +++ b/tests/testdata/npm/peer_deps_with_copied_folders/main_info_json.out @@ -1,4 +1,5 @@ { + "version": 1, "roots": [ "[WILDCARD]/npm/peer_deps_with_copied_folders/main.ts" ], @@ -51,7 +52,6 @@ "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" }, - "version": 1, "npmPackages": { "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { "name": "@denotest/peer-dep-test-child", From eff64238b6c18ba3718c22c3b75a4618412c39e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 27 Sep 2024 00:37:49 +0100 Subject: [PATCH 013/436] feat: Don't warn about --allow-script when using esbuild (#25894) `esbuild` can work fine without needing to run post-install script, so to make it easier on users (especially people using Vite) we are not prompting to run with `--allow-scripts` again. We only do that for version >= 0.18.0 to be sure. --- .../managed/resolvers/common/lifecycle_scripts.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs index 35040386c050a4..f700d4bf91def9 100644 --- a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs +++ b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs @@ -4,6 +4,7 @@ use super::bin_entries::BinEntries; use crate::args::LifecycleScriptsConfig; use deno_npm::resolution::NpmResolutionSnapshot; use deno_semver::package::PackageNv; +use deno_semver::Version; use std::borrow::Cow; use std::rc::Rc; @@ -113,6 +114,17 @@ impl<'a> LifecycleScripts<'a> { } else if !self.strategy.has_run(package) && (self.config.explicit_install || !self.strategy.has_warned(package)) { + // Skip adding `esbuild` as it is known that it can work properly without lifecycle script + // being run, and it's also very popular - any project using Vite would raise warnings. + { + let nv = &package.id.nv; + if nv.name == "esbuild" + && nv.version >= Version::parse_standard("0.18.0").unwrap() + { + return; + } + } + self .packages_with_scripts_not_run .push((package, package_path.into_owned())); From 09a7cc4723eab0cf80cb18897fa372faa9de5b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 27 Sep 2024 01:44:36 +0100 Subject: [PATCH 014/436] refactor(fmt): rewrite HTML syntax error handling (#25892) --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- cli/tools/fmt.rs | 12 +----------- tests/specs/fmt/html/broken.out | 2 +- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0638118486a577..a1a02e3e46afa9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4342,9 +4342,9 @@ dependencies = [ [[package]] name = "markup_fmt" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fc137a4a591720176339bf7e857586a48ff35c0caee7ad6cf709327901232c" +checksum = "9dab5ae899659fbe5c8835b2c8ca8d3e357974a3e454138925b404004973361f" dependencies = [ "aho-corasick", "css_dataset", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b4fd053d76e119..21affb90048461 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -124,7 +124,7 @@ libz-sys.workspace = true log = { workspace = true, features = ["serde"] } lsp-types.workspace = true malva = "=0.10.1" -markup_fmt = "=0.13.0" +markup_fmt = "=0.13.1" memmem.workspace = true monch.workspace = true notify.workspace = true diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index a7f4fd5543d7a7..8a4bc4e6c83fc1 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -437,25 +437,15 @@ pub fn format_html( ) .map_err(|error| match error { markup_fmt::FormatError::Syntax(error) => { - // TODO(bartlomieju): rework when better error support in `markup_fmt` lands fn inner( error: &markup_fmt::SyntaxError, file_path: &Path, ) -> Option { - let error_str = format!("{}", error); - let error_str = error_str.strip_prefix("syntax error '")?; - - let reason = error_str - .split("' at") - .collect::>() - .first() - .map(|s| s.to_string())?; - let url = Url::from_file_path(file_path).ok()?; let error_msg = format!( "Syntax error ({}) at {}:{}:{}\n", - reason, + error.kind, url.as_str(), error.line, error.column diff --git a/tests/specs/fmt/html/broken.out b/tests/specs/fmt/html/broken.out index c2815552ec4072..05021a1973eae8 100644 --- a/tests/specs/fmt/html/broken.out +++ b/tests/specs/fmt/html/broken.out @@ -1,4 +1,4 @@ Error formatting: [WILDCARD]broken.html - Syntax error (expect close tag) at file://[WILDCARD]broken.html:3:0 + Syntax error (expected close tag) at file://[WILDCARD]broken.html:3:0 Checked 1 file From 88a4f8dd97704b8905d05def949b137a75286b18 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Fri, 27 Sep 2024 14:57:27 +1000 Subject: [PATCH 015/436] chore: update `simd-json` (#25897) --- Cargo.lock | 73 +++------------------------------------------ ext/node/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1a02e3e46afa9..bc51e67b821553 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4071,70 +4071,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "lexical-core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] - -[[package]] -name = "lexical-parse-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" -dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-parse-integer" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-util" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "lexical-write-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" -dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", -] - -[[package]] -name = "lexical-write-integer" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" -dependencies = [ - "lexical-util", - "static_assertions", -] - [[package]] name = "libc" version = "0.2.153" @@ -6386,13 +6322,12 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simd-json" -version = "0.13.9" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0b84c23a1066e1d650ebc99aa8fb9f8ed0ab96fd36e2e836173c92fc9fb29bc" +checksum = "05f0b376aada35f30a0012f5790e50aed62f91804a0682669aefdbe81c7fcb91" dependencies = [ "getrandom", "halfbrown", - "lexical-core", "ref-cast", "serde", "serde_json", @@ -7947,9 +7882,9 @@ dependencies = [ [[package]] name = "value-trait" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad8db98c1e677797df21ba03fca7d3bf9bec3ca38db930954e4fe6e1ea27eb4" +checksum = "bcaa56177466248ba59d693a048c0959ddb67f1151b963f904306312548cf392" dependencies = [ "float-cmp", "halfbrown", diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 1cd97e3e81046a..17da17cd815183 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -87,7 +87,7 @@ sha1.workspace = true sha2.workspace = true sha3 = { version = "0.10.8", features = ["oid"] } signature.workspace = true -simd-json = "0.13.4" +simd-json = "0.14.0" sm3 = "0.4.2" spki.workspace = true stable_deref_trait = "1.2.0" From 3134abefa462ead8bb8e2e4aa8a5b57910f3d430 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 27 Sep 2024 16:07:20 +0200 Subject: [PATCH 016/436] BREAKING(ext/net): improved error code accuracy (#25383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- ext/net/ops.rs | 1 - ext/net/ops_tls.rs | 7 +++---- ext/net/raw.rs | 10 +++++----- runtime/ops/http.rs | 20 ++++++++++---------- tests/integration/js_unit_tests.rs | 15 +++++++++++++-- tests/integration/node_unit_tests.rs | 11 +++++++---- tests/unit/http_test.ts | 6 +++--- tests/unit/net_test.ts | 4 +--- tests/unit/tls_test.ts | 2 +- tests/unit_node/http2_test.ts | 4 ++-- tests/unit_node/tls_test.ts | 6 ++++-- 11 files changed, 49 insertions(+), 37 deletions(-) diff --git a/ext/net/ops.rs b/ext/net/ops.rs index f2735eda9984e0..5248493f41c63a 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -69,7 +69,6 @@ impl From for IpAddr { } pub(crate) fn accept_err(e: std::io::Error) -> AnyError { - // FIXME(bartlomieju): compatibility with current JS implementation if let std::io::ErrorKind::Interrupted = e.kind() { bad_resource("Listener has been closed") } else { diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index 064da5818cccf1..5bc04ceb51ff6e 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -298,10 +298,10 @@ where .resource_table .take::(rid)?; // This TCP connection might be used somewhere else. If it's the case, we cannot proceed with the - // process of starting a TLS connection on top of this TCP connection, so we just return a bad - // resource error. See also: https://github.com/denoland/deno/pull/16242 + // process of starting a TLS connection on top of this TCP connection, so we just return a Busy error. + // See also: https://github.com/denoland/deno/pull/16242 let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("TCP stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "TCP stream is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let tcp_stream = read_half.reunite(write_half)?; @@ -526,7 +526,6 @@ pub async fn op_net_accept_tls( match listener.accept().try_or_cancel(&cancel_handle).await { Ok(tuple) => tuple, Err(err) if err.kind() == ErrorKind::Interrupted => { - // FIXME(bartlomieju): compatibility with current JS implementation. return Err(bad_resource("Listener has been closed")); } Err(err) => return Err(err.into()), diff --git a/ext/net/raw.rs b/ext/net/raw.rs index f2de760652aa18..a2ebfb5acb5712 100644 --- a/ext/net/raw.rs +++ b/ext/net/raw.rs @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use crate::io::TcpStreamResource; use crate::ops_tls::TlsStreamResource; -use deno_core::error::bad_resource; use deno_core::error::bad_resource_id; +use deno_core::error::custom_error; use deno_core::error::AnyError; use deno_core::AsyncRefCell; use deno_core::CancelHandle; @@ -70,7 +70,7 @@ impl NetworkListenerResource { ) -> Result, AnyError> { if let Ok(resource_rc) = resource_table.take::(listener_rid) { let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("Listener is currently in use"))?; + .map_err(|_| custom_error("Busy", "Listener is currently in use"))?; return Ok(Some(resource.listener.into_inner().into())); } Ok(None) @@ -334,7 +334,7 @@ pub fn take_network_stream_resource( { // This TCP connection might be used somewhere else. let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("TCP stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "TCP stream is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let tcp_stream = read_half.reunite(write_half)?; return Ok(NetworkStream::Tcp(tcp_stream)); @@ -344,7 +344,7 @@ pub fn take_network_stream_resource( { // This TLS connection might be used somewhere else. let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("TLS stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "TLS stream is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let tls_stream = read_half.unsplit(write_half); return Ok(NetworkStream::Tls(tls_stream)); @@ -356,7 +356,7 @@ pub fn take_network_stream_resource( { // This UNIX socket might be used somewhere else. let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("UNIX stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "Unix socket is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let unix_stream = read_half.reunite(write_half)?; return Ok(NetworkStream::Unix(unix_stream)); diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs index a195a759ee9781..cec8b0ef8fba7b 100644 --- a/runtime/ops/http.rs +++ b/runtime/ops/http.rs @@ -2,8 +2,8 @@ use std::rc::Rc; -use deno_core::error::bad_resource; use deno_core::error::bad_resource_id; +use deno_core::error::custom_error; use deno_core::error::AnyError; use deno_core::op2; use deno_core::OpState; @@ -27,10 +27,10 @@ fn op_http_start( .take::(tcp_stream_rid) { // This TCP connection might be used somewhere else. If it's the case, we cannot proceed with the - // process of starting a HTTP server on top of this TCP connection, so we just return a bad - // resource error. See also: https://github.com/denoland/deno/pull/16242 + // process of starting a HTTP server on top of this TCP connection, so we just return a Busy error. + // See also: https://github.com/denoland/deno/pull/16242 let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("TCP stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "TCP stream is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let tcp_stream = read_half.reunite(write_half)?; let addr = tcp_stream.local_addr()?; @@ -42,10 +42,10 @@ fn op_http_start( .take::(tcp_stream_rid) { // This TLS connection might be used somewhere else. If it's the case, we cannot proceed with the - // process of starting a HTTP server on top of this TLS connection, so we just return a bad - // resource error. See also: https://github.com/denoland/deno/pull/16242 + // process of starting a HTTP server on top of this TLS connection, so we just return a Busy error. + // See also: https://github.com/denoland/deno/pull/16242 let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("TLS stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "TLS stream is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let tls_stream = read_half.unsplit(write_half); let addr = tls_stream.local_addr()?; @@ -58,10 +58,10 @@ fn op_http_start( .take::(tcp_stream_rid) { // This UNIX socket might be used somewhere else. If it's the case, we cannot proceed with the - // process of starting a HTTP server on top of this UNIX socket, so we just return a bad - // resource error. See also: https://github.com/denoland/deno/pull/16242 + // process of starting a HTTP server on top of this UNIX socket, so we just return a Busy error. + // See also: https://github.com/denoland/deno/pull/16242 let resource = Rc::try_unwrap(resource_rc) - .map_err(|_| bad_resource("UNIX stream is currently in use"))?; + .map_err(|_| custom_error("Busy", "Unix socket is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let unix_stream = read_half.reunite(write_half)?; let addr = unix_stream.local_addr()?; diff --git a/tests/integration/js_unit_tests.rs b/tests/integration/js_unit_tests.rs index 5efb0f2686c958..577ca043ca6937 100644 --- a/tests/integration/js_unit_tests.rs +++ b/tests/integration/js_unit_tests.rs @@ -143,8 +143,19 @@ fn js_unit_test(test: String) { deno = deno.arg("--unstable-worker-options"); } - // TODO(mmastrac): it would be better to just load a test CA for all tests - if test == "websocket_test" || test == "tls_sni_test" { + // Some tests require the root CA cert file to be loaded. + if test == "websocket_test" { + deno = deno.arg(format!( + "--cert={}", + util::testdata_path() + .join("tls") + .join("RootCA.pem") + .to_string_lossy() + )); + }; + + if test == "tls_sni_test" { + // TODO(lucacasonato): fix the SNI in the certs so that this is not needed deno = deno.arg("--unsafely-ignore-certificate-errors"); } diff --git a/tests/integration/node_unit_tests.rs b/tests/integration/node_unit_tests.rs index c8b5b25fb3e7a4..d66db5a40ea4d0 100644 --- a/tests/integration/node_unit_tests.rs +++ b/tests/integration/node_unit_tests.rs @@ -113,15 +113,18 @@ fn node_unit_test(test: String) { .arg("--no-lock") .arg("--unstable-broadcast-channel") .arg("--unstable-net") - // TODO(kt3k): This option is required to pass tls_test.ts, - // but this shouldn't be necessary. tls.connect currently doesn't - // pass hostname option correctly and it causes cert errors. - .arg("--unsafely-ignore-certificate-errors") .arg("-A"); + + // Some tests require the root CA cert file to be loaded. + if test == "http2_test" || test == "http_test" { + deno = deno.arg("--cert=./tests/testdata/tls/RootCA.pem"); + } + // Parallel tests for crypto if test.starts_with("crypto/") { deno = deno.arg("--parallel"); } + let mut deno = deno .arg( util::tests_path() diff --git a/tests/unit/http_test.ts b/tests/unit/http_test.ts index ea72806d3af4f7..355b155afd5afd 100644 --- a/tests/unit/http_test.ts +++ b/tests/unit/http_test.ts @@ -2305,7 +2305,7 @@ Deno.test( const buf = new Uint8Array(128); const readPromise = serverConn.read(buf); - assertThrows(() => Deno.serveHttp(serverConn), Deno.errors.BadResource); + assertThrows(() => Deno.serveHttp(serverConn), Deno.errors.Busy); clientConn.close(); listener.close(); @@ -2338,7 +2338,7 @@ Deno.test( const buf = new Uint8Array(128); const readPromise = serverConn.read(buf); - assertThrows(() => Deno.serveHttp(serverConn), Deno.errors.BadResource); + assertThrows(() => Deno.serveHttp(serverConn), Deno.errors.Busy); clientConn.close(); listener.close(); @@ -2362,7 +2362,7 @@ Deno.test( const buf = new Uint8Array(128); const readPromise = serverConn.read(buf); - assertThrows(() => Deno.serveHttp(serverConn), Deno.errors.BadResource); + assertThrows(() => Deno.serveHttp(serverConn), Deno.errors.Busy); clientConn.close(); listener.close(); diff --git a/tests/unit/net_test.ts b/tests/unit/net_test.ts index c243da47fa0e52..cfa42b3d360135 100644 --- a/tests/unit/net_test.ts +++ b/tests/unit/net_test.ts @@ -126,8 +126,6 @@ Deno.test( const listener = Deno.listen({ port: listenPort }); const p = listener.accept(); listener.close(); - // TODO(piscisaureus): the error type should be `Interrupted` here, which - // gets thrown, but then ext/net catches it and rethrows `BadResource`. await assertRejects( () => p, Deno.errors.BadResource, @@ -168,7 +166,7 @@ Deno.test( } else if (e.message === "Another accept task is ongoing") { acceptErrCount++; } else { - throw new Error("Unexpected error message"); + throw e; } }; const p = listener.accept().catch(checkErr); diff --git a/tests/unit/tls_test.ts b/tests/unit/tls_test.ts index aba4d254ce0602..219f4a450831a6 100644 --- a/tests/unit/tls_test.ts +++ b/tests/unit/tls_test.ts @@ -81,7 +81,7 @@ Deno.test( // `Deno.startTls` cannot consume the connection. await assertRejects( () => Deno.startTls(clientConn, { hostname }), - Deno.errors.BadResource, + Deno.errors.Busy, ); serverConn.close(); diff --git a/tests/unit_node/http2_test.ts b/tests/unit_node/http2_test.ts index cb939646be2524..7473a487ad074a 100644 --- a/tests/unit_node/http2_test.ts +++ b/tests/unit_node/http2_test.ts @@ -10,7 +10,7 @@ import * as net from "node:net"; import { assert, assertEquals } from "@std/assert"; import { curlRequest } from "../unit/test_util.ts"; -for (const url of ["http://127.0.0.1:4246", "https://127.0.0.1:4247"]) { +for (const url of ["http://localhost:4246", "https://localhost:4247"]) { Deno.test(`[node/http2 client] ${url}`, { ignore: Deno.build.os === "windows", }, async () => { @@ -155,7 +155,7 @@ Deno.test("[node/http2.createServer()]", { res.end(); }); server.listen(0); - const port = ( server.address()).port; + const port = (server.address() as net.AddressInfo).port; const endpoint = `http://localhost:${port}`; const response = await curlRequest([ diff --git a/tests/unit_node/tls_test.ts b/tests/unit_node/tls_test.ts index 7daa544c74e71c..93eacd5ec2467e 100644 --- a/tests/unit_node/tls_test.ts +++ b/tests/unit_node/tls_test.ts @@ -149,10 +149,12 @@ Deno.test("tls.createServer creates a TLS server", async () => { }, ); server.listen(0, async () => { - const conn = await Deno.connectTls({ - hostname: "127.0.0.1", + const tcpConn = await Deno.connect({ // deno-lint-ignore no-explicit-any port: (server.address() as any).port, + }); + const conn = await Deno.startTls(tcpConn, { + hostname: "localhost", caCerts: [rootCaCert], }); From 6f0fbceaf213f523bc68d23ea28fd457499f3a75 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 27 Sep 2024 16:14:17 +0200 Subject: [PATCH 017/436] fix(lint): correctly handle old jsx in linter (#25902) Previously the CLI was incorrectly reporting `React` as unused in a JSX file that uses the "old" transform. The LSP was already handling this correctly. --- cli/args/mod.rs | 6 ++---- tests/specs/lint/jsx/__test__.jsonc | 14 +++++++------- tests/specs/lint/jsx/main.jsx | 1 - tests/specs/lint/jsx/main_windows.out | 12 ------------ .../lint/jsx/{main_unix.out => react-jsx.out} | 10 +++++----- tests/specs/lint/jsx/react-jsx/deno.json | 5 +++++ tests/specs/lint/jsx/react-jsx/mod.tsx | 3 +++ tests/specs/lint/jsx/react.out | 1 + tests/specs/lint/jsx/react/deno.json | 1 + tests/specs/lint/jsx/react/mod.tsx | 3 +++ 10 files changed, 27 insertions(+), 29 deletions(-) delete mode 100644 tests/specs/lint/jsx/main.jsx delete mode 100644 tests/specs/lint/jsx/main_windows.out rename tests/specs/lint/jsx/{main_unix.out => react-jsx.out} (52%) create mode 100644 tests/specs/lint/jsx/react-jsx/deno.json create mode 100644 tests/specs/lint/jsx/react-jsx/mod.tsx create mode 100644 tests/specs/lint/jsx/react.out create mode 100644 tests/specs/lint/jsx/react/deno.json create mode 100644 tests/specs/lint/jsx/react/mod.tsx diff --git a/cli/args/mod.rs b/cli/args/mod.rs index a11d3bc10c0cac..995a04823e9521 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1327,11 +1327,9 @@ impl CliOptions { )?; Ok(deno_lint::linter::LintConfig { - default_jsx_factory: transpile_options - .jsx_automatic + default_jsx_factory: (!transpile_options.jsx_automatic) .then(|| transpile_options.jsx_factory.clone()), - default_jsx_fragment_factory: transpile_options - .jsx_automatic + default_jsx_fragment_factory: (!transpile_options.jsx_automatic) .then(|| transpile_options.jsx_fragment_factory.clone()), }) } diff --git a/tests/specs/lint/jsx/__test__.jsonc b/tests/specs/lint/jsx/__test__.jsonc index 42dda30a56fd1b..b929e12d4579d9 100644 --- a/tests/specs/lint/jsx/__test__.jsonc +++ b/tests/specs/lint/jsx/__test__.jsonc @@ -1,15 +1,15 @@ { "steps": [ { - "if": "windows", - "args": "lint main.jsx", - "output": "main_windows.out", - "exitCode": 1 + "args": "lint", + "cwd": "./react", + "output": "react.out", + "exitCode": 0 }, { - "if": "unix", - "args": "lint main.jsx", - "output": "main_unix.out", + "args": "lint", + "cwd": "./react-jsx", + "output": "react-jsx.out", "exitCode": 1 } ] diff --git a/tests/specs/lint/jsx/main.jsx b/tests/specs/lint/jsx/main.jsx deleted file mode 100644 index 625e7d4307f96c..00000000000000 --- a/tests/specs/lint/jsx/main.jsx +++ /dev/null @@ -1 +0,0 @@ -const data =
hello
; diff --git a/tests/specs/lint/jsx/main_windows.out b/tests/specs/lint/jsx/main_windows.out deleted file mode 100644 index ec6ebecad97f4c..00000000000000 --- a/tests/specs/lint/jsx/main_windows.out +++ /dev/null @@ -1,12 +0,0 @@ -error[no-unused-vars]: `data` is never used - --> [WILDCARD]lint\jsx\main.jsx:1:7 - | -1 | const data =
hello
; - | ^^^^ - = hint: If this is intentional, prefix it with an underscore like `_data` - - docs: https://lint.deno.land/rules/no-unused-vars - - -Found 1 problem -Checked 1 file diff --git a/tests/specs/lint/jsx/main_unix.out b/tests/specs/lint/jsx/react-jsx.out similarity index 52% rename from tests/specs/lint/jsx/main_unix.out rename to tests/specs/lint/jsx/react-jsx.out index 08816e9fee66b3..c8c7007791862f 100644 --- a/tests/specs/lint/jsx/main_unix.out +++ b/tests/specs/lint/jsx/react-jsx.out @@ -1,9 +1,9 @@ -error[no-unused-vars]: `data` is never used - --> [WILDCARD]lint/jsx/main.jsx:1:7 +error[no-unused-vars]: `React` is never used + --> [WILDCARD]mod.tsx:1:7 | -1 | const data =
hello
; - | ^^^^ - = hint: If this is intentional, prefix it with an underscore like `_data` +1 | const React = { createElement() {} }; + | ^^^^^ + = hint: If this is intentional, prefix it with an underscore like `_React` docs: https://lint.deno.land/rules/no-unused-vars diff --git a/tests/specs/lint/jsx/react-jsx/deno.json b/tests/specs/lint/jsx/react-jsx/deno.json new file mode 100644 index 00000000000000..a224293f4e48ac --- /dev/null +++ b/tests/specs/lint/jsx/react-jsx/deno.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "jsx": "react-jsx" + } +} diff --git a/tests/specs/lint/jsx/react-jsx/mod.tsx b/tests/specs/lint/jsx/react-jsx/mod.tsx new file mode 100644 index 00000000000000..be1e843c149a2c --- /dev/null +++ b/tests/specs/lint/jsx/react-jsx/mod.tsx @@ -0,0 +1,3 @@ +const React = { createElement() {} }; + +const _div =
; diff --git a/tests/specs/lint/jsx/react.out b/tests/specs/lint/jsx/react.out new file mode 100644 index 00000000000000..c05ac45a1e7e51 --- /dev/null +++ b/tests/specs/lint/jsx/react.out @@ -0,0 +1 @@ +Checked 1 file diff --git a/tests/specs/lint/jsx/react/deno.json b/tests/specs/lint/jsx/react/deno.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/tests/specs/lint/jsx/react/deno.json @@ -0,0 +1 @@ +{} diff --git a/tests/specs/lint/jsx/react/mod.tsx b/tests/specs/lint/jsx/react/mod.tsx new file mode 100644 index 00000000000000..be1e843c149a2c --- /dev/null +++ b/tests/specs/lint/jsx/react/mod.tsx @@ -0,0 +1,3 @@ +const React = { createElement() {} }; + +const _div =
; From 0f617be84a8e9edf73803210c24af43f729a97de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 27 Sep 2024 17:01:20 +0100 Subject: [PATCH 018/436] ci: use macos-14-xlarge on 'main' branch (#25908) --- .github/workflows/ci.generate.ts | 9 ++++++++- .github/workflows/ci.yml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 35020a5f8c55b8..e9fcacc82372a9 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -14,6 +14,7 @@ const windowsX86Runner = "windows-2022"; const windowsX86XlRunner = "windows-2022-xl"; const macosX86Runner = "macos-13"; const macosArmRunner = "macos-14"; +const macosArmXlRunner = "macos-14-xlarge"; const Runners = { linuxX86: { @@ -42,6 +43,12 @@ const Runners = { arch: "aarch64", runner: macosArmRunner, }, + macosArmXl: { + os: "macos", + arch: "aarch64", + runner: + `\${{ github.repository == 'denoland/deno' && '${macosArmXlRunner}' || '${macosArmRunner}' }}`, + }, windowsX86: { os: "windows", arch: "x86_64", @@ -378,7 +385,7 @@ const ci = { job: "test", profile: "debug", }, { - ...Runners.macosArm, + ...Runners.macosArmXl, job: "test", profile: "release", skip_pr: true, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 280eb7cb84c06e..035a4244fc3112 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: profile: debug - os: macos arch: aarch64 - runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-14'' }}' + runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''macos-14-xlarge'' || ''macos-14'' }}' job: test profile: release skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}' From a8d1ab52761516b7f9b6069d6e433254794ed48c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 27 Sep 2024 12:49:43 -0400 Subject: [PATCH 019/436] fix(flags): --allow-all should conflict with lower permissions (#25909) Using `--allow-all` with other `--allow-x` permission flags should cause an error since `--allow-all` is a superset of `--allow-x`. Closes #25901 --- cli/args/flags.rs | 27 +++++++++++++++++++ .../permission/allow_import/__test__.jsonc | 5 ++++ .../specs/permission/allow_import/success.ts | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 tests/specs/permission/allow_import/success.ts diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 4e151d7d9f3e00..9938a09552561d 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -3603,6 +3603,14 @@ fn allow_all_arg() -> Arg { Arg::new("allow-all") .short('A') .long("allow-all") + .conflicts_with("allow-read") + .conflicts_with("allow-write") + .conflicts_with("allow-net") + .conflicts_with("allow-env") + .conflicts_with("allow-run") + .conflicts_with("allow-sys") + .conflicts_with("allow-ffi") + .conflicts_with("allow-import") .action(ArgAction::SetTrue) .help("Allow all permissions") } @@ -11007,4 +11015,23 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n" ); assert_eq!(parse("file:///example.com"), None); } + + #[test] + fn allow_all_conflicts_allow_perms() { + let flags = [ + "--allow-read", + "--allow-write", + "--allow-net", + "--allow-env", + "--allow-run", + "--allow-sys", + "--allow-ffi", + "--allow-import", + ]; + for flag in flags { + let r = + flags_from_vec(svec!["deno", "run", "--allow-all", flag, "foo.ts"]); + assert!(r.is_err()); + } + } } diff --git a/tests/specs/permission/allow_import/__test__.jsonc b/tests/specs/permission/allow_import/__test__.jsonc index 21a3cb7b591330..4135a24be16297 100644 --- a/tests/specs/permission/allow_import/__test__.jsonc +++ b/tests/specs/permission/allow_import/__test__.jsonc @@ -34,6 +34,11 @@ "output": "run.out", "exitCode": 1 }, + "run_allow_all": { + "args": "run --quiet --allow-all success.ts", + "output": "3\n", + "exitCode": 0 + }, "serve": { "args": "serve main.ts", "output": "serve.out", diff --git a/tests/specs/permission/allow_import/success.ts b/tests/specs/permission/allow_import/success.ts new file mode 100644 index 00000000000000..e83ab4b9b5d3f0 --- /dev/null +++ b/tests/specs/permission/allow_import/success.ts @@ -0,0 +1,3 @@ +import { add } from "http://localhost:4545/add.ts"; + +console.log(add(1, 2)); From fbddd5a2ebfb11dd376a751e9fc4cf09a6286ada Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Fri, 27 Sep 2024 12:35:37 -0700 Subject: [PATCH 020/436] fix(node): Pass NPM_PROCESS_STATE to subprocesses via temp file instead of env var (#25896) Fixes https://github.com/denoland/deno/issues/25401. Fixes https://github.com/denoland/deno/issues/25841. Fixes https://github.com/denoland/deno/issues/25891. --- Cargo.lock | 1 + cli/args/mod.rs | 36 ++++-- cli/npm/byonm.rs | 2 +- cli/npm/managed/mod.rs | 2 +- .../resolvers/common/lifecycle_scripts.rs | 21 +++- cli/npm/mod.rs | 2 +- cli/worker.rs | 11 +- ext/io/bi_pipe.rs | 6 +- ext/io/lib.rs | 107 ++++++++++++++++++ ext/io/pipe.rs | 2 + ext/node/lib.rs | 29 ----- ext/node/polyfills/child_process.ts | 7 +- ext/node/polyfills/internal/child_process.ts | 9 +- runtime/Cargo.toml | 1 + runtime/js/40_process.js | 4 + runtime/js/99_main.js | 1 - runtime/ops/process.rs | 106 ++++++++++++++--- runtime/snapshot.rs | 2 +- runtime/web_worker.rs | 6 +- runtime/worker.rs | 7 +- .../child-process-fork/1.0.0/index.js | 11 +- tests/unit/ops_test.ts | 2 +- 22 files changed, 288 insertions(+), 87 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc51e67b821553..206de55a60b1f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1985,6 +1985,7 @@ dependencies = [ "serde", "signal-hook", "signal-hook-registry", + "tempfile", "test_server", "tokio", "tokio-metrics", diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 995a04823e9521..c3a4c293776f84 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -69,6 +69,8 @@ use std::collections::HashMap; use std::env; use std::io::BufReader; use std::io::Cursor; +use std::io::Read; +use std::io::Seek; use std::net::SocketAddr; use std::num::NonZeroUsize; use std::path::Path; @@ -742,15 +744,33 @@ pub enum NpmProcessStateKind { Byonm, } -pub(crate) const NPM_RESOLUTION_STATE_ENV_VAR_NAME: &str = - "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE"; - static NPM_PROCESS_STATE: Lazy> = Lazy::new(|| { - let state = std::env::var(NPM_RESOLUTION_STATE_ENV_VAR_NAME).ok()?; - let state: NpmProcessState = serde_json::from_str(&state).ok()?; - // remove the environment variable so that sub processes - // that are spawned do not also use this. - std::env::remove_var(NPM_RESOLUTION_STATE_ENV_VAR_NAME); + use deno_runtime::ops::process::NPM_RESOLUTION_STATE_FD_ENV_VAR_NAME; + let fd = std::env::var(NPM_RESOLUTION_STATE_FD_ENV_VAR_NAME).ok()?; + std::env::remove_var(NPM_RESOLUTION_STATE_FD_ENV_VAR_NAME); + let fd = fd.parse::().ok()?; + let mut file = { + use deno_runtime::deno_io::FromRawIoHandle; + unsafe { std::fs::File::from_raw_io_handle(fd as _) } + }; + let mut buf = Vec::new(); + // seek to beginning. after the file is written the position will be inherited by this subprocess, + // and also this file might have been read before + file.seek(std::io::SeekFrom::Start(0)).unwrap(); + file + .read_to_end(&mut buf) + .inspect_err(|e| { + log::error!("failed to read npm process state from fd {fd}: {e}"); + }) + .ok()?; + let state: NpmProcessState = serde_json::from_slice(&buf) + .inspect_err(|e| { + log::error!( + "failed to deserialize npm process state: {e} {}", + String::from_utf8_lossy(&buf) + ) + }) + .ok()?; Some(state) }); diff --git a/cli/npm/byonm.rs b/cli/npm/byonm.rs index fc7069e1f8179d..4c8bbd3948bfc8 100644 --- a/cli/npm/byonm.rs +++ b/cli/npm/byonm.rs @@ -14,9 +14,9 @@ use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::DenoPkgJsonFsAdapter; use deno_runtime::deno_node::NodePermissions; use deno_runtime::deno_node::NodeRequireResolver; -use deno_runtime::deno_node::NpmProcessStateProvider; use deno_runtime::deno_node::PackageJson; use deno_runtime::fs_util::specifier_to_file_path; +use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageReq; use deno_semver::Version; use node_resolver::errors::PackageFolderResolveError; diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index 0be26b785779fb..40c92cd46c66b9 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -22,7 +22,7 @@ use deno_npm::NpmSystemInfo; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::NodePermissions; use deno_runtime::deno_node::NodeRequireResolver; -use deno_runtime::deno_node::NpmProcessStateProvider; +use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; use node_resolver::errors::PackageFolderResolveError; diff --git a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs index f700d4bf91def9..b358c3585626eb 100644 --- a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs +++ b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs @@ -2,7 +2,9 @@ use super::bin_entries::BinEntries; use crate::args::LifecycleScriptsConfig; +use deno_core::anyhow::Context; use deno_npm::resolution::NpmResolutionSnapshot; +use deno_runtime::deno_io::FromRawIoHandle; use deno_semver::package::PackageNv; use deno_semver::Version; use std::borrow::Cow; @@ -163,9 +165,24 @@ impl<'a> LifecycleScripts<'a> { ); let mut env_vars = crate::task_runner::real_env_vars(); + // we want to pass the current state of npm resolution down to the deno subprocess + // (that may be running as part of the script). we do this with an inherited temp file + // + // SAFETY: we are sharing a single temp file across all of the scripts. the file position + // will be shared among these, which is okay since we run only one script at a time. + // However, if we concurrently run scripts in the future we will + // have to have multiple temp files. + let temp_file_fd = + deno_runtime::ops::process::npm_process_state_tempfile( + process_state.as_bytes(), + ).context("failed to create npm process state tempfile for running lifecycle scripts")?; + // SAFETY: fd/handle is valid + let _temp_file = + unsafe { std::fs::File::from_raw_io_handle(temp_file_fd) }; // make sure the file gets closed env_vars.insert( - crate::args::NPM_RESOLUTION_STATE_ENV_VAR_NAME.to_string(), - process_state, + deno_runtime::ops::process::NPM_RESOLUTION_STATE_FD_ENV_VAR_NAME + .to_string(), + (temp_file_fd as usize).to_string(), ); for (package, package_path) in self.packages_with_scripts { // add custom commands for binaries from the package's dependencies. this will take precedence over the diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs index bedde6455175f2..15ac8ebb2890f4 100644 --- a/cli/npm/mod.rs +++ b/cli/npm/mod.rs @@ -14,7 +14,7 @@ use deno_core::error::AnyError; use deno_core::serde_json; use deno_npm::registry::NpmPackageInfo; use deno_runtime::deno_node::NodeRequireResolver; -use deno_runtime::deno_node::NpmProcessStateProvider; +use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; use node_resolver::NpmResolver; diff --git a/cli/worker.rs b/cli/worker.rs index 861419f1ec0b9d..c355d18bd5dec1 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -29,6 +29,7 @@ use deno_runtime::deno_tls::RootCertStoreProvider; use deno_runtime::deno_web::BlobStore; use deno_runtime::fmt_errors::format_js_error; use deno_runtime::inspector_server::InspectorServer; +use deno_runtime::ops::process::NpmProcessStateProviderRc; use deno_runtime::ops::worker_host::CreateWebWorkerCb; use deno_runtime::permissions::RuntimePermissionDescriptorParser; use deno_runtime::web_worker::WebWorker; @@ -147,13 +148,13 @@ impl SharedWorkerState { NodeExtInitServices { node_require_resolver: self.npm_resolver.clone().into_require_resolver(), node_resolver: self.node_resolver.clone(), - npm_process_state_provider: self - .npm_resolver - .clone() - .into_process_state_provider(), npm_resolver: self.npm_resolver.clone().into_npm_resolver(), } } + + pub fn npm_process_state_provider(&self) -> NpmProcessStateProviderRc { + self.npm_resolver.clone().into_process_state_provider() + } } pub struct CliMainWorker { @@ -614,6 +615,7 @@ impl CliMainWorkerFactory { module_loader, fs: shared.fs.clone(), node_services: Some(shared.create_node_init_services()), + npm_process_state_provider: Some(shared.npm_process_state_provider()), get_error_class_fn: Some(&errors::get_error_class_name), cache_storage_dir, origin_storage_dir, @@ -820,6 +822,7 @@ fn create_web_worker_callback( strace_ops: shared.options.strace_ops.clone(), close_on_idle: args.close_on_idle, maybe_worker_metadata: args.maybe_worker_metadata, + npm_process_state_provider: Some(shared.npm_process_state_provider()), }; WebWorker::bootstrap_from_options( diff --git a/ext/io/bi_pipe.rs b/ext/io/bi_pipe.rs index 04fff7b00b44a1..402e383ac9a766 100644 --- a/ext/io/bi_pipe.rs +++ b/ext/io/bi_pipe.rs @@ -11,11 +11,7 @@ use deno_core::RcRef; use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; -#[cfg(unix)] -pub type RawBiPipeHandle = std::os::fd::RawFd; - -#[cfg(windows)] -pub type RawBiPipeHandle = std::os::windows::io::RawHandle; +pub type RawBiPipeHandle = super::RawIoHandle; /// One end of a bidirectional pipe. This implements the /// `Resource` trait. diff --git a/ext/io/lib.rs b/ext/io/lib.rs index 47921bcee41bad..a07d64ae37ef10 100644 --- a/ext/io/lib.rs +++ b/ext/io/lib.rs @@ -67,6 +67,7 @@ pub use pipe::AsyncPipeRead; pub use pipe::AsyncPipeWrite; pub use pipe::PipeRead; pub use pipe::PipeWrite; +pub use pipe::RawPipeHandle; pub use bi_pipe::bi_pipe_pair_raw; pub use bi_pipe::BiPipe; @@ -75,6 +76,112 @@ pub use bi_pipe::BiPipeResource; pub use bi_pipe::BiPipeWrite; pub use bi_pipe::RawBiPipeHandle; +/// Abstraction over `AsRawFd` (unix) and `AsRawHandle` (windows) +pub trait AsRawIoHandle { + fn as_raw_io_handle(&self) -> RawIoHandle; +} + +#[cfg(unix)] +impl AsRawIoHandle for T +where + T: std::os::unix::io::AsRawFd, +{ + fn as_raw_io_handle(&self) -> RawIoHandle { + self.as_raw_fd() + } +} + +#[cfg(windows)] +impl AsRawIoHandle for T +where + T: std::os::windows::io::AsRawHandle, +{ + fn as_raw_io_handle(&self) -> RawIoHandle { + self.as_raw_handle() + } +} + +/// Abstraction over `IntoRawFd` (unix) and `IntoRawHandle` (windows) +pub trait IntoRawIoHandle { + fn into_raw_io_handle(self) -> RawIoHandle; +} + +#[cfg(unix)] +impl IntoRawIoHandle for T +where + T: std::os::unix::io::IntoRawFd, +{ + fn into_raw_io_handle(self) -> RawIoHandle { + self.into_raw_fd() + } +} + +#[cfg(windows)] +impl IntoRawIoHandle for T +where + T: std::os::windows::io::IntoRawHandle, +{ + fn into_raw_io_handle(self) -> RawIoHandle { + self.into_raw_handle() + } +} + +/// Abstraction over `FromRawFd` (unix) and `FromRawHandle` (windows) +pub trait FromRawIoHandle: Sized { + /// Constructs a type from a raw io handle (fd/HANDLE). + /// + /// # Safety + /// + /// Refer to the standard library docs ([unix](https://doc.rust-lang.org/stable/std/os/windows/io/trait.FromRawHandle.html#tymethod.from_raw_handle)) ([windows](https://doc.rust-lang.org/stable/std/os/fd/trait.FromRawFd.html#tymethod.from_raw_fd)) + /// + unsafe fn from_raw_io_handle(handle: RawIoHandle) -> Self; +} + +#[cfg(unix)] +impl FromRawIoHandle for T +where + T: std::os::unix::io::FromRawFd, +{ + unsafe fn from_raw_io_handle(fd: RawIoHandle) -> T { + // SAFETY: upheld by caller + unsafe { T::from_raw_fd(fd) } + } +} + +#[cfg(windows)] +impl FromRawIoHandle for T +where + T: std::os::windows::io::FromRawHandle, +{ + unsafe fn from_raw_io_handle(fd: RawIoHandle) -> T { + // SAFETY: upheld by caller + unsafe { T::from_raw_handle(fd) } + } +} + +#[cfg(unix)] +pub type RawIoHandle = std::os::fd::RawFd; + +#[cfg(windows)] +pub type RawIoHandle = std::os::windows::io::RawHandle; + +pub fn close_raw_handle(handle: RawIoHandle) { + #[cfg(unix)] + { + // SAFETY: libc call + unsafe { + libc::close(handle); + } + } + #[cfg(windows)] + { + // SAFETY: win32 call + unsafe { + windows_sys::Win32::Foundation::CloseHandle(handle as _); + } + } +} + // Store the stdio fd/handles in global statics in order to keep them // alive for the duration of the application since the last handle/fd // being dropped will close the corresponding pipe. diff --git a/ext/io/pipe.rs b/ext/io/pipe.rs index 70788f7520974b..e0e019e277dcb6 100644 --- a/ext/io/pipe.rs +++ b/ext/io/pipe.rs @@ -3,6 +3,8 @@ use std::io; use std::pin::Pin; use std::process::Stdio; +pub type RawPipeHandle = super::RawIoHandle; + // The synchronous read end of a unidirectional pipe. pub struct PipeRead { file: std::fs::File, diff --git a/ext/node/lib.rs b/ext/node/lib.rs index af14e3e854b15f..0c821ecf8bf17a 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -16,7 +16,6 @@ use deno_core::url::Url; use deno_core::v8; use deno_core::v8::ExternalReference; use deno_core::JsRuntime; -use deno_core::OpState; use deno_fs::sync::MaybeSend; use deno_fs::sync::MaybeSync; use node_resolver::NpmResolverRc; @@ -120,24 +119,6 @@ impl NodePermissions for deno_permissions::PermissionsContainer { } } -#[allow(clippy::disallowed_types)] -pub type NpmProcessStateProviderRc = - deno_fs::sync::MaybeArc; - -pub trait NpmProcessStateProvider: - std::fmt::Debug + MaybeSend + MaybeSync -{ - /// Gets a string containing the serialized npm state of the process. - /// - /// This will be set on the `DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE` environment - /// variable when doing a `child_process.fork`. The implementor can then check this environment - /// variable on startup to repopulate the internal npm state. - fn get_npm_process_state(&self) -> String { - // This method is only used in the CLI. - String::new() - } -} - #[allow(clippy::disallowed_types)] pub type NodeRequireResolverRc = deno_fs::sync::MaybeArc; @@ -165,17 +146,9 @@ fn op_node_build_os() -> String { env!("TARGET").split('-').nth(2).unwrap().to_string() } -#[op2] -#[string] -fn op_npm_process_state(state: &mut OpState) -> Result { - let npm_resolver = state.borrow_mut::(); - Ok(npm_resolver.get_npm_process_state()) -} - pub struct NodeExtInitServices { pub node_require_resolver: NodeRequireResolverRc, pub node_resolver: NodeResolverRc, - pub npm_process_state_provider: NpmProcessStateProviderRc, pub npm_resolver: NpmResolverRc, } @@ -374,7 +347,6 @@ deno_core::extension!(deno_node, ops::os::op_cpus

, ops::os::op_homedir

, op_node_build_os, - op_npm_process_state, ops::require::op_require_can_parse_as_esm, ops::require::op_require_init_paths, ops::require::op_require_node_module_paths

, @@ -662,7 +634,6 @@ deno_core::extension!(deno_node, state.put(init.node_require_resolver.clone()); state.put(init.node_resolver.clone()); state.put(init.npm_resolver.clone()); - state.put(init.npm_process_state_provider.clone()); } }, global_template_middleware = global_template_middleware, diff --git a/ext/node/polyfills/child_process.ts b/ext/node/polyfills/child_process.ts index f77a430c2cb352..c37dfc410ab39f 100644 --- a/ext/node/polyfills/child_process.ts +++ b/ext/node/polyfills/child_process.ts @@ -10,7 +10,6 @@ import { internals } from "ext:core/mod.js"; import { op_bootstrap_unstable_args, op_node_child_ipc_pipe, - op_npm_process_state, } from "ext:core/ops"; import { @@ -54,6 +53,7 @@ import { convertToValidSignal, kEmptyObject, } from "ext:deno_node/internal/util.mjs"; +import { kNeedsNpmProcessState } from "ext:runtime/40_process.js"; const MAX_BUFFER = 1024 * 1024; @@ -168,9 +168,8 @@ export function fork( options.execPath = options.execPath || Deno.execPath(); options.shell = false; - Object.assign(options.env ??= {}, { - DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE: op_npm_process_state(), - }); + // deno-lint-ignore no-explicit-any + (options as any)[kNeedsNpmProcessState] = true; return spawn(options.execPath, args, options); } diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 56fc21f354cc93..6f209b7192a393 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -56,7 +56,12 @@ import { StringPrototypeSlice } from "ext:deno_node/internal/primordials.mjs"; import { StreamBase } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { Pipe, socketType } from "ext:deno_node/internal_binding/pipe_wrap.ts"; import { Socket } from "node:net"; -import { kDetached, kExtraStdio, kIpc } from "ext:runtime/40_process.js"; +import { + kDetached, + kExtraStdio, + kIpc, + kNeedsNpmProcessState, +} from "ext:runtime/40_process.js"; export function mapValues( record: Readonly>, @@ -281,6 +286,8 @@ export class ChildProcess extends EventEmitter { [kIpc]: ipc, // internal [kExtraStdio]: extraStdioNormalized, [kDetached]: detached, + // deno-lint-ignore no-explicit-any + [kNeedsNpmProcessState]: (options ?? {} as any)[kNeedsNpmProcessState], }).spawn(); this.pid = this.#process.pid; diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 6d24781cfa28ad..ea2978c49b2d4d 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -118,6 +118,7 @@ rustyline = { workspace = true, features = ["custom-bindings"] } serde.workspace = true signal-hook = "0.3.17" signal-hook-registry = "1.4.0" +tempfile.workspace = true tokio.workspace = true tokio-metrics.workspace = true twox-hash.workspace = true diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 2592c5c464d959..e2cb1d95b270fa 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -160,6 +160,7 @@ function run({ export const kExtraStdio = Symbol("extraStdio"); export const kIpc = Symbol("ipc"); export const kDetached = Symbol("detached"); +export const kNeedsNpmProcessState = Symbol("needsNpmProcessState"); const illegalConstructorKey = Symbol("illegalConstructorKey"); @@ -178,6 +179,7 @@ function spawnChildInner(command, apiName, { [kDetached]: detached = false, [kExtraStdio]: extraStdio = [], [kIpc]: ipc = -1, + [kNeedsNpmProcessState]: needsNpmProcessState = false, } = { __proto__: null }) { const child = op_spawn_child({ cmd: pathFromURL(command), @@ -194,6 +196,7 @@ function spawnChildInner(command, apiName, { ipc, extraStdio, detached, + needsNpmProcessState, }, apiName); return new ChildProcess(illegalConstructorKey, { ...child, @@ -421,6 +424,7 @@ function spawnSync(command, { windowsRawArguments, extraStdio: [], detached: false, + needsNpmProcessState: false, }); return { success: result.status.success, diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 9134ac48a15d95..0da2072b848d87 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -487,7 +487,6 @@ const NOT_IMPORTED_OPS = [ // to not depend on them. "op_set_exit_code", "op_napi_open", - "op_npm_process_state", ]; function removeImportedOps() { diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index a39bb5f045f21d..530dcf49bec62c 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -16,6 +16,7 @@ use deno_io::fs::FileResource; use deno_io::ChildStderrResource; use deno_io::ChildStdinResource; use deno_io::ChildStdoutResource; +use deno_io::IntoRawIoHandle; use deno_permissions::PermissionsContainer; use deno_permissions::RunQueryDescriptor; use serde::Deserialize; @@ -24,6 +25,7 @@ use std::borrow::Cow; use std::cell::RefCell; use std::collections::HashMap; use std::ffi::OsString; +use std::io::Write; use std::path::Path; use std::path::PathBuf; use std::process::ExitStatus; @@ -117,6 +119,27 @@ impl StdioOrRid { } } +#[allow(clippy::disallowed_types)] +pub type NpmProcessStateProviderRc = + deno_fs::sync::MaybeArc; + +pub trait NpmProcessStateProvider: + std::fmt::Debug + deno_fs::sync::MaybeSend + deno_fs::sync::MaybeSync +{ + /// Gets a string containing the serialized npm state of the process. + /// + /// This will be set on the `DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE` environment + /// variable when doing a `child_process.fork`. The implementor can then check this environment + /// variable on startup to repopulate the internal npm state. + fn get_npm_process_state(&self) -> String { + // This method is only used in the CLI. + String::new() + } +} + +#[derive(Debug)] +pub struct EmptyNpmProcessStateProvider; +impl NpmProcessStateProvider for EmptyNpmProcessStateProvider {} deno_core::extension!( deno_process, ops = [ @@ -128,6 +151,10 @@ deno_core::extension!( deprecated::op_run_status, deprecated::op_kill, ], + options = { get_npm_process_state: Option }, + state = |state, options| { + state.put::(options.get_npm_process_state.unwrap_or(deno_fs::sync::MaybeArc::new(EmptyNpmProcessStateProvider))); + }, ); /// Second member stores the pid separately from the RefCell. It's needed for @@ -161,6 +188,7 @@ pub struct SpawnArgs { extra_stdio: Vec, detached: bool, + needs_npm_process_state: bool, } #[derive(Deserialize)] @@ -229,11 +257,64 @@ type CreateCommand = ( Vec, ); +pub fn npm_process_state_tempfile( + contents: &[u8], +) -> Result { + let mut temp_file = tempfile::tempfile()?; + temp_file.write_all(contents)?; + let handle = temp_file.into_raw_io_handle(); + #[cfg(windows)] + { + use windows_sys::Win32::Foundation::HANDLE_FLAG_INHERIT; + // make the handle inheritable + // SAFETY: winapi call, handle is valid + unsafe { + windows_sys::Win32::Foundation::SetHandleInformation( + handle as _, + HANDLE_FLAG_INHERIT, + HANDLE_FLAG_INHERIT, + ); + } + Ok(handle) + } + #[cfg(unix)] + { + // SAFETY: libc call, fd is valid + let inheritable = unsafe { + // duplicate the FD to get a new one that doesn't have the CLOEXEC flag set + // so it can be inherited by the child process + libc::dup(handle) + }; + // SAFETY: libc call, fd is valid + unsafe { + // close the old one + libc::close(handle); + } + Ok(inheritable) + } +} + +pub const NPM_RESOLUTION_STATE_FD_ENV_VAR_NAME: &str = + "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE_FD"; + fn create_command( state: &mut OpState, mut args: SpawnArgs, api_name: &str, ) -> Result { + let maybe_npm_process_state = if args.needs_npm_process_state { + let provider = state.borrow::(); + let process_state = provider.get_npm_process_state(); + let fd = npm_process_state_tempfile(process_state.as_bytes())?; + args.env.push(( + NPM_RESOLUTION_STATE_FD_ENV_VAR_NAME.to_string(), + (fd as usize).to_string(), + )); + Some(fd) + } else { + None + }; + let (cmd, run_env) = compute_run_cmd_and_check_permissions( &args.cmd, args.cwd.as_deref(), @@ -301,6 +382,9 @@ fn create_command( let mut fds_to_dup = Vec::new(); let mut fds_to_close = Vec::new(); let mut ipc_rid = None; + if let Some(fd) = maybe_npm_process_state { + fds_to_close.push(fd); + } if let Some(ipc) = args.ipc { if ipc >= 0 { let (ipc_fd1, ipc_fd2) = deno_io::bi_pipe_pair_raw()?; @@ -369,6 +453,9 @@ fn create_command( { let mut ipc_rid = None; let mut handles_to_close = Vec::with_capacity(1); + if let Some(handle) = maybe_npm_process_state { + handles_to_close.push(handle); + } if let Some(ipc) = args.ipc { if ipc >= 0 { let (hd1, hd2) = deno_io::bi_pipe_pair_raw()?; @@ -506,23 +593,6 @@ fn spawn_child( }) } -fn close_raw_handle(handle: deno_io::RawBiPipeHandle) { - #[cfg(unix)] - { - // SAFETY: libc call - unsafe { - libc::close(handle); - } - } - #[cfg(windows)] - { - // SAFETY: win32 call - unsafe { - windows_sys::Win32::Foundation::CloseHandle(handle as _); - } - } -} - fn compute_run_cmd_and_check_permissions( arg_cmd: &str, arg_cwd: Option<&str>, @@ -690,7 +760,7 @@ fn op_spawn_child( create_command(state, args, &api_name)?; let child = spawn_child(state, command, pipe_rid, extra_pipe_rids, detached); for handle in handles_to_close { - close_raw_handle(handle); + deno_io::close_raw_handle(handle); } child } diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs index db6688b464885e..f20c04f082fe60 100644 --- a/runtime/snapshot.rs +++ b/runtime/snapshot.rs @@ -302,7 +302,7 @@ pub fn create_runtime_snapshot( ops::permissions::deno_permissions::init_ops(Arc::new( RuntimePermissionDescriptorParser::new(fs), )), - ops::process::deno_process::init_ops(), + ops::process::deno_process::init_ops(None), ops::signal::deno_signal::init_ops(), ops::tty::deno_tty::init_ops(), ops::http::deno_http_runtime::init_ops(), diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 7b69a9798286ec..8892d5bc6e448a 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -1,6 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use crate::inspector_server::InspectorServer; use crate::ops; +use crate::ops::process::NpmProcessStateProviderRc; use crate::ops::worker_host::WorkersTable; use crate::shared::maybe_transpile_source; use crate::shared::runtime; @@ -383,6 +384,7 @@ pub struct WebWorkerOptions { pub strace_ops: Option>, pub close_on_idle: bool, pub maybe_worker_metadata: Option, + pub npm_process_state_provider: Option, } impl WebWorker { @@ -507,7 +509,9 @@ impl WebWorker { ops::permissions::deno_permissions::init_ops_and_esm( options.permission_desc_parser.clone(), ), - ops::process::deno_process::init_ops_and_esm(), + ops::process::deno_process::init_ops_and_esm( + options.npm_process_state_provider, + ), ops::signal::deno_signal::init_ops_and_esm(), ops::tty::deno_tty::init_ops_and_esm(), ops::http::deno_http_runtime::init_ops_and_esm(), diff --git a/runtime/worker.rs b/runtime/worker.rs index 3d8c8a0b9b23dc..f72e6d7c09d4ea 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -49,6 +49,7 @@ use crate::code_cache::CodeCache; use crate::code_cache::CodeCacheType; use crate::inspector_server::InspectorServer; use crate::ops; +use crate::ops::process::NpmProcessStateProviderRc; use crate::permissions::RuntimePermissionDescriptorParser; use crate::shared::maybe_transpile_source; use crate::shared::runtime; @@ -158,6 +159,7 @@ pub struct WorkerOptions { /// executed tries to load modules. pub module_loader: Rc, pub node_services: Option, + pub npm_process_state_provider: Option, pub permission_desc_parser: Arc, // Callbacks invoked when creating new instance of WebWorker @@ -235,6 +237,7 @@ impl Default for WorkerOptions { extensions: Default::default(), startup_snapshot: Default::default(), create_params: Default::default(), + npm_process_state_provider: Default::default(), bootstrap: Default::default(), stdio: Default::default(), feature_checker: Default::default(), @@ -437,7 +440,9 @@ impl MainWorker { ops::permissions::deno_permissions::init_ops_and_esm( options.permission_desc_parser, ), - ops::process::deno_process::init_ops_and_esm(), + ops::process::deno_process::init_ops_and_esm( + options.npm_process_state_provider, + ), ops::signal::deno_signal::init_ops_and_esm(), ops::tty::deno_tty::init_ops_and_esm(), ops::http::deno_http_runtime::init_ops_and_esm(), diff --git a/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js b/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js index 0482be4043b7d8..ca0ba246a74e25 100644 --- a/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js +++ b/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js @@ -1,14 +1,9 @@ const path = require("path"); +const childProcess = require("node:child_process"); function childProcessFork(path) { - const command = new Deno.Command(Deno.execPath(), { - args: ["run", "-A", path], - env: { - "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(), - } - }); - const child = command.spawn(); - child.status.then(() => { + const child = childProcess.fork(path); + child.on("exit", () => { console.log("Done."); }); } diff --git a/tests/unit/ops_test.ts b/tests/unit/ops_test.ts index 6de55f8b667918..4ba7c5ce33246b 100644 --- a/tests/unit/ops_test.ts +++ b/tests/unit/ops_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -const EXPECTED_OP_COUNT = 12; +const EXPECTED_OP_COUNT = 11; Deno.test(function checkExposedOps() { // @ts-ignore TS doesn't allow to index with symbol From b694efb3849c4737e8ad617a9a48d5488e21d5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 27 Sep 2024 20:37:56 +0100 Subject: [PATCH 021/436] v2.0.0-rc.7 (#25907) --- Cargo.lock | 2 +- cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 206de55a60b1f1..6ef9cd2e624682 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1146,7 +1146,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.0-rc.6" +version = "2.0.0-rc.7" dependencies = [ "anstream", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 21affb90048461..f5a8624e1d2ff2 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.0.0-rc.6" +version = "2.0.0-rc.7" authors.workspace = true default-run = "deno" edition.workspace = true From fc739dc5eb2769e4608ccf08d23ca8ff0fcc19c5 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 28 Sep 2024 07:55:01 -0400 Subject: [PATCH 022/436] refactor: use deno_path_util (#25918) --- Cargo.lock | 17 +++++++ Cargo.toml | 1 + cli/Cargo.toml | 1 + cli/args/flags.rs | 6 +-- cli/args/mod.rs | 2 +- cli/file_fetcher.rs | 4 +- cli/graph_util.rs | 4 +- cli/lsp/analysis.rs | 4 +- cli/lsp/cache.rs | 10 ++-- cli/lsp/completions.rs | 4 +- cli/lsp/config.rs | 14 +++--- cli/lsp/documents.rs | 8 ++-- cli/lsp/language_server.rs | 16 +++---- cli/lsp/resolver.rs | 4 +- cli/lsp/tsc.rs | 4 +- cli/npm/byonm.rs | 6 +-- cli/resolver.rs | 4 +- cli/tools/task.rs | 2 +- cli/util/fs.rs | 2 +- ext/fs/Cargo.toml | 1 + ext/fs/in_memory_fs.rs | 2 +- ext/fs/std_fs.rs | 2 +- ext/kv/Cargo.toml | 1 + ext/kv/sqlite.rs | 2 +- ext/node/Cargo.toml | 1 + ext/node/ops/require.rs | 4 +- runtime/Cargo.toml | 1 + runtime/fs_util.rs | 4 +- runtime/ops/os/mod.rs | 2 +- runtime/ops/process.rs | 2 +- runtime/permissions.rs | 2 +- runtime/permissions/Cargo.toml | 1 + runtime/permissions/lib.rs | 85 ++-------------------------------- 33 files changed, 83 insertions(+), 140 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ef9cd2e624682..3d8641e168f73e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1174,6 +1174,7 @@ dependencies = [ "deno_lockfile", "deno_npm", "deno_package_json", + "deno_path_util", "deno_runtime", "deno_semver", "deno_task_shell", @@ -1570,6 +1571,7 @@ dependencies = [ "base32", "deno_core", "deno_io", + "deno_path_util", "deno_permissions", "filetime", "junction", @@ -1682,6 +1684,7 @@ dependencies = [ "chrono", "deno_core", "deno_fetch", + "deno_path_util", "deno_permissions", "deno_tls", "denokv_proto", @@ -1800,6 +1803,7 @@ dependencies = [ "deno_media_type", "deno_net", "deno_package_json", + "deno_path_util", "deno_permissions", "deno_whoami", "der", @@ -1916,11 +1920,23 @@ dependencies = [ "url", ] +[[package]] +name = "deno_path_util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625b490bc4734ff778926d7034650a2ddcef2fd42b71e30bb722249156d5a144" +dependencies = [ + "percent-encoding", + "thiserror", + "url", +] + [[package]] name = "deno_permissions" version = "0.28.0" dependencies = [ "deno_core", + "deno_path_util", "deno_terminal 0.2.0", "fqdn", "libc", @@ -1953,6 +1969,7 @@ dependencies = [ "deno_napi", "deno_net", "deno_node", + "deno_path_util", "deno_permissions", "deno_terminal 0.2.0", "deno_tls", diff --git a/Cargo.toml b/Cargo.toml index 81cbf8b4c6a449..3bb9f2d46e9c55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,7 @@ deno_core = { version = "0.311.0" } deno_bench_util = { version = "0.162.0", path = "./bench_util" } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.1.4", features = ["module_specifier"] } +deno_path_util = "=0.1.1" deno_permissions = { version = "0.28.0", path = "./runtime/permissions" } deno_runtime = { version = "0.177.0", path = "./runtime" } deno_semver = "=0.5.13" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index f5a8624e1d2ff2..ddcf7119f4539d 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -73,6 +73,7 @@ deno_lint = { version = "=0.67.0", features = ["docs"] } deno_lockfile.workspace = true deno_npm = "=0.25.2" deno_package_json.workspace = true +deno_path_util.workspace = true deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_semver.workspace = true deno_task_shell = "=0.17.0" diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 9938a09552561d..13c93fa83132a0 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -29,13 +29,13 @@ use deno_config::glob::PathOrPatternSet; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; -use deno_core::normalize_path; use deno_core::resolve_url_or_path; use deno_core::url::Url; use deno_graph::GraphKind; +use deno_path_util::normalize_path; +use deno_path_util::url_to_file_path; use deno_runtime::deno_permissions::parse_sys_kind; use deno_runtime::deno_permissions::PermissionsOptions; -use deno_runtime::fs_util::specifier_to_file_path; use log::debug; use log::Level; use serde::Deserialize; @@ -1002,7 +1002,7 @@ impl Flags { if module_specifier.scheme() == "file" || module_specifier.scheme() == "npm" { - if let Ok(p) = specifier_to_file_path(&module_specifier) { + if let Ok(p) = url_to_file_path(&module_specifier) { Some(vec![p.parent().unwrap().to_path_buf()]) } else { Some(vec![current_dir.to_path_buf()]) diff --git a/cli/args/mod.rs b/cli/args/mod.rs index c3a4c293776f84..3ff2a427fbf4d4 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -20,13 +20,13 @@ use deno_config::workspace::WorkspaceDiscoverOptions; use deno_config::workspace::WorkspaceDiscoverStart; use deno_config::workspace::WorkspaceLintConfig; use deno_config::workspace::WorkspaceResolver; -use deno_core::normalize_path; use deno_core::resolve_url_or_path; use deno_graph::GraphKind; use deno_npm::npm_rc::NpmRc; use deno_npm::npm_rc::ResolvedNpmRc; use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmSystemInfo; +use deno_path_util::normalize_path; use deno_semver::npm::NpmPackageReqReference; use import_map::resolve_import_map_value_from_specifier; diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index ca11449393b1bf..1bf7635949cfa6 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -21,9 +21,9 @@ use deno_core::url::Url; use deno_core::ModuleSpecifier; use deno_graph::source::LoaderChecksum; +use deno_path_util::url_to_file_path; 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; @@ -136,7 +136,7 @@ impl MemoryFiles { /// Fetch a source file from the local file system. fn fetch_local(specifier: &ModuleSpecifier) -> Result { - let local = specifier_to_file_path(specifier).map_err(|_| { + let local = url_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 diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 17f7d6739f4ccd..7d03d3c0b25c2e 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -39,10 +39,10 @@ use deno_graph::ModuleGraph; use deno_graph::ModuleGraphError; use deno_graph::ResolutionError; use deno_graph::SpecifierError; +use deno_path_util::url_to_file_path; 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; use import_map::ImportMapError; @@ -948,7 +948,7 @@ pub fn has_graph_root_local_dependent_changed( }, ); while let Some((s, _)) = dependent_specifiers.next() { - if let Ok(path) = specifier_to_file_path(s) { + if let Ok(path) = url_to_file_path(s) { if let Ok(path) = canonicalize_path(&path) { if canonicalized_changed_paths.contains(&path) { return true; diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index fee9c86cbe7ffe..80db66d64c19c1 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -23,8 +23,8 @@ use deno_core::serde::Serialize; use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::ModuleSpecifier; +use deno_path_util::url_to_file_path; use deno_runtime::deno_node::PathClean; -use deno_runtime::fs_util::specifier_to_file_path; use deno_semver::jsr::JsrPackageNvReference; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; @@ -401,7 +401,7 @@ impl<'a> TsResponseImportMapper<'a> { .flatten()?; let root_folder = package_json.path.parent()?; - let specifier_path = specifier_to_file_path(specifier).ok()?; + let specifier_path = url_to_file_path(specifier).ok()?; let mut search_paths = vec![specifier_path.clone()]; // TypeScript will provide a .js extension for quick fixes, so do // a search for the .d.ts file instead diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs index a32087842d5e04..db10dc9677ed96 100644 --- a/cli/lsp/cache.rs +++ b/cli/lsp/cache.rs @@ -10,7 +10,7 @@ use crate::lsp::logging::lsp_warn; use deno_core::url::Url; use deno_core::ModuleSpecifier; -use deno_runtime::fs_util::specifier_to_file_path; +use deno_path_util::url_to_file_path; use std::collections::BTreeMap; use std::fs; use std::path::Path; @@ -24,7 +24,7 @@ pub fn calculate_fs_version( ) -> Option { match specifier.scheme() { "npm" | "node" | "data" | "blob" => None, - "file" => specifier_to_file_path(specifier) + "file" => url_to_file_path(specifier) .ok() .and_then(|path| calculate_fs_version_at_path(&path)), _ => calculate_fs_version_in_cache(cache, specifier, file_referrer), @@ -82,7 +82,7 @@ impl Default for LspCache { impl LspCache { pub fn new(global_cache_url: Option) -> Self { let global_cache_path = global_cache_url.and_then(|s| { - specifier_to_file_path(&s) + url_to_file_path(&s) .inspect(|p| { lsp_log!("Resolved global cache path: \"{}\"", p.to_string_lossy()); }) @@ -165,7 +165,7 @@ impl LspCache { &self, specifier: &ModuleSpecifier, ) -> Option { - let path = specifier_to_file_path(specifier).ok()?; + let path = url_to_file_path(specifier).ok()?; let vendor = self .vendors_by_scope .iter() @@ -176,7 +176,7 @@ impl LspCache { } pub fn is_valid_file_referrer(&self, specifier: &ModuleSpecifier) -> bool { - if let Ok(path) = specifier_to_file_path(specifier) { + if let Ok(path) = url_to_file_path(specifier) { if !path.starts_with(&self.deno_dir().root) { return true; } diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs index b3d6fbbd04f655..a040be5691f302 100644 --- a/cli/lsp/completions.rs +++ b/cli/lsp/completions.rs @@ -29,7 +29,7 @@ use deno_core::serde::Serialize; use deno_core::serde_json::json; use deno_core::url::Position; use deno_core::ModuleSpecifier; -use deno_runtime::fs_util::specifier_to_file_path; +use deno_path_util::url_to_file_path; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::package::PackageNv; use import_map::ImportMap; @@ -380,7 +380,7 @@ fn get_local_completions( ResolutionMode::Execution, ) .ok()?; - let resolved_parent_path = specifier_to_file_path(&resolved_parent).ok()?; + let resolved_parent_path = url_to_file_path(&resolved_parent).ok()?; let raw_parent = &text[..text.char_indices().rfind(|(_, c)| *c == '/')?.0 + 1]; if resolved_parent_path.is_dir() { diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index e55e7b734d59fa..dcb6120a455097 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -36,8 +36,8 @@ use deno_core::ModuleSpecifier; use deno_lint::linter::LintConfig as DenoLintConfig; use deno_npm::npm_rc::ResolvedNpmRc; use deno_package_json::PackageJsonCache; +use deno_path_util::url_to_file_path; use deno_runtime::deno_node::PackageJson; -use deno_runtime::fs_util::specifier_to_file_path; use indexmap::IndexSet; use lsp_types::ClientCapabilities; use std::collections::BTreeMap; @@ -801,7 +801,7 @@ impl Settings { /// Returns `None` if the value should be deferred to the presence of a /// `deno.json` file. pub fn specifier_enabled(&self, specifier: &ModuleSpecifier) -> Option { - let Ok(path) = specifier_to_file_path(specifier) else { + let Ok(path) = url_to_file_path(specifier) else { // Non-file URLs are not disabled by these settings. return Some(true); }; @@ -810,7 +810,7 @@ impl Settings { let mut disable_paths = vec![]; let mut enable_paths = None; if let Some(folder_uri) = folder_uri { - if let Ok(folder_path) = specifier_to_file_path(folder_uri) { + if let Ok(folder_path) = url_to_file_path(folder_uri) { disable_paths = settings .disable_paths .iter() @@ -847,12 +847,12 @@ impl Settings { &self, specifier: &ModuleSpecifier, ) -> (&WorkspaceSettings, Option<&ModuleSpecifier>) { - let Ok(path) = specifier_to_file_path(specifier) else { + let Ok(path) = url_to_file_path(specifier) else { return (&self.unscoped, self.first_folder.as_ref()); }; for (folder_uri, settings) in self.by_workspace_folder.iter().rev() { if let Some(settings) = settings { - let Ok(folder_path) = specifier_to_file_path(folder_uri) else { + let Ok(folder_path) = url_to_file_path(folder_uri) else { continue; }; if path.starts_with(folder_path) { @@ -1767,7 +1767,7 @@ impl ConfigTree { let config_file_path = (|| { let config_setting = ws_settings.config.as_ref()?; let config_uri = folder_uri.join(config_setting).ok()?; - specifier_to_file_path(&config_uri).ok() + url_to_file_path(&config_uri).ok() })(); if config_file_path.is_some() || ws_settings.import_map.is_some() { scopes.insert( @@ -1844,7 +1844,7 @@ impl ConfigTree { let scope = config_file.specifier.join(".").unwrap(); let json_text = serde_json::to_string(&config_file.json).unwrap(); let test_fs = deno_runtime::deno_fs::InMemoryFs::default(); - let config_path = specifier_to_file_path(&config_file.specifier).unwrap(); + let config_path = url_to_file_path(&config_file.specifier).unwrap(); test_fs.setup_text_files(vec![( config_path.to_string_lossy().to_string(), json_text, diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index e96b8831bb960d..7d1ca6810df79f 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -26,8 +26,8 @@ use deno_core::parking_lot::Mutex; use deno_core::ModuleSpecifier; use deno_graph::source::ResolutionMode; use deno_graph::Resolution; +use deno_path_util::url_to_file_path; use deno_runtime::deno_node; -use deno_runtime::fs_util::specifier_to_file_path; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageReq; @@ -849,7 +849,7 @@ impl FileSystemDocuments { file_referrer: Option<&ModuleSpecifier>, ) -> Option> { let doc = if specifier.scheme() == "file" { - let path = specifier_to_file_path(specifier).ok()?; + let path = url_to_file_path(specifier).ok()?; let bytes = fs::read(path).ok()?; let content = deno_graph::source::decode_owned_source(specifier, bytes, None).ok()?; @@ -1136,7 +1136,7 @@ impl Documents { return true; } if specifier.scheme() == "file" { - return specifier_to_file_path(&specifier) + return url_to_file_path(&specifier) .map(|p| p.is_file()) .unwrap_or(false); } @@ -1325,7 +1325,7 @@ impl Documents { let fs_docs = &self.file_system_docs; // Clean up non-existent documents. fs_docs.docs.retain(|specifier, _| { - let Ok(path) = specifier_to_file_path(specifier) else { + let Ok(path) = url_to_file_path(specifier) else { // Remove non-file schemed docs (deps). They may not be dependencies // anymore after updating resolvers. return false; diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 216b14de620e53..3fe969ba3d5feb 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -15,9 +15,9 @@ use deno_core::url::Url; use deno_core::ModuleSpecifier; use deno_graph::GraphKind; use deno_graph::Resolution; +use deno_path_util::url_to_file_path; use deno_runtime::deno_tls::rustls::RootCertStore; use deno_runtime::deno_tls::RootCertStoreProvider; -use deno_runtime::fs_util::specifier_to_file_path; use deno_semver::jsr::JsrPackageReqReference; use indexmap::Equivalent; use indexmap::IndexSet; @@ -626,7 +626,7 @@ impl Inner { let maybe_root_path = self .config .root_uri() - .and_then(|uri| specifier_to_file_path(uri).ok()); + .and_then(|uri| url_to_file_path(uri).ok()); let root_cert_store = get_root_cert_store( maybe_root_path, workspace_settings.certificate_stores.clone(), @@ -802,7 +802,7 @@ impl Inner { let mut roots = config .workspace_folders .iter() - .filter_map(|p| specifier_to_file_path(&p.0).ok()) + .filter_map(|p| url_to_file_path(&p.0).ok()) .collect::>(); roots.sort(); let roots = roots @@ -1124,7 +1124,7 @@ impl Inner { { return; } - match specifier_to_file_path(&specifier) { + match url_to_file_path(&specifier) { Ok(path) if is_importable_ext(&path) => {} _ => return, } @@ -1362,7 +1362,7 @@ impl Inner { { specifier = uri_to_url(¶ms.text_document.uri); } - let file_path = specifier_to_file_path(&specifier).map_err(|err| { + let file_path = url_to_file_path(&specifier).map_err(|err| { error!("{:#}", err); LspError::invalid_request() })?; @@ -2508,7 +2508,7 @@ impl Inner { let maybe_root_path_owned = self .config .root_uri() - .and_then(|uri| specifier_to_file_path(uri).ok()); + .and_then(|uri| url_to_file_path(uri).ok()); let mut resolved_items = Vec::::new(); for item in incoming_calls.iter() { if let Some(resolved) = item.try_resolve_call_hierarchy_incoming_call( @@ -2554,7 +2554,7 @@ impl Inner { let maybe_root_path_owned = self .config .root_uri() - .and_then(|uri| specifier_to_file_path(uri).ok()); + .and_then(|uri| url_to_file_path(uri).ok()); let mut resolved_items = Vec::::new(); for item in outgoing_calls.iter() { if let Some(resolved) = item.try_resolve_call_hierarchy_outgoing_call( @@ -2603,7 +2603,7 @@ impl Inner { let maybe_root_path_owned = self .config .root_uri() - .and_then(|uri| specifier_to_file_path(uri).ok()); + .and_then(|uri| url_to_file_path(uri).ok()); let mut resolved_items = Vec::::new(); match one_or_many { tsc::OneOrMany::One(item) => { diff --git a/cli/lsp/resolver.rs b/cli/lsp/resolver.rs index 2844eb6f98adc8..f98b23a3f93d18 100644 --- a/cli/lsp/resolver.rs +++ b/cli/lsp/resolver.rs @@ -10,10 +10,10 @@ use deno_graph::source::Resolver; use deno_graph::GraphImport; use deno_graph::ModuleSpecifier; use deno_npm::NpmSystemInfo; +use deno_path_util::url_to_file_path; use deno_runtime::deno_fs; use deno_runtime::deno_node::NodeResolver; use deno_runtime::deno_node::PackageJson; -use deno_runtime::fs_util::specifier_to_file_path; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageNv; @@ -443,7 +443,7 @@ async fn create_npm_resolver( fs: Arc::new(deno_fs::RealFs), root_node_modules_dir: config_data.and_then(|config_data| { config_data.node_modules_dir.clone().or_else(|| { - specifier_to_file_path(&config_data.scope) + url_to_file_path(&config_data.scope) .ok() .map(|p| p.join("node_modules/")) }) diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index fe3708d3cb5ad3..c8b5c47f83ee95 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -62,7 +62,7 @@ use deno_core::ModuleSpecifier; use deno_core::OpState; use deno_core::PollEventLoopOptions; use deno_core::RuntimeOptions; -use deno_runtime::fs_util::specifier_to_file_path; +use deno_path_util::url_to_file_path; use deno_runtime::inspector_server::InspectorServer; use deno_runtime::tokio_util::create_basic_runtime; use indexmap::IndexMap; @@ -3191,7 +3191,7 @@ impl CallHierarchyItem { let use_file_name = self.is_source_file_item(); let maybe_file_path = if uri.scheme().is_some_and(|s| s.as_str() == "file") { - specifier_to_file_path(&uri_to_url(&uri)).ok() + url_to_file_path(&uri_to_url(&uri)).ok() } else { None }; diff --git a/cli/npm/byonm.rs b/cli/npm/byonm.rs index 4c8bbd3948bfc8..83c4067655e2c9 100644 --- a/cli/npm/byonm.rs +++ b/cli/npm/byonm.rs @@ -10,12 +10,12 @@ use deno_core::anyhow::bail; use deno_core::error::AnyError; use deno_core::serde_json; use deno_package_json::PackageJsonDepValue; +use deno_path_util::url_to_file_path; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::DenoPkgJsonFsAdapter; use deno_runtime::deno_node::NodePermissions; use deno_runtime::deno_node::NodeRequireResolver; use deno_runtime::deno_node::PackageJson; -use deno_runtime::fs_util::specifier_to_file_path; use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageReq; use deno_semver::Version; @@ -126,7 +126,7 @@ impl ByonmCliNpmResolver { } // attempt to resolve the npm specifier from the referrer's package.json, - if let Ok(file_path) = specifier_to_file_path(referrer) { + if let Ok(file_path) = url_to_file_path(referrer) { let mut current_path = file_path.as_path(); while let Some(dir_path) = current_path.parent() { let package_json_path = dir_path.join("package.json"); @@ -221,7 +221,7 @@ impl NpmResolver for ByonmCliNpmResolver { name: &str, referrer: &ModuleSpecifier, ) -> Result { - let maybe_referrer_file = specifier_to_file_path(referrer).ok(); + let maybe_referrer_file = url_to_file_path(referrer).ok(); let maybe_start_folder = maybe_referrer_file.as_ref().and_then(|f| f.parent()); if let Some(start_folder) = maybe_start_folder { diff --git a/cli/resolver.rs b/cli/resolver.rs index 07cb6931df5960..cf4cd8b74a7a45 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -22,12 +22,12 @@ use deno_graph::NpmLoadError; use deno_graph::NpmResolvePkgReqsResult; use deno_npm::resolution::NpmResolutionError; use deno_package_json::PackageJsonDepValue; +use deno_path_util::url_to_file_path; use deno_runtime::colors; use deno_runtime::deno_fs; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::is_builtin_node_module; use deno_runtime::deno_node::NodeResolver; -use deno_runtime::fs_util::specifier_to_file_path; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageReq; use node_resolver::errors::ClosestPkgJsonError; @@ -992,7 +992,7 @@ impl SloppyImportsResolver { return None; } - let path = specifier_to_file_path(specifier).ok()?; + let path = url_to_file_path(specifier).ok()?; #[derive(Clone, Copy)] enum SloppyImportsResolutionReason { diff --git a/cli/tools/task.rs b/cli/tools/task.rs index ae91f53a7ac10a..a5a5027d0f01a2 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -16,7 +16,7 @@ use deno_core::anyhow::anyhow; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; -use deno_core::normalize_path; +use deno_path_util::normalize_path; use deno_task_shell::ShellCommand; use crate::args::CliOptions; diff --git a/cli/util/fs.rs b/cli/util/fs.rs index fdf6035ecdec6a..7cf91bbb598175 100644 --- a/cli/util/fs.rs +++ b/cli/util/fs.rs @@ -708,8 +708,8 @@ pub fn specifier_from_file_path( mod tests { use super::*; use deno_core::futures; - use deno_core::normalize_path; use deno_core::parking_lot::Mutex; + use deno_path_util::normalize_path; use pretty_assertions::assert_eq; use test_util::PathRef; use test_util::TempDir; diff --git a/ext/fs/Cargo.toml b/ext/fs/Cargo.toml index 894b307efa9248..42717dccb05d39 100644 --- a/ext/fs/Cargo.toml +++ b/ext/fs/Cargo.toml @@ -21,6 +21,7 @@ async-trait.workspace = true base32.workspace = true deno_core.workspace = true deno_io.workspace = true +deno_path_util.workspace = true deno_permissions.workspace = true filetime.workspace = true libc.workspace = true diff --git a/ext/fs/in_memory_fs.rs b/ext/fs/in_memory_fs.rs index 027539e8492b45..26920238609462 100644 --- a/ext/fs/in_memory_fs.rs +++ b/ext/fs/in_memory_fs.rs @@ -12,12 +12,12 @@ use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; -use deno_core::normalize_path; use deno_core::parking_lot::Mutex; use deno_io::fs::File; use deno_io::fs::FsError; use deno_io::fs::FsResult; use deno_io::fs::FsStat; +use deno_path_util::normalize_path; use crate::interface::AccessCheckCb; use crate::interface::FsDirEntry; diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index d8d5f650279e68..443c26819d2698 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -11,13 +11,13 @@ use std::path::Path; use std::path::PathBuf; use std::rc::Rc; -use deno_core::normalize_path; use deno_core::unsync::spawn_blocking; use deno_io::fs::File; use deno_io::fs::FsError; use deno_io::fs::FsResult; use deno_io::fs::FsStat; use deno_io::StdFileResourceInner; +use deno_path_util::normalize_path; use crate::interface::AccessCheckCb; use crate::interface::FsDirEntry; diff --git a/ext/kv/Cargo.toml b/ext/kv/Cargo.toml index eee4762eb42cfb..9b2d596d06f002 100644 --- a/ext/kv/Cargo.toml +++ b/ext/kv/Cargo.toml @@ -21,6 +21,7 @@ bytes.workspace = true chrono = { workspace = true, features = ["now"] } deno_core.workspace = true deno_fetch.workspace = true +deno_path_util.workspace = true deno_permissions.workspace = true deno_tls.workspace = true denokv_proto.workspace = true diff --git a/ext/kv/sqlite.rs b/ext/kv/sqlite.rs index 8027ff03d4c09c..0b4a3693c49463 100644 --- a/ext/kv/sqlite.rs +++ b/ext/kv/sqlite.rs @@ -16,9 +16,9 @@ use std::sync::OnceLock; use async_trait::async_trait; use deno_core::error::type_error; use deno_core::error::AnyError; -use deno_core::normalize_path; use deno_core::unsync::spawn_blocking; use deno_core::OpState; +use deno_path_util::normalize_path; pub use denokv_sqlite::SqliteBackendError; use denokv_sqlite::SqliteConfig; use denokv_sqlite::SqliteNotifier; diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 17da17cd815183..06a91c501fbd89 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -34,6 +34,7 @@ deno_io.workspace = true deno_media_type.workspace = true deno_net.workspace = true deno_package_json.workspace = true +deno_path_util.workspace = true deno_permissions.workspace = true deno_whoami = "0.1.0" der = { version = "0.7.9", features = ["derive"] } diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index 3578719d0c339b..15667aae73ce6e 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -3,7 +3,6 @@ use deno_core::anyhow::Context; use deno_core::error::generic_error; use deno_core::error::AnyError; -use deno_core::normalize_path; use deno_core::op2; use deno_core::url::Url; use deno_core::v8; @@ -12,6 +11,7 @@ use deno_core::ModuleSpecifier; use deno_core::OpState; use deno_fs::FileSystemRc; use deno_package_json::PackageJsonRc; +use deno_path_util::normalize_path; use node_resolver::NodeModuleKind; use node_resolver::NodeResolutionMode; use node_resolver::REQUIRE_CONDITIONS; @@ -104,7 +104,7 @@ where } else { let current_dir = &(fs.cwd().map_err(AnyError::from)).context("Unable to get CWD")?; - deno_core::normalize_path(current_dir.join(from)) + deno_path_util::normalize_path(current_dir.join(from)) }; ensure_read_permission::

(state, &from)?; diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index ea2978c49b2d4d..d999513d285882 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -88,6 +88,7 @@ deno_kv.workspace = true deno_napi.workspace = true deno_net.workspace = true deno_node.workspace = true +deno_path_util.workspace = true deno_permissions.workspace = true deno_terminal.workspace = true deno_tls.workspace = true diff --git a/runtime/fs_util.rs b/runtime/fs_util.rs index 15ebafdf61d44e..a858e9770d5ec4 100644 --- a/runtime/fs_util.rs +++ b/runtime/fs_util.rs @@ -2,12 +2,10 @@ use deno_core::anyhow::Context; use deno_core::error::AnyError; +use deno_path_util::normalize_path; use std::path::Path; use std::path::PathBuf; -pub use deno_core::normalize_path; -pub use deno_permissions::specifier_to_file_path; - #[inline] pub fn resolve_from_cwd(path: &Path) -> Result { if path.is_absolute() { diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs index 544031dd7bff2d..bd9260e97eb178 100644 --- a/runtime/ops/os/mod.rs +++ b/runtime/ops/os/mod.rs @@ -4,11 +4,11 @@ use super::utils::into_string; use crate::worker::ExitCode; use deno_core::error::type_error; use deno_core::error::AnyError; -use deno_core::normalize_path; use deno_core::op2; use deno_core::v8; use deno_core::OpState; use deno_node::NODE_ENV_VAR_ALLOWLIST; +use deno_path_util::normalize_path; use deno_permissions::PermissionsContainer; use serde::Serialize; use std::collections::HashMap; diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index 530dcf49bec62c..f6555e93245a2c 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -689,7 +689,7 @@ fn resolve_cmd(cmd: &str, env: &RunEnv) -> Result { } fn resolve_path(path: &str, cwd: &Path) -> PathBuf { - deno_core::normalize_path(cwd.join(path)) + deno_path_util::normalize_path(cwd.join(path)) } fn check_run_permission( diff --git a/runtime/permissions.rs b/runtime/permissions.rs index 9b2737b4fcd342..533319c4ef6d4d 100644 --- a/runtime/permissions.rs +++ b/runtime/permissions.rs @@ -6,7 +6,7 @@ use std::path::PathBuf; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; -use deno_core::normalize_path; +use deno_path_util::normalize_path; use deno_permissions::AllowRunDescriptor; use deno_permissions::AllowRunDescriptorParseResult; use deno_permissions::DenyRunDescriptor; diff --git a/runtime/permissions/Cargo.toml b/runtime/permissions/Cargo.toml index 9821b614842618..37500d3ebb4241 100644 --- a/runtime/permissions/Cargo.toml +++ b/runtime/permissions/Cargo.toml @@ -15,6 +15,7 @@ path = "lib.rs" [dependencies] deno_core.workspace = true +deno_path_util.workspace = true deno_terminal.workspace = true fqdn = "0.3.4" libc.workspace = true diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index 5d8e76125eb364..e919b81b60c4d1 100644 --- a/runtime/permissions/lib.rs +++ b/runtime/permissions/lib.rs @@ -6,7 +6,6 @@ use deno_core::error::custom_error; use deno_core::error::type_error; use deno_core::error::uri_error; use deno_core::error::AnyError; -use deno_core::normalize_path; use deno_core::parking_lot::Mutex; use deno_core::serde::de; use deno_core::serde::Deserialize; @@ -16,6 +15,8 @@ use deno_core::serde_json; use deno_core::unsync::sync::AtomicFlag; use deno_core::url::Url; use deno_core::ModuleSpecifier; +use deno_path_util::normalize_path; +use deno_path_util::url_to_file_path; use deno_terminal::colors; use fqdn::FQDN; use once_cell::sync::Lazy; @@ -2032,52 +2033,6 @@ impl Permissions { } } -/// Attempts to convert a specifier to a file path. By default, uses the Url -/// crate's `to_file_path()` method, but falls back to try and resolve unix-style -/// paths on Windows. -pub fn specifier_to_file_path( - specifier: &ModuleSpecifier, -) -> Result { - let result = if specifier.scheme() != "file" { - Err(()) - } else if cfg!(windows) { - if specifier.host().is_some() { - Err(()) - } else { - match specifier.to_file_path() { - Ok(path) => Ok(path), - Err(()) => { - // This might be a unix-style path which is used in the tests even on Windows. - // Attempt to see if we can convert it to a `PathBuf`. This code should be removed - // once/if https://github.com/servo/rust-url/issues/730 is implemented. - if specifier.scheme() == "file" - && specifier.port().is_none() - && specifier.path_segments().is_some() - { - let path_str = specifier.path(); - match String::from_utf8( - percent_encoding::percent_decode(path_str.as_bytes()).collect(), - ) { - Ok(path_str) => Ok(PathBuf::from(path_str)), - Err(_) => Err(()), - } - } else { - Err(()) - } - } - } - } - } else { - specifier.to_file_path() - }; - match result { - Ok(path) => Ok(path), - Err(()) => Err(uri_error(format!( - "Invalid file path.\n Specifier: {specifier}" - ))), - } -} - #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub enum CheckSpecifierKind { Static, @@ -2130,7 +2085,7 @@ impl PermissionsContainer { return Ok(()); } - match specifier_to_file_path(specifier) { + match url_to_file_path(specifier) { Ok(path) => inner.read.check( &PathQueryDescriptor { requested: path.to_string_lossy().into_owned(), @@ -4453,38 +4408,4 @@ mod tests { ); } } - - #[test] - fn test_specifier_to_file_path() { - run_success_test("file:///", "/"); - run_success_test("file:///test", "/test"); - run_success_test("file:///dir/test/test.txt", "/dir/test/test.txt"); - run_success_test( - "file:///dir/test%20test/test.txt", - "/dir/test test/test.txt", - ); - - assert_no_panic_specifier_to_file_path("file:/"); - assert_no_panic_specifier_to_file_path("file://"); - assert_no_panic_specifier_to_file_path("file://asdf/"); - assert_no_panic_specifier_to_file_path("file://asdf/66666/a.ts"); - - fn run_success_test(specifier: &str, expected_path: &str) { - let result = - specifier_to_file_path(&ModuleSpecifier::parse(specifier).unwrap()) - .unwrap(); - assert_eq!(result, PathBuf::from(expected_path)); - } - fn assert_no_panic_specifier_to_file_path(specifier: &str) { - let result = - specifier_to_file_path(&ModuleSpecifier::parse(specifier).unwrap()); - match result { - Ok(_) => (), - Err(err) => assert_eq!( - err.to_string(), - format!("Invalid file path.\n Specifier: {specifier}") - ), - } - } - } } From 1bb47805d6331ad048bd5e7ea2581aa230e8fc93 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 28 Sep 2024 08:50:16 -0400 Subject: [PATCH 023/436] refactor: move NpmCacheDir to deno_cache_dir (#25916) Part of the ongoing work to move more of Deno's resolution out of the CLI crate (for use in Wasm and other things) Includes: * https://github.com/denoland/deno_cache_dir/pull/60 --- Cargo.lock | 5 +- Cargo.toml | 2 +- cli/cache/mod.rs | 77 ++++++++ cli/npm/cache_dir.rs | 295 ----------------------------- cli/npm/managed/cache/mod.rs | 44 ++++- cli/npm/managed/mod.rs | 4 +- cli/npm/managed/resolvers/local.rs | 4 +- cli/npm/mod.rs | 2 - cli/standalone/file_system.rs | 4 +- cli/standalone/mod.rs | 4 +- cli/util/fs.rs | 157 +++++++++++---- cli/util/path.rs | 42 ---- ext/fs/in_memory_fs.rs | 8 +- ext/fs/interface.rs | 10 +- ext/fs/ops.rs | 12 +- ext/fs/std_fs.rs | 8 +- 16 files changed, 267 insertions(+), 411 deletions(-) delete mode 100644 cli/npm/cache_dir.rs diff --git a/Cargo.lock b/Cargo.lock index 3d8641e168f73e..1372ac191aa87c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1348,10 +1348,11 @@ dependencies = [ [[package]] name = "deno_cache_dir" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df43311cb7703fa3242c282823a850e4c8d0c06b9527d8209b55bd695452ea5" +checksum = "87900cfcd07bdbf3597bc36b77da0c0e7b6c2e65213faa2ed43d9a1ec12bd31d" dependencies = [ + "base32", "deno_media_type", "indexmap", "log", diff --git a/Cargo.toml b/Cargo.toml index 3bb9f2d46e9c55..4b27f85b82eb0a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,7 +104,7 @@ chrono = { version = "0.4", default-features = false, features = ["std", "serde" console_static_text = "=0.8.1" data-encoding = "2.3.3" data-url = "=0.3.0" -deno_cache_dir = "=0.11.1" +deno_cache_dir = "=0.12.0" deno_package_json = { version = "=0.1.1", default-features = false } dlopen2 = "0.6.1" ecb = "=0.1.2" diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 2d88137165eac8..2296bce010768f 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -10,6 +10,8 @@ use crate::file_fetcher::FileFetcher; use crate::file_fetcher::FileOrRedirect; use crate::npm::CliNpmResolver; use crate::util::fs::atomic_write_file_with_retries; +use crate::util::fs::atomic_write_file_with_retries_and_fs; +use crate::util::fs::AtomicWriteFileFsAdapter; use crate::util::path::specifier_has_extension; use deno_ast::MediaType; @@ -77,6 +79,14 @@ impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv { atomic_write_file_with_retries(path, bytes, CACHE_PERM) } + fn canonicalize_path(&self, path: &Path) -> std::io::Result { + crate::util::fs::canonicalize_path(path) + } + + fn create_dir_all(&self, path: &Path) -> std::io::Result<()> { + std::fs::create_dir_all(path) + } + fn remove_file(&self, path: &Path) -> std::io::Result<()> { std::fs::remove_file(path) } @@ -100,6 +110,73 @@ impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv { } } +#[derive(Debug, Clone)] +pub struct DenoCacheEnvFsAdapter<'a>( + pub &'a dyn deno_runtime::deno_fs::FileSystem, +); + +impl<'a> deno_cache_dir::DenoCacheEnv for DenoCacheEnvFsAdapter<'a> { + fn read_file_bytes(&self, path: &Path) -> std::io::Result> { + self + .0 + .read_file_sync(path, None) + .map_err(|err| err.into_io_error()) + } + + fn atomic_write_file( + &self, + path: &Path, + bytes: &[u8], + ) -> std::io::Result<()> { + atomic_write_file_with_retries_and_fs( + &AtomicWriteFileFsAdapter { + fs: self.0, + write_mode: CACHE_PERM, + }, + path, + bytes, + ) + } + + fn canonicalize_path(&self, path: &Path) -> std::io::Result { + self.0.realpath_sync(path).map_err(|e| e.into_io_error()) + } + + fn create_dir_all(&self, path: &Path) -> std::io::Result<()> { + self + .0 + .mkdir_sync(path, true, None) + .map_err(|e| e.into_io_error()) + } + + fn remove_file(&self, path: &Path) -> std::io::Result<()> { + self + .0 + .remove_sync(path, false) + .map_err(|e| e.into_io_error()) + } + + fn modified(&self, path: &Path) -> std::io::Result> { + self + .0 + .stat_sync(path) + .map(|stat| { + stat + .mtime + .map(|ts| SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(ts)) + }) + .map_err(|e| e.into_io_error()) + } + + fn is_file(&self, path: &Path) -> bool { + self.0.is_file_sync(path) + } + + fn time_now(&self) -> SystemTime { + SystemTime::now() + } +} + pub type GlobalHttpCache = deno_cache_dir::GlobalHttpCache; pub type LocalHttpCache = deno_cache_dir::LocalHttpCache; pub type LocalLspHttpCache = diff --git a/cli/npm/cache_dir.rs b/cli/npm/cache_dir.rs deleted file mode 100644 index 4467d685ec520b..00000000000000 --- a/cli/npm/cache_dir.rs +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::path::Path; -use std::path::PathBuf; - -use deno_ast::ModuleSpecifier; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; -use deno_core::url::Url; -use deno_npm::NpmPackageCacheFolderId; -use deno_semver::package::PackageNv; -use deno_semver::Version; - -use crate::util::fs::canonicalize_path; -use crate::util::path::root_url_to_safe_local_dirname; - -/// The global cache directory of npm packages. -#[derive(Clone, Debug)] -pub struct NpmCacheDir { - root_dir: PathBuf, - // cached url representation of the root directory - root_dir_url: Url, - // A list of all registry that were discovered via `.npmrc` files - // turned into a safe directory names. - known_registries_dirnames: Vec, -} - -impl NpmCacheDir { - pub fn new(root_dir: PathBuf, known_registries_urls: Vec) -> Self { - fn try_get_canonicalized_root_dir( - root_dir: &Path, - ) -> Result { - if !root_dir.exists() { - std::fs::create_dir_all(root_dir) - .with_context(|| format!("Error creating {}", root_dir.display()))?; - } - Ok(canonicalize_path(root_dir)?) - } - - // this may fail on readonly file systems, so just ignore if so - let root_dir = - try_get_canonicalized_root_dir(&root_dir).unwrap_or(root_dir); - let root_dir_url = Url::from_directory_path(&root_dir).unwrap(); - - let known_registries_dirnames: Vec<_> = known_registries_urls - .into_iter() - .map(|url| { - root_url_to_safe_local_dirname(&url) - .to_string_lossy() - .replace('\\', "/") - }) - .collect(); - - Self { - root_dir, - root_dir_url, - known_registries_dirnames, - } - } - - pub fn root_dir(&self) -> &Path { - &self.root_dir - } - - pub fn root_dir_url(&self) -> &Url { - &self.root_dir_url - } - - pub fn package_folder_for_id( - &self, - folder_id: &NpmPackageCacheFolderId, - registry_url: &Url, - ) -> PathBuf { - if folder_id.copy_index == 0 { - self.package_folder_for_nv(&folder_id.nv, registry_url) - } else { - self - .package_name_folder(&folder_id.nv.name, registry_url) - .join(format!("{}_{}", folder_id.nv.version, folder_id.copy_index)) - } - } - - pub fn package_folder_for_nv( - &self, - package: &PackageNv, - registry_url: &Url, - ) -> PathBuf { - self - .package_name_folder(&package.name, registry_url) - .join(package.version.to_string()) - } - - pub fn package_name_folder(&self, name: &str, registry_url: &Url) -> PathBuf { - let mut dir = self.registry_folder(registry_url); - if name.to_lowercase() != name { - let encoded_name = mixed_case_package_name_encode(name); - // Using the encoded directory may have a collision with an actual package name - // so prefix it with an underscore since npm packages can't start with that - dir.join(format!("_{encoded_name}")) - } else { - // ensure backslashes are used on windows - for part in name.split('/') { - dir = dir.join(part); - } - dir - } - } - - fn registry_folder(&self, registry_url: &Url) -> PathBuf { - self - .root_dir - .join(root_url_to_safe_local_dirname(registry_url)) - } - - pub fn resolve_package_folder_id_from_specifier( - &self, - specifier: &ModuleSpecifier, - ) -> Option { - let mut maybe_relative_url = None; - - // Iterate through known registries and try to get a match. - for registry_dirname in &self.known_registries_dirnames { - let registry_root_dir = self - .root_dir_url - .join(&format!("{}/", registry_dirname)) - // this not succeeding indicates a fatal issue, so unwrap - .unwrap(); - - let Some(relative_url) = registry_root_dir.make_relative(specifier) - else { - continue; - }; - - if relative_url.starts_with("../") { - continue; - } - - maybe_relative_url = Some(relative_url); - break; - } - - let mut relative_url = maybe_relative_url?; - - // base32 decode the url if it starts with an underscore - // * Ex. _{base32(package_name)}/ - if let Some(end_url) = relative_url.strip_prefix('_') { - let mut parts = end_url - .split('/') - .map(ToOwned::to_owned) - .collect::>(); - match mixed_case_package_name_decode(&parts[0]) { - Some(part) => { - parts[0] = part; - } - None => return None, - } - relative_url = parts.join("/"); - } - - // examples: - // * chalk/5.0.1/ - // * @types/chalk/5.0.1/ - // * some-package/5.0.1_1/ -- where the `_1` (/_\d+/) is a copy of the folder for peer deps - let is_scoped_package = relative_url.starts_with('@'); - let mut parts = relative_url - .split('/') - .enumerate() - .take(if is_scoped_package { 3 } else { 2 }) - .map(|(_, part)| part) - .collect::>(); - if parts.len() < 2 { - return None; - } - let version_part = parts.pop().unwrap(); - let name = parts.join("/"); - let (version, copy_index) = - if let Some((version, copy_count)) = version_part.split_once('_') { - (version, copy_count.parse::().ok()?) - } else { - (version_part, 0) - }; - Some(NpmPackageCacheFolderId { - nv: PackageNv { - name, - version: Version::parse_from_npm(version).ok()?, - }, - copy_index, - }) - } - - pub fn get_cache_location(&self) -> PathBuf { - self.root_dir.clone() - } -} - -pub fn mixed_case_package_name_encode(name: &str) -> String { - // use base32 encoding because it's reversible and the character set - // only includes the characters within 0-9 and A-Z so it can be lower cased - base32::encode( - base32::Alphabet::Rfc4648Lower { padding: false }, - name.as_bytes(), - ) - .to_lowercase() -} - -pub fn mixed_case_package_name_decode(name: &str) -> Option { - base32::decode(base32::Alphabet::Rfc4648Lower { padding: false }, name) - .and_then(|b| String::from_utf8(b).ok()) -} - -#[cfg(test)] -mod test { - use deno_core::url::Url; - use deno_semver::package::PackageNv; - use deno_semver::Version; - - use super::NpmCacheDir; - use crate::npm::cache_dir::NpmPackageCacheFolderId; - - #[test] - fn should_get_package_folder() { - let deno_dir = crate::cache::DenoDir::new(None).unwrap(); - let root_dir = deno_dir.npm_folder_path(); - let registry_url = Url::parse("https://registry.npmjs.org/").unwrap(); - let cache = NpmCacheDir::new(root_dir.clone(), vec![registry_url.clone()]); - - assert_eq!( - cache.package_folder_for_id( - &NpmPackageCacheFolderId { - nv: PackageNv { - name: "json".to_string(), - version: Version::parse_from_npm("1.2.5").unwrap(), - }, - copy_index: 0, - }, - ®istry_url, - ), - root_dir - .join("registry.npmjs.org") - .join("json") - .join("1.2.5"), - ); - - assert_eq!( - cache.package_folder_for_id( - &NpmPackageCacheFolderId { - nv: PackageNv { - name: "json".to_string(), - version: Version::parse_from_npm("1.2.5").unwrap(), - }, - copy_index: 1, - }, - ®istry_url, - ), - root_dir - .join("registry.npmjs.org") - .join("json") - .join("1.2.5_1"), - ); - - assert_eq!( - cache.package_folder_for_id( - &NpmPackageCacheFolderId { - nv: PackageNv { - name: "JSON".to_string(), - version: Version::parse_from_npm("2.1.5").unwrap(), - }, - copy_index: 0, - }, - ®istry_url, - ), - root_dir - .join("registry.npmjs.org") - .join("_jjju6tq") - .join("2.1.5"), - ); - - assert_eq!( - cache.package_folder_for_id( - &NpmPackageCacheFolderId { - nv: PackageNv { - name: "@types/JSON".to_string(), - version: Version::parse_from_npm("2.1.5").unwrap(), - }, - copy_index: 0, - }, - ®istry_url, - ), - root_dir - .join("registry.npmjs.org") - .join("_ib2hs4dfomxuuu2pjy") - .join("2.1.5"), - ); - } -} diff --git a/cli/npm/managed/cache/mod.rs b/cli/npm/managed/cache/mod.rs index f409744b985fbe..fa0e8c8a59c312 100644 --- a/cli/npm/managed/cache/mod.rs +++ b/cli/npm/managed/cache/mod.rs @@ -8,6 +8,7 @@ use std::path::PathBuf; use std::sync::Arc; use deno_ast::ModuleSpecifier; +use deno_cache_dir::npm::NpmCacheDir; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; @@ -18,10 +19,10 @@ use deno_npm::npm_rc::ResolvedNpmRc; use deno_npm::registry::NpmPackageInfo; use deno_npm::NpmPackageCacheFolderId; use deno_semver::package::PackageNv; +use deno_semver::Version; use crate::args::CacheSetting; use crate::cache::CACHE_PERM; -use crate::npm::NpmCacheDir; use crate::util::fs::atomic_write_file_with_retries; use crate::util::fs::hard_link_dir_recursive; @@ -87,9 +88,12 @@ impl NpmCache { ) -> Result<(), AnyError> { let registry_url = self.npmrc.get_registry_url(&folder_id.nv.name); assert_ne!(folder_id.copy_index, 0); - let package_folder = self - .cache_dir - .package_folder_for_id(folder_id, registry_url); + let package_folder = self.cache_dir.package_folder_for_id( + &folder_id.nv.name, + &folder_id.nv.version.to_string(), + folder_id.copy_index, + registry_url, + ); if package_folder.exists() // if this file exists, then the package didn't successfully initialize @@ -100,9 +104,12 @@ impl NpmCache { return Ok(()); } - let original_package_folder = self - .cache_dir - .package_folder_for_nv(&folder_id.nv, registry_url); + let original_package_folder = self.cache_dir.package_folder_for_id( + &folder_id.nv.name, + &folder_id.nv.version.to_string(), + 0, // original copy index + registry_url, + ); // it seems Windows does an "AccessDenied" error when moving a // directory with hard links, so that's why this solution is done @@ -114,7 +121,12 @@ impl NpmCache { pub fn package_folder_for_id(&self, id: &NpmPackageCacheFolderId) -> PathBuf { let registry_url = self.npmrc.get_registry_url(&id.nv.name); - self.cache_dir.package_folder_for_id(id, registry_url) + self.cache_dir.package_folder_for_id( + &id.nv.name, + &id.nv.version.to_string(), + id.copy_index, + registry_url, + ) } pub fn package_folder_for_nv(&self, package: &PackageNv) -> PathBuf { @@ -127,7 +139,12 @@ impl NpmCache { package: &PackageNv, registry_url: &Url, ) -> PathBuf { - self.cache_dir.package_folder_for_nv(package, registry_url) + self.cache_dir.package_folder_for_id( + &package.name, + &package.version.to_string(), + 0, // original copy_index + registry_url, + ) } pub fn package_name_folder(&self, name: &str) -> PathBuf { @@ -146,6 +163,15 @@ impl NpmCache { self .cache_dir .resolve_package_folder_id_from_specifier(specifier) + .and_then(|cache_id| { + Some(NpmPackageCacheFolderId { + nv: PackageNv { + name: cache_id.name, + version: Version::parse_from_npm(&cache_id.version).ok()?, + }, + copy_index: cache_id.copy_index, + }) + }) } pub fn load_package_info( diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index 40c92cd46c66b9..e3ac5e1af6eb91 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -7,6 +7,7 @@ use std::sync::Arc; use cache::RegistryInfoDownloader; use cache::TarballCache; use deno_ast::ModuleSpecifier; +use deno_cache_dir::npm::NpmCacheDir; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::serde_json; @@ -35,6 +36,7 @@ use crate::args::LifecycleScriptsConfig; use crate::args::NpmInstallDepsProvider; use crate::args::NpmProcessState; use crate::args::NpmProcessStateKind; +use crate::cache::DenoCacheEnvFsAdapter; use crate::cache::FastInsecureHasher; use crate::http_util::HttpClientProvider; use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs; @@ -50,7 +52,6 @@ use self::resolvers::NpmPackageFsResolver; use super::CliNpmResolver; use super::InnerCliNpmResolverRef; -use super::NpmCacheDir; mod cache; mod registry; @@ -188,6 +189,7 @@ fn create_inner( fn create_cache(options: &CliNpmResolverManagedCreateOptions) -> Arc { Arc::new(NpmCache::new( NpmCacheDir::new( + &DenoCacheEnvFsAdapter(options.fs.as_ref()), options.npm_global_cache_dir.clone(), options.npmrc.get_all_known_registries_urls(), ), diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs index 5a90f252dec2d7..297fcab230ed2a 100644 --- a/cli/npm/managed/resolvers/local.rs +++ b/cli/npm/managed/resolvers/local.rs @@ -19,6 +19,8 @@ use crate::args::LifecycleScriptsConfig; use crate::colors; use async_trait::async_trait; use deno_ast::ModuleSpecifier; +use deno_cache_dir::npm::mixed_case_package_name_decode; +use deno_cache_dir::npm::mixed_case_package_name_encode; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::futures::stream::FuturesUnordered; @@ -42,8 +44,6 @@ use serde::Serialize; use crate::args::NpmInstallDepsProvider; use crate::cache::CACHE_PERM; -use crate::npm::cache_dir::mixed_case_package_name_decode; -use crate::npm::cache_dir::mixed_case_package_name_encode; use crate::util::fs::atomic_write_file_with_retries; use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs; use crate::util::fs::clone_dir_recursive; diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs index 15ac8ebb2890f4..2c9ee20bc85115 100644 --- a/cli/npm/mod.rs +++ b/cli/npm/mod.rs @@ -1,7 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. mod byonm; -mod cache_dir; mod common; mod managed; @@ -24,7 +23,6 @@ use crate::file_fetcher::FileFetcher; pub use self::byonm::ByonmCliNpmResolver; pub use self::byonm::CliNpmResolverByonmCreateOptions; -pub use self::cache_dir::NpmCacheDir; pub use self::managed::CliNpmResolverManagedCreateOptions; pub use self::managed::CliNpmResolverManagedSnapshotOption; pub use self::managed::ManagedCliNpmResolver; diff --git a/cli/standalone/file_system.rs b/cli/standalone/file_system.rs index 536b17f2771374..314444630bc2d3 100644 --- a/cli/standalone/file_system.rs +++ b/cli/standalone/file_system.rs @@ -102,7 +102,7 @@ impl FileSystem for DenoCompileFileSystem { &self, path: &Path, recursive: bool, - mode: u32, + mode: Option, ) -> FsResult<()> { self.error_if_in_vfs(path)?; RealFs.mkdir_sync(path, recursive, mode) @@ -111,7 +111,7 @@ impl FileSystem for DenoCompileFileSystem { &self, path: PathBuf, recursive: bool, - mode: u32, + mode: Option, ) -> FsResult<()> { self.error_if_in_vfs(&path)?; RealFs.mkdir_async(path, recursive, mode).await diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index c501d2d6bcfbc5..93ac6002bfd708 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -6,6 +6,7 @@ #![allow(unused_imports)] use deno_ast::MediaType; +use deno_cache_dir::npm::NpmCacheDir; use deno_config::workspace::MappedResolution; use deno_config::workspace::MappedResolutionError; use deno_config::workspace::ResolverWorkspaceJsrPackage; @@ -55,6 +56,7 @@ use crate::args::StorageKeyResolver; use crate::cache::Caches; use crate::cache::DenoDirProvider; use crate::cache::NodeAnalysisCache; +use crate::cache::RealDenoCacheEnv; use crate::http_util::HttpClientProvider; use crate::node::CliCjsCodeAnalyzer; use crate::npm::create_cli_npm_resolver; @@ -62,7 +64,6 @@ use crate::npm::CliNpmResolverByonmCreateOptions; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; -use crate::npm::NpmCacheDir; use crate::resolver::CjsResolutionStore; use crate::resolver::CliNodeResolver; use crate::resolver::NpmModuleLoader; @@ -464,6 +465,7 @@ pub async fn run( let main_module = root_dir_url.join(&metadata.entrypoint_key).unwrap(); let root_node_modules_path = root_path.join("node_modules"); let npm_cache_dir = NpmCacheDir::new( + &RealDenoCacheEnv, root_node_modules_path.clone(), vec![npm_registry_url.clone()], ); diff --git a/cli/util/fs.rs b/cli/util/fs.rs index 7cf91bbb598175..9734d417e51bae 100644 --- a/cli/util/fs.rs +++ b/cli/util/fs.rs @@ -37,10 +37,98 @@ pub fn atomic_write_file_with_retries>( file_path: &Path, data: T, mode: u32, +) -> std::io::Result<()> { + struct RealAtomicWriteFileFs { + mode: u32, + } + + impl AtomicWriteFileFs for RealAtomicWriteFileFs { + fn write_file(&self, path: &Path, bytes: &[u8]) -> std::io::Result<()> { + write_file(path, bytes, self.mode) + } + fn rename_file(&self, from: &Path, to: &Path) -> std::io::Result<()> { + std::fs::rename(from, to) + } + fn remove_file(&self, path: &Path) -> std::io::Result<()> { + std::fs::remove_file(path) + } + fn create_dir_all(&self, dir_path: &Path) -> std::io::Result<()> { + std::fs::create_dir_all(dir_path) + } + fn path_exists(&self, path: &Path) -> bool { + path.exists() + } + } + + atomic_write_file_with_retries_and_fs( + &RealAtomicWriteFileFs { mode }, + file_path, + data.as_ref(), + ) +} + +pub trait AtomicWriteFileFs { + fn write_file(&self, path: &Path, bytes: &[u8]) -> std::io::Result<()>; + fn rename_file(&self, from: &Path, to: &Path) -> std::io::Result<()>; + fn remove_file(&self, path: &Path) -> std::io::Result<()>; + fn create_dir_all(&self, dir_path: &Path) -> std::io::Result<()>; + fn path_exists(&self, path: &Path) -> bool; +} + +pub struct AtomicWriteFileFsAdapter<'a> { + pub fs: &'a dyn FileSystem, + pub write_mode: u32, +} + +impl<'a> AtomicWriteFileFs for AtomicWriteFileFsAdapter<'a> { + fn write_file(&self, path: &Path, bytes: &[u8]) -> std::io::Result<()> { + self + .fs + .write_file_sync( + path, + deno_runtime::deno_fs::OpenOptions::write( + true, + false, + false, + Some(self.write_mode), + ), + None, + bytes, + ) + .map_err(|e| e.into_io_error()) + } + + fn rename_file(&self, from: &Path, to: &Path) -> std::io::Result<()> { + self.fs.rename_sync(from, to).map_err(|e| e.into_io_error()) + } + + fn remove_file(&self, path: &Path) -> std::io::Result<()> { + self + .fs + .remove_sync(path, false) + .map_err(|e| e.into_io_error()) + } + + fn create_dir_all(&self, dir_path: &Path) -> std::io::Result<()> { + self + .fs + .mkdir_sync(dir_path, /* recursive */ true, None) + .map_err(|e| e.into_io_error()) + } + + fn path_exists(&self, path: &Path) -> bool { + self.fs.exists_sync(path) + } +} + +pub fn atomic_write_file_with_retries_and_fs>( + fs: &impl AtomicWriteFileFs, + file_path: &Path, + data: T, ) -> std::io::Result<()> { let mut count = 0; loop { - match atomic_write_file(file_path, data.as_ref(), mode) { + match atomic_write_file(fs, file_path, data.as_ref()) { Ok(()) => return Ok(()), Err(err) => { if count >= 5 { @@ -61,63 +149,54 @@ pub fn atomic_write_file_with_retries>( /// /// This also handles creating the directory if a NotFound error /// occurs. -fn atomic_write_file>( +fn atomic_write_file( + fs: &impl AtomicWriteFileFs, file_path: &Path, - data: T, - mode: u32, + data: &[u8], ) -> std::io::Result<()> { fn atomic_write_file_raw( + fs: &impl AtomicWriteFileFs, temp_file_path: &Path, file_path: &Path, data: &[u8], - mode: u32, ) -> std::io::Result<()> { - write_file(temp_file_path, data, mode)?; - std::fs::rename(temp_file_path, file_path).map_err(|err| { + fs.write_file(temp_file_path, data)?; + fs.rename_file(temp_file_path, file_path).map_err(|err| { // clean up the created temp file on error - let _ = std::fs::remove_file(temp_file_path); + let _ = fs.remove_file(temp_file_path); err }) } - fn inner(file_path: &Path, data: &[u8], mode: u32) -> std::io::Result<()> { - let temp_file_path = get_atomic_file_path(file_path); + let temp_file_path = get_atomic_file_path(file_path); - if let Err(write_err) = - atomic_write_file_raw(&temp_file_path, file_path, data, mode) - { - if write_err.kind() == ErrorKind::NotFound { - let parent_dir_path = file_path.parent().unwrap(); - match std::fs::create_dir_all(parent_dir_path) { - Ok(()) => { - return atomic_write_file_raw( - &temp_file_path, - file_path, - data, - mode, - ) + if let Err(write_err) = + atomic_write_file_raw(fs, &temp_file_path, file_path, data) + { + if write_err.kind() == ErrorKind::NotFound { + let parent_dir_path = file_path.parent().unwrap(); + match fs.create_dir_all(parent_dir_path) { + Ok(()) => { + return atomic_write_file_raw(fs, &temp_file_path, file_path, data) .map_err(|err| add_file_context_to_err(file_path, err)); - } - Err(create_err) => { - if !parent_dir_path.exists() { - return Err(Error::new( - create_err.kind(), - format!( - "{:#} (for '{}')\nCheck the permission of the directory.", - create_err, - parent_dir_path.display() - ), - )); - } + } + Err(create_err) => { + if !fs.path_exists(parent_dir_path) { + return Err(Error::new( + create_err.kind(), + format!( + "{:#} (for '{}')\nCheck the permission of the directory.", + create_err, + parent_dir_path.display() + ), + )); } } } - return Err(add_file_context_to_err(file_path, write_err)); } - Ok(()) + return Err(add_file_context_to_err(file_path, write_err)); } - - inner(file_path, data.as_ref(), mode) + Ok(()) } /// Creates a std::fs::File handling if the parent does not exist. diff --git a/cli/util/path.rs b/cli/util/path.rs index 6f09cf1eacb9f7..e4ae6e7cb14d7d 100644 --- a/cli/util/path.rs +++ b/cli/util/path.rs @@ -165,48 +165,6 @@ pub fn relative_path(from: &Path, to: &Path) -> Option { pathdiff::diff_paths(to, from) } -/// Gets if the provided character is not supported on all -/// kinds of file systems. -pub fn is_banned_path_char(c: char) -> bool { - matches!(c, '<' | '>' | ':' | '"' | '|' | '?' | '*') -} - -/// Gets a safe local directory name for the provided url. -/// -/// For example: -/// https://deno.land:8080/path -> deno.land_8080/path -pub fn root_url_to_safe_local_dirname(root: &ModuleSpecifier) -> PathBuf { - fn sanitize_segment(text: &str) -> String { - text - .chars() - .map(|c| if is_banned_segment_char(c) { '_' } else { c }) - .collect() - } - - fn is_banned_segment_char(c: char) -> bool { - matches!(c, '/' | '\\') || is_banned_path_char(c) - } - - let mut result = String::new(); - if let Some(domain) = root.domain() { - result.push_str(&sanitize_segment(domain)); - } - if let Some(port) = root.port() { - if !result.is_empty() { - result.push('_'); - } - result.push_str(&port.to_string()); - } - let mut result = PathBuf::from(result); - if let Some(segments) = root.path_segments() { - for segment in segments.filter(|s| !s.is_empty()) { - result = result.join(sanitize_segment(segment)); - } - } - - result -} - /// Slightly different behaviour than the default matching /// where an exact path needs to be matched to be opted-in /// rather than just a partial directory match. diff --git a/ext/fs/in_memory_fs.rs b/ext/fs/in_memory_fs.rs index 26920238609462..e29b9d50c6bb44 100644 --- a/ext/fs/in_memory_fs.rs +++ b/ext/fs/in_memory_fs.rs @@ -44,7 +44,7 @@ impl InMemoryFs { pub fn setup_text_files(&self, files: Vec<(String, String)>) { for (path, text) in files { let path = PathBuf::from(path); - self.mkdir_sync(path.parent().unwrap(), true, 0).unwrap(); + self.mkdir_sync(path.parent().unwrap(), true, None).unwrap(); self .write_file_sync( &path, @@ -101,7 +101,7 @@ impl FileSystem for InMemoryFs { &self, path: &Path, recursive: bool, - _mode: u32, + _mode: Option, ) -> FsResult<()> { let path = normalize_path(path); @@ -119,7 +119,7 @@ impl FileSystem for InMemoryFs { }, None => { if recursive { - self.mkdir_sync(parent, true, 0)?; + self.mkdir_sync(parent, true, None)?; } else { return Err(FsError::Io(Error::new( ErrorKind::NotFound, @@ -149,7 +149,7 @@ impl FileSystem for InMemoryFs { &self, path: PathBuf, recursive: bool, - mode: u32, + mode: Option, ) -> FsResult<()> { self.mkdir_sync(&path, recursive, mode) } diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs index af4beb248bfb2b..73333b0fd19df9 100644 --- a/ext/fs/interface.rs +++ b/ext/fs/interface.rs @@ -121,13 +121,17 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { access_check: Option>, ) -> FsResult>; - fn mkdir_sync(&self, path: &Path, recursive: bool, mode: u32) - -> FsResult<()>; + fn mkdir_sync( + &self, + path: &Path, + recursive: bool, + mode: Option, + ) -> FsResult<()>; async fn mkdir_async( &self, path: PathBuf, recursive: bool, - mode: u32, + mode: Option, ) -> FsResult<()>; fn chmod_sync(&self, path: &Path, mode: u32) -> FsResult<()>; diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index 150d3b95552110..b13d3a7d1a013a 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -197,7 +197,7 @@ where .check_write(&path, "Deno.mkdirSync()")?; let fs = state.borrow::(); - fs.mkdir_sync(&path, recursive, mode) + fs.mkdir_sync(&path, recursive, Some(mode)) .context_path("mkdir", &path)?; Ok(()) @@ -221,7 +221,7 @@ where (state.borrow::().clone(), path) }; - fs.mkdir_async(path.clone(), recursive, mode) + fs.mkdir_async(path.clone(), recursive, Some(mode)) .await .context_path("mkdir", &path)?; @@ -886,7 +886,7 @@ where const MAX_TRIES: u32 = 10; for _ in 0..MAX_TRIES { let path = tmp_name(&mut rng, &dir, prefix.as_deref(), suffix.as_deref())?; - match fs.mkdir_sync(&path, false, 0o700) { + match fs.mkdir_sync(&path, false, Some(0o700)) { Ok(_) => { // PERMISSIONS: ensure the absolute path is not leaked let path = strip_dir_prefix(&dir, dir_arg.as_deref(), path)?; @@ -928,7 +928,11 @@ where const MAX_TRIES: u32 = 10; for _ in 0..MAX_TRIES { let path = tmp_name(&mut rng, &dir, prefix.as_deref(), suffix.as_deref())?; - match fs.clone().mkdir_async(path.clone(), false, 0o700).await { + match fs + .clone() + .mkdir_async(path.clone(), false, Some(0o700)) + .await + { Ok(_) => { // PERMISSIONS: ensure the absolute path is not leaked let path = strip_dir_prefix(&dir, dir_arg.as_deref(), path)?; diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index 443c26819d2698..41a8569ba8f5e3 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -101,7 +101,7 @@ impl FileSystem for RealFs { &self, path: &Path, recursive: bool, - mode: u32, + mode: Option, ) -> FsResult<()> { mkdir(path, recursive, mode) } @@ -109,7 +109,7 @@ impl FileSystem for RealFs { &self, path: PathBuf, recursive: bool, - mode: u32, + mode: Option, ) -> FsResult<()> { spawn_blocking(move || mkdir(&path, recursive, mode)).await? } @@ -407,11 +407,11 @@ impl FileSystem for RealFs { } } -fn mkdir(path: &Path, recursive: bool, mode: u32) -> FsResult<()> { +fn mkdir(path: &Path, recursive: bool, mode: Option) -> FsResult<()> { let mut builder = fs::DirBuilder::new(); builder.recursive(recursive); #[cfg(unix)] - { + if let Some(mode) = mode { use std::os::unix::fs::DirBuilderExt; builder.mode(mode); } From 3138478f66823348eb745c7f0c2d34eed378a3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 28 Sep 2024 21:57:01 +0100 Subject: [PATCH 024/436] Revert "ci: use macos-14-xlarge on 'main' branch (#25908)" (#25913) This reverts commit 0f617be84a8e9edf73803210c24af43f729a97de. Reverting because it was an experiment. --- .github/workflows/ci.generate.ts | 9 +-------- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index e9fcacc82372a9..35020a5f8c55b8 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -14,7 +14,6 @@ const windowsX86Runner = "windows-2022"; const windowsX86XlRunner = "windows-2022-xl"; const macosX86Runner = "macos-13"; const macosArmRunner = "macos-14"; -const macosArmXlRunner = "macos-14-xlarge"; const Runners = { linuxX86: { @@ -43,12 +42,6 @@ const Runners = { arch: "aarch64", runner: macosArmRunner, }, - macosArmXl: { - os: "macos", - arch: "aarch64", - runner: - `\${{ github.repository == 'denoland/deno' && '${macosArmXlRunner}' || '${macosArmRunner}' }}`, - }, windowsX86: { os: "windows", arch: "x86_64", @@ -385,7 +378,7 @@ const ci = { job: "test", profile: "debug", }, { - ...Runners.macosArmXl, + ...Runners.macosArm, job: "test", profile: "release", skip_pr: true, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 035a4244fc3112..280eb7cb84c06e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: profile: debug - os: macos arch: aarch64 - runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''macos-14-xlarge'' || ''macos-14'' }}' + runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-14'' }}' job: test profile: release skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}' From 5faf769ac61b627d14710cdf487de7cd4eb3f9d3 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 28 Sep 2024 19:17:48 -0400 Subject: [PATCH 025/436] refactor: extract out sloppy imports resolution from CLI crate (#25920) This is slow progress towards creating a `deno_resolver` crate. Waiting on: * https://github.com/denoland/deno/pull/25918 * https://github.com/denoland/deno/pull/25916 --- Cargo.lock | 12 +- Cargo.toml | 10 +- cli/Cargo.toml | 6 +- cli/factory.rs | 18 +- cli/graph_util.rs | 9 +- cli/lsp/config.rs | 13 +- cli/lsp/diagnostics.rs | 11 +- cli/resolver.rs | 525 ++---------------- cli/tools/lint/rules/mod.rs | 6 +- cli/tools/lint/rules/no_sloppy_imports.rs | 19 +- cli/tools/registry/mod.rs | 7 +- cli/tools/registry/unfurl.rs | 15 +- resolvers/deno/Cargo.toml | 24 + resolvers/deno/README.md | 3 + resolvers/deno/lib.rs | 3 + resolvers/deno/sloppy_imports.rs | 511 +++++++++++++++++ .../node}/Cargo.toml | 0 .../node}/README.md | 0 .../node}/analyze.rs | 0 .../node}/clippy.toml | 0 {ext/node_resolver => resolvers/node}/env.rs | 0 .../node}/errors.rs | 0 {ext/node_resolver => resolvers/node}/lib.rs | 0 {ext/node_resolver => resolvers/node}/npm.rs | 0 .../node}/package_json.rs | 0 {ext/node_resolver => resolvers/node}/path.rs | 0 .../node}/resolution.rs | 0 {ext/node_resolver => resolvers/node}/sync.rs | 0 28 files changed, 665 insertions(+), 527 deletions(-) create mode 100644 resolvers/deno/Cargo.toml create mode 100644 resolvers/deno/README.md create mode 100644 resolvers/deno/lib.rs create mode 100644 resolvers/deno/sloppy_imports.rs rename {ext/node_resolver => resolvers/node}/Cargo.toml (100%) rename {ext/node_resolver => resolvers/node}/README.md (100%) rename {ext/node_resolver => resolvers/node}/analyze.rs (100%) rename {ext/node_resolver => resolvers/node}/clippy.toml (100%) rename {ext/node_resolver => resolvers/node}/env.rs (100%) rename {ext/node_resolver => resolvers/node}/errors.rs (100%) rename {ext/node_resolver => resolvers/node}/lib.rs (100%) rename {ext/node_resolver => resolvers/node}/npm.rs (100%) rename {ext/node_resolver => resolvers/node}/package_json.rs (100%) rename {ext/node_resolver => resolvers/node}/path.rs (100%) rename {ext/node_resolver => resolvers/node}/resolution.rs (100%) rename {ext/node_resolver => resolvers/node}/sync.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 1372ac191aa87c..bdde5d5410f344 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1150,7 +1150,6 @@ version = "2.0.0-rc.7" dependencies = [ "anstream", "async-trait", - "base32", "base64 0.21.7", "bincode", "bytes", @@ -1175,6 +1174,7 @@ dependencies = [ "deno_npm", "deno_package_json", "deno_path_util", + "deno_resolver", "deno_runtime", "deno_semver", "deno_task_shell", @@ -1949,6 +1949,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "deno_resolver" +version = "0.0.1" +dependencies = [ + "deno_media_type", + "deno_path_util", + "test_server", + "url", +] + [[package]] name = "deno_runtime" version = "0.177.0" diff --git a/Cargo.toml b/Cargo.toml index 4b27f85b82eb0a..2f53c8999dca68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,13 +21,14 @@ members = [ "ext/napi", "ext/net", "ext/node", - "ext/node_resolver", "ext/url", "ext/web", "ext/webgpu", "ext/webidl", "ext/websocket", "ext/webstorage", + "resolvers/deno", + "resolvers/node", "runtime", "runtime/permissions", "tests", @@ -50,6 +51,7 @@ deno_core = { version = "0.311.0" } deno_bench_util = { version = "0.162.0", path = "./bench_util" } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.1.4", features = ["module_specifier"] } +deno_npm = "=0.25.2" deno_path_util = "=0.1.1" deno_permissions = { version = "0.28.0", path = "./runtime/permissions" } deno_runtime = { version = "0.177.0", path = "./runtime" } @@ -86,7 +88,10 @@ deno_webgpu = { version = "0.135.0", path = "./ext/webgpu" } deno_webidl = { version = "0.168.0", path = "./ext/webidl" } deno_websocket = { version = "0.173.0", path = "./ext/websocket" } deno_webstorage = { version = "0.163.0", path = "./ext/webstorage" } -node_resolver = { version = "0.7.0", path = "./ext/node_resolver" } + +# resolvers +deno_resolver = { version = "0.0.1", path = "./resolvers/deno" } +node_resolver = { version = "0.7.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" @@ -102,6 +107,7 @@ cbc = { version = "=0.1.2", features = ["alloc"] } # Instead use util::time::utc_now() chrono = { version = "0.4", default-features = false, features = ["std", "serde"] } console_static_text = "=0.8.1" +dashmap = "5.5.3" data-encoding = "2.3.3" data-url = "=0.3.0" deno_cache_dir = "=0.12.0" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ddcf7119f4539d..32e0651b2f95b9 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -71,9 +71,10 @@ deno_doc = { version = "0.150.0", features = ["html", "syntect"] } deno_graph = { version = "=0.82.3" } deno_lint = { version = "=0.67.0", features = ["docs"] } deno_lockfile.workspace = true -deno_npm = "=0.25.2" +deno_npm.workspace = true deno_package_json.workspace = true deno_path_util.workspace = true +deno_resolver.workspace = true deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_semver.workspace = true deno_task_shell = "=0.17.0" @@ -85,7 +86,6 @@ node_resolver.workspace = true anstream = "0.6.14" async-trait.workspace = true -base32.workspace = true base64.workspace = true bincode = "=1.3.3" bytes.workspace = true @@ -96,7 +96,7 @@ clap_complete = "=4.5.24" clap_complete_fig = "=4.5.2" color-print = "0.3.5" console_static_text.workspace = true -dashmap = "5.5.3" +dashmap.workspace = true data-encoding.workspace = true dissimilar = "=1.0.4" dotenvy = "0.15.7" diff --git a/cli/factory.rs b/cli/factory.rs index 8aea635d2dd5b8..5e525ee32bb2a5 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -41,8 +41,9 @@ use crate::resolver::CjsResolutionStore; use crate::resolver::CliGraphResolver; use crate::resolver::CliGraphResolverOptions; use crate::resolver::CliNodeResolver; +use crate::resolver::CliSloppyImportsResolver; use crate::resolver::NpmModuleLoader; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; use crate::standalone::DenoCompileBinaryWriter; use crate::tools::check::TypeChecker; use crate::tools::coverage::CoverageCollector; @@ -186,7 +187,7 @@ struct CliFactoryServices { npm_resolver: Deferred>, permission_desc_parser: Deferred>, root_permissions_container: Deferred, - sloppy_imports_resolver: Deferred>>, + sloppy_imports_resolver: Deferred>>, text_only_progress_bar: Deferred, type_checker: Deferred>, cjs_resolutions: Deferred>, @@ -404,17 +405,16 @@ impl CliFactory { pub fn sloppy_imports_resolver( &self, - ) -> Result>, AnyError> { + ) -> Result>, AnyError> { self .services .sloppy_imports_resolver .get_or_try_init(|| { - Ok( - self - .cli_options()? - .unstable_sloppy_imports() - .then(|| Arc::new(SloppyImportsResolver::new(self.fs().clone()))), - ) + Ok(self.cli_options()?.unstable_sloppy_imports().then(|| { + Arc::new(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( + self.fs().clone(), + ))) + })) }) .map(|maybe| maybe.as_ref()) } diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 7d03d3c0b25c2e..f7194ac11b6e38 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -14,7 +14,8 @@ use crate::errors::get_error_class_name; use crate::file_fetcher::FileFetcher; use crate::npm::CliNpmResolver; use crate::resolver::CliGraphResolver; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; use crate::tools::check; use crate::tools::check::TypeChecker; use crate::util::file_watcher::WatcherCommunicator; @@ -31,7 +32,6 @@ use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; use deno_core::ModuleSpecifier; use deno_graph::source::Loader; -use deno_graph::source::ResolutionMode; use deno_graph::source::ResolveError; use deno_graph::GraphKind; use deno_graph::ModuleError; @@ -40,6 +40,7 @@ use deno_graph::ModuleGraphError; use deno_graph::ResolutionError; use deno_graph::SpecifierError; use deno_path_util::url_to_file_path; +use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node; use deno_runtime::deno_permissions::PermissionsContainer; @@ -765,8 +766,8 @@ fn enhanced_sloppy_imports_error_message( match error { ModuleError::LoadingErr(specifier, _, ModuleLoadError::Loader(_)) // ex. "Is a directory" error | ModuleError::Missing(specifier, _) => { - let additional_message = SloppyImportsResolver::new(fs.clone()) - .resolve(specifier, ResolutionMode::Execution)? + let additional_message = CliSloppyImportsResolver::new(SloppyImportsCachedFs::new(fs.clone())) + .resolve(specifier, SloppyImportsResolutionMode::Execution)? .as_suggestion_message(); Some(format!( "{} {} or run with --unstable-sloppy-imports", diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index dcb6120a455097..c54de3a2351119 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -59,7 +59,8 @@ use crate::args::LintOptions; use crate::cache::FastInsecureHasher; use crate::file_fetcher::FileFetcher; use crate::lsp::logging::lsp_warn; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; use crate::tools::lint::CliLinter; use crate::tools::lint::CliLinterOptions; use crate::tools::lint::LintRuleProvider; @@ -1181,7 +1182,7 @@ pub struct ConfigData { pub lockfile: Option>, pub npmrc: Option>, pub resolver: Arc, - pub sloppy_imports_resolver: Option>, + pub sloppy_imports_resolver: Option>, pub import_map_from_settings: Option, watched_files: HashMap, } @@ -1584,9 +1585,11 @@ impl ConfigData { .is_ok() || member_dir.workspace.has_unstable("sloppy-imports"); let sloppy_imports_resolver = unstable_sloppy_imports.then(|| { - Arc::new(SloppyImportsResolver::new_without_stat_cache(Arc::new( - deno_runtime::deno_fs::RealFs, - ))) + Arc::new(CliSloppyImportsResolver::new( + SloppyImportsCachedFs::new_without_stat_cache(Arc::new( + deno_runtime::deno_fs::RealFs, + )), + )) }); let resolver = Arc::new(resolver); let lint_rule_provider = LintRuleProvider::new( diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 1aebaf56fc421c..e57681f3ffcfff 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -19,8 +19,8 @@ use super::urls::LspUrlMap; use crate::graph_util; use crate::graph_util::enhanced_resolution_error_message; use crate::lsp::lsp_custom::DiagnosticBatchNotificationParams; -use crate::resolver::SloppyImportsResolution; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; use crate::tools::lint::CliLinter; use crate::tools::lint::CliLinterOptions; use crate::tools::lint::LintRuleProvider; @@ -40,11 +40,12 @@ use deno_core::unsync::spawn_blocking; use deno_core::unsync::JoinHandle; use deno_core::url::Url; use deno_core::ModuleSpecifier; -use deno_graph::source::ResolutionMode; use deno_graph::source::ResolveError; use deno_graph::Resolution; use deno_graph::ResolutionError; use deno_graph::SpecifierError; +use deno_resolver::sloppy_imports::SloppyImportsResolution; +use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; use deno_runtime::deno_fs; use deno_runtime::deno_node; use deno_runtime::tokio_util::create_basic_runtime; @@ -1263,7 +1264,9 @@ impl DenoDiagnostic { Self::NotInstalledJsr(pkg_req, specifier) => (lsp::DiagnosticSeverity::ERROR, format!("JSR package \"{pkg_req}\" is not installed or doesn't exist."), Some(json!({ "specifier": specifier }))), Self::NotInstalledNpm(pkg_req, specifier) => (lsp::DiagnosticSeverity::ERROR, format!("NPM package \"{pkg_req}\" is not installed or doesn't exist."), Some(json!({ "specifier": specifier }))), Self::NoLocal(specifier) => { - let maybe_sloppy_resolution = SloppyImportsResolver::new(Arc::new(deno_fs::RealFs)).resolve(specifier, ResolutionMode::Execution); + let maybe_sloppy_resolution = CliSloppyImportsResolver::new( + SloppyImportsCachedFs::new(Arc::new(deno_fs::RealFs)) + ).resolve(specifier, SloppyImportsResolutionMode::Execution); let data = maybe_sloppy_resolution.as_ref().map(|res| { json!({ "specifier": specifier, diff --git a/cli/resolver.rs b/cli/resolver.rs index cf4cd8b74a7a45..d6e14c39d0f84f 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -22,7 +22,8 @@ use deno_graph::NpmLoadError; use deno_graph::NpmResolvePkgReqsResult; use deno_npm::resolution::NpmResolutionError; use deno_package_json::PackageJsonDepValue; -use deno_path_util::url_to_file_path; +use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_resolver::sloppy_imports::SloppyImportsResolver; use deno_runtime::colors; use deno_runtime::deno_fs; use deno_runtime::deno_fs::FileSystem; @@ -421,13 +422,16 @@ impl CjsResolutionStore { } } +pub type CliSloppyImportsResolver = + SloppyImportsResolver; + /// A resolver that takes care of resolution, taking into account loaded /// import map, JSX settings. #[derive(Debug)] pub struct CliGraphResolver { node_resolver: Option>, npm_resolver: Option>, - sloppy_imports_resolver: Option>, + sloppy_imports_resolver: Option>, workspace_resolver: Arc, maybe_default_jsx_import_source: Option, maybe_default_jsx_import_source_types: Option, @@ -441,7 +445,7 @@ pub struct CliGraphResolver { pub struct CliGraphResolverOptions<'a> { pub node_resolver: Option>, pub npm_resolver: Option>, - pub sloppy_imports_resolver: Option>, + pub sloppy_imports_resolver: Option>, pub workspace_resolver: Arc, pub bare_node_builtins_enabled: bool, pub maybe_jsx_import_source_config: Option, @@ -565,7 +569,15 @@ impl Resolver for CliGraphResolver { if let Some(sloppy_imports_resolver) = &self.sloppy_imports_resolver { Ok( sloppy_imports_resolver - .resolve(&specifier, mode) + .resolve( + &specifier, + match mode { + ResolutionMode::Execution => { + SloppyImportsResolutionMode::Execution + } + ResolutionMode::Types => SloppyImportsResolutionMode::Types, + }, + ) .map(|s| s.into_specifier()) .unwrap_or(specifier), ) @@ -847,96 +859,18 @@ impl<'a> deno_graph::source::NpmResolver for WorkerCliNpmGraphResolver<'a> { } } -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum SloppyImportsFsEntry { - File, - Dir, -} - -impl SloppyImportsFsEntry { - pub fn from_fs_stat( - stat: &deno_runtime::deno_io::fs::FsStat, - ) -> Option { - if stat.is_file { - Some(SloppyImportsFsEntry::File) - } else if stat.is_directory { - Some(SloppyImportsFsEntry::Dir) - } else { - None - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum SloppyImportsResolution { - /// Ex. `./file.js` to `./file.ts` - JsToTs(ModuleSpecifier), - /// Ex. `./file` to `./file.ts` - NoExtension(ModuleSpecifier), - /// Ex. `./dir` to `./dir/index.ts` - Directory(ModuleSpecifier), -} - -impl SloppyImportsResolution { - pub fn as_specifier(&self) -> &ModuleSpecifier { - match self { - Self::JsToTs(specifier) => specifier, - Self::NoExtension(specifier) => specifier, - Self::Directory(specifier) => specifier, - } - } - - pub fn into_specifier(self) -> ModuleSpecifier { - match self { - Self::JsToTs(specifier) => specifier, - Self::NoExtension(specifier) => specifier, - Self::Directory(specifier) => specifier, - } - } - - pub fn as_suggestion_message(&self) -> String { - format!("Maybe {}", self.as_base_message()) - } - - pub fn as_quick_fix_message(&self) -> String { - let message = self.as_base_message(); - let mut chars = message.chars(); - format!( - "{}{}.", - chars.next().unwrap().to_uppercase(), - chars.as_str() - ) - } - - fn as_base_message(&self) -> String { - match self { - SloppyImportsResolution::JsToTs(specifier) => { - let media_type = MediaType::from_specifier(specifier); - format!("change the extension to '{}'", media_type.as_ts_extension()) - } - SloppyImportsResolution::NoExtension(specifier) => { - let media_type = MediaType::from_specifier(specifier); - format!("add a '{}' extension", media_type.as_ts_extension()) - } - SloppyImportsResolution::Directory(specifier) => { - let file_name = specifier - .path() - .rsplit_once('/') - .map(|(_, file_name)| file_name) - .unwrap_or(specifier.path()); - format!("specify path to '{}' file in directory instead", file_name) - } - } - } -} - #[derive(Debug)] -pub struct SloppyImportsResolver { - fs: Arc, - cache: Option>>, +pub struct SloppyImportsCachedFs { + fs: Arc, + cache: Option< + DashMap< + PathBuf, + Option, + >, + >, } -impl SloppyImportsResolver { +impl SloppyImportsCachedFs { pub fn new(fs: Arc) -> Self { Self { fs, @@ -947,409 +881,34 @@ impl SloppyImportsResolver { pub fn new_without_stat_cache(fs: Arc) -> Self { Self { fs, cache: None } } +} - pub fn resolve( +impl deno_resolver::sloppy_imports::SloppyImportResolverFs + for SloppyImportsCachedFs +{ + fn stat_sync( &self, - specifier: &ModuleSpecifier, - mode: ResolutionMode, - ) -> Option { - fn path_without_ext( - path: &Path, - media_type: MediaType, - ) -> Option> { - let old_path_str = path.to_string_lossy(); - match media_type { - MediaType::Unknown => Some(old_path_str), - _ => old_path_str - .strip_suffix(media_type.as_ts_extension()) - .map(|s| Cow::Owned(s.to_string())), - } - } - - fn media_types_to_paths( - path_no_ext: &str, - original_media_type: MediaType, - probe_media_type_types: Vec, - reason: SloppyImportsResolutionReason, - ) -> Vec<(PathBuf, SloppyImportsResolutionReason)> { - probe_media_type_types - .into_iter() - .filter(|media_type| *media_type != original_media_type) - .map(|media_type| { - ( - PathBuf::from(format!( - "{}{}", - path_no_ext, - media_type.as_ts_extension() - )), - reason, - ) - }) - .collect::>() - } - - if specifier.scheme() != "file" { - return None; - } - - let path = url_to_file_path(specifier).ok()?; - - #[derive(Clone, Copy)] - enum SloppyImportsResolutionReason { - JsToTs, - NoExtension, - Directory, - } - - let probe_paths: Vec<(PathBuf, SloppyImportsResolutionReason)> = - match self.stat_sync(&path) { - Some(SloppyImportsFsEntry::File) => { - if mode.is_types() { - let media_type = MediaType::from_specifier(specifier); - // attempt to resolve the .d.ts file before the .js file - let probe_media_type_types = match media_type { - MediaType::JavaScript => { - vec![(MediaType::Dts), MediaType::JavaScript] - } - MediaType::Mjs => { - vec![MediaType::Dmts, MediaType::Dts, MediaType::Mjs] - } - MediaType::Cjs => { - vec![MediaType::Dcts, MediaType::Dts, MediaType::Cjs] - } - _ => return None, - }; - let path_no_ext = path_without_ext(&path, media_type)?; - media_types_to_paths( - &path_no_ext, - media_type, - probe_media_type_types, - SloppyImportsResolutionReason::JsToTs, - ) - } else { - return None; - } - } - entry @ None | entry @ Some(SloppyImportsFsEntry::Dir) => { - let media_type = MediaType::from_specifier(specifier); - let probe_media_type_types = match media_type { - MediaType::JavaScript => ( - if mode.is_types() { - vec![MediaType::TypeScript, MediaType::Tsx, MediaType::Dts] - } else { - vec![MediaType::TypeScript, MediaType::Tsx] - }, - SloppyImportsResolutionReason::JsToTs, - ), - MediaType::Jsx => { - (vec![MediaType::Tsx], SloppyImportsResolutionReason::JsToTs) - } - MediaType::Mjs => ( - if mode.is_types() { - vec![MediaType::Mts, MediaType::Dmts, MediaType::Dts] - } else { - vec![MediaType::Mts] - }, - SloppyImportsResolutionReason::JsToTs, - ), - MediaType::Cjs => ( - if mode.is_types() { - vec![MediaType::Cts, MediaType::Dcts, MediaType::Dts] - } else { - vec![MediaType::Cts] - }, - SloppyImportsResolutionReason::JsToTs, - ), - MediaType::TypeScript - | MediaType::Mts - | MediaType::Cts - | MediaType::Dts - | MediaType::Dmts - | MediaType::Dcts - | MediaType::Tsx - | MediaType::Json - | MediaType::Wasm - | MediaType::TsBuildInfo - | MediaType::SourceMap => { - return None; - } - MediaType::Unknown => ( - if mode.is_types() { - vec![ - MediaType::TypeScript, - MediaType::Tsx, - MediaType::Mts, - MediaType::Dts, - MediaType::Dmts, - MediaType::Dcts, - MediaType::JavaScript, - MediaType::Jsx, - MediaType::Mjs, - ] - } else { - vec![ - MediaType::TypeScript, - MediaType::JavaScript, - MediaType::Tsx, - MediaType::Jsx, - MediaType::Mts, - MediaType::Mjs, - ] - }, - SloppyImportsResolutionReason::NoExtension, - ), - }; - let mut probe_paths = match path_without_ext(&path, media_type) { - Some(path_no_ext) => media_types_to_paths( - &path_no_ext, - media_type, - probe_media_type_types.0, - probe_media_type_types.1, - ), - None => vec![], - }; - - if matches!(entry, Some(SloppyImportsFsEntry::Dir)) { - // try to resolve at the index file - if mode.is_types() { - probe_paths.push(( - path.join("index.ts"), - SloppyImportsResolutionReason::Directory, - )); - - probe_paths.push(( - path.join("index.mts"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.d.ts"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.d.mts"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.js"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.mjs"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.tsx"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.jsx"), - SloppyImportsResolutionReason::Directory, - )); - } else { - probe_paths.push(( - path.join("index.ts"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.mts"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.tsx"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.js"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.mjs"), - SloppyImportsResolutionReason::Directory, - )); - probe_paths.push(( - path.join("index.jsx"), - SloppyImportsResolutionReason::Directory, - )); - } - } - if probe_paths.is_empty() { - return None; - } - probe_paths - } - }; - - for (probe_path, reason) in probe_paths { - if self.stat_sync(&probe_path) == Some(SloppyImportsFsEntry::File) { - if let Ok(specifier) = ModuleSpecifier::from_file_path(probe_path) { - match reason { - SloppyImportsResolutionReason::JsToTs => { - return Some(SloppyImportsResolution::JsToTs(specifier)); - } - SloppyImportsResolutionReason::NoExtension => { - return Some(SloppyImportsResolution::NoExtension(specifier)); - } - SloppyImportsResolutionReason::Directory => { - return Some(SloppyImportsResolution::Directory(specifier)); - } - } - } - } - } - - None - } - - fn stat_sync(&self, path: &Path) -> Option { + path: &Path, + ) -> Option { if let Some(cache) = &self.cache { if let Some(entry) = cache.get(path) { return *entry; } } - let entry = self - .fs - .stat_sync(path) - .ok() - .and_then(|stat| SloppyImportsFsEntry::from_fs_stat(&stat)); + let entry = self.fs.stat_sync(path).ok().and_then(|stat| { + if stat.is_file { + Some(deno_resolver::sloppy_imports::SloppyImportsFsEntry::File) + } else if stat.is_directory { + Some(deno_resolver::sloppy_imports::SloppyImportsFsEntry::Dir) + } else { + None + } + }); + if let Some(cache) = &self.cache { cache.insert(path.to_owned(), entry); } entry } } - -#[cfg(test)] -mod test { - use test_util::TestContext; - - use super::*; - - #[test] - fn test_unstable_sloppy_imports() { - fn resolve(specifier: &ModuleSpecifier) -> Option { - resolve_with_mode(specifier, ResolutionMode::Execution) - } - - fn resolve_types( - specifier: &ModuleSpecifier, - ) -> Option { - resolve_with_mode(specifier, ResolutionMode::Types) - } - - fn resolve_with_mode( - specifier: &ModuleSpecifier, - mode: ResolutionMode, - ) -> Option { - SloppyImportsResolver::new(Arc::new(deno_fs::RealFs)) - .resolve(specifier, mode) - } - - let context = TestContext::default(); - let temp_dir = context.temp_dir().path(); - - // scenarios like resolving ./example.js to ./example.ts - for (ext_from, ext_to) in [("js", "ts"), ("js", "tsx"), ("mjs", "mts")] { - let ts_file = temp_dir.join(format!("file.{}", ext_to)); - ts_file.write(""); - assert_eq!(resolve(&ts_file.url_file()), None); - assert_eq!( - resolve( - &temp_dir - .url_dir() - .join(&format!("file.{}", ext_from)) - .unwrap() - ), - Some(SloppyImportsResolution::JsToTs(ts_file.url_file())), - ); - ts_file.remove_file(); - } - - // no extension scenarios - for ext in ["js", "ts", "js", "tsx", "jsx", "mjs", "mts"] { - let file = temp_dir.join(format!("file.{}", ext)); - file.write(""); - assert_eq!( - resolve( - &temp_dir - .url_dir() - .join("file") // no ext - .unwrap() - ), - Some(SloppyImportsResolution::NoExtension(file.url_file())) - ); - file.remove_file(); - } - - // .ts and .js exists, .js specified (goes to specified) - { - let ts_file = temp_dir.join("file.ts"); - ts_file.write(""); - let js_file = temp_dir.join("file.js"); - js_file.write(""); - assert_eq!(resolve(&js_file.url_file()), None); - } - - // only js exists, .js specified - { - let js_only_file = temp_dir.join("js_only.js"); - js_only_file.write(""); - assert_eq!(resolve(&js_only_file.url_file()), None); - assert_eq!(resolve_types(&js_only_file.url_file()), None); - } - - // resolving a directory to an index file - { - let routes_dir = temp_dir.join("routes"); - routes_dir.create_dir_all(); - let index_file = routes_dir.join("index.ts"); - index_file.write(""); - assert_eq!( - resolve(&routes_dir.url_file()), - Some(SloppyImportsResolution::Directory(index_file.url_file())), - ); - } - - // both a directory and a file with specifier is present - { - let api_dir = temp_dir.join("api"); - api_dir.create_dir_all(); - let bar_file = api_dir.join("bar.ts"); - bar_file.write(""); - let api_file = temp_dir.join("api.ts"); - api_file.write(""); - assert_eq!( - resolve(&api_dir.url_file()), - Some(SloppyImportsResolution::NoExtension(api_file.url_file())), - ); - } - } - - #[test] - fn test_sloppy_import_resolution_suggestion_message() { - // directory - assert_eq!( - SloppyImportsResolution::Directory( - ModuleSpecifier::parse("file:///dir/index.js").unwrap() - ) - .as_suggestion_message(), - "Maybe specify path to 'index.js' file in directory instead" - ); - // no ext - assert_eq!( - SloppyImportsResolution::NoExtension( - ModuleSpecifier::parse("file:///dir/index.mjs").unwrap() - ) - .as_suggestion_message(), - "Maybe add a '.mjs' extension" - ); - // js to ts - assert_eq!( - SloppyImportsResolution::JsToTs( - ModuleSpecifier::parse("file:///dir/index.mts").unwrap() - ) - .as_suggestion_message(), - "Maybe change the extension to '.mts'" - ); - } -} diff --git a/cli/tools/lint/rules/mod.rs b/cli/tools/lint/rules/mod.rs index 2669ffda15fd01..dd723ad1598642 100644 --- a/cli/tools/lint/rules/mod.rs +++ b/cli/tools/lint/rules/mod.rs @@ -14,7 +14,7 @@ use deno_graph::ModuleGraph; use deno_lint::diagnostic::LintDiagnostic; use deno_lint::rules::LintRule; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; mod no_sloppy_imports; mod no_slow_types; @@ -144,13 +144,13 @@ impl ConfiguredRules { } pub struct LintRuleProvider { - sloppy_imports_resolver: Option>, + sloppy_imports_resolver: Option>, workspace_resolver: Option>, } impl LintRuleProvider { pub fn new( - sloppy_imports_resolver: Option>, + sloppy_imports_resolver: Option>, workspace_resolver: Option>, ) -> Self { Self { diff --git a/cli/tools/lint/rules/no_sloppy_imports.rs b/cli/tools/lint/rules/no_sloppy_imports.rs index 4180be5be1dd54..2f60875885fc0d 100644 --- a/cli/tools/lint/rules/no_sloppy_imports.rs +++ b/cli/tools/lint/rules/no_sloppy_imports.rs @@ -16,24 +16,25 @@ use deno_lint::diagnostic::LintDiagnosticRange; use deno_lint::diagnostic::LintFix; use deno_lint::diagnostic::LintFixChange; use deno_lint::rules::LintRule; +use deno_resolver::sloppy_imports::SloppyImportsResolution; +use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; use text_lines::LineAndColumnIndex; use crate::graph_util::CliJsrUrlProvider; -use crate::resolver::SloppyImportsResolution; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; use super::ExtendedLintRule; #[derive(Debug)] pub struct NoSloppyImportsRule { - sloppy_imports_resolver: Option>, + sloppy_imports_resolver: Option>, // None for making printing out the lint rules easy workspace_resolver: Option>, } impl NoSloppyImportsRule { pub fn new( - sloppy_imports_resolver: Option>, + sloppy_imports_resolver: Option>, workspace_resolver: Option>, ) -> Self { NoSloppyImportsRule { @@ -172,7 +173,7 @@ impl LintRule for NoSloppyImportsRule { #[derive(Debug)] struct SloppyImportCaptureResolver<'a> { workspace_resolver: &'a WorkspaceResolver, - sloppy_imports_resolver: &'a SloppyImportsResolver, + sloppy_imports_resolver: &'a CliSloppyImportsResolver, captures: RefCell>, } @@ -194,7 +195,13 @@ impl<'a> deno_graph::source::Resolver for SloppyImportCaptureResolver<'a> { } | deno_config::workspace::MappedResolution::ImportMap { specifier, .. - } => match self.sloppy_imports_resolver.resolve(&specifier, mode) { + } => match self.sloppy_imports_resolver.resolve( + &specifier, + match mode { + ResolutionMode::Execution => SloppyImportsResolutionMode::Execution, + ResolutionMode::Types => SloppyImportsResolutionMode::Types, + }, + ) { Some(res) => { self .captures diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index 941514b0456e0e..4098d62e37da64 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -43,7 +43,8 @@ use crate::cache::ParsedSourceCache; use crate::factory::CliFactory; use crate::graph_util::ModuleGraphCreator; use crate::http_util::HttpClient; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; use crate::tools::check::CheckOptions; use crate::tools::lint::collect_no_slow_type_diagnostics; use crate::tools::registry::diagnostics::PublishDiagnostic; @@ -108,7 +109,9 @@ pub async fn publish( } let specifier_unfurler = Arc::new(SpecifierUnfurler::new( if cli_options.unstable_sloppy_imports() { - Some(SloppyImportsResolver::new(cli_factory.fs().clone())) + Some(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( + cli_factory.fs().clone(), + ))) } else { None }, diff --git a/cli/tools/registry/unfurl.rs b/cli/tools/registry/unfurl.rs index 0f5b9fdd329aa8..5ec726a6401590 100644 --- a/cli/tools/registry/unfurl.rs +++ b/cli/tools/registry/unfurl.rs @@ -12,9 +12,10 @@ use deno_graph::DynamicTemplatePart; use deno_graph::ParserModuleAnalyzer; use deno_graph::TypeScriptReference; use deno_package_json::PackageJsonDepValue; +use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; use deno_runtime::deno_node::is_builtin_node_module; -use crate::resolver::SloppyImportsResolver; +use crate::resolver::CliSloppyImportsResolver; #[derive(Debug, Clone)] pub enum SpecifierUnfurlerDiagnostic { @@ -42,14 +43,14 @@ impl SpecifierUnfurlerDiagnostic { } pub struct SpecifierUnfurler { - sloppy_imports_resolver: Option, + sloppy_imports_resolver: Option, workspace_resolver: WorkspaceResolver, bare_node_builtins: bool, } impl SpecifierUnfurler { pub fn new( - sloppy_imports_resolver: Option, + sloppy_imports_resolver: Option, workspace_resolver: WorkspaceResolver, bare_node_builtins: bool, ) -> Self { @@ -179,7 +180,7 @@ impl SpecifierUnfurler { let resolved = if let Some(sloppy_imports_resolver) = &self.sloppy_imports_resolver { sloppy_imports_resolver - .resolve(&resolved, deno_graph::source::ResolutionMode::Execution) + .resolve(&resolved, SloppyImportsResolutionMode::Execution) .map(|res| res.into_specifier()) .unwrap_or(resolved) } else { @@ -388,6 +389,8 @@ fn to_range( mod tests { use std::sync::Arc; + use crate::resolver::SloppyImportsCachedFs; + use super::*; use deno_ast::MediaType; use deno_ast::ModuleSpecifier; @@ -455,7 +458,9 @@ mod tests { ); let fs = Arc::new(RealFs); let unfurler = SpecifierUnfurler::new( - Some(SloppyImportsResolver::new(fs)), + Some(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( + fs, + ))), workspace_resolver, true, ); diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml new file mode 100644 index 00000000000000..23c43810a0a970 --- /dev/null +++ b/resolvers/deno/Cargo.toml @@ -0,0 +1,24 @@ +# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +[package] +name = "deno_resolver" +version = "0.0.1" +authors.workspace = true +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +description = "Deno resolution algorithm" + +[lib] +path = "lib.rs" + +[features] + +[dependencies] +deno_media_type.workspace = true +deno_path_util.workspace = true +url.workspace = true + +[dev-dependencies] +test_util.workspace = true diff --git a/resolvers/deno/README.md b/resolvers/deno/README.md new file mode 100644 index 00000000000000..f51619a314e5c5 --- /dev/null +++ b/resolvers/deno/README.md @@ -0,0 +1,3 @@ +# deno_resolver + +Deno resolution algorithm. diff --git a/resolvers/deno/lib.rs b/resolvers/deno/lib.rs new file mode 100644 index 00000000000000..7d7796d776e024 --- /dev/null +++ b/resolvers/deno/lib.rs @@ -0,0 +1,3 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +pub mod sloppy_imports; diff --git a/resolvers/deno/sloppy_imports.rs b/resolvers/deno/sloppy_imports.rs new file mode 100644 index 00000000000000..e4d0898e5d19ed --- /dev/null +++ b/resolvers/deno/sloppy_imports.rs @@ -0,0 +1,511 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::borrow::Cow; +use std::path::Path; +use std::path::PathBuf; + +use deno_media_type::MediaType; +use deno_path_util::url_to_file_path; +use url::Url; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum SloppyImportsFsEntry { + File, + Dir, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum SloppyImportsResolution { + /// Ex. `./file.js` to `./file.ts` + JsToTs(Url), + /// Ex. `./file` to `./file.ts` + NoExtension(Url), + /// Ex. `./dir` to `./dir/index.ts` + Directory(Url), +} + +impl SloppyImportsResolution { + pub fn as_specifier(&self) -> &Url { + match self { + Self::JsToTs(specifier) => specifier, + Self::NoExtension(specifier) => specifier, + Self::Directory(specifier) => specifier, + } + } + + pub fn into_specifier(self) -> Url { + match self { + Self::JsToTs(specifier) => specifier, + Self::NoExtension(specifier) => specifier, + Self::Directory(specifier) => specifier, + } + } + + pub fn as_suggestion_message(&self) -> String { + format!("Maybe {}", self.as_base_message()) + } + + pub fn as_quick_fix_message(&self) -> String { + let message = self.as_base_message(); + let mut chars = message.chars(); + format!( + "{}{}.", + chars.next().unwrap().to_uppercase(), + chars.as_str() + ) + } + + fn as_base_message(&self) -> String { + match self { + SloppyImportsResolution::JsToTs(specifier) => { + let media_type = MediaType::from_specifier(specifier); + format!("change the extension to '{}'", media_type.as_ts_extension()) + } + SloppyImportsResolution::NoExtension(specifier) => { + let media_type = MediaType::from_specifier(specifier); + format!("add a '{}' extension", media_type.as_ts_extension()) + } + SloppyImportsResolution::Directory(specifier) => { + let file_name = specifier + .path() + .rsplit_once('/') + .map(|(_, file_name)| file_name) + .unwrap_or(specifier.path()); + format!("specify path to '{}' file in directory instead", file_name) + } + } + } +} + +/// The kind of resolution currently being done. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum SloppyImportsResolutionMode { + /// Resolving for code that will be executed. + Execution, + /// Resolving for code that will be used for type information. + Types, +} + +impl SloppyImportsResolutionMode { + pub fn is_types(&self) -> bool { + *self == SloppyImportsResolutionMode::Types + } +} + +pub trait SloppyImportResolverFs { + fn stat_sync(&self, path: &Path) -> Option; + + fn is_file(&self, path: &Path) -> bool { + self.stat_sync(path) == Some(SloppyImportsFsEntry::File) + } +} + +#[derive(Debug)] +pub struct SloppyImportsResolver { + fs: Fs, +} + +impl SloppyImportsResolver { + pub fn new(fs: Fs) -> Self { + Self { fs } + } + + pub fn resolve( + &self, + specifier: &Url, + mode: SloppyImportsResolutionMode, + ) -> Option { + fn path_without_ext( + path: &Path, + media_type: MediaType, + ) -> Option> { + let old_path_str = path.to_string_lossy(); + match media_type { + MediaType::Unknown => Some(old_path_str), + _ => old_path_str + .strip_suffix(media_type.as_ts_extension()) + .map(|s| Cow::Owned(s.to_string())), + } + } + + fn media_types_to_paths( + path_no_ext: &str, + original_media_type: MediaType, + probe_media_type_types: Vec, + reason: SloppyImportsResolutionReason, + ) -> Vec<(PathBuf, SloppyImportsResolutionReason)> { + probe_media_type_types + .into_iter() + .filter(|media_type| *media_type != original_media_type) + .map(|media_type| { + ( + PathBuf::from(format!( + "{}{}", + path_no_ext, + media_type.as_ts_extension() + )), + reason, + ) + }) + .collect::>() + } + + if specifier.scheme() != "file" { + return None; + } + + let path = url_to_file_path(specifier).ok()?; + + #[derive(Clone, Copy)] + enum SloppyImportsResolutionReason { + JsToTs, + NoExtension, + Directory, + } + + let probe_paths: Vec<(PathBuf, SloppyImportsResolutionReason)> = + match self.fs.stat_sync(&path) { + Some(SloppyImportsFsEntry::File) => { + if mode.is_types() { + let media_type = MediaType::from_specifier(specifier); + // attempt to resolve the .d.ts file before the .js file + let probe_media_type_types = match media_type { + MediaType::JavaScript => { + vec![(MediaType::Dts), MediaType::JavaScript] + } + MediaType::Mjs => { + vec![MediaType::Dmts, MediaType::Dts, MediaType::Mjs] + } + MediaType::Cjs => { + vec![MediaType::Dcts, MediaType::Dts, MediaType::Cjs] + } + _ => return None, + }; + let path_no_ext = path_without_ext(&path, media_type)?; + media_types_to_paths( + &path_no_ext, + media_type, + probe_media_type_types, + SloppyImportsResolutionReason::JsToTs, + ) + } else { + return None; + } + } + entry @ None | entry @ Some(SloppyImportsFsEntry::Dir) => { + let media_type = MediaType::from_specifier(specifier); + let probe_media_type_types = match media_type { + MediaType::JavaScript => ( + if mode.is_types() { + vec![MediaType::TypeScript, MediaType::Tsx, MediaType::Dts] + } else { + vec![MediaType::TypeScript, MediaType::Tsx] + }, + SloppyImportsResolutionReason::JsToTs, + ), + MediaType::Jsx => { + (vec![MediaType::Tsx], SloppyImportsResolutionReason::JsToTs) + } + MediaType::Mjs => ( + if mode.is_types() { + vec![MediaType::Mts, MediaType::Dmts, MediaType::Dts] + } else { + vec![MediaType::Mts] + }, + SloppyImportsResolutionReason::JsToTs, + ), + MediaType::Cjs => ( + if mode.is_types() { + vec![MediaType::Cts, MediaType::Dcts, MediaType::Dts] + } else { + vec![MediaType::Cts] + }, + SloppyImportsResolutionReason::JsToTs, + ), + MediaType::TypeScript + | MediaType::Mts + | MediaType::Cts + | MediaType::Dts + | MediaType::Dmts + | MediaType::Dcts + | MediaType::Tsx + | MediaType::Json + | MediaType::Wasm + | MediaType::TsBuildInfo + | MediaType::SourceMap => { + return None; + } + MediaType::Unknown => ( + if mode.is_types() { + vec![ + MediaType::TypeScript, + MediaType::Tsx, + MediaType::Mts, + MediaType::Dts, + MediaType::Dmts, + MediaType::Dcts, + MediaType::JavaScript, + MediaType::Jsx, + MediaType::Mjs, + ] + } else { + vec![ + MediaType::TypeScript, + MediaType::JavaScript, + MediaType::Tsx, + MediaType::Jsx, + MediaType::Mts, + MediaType::Mjs, + ] + }, + SloppyImportsResolutionReason::NoExtension, + ), + }; + let mut probe_paths = match path_without_ext(&path, media_type) { + Some(path_no_ext) => media_types_to_paths( + &path_no_ext, + media_type, + probe_media_type_types.0, + probe_media_type_types.1, + ), + None => vec![], + }; + + if matches!(entry, Some(SloppyImportsFsEntry::Dir)) { + // try to resolve at the index file + if mode.is_types() { + probe_paths.push(( + path.join("index.ts"), + SloppyImportsResolutionReason::Directory, + )); + + probe_paths.push(( + path.join("index.mts"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.d.ts"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.d.mts"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.js"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.mjs"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.tsx"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.jsx"), + SloppyImportsResolutionReason::Directory, + )); + } else { + probe_paths.push(( + path.join("index.ts"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.mts"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.tsx"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.js"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.mjs"), + SloppyImportsResolutionReason::Directory, + )); + probe_paths.push(( + path.join("index.jsx"), + SloppyImportsResolutionReason::Directory, + )); + } + } + if probe_paths.is_empty() { + return None; + } + probe_paths + } + }; + + for (probe_path, reason) in probe_paths { + if self.fs.is_file(&probe_path) { + if let Ok(specifier) = Url::from_file_path(probe_path) { + match reason { + SloppyImportsResolutionReason::JsToTs => { + return Some(SloppyImportsResolution::JsToTs(specifier)); + } + SloppyImportsResolutionReason::NoExtension => { + return Some(SloppyImportsResolution::NoExtension(specifier)); + } + SloppyImportsResolutionReason::Directory => { + return Some(SloppyImportsResolution::Directory(specifier)); + } + } + } + } + } + + None + } +} + +#[cfg(test)] +mod test { + use test_util::TestContext; + + use super::*; + + #[test] + fn test_unstable_sloppy_imports() { + fn resolve(specifier: &Url) -> Option { + resolve_with_mode(specifier, SloppyImportsResolutionMode::Execution) + } + + fn resolve_types(specifier: &Url) -> Option { + resolve_with_mode(specifier, SloppyImportsResolutionMode::Types) + } + + fn resolve_with_mode( + specifier: &Url, + mode: SloppyImportsResolutionMode, + ) -> Option { + struct RealSloppyImportsResolverFs; + impl SloppyImportResolverFs for RealSloppyImportsResolverFs { + fn stat_sync(&self, path: &Path) -> Option { + let stat = std::fs::metadata(path).ok()?; + if stat.is_dir() { + Some(SloppyImportsFsEntry::Dir) + } else if stat.is_file() { + Some(SloppyImportsFsEntry::File) + } else { + None + } + } + } + + SloppyImportsResolver::new(RealSloppyImportsResolverFs) + .resolve(specifier, mode) + } + + let context = TestContext::default(); + let temp_dir = context.temp_dir().path(); + + // scenarios like resolving ./example.js to ./example.ts + for (ext_from, ext_to) in [("js", "ts"), ("js", "tsx"), ("mjs", "mts")] { + let ts_file = temp_dir.join(format!("file.{}", ext_to)); + ts_file.write(""); + assert_eq!(resolve(&ts_file.url_file()), None); + assert_eq!( + resolve( + &temp_dir + .url_dir() + .join(&format!("file.{}", ext_from)) + .unwrap() + ), + Some(SloppyImportsResolution::JsToTs(ts_file.url_file())), + ); + ts_file.remove_file(); + } + + // no extension scenarios + for ext in ["js", "ts", "js", "tsx", "jsx", "mjs", "mts"] { + let file = temp_dir.join(format!("file.{}", ext)); + file.write(""); + assert_eq!( + resolve( + &temp_dir + .url_dir() + .join("file") // no ext + .unwrap() + ), + Some(SloppyImportsResolution::NoExtension(file.url_file())) + ); + file.remove_file(); + } + + // .ts and .js exists, .js specified (goes to specified) + { + let ts_file = temp_dir.join("file.ts"); + ts_file.write(""); + let js_file = temp_dir.join("file.js"); + js_file.write(""); + assert_eq!(resolve(&js_file.url_file()), None); + } + + // only js exists, .js specified + { + let js_only_file = temp_dir.join("js_only.js"); + js_only_file.write(""); + assert_eq!(resolve(&js_only_file.url_file()), None); + assert_eq!(resolve_types(&js_only_file.url_file()), None); + } + + // resolving a directory to an index file + { + let routes_dir = temp_dir.join("routes"); + routes_dir.create_dir_all(); + let index_file = routes_dir.join("index.ts"); + index_file.write(""); + assert_eq!( + resolve(&routes_dir.url_file()), + Some(SloppyImportsResolution::Directory(index_file.url_file())), + ); + } + + // both a directory and a file with specifier is present + { + let api_dir = temp_dir.join("api"); + api_dir.create_dir_all(); + let bar_file = api_dir.join("bar.ts"); + bar_file.write(""); + let api_file = temp_dir.join("api.ts"); + api_file.write(""); + assert_eq!( + resolve(&api_dir.url_file()), + Some(SloppyImportsResolution::NoExtension(api_file.url_file())), + ); + } + } + + #[test] + fn test_sloppy_import_resolution_suggestion_message() { + // directory + assert_eq!( + SloppyImportsResolution::Directory( + Url::parse("file:///dir/index.js").unwrap() + ) + .as_suggestion_message(), + "Maybe specify path to 'index.js' file in directory instead" + ); + // no ext + assert_eq!( + SloppyImportsResolution::NoExtension( + Url::parse("file:///dir/index.mjs").unwrap() + ) + .as_suggestion_message(), + "Maybe add a '.mjs' extension" + ); + // js to ts + assert_eq!( + SloppyImportsResolution::JsToTs( + Url::parse("file:///dir/index.mts").unwrap() + ) + .as_suggestion_message(), + "Maybe change the extension to '.mts'" + ); + } +} diff --git a/ext/node_resolver/Cargo.toml b/resolvers/node/Cargo.toml similarity index 100% rename from ext/node_resolver/Cargo.toml rename to resolvers/node/Cargo.toml diff --git a/ext/node_resolver/README.md b/resolvers/node/README.md similarity index 100% rename from ext/node_resolver/README.md rename to resolvers/node/README.md diff --git a/ext/node_resolver/analyze.rs b/resolvers/node/analyze.rs similarity index 100% rename from ext/node_resolver/analyze.rs rename to resolvers/node/analyze.rs diff --git a/ext/node_resolver/clippy.toml b/resolvers/node/clippy.toml similarity index 100% rename from ext/node_resolver/clippy.toml rename to resolvers/node/clippy.toml diff --git a/ext/node_resolver/env.rs b/resolvers/node/env.rs similarity index 100% rename from ext/node_resolver/env.rs rename to resolvers/node/env.rs diff --git a/ext/node_resolver/errors.rs b/resolvers/node/errors.rs similarity index 100% rename from ext/node_resolver/errors.rs rename to resolvers/node/errors.rs diff --git a/ext/node_resolver/lib.rs b/resolvers/node/lib.rs similarity index 100% rename from ext/node_resolver/lib.rs rename to resolvers/node/lib.rs diff --git a/ext/node_resolver/npm.rs b/resolvers/node/npm.rs similarity index 100% rename from ext/node_resolver/npm.rs rename to resolvers/node/npm.rs diff --git a/ext/node_resolver/package_json.rs b/resolvers/node/package_json.rs similarity index 100% rename from ext/node_resolver/package_json.rs rename to resolvers/node/package_json.rs diff --git a/ext/node_resolver/path.rs b/resolvers/node/path.rs similarity index 100% rename from ext/node_resolver/path.rs rename to resolvers/node/path.rs diff --git a/ext/node_resolver/resolution.rs b/resolvers/node/resolution.rs similarity index 100% rename from ext/node_resolver/resolution.rs rename to resolvers/node/resolution.rs diff --git a/ext/node_resolver/sync.rs b/resolvers/node/sync.rs similarity index 100% rename from ext/node_resolver/sync.rs rename to resolvers/node/sync.rs From 183130ff31d49d4774dc9c6ca1098567b04b1bcf Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 29 Sep 2024 20:07:50 -0400 Subject: [PATCH 026/436] refactor: cleanup for creating worker structs (#25933) --- cli/factory.rs | 2 + cli/module_loader.rs | 5 +- cli/resolver.rs | 3 +- cli/worker.rs | 111 ++++++++++++++--------- runtime/examples/extension/main.rs | 25 +++++- runtime/web_worker.rs | 140 ++++++++++++++--------------- runtime/worker.rs | 140 +++++++++++++---------------- 7 files changed, 229 insertions(+), 197 deletions(-) diff --git a/cli/factory.rs b/cli/factory.rs index 5e525ee32bb2a5..770aeefa14d53f 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -782,6 +782,7 @@ impl CliFactory { let npm_resolver = self.npm_resolver().await?; let fs = self.fs(); let cli_node_resolver = self.cli_node_resolver().await?; + let cli_npm_resolver = self.npm_resolver().await?.clone(); let maybe_file_watcher_communicator = if cli_options.has_hmr() { Some(self.watcher_communicator.clone().unwrap()) } else { @@ -811,6 +812,7 @@ impl CliFactory { self.main_module_graph_container().await?.clone(), self.module_load_preparer().await?.clone(), cli_node_resolver.clone(), + cli_npm_resolver.clone(), NpmModuleLoader::new( self.cjs_resolutions().clone(), self.node_code_translator().await?.clone(), diff --git a/cli/module_loader.rs b/cli/module_loader.rs index f4e219bea12d01..293f41ddac96bc 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -23,6 +23,7 @@ use crate::graph_container::ModuleGraphUpdatePermit; use crate::graph_util::CreateGraphOptions; use crate::graph_util::ModuleGraphBuilder; use crate::node; +use crate::npm::CliNpmResolver; use crate::resolver::CliGraphResolver; use crate::resolver::CliNodeResolver; use crate::resolver::ModuleCodeStringSource; @@ -203,6 +204,7 @@ struct SharedCliModuleLoaderState { main_module_graph_container: Arc, module_load_preparer: Arc, node_resolver: Arc, + npm_resolver: Arc, npm_module_loader: NpmModuleLoader, parsed_source_cache: Arc, resolver: Arc, @@ -221,6 +223,7 @@ impl CliModuleLoaderFactory { main_module_graph_container: Arc, module_load_preparer: Arc, node_resolver: Arc, + npm_resolver: Arc, npm_module_loader: NpmModuleLoader, parsed_source_cache: Arc, resolver: Arc, @@ -241,6 +244,7 @@ impl CliModuleLoaderFactory { main_module_graph_container, module_load_preparer, node_resolver, + npm_resolver, npm_module_loader, parsed_source_cache, resolver, @@ -478,7 +482,6 @@ impl Some(Module::Npm(module)) => { let package_folder = self .shared - .node_resolver .npm_resolver .as_managed() .unwrap() // byonm won't create a Module::Npm diff --git a/cli/resolver.rs b/cli/resolver.rs index d6e14c39d0f84f..211f8aba1ca407 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -66,8 +66,7 @@ pub struct CliNodeResolver { cjs_resolutions: Arc, fs: Arc, node_resolver: Arc, - // todo(dsherret): remove this pub(crate) - pub(crate) npm_resolver: Arc, + npm_resolver: Arc, } impl CliNodeResolver { diff --git a/cli/worker.rs b/cli/worker.rs index c355d18bd5dec1..71bdfd661f50f9 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -34,8 +34,10 @@ use deno_runtime::ops::worker_host::CreateWebWorkerCb; use deno_runtime::permissions::RuntimePermissionDescriptorParser; use deno_runtime::web_worker::WebWorker; use deno_runtime::web_worker::WebWorkerOptions; +use deno_runtime::web_worker::WebWorkerServiceOptions; use deno_runtime::worker::MainWorker; use deno_runtime::worker::WorkerOptions; +use deno_runtime::worker::WorkerServiceOptions; use deno_runtime::BootstrapOptions; use deno_runtime::WorkerExecutionMode; use deno_runtime::WorkerLogLevel; @@ -570,6 +572,23 @@ impl CliMainWorkerFactory { } } + let services = WorkerServiceOptions { + root_cert_store_provider: Some(shared.root_cert_store_provider.clone()), + module_loader, + fs: shared.fs.clone(), + node_services: Some(shared.create_node_init_services()), + npm_process_state_provider: Some(shared.npm_process_state_provider()), + blob_store: shared.blob_store.clone(), + broadcast_channel: shared.broadcast_channel.clone(), + shared_array_buffer_store: Some(shared.shared_array_buffer_store.clone()), + compiled_wasm_module_store: Some( + shared.compiled_wasm_module_store.clone(), + ), + feature_checker, + permissions, + permission_desc_parser: shared.permission_desc_parser.clone(), + v8_code_cache: shared.code_cache.clone(), + }; let options = WorkerOptions { bootstrap: BootstrapOptions { deno_version: crate::version::DENO_VERSION_INFO.deno.to_string(), @@ -604,7 +623,6 @@ impl CliMainWorkerFactory { .options .unsafely_ignore_certificate_errors .clone(), - root_cert_store_provider: Some(shared.root_cert_store_provider.clone()), seed: shared.options.seed, format_js_error_fn: Some(Arc::new(format_js_error)), create_web_worker_cb, @@ -612,29 +630,16 @@ impl CliMainWorkerFactory { should_break_on_first_statement: shared.options.inspect_brk, should_wait_for_inspector_session: shared.options.inspect_wait, strace_ops: shared.options.strace_ops.clone(), - module_loader, - fs: shared.fs.clone(), - node_services: Some(shared.create_node_init_services()), - npm_process_state_provider: Some(shared.npm_process_state_provider()), get_error_class_fn: Some(&errors::get_error_class_name), cache_storage_dir, origin_storage_dir, - blob_store: shared.blob_store.clone(), - broadcast_channel: shared.broadcast_channel.clone(), - shared_array_buffer_store: Some(shared.shared_array_buffer_store.clone()), - compiled_wasm_module_store: Some( - shared.compiled_wasm_module_store.clone(), - ), stdio, - feature_checker, - permission_desc_parser: shared.permission_desc_parser.clone(), skip_op_registration: shared.options.skip_op_registration, - v8_code_cache: shared.code_cache.clone(), }; let mut worker = MainWorker::bootstrap_from_options( main_module.clone(), - permissions, + services, options, ); @@ -766,7 +771,27 @@ fn create_web_worker_callback( } } + let services = WebWorkerServiceOptions { + root_cert_store_provider: Some(shared.root_cert_store_provider.clone()), + module_loader, + fs: shared.fs.clone(), + node_services: Some(shared.create_node_init_services()), + blob_store: shared.blob_store.clone(), + broadcast_channel: shared.broadcast_channel.clone(), + shared_array_buffer_store: Some(shared.shared_array_buffer_store.clone()), + compiled_wasm_module_store: Some( + shared.compiled_wasm_module_store.clone(), + ), + maybe_inspector_server, + feature_checker, + permission_desc_parser: shared.permission_desc_parser.clone(), + npm_process_state_provider: Some(shared.npm_process_state_provider()), + permissions: args.permissions, + }; let options = WebWorkerOptions { + name: args.name, + main_module: args.main_module.clone(), + worker_id: args.worker_id, bootstrap: BootstrapOptions { deno_version: crate::version::DENO_VERSION_INFO.deno.to_string(), args: shared.options.argv.clone(), @@ -777,7 +802,7 @@ fn create_web_worker_callback( enable_op_summary_metrics: shared.options.enable_op_summary_metrics, enable_testing_features: shared.options.enable_testing_features, locale: deno_core::v8::icu::get_language_tag(), - location: Some(args.main_module.clone()), + location: Some(args.main_module), no_color: !colors::use_color(), color_level: colors::get_color_level(), is_stdout_tty: deno_terminal::is_stdout_tty(), @@ -799,39 +824,19 @@ fn create_web_worker_callback( .options .unsafely_ignore_certificate_errors .clone(), - root_cert_store_provider: Some(shared.root_cert_store_provider.clone()), seed: shared.options.seed, create_web_worker_cb, format_js_error_fn: Some(Arc::new(format_js_error)), - module_loader, - fs: shared.fs.clone(), - node_services: Some(shared.create_node_init_services()), worker_type: args.worker_type, - maybe_inspector_server, get_error_class_fn: Some(&errors::get_error_class_name), - blob_store: shared.blob_store.clone(), - broadcast_channel: shared.broadcast_channel.clone(), - shared_array_buffer_store: Some(shared.shared_array_buffer_store.clone()), - compiled_wasm_module_store: Some( - shared.compiled_wasm_module_store.clone(), - ), stdio: stdio.clone(), cache_storage_dir, - feature_checker, - permission_desc_parser: shared.permission_desc_parser.clone(), strace_ops: shared.options.strace_ops.clone(), close_on_idle: args.close_on_idle, maybe_worker_metadata: args.maybe_worker_metadata, - npm_process_state_provider: Some(shared.npm_process_state_provider()), }; - WebWorker::bootstrap_from_options( - args.name, - args.permissions, - args.main_module, - args.worker_id, - options, - ) + WebWorker::bootstrap_from_options(services, options) }) } @@ -841,23 +846,43 @@ fn create_web_worker_callback( mod tests { use super::*; use deno_core::resolve_path; + use deno_core::FsModuleLoader; use deno_fs::RealFs; use deno_runtime::deno_permissions::Permissions; fn create_test_worker() -> MainWorker { let main_module = resolve_path("./hello.js", &std::env::current_dir().unwrap()).unwrap(); - let permissions = PermissionsContainer::new( - Arc::new(RuntimePermissionDescriptorParser::new(Arc::new(RealFs))), - Permissions::none_without_prompt(), - ); - + let fs = Arc::new(RealFs); + let permission_desc_parser = + Arc::new(RuntimePermissionDescriptorParser::new(fs.clone())); let options = WorkerOptions { startup_snapshot: crate::js::deno_isolate_init(), ..Default::default() }; - MainWorker::bootstrap_from_options(main_module, permissions, options) + MainWorker::bootstrap_from_options( + main_module, + WorkerServiceOptions { + module_loader: Rc::new(FsModuleLoader), + permissions: PermissionsContainer::new( + permission_desc_parser.clone(), + Permissions::none_without_prompt(), + ), + blob_store: Default::default(), + broadcast_channel: Default::default(), + feature_checker: Default::default(), + node_services: Default::default(), + npm_process_state_provider: Default::default(), + permission_desc_parser, + root_cert_store_provider: Default::default(), + shared_array_buffer_store: Default::default(), + compiled_wasm_module_store: Default::default(), + v8_code_cache: Default::default(), + fs, + }, + options, + ) } #[tokio::test] diff --git a/runtime/examples/extension/main.rs b/runtime/examples/extension/main.rs index 6f4f02508b6bcf..71fbdfd6a02905 100644 --- a/runtime/examples/extension/main.rs +++ b/runtime/examples/extension/main.rs @@ -16,6 +16,7 @@ use deno_runtime::deno_permissions::PermissionsContainer; use deno_runtime::permissions::RuntimePermissionDescriptorParser; use deno_runtime::worker::MainWorker; use deno_runtime::worker::WorkerOptions; +use deno_runtime::worker::WorkerServiceOptions; #[op2(fast)] fn op_hello(#[string] text: &str) { @@ -35,13 +36,29 @@ async fn main() -> Result<(), AnyError> { Path::new(env!("CARGO_MANIFEST_DIR")).join("examples/extension/main.js"); let main_module = ModuleSpecifier::from_file_path(js_path).unwrap(); eprintln!("Running {main_module}..."); + let fs = Arc::new(RealFs); + let permission_desc_parser = + Arc::new(RuntimePermissionDescriptorParser::new(fs.clone())); let mut worker = MainWorker::bootstrap_from_options( main_module.clone(), - PermissionsContainer::allow_all(Arc::new( - RuntimePermissionDescriptorParser::new(Arc::new(RealFs)), - )), - WorkerOptions { + WorkerServiceOptions { module_loader: Rc::new(FsModuleLoader), + permissions: PermissionsContainer::allow_all( + permission_desc_parser.clone(), + ), + blob_store: Default::default(), + broadcast_channel: Default::default(), + feature_checker: Default::default(), + node_services: Default::default(), + npm_process_state_provider: Default::default(), + permission_desc_parser, + root_cert_store_provider: Default::default(), + shared_array_buffer_store: Default::default(), + compiled_wasm_module_store: Default::default(), + v8_code_cache: Default::default(), + fs, + }, + WorkerOptions { extensions: vec![hello_runtime::init_ops_and_esm()], ..Default::default() }, diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 8892d5bc6e448a..f13516268fba4e 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -337,6 +337,42 @@ fn create_handles( (internal_handle, external_handle) } +pub struct WebWorkerServiceOptions { + pub blob_store: Arc, + pub broadcast_channel: InMemoryBroadcastChannel, + pub compiled_wasm_module_store: Option, + pub feature_checker: Arc, + pub fs: Arc, + pub maybe_inspector_server: Option>, + pub module_loader: Rc, + pub node_services: Option, + pub npm_process_state_provider: Option, + pub permissions: PermissionsContainer, + pub permission_desc_parser: Arc, + pub root_cert_store_provider: Option>, + pub shared_array_buffer_store: Option, +} + +pub struct WebWorkerOptions { + pub name: String, + pub main_module: ModuleSpecifier, + pub worker_id: WorkerId, + pub bootstrap: BootstrapOptions, + pub extensions: Vec, + pub startup_snapshot: Option<&'static [u8]>, + pub unsafely_ignore_certificate_errors: Option>, + pub seed: Option, + pub create_web_worker_cb: Arc, + pub format_js_error_fn: Option>, + pub worker_type: WebWorkerType, + pub get_error_class_fn: Option, + pub cache_storage_dir: Option, + pub stdio: Stdio, + pub strace_ops: Option>, + pub close_on_idle: bool, + pub maybe_worker_metadata: Option, +} + /// This struct is an implementation of `Worker` Web API /// /// Each `WebWorker` is either a child of `MainWorker` or other @@ -357,58 +393,21 @@ pub struct WebWorker { maybe_worker_metadata: Option, } -pub struct WebWorkerOptions { - // todo(dsherret): extract out the service structs from this options bag - pub bootstrap: BootstrapOptions, - pub extensions: Vec, - pub startup_snapshot: Option<&'static [u8]>, - pub unsafely_ignore_certificate_errors: Option>, - pub root_cert_store_provider: Option>, - pub seed: Option, - pub fs: Arc, - pub module_loader: Rc, - pub node_services: Option, - pub create_web_worker_cb: Arc, - pub format_js_error_fn: Option>, - pub worker_type: WebWorkerType, - pub maybe_inspector_server: Option>, - pub get_error_class_fn: Option, - pub blob_store: Arc, - pub broadcast_channel: InMemoryBroadcastChannel, - pub shared_array_buffer_store: Option, - pub compiled_wasm_module_store: Option, - pub cache_storage_dir: Option, - pub stdio: Stdio, - pub feature_checker: Arc, - pub permission_desc_parser: Arc, - pub strace_ops: Option>, - pub close_on_idle: bool, - pub maybe_worker_metadata: Option, - pub npm_process_state_provider: Option, -} - impl WebWorker { pub fn bootstrap_from_options( - name: String, - permissions: PermissionsContainer, - main_module: ModuleSpecifier, - worker_id: WorkerId, + services: WebWorkerServiceOptions, options: WebWorkerOptions, ) -> (Self, SendableWebWorkerHandle) { - let bootstrap_options = options.bootstrap.clone(); - let (mut worker, handle) = - Self::from_options(name, permissions, main_module, worker_id, options); + let (mut worker, handle, bootstrap_options) = + Self::from_options(services, options); worker.bootstrap(&bootstrap_options); (worker, handle) } - pub fn from_options( - name: String, - permissions: PermissionsContainer, - main_module: ModuleSpecifier, - worker_id: WorkerId, + fn from_options( + services: WebWorkerServiceOptions, mut options: WebWorkerOptions, - ) -> (Self, SendableWebWorkerHandle) { + ) -> (Self, SendableWebWorkerHandle, BootstrapOptions) { deno_core::extension!(deno_permissions_web_worker, options = { permissions: PermissionsContainer, @@ -436,15 +435,15 @@ impl WebWorker { deno_console::deno_console::init_ops_and_esm(), deno_url::deno_url::init_ops_and_esm(), deno_web::deno_web::init_ops_and_esm::( - options.blob_store.clone(), - Some(main_module.clone()), + services.blob_store, + Some(options.main_module.clone()), ), deno_webgpu::deno_webgpu::init_ops_and_esm(), deno_canvas::deno_canvas::init_ops_and_esm(), deno_fetch::deno_fetch::init_ops_and_esm::( deno_fetch::Options { user_agent: options.bootstrap.user_agent.clone(), - root_cert_store_provider: options.root_cert_store_provider.clone(), + root_cert_store_provider: services.root_cert_store_provider.clone(), unsafely_ignore_certificate_errors: options .unsafely_ignore_certificate_errors .clone(), @@ -457,17 +456,17 @@ impl WebWorker { ), deno_websocket::deno_websocket::init_ops_and_esm::( options.bootstrap.user_agent.clone(), - options.root_cert_store_provider.clone(), + services.root_cert_store_provider.clone(), options.unsafely_ignore_certificate_errors.clone(), ), deno_webstorage::deno_webstorage::init_ops_and_esm(None).disable(), deno_crypto::deno_crypto::init_ops_and_esm(options.seed), deno_broadcast_channel::deno_broadcast_channel::init_ops_and_esm( - options.broadcast_channel.clone(), + services.broadcast_channel, ), deno_ffi::deno_ffi::init_ops_and_esm::(), deno_net::deno_net::init_ops_and_esm::( - options.root_cert_store_provider.clone(), + services.root_cert_store_provider.clone(), options.unsafely_ignore_certificate_errors.clone(), ), deno_tls::deno_tls::init_ops_and_esm(), @@ -477,7 +476,7 @@ impl WebWorker { options.seed, deno_kv::remote::HttpOptions { user_agent: options.bootstrap.user_agent.clone(), - root_cert_store_provider: options.root_cert_store_provider.clone(), + root_cert_store_provider: services.root_cert_store_provider, unsafely_ignore_certificate_errors: options .unsafely_ignore_certificate_errors .clone(), @@ -492,25 +491,25 @@ impl WebWorker { deno_http::deno_http::init_ops_and_esm::(), deno_io::deno_io::init_ops_and_esm(Some(options.stdio)), deno_fs::deno_fs::init_ops_and_esm::( - options.fs.clone(), + services.fs.clone(), ), deno_node::deno_node::init_ops_and_esm::( - options.node_services, - options.fs, + services.node_services, + services.fs, ), // Runtime ops that are always initialized for WebWorkers - ops::runtime::deno_runtime::init_ops_and_esm(main_module.clone()), + ops::runtime::deno_runtime::init_ops_and_esm(options.main_module.clone()), ops::worker_host::deno_worker_host::init_ops_and_esm( - options.create_web_worker_cb.clone(), - options.format_js_error_fn.clone(), + options.create_web_worker_cb, + options.format_js_error_fn, ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os_worker::init_ops_and_esm(), ops::permissions::deno_permissions::init_ops_and_esm( - options.permission_desc_parser.clone(), + services.permission_desc_parser, ), ops::process::deno_process::init_ops_and_esm( - options.npm_process_state_provider, + services.npm_process_state_provider, ), ops::signal::deno_signal::init_ops_and_esm(), ops::tty::deno_tty::init_ops_and_esm(), @@ -523,7 +522,7 @@ impl WebWorker { }, ), deno_permissions_web_worker::init_ops_and_esm( - permissions, + services.permissions, enable_testing_features, ), runtime::init_ops_and_esm(), @@ -556,17 +555,17 @@ impl WebWorker { ); let mut js_runtime = JsRuntime::new(RuntimeOptions { - module_loader: Some(options.module_loader.clone()), + module_loader: Some(services.module_loader), startup_snapshot: options.startup_snapshot, get_error_class_fn: options.get_error_class_fn, - shared_array_buffer_store: options.shared_array_buffer_store.clone(), - compiled_wasm_module_store: options.compiled_wasm_module_store.clone(), + shared_array_buffer_store: services.shared_array_buffer_store, + compiled_wasm_module_store: services.compiled_wasm_module_store, extensions, extension_transpiler: Some(Rc::new(|specifier, source| { maybe_transpile_source(specifier, source) })), - inspector: options.maybe_inspector_server.is_some(), - feature_checker: Some(options.feature_checker.clone()), + inspector: services.maybe_inspector_server.is_some(), + feature_checker: Some(services.feature_checker), op_metrics_factory_fn, import_meta_resolve_callback: Some(Box::new( import_meta_resolve_callback, @@ -582,9 +581,9 @@ impl WebWorker { js_runtime.op_state().borrow_mut().put(op_summary_metrics); } - if let Some(server) = options.maybe_inspector_server.clone() { + if let Some(server) = services.maybe_inspector_server { server.register_inspector( - main_module.to_string(), + options.main_module.to_string(), &mut js_runtime, false, ); @@ -599,7 +598,7 @@ impl WebWorker { let (internal_handle, external_handle) = { let handle = js_runtime.v8_isolate().thread_safe_handle(); let (internal_handle, external_handle) = - create_handles(handle, name.clone(), options.worker_type); + create_handles(handle, options.name.clone(), options.worker_type); let op_state = js_runtime.op_state(); let mut op_state = op_state.borrow_mut(); op_state.put(internal_handle.clone()); @@ -630,12 +629,12 @@ impl WebWorker { ( Self { - id: worker_id, + id: options.worker_id, js_runtime, - name, + name: options.name, internal_handle, worker_type: options.worker_type, - main_module, + main_module: options.main_module, poll_for_messages_fn: None, has_message_event_listener_fn: None, bootstrap_fn_global: Some(bootstrap_fn_global), @@ -644,6 +643,7 @@ impl WebWorker { maybe_worker_metadata: options.maybe_worker_metadata, }, external_handle, + options.bootstrap, ) } diff --git a/runtime/worker.rs b/runtime/worker.rs index f72e6d7c09d4ea..3ce5562fa2f5c9 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -19,7 +19,6 @@ use deno_core::v8; use deno_core::CompiledWasmModuleStore; use deno_core::Extension; use deno_core::FeatureChecker; -use deno_core::FsModuleLoader; use deno_core::GetErrorClassFn; use deno_core::JsRuntime; use deno_core::LocalInspectorSession; @@ -50,7 +49,6 @@ use crate::code_cache::CodeCacheType; use crate::inspector_server::InspectorServer; use crate::ops; use crate::ops::process::NpmProcessStateProviderRc; -use crate::permissions::RuntimePermissionDescriptorParser; use crate::shared::maybe_transpile_source; use crate::shared::runtime; use crate::BootstrapOptions; @@ -128,6 +126,43 @@ pub struct MainWorker { dispatch_process_exit_event_fn_global: v8::Global, } +pub struct WorkerServiceOptions { + pub blob_store: Arc, + pub broadcast_channel: InMemoryBroadcastChannel, + pub feature_checker: Arc, + pub fs: Arc, + /// Implementation of `ModuleLoader` which will be + /// called when V8 requests to load ES modules. + /// + /// If not provided runtime will error if code being + /// executed tries to load modules. + pub module_loader: Rc, + pub node_services: Option, + pub npm_process_state_provider: Option, + pub permission_desc_parser: + Arc, + pub permissions: PermissionsContainer, + pub root_cert_store_provider: Option>, + + /// The store to use for transferring SharedArrayBuffers between isolates. + /// If multiple isolates should have the possibility of sharing + /// SharedArrayBuffers, they should use the same [SharedArrayBufferStore]. If + /// no [SharedArrayBufferStore] is specified, SharedArrayBuffer can not be + /// serialized. + pub shared_array_buffer_store: Option, + + /// The store to use for transferring `WebAssembly.Module` objects between + /// isolates. + /// If multiple isolates should have the possibility of sharing + /// `WebAssembly.Module` objects, they should use the same + /// [CompiledWasmModuleStore]. If no [CompiledWasmModuleStore] is specified, + /// `WebAssembly.Module` objects cannot be serialized. + pub compiled_wasm_module_store: Option, + + /// V8 code cache for module and script source code. + pub v8_code_cache: Option>, +} + pub struct WorkerOptions { pub bootstrap: BootstrapOptions, @@ -148,20 +183,8 @@ pub struct WorkerOptions { pub create_params: Option, pub unsafely_ignore_certificate_errors: Option>, - pub root_cert_store_provider: Option>, pub seed: Option, - pub fs: Arc, - /// Implementation of `ModuleLoader` which will be - /// called when V8 requests to load ES modules. - /// - /// If not provided runtime will error if code being - /// executed tries to load modules. - pub module_loader: Rc, - pub node_services: Option, - pub npm_process_state_provider: Option, - pub permission_desc_parser: - Arc, // Callbacks invoked when creating new instance of WebWorker pub create_web_worker_cb: Arc, pub format_js_error_fn: Option>, @@ -182,69 +205,31 @@ pub struct WorkerOptions { pub get_error_class_fn: Option, pub cache_storage_dir: Option, pub origin_storage_dir: Option, - pub blob_store: Arc, - pub broadcast_channel: InMemoryBroadcastChannel, - - /// The store to use for transferring SharedArrayBuffers between isolates. - /// If multiple isolates should have the possibility of sharing - /// SharedArrayBuffers, they should use the same [SharedArrayBufferStore]. If - /// no [SharedArrayBufferStore] is specified, SharedArrayBuffer can not be - /// serialized. - pub shared_array_buffer_store: Option, - - /// The store to use for transferring `WebAssembly.Module` objects between - /// isolates. - /// If multiple isolates should have the possibility of sharing - /// `WebAssembly.Module` objects, they should use the same - /// [CompiledWasmModuleStore]. If no [CompiledWasmModuleStore] is specified, - /// `WebAssembly.Module` objects cannot be serialized. - pub compiled_wasm_module_store: Option, pub stdio: Stdio, - pub feature_checker: Arc, - - /// V8 code cache for module and script source code. - pub v8_code_cache: Option>, } -// todo(dsherret): this is error prone to use. We should separate -// out the WorkerOptions from the services. impl Default for WorkerOptions { fn default() -> Self { - let real_fs = Arc::new(deno_fs::RealFs); Self { create_web_worker_cb: Arc::new(|_| { unimplemented!("web workers are not supported") }), - fs: real_fs.clone(), - module_loader: Rc::new(FsModuleLoader), skip_op_registration: false, seed: None, unsafely_ignore_certificate_errors: Default::default(), should_break_on_first_statement: Default::default(), should_wait_for_inspector_session: Default::default(), strace_ops: Default::default(), - compiled_wasm_module_store: Default::default(), - shared_array_buffer_store: Default::default(), maybe_inspector_server: Default::default(), format_js_error_fn: Default::default(), get_error_class_fn: Default::default(), origin_storage_dir: Default::default(), cache_storage_dir: Default::default(), - broadcast_channel: Default::default(), - root_cert_store_provider: Default::default(), - node_services: Default::default(), - blob_store: Default::default(), extensions: Default::default(), startup_snapshot: Default::default(), create_params: Default::default(), - npm_process_state_provider: Default::default(), bootstrap: Default::default(), stdio: Default::default(), - feature_checker: Default::default(), - permission_desc_parser: Arc::new(RuntimePermissionDescriptorParser::new( - real_fs, - )), - v8_code_cache: Default::default(), } } } @@ -318,20 +303,20 @@ pub fn create_op_metrics( impl MainWorker { pub fn bootstrap_from_options( main_module: ModuleSpecifier, - permissions: PermissionsContainer, + services: WorkerServiceOptions, options: WorkerOptions, ) -> Self { - let bootstrap_options = options.bootstrap.clone(); - let mut worker = Self::from_options(main_module, permissions, options); + let (mut worker, bootstrap_options) = + Self::from_options(main_module, services, options); worker.bootstrap(bootstrap_options); worker } - pub fn from_options( + fn from_options( main_module: ModuleSpecifier, - permissions: PermissionsContainer, + services: WorkerServiceOptions, mut options: WorkerOptions, - ) -> Self { + ) -> (Self, BootstrapOptions) { deno_core::extension!(deno_permissions_worker, options = { permissions: PermissionsContainer, @@ -365,7 +350,7 @@ impl MainWorker { deno_console::deno_console::init_ops_and_esm(), deno_url::deno_url::init_ops_and_esm(), deno_web::deno_web::init_ops_and_esm::( - options.blob_store.clone(), + services.blob_store.clone(), options.bootstrap.location.clone(), ), deno_webgpu::deno_webgpu::init_ops_and_esm(), @@ -373,7 +358,7 @@ impl MainWorker { deno_fetch::deno_fetch::init_ops_and_esm::( deno_fetch::Options { user_agent: options.bootstrap.user_agent.clone(), - root_cert_store_provider: options.root_cert_store_provider.clone(), + root_cert_store_provider: services.root_cert_store_provider.clone(), unsafely_ignore_certificate_errors: options .unsafely_ignore_certificate_errors .clone(), @@ -386,7 +371,7 @@ impl MainWorker { ), deno_websocket::deno_websocket::init_ops_and_esm::( options.bootstrap.user_agent.clone(), - options.root_cert_store_provider.clone(), + services.root_cert_store_provider.clone(), options.unsafely_ignore_certificate_errors.clone(), ), deno_webstorage::deno_webstorage::init_ops_and_esm( @@ -394,11 +379,11 @@ impl MainWorker { ), deno_crypto::deno_crypto::init_ops_and_esm(options.seed), deno_broadcast_channel::deno_broadcast_channel::init_ops_and_esm( - options.broadcast_channel.clone(), + services.broadcast_channel.clone(), ), deno_ffi::deno_ffi::init_ops_and_esm::(), deno_net::deno_net::init_ops_and_esm::( - options.root_cert_store_provider.clone(), + services.root_cert_store_provider.clone(), options.unsafely_ignore_certificate_errors.clone(), ), deno_tls::deno_tls::init_ops_and_esm(), @@ -408,7 +393,7 @@ impl MainWorker { options.seed, deno_kv::remote::HttpOptions { user_agent: options.bootstrap.user_agent.clone(), - root_cert_store_provider: options.root_cert_store_provider.clone(), + root_cert_store_provider: services.root_cert_store_provider.clone(), unsafely_ignore_certificate_errors: options .unsafely_ignore_certificate_errors .clone(), @@ -423,11 +408,11 @@ impl MainWorker { deno_http::deno_http::init_ops_and_esm::(), deno_io::deno_io::init_ops_and_esm(Some(options.stdio)), deno_fs::deno_fs::init_ops_and_esm::( - options.fs.clone(), + services.fs.clone(), ), deno_node::deno_node::init_ops_and_esm::( - options.node_services, - options.fs, + services.node_services, + services.fs, ), // Ops from this crate ops::runtime::deno_runtime::init_ops_and_esm(main_module.clone()), @@ -438,10 +423,10 @@ impl MainWorker { ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os::init_ops_and_esm(exit_code.clone()), ops::permissions::deno_permissions::init_ops_and_esm( - options.permission_desc_parser, + services.permission_desc_parser, ), ops::process::deno_process::init_ops_and_esm( - options.npm_process_state_provider, + services.npm_process_state_provider, ), ops::signal::deno_signal::init_ops_and_esm(), ops::tty::deno_tty::init_ops_and_esm(), @@ -454,7 +439,7 @@ impl MainWorker { }, ), deno_permissions_worker::init_ops_and_esm( - permissions, + services.permissions, enable_testing_features, ), runtime::init_ops_and_esm(), @@ -494,20 +479,20 @@ impl MainWorker { }); let mut js_runtime = JsRuntime::new(RuntimeOptions { - module_loader: Some(options.module_loader.clone()), + module_loader: Some(services.module_loader.clone()), startup_snapshot: options.startup_snapshot, create_params: options.create_params, skip_op_registration: options.skip_op_registration, get_error_class_fn: options.get_error_class_fn, - shared_array_buffer_store: options.shared_array_buffer_store.clone(), - compiled_wasm_module_store: options.compiled_wasm_module_store.clone(), + shared_array_buffer_store: services.shared_array_buffer_store.clone(), + compiled_wasm_module_store: services.compiled_wasm_module_store.clone(), extensions, extension_transpiler: Some(Rc::new(|specifier, source| { maybe_transpile_source(specifier, source) })), inspector: options.maybe_inspector_server.is_some(), is_main: true, - feature_checker: Some(options.feature_checker.clone()), + feature_checker: Some(services.feature_checker.clone()), op_metrics_factory_fn, wait_for_inspector_disconnect_callback: Some( wait_for_inspector_disconnect_callback, @@ -519,7 +504,7 @@ impl MainWorker { validate_import_attributes_callback, )), import_assertions_support: deno_core::ImportAssertionsSupport::Error, - eval_context_code_cache_cbs: options.v8_code_cache.map(|cache| { + eval_context_code_cache_cbs: services.v8_code_cache.map(|cache| { let cache_clone = cache.clone(); ( Box::new(move |specifier: &ModuleSpecifier, code: &v8::String| { @@ -666,7 +651,7 @@ impl MainWorker { ) }; - Self { + let worker = Self { js_runtime, should_break_on_first_statement: options.should_break_on_first_statement, should_wait_for_inspector_session: options @@ -678,7 +663,8 @@ impl MainWorker { dispatch_unload_event_fn_global, dispatch_process_beforeexit_event_fn_global, dispatch_process_exit_event_fn_global, - } + }; + (worker, options.bootstrap) } pub fn bootstrap(&mut self, options: BootstrapOptions) { From efb413bdaa0f5be6d9082d397aae1e20a258c85f Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 30 Sep 2024 17:10:51 +0530 Subject: [PATCH 027/436] fix: update sui to 0.4 (#25942) Properly apply offset fixup to `LC_DYLD_EXPORTS_TRIE` load commands. This should fix Node-API symbols not resolving in RC releases. Fixes https://github.com/denoland/deno/issues/25879 Fixes https://github.com/denoland/deno/issues/25940 Ref https://github.com/denoland/sui/commit/2b3a33bb6e1afbb04e2e1d345547e5686894e7f0 --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bdde5d5410f344..b4dafacdd2f52c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4174,9 +4174,9 @@ dependencies = [ [[package]] name = "libsui" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e39af24eff8df7c8b9980ef56a1a1f4d2e77b34b2d5c0529f108c53ae96a7a" +checksum = "205eca4e7beaad637dcd38fe41292065894ee7f498077cf3c135d5f7252b9f27" dependencies = [ "editpe", "libc", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 32e0651b2f95b9..5fb32deb7fbcde 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -80,7 +80,7 @@ deno_semver.workspace = true deno_task_shell = "=0.17.0" deno_terminal.workspace = true eszip = "=0.78.0" -libsui = "0.3.1" +libsui = "0.4.0" napi_sym.workspace = true node_resolver.workspace = true From c8f692057b256dac57342867b7606a74309449fc Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 30 Sep 2024 09:19:24 -0400 Subject: [PATCH 028/436] refactor: bury descriptor parsing in PermissionsContainer (#25936) Closes https://github.com/denoland/deno/issues/25634 --- cli/args/flags.rs | 6 +- cli/factory.rs | 1 - cli/ops/bench.rs | 18 +- cli/ops/testing.rs | 18 +- cli/standalone/mod.rs | 3 - cli/worker.rs | 10 +- runtime/examples/extension/main.rs | 5 +- runtime/ops/permissions.rs | 198 +-------- runtime/ops/worker_host.rs | 13 +- runtime/permissions.rs | 2 +- runtime/permissions/lib.rs | 688 +++++++++++++++++++++-------- runtime/snapshot.rs | 5 +- runtime/web_worker.rs | 32 +- runtime/worker.rs | 6 +- 14 files changed, 563 insertions(+), 442 deletions(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 13c93fa83132a0..2cbf4639485f8b 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -34,8 +34,8 @@ use deno_core::url::Url; use deno_graph::GraphKind; use deno_path_util::normalize_path; use deno_path_util::url_to_file_path; -use deno_runtime::deno_permissions::parse_sys_kind; use deno_runtime::deno_permissions::PermissionsOptions; +use deno_runtime::deno_permissions::SysDescriptor; use log::debug; use log::Level; use serde::Deserialize; @@ -3448,7 +3448,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { .require_equals(true) .value_name("API_NAME") .help("Allow access to OS information. Optionally allow specific APIs by function name") - .value_parser(|key: &str| parse_sys_kind(key).map(ToString::to_string)) + .value_parser(|key: &str| SysDescriptor::parse(key.to_string()).map(|s| s.into_string())) .hide(true) ; if let Some(requires) = requires { @@ -3466,7 +3466,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { .require_equals(true) .value_name("API_NAME") .help("Deny access to OS information. Optionally deny specific APIs by function name") - .value_parser(|key: &str| parse_sys_kind(key).map(ToString::to_string)) + .value_parser(|key: &str| SysDescriptor::parse(key.to_string()).map(|s| s.into_string())) .hide(true) ; if let Some(requires) = requires { diff --git a/cli/factory.rs b/cli/factory.rs index 770aeefa14d53f..ffe7f8d2f73e9c 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -824,7 +824,6 @@ impl CliFactory { )), node_resolver.clone(), npm_resolver.clone(), - self.permission_desc_parser()?.clone(), self.root_cert_store_provider().clone(), self.root_permissions_container()?.clone(), StorageKeyResolver::from_options(cli_options), diff --git a/cli/ops/bench.rs b/cli/ops/bench.rs index edd8c118caff51..5d1e6e746d8edf 100644 --- a/cli/ops/bench.rs +++ b/cli/ops/bench.rs @@ -2,7 +2,6 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; -use std::sync::Arc; use std::time; use deno_core::error::generic_error; @@ -12,9 +11,7 @@ use deno_core::op2; use deno_core::v8; use deno_core::ModuleSpecifier; use deno_core::OpState; -use deno_runtime::deno_permissions::create_child_permissions; use deno_runtime::deno_permissions::ChildPermissionsArg; -use deno_runtime::deno_permissions::PermissionDescriptorParser; use deno_runtime::deno_permissions::PermissionsContainer; use tokio::sync::mpsc::UnboundedSender; use uuid::Uuid; @@ -61,19 +58,8 @@ pub fn op_pledge_test_permissions( #[serde] args: ChildPermissionsArg, ) -> Result { let token = Uuid::new_v4(); - let permission_desc_parser = state - .borrow::>() - .clone(); let parent_permissions = state.borrow_mut::(); - let worker_permissions = { - let mut parent_permissions = parent_permissions.inner.lock(); - let perms = create_child_permissions( - permission_desc_parser.as_ref(), - &mut parent_permissions, - args, - )?; - PermissionsContainer::new(permission_desc_parser, perms) - }; + let worker_permissions = parent_permissions.create_child_permissions(args)?; let parent_permissions = parent_permissions.clone(); if state.try_take::().is_some() { @@ -83,7 +69,6 @@ pub fn op_pledge_test_permissions( state.put::(PermissionsHolder(token, parent_permissions)); // NOTE: This call overrides current permission set for the worker - state.put(worker_permissions.inner.clone()); state.put::(worker_permissions); Ok(token) @@ -100,7 +85,6 @@ pub fn op_restore_test_permissions( } let permissions = permissions_holder.1; - state.put(permissions.inner.clone()); state.put::(permissions); Ok(()) } else { diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs index 6a8d31006298b8..c3f469656c4b72 100644 --- a/cli/ops/testing.rs +++ b/cli/ops/testing.rs @@ -16,13 +16,10 @@ use deno_core::op2; use deno_core::v8; use deno_core::ModuleSpecifier; use deno_core::OpState; -use deno_runtime::deno_permissions::create_child_permissions; use deno_runtime::deno_permissions::ChildPermissionsArg; -use deno_runtime::deno_permissions::PermissionDescriptorParser; use deno_runtime::deno_permissions::PermissionsContainer; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; -use std::sync::Arc; use uuid::Uuid; deno_core::extension!(deno_test, @@ -56,19 +53,8 @@ pub fn op_pledge_test_permissions( #[serde] args: ChildPermissionsArg, ) -> Result { let token = Uuid::new_v4(); - let permission_desc_parser = state - .borrow::>() - .clone(); let parent_permissions = state.borrow_mut::(); - let worker_permissions = { - let mut parent_permissions = parent_permissions.inner.lock(); - let perms = create_child_permissions( - permission_desc_parser.as_ref(), - &mut parent_permissions, - args, - )?; - PermissionsContainer::new(permission_desc_parser, perms) - }; + let worker_permissions = parent_permissions.create_child_permissions(args)?; let parent_permissions = parent_permissions.clone(); if state.try_take::().is_some() { @@ -77,7 +63,6 @@ pub fn op_pledge_test_permissions( state.put::(PermissionsHolder(token, parent_permissions)); // NOTE: This call overrides current permission set for the worker - state.put(worker_permissions.inner.clone()); state.put::(worker_permissions); Ok(token) @@ -94,7 +79,6 @@ pub fn op_restore_test_permissions( } let permissions = permissions_holder.1; - state.put(permissions.inner.clone()); state.put::(permissions); Ok(()) } else { diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 93ac6002bfd708..56f76ffb9b16c8 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -693,8 +693,6 @@ pub async fn run( } checker }); - let permission_desc_parser = - Arc::new(RuntimePermissionDescriptorParser::new(fs.clone())); let worker_factory = CliMainWorkerFactory::new( Arc::new(BlobStore::default()), // Code cache is not supported for standalone binary yet. @@ -707,7 +705,6 @@ pub async fn run( Box::new(module_loader_factory), node_resolver, npm_resolver, - permission_desc_parser, root_cert_store_provider, permissions, StorageKeyResolver::empty(), diff --git a/cli/worker.rs b/cli/worker.rs index 71bdfd661f50f9..cc18c0d1547d04 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -31,7 +31,6 @@ use deno_runtime::fmt_errors::format_js_error; use deno_runtime::inspector_server::InspectorServer; use deno_runtime::ops::process::NpmProcessStateProviderRc; use deno_runtime::ops::worker_host::CreateWebWorkerCb; -use deno_runtime::permissions::RuntimePermissionDescriptorParser; use deno_runtime::web_worker::WebWorker; use deno_runtime::web_worker::WebWorkerOptions; use deno_runtime::web_worker::WebWorkerServiceOptions; @@ -136,7 +135,6 @@ struct SharedWorkerState { module_loader_factory: Box, node_resolver: Arc, npm_resolver: Arc, - permission_desc_parser: Arc, root_cert_store_provider: Arc, root_permissions: PermissionsContainer, shared_array_buffer_store: SharedArrayBufferStore, @@ -433,7 +431,6 @@ impl CliMainWorkerFactory { module_loader_factory: Box, node_resolver: Arc, npm_resolver: Arc, - permission_parser: Arc, root_cert_store_provider: Arc, root_permissions: PermissionsContainer, storage_key_resolver: StorageKeyResolver, @@ -454,7 +451,6 @@ impl CliMainWorkerFactory { module_loader_factory, node_resolver, npm_resolver, - permission_desc_parser: permission_parser, root_cert_store_provider, root_permissions, shared_array_buffer_store: Default::default(), @@ -586,7 +582,6 @@ impl CliMainWorkerFactory { ), feature_checker, permissions, - permission_desc_parser: shared.permission_desc_parser.clone(), v8_code_cache: shared.code_cache.clone(), }; let options = WorkerOptions { @@ -784,7 +779,6 @@ fn create_web_worker_callback( ), maybe_inspector_server, feature_checker, - permission_desc_parser: shared.permission_desc_parser.clone(), npm_process_state_provider: Some(shared.npm_process_state_provider()), permissions: args.permissions, }; @@ -849,6 +843,7 @@ mod tests { use deno_core::FsModuleLoader; use deno_fs::RealFs; use deno_runtime::deno_permissions::Permissions; + use deno_runtime::permissions::RuntimePermissionDescriptorParser; fn create_test_worker() -> MainWorker { let main_module = @@ -866,7 +861,7 @@ mod tests { WorkerServiceOptions { module_loader: Rc::new(FsModuleLoader), permissions: PermissionsContainer::new( - permission_desc_parser.clone(), + permission_desc_parser, Permissions::none_without_prompt(), ), blob_store: Default::default(), @@ -874,7 +869,6 @@ mod tests { feature_checker: Default::default(), node_services: Default::default(), npm_process_state_provider: Default::default(), - permission_desc_parser, root_cert_store_provider: Default::default(), shared_array_buffer_store: Default::default(), compiled_wasm_module_store: Default::default(), diff --git a/runtime/examples/extension/main.rs b/runtime/examples/extension/main.rs index 71fbdfd6a02905..9889b28dcf073f 100644 --- a/runtime/examples/extension/main.rs +++ b/runtime/examples/extension/main.rs @@ -43,15 +43,12 @@ async fn main() -> Result<(), AnyError> { main_module.clone(), WorkerServiceOptions { module_loader: Rc::new(FsModuleLoader), - permissions: PermissionsContainer::allow_all( - permission_desc_parser.clone(), - ), + permissions: PermissionsContainer::allow_all(permission_desc_parser), blob_store: Default::default(), broadcast_channel: Default::default(), feature_checker: Default::default(), node_services: Default::default(), npm_process_state_provider: Default::default(), - permission_desc_parser, root_cert_store_provider: Default::default(), shared_array_buffer_store: Default::default(), compiled_wasm_module_store: Default::default(), diff --git a/runtime/ops/permissions.rs b/runtime/ops/permissions.rs index 9b46dd0193564e..1dbc85259637a0 100644 --- a/runtime/ops/permissions.rs +++ b/runtime/ops/permissions.rs @@ -1,7 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use ::deno_permissions::parse_sys_kind; -use ::deno_permissions::PermissionDescriptorParser; use ::deno_permissions::PermissionState; use ::deno_permissions::PermissionsContainer; use deno_core::error::custom_error; @@ -10,7 +8,6 @@ use deno_core::op2; use deno_core::OpState; use serde::Deserialize; use serde::Serialize; -use std::sync::Arc; deno_core::extension!( deno_permissions, @@ -19,12 +16,6 @@ deno_core::extension!( op_revoke_permission, op_request_permission, ], - options = { - permission_desc_parser: Arc, - }, - state = |state, options| { - state.put(options.permission_desc_parser); - }, ); #[derive(Deserialize)] @@ -62,62 +53,15 @@ pub fn op_query_permission( state: &mut OpState, #[serde] args: PermissionArgs, ) -> Result { - let permissions_container = state.borrow::(); - // todo(dsherret): don't have this function use the properties of - // permission container - let desc_parser = &permissions_container.descriptor_parser; - let permissions = permissions_container.inner.lock(); - let path = args.path.as_deref(); + let permissions = state.borrow::(); let perm = match args.name.as_ref() { - "read" => permissions.read.query( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_read(), - ) - }) - .transpose()? - .as_ref(), - ), - "write" => permissions.write.query( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_write(), - ) - }) - .transpose()? - .as_ref(), - ), - "net" => permissions.net.query( - match args.host.as_deref() { - None => None, - Some(h) => Some(desc_parser.parse_net_descriptor(h)?), - } - .as_ref(), - ), - "env" => permissions.env.query(args.variable.as_deref()), - "sys" => permissions - .sys - .query(args.kind.as_deref().map(parse_sys_kind).transpose()?), - "run" => permissions.run.query( - args - .command - .as_deref() - .map(|request| desc_parser.parse_run_query(request)) - .transpose()? - .as_ref(), - ), - "ffi" => permissions.ffi.query( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_ffi(), - ) - }) - .transpose()? - .as_ref(), - ), + "read" => permissions.query_read(args.path.as_deref())?, + "write" => permissions.query_write(args.path.as_deref())?, + "net" => permissions.query_net(args.host.as_deref())?, + "env" => permissions.query_env(args.variable.as_deref()), + "sys" => permissions.query_sys(args.kind.as_deref())?, + "run" => permissions.query_run(args.command.as_deref())?, + "ffi" => permissions.query_ffi(args.path.as_deref())?, n => { return Err(custom_error( "ReferenceError", @@ -134,62 +78,15 @@ pub fn op_revoke_permission( state: &mut OpState, #[serde] args: PermissionArgs, ) -> Result { - // todo(dsherret): don't have this function use the properties of - // permission container - let permissions_container = state.borrow_mut::(); - let desc_parser = &permissions_container.descriptor_parser; - let mut permissions = permissions_container.inner.lock(); - let path = args.path.as_deref(); + let permissions = state.borrow::(); let perm = match args.name.as_ref() { - "read" => permissions.read.revoke( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_read(), - ) - }) - .transpose()? - .as_ref(), - ), - "write" => permissions.write.revoke( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_write(), - ) - }) - .transpose()? - .as_ref(), - ), - "net" => permissions.net.revoke( - match args.host.as_deref() { - None => None, - Some(h) => Some(desc_parser.parse_net_descriptor(h)?), - } - .as_ref(), - ), - "env" => permissions.env.revoke(args.variable.as_deref()), - "sys" => permissions - .sys - .revoke(args.kind.as_deref().map(parse_sys_kind).transpose()?), - "run" => permissions.run.revoke( - args - .command - .as_deref() - .map(|request| desc_parser.parse_run_query(request)) - .transpose()? - .as_ref(), - ), - "ffi" => permissions.ffi.revoke( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_ffi(), - ) - }) - .transpose()? - .as_ref(), - ), + "read" => permissions.revoke_read(args.path.as_deref())?, + "write" => permissions.revoke_write(args.path.as_deref())?, + "net" => permissions.revoke_net(args.host.as_deref())?, + "env" => permissions.revoke_env(args.variable.as_deref()), + "sys" => permissions.revoke_sys(args.kind.as_deref())?, + "run" => permissions.revoke_run(args.command.as_deref())?, + "ffi" => permissions.revoke_ffi(args.path.as_deref())?, n => { return Err(custom_error( "ReferenceError", @@ -206,62 +103,15 @@ pub fn op_request_permission( state: &mut OpState, #[serde] args: PermissionArgs, ) -> Result { - // todo(dsherret): don't have this function use the properties of - // permission container - let permissions_container = state.borrow_mut::(); - let desc_parser = &permissions_container.descriptor_parser; - let mut permissions = permissions_container.inner.lock(); - let path = args.path.as_deref(); + let permissions = state.borrow::(); let perm = match args.name.as_ref() { - "read" => permissions.read.request( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_read(), - ) - }) - .transpose()? - .as_ref(), - ), - "write" => permissions.write.request( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_write(), - ) - }) - .transpose()? - .as_ref(), - ), - "net" => permissions.net.request( - match args.host.as_deref() { - None => None, - Some(h) => Some(desc_parser.parse_net_descriptor(h)?), - } - .as_ref(), - ), - "env" => permissions.env.request(args.variable.as_deref()), - "sys" => permissions - .sys - .request(args.kind.as_deref().map(parse_sys_kind).transpose()?), - "run" => permissions.run.request( - args - .command - .as_deref() - .map(|request| desc_parser.parse_run_query(request)) - .transpose()? - .as_ref(), - ), - "ffi" => permissions.ffi.request( - path - .map(|path| { - Result::<_, AnyError>::Ok( - desc_parser.parse_path_query(path)?.into_ffi(), - ) - }) - .transpose()? - .as_ref(), - ), + "read" => permissions.request_read(args.path.as_deref())?, + "write" => permissions.request_write(args.path.as_deref())?, + "net" => permissions.request_net(args.host.as_deref())?, + "env" => permissions.request_env(args.variable.as_deref()), + "sys" => permissions.request_sys(args.kind.as_deref())?, + "run" => permissions.request_run(args.command.as_deref())?, + "ffi" => permissions.request_ffi(args.path.as_deref())?, n => { return Err(custom_error( "ReferenceError", diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index 3c00356455091c..b9fd0665439ffd 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -17,9 +17,7 @@ use deno_core::CancelFuture; use deno_core::CancelHandle; use deno_core::ModuleSpecifier; use deno_core::OpState; -use deno_permissions::create_child_permissions; use deno_permissions::ChildPermissionsArg; -use deno_permissions::PermissionDescriptorParser; use deno_permissions::PermissionsContainer; use deno_web::deserialize_js_transferables; use deno_web::JsMessageData; @@ -154,19 +152,10 @@ fn op_create_worker( "Worker.deno.permissions", ); } - let permission_desc_parser = state - .borrow::>() - .clone(); let parent_permissions = state.borrow_mut::(); let worker_permissions = if let Some(child_permissions_arg) = args.permissions { - let mut parent_permissions = parent_permissions.inner.lock(); - let perms = create_child_permissions( - permission_desc_parser.as_ref(), - &mut parent_permissions, - child_permissions_arg, - )?; - PermissionsContainer::new(permission_desc_parser, perms) + parent_permissions.create_child_permissions(child_permissions_arg)? } else { parent_permissions.clone() }; diff --git a/runtime/permissions.rs b/runtime/permissions.rs index 533319c4ef6d4d..fa62227e0d2b28 100644 --- a/runtime/permissions.rs +++ b/runtime/permissions.rs @@ -101,7 +101,7 @@ impl deno_permissions::PermissionDescriptorParser if text.is_empty() { Err(AnyError::msg("Empty sys not allowed")) } else { - Ok(SysDescriptor(text.to_string())) + Ok(SysDescriptor::parse(text.to_string())?) } } diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index e919b81b60c4d1..77038ff2fa18aa 100644 --- a/runtime/permissions/lib.rs +++ b/runtime/permissions/lib.rs @@ -1356,7 +1356,23 @@ fn denies_run_name(name: &str, cmd_path: &Path) -> bool { } #[derive(Clone, Eq, PartialEq, Hash, Debug)] -pub struct SysDescriptor(pub String); +pub struct SysDescriptor(String); + +impl SysDescriptor { + pub fn parse(kind: String) -> Result { + match kind.as_str() { + "hostname" | "osRelease" | "osUptime" | "loadavg" + | "networkInterfaces" | "systemMemoryInfo" | "uid" | "gid" | "cpus" + | "homedir" | "getegid" | "username" | "statfs" | "getPriority" + | "setPriority" => Ok(Self(kind)), + _ => Err(type_error(format!("unknown system info kind \"{kind}\""))), + } + } + + pub fn into_string(self) -> String { + self.0 + } +} impl QueryDescriptor for SysDescriptor { type AllowDesc = SysDescriptor; @@ -1412,15 +1428,6 @@ impl QueryDescriptor for SysDescriptor { } } -pub fn parse_sys_kind(kind: &str) -> Result<&str, AnyError> { - match kind { - "hostname" | "osRelease" | "osUptime" | "loadavg" | "networkInterfaces" - | "systemMemoryInfo" | "uid" | "gid" | "cpus" | "homedir" | "getegid" - | "username" | "statfs" | "getPriority" | "setPriority" => Ok(kind), - _ => Err(type_error(format!("unknown system info kind \"{kind}\""))), - } -} - #[derive(Clone, Eq, PartialEq, Hash, Debug)] pub struct FfiQueryDescriptor(pub PathQueryDescriptor); @@ -1664,28 +1671,25 @@ impl UnaryPermission { } impl UnaryPermission { - pub fn query(&self, kind: Option<&str>) -> PermissionState { - self.query_desc( - kind.map(|k| SysDescriptor(k.to_string())).as_ref(), - AllowPartial::TreatAsPartialGranted, - ) + pub fn query(&self, kind: Option<&SysDescriptor>) -> PermissionState { + self.query_desc(kind, AllowPartial::TreatAsPartialGranted) } - pub fn request(&mut self, kind: Option<&str>) -> PermissionState { - self.request_desc(kind.map(|k| SysDescriptor(k.to_string())).as_ref()) + pub fn request(&mut self, kind: Option<&SysDescriptor>) -> PermissionState { + self.request_desc(kind) } - pub fn revoke(&mut self, kind: Option<&str>) -> PermissionState { - self.revoke_desc(kind.map(|k| SysDescriptor(k.to_string())).as_ref()) + pub fn revoke(&mut self, kind: Option<&SysDescriptor>) -> PermissionState { + self.revoke_desc(kind) } pub fn check( &mut self, - kind: &str, + kind: &SysDescriptor, api_name: Option<&str>, ) -> Result<(), AnyError> { skip_check_if_is_permission_fully_granted!(self); - self.check_desc(Some(&SysDescriptor(kind.to_string())), false, api_name) + self.check_desc(Some(kind), false, api_name) } pub fn check_all(&mut self) -> Result<(), AnyError> { @@ -2047,12 +2051,8 @@ pub enum CheckSpecifierKind { /// to send permissions to a new thread. #[derive(Clone, Debug)] pub struct PermissionsContainer { - // todo(dsherret): make both of these private as the functionality - // can just be methods on PermissionsContainer. Additionally, a separate - // struct should be created in here that handles creating child permissions - // so that the code is not so verbose elsewhere. - pub descriptor_parser: Arc, - pub inner: Arc>, + descriptor_parser: Arc, + inner: Arc>, } impl PermissionsContainer { @@ -2072,6 +2072,96 @@ impl PermissionsContainer { Self::new(descriptor_parser, Permissions::allow_all()) } + pub fn create_child_permissions( + &self, + child_permissions_arg: ChildPermissionsArg, + ) -> Result { + fn is_granted_unary(arg: &ChildUnaryPermissionArg) -> bool { + match arg { + ChildUnaryPermissionArg::Inherit | ChildUnaryPermissionArg::Granted => { + true + } + ChildUnaryPermissionArg::NotGranted + | ChildUnaryPermissionArg::GrantedList(_) => false, + } + } + + let mut worker_perms = Permissions::none_without_prompt(); + + let mut inner = self.inner.lock(); + worker_perms.all = inner + .all + .create_child_permissions(ChildUnitPermissionArg::Inherit)?; + + // downgrade the `worker_perms.all` based on the other values + if worker_perms.all.query() == PermissionState::Granted { + let unary_perms = [ + &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, + &child_permissions_arg.ffi, + ]; + let allow_all = unary_perms.into_iter().all(is_granted_unary); + if !allow_all { + worker_perms.all.revoke(); + } + } + + // WARNING: When adding a permission here, ensure it is handled + // in the worker_perms.all block above + worker_perms.read = inner + .read + .create_child_permissions(child_permissions_arg.read, |text| { + Ok(Some(self.descriptor_parser.parse_read_descriptor(text)?)) + })?; + worker_perms.write = inner + .write + .create_child_permissions(child_permissions_arg.write, |text| { + Ok(Some(self.descriptor_parser.parse_write_descriptor(text)?)) + })?; + worker_perms.import = inner + .import + .create_child_permissions(child_permissions_arg.import, |text| { + Ok(Some(self.descriptor_parser.parse_import_descriptor(text)?)) + })?; + worker_perms.net = inner + .net + .create_child_permissions(child_permissions_arg.net, |text| { + Ok(Some(self.descriptor_parser.parse_net_descriptor(text)?)) + })?; + worker_perms.env = inner + .env + .create_child_permissions(child_permissions_arg.env, |text| { + Ok(Some(self.descriptor_parser.parse_env_descriptor(text)?)) + })?; + worker_perms.sys = inner + .sys + .create_child_permissions(child_permissions_arg.sys, |text| { + Ok(Some(self.descriptor_parser.parse_sys_descriptor(text)?)) + })?; + worker_perms.run = inner.run.create_child_permissions( + child_permissions_arg.run, + |text| match self.descriptor_parser.parse_allow_run_descriptor(text)? { + AllowRunDescriptorParseResult::Unresolved(_) => Ok(None), + AllowRunDescriptorParseResult::Descriptor(desc) => Ok(Some(desc)), + }, + )?; + worker_perms.ffi = inner + .ffi + .create_child_permissions(child_permissions_arg.ffi, |text| { + Ok(Some(self.descriptor_parser.parse_ffi_descriptor(text)?)) + })?; + + Ok(PermissionsContainer::new( + self.descriptor_parser.clone(), + worker_perms, + )) + } + #[inline(always)] pub fn check_specifier( &self, @@ -2307,7 +2397,10 @@ impl PermissionsContainer { #[inline(always)] pub fn check_sys(&self, kind: &str, api_name: &str) -> Result<(), AnyError> { - self.inner.lock().sys.check(kind, Some(api_name)) + self.inner.lock().sys.check( + &self.descriptor_parser.parse_sys_descriptor(kind)?, + Some(api_name), + ) } #[inline(always)] @@ -2510,6 +2603,336 @@ impl PermissionsContainer { Ok(desc.0.resolved) } } + + // query + + #[inline(always)] + pub fn query_read( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().read.query( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_read(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn query_write( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().write.query( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_write(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn query_net( + &self, + host: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().net.query( + match host { + None => None, + Some(h) => Some(self.descriptor_parser.parse_net_descriptor(h)?), + } + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn query_env(&self, var: Option<&str>) -> PermissionState { + self.inner.lock().env.query(var) + } + + #[inline(always)] + pub fn query_sys( + &self, + kind: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().sys.query( + kind + .map(|kind| self.descriptor_parser.parse_sys_descriptor(kind)) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn query_run( + &self, + cmd: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().run.query( + cmd + .map(|request| self.descriptor_parser.parse_run_query(request)) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn query_ffi( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().ffi.query( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_ffi(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + // revoke + + #[inline(always)] + pub fn revoke_read( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().read.revoke( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_read(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn revoke_write( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().write.revoke( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_write(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn revoke_net( + &self, + host: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().net.revoke( + match host { + None => None, + Some(h) => Some(self.descriptor_parser.parse_net_descriptor(h)?), + } + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn revoke_env(&self, var: Option<&str>) -> PermissionState { + self.inner.lock().env.revoke(var) + } + + #[inline(always)] + pub fn revoke_sys( + &self, + kind: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().sys.revoke( + kind + .map(|kind| self.descriptor_parser.parse_sys_descriptor(kind)) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn revoke_run( + &self, + cmd: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().run.revoke( + cmd + .map(|request| self.descriptor_parser.parse_run_query(request)) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn revoke_ffi( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().ffi.revoke( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_ffi(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + // request + + #[inline(always)] + pub fn request_read( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().read.request( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_read(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn request_write( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().write.request( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_write(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn request_net( + &self, + host: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().net.request( + match host { + None => None, + Some(h) => Some(self.descriptor_parser.parse_net_descriptor(h)?), + } + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn request_env(&self, var: Option<&str>) -> PermissionState { + self.inner.lock().env.request(var) + } + + #[inline(always)] + pub fn request_sys( + &self, + kind: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().sys.request( + kind + .map(|kind| self.descriptor_parser.parse_sys_descriptor(kind)) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn request_run( + &self, + cmd: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().run.request( + cmd + .map(|request| self.descriptor_parser.parse_run_query(request)) + .transpose()? + .as_ref(), + ), + ) + } + + #[inline(always)] + pub fn request_ffi( + &self, + path: Option<&str>, + ) -> Result { + Ok( + self.inner.lock().ffi.request( + path + .map(|path| { + Result::<_, AnyError>::Ok( + self.descriptor_parser.parse_path_query(path)?.into_ffi(), + ) + }) + .transpose()? + .as_ref(), + ), + ) + } } const fn unit_permission_from_flag_bools( @@ -2862,93 +3285,6 @@ pub trait PermissionDescriptorParser: Debug + Send + Sync { ) -> Result; } -pub fn create_child_permissions( - parser: &dyn PermissionDescriptorParser, - main_perms: &mut Permissions, - child_permissions_arg: ChildPermissionsArg, -) -> Result { - fn is_granted_unary(arg: &ChildUnaryPermissionArg) -> bool { - match arg { - ChildUnaryPermissionArg::Inherit | ChildUnaryPermissionArg::Granted => { - true - } - ChildUnaryPermissionArg::NotGranted - | ChildUnaryPermissionArg::GrantedList(_) => false, - } - } - - let mut worker_perms = Permissions::none_without_prompt(); - - worker_perms.all = main_perms - .all - .create_child_permissions(ChildUnitPermissionArg::Inherit)?; - - // downgrade the `worker_perms.all` based on the other values - if worker_perms.all.query() == PermissionState::Granted { - let unary_perms = [ - &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, - &child_permissions_arg.ffi, - ]; - let allow_all = unary_perms.into_iter().all(is_granted_unary); - if !allow_all { - worker_perms.all.revoke(); - } - } - - // WARNING: When adding a permission here, ensure it is handled - // in the worker_perms.all block above - worker_perms.read = main_perms - .read - .create_child_permissions(child_permissions_arg.read, |text| { - Ok(Some(parser.parse_read_descriptor(text)?)) - })?; - worker_perms.write = main_perms - .write - .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| { - Ok(Some(parser.parse_net_descriptor(text)?)) - })?; - worker_perms.env = main_perms - .env - .create_child_permissions(child_permissions_arg.env, |text| { - Ok(Some(parser.parse_env_descriptor(text)?)) - })?; - worker_perms.sys = main_perms - .sys - .create_child_permissions(child_permissions_arg.sys, |text| { - Ok(Some(parser.parse_sys_descriptor(text)?)) - })?; - worker_perms.run = main_perms.run.create_child_permissions( - child_permissions_arg.run, - |text| match parser.parse_allow_run_descriptor(text)? { - AllowRunDescriptorParseResult::Unresolved(_) => Ok(None), - AllowRunDescriptorParseResult::Descriptor(desc) => Ok(Some(desc)), - }, - )?; - worker_perms.ffi = main_perms - .ffi - .create_child_permissions(child_permissions_arg.ffi, |text| { - Ok(Some(parser.parse_ffi_descriptor(text)?)) - })?; - - Ok(worker_perms) -} - static IS_STANDALONE: AtomicFlag = AtomicFlag::lowered(); pub fn mark_standalone() { @@ -2972,7 +3308,7 @@ mod tests { ($($x:expr),*) => (vec![$($x.to_string()),*]); } - #[derive(Debug)] + #[derive(Debug, Clone)] struct TestPermissionDescriptorParser; impl TestPermissionDescriptorParser { @@ -3025,7 +3361,7 @@ mod tests { &self, text: &str, ) -> Result { - Ok(SysDescriptor(text.to_string())) + SysDescriptor::parse(text.to_string()) } fn parse_allow_run_descriptor( @@ -3534,15 +3870,16 @@ mod tests { assert_eq!(perms4.env.query(None), PermissionState::GrantedPartial); assert_eq!(perms4.env.query(Some("HOME")), PermissionState::Denied); assert_eq!(perms4.env.query(Some("AWAY")), PermissionState::Granted); + let sys_desc = |name: &str| SysDescriptor::parse(name.to_string()).unwrap(); assert_eq!(perms1.sys.query(None), PermissionState::Granted); - assert_eq!(perms1.sys.query(Some("HOME")), PermissionState::Granted); + assert_eq!(perms1.sys.query(Some(&sys_desc("osRelease"))), PermissionState::Granted); assert_eq!(perms2.sys.query(None), PermissionState::Prompt); - assert_eq!(perms2.sys.query(Some("hostname")), PermissionState::Granted); + assert_eq!(perms2.sys.query(Some(&sys_desc("hostname"))), PermissionState::Granted); assert_eq!(perms3.sys.query(None), PermissionState::Prompt); - assert_eq!(perms3.sys.query(Some("hostname")), PermissionState::Denied); + assert_eq!(perms3.sys.query(Some(&sys_desc("hostname"))), PermissionState::Denied); assert_eq!(perms4.sys.query(None), PermissionState::GrantedPartial); - assert_eq!(perms4.sys.query(Some("hostname")), PermissionState::Denied); - assert_eq!(perms4.sys.query(Some("uid")), PermissionState::Granted); + assert_eq!(perms4.sys.query(Some(&sys_desc("hostname"))), PermissionState::Denied); + assert_eq!(perms4.sys.query(Some(&sys_desc("uid"))), PermissionState::Granted); assert_eq!(perms1.run.query(None), PermissionState::Granted); let deno_run_query = RunQueryDescriptor::Path { requested: "deno".to_string(), @@ -3604,10 +3941,11 @@ mod tests { prompt_value.set(false); assert_eq!(perms.env.request(Some("HOME")), PermissionState::Granted); prompt_value.set(true); - assert_eq!(perms.sys.request(Some("hostname")), PermissionState::Granted); + let sys_desc = |name: &str| SysDescriptor::parse(name.to_string()).unwrap(); + assert_eq!(perms.sys.request(Some(&sys_desc("hostname"))), PermissionState::Granted); assert_eq!(perms.sys.query(None), PermissionState::Prompt); prompt_value.set(false); - assert_eq!(perms.sys.request(Some("hostname")), PermissionState::Granted); + assert_eq!(perms.sys.request(Some(&sys_desc("hostname"))), PermissionState::Granted); prompt_value.set(true); let run_query = RunQueryDescriptor::Path { requested: "deno".to_string(), @@ -3924,12 +4262,13 @@ mod tests { assert!(perms.env.check("PATH", None).is_ok()); prompt_value.set(false); - assert!(perms.sys.check("hostname", None).is_err()); + let sys_desc = |name: &str| SysDescriptor::parse(name.to_string()).unwrap(); + assert!(perms.sys.check(&sys_desc("hostname"), None).is_err()); prompt_value.set(true); - assert!(perms.sys.check("hostname", None).is_err()); - assert!(perms.sys.check("osRelease", None).is_ok()); + assert!(perms.sys.check(&sys_desc("hostname"), None).is_err()); + assert!(perms.sys.check(&sys_desc("osRelease"), None).is_ok()); prompt_value.set(false); - assert!(perms.sys.check("osRelease", None).is_ok()); + assert!(perms.sys.check(&sys_desc("osRelease"), None).is_ok()); } #[test] @@ -4149,7 +4488,7 @@ mod tests { fn test_create_child_permissions() { set_prompter(Box::new(TestPrompter)); let parser = TestPermissionDescriptorParser; - let mut main_perms = Permissions::from_options( + let main_perms = Permissions::from_options( &parser, &PermissionsOptions { allow_env: Some(vec![]), @@ -4158,18 +4497,19 @@ mod tests { }, ) .unwrap(); + let main_perms = PermissionsContainer::new(Arc::new(parser), main_perms); assert_eq!( - create_child_permissions( - &parser, - &mut main_perms.clone(), - ChildPermissionsArg { + main_perms + .create_child_permissions(ChildPermissionsArg { env: ChildUnaryPermissionArg::Inherit, net: ChildUnaryPermissionArg::GrantedList(svec!["foo"]), ffi: ChildUnaryPermissionArg::NotGranted, ..ChildPermissionsArg::none() - } - ) - .unwrap(), + }) + .unwrap() + .inner + .lock() + .clone(), Permissions { env: Permissions::new_unary(Some(HashSet::new()), None, false).unwrap(), net: Permissions::new_unary( @@ -4181,40 +4521,31 @@ mod tests { ..Permissions::none_without_prompt() } ); - assert!(create_child_permissions( - &parser, - &mut main_perms.clone(), - ChildPermissionsArg { + assert!(main_perms + .create_child_permissions(ChildPermissionsArg { net: ChildUnaryPermissionArg::Granted, ..ChildPermissionsArg::none() - } - ) - .is_err()); - assert!(create_child_permissions( - &parser, - &mut main_perms.clone(), - ChildPermissionsArg { + }) + .is_err()); + assert!(main_perms + .create_child_permissions(ChildPermissionsArg { net: ChildUnaryPermissionArg::GrantedList(svec!["foo", "bar", "baz"]), ..ChildPermissionsArg::none() - } - ) - .is_err()); - assert!(create_child_permissions( - &parser, - &mut main_perms, - ChildPermissionsArg { + }) + .is_err()); + assert!(main_perms + .create_child_permissions(ChildPermissionsArg { ffi: ChildUnaryPermissionArg::GrantedList(svec!["foo"]), ..ChildPermissionsArg::none() - } - ) - .is_err()); + }) + .is_err()); } #[test] fn test_create_child_permissions_with_prompt() { set_prompter(Box::new(TestPrompter)); let prompt_value = PERMISSION_PROMPT_STUB_VALUE_SETTER.lock(); - let mut main_perms = Permissions::from_options( + let main_perms = Permissions::from_options( &TestPermissionDescriptorParser, &PermissionsOptions { prompt: true, @@ -4222,20 +4553,24 @@ mod tests { }, ) .unwrap(); + let main_perms = PermissionsContainer::new( + Arc::new(TestPermissionDescriptorParser), + main_perms, + ); prompt_value.set(true); - let worker_perms = create_child_permissions( - &TestPermissionDescriptorParser, - &mut main_perms, - ChildPermissionsArg { + let worker_perms = main_perms + .create_child_permissions(ChildPermissionsArg { read: ChildUnaryPermissionArg::Granted, run: ChildUnaryPermissionArg::GrantedList(svec!["foo", "bar"]), ..ChildPermissionsArg::none() - }, - ) - .unwrap(); - assert_eq!(main_perms, worker_perms); + }) + .unwrap(); assert_eq!( - main_perms.run.granted_list, + main_perms.inner.lock().clone(), + worker_perms.inner.lock().clone() + ); + assert_eq!( + main_perms.inner.lock().run.granted_list, HashSet::from([ AllowRunDescriptor(PathBuf::from("/bar")), AllowRunDescriptor(PathBuf::from("/foo")), @@ -4248,7 +4583,7 @@ mod tests { set_prompter(Box::new(TestPrompter)); let prompt_value = PERMISSION_PROMPT_STUB_VALUE_SETTER.lock(); let parser = TestPermissionDescriptorParser; - let mut main_perms = Permissions::from_options( + let main_perms = Permissions::from_options( &parser, &PermissionsOptions { prompt: true, @@ -4256,20 +4591,21 @@ mod tests { }, ) .unwrap(); + let main_perms = + PermissionsContainer::new(Arc::new(parser.clone()), main_perms); prompt_value.set(false); assert!(main_perms + .inner + .lock() .write .check(&parser.parse_path_query("foo").unwrap().into_write(), None) .is_err()); - let worker_perms = create_child_permissions( - &TestPermissionDescriptorParser, - &mut main_perms.clone(), - ChildPermissionsArg::none(), - ) - .unwrap(); + let worker_perms = main_perms + .create_child_permissions(ChildPermissionsArg::none()) + .unwrap(); assert_eq!( - worker_perms.write.flag_denied_list, - main_perms.write.flag_denied_list + worker_perms.inner.lock().write.flag_denied_list.clone(), + main_perms.inner.lock().write.flag_denied_list ); } diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs index f20c04f082fe60..456810e6a6193d 100644 --- a/runtime/snapshot.rs +++ b/runtime/snapshot.rs @@ -2,7 +2,6 @@ use crate::ops; use crate::ops::bootstrap::SnapshotOptions; -use crate::permissions::RuntimePermissionDescriptorParser; use crate::shared::maybe_transpile_source; use crate::shared::runtime; use deno_cache::SqliteBackedCache; @@ -299,9 +298,7 @@ pub fn create_runtime_snapshot( ), ops::fs_events::deno_fs_events::init_ops(), ops::os::deno_os::init_ops(Default::default()), - ops::permissions::deno_permissions::init_ops(Arc::new( - RuntimePermissionDescriptorParser::new(fs), - )), + ops::permissions::deno_permissions::init_ops(), ops::process::deno_process::init_ops(None), ops::signal::deno_signal::init_ops(), ops::tty::deno_tty::init_ops(), diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index f13516268fba4e..f560ce17ecc991 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -1,16 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::inspector_server::InspectorServer; -use crate::ops; -use crate::ops::process::NpmProcessStateProviderRc; -use crate::ops::worker_host::WorkersTable; -use crate::shared::maybe_transpile_source; -use crate::shared::runtime; -use crate::tokio_util::create_and_run_current_thread; -use crate::worker::create_op_metrics; -use crate::worker::import_meta_resolve_callback; -use crate::worker::validate_import_attributes_callback; -use crate::worker::FormatJsErrorFn; -use crate::BootstrapOptions; + use deno_broadcast_channel::InMemoryBroadcastChannel; use deno_cache::CreateCache; use deno_cache::SqliteBackedCache; @@ -45,7 +34,6 @@ use deno_http::DefaultHttpPropertyExtractor; use deno_io::Stdio; use deno_kv::dynamic::MultiBackendDbHandler; use deno_node::NodeExtInitServices; -use deno_permissions::PermissionDescriptorParser; use deno_permissions::PermissionsContainer; use deno_terminal::colors; use deno_tls::RootCertStoreProvider; @@ -67,6 +55,19 @@ use std::sync::Arc; use std::task::Context; use std::task::Poll; +use crate::inspector_server::InspectorServer; +use crate::ops; +use crate::ops::process::NpmProcessStateProviderRc; +use crate::ops::worker_host::WorkersTable; +use crate::shared::maybe_transpile_source; +use crate::shared::runtime; +use crate::tokio_util::create_and_run_current_thread; +use crate::worker::create_op_metrics; +use crate::worker::import_meta_resolve_callback; +use crate::worker::validate_import_attributes_callback; +use crate::worker::FormatJsErrorFn; +use crate::BootstrapOptions; + pub struct WorkerMetadata { pub buffer: DetachedBuffer, pub transferables: Vec, @@ -348,7 +349,6 @@ pub struct WebWorkerServiceOptions { pub node_services: Option, pub npm_process_state_provider: Option, pub permissions: PermissionsContainer, - pub permission_desc_parser: Arc, pub root_cert_store_provider: Option>, pub shared_array_buffer_store: Option, } @@ -505,9 +505,7 @@ impl WebWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os_worker::init_ops_and_esm(), - ops::permissions::deno_permissions::init_ops_and_esm( - services.permission_desc_parser, - ), + ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, ), diff --git a/runtime/worker.rs b/runtime/worker.rs index 3ce5562fa2f5c9..477d3b880c98de 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -139,8 +139,6 @@ pub struct WorkerServiceOptions { pub module_loader: Rc, pub node_services: Option, pub npm_process_state_provider: Option, - pub permission_desc_parser: - Arc, pub permissions: PermissionsContainer, pub root_cert_store_provider: Option>, @@ -422,9 +420,7 @@ impl MainWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os::init_ops_and_esm(exit_code.clone()), - ops::permissions::deno_permissions::init_ops_and_esm( - services.permission_desc_parser, - ), + ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, ), From 69ab72002550b5797185b7651de28c700b220bb2 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 30 Sep 2024 09:33:32 -0400 Subject: [PATCH 029/436] refactor: move ByonmNpmResolver to deno_resolver (#25937) Some more slow progress on moving all the resolution code into deno_resolver. --- .dprint.json | 2 +- Cargo.lock | 10 +- Cargo.toml | 2 +- cli/factory.rs | 7 +- cli/lsp/resolver.rs | 7 +- cli/npm/byonm.rs | 351 ++-------------------------- cli/npm/managed/mod.rs | 5 +- cli/npm/managed/resolvers/common.rs | 2 +- cli/npm/managed/resolvers/global.rs | 2 +- cli/npm/managed/resolvers/local.rs | 20 +- cli/npm/managed/resolvers/mod.rs | 1 - cli/npm/mod.rs | 18 +- cli/resolver.rs | 40 ++++ cli/standalone/mod.rs | 7 +- cli/tools/task.rs | 4 +- cli/util/fs.rs | 35 +-- resolvers/deno/Cargo.toml | 5 + resolvers/deno/clippy.toml | 52 +++++ resolvers/deno/fs.rs | 27 +++ resolvers/deno/lib.rs | 2 + resolvers/deno/npm/byonm.rs | 348 +++++++++++++++++++++++++++ resolvers/deno/npm/local.rs | 27 +++ resolvers/deno/npm/mod.rs | 8 + resolvers/deno/sloppy_imports.rs | 4 +- resolvers/node/Cargo.toml | 1 + resolvers/node/analyze.rs | 40 ++-- resolvers/node/clippy.toml | 3 + resolvers/node/npm.rs | 6 +- resolvers/node/path.rs | 98 -------- resolvers/node/resolution.rs | 50 ++-- 30 files changed, 629 insertions(+), 555 deletions(-) create mode 100644 resolvers/deno/clippy.toml create mode 100644 resolvers/deno/fs.rs create mode 100644 resolvers/deno/npm/byonm.rs create mode 100644 resolvers/deno/npm/local.rs create mode 100644 resolvers/deno/npm/mod.rs diff --git a/.dprint.json b/.dprint.json index 6ee3db3c5ddf2e..082eb30058c307 100644 --- a/.dprint.json +++ b/.dprint.json @@ -71,7 +71,7 @@ "https://plugins.dprint.dev/typescript-0.93.0.wasm", "https://plugins.dprint.dev/json-0.19.3.wasm", "https://plugins.dprint.dev/markdown-0.17.8.wasm", - "https://plugins.dprint.dev/toml-0.6.2.wasm", + "https://plugins.dprint.dev/toml-0.6.3.wasm", "https://plugins.dprint.dev/exec-0.5.0.json@8d9972eee71fa1590e04873540421f3eda7674d0f1aae3d7c788615e7b7413d0", "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm" ] diff --git a/Cargo.lock b/Cargo.lock index b4dafacdd2f52c..2263351fc0d8f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1923,9 +1923,9 @@ dependencies = [ [[package]] name = "deno_path_util" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625b490bc4734ff778926d7034650a2ddcef2fd42b71e30bb722249156d5a144" +checksum = "4889646c1ce8437a6fde3acb057fd7e2d039e62c61f5063fc125ed1ede114dc6" dependencies = [ "percent-encoding", "thiserror", @@ -1953,8 +1953,13 @@ dependencies = [ name = "deno_resolver" version = "0.0.1" dependencies = [ + "anyhow", + "base32", "deno_media_type", + "deno_package_json", "deno_path_util", + "deno_semver", + "node_resolver", "test_server", "url", ] @@ -4557,6 +4562,7 @@ dependencies = [ "async-trait", "deno_media_type", "deno_package_json", + "deno_path_util", "futures", "lazy-regex", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 2f53c8999dca68..ef9a4576cec564 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ deno_bench_util = { version = "0.162.0", path = "./bench_util" } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.1.4", features = ["module_specifier"] } deno_npm = "=0.25.2" -deno_path_util = "=0.1.1" +deno_path_util = "=0.2.0" deno_permissions = { version = "0.28.0", path = "./runtime/permissions" } deno_runtime = { version = "0.177.0", path = "./runtime" } deno_semver = "=0.5.13" diff --git a/cli/factory.rs b/cli/factory.rs index ffe7f8d2f73e9c..2cef875999aca4 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -32,12 +32,13 @@ use crate::module_loader::ModuleLoadPreparer; use crate::node::CliCjsCodeAnalyzer; use crate::node::CliNodeCodeTranslator; use crate::npm::create_cli_npm_resolver; +use crate::npm::CliByonmNpmResolverCreateOptions; use crate::npm::CliNpmResolver; -use crate::npm::CliNpmResolverByonmCreateOptions; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; use crate::resolver::CjsResolutionStore; +use crate::resolver::CliDenoResolverFs; use crate::resolver::CliGraphResolver; use crate::resolver::CliGraphResolverOptions; use crate::resolver::CliNodeResolver; @@ -361,8 +362,8 @@ impl CliFactory { let cli_options = self.cli_options()?; // For `deno install` we want to force the managed resolver so it can set up `node_modules/` directory. create_cli_npm_resolver(if cli_options.use_byonm() && !matches!(cli_options.sub_command(), DenoSubcommand::Install(_) | DenoSubcommand::Add(_) | DenoSubcommand::Remove(_)) { - CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions { - fs: fs.clone(), + CliNpmResolverCreateOptions::Byonm(CliByonmNpmResolverCreateOptions { + fs: CliDenoResolverFs(fs.clone()), root_node_modules_dir: Some(match cli_options.node_modules_dir_path() { Some(node_modules_path) => node_modules_path.to_path_buf(), // path needs to be canonicalized for node resolution diff --git a/cli/lsp/resolver.rs b/cli/lsp/resolver.rs index f98b23a3f93d18..a5dfd25a647fe7 100644 --- a/cli/lsp/resolver.rs +++ b/cli/lsp/resolver.rs @@ -42,13 +42,14 @@ use crate::lsp::config::Config; use crate::lsp::config::ConfigData; use crate::lsp::logging::lsp_warn; use crate::npm::create_cli_npm_resolver_for_lsp; +use crate::npm::CliByonmNpmResolverCreateOptions; use crate::npm::CliNpmResolver; -use crate::npm::CliNpmResolverByonmCreateOptions; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; use crate::npm::ManagedCliNpmResolver; use crate::resolver::CjsResolutionStore; +use crate::resolver::CliDenoResolverFs; use crate::resolver::CliGraphResolver; use crate::resolver::CliGraphResolverOptions; use crate::resolver::CliNodeResolver; @@ -439,8 +440,8 @@ async fn create_npm_resolver( ) -> Option> { let enable_byonm = config_data.map(|d| d.byonm).unwrap_or(false); let options = if enable_byonm { - CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions { - fs: Arc::new(deno_fs::RealFs), + CliNpmResolverCreateOptions::Byonm(CliByonmNpmResolverCreateOptions { + fs: CliDenoResolverFs(Arc::new(deno_fs::RealFs)), root_node_modules_dir: config_data.and_then(|config_data| { config_data.node_modules_dir.clone().or_else(|| { url_to_file_path(&config_data.scope) diff --git a/cli/npm/byonm.rs b/cli/npm/byonm.rs index 83c4067655e2c9..ceef68135ab9e5 100644 --- a/cli/npm/byonm.rs +++ b/cli/npm/byonm.rs @@ -1,276 +1,36 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; -use deno_ast::ModuleSpecifier; -use deno_core::anyhow::bail; use deno_core::error::AnyError; use deno_core::serde_json; -use deno_package_json::PackageJsonDepValue; -use deno_path_util::url_to_file_path; -use deno_runtime::deno_fs::FileSystem; -use deno_runtime::deno_node::DenoPkgJsonFsAdapter; +use deno_core::url::Url; +use deno_resolver::npm::ByonmNpmResolver; +use deno_resolver::npm::ByonmNpmResolverCreateOptions; use deno_runtime::deno_node::NodePermissions; use deno_runtime::deno_node::NodeRequireResolver; -use deno_runtime::deno_node::PackageJson; use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageReq; -use deno_semver::Version; -use node_resolver::errors::PackageFolderResolveError; -use node_resolver::errors::PackageFolderResolveIoError; -use node_resolver::errors::PackageJsonLoadError; -use node_resolver::errors::PackageNotFoundError; -use node_resolver::load_pkg_json; use node_resolver::NpmResolver; use crate::args::NpmProcessState; use crate::args::NpmProcessStateKind; -use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs; +use crate::resolver::CliDenoResolverFs; -use super::managed::normalize_pkg_name_for_node_modules_deno_folder; use super::CliNpmResolver; use super::InnerCliNpmResolverRef; -pub struct CliNpmResolverByonmCreateOptions { - pub fs: Arc, - // todo(dsherret): investigate removing this - pub root_node_modules_dir: Option, -} - -pub fn create_byonm_npm_resolver( - options: CliNpmResolverByonmCreateOptions, -) -> Arc { - Arc::new(ByonmCliNpmResolver { - fs: options.fs, - root_node_modules_dir: options.root_node_modules_dir, - }) -} +pub type CliByonmNpmResolverCreateOptions = + ByonmNpmResolverCreateOptions; +pub type CliByonmNpmResolver = ByonmNpmResolver; +// todo(dsherret): the services hanging off `CliNpmResolver` doesn't seem ideal. We should probably decouple. #[derive(Debug)] -pub struct ByonmCliNpmResolver { - fs: Arc, - root_node_modules_dir: Option, -} - -impl ByonmCliNpmResolver { - fn load_pkg_json( - &self, - path: &Path, - ) -> Result>, PackageJsonLoadError> { - load_pkg_json(&DenoPkgJsonFsAdapter(self.fs.as_ref()), path) - } - - /// Finds the ancestor package.json that contains the specified dependency. - pub fn find_ancestor_package_json_with_dep( - &self, - dep_name: &str, - referrer: &ModuleSpecifier, - ) -> Option> { - let referrer_path = referrer.to_file_path().ok()?; - let mut current_folder = referrer_path.parent()?; - loop { - let pkg_json_path = current_folder.join("package.json"); - if let Ok(Some(pkg_json)) = self.load_pkg_json(&pkg_json_path) { - if let Some(deps) = &pkg_json.dependencies { - if deps.contains_key(dep_name) { - return Some(pkg_json); - } - } - if let Some(deps) = &pkg_json.dev_dependencies { - if deps.contains_key(dep_name) { - return Some(pkg_json); - } - } - } - - if let Some(parent) = current_folder.parent() { - current_folder = parent; - } else { - return None; - } - } - } - - fn resolve_pkg_json_and_alias_for_req( - &self, - req: &PackageReq, - referrer: &ModuleSpecifier, - ) -> Result, String)>, AnyError> { - fn resolve_alias_from_pkg_json( - req: &PackageReq, - pkg_json: &PackageJson, - ) -> Option { - let deps = pkg_json.resolve_local_package_json_deps(); - for (key, value) in deps { - if let Ok(value) = value { - match value { - PackageJsonDepValue::Req(dep_req) => { - if dep_req.name == req.name - && dep_req.version_req.intersects(&req.version_req) - { - return Some(key); - } - } - PackageJsonDepValue::Workspace(_workspace) => { - if key == req.name && req.version_req.tag() == Some("workspace") { - return Some(key); - } - } - } - } - } - None - } - - // attempt to resolve the npm specifier from the referrer's package.json, - if let Ok(file_path) = url_to_file_path(referrer) { - let mut current_path = file_path.as_path(); - while let Some(dir_path) = current_path.parent() { - let package_json_path = dir_path.join("package.json"); - if let Some(pkg_json) = self.load_pkg_json(&package_json_path)? { - if let Some(alias) = - resolve_alias_from_pkg_json(req, pkg_json.as_ref()) - { - return Ok(Some((pkg_json, alias))); - } - } - current_path = dir_path; - } - } - - // otherwise, fall fallback to the project's package.json - if let Some(root_node_modules_dir) = &self.root_node_modules_dir { - let root_pkg_json_path = - root_node_modules_dir.parent().unwrap().join("package.json"); - if let Some(pkg_json) = self.load_pkg_json(&root_pkg_json_path)? { - if let Some(alias) = resolve_alias_from_pkg_json(req, pkg_json.as_ref()) - { - return Ok(Some((pkg_json, alias))); - } - } - } - - Ok(None) - } - - fn resolve_folder_in_root_node_modules( - &self, - req: &PackageReq, - ) -> Option { - // now check if node_modules/.deno/ matches this constraint - let root_node_modules_dir = self.root_node_modules_dir.as_ref()?; - let node_modules_deno_dir = root_node_modules_dir.join(".deno"); - let Ok(entries) = self.fs.read_dir_sync(&node_modules_deno_dir) else { - return None; - }; - let search_prefix = format!( - "{}@", - normalize_pkg_name_for_node_modules_deno_folder(&req.name) - ); - let mut best_version = None; - - // example entries: - // - @denotest+add@1.0.0 - // - @denotest+add@1.0.0_1 - for entry in entries { - if !entry.is_directory { - continue; - } - let Some(version_and_copy_idx) = entry.name.strip_prefix(&search_prefix) - else { - continue; - }; - let version = version_and_copy_idx - .rsplit_once('_') - .map(|(v, _)| v) - .unwrap_or(version_and_copy_idx); - let Ok(version) = Version::parse_from_npm(version) else { - continue; - }; - if req.version_req.matches(&version) { - if let Some((best_version_version, _)) = &best_version { - if version > *best_version_version { - best_version = Some((version, entry.name)); - } - } else { - best_version = Some((version, entry.name)); - } - } - } - - best_version.map(|(_version, entry_name)| { - join_package_name( - &node_modules_deno_dir.join(entry_name).join("node_modules"), - &req.name, - ) - }) - } -} - -impl NpmResolver for ByonmCliNpmResolver { - fn resolve_package_folder_from_package( - &self, - name: &str, - referrer: &ModuleSpecifier, - ) -> Result { - fn inner( - fs: &dyn FileSystem, - name: &str, - referrer: &ModuleSpecifier, - ) -> Result { - let maybe_referrer_file = url_to_file_path(referrer).ok(); - let maybe_start_folder = - maybe_referrer_file.as_ref().and_then(|f| f.parent()); - if let Some(start_folder) = maybe_start_folder { - for current_folder in start_folder.ancestors() { - let node_modules_folder = if current_folder.ends_with("node_modules") - { - Cow::Borrowed(current_folder) - } else { - Cow::Owned(current_folder.join("node_modules")) - }; +struct CliByonmWrapper(Arc); - let sub_dir = join_package_name(&node_modules_folder, name); - if fs.is_dir_sync(&sub_dir) { - return Ok(sub_dir); - } - } - } - - Err( - PackageNotFoundError { - package_name: name.to_string(), - referrer: referrer.clone(), - referrer_extra: None, - } - .into(), - ) - } - - let path = inner(&*self.fs, name, referrer)?; - self.fs.realpath_sync(&path).map_err(|err| { - PackageFolderResolveIoError { - package_name: name.to_string(), - referrer: referrer.clone(), - source: err.into_io_error(), - } - .into() - }) - } - - fn in_npm_package(&self, specifier: &ModuleSpecifier) -> bool { - specifier.scheme() == "file" - && specifier - .path() - .to_ascii_lowercase() - .contains("/node_modules/") - } -} - -impl NodeRequireResolver for ByonmCliNpmResolver { +impl NodeRequireResolver for CliByonmWrapper { fn ensure_read_permission( &self, permissions: &mut dyn NodePermissions, @@ -286,110 +46,54 @@ impl NodeRequireResolver for ByonmCliNpmResolver { } } -impl NpmProcessStateProvider for ByonmCliNpmResolver { +impl NpmProcessStateProvider for CliByonmWrapper { fn get_npm_process_state(&self) -> String { serde_json::to_string(&NpmProcessState { kind: NpmProcessStateKind::Byonm, local_node_modules_path: self - .root_node_modules_dir - .as_ref() + .0 + .root_node_modules_dir() .map(|p| p.to_string_lossy().to_string()), }) .unwrap() } } -impl CliNpmResolver for ByonmCliNpmResolver { +impl CliNpmResolver for CliByonmNpmResolver { fn into_npm_resolver(self: Arc) -> Arc { self } fn into_require_resolver(self: Arc) -> Arc { - self + Arc::new(CliByonmWrapper(self)) } fn into_process_state_provider( self: Arc, ) -> Arc { - self + Arc::new(CliByonmWrapper(self)) } fn clone_snapshotted(&self) -> Arc { - Arc::new(Self { - fs: self.fs.clone(), - root_node_modules_dir: self.root_node_modules_dir.clone(), - }) + Arc::new(self.clone()) } fn as_inner(&self) -> InnerCliNpmResolverRef { InnerCliNpmResolverRef::Byonm(self) } - fn root_node_modules_path(&self) -> Option<&PathBuf> { - self.root_node_modules_dir.as_ref() + fn root_node_modules_path(&self) -> Option<&Path> { + self.root_node_modules_dir() } fn resolve_pkg_folder_from_deno_module_req( &self, req: &PackageReq, - referrer: &ModuleSpecifier, + referrer: &Url, ) -> Result { - fn node_resolve_dir( - fs: &dyn FileSystem, - alias: &str, - start_dir: &Path, - ) -> Result, AnyError> { - for ancestor in start_dir.ancestors() { - let node_modules_folder = ancestor.join("node_modules"); - let sub_dir = join_package_name(&node_modules_folder, alias); - if fs.is_dir_sync(&sub_dir) { - return Ok(Some(canonicalize_path_maybe_not_exists_with_fs( - &sub_dir, fs, - )?)); - } - } - Ok(None) - } - - // now attempt to resolve if it's found in any package.json - let maybe_pkg_json_and_alias = - self.resolve_pkg_json_and_alias_for_req(req, referrer)?; - match maybe_pkg_json_and_alias { - Some((pkg_json, alias)) => { - // now try node resolution - if let Some(resolved) = - node_resolve_dir(self.fs.as_ref(), &alias, pkg_json.dir_path())? - { - return Ok(resolved); - } - - bail!( - concat!( - "Could not find \"{}\" in a node_modules folder. ", - "Deno expects the node_modules/ directory to be up to date. ", - "Did you forget to run `deno install`?" - ), - alias, - ); - } - None => { - // now check if node_modules/.deno/ matches this constraint - if let Some(folder) = self.resolve_folder_in_root_node_modules(req) { - return Ok(folder); - } - - bail!( - concat!( - "Could not find a matching package for 'npm:{}' in the node_modules ", - "directory. Ensure you have all your JSR and npm dependencies listed ", - "in your deno.json or package.json, then run `deno install`. Alternatively, ", - r#"turn on auto-install by specifying `"nodeModulesDir": "auto"` in your "#, - "deno.json file." - ), - req, - ); - } - } + ByonmNpmResolver::resolve_pkg_folder_from_deno_module_req( + self, req, referrer, + ) } fn check_state_hash(&self) -> Option { @@ -398,12 +102,3 @@ impl CliNpmResolver for ByonmCliNpmResolver { None } } - -fn join_package_name(path: &Path, package_name: &str) -> PathBuf { - let mut path = path.to_path_buf(); - // ensure backslashes are used on windows - for part in package_name.split('/') { - path = path.join(part); - } - path -} diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index e3ac5e1af6eb91..62af3e4aa9fcef 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -47,7 +47,6 @@ use self::cache::NpmCache; use self::registry::CliNpmRegistryApi; use self::resolution::NpmResolution; use self::resolvers::create_npm_fs_resolver; -pub use self::resolvers::normalize_pkg_name_for_node_modules_deno_folder; use self::resolvers::NpmPackageFsResolver; use super::CliNpmResolver; @@ -575,7 +574,7 @@ impl NpmProcessStateProvider for ManagedCliNpmResolver { fn get_npm_process_state(&self) -> String { npm_process_state( self.resolution.serialized_valid_snapshot(), - self.fs_resolver.node_modules_path().map(|p| p.as_path()), + self.fs_resolver.node_modules_path(), ) } } @@ -632,7 +631,7 @@ impl CliNpmResolver for ManagedCliNpmResolver { InnerCliNpmResolverRef::Managed(self) } - fn root_node_modules_path(&self) -> Option<&PathBuf> { + fn root_node_modules_path(&self) -> Option<&Path> { self.fs_resolver.node_modules_path() } diff --git a/cli/npm/managed/resolvers/common.rs b/cli/npm/managed/resolvers/common.rs index 620daf4b30b4ab..8df4debc5c7c42 100644 --- a/cli/npm/managed/resolvers/common.rs +++ b/cli/npm/managed/resolvers/common.rs @@ -33,7 +33,7 @@ pub trait NpmPackageFsResolver: Send + Sync { fn root_dir_url(&self) -> &Url; /// The local node_modules folder if it is applicable to the implementation. - fn node_modules_path(&self) -> Option<&PathBuf>; + fn node_modules_path(&self) -> Option<&Path>; fn maybe_package_folder(&self, package_id: &NpmPackageId) -> Option; diff --git a/cli/npm/managed/resolvers/global.rs b/cli/npm/managed/resolvers/global.rs index 187e6b2774c5d1..ca5722c86978fa 100644 --- a/cli/npm/managed/resolvers/global.rs +++ b/cli/npm/managed/resolvers/global.rs @@ -73,7 +73,7 @@ impl NpmPackageFsResolver for GlobalNpmPackageResolver { self.cache.root_dir_url() } - fn node_modules_path(&self) -> Option<&PathBuf> { + fn node_modules_path(&self) -> Option<&Path> { None } diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs index 297fcab230ed2a..59ba27d0597da7 100644 --- a/cli/npm/managed/resolvers/local.rs +++ b/cli/npm/managed/resolvers/local.rs @@ -20,7 +20,6 @@ use crate::colors; use async_trait::async_trait; use deno_ast::ModuleSpecifier; use deno_cache_dir::npm::mixed_case_package_name_decode; -use deno_cache_dir::npm::mixed_case_package_name_encode; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::futures::stream::FuturesUnordered; @@ -32,6 +31,7 @@ use deno_npm::NpmPackageCacheFolderId; use deno_npm::NpmPackageId; use deno_npm::NpmResolutionPackage; use deno_npm::NpmSystemInfo; +use deno_resolver::npm::normalize_pkg_name_for_node_modules_deno_folder; use deno_runtime::deno_fs; use deno_runtime::deno_node::NodePermissions; use deno_semver::package::PackageNv; @@ -159,8 +159,8 @@ impl NpmPackageFsResolver for LocalNpmPackageResolver { &self.root_node_modules_url } - fn node_modules_path(&self) -> Option<&PathBuf> { - Some(&self.root_node_modules_path) + fn node_modules_path(&self) -> Option<&Path> { + Some(self.root_node_modules_path.as_ref()) } fn maybe_package_folder(&self, id: &NpmPackageId) -> Option { @@ -920,20 +920,6 @@ impl SetupCache { } } -/// Normalizes a package name for use at `node_modules/.deno/@[_]` -pub fn normalize_pkg_name_for_node_modules_deno_folder(name: &str) -> Cow { - let name = if name.to_lowercase() == name { - Cow::Borrowed(name) - } else { - Cow::Owned(format!("_{}", mixed_case_package_name_encode(name))) - }; - if name.starts_with('@') { - name.replace('/', "+").into() - } else { - name - } -} - fn get_package_folder_id_folder_name( folder_id: &NpmPackageCacheFolderId, ) -> String { diff --git a/cli/npm/managed/resolvers/mod.rs b/cli/npm/managed/resolvers/mod.rs index 234a6e4dba99ac..36d795ee7e7bc6 100644 --- a/cli/npm/managed/resolvers/mod.rs +++ b/cli/npm/managed/resolvers/mod.rs @@ -15,7 +15,6 @@ use crate::args::NpmInstallDepsProvider; use crate::util::progress_bar::ProgressBar; pub use self::common::NpmPackageFsResolver; -pub use self::local::normalize_pkg_name_for_node_modules_deno_folder; use self::global::GlobalNpmPackageResolver; use self::local::LocalNpmPackageResolver; diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs index 2c9ee20bc85115..1e3c752aee3a15 100644 --- a/cli/npm/mod.rs +++ b/cli/npm/mod.rs @@ -4,6 +4,7 @@ mod byonm; mod common; mod managed; +use std::path::Path; use std::path::PathBuf; use std::sync::Arc; @@ -12,6 +13,7 @@ use deno_ast::ModuleSpecifier; use deno_core::error::AnyError; use deno_core::serde_json; use deno_npm::registry::NpmPackageInfo; +use deno_resolver::npm::ByonmNpmResolver; use deno_runtime::deno_node::NodeRequireResolver; use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageNv; @@ -21,15 +23,15 @@ use node_resolver::NpmResolver; use crate::args::npm_registry_url; use crate::file_fetcher::FileFetcher; -pub use self::byonm::ByonmCliNpmResolver; -pub use self::byonm::CliNpmResolverByonmCreateOptions; +pub use self::byonm::CliByonmNpmResolver; +pub use self::byonm::CliByonmNpmResolverCreateOptions; pub use self::managed::CliNpmResolverManagedCreateOptions; pub use self::managed::CliNpmResolverManagedSnapshotOption; pub use self::managed::ManagedCliNpmResolver; pub enum CliNpmResolverCreateOptions { Managed(CliNpmResolverManagedCreateOptions), - Byonm(CliNpmResolverByonmCreateOptions), + Byonm(CliByonmNpmResolverCreateOptions), } pub async fn create_cli_npm_resolver_for_lsp( @@ -40,7 +42,7 @@ pub async fn create_cli_npm_resolver_for_lsp( Managed(options) => { managed::create_managed_npm_resolver_for_lsp(options).await } - Byonm(options) => byonm::create_byonm_npm_resolver(options), + Byonm(options) => Arc::new(ByonmNpmResolver::new(options)), } } @@ -50,14 +52,14 @@ pub async fn create_cli_npm_resolver( use CliNpmResolverCreateOptions::*; match options { Managed(options) => managed::create_managed_npm_resolver(options).await, - Byonm(options) => Ok(byonm::create_byonm_npm_resolver(options)), + Byonm(options) => Ok(Arc::new(ByonmNpmResolver::new(options))), } } pub enum InnerCliNpmResolverRef<'a> { Managed(&'a ManagedCliNpmResolver), #[allow(dead_code)] - Byonm(&'a ByonmCliNpmResolver), + Byonm(&'a CliByonmNpmResolver), } pub trait CliNpmResolver: NpmResolver { @@ -78,14 +80,14 @@ pub trait CliNpmResolver: NpmResolver { } } - fn as_byonm(&self) -> Option<&ByonmCliNpmResolver> { + fn as_byonm(&self) -> Option<&CliByonmNpmResolver> { match self.as_inner() { InnerCliNpmResolverRef::Managed(_) => None, InnerCliNpmResolverRef::Byonm(inner) => Some(inner), } } - fn root_node_modules_path(&self) -> Option<&PathBuf>; + fn root_node_modules_path(&self) -> Option<&Path>; fn resolve_pkg_folder_from_deno_module_req( &self, diff --git a/cli/resolver.rs b/cli/resolver.rs index 211f8aba1ca407..7804261b8badde 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -61,6 +61,46 @@ pub struct ModuleCodeStringSource { pub media_type: MediaType, } +#[derive(Debug, Clone)] +pub struct CliDenoResolverFs(pub Arc); + +impl deno_resolver::fs::DenoResolverFs for CliDenoResolverFs { + fn read_to_string_lossy(&self, path: &Path) -> std::io::Result { + self + .0 + .read_text_file_lossy_sync(path, None) + .map_err(|e| e.into_io_error()) + } + + fn realpath_sync(&self, path: &Path) -> std::io::Result { + self.0.realpath_sync(path).map_err(|e| e.into_io_error()) + } + + fn is_dir_sync(&self, path: &Path) -> bool { + self.0.is_dir_sync(path) + } + + fn read_dir_sync( + &self, + dir_path: &Path, + ) -> std::io::Result> { + self + .0 + .read_dir_sync(dir_path) + .map(|entries| { + entries + .into_iter() + .map(|e| deno_resolver::fs::DirEntry { + name: e.name, + is_file: e.is_file, + is_directory: e.is_directory, + }) + .collect::>() + }) + .map_err(|err| err.into_io_error()) + } +} + #[derive(Debug)] pub struct CliNodeResolver { cjs_resolutions: Arc, diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 56f76ffb9b16c8..258de0dad3980c 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -60,11 +60,12 @@ use crate::cache::RealDenoCacheEnv; use crate::http_util::HttpClientProvider; use crate::node::CliCjsCodeAnalyzer; use crate::npm::create_cli_npm_resolver; -use crate::npm::CliNpmResolverByonmCreateOptions; +use crate::npm::CliByonmNpmResolverCreateOptions; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; use crate::resolver::CjsResolutionStore; +use crate::resolver::CliDenoResolverFs; use crate::resolver::CliNodeResolver; use crate::resolver::NpmModuleLoader; use crate::util::progress_bar::ProgressBar; @@ -530,8 +531,8 @@ pub async fn run( let fs = Arc::new(DenoCompileFileSystem::new(vfs)) as Arc; let npm_resolver = create_cli_npm_resolver( - CliNpmResolverCreateOptions::Byonm(CliNpmResolverByonmCreateOptions { - fs: fs.clone(), + CliNpmResolverCreateOptions::Byonm(CliByonmNpmResolverCreateOptions { + fs: CliDenoResolverFs(fs.clone()), root_node_modules_dir, }), ) diff --git a/cli/tools/task.rs b/cli/tools/task.rs index a5a5027d0f01a2..464b65d984fc28 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -190,9 +190,7 @@ async fn run_task(opts: RunTaskOptions<'_>) -> Result { custom_commands, init_cwd: opts.cli_options.initial_cwd(), argv: cli_options.argv(), - root_node_modules_dir: npm_resolver - .root_node_modules_path() - .map(|p| p.as_path()), + root_node_modules_dir: npm_resolver.root_node_modules_path(), }) .await } diff --git a/cli/util/fs.rs b/cli/util/fs.rs index 9734d417e51bae..a021ec19c014b1 100644 --- a/cli/util/fs.rs +++ b/cli/util/fs.rs @@ -20,7 +20,6 @@ use deno_core::error::AnyError; use deno_core::unsync::spawn_blocking; use deno_core::ModuleSpecifier; use deno_runtime::deno_fs::FileSystem; -use deno_runtime::deno_node::PathClean; use crate::util::path::get_atomic_file_path; use crate::util::progress_bar::ProgressBar; @@ -290,48 +289,18 @@ pub fn canonicalize_path(path: &Path) -> Result { pub fn canonicalize_path_maybe_not_exists( path: &Path, ) -> Result { - canonicalize_path_maybe_not_exists_with_custom_fn(path, canonicalize_path) + deno_path_util::canonicalize_path_maybe_not_exists(path, &canonicalize_path) } pub fn canonicalize_path_maybe_not_exists_with_fs( path: &Path, fs: &dyn FileSystem, ) -> Result { - canonicalize_path_maybe_not_exists_with_custom_fn(path, |path| { + deno_path_util::canonicalize_path_maybe_not_exists(path, &|path| { fs.realpath_sync(path).map_err(|err| err.into_io_error()) }) } -fn canonicalize_path_maybe_not_exists_with_custom_fn( - path: &Path, - canonicalize: impl Fn(&Path) -> Result, -) -> Result { - let path = path.to_path_buf().clean(); - let mut path = path.as_path(); - let mut names_stack = Vec::new(); - loop { - match canonicalize(path) { - Ok(mut canonicalized_path) => { - for name in names_stack.into_iter().rev() { - canonicalized_path = canonicalized_path.join(name); - } - return Ok(canonicalized_path); - } - Err(err) if err.kind() == ErrorKind::NotFound => { - names_stack.push(match path.file_name() { - Some(name) => name.to_owned(), - None => return Err(err), - }); - path = match path.parent() { - Some(parent) => parent, - None => return Err(err), - }; - } - Err(err) => return Err(err), - } - } -} - /// Collects module specifiers that satisfy the given predicate as a file path, by recursively walking `include`. /// Specifiers that start with http and https are left intact. /// Note: This ignores all .git and node_modules folders. diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index 23c43810a0a970..a14635c38bc9ee 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -16,8 +16,13 @@ path = "lib.rs" [features] [dependencies] +anyhow.workspace = true +base32.workspace = true deno_media_type.workspace = true +deno_package_json.workspace = true deno_path_util.workspace = true +deno_semver.workspace = true +node_resolver.workspace = true url.workspace = true [dev-dependencies] diff --git a/resolvers/deno/clippy.toml b/resolvers/deno/clippy.toml new file mode 100644 index 00000000000000..733ac83da1821e --- /dev/null +++ b/resolvers/deno/clippy.toml @@ -0,0 +1,52 @@ +disallowed-methods = [ + { path = "std::env::current_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::canonicalize", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::is_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::is_file", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::is_symlink", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::metadata", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::read_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::read_link", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::symlink_metadata", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::try_exists", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::exists", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::canonicalize", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::is_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::is_file", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::is_symlink", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::metadata", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::read_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::read_link", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::symlink_metadata", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::PathBuf::try_exists", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::env::set_current_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::env::temp_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::canonicalize", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::copy", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::create_dir_all", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::create_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::DirBuilder::new", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::hard_link", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::metadata", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::OpenOptions::new", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::read_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::read_link", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::read_to_string", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::read", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::remove_dir_all", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::remove_dir", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::remove_file", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::rename", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::set_permissions", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::symlink_metadata", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::fs::write", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::canonicalize", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "std::path::Path::exists", reason = "File system operations should be done using DenoResolverFs trait" }, + { path = "url::Url::to_file_path", reason = "Use deno_path_util instead so it works in Wasm" }, + { path = "url::Url::from_file_path", reason = "Use deno_path_util instead so it works in Wasm" }, + { path = "url::Url::from_directory_path", reason = "Use deno_path_util instead so it works in Wasm" }, +] +disallowed-types = [ + # todo(dsherret): consider for the future + # { path = "std::sync::Arc", reason = "use crate::sync::MaybeArc instead" }, +] diff --git a/resolvers/deno/fs.rs b/resolvers/deno/fs.rs new file mode 100644 index 00000000000000..b08be37982fc75 --- /dev/null +++ b/resolvers/deno/fs.rs @@ -0,0 +1,27 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::path::Path; +use std::path::PathBuf; + +pub struct DirEntry { + pub name: String, + pub is_file: bool, + pub is_directory: bool, +} + +pub trait DenoResolverFs { + fn read_to_string_lossy(&self, path: &Path) -> std::io::Result; + fn realpath_sync(&self, path: &Path) -> std::io::Result; + fn is_dir_sync(&self, path: &Path) -> bool; + fn read_dir_sync(&self, dir_path: &Path) -> std::io::Result>; +} + +pub(crate) struct DenoPkgJsonFsAdapter<'a, Fs: DenoResolverFs>(pub &'a Fs); + +impl<'a, Fs: DenoResolverFs> deno_package_json::fs::DenoPkgJsonFs + for DenoPkgJsonFsAdapter<'a, Fs> +{ + fn read_to_string_lossy(&self, path: &Path) -> std::io::Result { + self.0.read_to_string_lossy(path) + } +} diff --git a/resolvers/deno/lib.rs b/resolvers/deno/lib.rs index 7d7796d776e024..57fa67512ab200 100644 --- a/resolvers/deno/lib.rs +++ b/resolvers/deno/lib.rs @@ -1,3 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +pub mod fs; +pub mod npm; pub mod sloppy_imports; diff --git a/resolvers/deno/npm/byonm.rs b/resolvers/deno/npm/byonm.rs new file mode 100644 index 00000000000000..c847cee0f27cce --- /dev/null +++ b/resolvers/deno/npm/byonm.rs @@ -0,0 +1,348 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::borrow::Cow; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + +use anyhow::bail; +use anyhow::Error as AnyError; +use deno_package_json::PackageJson; +use deno_package_json::PackageJsonDepValue; +use deno_path_util::url_to_file_path; +use deno_semver::package::PackageReq; +use deno_semver::Version; +use node_resolver::errors::PackageFolderResolveError; +use node_resolver::errors::PackageFolderResolveIoError; +use node_resolver::errors::PackageJsonLoadError; +use node_resolver::errors::PackageNotFoundError; +use node_resolver::load_pkg_json; +use node_resolver::NpmResolver; +use url::Url; + +use crate::fs::DenoPkgJsonFsAdapter; +use crate::fs::DenoResolverFs; + +use super::local::normalize_pkg_name_for_node_modules_deno_folder; + +pub struct ByonmNpmResolverCreateOptions { + pub fs: Fs, + // todo(dsherret): investigate removing this + pub root_node_modules_dir: Option, +} + +#[derive(Debug)] +pub struct ByonmNpmResolver { + fs: Fs, + root_node_modules_dir: Option, +} + +impl Clone for ByonmNpmResolver { + fn clone(&self) -> Self { + Self { + fs: self.fs.clone(), + root_node_modules_dir: self.root_node_modules_dir.clone(), + } + } +} + +impl ByonmNpmResolver { + pub fn new(options: ByonmNpmResolverCreateOptions) -> Self { + Self { + fs: options.fs, + root_node_modules_dir: options.root_node_modules_dir, + } + } + + pub fn root_node_modules_dir(&self) -> Option<&Path> { + self.root_node_modules_dir.as_deref() + } + + fn load_pkg_json( + &self, + path: &Path, + ) -> Result>, PackageJsonLoadError> { + load_pkg_json(&DenoPkgJsonFsAdapter(&self.fs), path) + } + + /// Finds the ancestor package.json that contains the specified dependency. + pub fn find_ancestor_package_json_with_dep( + &self, + dep_name: &str, + referrer: &Url, + ) -> Option> { + let referrer_path = url_to_file_path(referrer).ok()?; + let mut current_folder = referrer_path.parent()?; + loop { + let pkg_json_path = current_folder.join("package.json"); + if let Ok(Some(pkg_json)) = self.load_pkg_json(&pkg_json_path) { + if let Some(deps) = &pkg_json.dependencies { + if deps.contains_key(dep_name) { + return Some(pkg_json); + } + } + if let Some(deps) = &pkg_json.dev_dependencies { + if deps.contains_key(dep_name) { + return Some(pkg_json); + } + } + } + + if let Some(parent) = current_folder.parent() { + current_folder = parent; + } else { + return None; + } + } + } + + pub fn resolve_pkg_folder_from_deno_module_req( + &self, + req: &PackageReq, + referrer: &Url, + ) -> Result { + fn node_resolve_dir( + fs: &Fs, + alias: &str, + start_dir: &Path, + ) -> Result, AnyError> { + for ancestor in start_dir.ancestors() { + let node_modules_folder = ancestor.join("node_modules"); + let sub_dir = join_package_name(&node_modules_folder, alias); + if fs.is_dir_sync(&sub_dir) { + return Ok(Some(deno_path_util::canonicalize_path_maybe_not_exists( + &sub_dir, + &|path| fs.realpath_sync(path), + )?)); + } + } + Ok(None) + } + + // now attempt to resolve if it's found in any package.json + let maybe_pkg_json_and_alias = + self.resolve_pkg_json_and_alias_for_req(req, referrer)?; + match maybe_pkg_json_and_alias { + Some((pkg_json, alias)) => { + // now try node resolution + if let Some(resolved) = + node_resolve_dir(&self.fs, &alias, pkg_json.dir_path())? + { + return Ok(resolved); + } + + bail!( + concat!( + "Could not find \"{}\" in a node_modules folder. ", + "Deno expects the node_modules/ directory to be up to date. ", + "Did you forget to run `deno install`?" + ), + alias, + ); + } + None => { + // now check if node_modules/.deno/ matches this constraint + if let Some(folder) = self.resolve_folder_in_root_node_modules(req) { + return Ok(folder); + } + + bail!( + concat!( + "Could not find a matching package for 'npm:{}' in the node_modules ", + "directory. Ensure you have all your JSR and npm dependencies listed ", + "in your deno.json or package.json, then run `deno install`. Alternatively, ", + r#"turn on auto-install by specifying `"nodeModulesDir": "auto"` in your "#, + "deno.json file." + ), + req, + ); + } + } + } + + fn resolve_pkg_json_and_alias_for_req( + &self, + req: &PackageReq, + referrer: &Url, + ) -> Result, String)>, AnyError> { + fn resolve_alias_from_pkg_json( + req: &PackageReq, + pkg_json: &PackageJson, + ) -> Option { + let deps = pkg_json.resolve_local_package_json_deps(); + for (key, value) in deps { + if let Ok(value) = value { + match value { + PackageJsonDepValue::Req(dep_req) => { + if dep_req.name == req.name + && dep_req.version_req.intersects(&req.version_req) + { + return Some(key); + } + } + PackageJsonDepValue::Workspace(_workspace) => { + if key == req.name && req.version_req.tag() == Some("workspace") { + return Some(key); + } + } + } + } + } + None + } + + // attempt to resolve the npm specifier from the referrer's package.json, + if let Ok(file_path) = url_to_file_path(referrer) { + let mut current_path = file_path.as_path(); + while let Some(dir_path) = current_path.parent() { + let package_json_path = dir_path.join("package.json"); + if let Some(pkg_json) = self.load_pkg_json(&package_json_path)? { + if let Some(alias) = + resolve_alias_from_pkg_json(req, pkg_json.as_ref()) + { + return Ok(Some((pkg_json, alias))); + } + } + current_path = dir_path; + } + } + + // otherwise, fall fallback to the project's package.json + if let Some(root_node_modules_dir) = &self.root_node_modules_dir { + let root_pkg_json_path = + root_node_modules_dir.parent().unwrap().join("package.json"); + if let Some(pkg_json) = self.load_pkg_json(&root_pkg_json_path)? { + if let Some(alias) = resolve_alias_from_pkg_json(req, pkg_json.as_ref()) + { + return Ok(Some((pkg_json, alias))); + } + } + } + + Ok(None) + } + + fn resolve_folder_in_root_node_modules( + &self, + req: &PackageReq, + ) -> Option { + // now check if node_modules/.deno/ matches this constraint + let root_node_modules_dir = self.root_node_modules_dir.as_ref()?; + let node_modules_deno_dir = root_node_modules_dir.join(".deno"); + let Ok(entries) = self.fs.read_dir_sync(&node_modules_deno_dir) else { + return None; + }; + let search_prefix = format!( + "{}@", + normalize_pkg_name_for_node_modules_deno_folder(&req.name) + ); + let mut best_version = None; + + // example entries: + // - @denotest+add@1.0.0 + // - @denotest+add@1.0.0_1 + for entry in entries { + if !entry.is_directory { + continue; + } + let Some(version_and_copy_idx) = entry.name.strip_prefix(&search_prefix) + else { + continue; + }; + let version = version_and_copy_idx + .rsplit_once('_') + .map(|(v, _)| v) + .unwrap_or(version_and_copy_idx); + let Ok(version) = Version::parse_from_npm(version) else { + continue; + }; + if req.version_req.matches(&version) { + if let Some((best_version_version, _)) = &best_version { + if version > *best_version_version { + best_version = Some((version, entry.name)); + } + } else { + best_version = Some((version, entry.name)); + } + } + } + + best_version.map(|(_version, entry_name)| { + join_package_name( + &node_modules_deno_dir.join(entry_name).join("node_modules"), + &req.name, + ) + }) + } +} + +impl NpmResolver + for ByonmNpmResolver +{ + fn resolve_package_folder_from_package( + &self, + name: &str, + referrer: &Url, + ) -> Result { + fn inner( + fs: &Fs, + name: &str, + referrer: &Url, + ) -> Result { + let maybe_referrer_file = url_to_file_path(referrer).ok(); + let maybe_start_folder = + maybe_referrer_file.as_ref().and_then(|f| f.parent()); + if let Some(start_folder) = maybe_start_folder { + for current_folder in start_folder.ancestors() { + let node_modules_folder = if current_folder.ends_with("node_modules") + { + Cow::Borrowed(current_folder) + } else { + Cow::Owned(current_folder.join("node_modules")) + }; + + let sub_dir = join_package_name(&node_modules_folder, name); + if fs.is_dir_sync(&sub_dir) { + return Ok(sub_dir); + } + } + } + + Err( + PackageNotFoundError { + package_name: name.to_string(), + referrer: referrer.clone(), + referrer_extra: None, + } + .into(), + ) + } + + let path = inner(&self.fs, name, referrer)?; + self.fs.realpath_sync(&path).map_err(|err| { + PackageFolderResolveIoError { + package_name: name.to_string(), + referrer: referrer.clone(), + source: err, + } + .into() + }) + } + + fn in_npm_package(&self, specifier: &Url) -> bool { + specifier.scheme() == "file" + && specifier + .path() + .to_ascii_lowercase() + .contains("/node_modules/") + } +} + +fn join_package_name(path: &Path, package_name: &str) -> PathBuf { + let mut path = path.to_path_buf(); + // ensure backslashes are used on windows + for part in package_name.split('/') { + path = path.join(part); + } + path +} diff --git a/resolvers/deno/npm/local.rs b/resolvers/deno/npm/local.rs new file mode 100644 index 00000000000000..aef476ad945bb0 --- /dev/null +++ b/resolvers/deno/npm/local.rs @@ -0,0 +1,27 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::borrow::Cow; + +/// Normalizes a package name for use at `node_modules/.deno/@[_]` +pub fn normalize_pkg_name_for_node_modules_deno_folder(name: &str) -> Cow { + let name = if name.to_lowercase() == name { + Cow::Borrowed(name) + } else { + Cow::Owned(format!("_{}", mixed_case_package_name_encode(name))) + }; + if name.starts_with('@') { + name.replace('/', "+").into() + } else { + name + } +} + +fn mixed_case_package_name_encode(name: &str) -> String { + // use base32 encoding because it's reversible and the character set + // only includes the characters within 0-9 and A-Z so it can be lower cased + base32::encode( + base32::Alphabet::Rfc4648Lower { padding: false }, + name.as_bytes(), + ) + .to_lowercase() +} diff --git a/resolvers/deno/npm/mod.rs b/resolvers/deno/npm/mod.rs new file mode 100644 index 00000000000000..2e24144cd6e4ee --- /dev/null +++ b/resolvers/deno/npm/mod.rs @@ -0,0 +1,8 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +mod byonm; +mod local; + +pub use byonm::ByonmNpmResolver; +pub use byonm::ByonmNpmResolverCreateOptions; +pub use local::normalize_pkg_name_for_node_modules_deno_folder; diff --git a/resolvers/deno/sloppy_imports.rs b/resolvers/deno/sloppy_imports.rs index e4d0898e5d19ed..e215e876860bd9 100644 --- a/resolvers/deno/sloppy_imports.rs +++ b/resolvers/deno/sloppy_imports.rs @@ -5,6 +5,7 @@ use std::path::Path; use std::path::PathBuf; use deno_media_type::MediaType; +use deno_path_util::url_from_file_path; use deno_path_util::url_to_file_path; use url::Url; @@ -343,7 +344,7 @@ impl SloppyImportsResolver { for (probe_path, reason) in probe_paths { if self.fs.is_file(&probe_path) { - if let Ok(specifier) = Url::from_file_path(probe_path) { + if let Ok(specifier) = url_from_file_path(&probe_path) { match reason { SloppyImportsResolutionReason::JsToTs => { return Some(SloppyImportsResolution::JsToTs(specifier)); @@ -386,6 +387,7 @@ mod test { struct RealSloppyImportsResolverFs; impl SloppyImportResolverFs for RealSloppyImportsResolverFs { fn stat_sync(&self, path: &Path) -> Option { + #[allow(clippy::disallowed_methods)] let stat = std::fs::metadata(path).ok()?; if stat.is_dir() { Some(SloppyImportsFsEntry::Dir) diff --git a/resolvers/node/Cargo.toml b/resolvers/node/Cargo.toml index 1042045692b419..c2f2f1cc1a06d5 100644 --- a/resolvers/node/Cargo.toml +++ b/resolvers/node/Cargo.toml @@ -21,6 +21,7 @@ anyhow.workspace = true async-trait.workspace = true deno_media_type.workspace = true deno_package_json.workspace = true +deno_path_util.workspace = true futures.workspace = true lazy-regex.workspace = true once_cell.workspace = true diff --git a/resolvers/node/analyze.rs b/resolvers/node/analyze.rs index deb56d064ef909..009296006afc8b 100644 --- a/resolvers/node/analyze.rs +++ b/resolvers/node/analyze.rs @@ -6,6 +6,8 @@ use std::collections::HashSet; use std::path::Path; use std::path::PathBuf; +use deno_path_util::url_from_file_path; +use deno_path_util::url_to_file_path; use futures::future::LocalBoxFuture; use futures::stream::FuturesUnordered; use futures::FutureExt; @@ -18,7 +20,6 @@ use url::Url; use crate::env::NodeResolverEnv; use crate::package_json::load_pkg_json; -use crate::path::to_file_specifier; use crate::resolution::NodeResolverRc; use crate::NodeModuleKind; use crate::NodeResolutionMode; @@ -135,8 +136,7 @@ impl source.push(format!( "const mod = require(\"{}\");", - entry_specifier - .to_file_path() + url_to_file_path(entry_specifier) .unwrap() .to_str() .unwrap() @@ -297,15 +297,13 @@ impl todo!(); } - let referrer_path = referrer.to_file_path().unwrap(); + let referrer_path = url_to_file_path(referrer).unwrap(); if specifier.starts_with("./") || specifier.starts_with("../") { if let Some(parent) = referrer_path.parent() { - return Some( - self - .file_extension_probe(parent.join(specifier), &referrer_path) - .map(|p| to_file_specifier(&p)), - ) - .transpose(); + return self + .file_extension_probe(parent.join(specifier), &referrer_path) + .and_then(|p| url_from_file_path(&p).map_err(AnyError::from)) + .map(Some); } else { todo!(); } @@ -362,24 +360,22 @@ impl load_pkg_json(self.env.pkg_json_fs(), &package_json_path)?; if let Some(package_json) = maybe_package_json { if let Some(main) = package_json.main(NodeModuleKind::Cjs) { - return Ok(Some(to_file_specifier(&d.join(main).clean()))); + return Ok(Some(url_from_file_path(&d.join(main).clean())?)); } } - return Ok(Some(to_file_specifier(&d.join("index.js").clean()))); + return Ok(Some(url_from_file_path(&d.join("index.js").clean())?)); } - return Some( - self - .file_extension_probe(d, &referrer_path) - .map(|p| to_file_specifier(&p)), - ) - .transpose(); + return self + .file_extension_probe(d, &referrer_path) + .and_then(|p| url_from_file_path(&p).map_err(AnyError::from)) + .map(Some); } else if let Some(main) = package_json.main(NodeModuleKind::Cjs) { - return Ok(Some(to_file_specifier(&module_dir.join(main).clean()))); + return Ok(Some(url_from_file_path(&module_dir.join(main).clean())?)); } else { - return Ok(Some(to_file_specifier( + return Ok(Some(url_from_file_path( &module_dir.join("index.js").clean(), - ))); + )?)); } } @@ -395,7 +391,7 @@ impl parent.join("node_modules").join(specifier) }; if let Ok(path) = self.file_extension_probe(path, &referrer_path) { - return Ok(Some(to_file_specifier(&path))); + return Ok(Some(url_from_file_path(&path)?)); } last = parent; } diff --git a/resolvers/node/clippy.toml b/resolvers/node/clippy.toml index 86150781bb94f7..90eaba3fae2a8f 100644 --- a/resolvers/node/clippy.toml +++ b/resolvers/node/clippy.toml @@ -42,6 +42,9 @@ disallowed-methods = [ { path = "std::fs::write", reason = "File system operations should be done using NodeResolverFs trait" }, { path = "std::path::Path::canonicalize", reason = "File system operations should be done using NodeResolverFs trait" }, { path = "std::path::Path::exists", reason = "File system operations should be done using NodeResolverFs trait" }, + { path = "url::Url::to_file_path", reason = "Use deno_path_util instead so it works in Wasm" }, + { path = "url::Url::from_file_path", reason = "Use deno_path_util instead so it works in Wasm" }, + { path = "url::Url::from_directory_path", reason = "Use deno_path_util instead so it works in Wasm" }, ] disallowed-types = [ { path = "std::sync::Arc", reason = "use crate::sync::MaybeArc instead" }, diff --git a/resolvers/node/npm.rs b/resolvers/node/npm.rs index 77df57c489d2e7..6b5f21db62b643 100644 --- a/resolvers/node/npm.rs +++ b/resolvers/node/npm.rs @@ -3,6 +3,8 @@ use std::path::Path; use std::path::PathBuf; +use deno_path_util::url_from_directory_path; +use deno_path_util::url_from_file_path; use url::Url; use crate::errors; @@ -24,7 +26,7 @@ pub trait NpmResolver: std::fmt::Debug + MaybeSend + MaybeSync { fn in_npm_package(&self, specifier: &Url) -> bool; fn in_npm_package_at_dir_path(&self, path: &Path) -> bool { - let specifier = match Url::from_directory_path(path.to_path_buf().clean()) { + let specifier = match url_from_directory_path(&path.to_path_buf().clean()) { Ok(p) => p, Err(_) => return false, }; @@ -32,7 +34,7 @@ pub trait NpmResolver: std::fmt::Debug + MaybeSend + MaybeSync { } fn in_npm_package_at_file_path(&self, path: &Path) -> bool { - let specifier = match Url::from_file_path(path.to_path_buf().clean()) { + let specifier = match url_from_file_path(&path.to_path_buf().clean()) { Ok(p) => p, Err(_) => return false, }; diff --git a/resolvers/node/path.rs b/resolvers/node/path.rs index ece270cd9169ed..8c2d35fadf3fad 100644 --- a/resolvers/node/path.rs +++ b/resolvers/node/path.rs @@ -4,8 +4,6 @@ use std::path::Component; use std::path::Path; use std::path::PathBuf; -use url::Url; - /// Extension to path_clean::PathClean pub trait PathClean { fn clean(&self) -> T; @@ -65,65 +63,6 @@ impl PathClean for PathBuf { } } -pub(crate) fn to_file_specifier(path: &Path) -> Url { - match Url::from_file_path(path) { - Ok(url) => url, - Err(_) => panic!("Invalid path: {}", path.display()), - } -} - -// todo(dsherret): we have the below code also in deno_core and it -// would be good to somehow re-use it in both places (we don't want -// to create a dependency on deno_core here) - -#[cfg(not(windows))] -#[inline] -pub fn strip_unc_prefix(path: PathBuf) -> PathBuf { - path -} - -/// Strips the unc prefix (ex. \\?\) from Windows paths. -#[cfg(windows)] -pub fn strip_unc_prefix(path: PathBuf) -> PathBuf { - use std::path::Component; - use std::path::Prefix; - - let mut components = path.components(); - match components.next() { - Some(Component::Prefix(prefix)) => { - match prefix.kind() { - // \\?\device - Prefix::Verbatim(device) => { - let mut path = PathBuf::new(); - path.push(format!(r"\\{}\", device.to_string_lossy())); - path.extend(components.filter(|c| !matches!(c, Component::RootDir))); - path - } - // \\?\c:\path - Prefix::VerbatimDisk(_) => { - let mut path = PathBuf::new(); - path.push(prefix.as_os_str().to_string_lossy().replace(r"\\?\", "")); - path.extend(components); - path - } - // \\?\UNC\hostname\share_name\path - Prefix::VerbatimUNC(hostname, share_name) => { - let mut path = PathBuf::new(); - path.push(format!( - r"\\{}\{}\", - hostname.to_string_lossy(), - share_name.to_string_lossy() - )); - path.extend(components.filter(|c| !matches!(c, Component::RootDir))); - path - } - _ => path, - } - } - _ => path, - } -} - #[cfg(test)] mod test { #[cfg(windows)] @@ -139,41 +78,4 @@ mod test { assert_eq!(PathBuf::from(input).clean(), PathBuf::from(expected)); } } - - #[cfg(windows)] - #[test] - fn test_strip_unc_prefix() { - use std::path::PathBuf; - - run_test(r"C:\", r"C:\"); - run_test(r"C:\test\file.txt", r"C:\test\file.txt"); - - run_test(r"\\?\C:\", r"C:\"); - run_test(r"\\?\C:\test\file.txt", r"C:\test\file.txt"); - - run_test(r"\\.\C:\", r"\\.\C:\"); - run_test(r"\\.\C:\Test\file.txt", r"\\.\C:\Test\file.txt"); - - run_test(r"\\?\UNC\localhost\", r"\\localhost"); - run_test(r"\\?\UNC\localhost\c$\", r"\\localhost\c$"); - run_test( - r"\\?\UNC\localhost\c$\Windows\file.txt", - r"\\localhost\c$\Windows\file.txt", - ); - run_test(r"\\?\UNC\wsl$\deno.json", r"\\wsl$\deno.json"); - - run_test(r"\\?\server1", r"\\server1"); - run_test(r"\\?\server1\e$\", r"\\server1\e$\"); - run_test( - r"\\?\server1\e$\test\file.txt", - r"\\server1\e$\test\file.txt", - ); - - fn run_test(input: &str, expected: &str) { - assert_eq!( - super::strip_unc_prefix(PathBuf::from(input)), - PathBuf::from(expected) - ); - } - } } diff --git a/resolvers/node/resolution.rs b/resolvers/node/resolution.rs index ad9dbb7100c092..811583a5ee0474 100644 --- a/resolvers/node/resolution.rs +++ b/resolvers/node/resolution.rs @@ -8,6 +8,8 @@ use anyhow::bail; use anyhow::Error as AnyError; use deno_media_type::MediaType; use deno_package_json::PackageJsonRc; +use deno_path_util::strip_unc_prefix; +use deno_path_util::url_from_file_path; use serde_json::Map; use serde_json::Value; use url::Url; @@ -47,8 +49,6 @@ use crate::errors::TypesNotFoundErrorData; use crate::errors::UnsupportedDirImportError; use crate::errors::UnsupportedEsmUrlSchemeError; use crate::errors::UrlToNodeResolutionError; -use crate::path::strip_unc_prefix; -use crate::path::to_file_specifier; use crate::NpmResolverRc; use crate::PathClean; use deno_package_json::PackageJson; @@ -394,7 +394,7 @@ impl NodeResolver { message: err.to_string(), } })?; - let url = to_file_specifier(&package_folder.join(bin_entry)); + let url = url_from_file_path(&package_folder.join(bin_entry)).unwrap(); let resolve_response = self.url_to_node_resolution(url)?; // TODO(bartlomieju): skipped checking errors for commonJS resolution and @@ -485,12 +485,12 @@ impl NodeResolver { || lowercase_path.ends_with(".d.cts") || lowercase_path.ends_with(".d.mts") { - return Ok(to_file_specifier(path)); + return Ok(url_from_file_path(path).unwrap()); } if let Some(path) = probe_extensions(&self.env, path, &lowercase_path, referrer_kind) { - return Ok(to_file_specifier(&path)); + return Ok(url_from_file_path(&path).unwrap()); } if self.env.is_dir_sync(path) { let resolution_result = self.resolve_package_dir_subpath( @@ -514,15 +514,15 @@ impl NodeResolver { &index_path.to_string_lossy().to_lowercase(), referrer_kind, ) { - return Ok(to_file_specifier(&path)); + return Ok(url_from_file_path(&path).unwrap()); } } // allow resolving .css files for types resolution if lowercase_path.ends_with(".css") { - return Ok(to_file_specifier(path)); + return Ok(url_from_file_path(path).unwrap()); } Err(TypesNotFoundError(Box::new(TypesNotFoundErrorData { - code_specifier: to_file_specifier(path), + code_specifier: url_from_file_path(path).unwrap(), maybe_referrer: maybe_referrer.cloned(), }))) } @@ -673,7 +673,8 @@ impl NodeResolver { } else { format!("{target}{subpath}") }; - let package_json_url = to_file_specifier(package_json_path); + let package_json_url = + url_from_file_path(package_json_path).unwrap(); let result = match self.package_resolve( &export_target, &package_json_url, @@ -760,7 +761,7 @@ impl NodeResolver { ); } if subpath.is_empty() { - return Ok(to_file_specifier(&resolved_path)); + return Ok(url_from_file_path(&resolved_path).unwrap()); } if invalid_segment_re.is_match(subpath) { let request = if pattern { @@ -782,9 +783,11 @@ impl NodeResolver { let resolved_path_str = resolved_path.to_string_lossy(); let replaced = pattern_re .replace(&resolved_path_str, |_caps: ®ex::Captures| subpath); - return Ok(to_file_specifier(&PathBuf::from(replaced.to_string()))); + return Ok( + url_from_file_path(&PathBuf::from(replaced.to_string())).unwrap(), + ); } - Ok(to_file_specifier(&resolved_path.join(subpath).clean())) + Ok(url_from_file_path(&resolved_path.join(subpath).clean()).unwrap()) } #[allow(clippy::too_many_arguments)] @@ -871,7 +874,7 @@ impl NodeResolver { mode, )?; if mode.is_types() && url.scheme() == "file" { - let path = url.to_file_path().unwrap(); + let path = deno_path_util::url_to_file_path(&url).unwrap(); return Ok(Some(self.path_to_declaration_url( &path, maybe_referrer, @@ -1307,7 +1310,7 @@ impl NodeResolver { if mode.is_types() { Ok(self.path_to_declaration_url(&file_path, referrer, referrer_kind)?) } else { - Ok(to_file_specifier(&file_path)) + Ok(url_from_file_path(&file_path).unwrap()) } } @@ -1338,7 +1341,7 @@ impl NodeResolver { &self, url: &Url, ) -> Result, ClosestPkgJsonError> { - let Ok(file_path) = url.to_file_path() else { + let Ok(file_path) = deno_path_util::url_to_file_path(url) else { return Ok(None); }; self.get_closest_package_json_from_path(&file_path) @@ -1433,7 +1436,7 @@ impl NodeResolver { if let Some(main) = maybe_main { let guess = package_json.path.parent().unwrap().join(main).clean(); if self.env.is_file_sync(&guess) { - return Ok(to_file_specifier(&guess)); + return Ok(url_from_file_path(&guess).unwrap()); } // todo(dsherret): investigate exactly how node and typescript handles this @@ -1463,7 +1466,7 @@ impl NodeResolver { .clean(); if self.env.is_file_sync(&guess) { // TODO(bartlomieju): emitLegacyIndexDeprecation() - return Ok(to_file_specifier(&guess)); + return Ok(url_from_file_path(&guess).unwrap()); } } } @@ -1496,14 +1499,15 @@ impl NodeResolver { let guess = directory.join(index_file_name).clean(); if self.env.is_file_sync(&guess) { // TODO(bartlomieju): emitLegacyIndexDeprecation() - return Ok(to_file_specifier(&guess)); + return Ok(url_from_file_path(&guess).unwrap()); } } if mode.is_types() { Err( TypesNotFoundError(Box::new(TypesNotFoundErrorData { - code_specifier: to_file_specifier(&directory.join("index.js")), + code_specifier: url_from_file_path(&directory.join("index.js")) + .unwrap(), maybe_referrer: maybe_referrer.cloned(), })) .into(), @@ -1511,7 +1515,7 @@ impl NodeResolver { } else { Err( ModuleNotFoundError { - specifier: to_file_specifier(&directory.join("index.js")), + specifier: url_from_file_path(&directory.join("index.js")).unwrap(), typ: "module", maybe_referrer: maybe_referrer.cloned(), } @@ -1611,9 +1615,7 @@ fn resolve_bin_entry_value<'a>( } fn to_file_path(url: &Url) -> PathBuf { - url - .to_file_path() - .unwrap_or_else(|_| panic!("Provided URL was not file:// URL: {url}")) + deno_path_util::url_to_file_path(url).unwrap() } fn to_file_path_string(url: &Url) -> String { @@ -1692,7 +1694,7 @@ fn with_known_extension(path: &Path, ext: &str) -> PathBuf { } fn to_specifier_display_string(url: &Url) -> String { - if let Ok(path) = url.to_file_path() { + if let Ok(path) = deno_path_util::url_to_file_path(url) { path.display().to_string() } else { url.to_string() From a7d0a5540fed4ecf0b5ae5f462960cce21a4adf5 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 30 Sep 2024 09:34:20 -0400 Subject: [PATCH 030/436] fix: eagerly error for specifier with empty version constraint (#25944) Eagerly errors for something like `export * from "jsr:@type/is@";` (previously it would just fail elsewhere because it would consider this as having an empty tag) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2263351fc0d8f1..92a3c5056cd0f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2031,9 +2031,9 @@ dependencies = [ [[package]] name = "deno_semver" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6657fecb9ac6a7a71f552c95e8cc492466a75f5660224577e2226bcf30db9768" +checksum = "670fec7ef309384e23c2a90ac5d2d9d91a776d225306c75f5cdd28cf6cc8a59f" dependencies = [ "monch", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index ef9a4576cec564..4ce3105399516e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ deno_npm = "=0.25.2" deno_path_util = "=0.2.0" deno_permissions = { version = "0.28.0", path = "./runtime/permissions" } deno_runtime = { version = "0.177.0", path = "./runtime" } -deno_semver = "=0.5.13" +deno_semver = "=0.5.14" deno_terminal = "0.2.0" napi_sym = { version = "0.98.0", path = "./cli/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } From 05ca6994ca36a152b793654e7c631271b6280521 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 30 Sep 2024 21:14:42 +0530 Subject: [PATCH 031/436] chore: include sha256 checksum in release (#25869) Closes https://github.com/denoland/deno/issues/7253 --- .github/workflows/ci.generate.ts | 26 ++++++++++++++++++++++++-- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 35020a5f8c55b8..b23223fb48d0f1 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -757,8 +757,10 @@ const ci = { ].join("\n"), run: [ "cd target/release", + "shasum -a 256 deno > deno-${{ matrix.arch }}-unknown-linux-gnu.sha256sum", "zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno", "strip denort", + "shasum -a 256 denort > denort-${{ matrix.arch }}-unknown-linux-gnu.sha256sum", "zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort", "./deno types > lib.deno.d.ts", ].join("\n"), @@ -783,8 +785,10 @@ const ci = { "--p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) " + "--entitlements-xml-file=cli/entitlements.plist", "cd target/release", + "shasum -a 256 deno > deno-${{ matrix.arch }}-apple-darwin.sha256sum", "zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno", "strip denort", + "shasum -a 256 denort > denort-${{ matrix.arch }}-apple-darwin.sha256sum", "zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort", ] .join("\n"), @@ -799,7 +803,9 @@ const ci = { ].join("\n"), shell: "pwsh", run: [ + "Get-FileHash target/release/deno.exe -Algorithm SHA256 | Format-List > target/release/deno-${{ matrix.arch }}-pc-windows-msvc.sha256sum", "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip", + "Get-FileHash target/release/denort.exe -Algorithm SHA256 | Format-List > target/release/denort-${{ matrix.arch }}-pc-windows-msvc.sha256sum", "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip", ].join("\n"), }, @@ -813,6 +819,7 @@ const ci = { ].join("\n"), run: [ 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/', + 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/', "echo ${{ github.sha }} > canary-latest.txt", 'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt', ].join("\n"), @@ -994,8 +1001,10 @@ const ci = { "github.repository == 'denoland/deno' &&", "startsWith(github.ref, 'refs/tags/')", ].join("\n"), - run: + run: [ 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/', + 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/', + ].join("\n"), }, { name: "Upload release to dl.deno.land (windows)", @@ -1009,8 +1018,10 @@ const ci = { env: { CLOUDSDK_PYTHON: "${{env.pythonLocation}}\\python.exe", }, - run: + run: [ 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/', + 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/', + ].join("\n"), }, { name: "Create release notes", @@ -1040,15 +1051,25 @@ const ci = { with: { files: [ "target/release/deno-x86_64-pc-windows-msvc.zip", + "target/release/deno-x86_64-pc-windows-msvc.sha256sum", "target/release/denort-x86_64-pc-windows-msvc.zip", + "target/release/denort-x86_64-pc-windows-msvc.sha256sum", "target/release/deno-x86_64-unknown-linux-gnu.zip", + "target/release/deno-x86_64-unknown-linux-gnu.sha256sum", "target/release/denort-x86_64-unknown-linux-gnu.zip", + "target/release/denort-x86_64-unknown-linux-gnu.sha256sum", "target/release/deno-x86_64-apple-darwin.zip", + "target/release/deno-x86_64-apple-darwin.sha256sum", "target/release/denort-x86_64-apple-darwin.zip", + "target/release/denort-x86_64-apple-darwin.sha256sum", "target/release/deno-aarch64-unknown-linux-gnu.zip", + "target/release/deno-aarch64-unknown-linux-gnu.sha256sum", "target/release/denort-aarch64-unknown-linux-gnu.zip", + "target/release/denort-aarch64-unknown-linux-gnu.sha256sum", "target/release/deno-aarch64-apple-darwin.zip", + "target/release/deno-aarch64-apple-darwin.sha256sum", "target/release/denort-aarch64-apple-darwin.zip", + "target/release/denort-aarch64-apple-darwin.sha256sum", "target/release/deno_src.tar.gz", "target/release/lib.deno.d.ts", ].join("\n"), @@ -1067,6 +1088,7 @@ const ci = { "./target", "!./target/*/gn_out", "!./target/*/*.zip", + "!./target/*/*.sha256sum", "!./target/*/*.tar.gz", ].join("\n"), key: prCacheKeyPrefix + "${{ github.sha }}", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 280eb7cb84c06e..df805cb2350088 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -448,8 +448,10 @@ jobs: github.repository == 'denoland/deno') run: |- cd target/release + shasum -a 256 deno > deno-${{ matrix.arch }}-unknown-linux-gnu.sha256sum zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno strip denort + shasum -a 256 denort > denort-${{ matrix.arch }}-unknown-linux-gnu.sha256sum zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort ./deno types > lib.deno.d.ts - name: Pre-release (mac) @@ -465,8 +467,10 @@ jobs: echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes" rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist cd target/release + shasum -a 256 deno > deno-${{ matrix.arch }}-apple-darwin.sha256sum zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno strip denort + shasum -a 256 denort > denort-${{ matrix.arch }}-apple-darwin.sha256sum zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort - name: Pre-release (windows) if: |- @@ -476,7 +480,9 @@ jobs: github.repository == 'denoland/deno') shell: pwsh run: |- + Get-FileHash target/release/deno.exe -Algorithm SHA256 | Format-List > target/release/deno-${{ matrix.arch }}-pc-windows-msvc.sha256sum Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip + Get-FileHash target/release/denort.exe -Algorithm SHA256 | Format-List > target/release/denort-${{ matrix.arch }}-pc-windows-msvc.sha256sum Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip - name: Upload canary to dl.deno.land if: |- @@ -486,6 +492,7 @@ jobs: github.ref == 'refs/heads/main') run: |- gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/ + gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/ echo ${{ github.sha }} > canary-latest.txt gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt - name: Autobahn testsuite @@ -615,7 +622,9 @@ jobs: matrix.profile == 'release' && github.repository == 'denoland/deno' && startsWith(github.ref, 'refs/tags/')) - run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/' + run: |- + gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/ + gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/ - name: Upload release to dl.deno.land (windows) if: |- !(matrix.skip) && (matrix.os == 'windows' && @@ -625,7 +634,9 @@ jobs: startsWith(github.ref, 'refs/tags/')) env: CLOUDSDK_PYTHON: '${{env.pythonLocation}}\python.exe' - run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/' + run: |- + gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/ + gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/ - name: Create release notes if: |- !(matrix.skip) && (matrix.job == 'test' && @@ -647,15 +658,25 @@ jobs: with: files: |- target/release/deno-x86_64-pc-windows-msvc.zip + target/release/deno-x86_64-pc-windows-msvc.sha256sum target/release/denort-x86_64-pc-windows-msvc.zip + target/release/denort-x86_64-pc-windows-msvc.sha256sum target/release/deno-x86_64-unknown-linux-gnu.zip + target/release/deno-x86_64-unknown-linux-gnu.sha256sum target/release/denort-x86_64-unknown-linux-gnu.zip + target/release/denort-x86_64-unknown-linux-gnu.sha256sum target/release/deno-x86_64-apple-darwin.zip + target/release/deno-x86_64-apple-darwin.sha256sum target/release/denort-x86_64-apple-darwin.zip + target/release/denort-x86_64-apple-darwin.sha256sum target/release/deno-aarch64-unknown-linux-gnu.zip + target/release/deno-aarch64-unknown-linux-gnu.sha256sum target/release/denort-aarch64-unknown-linux-gnu.zip + target/release/denort-aarch64-unknown-linux-gnu.sha256sum target/release/deno-aarch64-apple-darwin.zip + target/release/deno-aarch64-apple-darwin.sha256sum target/release/denort-aarch64-apple-darwin.zip + target/release/denort-aarch64-apple-darwin.sha256sum target/release/deno_src.tar.gz target/release/lib.deno.d.ts body_path: target/release/release-notes.md @@ -668,6 +689,7 @@ jobs: ./target !./target/*/gn_out !./target/*/*.zip + !./target/*/*.sha256sum !./target/*/*.tar.gz key: '15-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' publish-canary: From c5c18699921cd45021f8c130eecdc09099c26878 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Mon, 30 Sep 2024 21:25:30 +0200 Subject: [PATCH 032/436] fix: precompile preserve SVG camelCase attributes (#25945) See https://github.com/denoland/deno_ast/pull/278 Fixes https://github.com/denoland/deno/issues/25810 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- tests/specs/npm/require_type_commonjs/main.out | 14 ++++---------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92a3c5056cd0f8..945e4934864222 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1273,9 +1273,9 @@ dependencies = [ [[package]] name = "deno_ast" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b08d11d9e4086b00d3428650e31153cf5896586411763cb88a6423ce5b18791" +checksum = "89ea2fd038c9c7e3e87e624fd708303cd33f39c33707f6c48fa9a65d65fefc47" dependencies = [ "base64 0.21.7", "deno_media_type", diff --git a/Cargo.toml b/Cargo.toml index 4ce3105399516e..ce333c728be61f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ license = "MIT" repository = "https://github.com/denoland/deno" [workspace.dependencies] -deno_ast = { version = "=0.42.0", features = ["transpiling"] } +deno_ast = { version = "=0.42.1", features = ["transpiling"] } deno_core = { version = "0.311.0" } deno_bench_util = { version = "0.162.0", path = "./bench_util" } diff --git a/tests/specs/npm/require_type_commonjs/main.out b/tests/specs/npm/require_type_commonjs/main.out index f7a81572c3248b..d715db8a94e686 100644 --- a/tests/specs/npm/require_type_commonjs/main.out +++ b/tests/specs/npm/require_type_commonjs/main.out @@ -1,10 +1,4 @@ -error: Uncaught (in promise) SyntaxError: Unexpected token 'export' - at Object.evalContext (ext:core/01_core.js:[WILDCARD]) - at wrapSafe (node:module:[WILDCARD]) - at Module._compile (node:module:[WILDCARD]) - at Object.Module._extensions..js (node:module:[WILDCARD]) - at Module.load (node:module:[WILDCARD]) - at Function.Module._load (node:module:[WILDCARD]) - at Module.require (node:module:[WILDCARD]) - at require (node:module:[WILDCARD]) - at file:///[WILDCARD]/@denotest/type-commonjs/1.0.0/index.js:3:13 +error: 'import', and 'export' cannot be used outside of module code at file://[WILDCARD]/@denotest/type-commonjs/1.0.0/index.js:1:1 + + export {}; + ~~~~~~ From d7b787792c09569bd718d9acf2d2b73ae406828c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 30 Sep 2024 15:46:43 -0400 Subject: [PATCH 033/436] fix(info): error instead of panic for npm specifiers when using byonm (#25947) --- cli/args/mod.rs | 4 ---- cli/graph_util.rs | 7 +++++++ tests/specs/info/byonm/__test__.jsonc | 11 +++++++++++ tests/specs/info/byonm/deno.json | 6 ++++++ tests/specs/info/byonm/info.out | 1 + tests/specs/info/byonm/package.json | 5 +++++ 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 tests/specs/info/byonm/__test__.jsonc create mode 100644 tests/specs/info/byonm/deno.json create mode 100644 tests/specs/info/byonm/info.out create mode 100644 tests/specs/info/byonm/package.json diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 3ff2a427fbf4d4..2ae7098da5ab44 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1144,10 +1144,6 @@ impl CliOptions { 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())? } diff --git a/cli/graph_util.rs b/cli/graph_util.rs index f7194ac11b6e38..e2f6246e740c04 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -21,6 +21,7 @@ use crate::tools::check::TypeChecker; use crate::util::file_watcher::WatcherCommunicator; use crate::util::fs::canonicalize_path; use deno_config::workspace::JsrPackageConfig; +use deno_core::anyhow::bail; use deno_graph::source::LoaderChecksum; use deno_graph::FillFromLockfileOptions; use deno_graph::JsrLoadError; @@ -593,6 +594,12 @@ impl ModuleGraphBuilder { let initial_package_deps_len = graph.packages.package_deps_sum(); let initial_package_mappings_len = graph.packages.mappings().len(); + if roots.iter().any(|r| r.scheme() == "npm") + && self.npm_resolver.as_byonm().is_some() + { + bail!("Resolving npm specifier entrypoints this way is currently not supported with \"nodeModules\": \"manual\". In the meantime, try with --node-modules-dir=auto instead"); + } + graph.build(roots, loader, options).await; let has_redirects_changed = graph.redirects.len() != initial_redirects_len; diff --git a/tests/specs/info/byonm/__test__.jsonc b/tests/specs/info/byonm/__test__.jsonc new file mode 100644 index 00000000000000..6c9ba7dadaee25 --- /dev/null +++ b/tests/specs/info/byonm/__test__.jsonc @@ -0,0 +1,11 @@ +{ + "tempDir": true, + "steps": [{ + "args": "install", + "output": "[WILDCARD]" + }, { + "args": "info npm:@denotest/add", + "output": "info.out", + "exitCode": 1 + }] +} diff --git a/tests/specs/info/byonm/deno.json b/tests/specs/info/byonm/deno.json new file mode 100644 index 00000000000000..4b88c71fbb3f87 --- /dev/null +++ b/tests/specs/info/byonm/deno.json @@ -0,0 +1,6 @@ +{ + "nodeModulesDir": "manual", + "imports": { + "chalk": "npm:@denotest/add" + } +} diff --git a/tests/specs/info/byonm/info.out b/tests/specs/info/byonm/info.out new file mode 100644 index 00000000000000..4e6f11a88ff29d --- /dev/null +++ b/tests/specs/info/byonm/info.out @@ -0,0 +1 @@ +error: Resolving npm specifier entrypoints this way is currently not supported with "nodeModules": "manual". In the meantime, try with --node-modules-dir=auto instead diff --git a/tests/specs/info/byonm/package.json b/tests/specs/info/byonm/package.json new file mode 100644 index 00000000000000..15a786ad71fa22 --- /dev/null +++ b/tests/specs/info/byonm/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/add": "*" + } +} From 7ad14589f9e8b4a881cbbfb746c9047d4953e461 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Mon, 30 Sep 2024 16:00:54 -0700 Subject: [PATCH 034/436] fix(flags): move some content from docs.deno.com into help output (#25951) --- cli/args/flags.rs | 131 +++++++++++++++++++++++++++------------------- 1 file changed, 78 insertions(+), 53 deletions(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 2cbf4639485f8b..b4f566810cf214 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1258,28 +1258,7 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { .get_arguments() .any(|arg| arg.get_id().as_str() == "unstable") { - subcommand = subcommand - .mut_arg("unstable", |arg| { - let new_help = arg - .get_help() - .unwrap() - .to_string() - .split_once("\n") - .unwrap() - .0 - .to_string(); - arg.help_heading(UNSTABLE_HEADING).help(new_help) - }) - .mut_args(|arg| { - // long_help here is being used as a metadata, see unstable args definition - if arg.get_help_heading() == Some(UNSTABLE_HEADING) - && arg.get_long_help().is_some() - { - arg.hide(false) - } else { - arg - } - }); + subcommand = enable_unstable(subcommand); } help_parse(&mut flags, subcommand); @@ -1414,6 +1393,31 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { Ok(flags) } +fn enable_unstable(command: Command) -> Command { + command + .mut_arg("unstable", |arg| { + let new_help = arg + .get_help() + .unwrap() + .to_string() + .split_once("\n") + .unwrap() + .0 + .to_string(); + arg.help_heading(UNSTABLE_HEADING).help(new_help) + }) + .mut_args(|arg| { + // long_help here is being used as a metadata, see unstable args definition + if arg.get_help_heading() == Some(UNSTABLE_HEADING) + && arg.get_long_help().is_some() + { + arg.hide(false) + } else { + arg + } + }) +} + macro_rules! heading { ($($name:ident = $title:expr),+; $total:literal) => { $(const $name: &str = $title;)+ @@ -1852,11 +1856,15 @@ fn compile_subcommand() -> Command { "compile", cstr!("Compiles the given script into a self contained executable. - deno compile -A jsr:@std/http/file-server + deno compile --allow-read --allow-net jsr:@std/http/file-server deno compile --output file_server jsr:@std/http/file-server Any flags specified which affect runtime behavior will be applied to the resulting binary. +This allows distribution of a Deno application to systems that do not have Deno installed. +Under the hood, it bundles a slimmed down version of the Deno runtime along with your +JavaScript or TypeScript code. + Cross-compiling to different target architectures is supported using the --target flag. On the first invocation with deno will download the proper binary and cache it in $DENO_DIR. @@ -2223,6 +2231,9 @@ Supported file types which are behind corresponding unstable flags (see formatti Format stdin and write to stdout: cat file.ts | deno fmt - +Check if the files are formatted: + deno fmt --check + Ignore formatting code by preceding it with an ignore comment: // deno-fmt-ignore @@ -2373,7 +2384,7 @@ Ignore formatting a file by adding an ignore comment at the top of the file: } fn init_subcommand() -> Command { - command("init", "Initialize a new project", UnstableArgsConfig::None).defer( + command("init", "scaffolds a basic Deno project with a script, test, and configuration file", UnstableArgsConfig::None).defer( |cmd| { cmd .arg(Arg::new("dir").value_hint(ValueHint::DirPath)) @@ -2418,7 +2429,7 @@ The following information is shown: .arg( location_arg() .conflicts_with("file") - .help("Show files used for origin bound APIs like the Web Storage API when running a script with '--location='") + .help(cstr!("Show files used for origin bound APIs like the Web Storage API when running a script with --location=<>")) ) .arg(no_check_arg().hide(true)) // TODO(lucacasonato): remove for 2.0 .arg(no_config_arg()) @@ -2460,7 +2471,7 @@ If the --global flag is set, installs a script as an executable in the deno install --global --allow-net --allow-read jsr:@std/http/file-server deno install -g https://examples.deno.land/color-logging.ts -To change the executable name, use -n/--name: +To change the executable name, use -n/--name: deno install -g --allow-net --allow-read -n serve jsr:@std/http/file-server The executable name is inferred by default: @@ -2742,7 +2753,12 @@ To ignore linting on an entire file, you can add an ignore comment at the top of } fn repl_subcommand() -> Command { - command("repl", "Read Eval Print Loop", UnstableArgsConfig::ResolutionAndRuntime) + command("repl", cstr!( + "Starts a read-eval-print-loop, which lets you interactively build up program state in the global context. +It is especially useful for quick prototyping and checking snippets of code. + +TypeScript is supported, however it is not type-checked, only transpiled." + ), UnstableArgsConfig::ResolutionAndRuntime) .defer(|cmd| runtime_args(cmd, true, true) .arg(check_arg(false)) .arg( @@ -2825,8 +2841,6 @@ fn serve_subcommand() -> Command { The serve command uses the default exports of the main module to determine which servers to start. -See https://docs.deno.com/runtime/manual/tools/serve for more detailed information. - Start a server defined in server.ts: deno serve server.ts @@ -2837,7 +2851,7 @@ Start a server defined in server.ts, watching for changes and running on port 50 .arg( Arg::new("port") .long("port") - .help("The TCP port to serve on, defaulting to 8000. Pass 0 to pick a random free port") + .help(cstr!("The TCP port to serve on. Pass 0 to pick a random free port [default: 8000]")) .value_parser(value_parser!(u16)), ) .arg( @@ -3047,11 +3061,13 @@ fn parallel_arg(descr: &str) -> Arg { fn types_subcommand() -> Command { command( "types", - "Print runtime TypeScript declarations. + cstr!( + "Print runtime TypeScript declarations. deno types > lib.deno.d.ts -The declaration file could be saved and used for typing information.", +The declaration file could be saved and used for typing information." + ), UnstableArgsConfig::None, ) } @@ -3161,7 +3177,7 @@ See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs } fn publish_subcommand() -> Command { - command("publish", "Publish the current working directory's package or workspace", UnstableArgsConfig::ResolutionOnly) + command("publish", "Publish the current working directory's package or workspace to JSR", UnstableArgsConfig::ResolutionOnly) .defer(|cmd| { cmd .arg( @@ -3550,8 +3566,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { .long("allow-hrtime") .action(ArgAction::SetTrue) .help("REMOVED in Deno 2.0") - .hide(true) - ; + .hide(true); if let Some(requires) = requires { arg = arg.requires(requires) } @@ -3564,8 +3579,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { .long("deny-hrtime") .action(ArgAction::SetTrue) .help("REMOVED in Deno 2.0") - .hide(true) - ; + .hide(true); if let Some(requires) = requires { arg = arg.requires(requires) } @@ -3801,7 +3815,9 @@ fn location_arg() -> Arg { url.set_password(None).unwrap(); Ok(url) }) - .help("Value of 'globalThis.location' used by some web APIs") + .help(cstr!( + "Value of globalThis.location used by some web APIs" + )) .value_hint(ValueHint::Url) } @@ -4655,7 +4671,7 @@ fn json_reference_parse( app.build(); fn serialize_command( - command: &mut Command, + mut command: Command, top_level: bool, ) -> deno_core::serde_json::Value { let args = command @@ -4663,7 +4679,7 @@ fn json_reference_parse( .filter(|arg| { !arg.is_hide_set() && if top_level { - true + arg.is_global_set() } else { !arg.is_global_set() } @@ -4672,40 +4688,49 @@ fn json_reference_parse( let name = arg.get_id().as_str(); let short = arg.get_short(); let long = arg.get_long(); - let aliases = arg.get_visible_aliases(); let required = arg.is_required_set(); - let help = arg.get_help().map(|help| help.to_string()); + let help = arg.get_help().map(|help| help.ansi().to_string()); + let help_heading = arg + .get_help_heading() + .map(|help_heading| help_heading.to_string()); let usage = arg.to_string(); json!({ "name": name, "short": short, "long": long, - "aliases": aliases, "required": required, "help": help, + "help_heading": help_heading, "usage": usage, }) }) .collect::>(); let name = command.get_name().to_string(); - let about = command.get_about().map(|about| about.to_string()); - let visible_aliases = command - .get_visible_aliases() - .map(|s| s.to_string()) - .collect::>(); - let usage = command.render_usage().to_string(); + let about = command.get_about().map(|about| about.ansi().to_string()); + let usage = command.render_usage().ansi().to_string(); let subcommands = command - .get_subcommands_mut() - .map(|command| serialize_command(command, false)) + .get_subcommands() + .map(|command| { + serialize_command( + if command + .get_arguments() + .any(|arg| arg.get_id().as_str() == "unstable") + { + enable_unstable(command.clone()) + } else { + command.clone() + }, + false, + ) + }) .collect::>(); json!({ "name": name, "about": about, - "visible_aliases": visible_aliases, "args": args, "subcommands": subcommands, "usage": usage, @@ -4713,7 +4738,7 @@ fn json_reference_parse( } flags.subcommand = DenoSubcommand::JSONReference(JSONReferenceFlags { - json: serialize_command(&mut app, true), + json: serialize_command(app, true), }) } From 218a9bf7ebaabacb7fc2231b15a22f6102d4cd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 1 Oct 2024 00:19:37 +0100 Subject: [PATCH 035/436] v2.0.0-rc.8 (#25950) --- Cargo.lock | 2 +- cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 945e4934864222..14ef18418020da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1146,7 +1146,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.0-rc.7" +version = "2.0.0-rc.8" dependencies = [ "anstream", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 5fb32deb7fbcde..fc786babcf427c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.0.0-rc.7" +version = "2.0.0-rc.8" authors.workspace = true default-run = "deno" edition.workspace = true From 0a75dc70aad9dc7cb51cef9a149a50e340c2eed0 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 1 Oct 2024 15:05:55 +0530 Subject: [PATCH 036/436] fix: update patchver to 0.2 (#25952) Fixes https://github.com/denoland/deno/issues/25940 Forgot to update patchver scripts to latest sui. Ref #25942 --- tools/release/promote_to_release.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 tools/release/promote_to_release.ts diff --git a/tools/release/promote_to_release.ts b/tools/release/promote_to_release.ts old mode 100644 new mode 100755 index c14b590cabf414..046f4d33a8070f --- a/tools/release/promote_to_release.ts +++ b/tools/release/promote_to_release.ts @@ -5,7 +5,7 @@ import { $ } from "jsr:@david/dax@0.41.0"; import { gray } from "jsr:@std/fmt@1/colors"; -import { patchver } from "jsr:@deno/patchver@0.1.0"; +import { patchver } from "jsr:@deno/patchver@0.2.0"; const SUPPORTED_TARGETS = [ "aarch64-apple-darwin", From aafe771b55f769d32145489c57fa33eb823716cb Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 1 Oct 2024 16:18:24 +0530 Subject: [PATCH 037/436] v2.0.0-rc.9 (#25957) --- Cargo.lock | 2 +- cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14ef18418020da..c55b9f97ca9a58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1146,7 +1146,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.0-rc.8" +version = "2.0.0-rc.9" dependencies = [ "anstream", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index fc786babcf427c..5b08e82bc5aeee 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.0.0-rc.8" +version = "2.0.0-rc.9" authors.workspace = true default-run = "deno" edition.workspace = true From c487a86b04dc1b638d204fa4f528fb0b832859ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 1 Oct 2024 14:05:21 +0100 Subject: [PATCH 038/436] fix: Hide 'deno cache' from help output (#25960) `deno cache` was soft-deprecated in favor of `deno install`. It should not show up in the help output. --- cli/args/flags.rs | 1 - tests/integration/flags_tests.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index b4f566810cf214..25634f38444b31 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1176,7 +1176,6 @@ static DENO_HELP: &str = cstr!( Tooling: bench Run benchmarks deno bench bench.ts - cache Cache the dependencies check Type-check the dependencies clean Remove the cache directory compile Compile the script into a self contained executable diff --git a/tests/integration/flags_tests.rs b/tests/integration/flags_tests.rs index 160de3ec1d30b9..455507b9fad804 100644 --- a/tests/integration/flags_tests.rs +++ b/tests/integration/flags_tests.rs @@ -21,7 +21,6 @@ fn help_output() { "Install script as an executable", "Uninstall a script previously installed with deno install", "Run benchmarks", - "Cache the dependencies", "Type-check the dependencies", "Compile the script into a self contained executable", "Print coverage reports", From 29104384c4cb5aab082749382802560907ebec42 Mon Sep 17 00:00:00 2001 From: MujahedSafaa <168719085+MujahedSafaa@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:24:12 +0300 Subject: [PATCH 039/436] fix: remove the typo in the help message (#25962) This PR fixes: https://github.com/denoland/deno/issues/25274 Remove the extra shorthand -S that attached to the --deny-sys. --- cli/args/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 25634f38444b31..6caef29d9ff28d 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -3273,7 +3273,7 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { --deny-net | --deny-net="localhost:8080,deno.land" --deny-env[=<...] Deny access to environment variables. Optionally specify inacessible environment variables. --deny-env | --deny-env="PORT,HOME,PATH" - -S, --deny-sys[=<...] Deny access to OS information. Optionally deny specific APIs by function name. + --deny-sys[=<...] Deny access to OS information. Optionally deny specific APIs by function name. --deny-sys | --deny-sys="systemMemoryInfo,osRelease" --deny-run[=<...] Deny running subprocesses. Optionally specify denied runnable program names. --deny-run | --deny-run="whoami,ps" From 4c8d57db03bac12d2a13566b3cc7454cfbd67314 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 1 Oct 2024 14:05:40 -0400 Subject: [PATCH 040/436] BREAKING: rename "deps" remote cache folder to "remote" (#25969) Closes https://github.com/denoland/deno/issues/25967 Closes #25968 --- Cargo.lock | 5 +++-- Cargo.toml | 2 +- cli/cache/deno_dir.rs | 6 +++--- cli/cache/mod.rs | 11 ----------- cli/factory.rs | 2 +- cli/file_fetcher.rs | 12 ++++++------ cli/lsp/cache.rs | 2 +- tests/integration/jsr_tests.rs | 2 +- tests/specs/info/flag/041_info_flag.out | 2 +- .../info/flag_location/041_info_flag_location.out | 2 +- tests/specs/info/json/info_json.out | 2 +- .../specs/info/json_location/info_json_location.out | 2 +- 12 files changed, 20 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c55b9f97ca9a58..b55e2aeb39e442 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1348,12 +1348,13 @@ dependencies = [ [[package]] name = "deno_cache_dir" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87900cfcd07bdbf3597bc36b77da0c0e7b6c2e65213faa2ed43d9a1ec12bd31d" +checksum = "186a102b13b4512841f5f40784cd25822042d22954afe3b5b070d406d15eb4f2" dependencies = [ "base32", "deno_media_type", + "deno_path_util", "indexmap", "log", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index ce333c728be61f..b15c1241b5e11a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -110,7 +110,7 @@ console_static_text = "=0.8.1" dashmap = "5.5.3" data-encoding = "2.3.3" data-url = "=0.3.0" -deno_cache_dir = "=0.12.0" +deno_cache_dir = "=0.13.0" deno_package_json = { version = "=0.1.1", default-features = false } dlopen2 = "0.6.1" ecb = "=0.1.2" diff --git a/cli/cache/deno_dir.rs b/cli/cache/deno_dir.rs index 88d8a31c04fc63..7b7059c224df3c 100644 --- a/cli/cache/deno_dir.rs +++ b/cli/cache/deno_dir.rs @@ -126,9 +126,9 @@ impl DenoDir { self.root.join("registries") } - /// Path to the dependencies cache folder. - pub fn deps_folder_path(&self) -> PathBuf { - self.root.join("deps") + /// Path to the remote cache folder. + pub fn remote_folder_path(&self) -> PathBuf { + self.root.join("remote") } /// Path to the origin data cache folder. diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 2296bce010768f..628502c50612c5 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -87,10 +87,6 @@ impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv { std::fs::create_dir_all(path) } - fn remove_file(&self, path: &Path) -> std::io::Result<()> { - std::fs::remove_file(path) - } - fn modified(&self, path: &Path) -> std::io::Result> { match std::fs::metadata(path) { Ok(metadata) => Ok(Some( @@ -149,13 +145,6 @@ impl<'a> deno_cache_dir::DenoCacheEnv for DenoCacheEnvFsAdapter<'a> { .map_err(|e| e.into_io_error()) } - fn remove_file(&self, path: &Path) -> std::io::Result<()> { - self - .0 - .remove_sync(path, false) - .map_err(|e| e.into_io_error()) - } - fn modified(&self, path: &Path) -> std::io::Result> { self .0 diff --git a/cli/factory.rs b/cli/factory.rs index 2cef875999aca4..b96a133e98c870 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -301,7 +301,7 @@ impl CliFactory { pub fn global_http_cache(&self) -> Result<&Arc, AnyError> { self.services.global_http_cache.get_or_try_init(|| { Ok(Arc::new(GlobalHttpCache::new( - self.deno_dir()?.deps_folder_path(), + self.deno_dir()?.remote_folder_path(), crate::cache::RealDenoCacheEnv, ))) }) diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index 1bf7635949cfa6..69daf14954b665 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -726,7 +726,7 @@ mod tests { maybe_temp_dir: Option, ) -> (FileFetcher, TempDir, Arc) { let temp_dir = maybe_temp_dir.unwrap_or_default(); - let location = temp_dir.path().join("deps").to_path_buf(); + let location = temp_dir.path().join("remote").to_path_buf(); let blob_store: Arc = Default::default(); let file_fetcher = FileFetcher::new( Arc::new(GlobalHttpCache::new(location, RealDenoCacheEnv)), @@ -964,7 +964,7 @@ mod tests { // This creates a totally new instance, simulating another Deno process // invocation and indicates to "cache bust". - let location = temp_dir.path().join("deps").to_path_buf(); + let location = temp_dir.path().join("remote").to_path_buf(); let file_fetcher = FileFetcher::new( Arc::new(GlobalHttpCache::new( location, @@ -990,7 +990,7 @@ mod tests { async fn test_fetch_uses_cache() { let _http_server_guard = test_util::http_server(); let temp_dir = TempDir::new(); - let location = temp_dir.path().join("deps").to_path_buf(); + let location = temp_dir.path().join("remote").to_path_buf(); let specifier = resolve_url("http://localhost:4545/subdir/mismatch_ext.ts").unwrap(); @@ -1156,7 +1156,7 @@ mod tests { async fn test_fetch_uses_cache_with_redirects() { let _http_server_guard = test_util::http_server(); let temp_dir = TempDir::new(); - let location = temp_dir.path().join("deps").to_path_buf(); + let location = temp_dir.path().join("remote").to_path_buf(); let specifier = resolve_url("http://localhost:4548/subdir/mismatch_ext.ts").unwrap(); let redirected_specifier = @@ -1324,7 +1324,7 @@ mod tests { async fn test_fetch_no_remote() { let _http_server_guard = test_util::http_server(); let temp_dir = TempDir::new(); - let location = temp_dir.path().join("deps").to_path_buf(); + let location = temp_dir.path().join("remote").to_path_buf(); let file_fetcher = FileFetcher::new( Arc::new(GlobalHttpCache::new( location, @@ -1350,7 +1350,7 @@ mod tests { async fn test_fetch_cache_only() { let _http_server_guard = test_util::http_server(); let temp_dir = TempDir::new(); - let location = temp_dir.path().join("deps").to_path_buf(); + let location = temp_dir.path().join("remote").to_path_buf(); let file_fetcher_01 = FileFetcher::new( Arc::new(GlobalHttpCache::new(location.clone(), RealDenoCacheEnv)), CacheSetting::Only, diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs index db10dc9677ed96..fbf9ea6f1b12f9 100644 --- a/cli/lsp/cache.rs +++ b/cli/lsp/cache.rs @@ -94,7 +94,7 @@ impl LspCache { let deno_dir = DenoDir::new(global_cache_path) .expect("should be infallible with absolute custom root"); let global = Arc::new(GlobalHttpCache::new( - deno_dir.deps_folder_path(), + deno_dir.remote_folder_path(), crate::cache::RealDenoCacheEnv, )); Self { diff --git a/tests/integration/jsr_tests.rs b/tests/integration/jsr_tests.rs index af5b24fe4198c9..c4812e6bfb3b8c 100644 --- a/tests/integration/jsr_tests.rs +++ b/tests/integration/jsr_tests.rs @@ -191,7 +191,7 @@ fn reload_info_not_found_cache_but_exists_remote() { Url::parse(&format!("http://127.0.0.1:4250/{}/meta.json", package)) .unwrap(); let cache = deno_cache_dir::GlobalHttpCache::new( - deno_dir.path().join("deps").to_path_buf(), + deno_dir.path().join("remote").to_path_buf(), deno_cache_dir::TestRealDenoCacheEnv, ); let entry = cache diff --git a/tests/specs/info/flag/041_info_flag.out b/tests/specs/info/flag/041_info_flag.out index 3506a29e48b31e..72a00be303f853 100644 --- a/tests/specs/info/flag/041_info_flag.out +++ b/tests/specs/info/flag/041_info_flag.out @@ -1,5 +1,5 @@ DENO_DIR location: [WILDCARD] -Remote modules cache: [WILDCARD]deps +Remote modules cache: [WILDCARD]remote npm modules cache: [WILDCARD]npm Emitted modules cache: [WILDCARD]gen Language server registries cache: [WILDCARD]registries diff --git a/tests/specs/info/flag_location/041_info_flag_location.out b/tests/specs/info/flag_location/041_info_flag_location.out index b9e72f65900218..684db2eec5d062 100644 --- a/tests/specs/info/flag_location/041_info_flag_location.out +++ b/tests/specs/info/flag_location/041_info_flag_location.out @@ -1,5 +1,5 @@ DENO_DIR location: [WILDCARD] -Remote modules cache: [WILDCARD]deps +Remote modules cache: [WILDCARD]remote npm modules cache: [WILDCARD]npm Emitted modules cache: [WILDCARD]gen Language server registries cache: [WILDCARD]registries diff --git a/tests/specs/info/json/info_json.out b/tests/specs/info/json/info_json.out index 607489ca39b10b..551f61026dad35 100644 --- a/tests/specs/info/json/info_json.out +++ b/tests/specs/info/json/info_json.out @@ -1,7 +1,7 @@ { "version": 1, "denoDir": "[WILDCARD]", - "modulesCache": "[WILDCARD]deps", + "modulesCache": "[WILDCARD]remote", "npmCache": "[WILDCARD]npm", "typescriptCache": "[WILDCARD]gen", "registryCache": "[WILDCARD]registries", diff --git a/tests/specs/info/json_location/info_json_location.out b/tests/specs/info/json_location/info_json_location.out index 004bf03db1f860..6d01ba451da56a 100644 --- a/tests/specs/info/json_location/info_json_location.out +++ b/tests/specs/info/json_location/info_json_location.out @@ -1,7 +1,7 @@ { "version": 1, "denoDir": "[WILDCARD]", - "modulesCache": "[WILDCARD]deps", + "modulesCache": "[WILDCARD]remote", "npmCache": "[WILDCARD]npm", "typescriptCache": "[WILDCARD]gen", "registryCache": "[WILDCARD]registries", From 41a70898adfc61b9020dfdfec17d374aac70d935 Mon Sep 17 00:00:00 2001 From: Ian Bull Date: Tue, 1 Oct 2024 11:26:06 -0700 Subject: [PATCH 041/436] refactor(ext): align error messages (#25914) Aligns the error messages in the ext folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269 --- ext/net/02_tls.js | 8 +++++--- ext/url/00_url.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js index 11d19440f7474d..6dad965590eb08 100644 --- a/ext/net/02_tls.js +++ b/ext/net/02_tls.js @@ -124,17 +124,19 @@ function loadTlsKeyPair(api, { // Check for "pem" format if (keyFormat !== undefined && keyFormat !== "pem") { - throw new TypeError('If `keyFormat` is specified, it must be "pem"'); + throw new TypeError( + `If "keyFormat" is specified, it must be "pem": received "${keyFormat}"`, + ); } if (cert !== undefined && key === undefined) { throw new TypeError( - `If \`cert\` is specified, \`key\` must be specified as well for \`${api}\`.`, + `If \`cert\` is specified, \`key\` must be specified as well for \`${api}\``, ); } if (cert === undefined && key !== undefined) { throw new TypeError( - `If \`key\` is specified, \`cert\` must be specified as well for \`${api}\`.`, + `If \`key\` is specified, \`cert\` must be specified as well for \`${api}\``, ); } diff --git a/ext/url/00_url.js b/ext/url/00_url.js index 577caba902f18f..ec875da768d6f9 100644 --- a/ext/url/00_url.js +++ b/ext/url/00_url.js @@ -139,7 +139,7 @@ class URLSearchParams { throw new TypeError( `${prefix}: Item ${ i + 0 - } in the parameter list does have length 2 exactly.`, + } in the parameter list does have length 2 exactly`, ); } return [pair[0], pair[1]]; From f9300004152ba4b3d091beb04d74f37b3b8ec281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 1 Oct 2024 22:49:32 +0100 Subject: [PATCH 042/436] feat: Add suggestion for packages using Node-API addons (#25975) This commit adds a suggestion with information and hint how to resolve situation when user tries to run an npm package with Node-API addons using global cache (which is currently not supported). Closes https://github.com/denoland/deno/issues/25974 --- cli/main.rs | 25 +++++++++++++++++++++++++ runtime/fmt_errors.rs | 42 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/cli/main.rs b/cli/main.rs index c0eccab5df9c77..31bebc882fa753 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -392,6 +392,31 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec { "Run again with `--unstable-webgpu` flag to enable this API.", ), ]; + // Try to capture errors like: + // ``` + // Uncaught Error: Cannot find module '../build/Release/canvas.node' + // Require stack: + // - /.../deno/npm/registry.npmjs.org/canvas/2.11.2/lib/bindings.js + // - /.../.cache/deno/npm/registry.npmjs.org/canvas/2.11.2/lib/canvas.js + // ``` + } else if msg.contains("Cannot find module") + && msg.contains("Require stack") + && msg.contains(".node'") + { + return vec![ + FixSuggestion::info_multiline( + &[ + "Trying to execute an npm package using Node-API addons,", + "these packages require local `node_modules` directory to be present." + ] + ), + FixSuggestion::hint_multiline( + &[ + "Add `\"nodeModulesDir\": \"auto\" option to `deno.json`, and then run", + "`deno install --allow-scripts=npm: --entrypoint "#, + deno_doc::html::comrak::COMRAK_STYLESHEET_FILENAME + ) + })), }; - let files = deno_doc::html::generate(options, doc_nodes_by_url) + let mut files = deno_doc::html::generate(options, doc_nodes_by_url) .context("Failed to generate HTML documentation")?; + files.insert("prism.js".to_string(), PRISM_JS.to_string()); + files.insert("prism.css".to_string(), PRISM_CSS.to_string()); + let path = &output_dir_resolved; let _ = std::fs::remove_dir_all(path); std::fs::create_dir(path) diff --git a/cli/tools/doc/prism.css b/cli/tools/doc/prism.css new file mode 100644 index 00000000000000..afc2ef6ca98386 --- /dev/null +++ b/cli/tools/doc/prism.css @@ -0,0 +1,3 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+json+markdown+regex+rust+typescript */ +code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} diff --git a/cli/tools/doc/prism.js b/cli/tools/doc/prism.js new file mode 100644 index 00000000000000..23bf91958907f3 --- /dev/null +++ b/cli/tools/doc/prism.js @@ -0,0 +1,15 @@ +// MIT LICENSE +// Copyright (c) 2012 Lea Verou +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+json+markdown+regex+rust+typescript */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i/g,(function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"})),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var t="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",a="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,(function(){return t})),i="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(t),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(t),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:e("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:e('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(t){e!==t&&(n.languages.markdown[e].inside.content.inside[t]=n.languages.markdown[t])}))})),n.hooks.add("after-tokenize",(function(n){"markdown"!==n.language&&"md"!==n.language||function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t",quot:'"'},l=String.fromCodePoint||String.fromCharCode;n.languages.md=n.languages.markdown}(Prism); +!function(a){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,t="(?:[^\\\\-]|"+n.source+")",s=RegExp(t+"-"+t),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|)*\\*/",t=0;t<2;t++)a=a.replace(//g,(function(){return a}));a=a.replace(//g,(function(){return"[^\\s\\S]"})),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); diff --git a/cli/tools/info.rs b/cli/tools/info.rs index c2f5a8cb8d560c..a417a60179c80d 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -447,6 +447,7 @@ impl<'a> GraphDisplayContext<'a> { Module::Js(module) => module.maybe_cache_info.as_ref(), Module::Json(module) => module.maybe_cache_info.as_ref(), Module::Node(_) | Module::Npm(_) | Module::External(_) => None, + Module::Wasm(_) => todo!("@dsherret"), }; if let Some(cache_info) = maybe_cache_info { if let Some(local) = &cache_info.local { @@ -469,6 +470,7 @@ impl<'a> GraphDisplayContext<'a> { Module::Js(module) => module.size(), Module::Json(module) => module.size(), Module::Node(_) | Module::Npm(_) | Module::External(_) => 0, + Module::Wasm(_) => todo!("@dsherret"), }; size as f64 }) @@ -568,6 +570,7 @@ impl<'a> GraphDisplayContext<'a> { Module::Js(module) => Some(module.size() as u64), Module::Json(module) => Some(module.size() as u64), Module::Node(_) | Module::Npm(_) | Module::External(_) => None, + Module::Wasm(_) => todo!("@dsherret"), }, }; format!("{} {}", header_text, maybe_size_to_text(maybe_size)) @@ -670,6 +673,7 @@ impl<'a> GraphDisplayContext<'a> { ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { self.build_error_msg(specifier, "(missing)") } + ModuleError::WasmParseErr(_, _) => todo!("@dsherret"), } } diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index 12289c581b1372..35317e12da4674 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -26,6 +26,7 @@ use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_core::url::Url; +use deno_graph::Module; use deno_terminal::colors; use http_body_util::BodyExt; use serde::Deserialize; @@ -1113,6 +1114,7 @@ fn collect_excluded_module_diagnostics( deno_graph::Module::Npm(_) | deno_graph::Module::Node(_) | deno_graph::Module::External(_) => None, + Module::Wasm(_) => todo!("@dsherret"), }) .filter(|s| s.as_str().starts_with(root.as_str())); for specifier in graph_specifiers { diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 8179e4223c264e..d9f66f11a7802d 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -4535,7 +4535,7 @@ declare namespace Deno { /** The object that is returned from a {@linkcode Deno.upgradeWebSocket} * request. * - * @category Web Sockets */ + * @category WebSockets */ export interface WebSocketUpgrade { /** The response object that represents the HTTP response to the client, * which should be used to the {@linkcode RequestEvent} `.respondWith()` for @@ -4549,7 +4549,7 @@ declare namespace Deno { /** Options which can be set when performing a * {@linkcode Deno.upgradeWebSocket} upgrade of a {@linkcode Request} * - * @category Web Sockets */ + * @category WebSockets */ export interface UpgradeWebSocketOptions { /** Sets the `.protocol` property on the client side web socket to the * value provided here, which should be one of the strings specified in the @@ -4597,7 +4597,7 @@ declare namespace Deno { * This operation does not yet consume the request or open the websocket. This * only happens once the returned response has been passed to `respondWith()`. * - * @category Web Sockets + * @category WebSockets */ export function upgradeWebSocket( request: Request, diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 8f8bed20a4cb2c..c9f726ca28105c 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -664,6 +664,7 @@ fn op_load_inner( &mut is_cjs, )?)) } + Module::Wasm(_) => todo!("@dsherret"), } } else if let Some(npm) = state .maybe_npm @@ -928,6 +929,7 @@ fn resolve_graph_specifier_types( })) } Some(Module::Node(_)) | None => Ok(None), + Some(Module::Wasm(_)) => todo!("@dsherret"), } } diff --git a/tests/specs/doc/lint_html_success/lint_success_html.out b/tests/specs/doc/lint_html_success/lint_success_html.out index 783dd5927e269c..57b179e226efef 100644 --- a/tests/specs/doc/lint_html_success/lint_success_html.out +++ b/tests/specs/doc/lint_html_success/lint_success_html.out @@ -1 +1 @@ -Written 12 files to "./docs/" +Written 15 files to "./docs/" diff --git a/tools/copyright_checker.js b/tools/copyright_checker.js index 24afe1dfd73eec..d7d196bc44656b 100755 --- a/tools/copyright_checker.js +++ b/tools/copyright_checker.js @@ -31,6 +31,8 @@ export async function checkCopyright() { ":!:.github/mtime_cache/action.js", ":!:cli/bench/testdata/**", ":!:cli/tools/bench/mitata.rs", + ":!:cli/tools/doc/prism.css", + ":!:cli/tools/doc/prism.js", ":!:cli/tools/init/templates/**", ":!:cli/tsc/*typescript.js", ":!:cli/tsc/compiler.d.ts", diff --git a/tools/lint.js b/tools/lint.js index 604dee9b308989..8e0057fa305002 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -51,6 +51,8 @@ async function dlint() { ":!:cli/bench/testdata/express-router.js", ":!:cli/bench/testdata/react-dom.js", ":!:cli/compilers/wasm_wrap.js", + ":!:cli/tools/doc/prism.css", + ":!:cli/tools/doc/prism.js", ":!:cli/tsc/dts/**", ":!:cli/tsc/*typescript.js", ":!:cli/tsc/compiler.d.ts", From c55e936be03a3a023330789f903e2fbd12f4a308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Baptista?= <15786310+M4RC3L05@users.noreply.github.com> Date: Tue, 19 Nov 2024 21:01:16 +0000 Subject: [PATCH 353/436] feat(fmt): support SQL (#26750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds support for .sql files in "deno fmt" subcommand. Closes: https://github.com/denoland/deno/issues/25024 --------- Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com> Co-authored-by: Bartek IwaƄczuk --- Cargo.lock | 12 ++++ cli/Cargo.toml | 2 + cli/args/flags.rs | 27 ++++++++- cli/args/mod.rs | 4 ++ cli/lsp/language_server.rs | 3 + cli/schemas/config-file.v1.json | 1 + cli/tools/fmt.rs | 64 +++++++++++++++++++- tests/integration/fmt_tests.rs | 18 +++++- tests/specs/fmt/sql/__test__.jsonc | 25 ++++++++ tests/specs/fmt/sql/badly_formatted.sql | 1 + tests/specs/fmt/sql/ignore_file.sql | 3 + tests/specs/fmt/sql/ignore_file2.sql | 3 + tests/specs/fmt/sql/ignore_file3.sql | 6 ++ tests/specs/fmt/sql/ignore_file4.sql | 3 + tests/specs/fmt/sql/well_formatted.sql | 4 ++ tests/specs/fmt/sql/wrong_file_ignore.sql | 6 ++ tests/testdata/fmt/badly_formatted.md | 12 ++++ tests/testdata/fmt/badly_formatted.sql | 21 +++++++ tests/testdata/fmt/badly_formatted_fixed.md | 15 +++++ tests/testdata/fmt/badly_formatted_fixed.sql | 22 +++++++ 20 files changed, 247 insertions(+), 5 deletions(-) create mode 100644 tests/specs/fmt/sql/__test__.jsonc create mode 100644 tests/specs/fmt/sql/badly_formatted.sql create mode 100644 tests/specs/fmt/sql/ignore_file.sql create mode 100644 tests/specs/fmt/sql/ignore_file2.sql create mode 100644 tests/specs/fmt/sql/ignore_file3.sql create mode 100644 tests/specs/fmt/sql/ignore_file4.sql create mode 100644 tests/specs/fmt/sql/well_formatted.sql create mode 100644 tests/specs/fmt/sql/wrong_file_ignore.sql create mode 100644 tests/testdata/fmt/badly_formatted.sql create mode 100644 tests/testdata/fmt/badly_formatted_fixed.sql diff --git a/Cargo.lock b/Cargo.lock index 5705acccc63d59..1a16714bba7dd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1291,6 +1291,7 @@ dependencies = [ "sha2", "shell-escape", "spki", + "sqlformat", "strsim", "tar", "tempfile", @@ -6794,6 +6795,17 @@ dependencies = [ "der", ] +[[package]] +name = "sqlformat" +version = "0.3.1" +source = "git+https://github.com/shssoichiro/sqlformat-rs.git?rev=827d639#827d639bef94d8e5a5a0e29b41185c8d572f24e6" +dependencies = [ + "nom 7.1.3", + "once_cell", + "regex", + "unicode_categories", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index dd1d44a8ef1e1a..16f39e9d481dbf 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -151,6 +151,8 @@ serde_repr.workspace = true sha2.workspace = true shell-escape = "=0.1.5" spki = { version = "0.7", features = ["pem"] } +# NOTE(bartlomieju): for now using github URL, because 0.3.2 with important fixes hasn't been released yet. +sqlformat = { git = "https://github.com/shssoichiro/sqlformat-rs.git", rev = "827d639" } strsim = "0.11.1" tar.workspace = true tempfile.workspace = true diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 39db12b5f1b855..262bc04682ec5d 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -210,6 +210,7 @@ pub struct FmtFlags { pub no_semicolons: Option, pub watch: Option, pub unstable_component: bool, + pub unstable_sql: bool, } impl FmtFlags { @@ -2291,7 +2292,7 @@ Ignore formatting a file by adding an ignore comment at the top of the file: .value_parser([ "ts", "tsx", "js", "jsx", "md", "json", "jsonc", "css", "scss", "sass", "less", "html", "svelte", "vue", "astro", "yml", "yaml", - "ipynb", + "ipynb", "sql" ]) .help_heading(FMT_HEADING).requires("files"), ) @@ -2410,6 +2411,14 @@ Ignore formatting a file by adding an ignore comment at the top of the file: .help_heading(FMT_HEADING) .hide(true), ) + .arg( + Arg::new("unstable-sql") + .long("unstable-sql") + .help("Enable formatting SQL files.") + .value_parser(FalseyValueParser::new()) + .action(ArgAction::SetTrue) + .help_heading(FMT_HEADING), + ) }) } @@ -4634,6 +4643,7 @@ fn fmt_parse( let prose_wrap = matches.remove_one::("prose-wrap"); let no_semicolons = matches.remove_one::("no-semicolons"); let unstable_component = matches.get_flag("unstable-component"); + let unstable_sql = matches.get_flag("unstable-sql"); flags.subcommand = DenoSubcommand::Fmt(FmtFlags { check: matches.get_flag("check"), @@ -4646,6 +4656,7 @@ fn fmt_parse( no_semicolons, watch: watch_arg_parse(matches)?, unstable_component, + unstable_sql, }); Ok(()) } @@ -6565,6 +6576,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6588,6 +6600,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6611,6 +6624,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6634,6 +6648,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Some(Default::default()), }), ..Flags::default() @@ -6648,7 +6663,8 @@ mod tests { "--unstable-css", "--unstable-html", "--unstable-component", - "--unstable-yaml" + "--unstable-yaml", + "--unstable-sql" ]); assert_eq!( r.unwrap(), @@ -6666,6 +6682,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: true, + unstable_sql: true, watch: Some(WatchFlags { hmr: false, no_clear_screen: true, @@ -6700,6 +6717,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Some(Default::default()), }), ..Flags::default() @@ -6723,6 +6741,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), @@ -6754,6 +6773,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Some(Default::default()), }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), @@ -6790,6 +6810,7 @@ mod tests { prose_wrap: Some("never".to_string()), no_semicolons: Some(true), unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6820,6 +6841,7 @@ mod tests { prose_wrap: None, no_semicolons: Some(false), unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6845,6 +6867,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ext: Some("html".to_string()), diff --git a/cli/args/mod.rs b/cli/args/mod.rs index ec75d7a100b157..61e1443a75eff7 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -289,6 +289,7 @@ impl BenchOptions { #[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] pub struct UnstableFmtOptions { pub component: bool, + pub sql: bool, } #[derive(Clone, Debug)] @@ -322,6 +323,7 @@ impl FmtOptions { options: resolve_fmt_options(fmt_flags, fmt_config.options), unstable: UnstableFmtOptions { component: unstable.component || fmt_flags.unstable_component, + sql: unstable.sql || fmt_flags.unstable_sql, }, files: fmt_config.files, } @@ -1319,6 +1321,7 @@ impl CliOptions { let workspace = self.workspace(); UnstableFmtOptions { component: workspace.has_unstable("fmt-component"), + sql: workspace.has_unstable("fmt-sql"), } } @@ -1667,6 +1670,7 @@ impl CliOptions { "byonm", "bare-node-builtins", "fmt-component", + "fmt-sql", ]) .collect(); diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 2ce26c1f2e4100..cbe194e14e6950 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1405,6 +1405,9 @@ impl Inner { component: config_data .map(|d| d.unstable.contains("fmt-component")) .unwrap_or(false), + sql: config_data + .map(|d| d.unstable.contains("fmt-sql")) + .unwrap_or(false), }; let document = document.clone(); move || { diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index 3ba803ef8c1a16..ccd773efbfdfd9 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -557,6 +557,7 @@ "ffi", "fs", "fmt-component", + "fmt-sql", "http", "kv", "net", diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index d40abd5f50f55c..9c2c7091294125 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -272,6 +272,7 @@ fn format_markdown( | "njk" | "yml" | "yaml" + | "sql" ) { // It's important to tell dprint proper file extension, otherwise // it might parse the file twice. @@ -301,6 +302,13 @@ fn format_markdown( } } "yml" | "yaml" => format_yaml(text, fmt_options), + "sql" => { + if unstable_options.sql { + format_sql(text, fmt_options) + } else { + Ok(None) + } + } _ => { let mut codeblock_config = get_resolved_typescript_config(fmt_options); @@ -503,7 +511,48 @@ pub fn format_html( }) } -/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, or IPYNB file. +pub fn format_sql( + file_text: &str, + fmt_options: &FmtOptionsConfig, +) -> Result, AnyError> { + let ignore_file = file_text + .lines() + .take_while(|line| line.starts_with("--")) + .any(|line| { + line + .strip_prefix("--") + .unwrap() + .trim() + .starts_with("deno-fmt-ignore-file") + }); + + if ignore_file { + return Ok(None); + } + + let mut formatted_str = sqlformat::format( + file_text, + &sqlformat::QueryParams::None, + &sqlformat::FormatOptions { + ignore_case_convert: None, + indent: if fmt_options.use_tabs.unwrap_or_default() { + sqlformat::Indent::Tabs + } else { + sqlformat::Indent::Spaces(fmt_options.indent_width.unwrap_or(2)) + }, + // leave one blank line between queries. + lines_between_queries: 2, + uppercase: Some(true), + }, + ); + + // Add single new line to the end of file. + formatted_str.push('\n'); + + Ok(Some(formatted_str)) +} + +/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, IPYNB or SQL file. pub fn format_file( file_path: &Path, file_text: &str, @@ -538,6 +587,13 @@ pub fn format_file( format_file(file_path, &file_text, fmt_options, unstable_options, None) }, ), + "sql" => { + if unstable_options.sql { + format_sql(file_text, fmt_options) + } else { + Ok(None) + } + } _ => { let config = get_resolved_typescript_config(fmt_options); dprint_plugin_typescript::format_text( @@ -1209,6 +1265,7 @@ fn is_supported_ext_fmt(path: &Path) -> bool { | "yml" | "yaml" | "ipynb" + | "sql" ) }) } @@ -1269,6 +1326,11 @@ mod test { assert!(is_supported_ext_fmt(Path::new("foo.yaml"))); assert!(is_supported_ext_fmt(Path::new("foo.YaML"))); assert!(is_supported_ext_fmt(Path::new("foo.ipynb"))); + assert!(is_supported_ext_fmt(Path::new("foo.sql"))); + assert!(is_supported_ext_fmt(Path::new("foo.Sql"))); + assert!(is_supported_ext_fmt(Path::new("foo.sQl"))); + assert!(is_supported_ext_fmt(Path::new("foo.sqL"))); + assert!(is_supported_ext_fmt(Path::new("foo.SQL"))); } #[test] diff --git a/tests/integration/fmt_tests.rs b/tests/integration/fmt_tests.rs index b890b3b72a1470..ccf54a4d0f2113 100644 --- a/tests/integration/fmt_tests.rs +++ b/tests/integration/fmt_tests.rs @@ -61,6 +61,12 @@ fn fmt_test() { let badly_formatted_yaml = t.path().join("badly_formatted.yaml"); badly_formatted_original_yaml.copy(&badly_formatted_yaml); + let fixed_sql = testdata_fmt_dir.join("badly_formatted_fixed.sql"); + let badly_formatted_original_sql = + testdata_fmt_dir.join("badly_formatted.sql"); + let badly_formatted_sql = t.path().join("badly_formatted.sql"); + badly_formatted_original_sql.copy(&badly_formatted_sql); + // First, check formatting by ignoring the badly formatted file. let output = context .new_command() @@ -71,11 +77,12 @@ fn fmt_test() { "--unstable-html".to_string(), "--unstable-component".to_string(), "--unstable-yaml".to_string(), + "--unstable-sql".to_string(), format!( - "--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json},{badly_formatted_css},{badly_formatted_html},{badly_formatted_component},{badly_formatted_yaml},{badly_formatted_ipynb}", + "--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json},{badly_formatted_css},{badly_formatted_html},{badly_formatted_component},{badly_formatted_yaml},{badly_formatted_ipynb},{badly_formatted_sql}", ), format!( - "--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json} {badly_formatted_css} {badly_formatted_html} {badly_formatted_component} {badly_formatted_yaml} {badly_formatted_ipynb}", + "--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json} {badly_formatted_css} {badly_formatted_html} {badly_formatted_component} {badly_formatted_yaml} {badly_formatted_ipynb} {badly_formatted_sql}", ), ]) .run(); @@ -95,6 +102,7 @@ fn fmt_test() { "--unstable-html".to_string(), "--unstable-component".to_string(), "--unstable-yaml".to_string(), + "--unstable-sql".to_string(), badly_formatted_js.to_string(), badly_formatted_md.to_string(), badly_formatted_json.to_string(), @@ -103,6 +111,7 @@ fn fmt_test() { badly_formatted_component.to_string(), badly_formatted_yaml.to_string(), badly_formatted_ipynb.to_string(), + badly_formatted_sql.to_string(), ]) .run(); @@ -119,6 +128,7 @@ fn fmt_test() { "--unstable-html".to_string(), "--unstable-component".to_string(), "--unstable-yaml".to_string(), + "--unstable-sql".to_string(), badly_formatted_js.to_string(), badly_formatted_md.to_string(), badly_formatted_json.to_string(), @@ -127,6 +137,7 @@ fn fmt_test() { badly_formatted_component.to_string(), badly_formatted_yaml.to_string(), badly_formatted_ipynb.to_string(), + badly_formatted_sql.to_string(), ]) .run(); @@ -141,6 +152,7 @@ fn fmt_test() { let expected_component = fixed_component.read_to_string(); let expected_yaml = fixed_yaml.read_to_string(); let expected_ipynb = fixed_ipynb.read_to_string(); + let expected_sql = fixed_sql.read_to_string(); let actual_js = badly_formatted_js.read_to_string(); let actual_md = badly_formatted_md.read_to_string(); let actual_json = badly_formatted_json.read_to_string(); @@ -149,6 +161,7 @@ fn fmt_test() { let actual_component = badly_formatted_component.read_to_string(); let actual_yaml = badly_formatted_yaml.read_to_string(); let actual_ipynb = badly_formatted_ipynb.read_to_string(); + let actual_sql = badly_formatted_sql.read_to_string(); assert_eq!(expected_js, actual_js); assert_eq!(expected_md, actual_md); assert_eq!(expected_json, actual_json); @@ -157,6 +170,7 @@ fn fmt_test() { assert_eq!(expected_component, actual_component); assert_eq!(expected_yaml, actual_yaml); assert_eq!(expected_ipynb, actual_ipynb); + assert_eq!(expected_sql, actual_sql); } #[test] diff --git a/tests/specs/fmt/sql/__test__.jsonc b/tests/specs/fmt/sql/__test__.jsonc new file mode 100644 index 00000000000000..a335e79c24d971 --- /dev/null +++ b/tests/specs/fmt/sql/__test__.jsonc @@ -0,0 +1,25 @@ +{ + "tempDir": true, + "tests": { + "nothing": { + "args": "fmt", + "output": "Checked 7 files\n" + }, + "flag": { + "args": "fmt --unstable-sql", + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]well_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 7 files\n" + }, + "config_file": { + "steps": [{ + "args": [ + "eval", + "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-sql\"]\\n}\\n')" + ], + "output": "[WILDCARD]" + }, { + "args": "fmt", + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]well_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 8 files\n" + }] + } + } +} diff --git a/tests/specs/fmt/sql/badly_formatted.sql b/tests/specs/fmt/sql/badly_formatted.sql new file mode 100644 index 00000000000000..619fc7afdd20b4 --- /dev/null +++ b/tests/specs/fmt/sql/badly_formatted.sql @@ -0,0 +1 @@ +select *; \ No newline at end of file diff --git a/tests/specs/fmt/sql/ignore_file.sql b/tests/specs/fmt/sql/ignore_file.sql new file mode 100644 index 00000000000000..62418c611b17a9 --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file.sql @@ -0,0 +1,3 @@ +-- deno-fmt-ignore-file + +foo%! diff --git a/tests/specs/fmt/sql/ignore_file2.sql b/tests/specs/fmt/sql/ignore_file2.sql new file mode 100644 index 00000000000000..fe9969f1d3df80 --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file2.sql @@ -0,0 +1,3 @@ +--deno-fmt-ignore-file + +foo%! diff --git a/tests/specs/fmt/sql/ignore_file3.sql b/tests/specs/fmt/sql/ignore_file3.sql new file mode 100644 index 00000000000000..c87da3e591a35f --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file3.sql @@ -0,0 +1,6 @@ +-- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +-- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +-- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +-- deno-fmt-ignore-file + + foo%! diff --git a/tests/specs/fmt/sql/ignore_file4.sql b/tests/specs/fmt/sql/ignore_file4.sql new file mode 100644 index 00000000000000..2de65712a54ec7 --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file4.sql @@ -0,0 +1,3 @@ +-- deno-fmt-ignore-file Foo bar biz + + foo%! diff --git a/tests/specs/fmt/sql/well_formatted.sql b/tests/specs/fmt/sql/well_formatted.sql new file mode 100644 index 00000000000000..92ce980185f9ea --- /dev/null +++ b/tests/specs/fmt/sql/well_formatted.sql @@ -0,0 +1,4 @@ +SELECT + * +FROM + foo; diff --git a/tests/specs/fmt/sql/wrong_file_ignore.sql b/tests/specs/fmt/sql/wrong_file_ignore.sql new file mode 100644 index 00000000000000..c124855dc285c1 --- /dev/null +++ b/tests/specs/fmt/sql/wrong_file_ignore.sql @@ -0,0 +1,6 @@ +-- File ignore directive only works if it's in the first cluster +-- of comment, ie. there are no empty lines after the first n-leading lines. + +-- deno-fmt-ignore-file + + foo \ No newline at end of file diff --git a/tests/testdata/fmt/badly_formatted.md b/tests/testdata/fmt/badly_formatted.md index 642918ceae89a4..be90ff845faca6 100644 --- a/tests/testdata/fmt/badly_formatted.md +++ b/tests/testdata/fmt/badly_formatted.md @@ -63,3 +63,15 @@ function foo(): number { let a:number ``` + + +```sql + seLect * , biz, buz +from baz; +``` + +```sql +-- deno-fmt-ignore-file + seLect * , biz, buz +from baz; +``` diff --git a/tests/testdata/fmt/badly_formatted.sql b/tests/testdata/fmt/badly_formatted.sql new file mode 100644 index 00000000000000..8b4cb978f0c896 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted.sql @@ -0,0 +1,21 @@ +select * from foo; +update foo set a = 'b'Where id = 'biz'; + + + create table foo(id text not null +bar text, + biz int, + buz number NOT NULL +); + +INSERT + into + user_data + (first_name, +last_name, address, phone, email) +VALUES + ('foo', 'bar', + 'biz', 1, 'bix'); + + + diff --git a/tests/testdata/fmt/badly_formatted_fixed.md b/tests/testdata/fmt/badly_formatted_fixed.md index 21176742bbdf7a..7a482e058f632e 100644 --- a/tests/testdata/fmt/badly_formatted_fixed.md +++ b/tests/testdata/fmt/badly_formatted_fixed.md @@ -56,3 +56,18 @@ function foo(): number { let a: number; ``` + +```sql +SELECT + *, + biz, + buz +FROM + baz; +``` + +```sql +-- deno-fmt-ignore-file + seLect * , biz, buz +from baz; +``` diff --git a/tests/testdata/fmt/badly_formatted_fixed.sql b/tests/testdata/fmt/badly_formatted_fixed.sql new file mode 100644 index 00000000000000..d50c6192161949 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted_fixed.sql @@ -0,0 +1,22 @@ +SELECT + * +FROM + foo; + +UPDATE + foo +SET + a = 'b' +WHERE + id = 'biz'; + +CREATE TABLE foo( + id text NOT NULL bar text, + biz int, + buz number NOT NULL +); + +INSERT INTO + user_data (first_name, last_name, address, phone, email) +VALUES + ('foo', 'bar', 'biz', 1, 'bix'); From 46b6037644c761369e689704f8e7b857959da155 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Nov 2024 16:19:35 -0500 Subject: [PATCH 354/436] feat(compile): ability to embed local data files (#26934) ``` > deno compile --allow-read=. --include data-file.txt main.js ``` This only applies to files on the filesystem. For remote modules, that's going to have to wait for `import ... from "./data.txt" with { "type": "bytes" }` or whatever it will be. --- cli/args/flags.rs | 6 +- cli/factory.rs | 1 + cli/standalone/binary.rs | 168 ++++++++++-------- cli/standalone/virtual_fs.rs | 3 +- cli/tools/compile.rs | 80 +++++++-- .../compile/include_data_files/__test__.jsonc | 41 +++++ .../compile/include_data_files/data-file.txt | 1 + .../specs/compile/include_data_files/main.js | 1 + .../include_data_files/non_existent.out | 6 + .../compile/include_data_files/output.out | 1 + 10 files changed, 213 insertions(+), 95 deletions(-) create mode 100644 tests/specs/compile/include_data_files/__test__.jsonc create mode 100644 tests/specs/compile/include_data_files/data-file.txt create mode 100644 tests/specs/compile/include_data_files/main.js create mode 100644 tests/specs/compile/include_data_files/non_existent.out create mode 100644 tests/specs/compile/include_data_files/output.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 262bc04682ec5d..85b8abefe1b0da 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1909,10 +1909,10 @@ On the first invocation with deno will download the proper binary and cache it i Arg::new("include") .long("include") .help( - cstr!("Includes an additional module in the compiled executable's module graph. + cstr!("Includes an additional module or local data file in the compiled executable. Use this flag if a dynamically imported module or a web worker main module - fails to load in the executable. This flag can be passed multiple times, - to include multiple additional modules.", + fails to load in the executable or to embed a file in the executable. This flag can + be passed multiple times, to include multiple additional modules.", )) .action(ArgAction::Append) .value_hint(ValueHint::FilePath) diff --git a/cli/factory.rs b/cli/factory.rs index 7949a83a55bc6a..98149982f04edf 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -884,6 +884,7 @@ impl CliFactory { let cli_options = self.cli_options()?; Ok(DenoCompileBinaryWriter::new( self.cjs_tracker()?, + self.cli_options()?, self.deno_dir()?, self.emitter()?, self.file_fetcher()?, diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index d18d7756412457..81539931376a7d 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -201,7 +201,8 @@ fn write_binary_bytes( compile_flags: &CompileFlags, ) -> Result<(), AnyError> { let data_section_bytes = - serialize_binary_data_section(metadata, npm_snapshot, remote_modules, vfs)?; + serialize_binary_data_section(metadata, npm_snapshot, remote_modules, vfs) + .context("Serializing binary data section.")?; let target = compile_flags.resolve_target(); if target.contains("linux") { @@ -364,6 +365,7 @@ pub fn extract_standalone( pub struct DenoCompileBinaryWriter<'a> { cjs_tracker: &'a CjsTracker, + cli_options: &'a CliOptions, deno_dir: &'a DenoDir, emitter: &'a Emitter, file_fetcher: &'a FileFetcher, @@ -377,6 +379,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { #[allow(clippy::too_many_arguments)] pub fn new( cjs_tracker: &'a CjsTracker, + cli_options: &'a CliOptions, deno_dir: &'a DenoDir, emitter: &'a Emitter, file_fetcher: &'a FileFetcher, @@ -387,6 +390,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { ) -> Self { Self { cjs_tracker, + cli_options, deno_dir, emitter, file_fetcher, @@ -403,8 +407,8 @@ impl<'a> DenoCompileBinaryWriter<'a> { graph: &ModuleGraph, root_dir_url: StandaloneRelativeFileBaseUrl<'_>, entrypoint: &ModuleSpecifier, + include_files: &[ModuleSpecifier], compile_flags: &CompileFlags, - cli_options: &CliOptions, ) -> Result<(), AnyError> { // Select base binary based on target let mut original_binary = self.get_base_binary(compile_flags).await?; @@ -417,7 +421,8 @@ impl<'a> DenoCompileBinaryWriter<'a> { target, ) } - set_windows_binary_to_gui(&mut original_binary)?; + set_windows_binary_to_gui(&mut original_binary) + .context("Setting windows binary to GUI.")?; } if compile_flags.icon.is_some() { let target = compile_flags.resolve_target(); @@ -435,7 +440,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { graph, root_dir_url, entrypoint, - cli_options, + include_files, compile_flags, ) .await @@ -478,10 +483,14 @@ impl<'a> DenoCompileBinaryWriter<'a> { if !binary_path.exists() { self .download_base_binary(&download_directory, &binary_path_suffix) - .await?; + .await + .context("Setting up base binary.")?; } - let archive_data = std::fs::read(binary_path)?; + let read_file = |path: &Path| -> Result, AnyError> { + std::fs::read(path).with_context(|| format!("Reading {}", path.display())) + }; + let archive_data = read_file(&binary_path)?; let temp_dir = tempfile::TempDir::new()?; let base_binary_path = archive::unpack_into_dir(archive::UnpackArgs { exe_name: "denort", @@ -490,7 +499,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { is_windows: target.contains("windows"), dest_path: temp_dir.path(), })?; - let base_binary = std::fs::read(base_binary_path)?; + let base_binary = read_file(&base_binary_path)?; drop(temp_dir); // delete the temp dir Ok(base_binary) } @@ -518,15 +527,19 @@ impl<'a> DenoCompileBinaryWriter<'a> { let bytes = match maybe_bytes { Some(bytes) => bytes, None => { - log::info!("Download could not be found, aborting"); - deno_runtime::exit(1); + bail!("Download could not be found, aborting"); } }; - std::fs::create_dir_all(output_directory)?; + let create_dir_all = |dir: &Path| { + std::fs::create_dir_all(dir) + .with_context(|| format!("Creating {}", dir.display())) + }; + create_dir_all(output_directory)?; let output_path = output_directory.join(binary_path_suffix); - std::fs::create_dir_all(output_path.parent().unwrap())?; - tokio::fs::write(output_path, bytes).await?; + create_dir_all(output_path.parent().unwrap())?; + std::fs::write(&output_path, bytes) + .with_context(|| format!("Writing {}", output_path.display()))?; Ok(()) } @@ -540,73 +553,79 @@ impl<'a> DenoCompileBinaryWriter<'a> { graph: &ModuleGraph, root_dir_url: StandaloneRelativeFileBaseUrl<'_>, entrypoint: &ModuleSpecifier, - cli_options: &CliOptions, + include_files: &[ModuleSpecifier], compile_flags: &CompileFlags, ) -> Result<(), AnyError> { - let ca_data = match cli_options.ca_data() { + let ca_data = match self.cli_options.ca_data() { Some(CaData::File(ca_file)) => Some( - std::fs::read(ca_file) - .with_context(|| format!("Reading: {ca_file}"))?, + std::fs::read(ca_file).with_context(|| format!("Reading {ca_file}"))?, ), Some(CaData::Bytes(bytes)) => Some(bytes.clone()), None => None, }; let root_path = root_dir_url.inner().to_file_path().unwrap(); - let (maybe_npm_vfs, node_modules, npm_snapshot) = match self - .npm_resolver - .as_inner() - { - InnerCliNpmResolverRef::Managed(managed) => { - let snapshot = - managed.serialized_valid_snapshot_for_system(&self.npm_system_info); - if !snapshot.as_serialized().packages.is_empty() { - let npm_vfs_builder = self.build_npm_vfs(&root_path, cli_options)?; + let (maybe_npm_vfs, node_modules, npm_snapshot) = + match self.npm_resolver.as_inner() { + InnerCliNpmResolverRef::Managed(managed) => { + let snapshot = + managed.serialized_valid_snapshot_for_system(&self.npm_system_info); + if !snapshot.as_serialized().packages.is_empty() { + let npm_vfs_builder = self + .build_npm_vfs(&root_path) + .context("Building npm vfs.")?; + ( + Some(npm_vfs_builder), + Some(NodeModules::Managed { + node_modules_dir: self + .npm_resolver + .root_node_modules_path() + .map(|path| { + root_dir_url + .specifier_key( + &ModuleSpecifier::from_directory_path(path).unwrap(), + ) + .into_owned() + }), + }), + Some(snapshot), + ) + } else { + (None, None, None) + } + } + InnerCliNpmResolverRef::Byonm(resolver) => { + let npm_vfs_builder = self.build_npm_vfs(&root_path)?; ( Some(npm_vfs_builder), - Some(NodeModules::Managed { - node_modules_dir: self.npm_resolver.root_node_modules_path().map( - |path| { + Some(NodeModules::Byonm { + root_node_modules_dir: resolver.root_node_modules_path().map( + |node_modules_dir| { root_dir_url .specifier_key( - &ModuleSpecifier::from_directory_path(path).unwrap(), + &ModuleSpecifier::from_directory_path(node_modules_dir) + .unwrap(), ) .into_owned() }, ), }), - Some(snapshot), + None, ) - } else { - (None, None, None) } - } - InnerCliNpmResolverRef::Byonm(resolver) => { - let npm_vfs_builder = self.build_npm_vfs(&root_path, cli_options)?; - ( - Some(npm_vfs_builder), - Some(NodeModules::Byonm { - root_node_modules_dir: resolver.root_node_modules_path().map( - |node_modules_dir| { - root_dir_url - .specifier_key( - &ModuleSpecifier::from_directory_path(node_modules_dir) - .unwrap(), - ) - .into_owned() - }, - ), - }), - None, - ) - } - }; + }; let mut vfs = if let Some(npm_vfs) = maybe_npm_vfs { npm_vfs } else { VfsBuilder::new(root_path.clone())? }; + for include_file in include_files { + let path = deno_path_util::url_to_file_path(include_file)?; + vfs + .add_file_at_path(&path) + .with_context(|| format!("Including {}", path.display()))?; + } let mut remote_modules_store = RemoteModulesStoreBuilder::default(); - let mut code_cache_key_hasher = if cli_options.code_cache_enabled() { + let mut code_cache_key_hasher = if self.cli_options.code_cache_enabled() { Some(FastInsecureHasher::new_deno_versioned()) } else { None @@ -672,7 +691,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { } remote_modules_store.add_redirects(&graph.redirects); - let env_vars_from_env_file = match cli_options.env_file_name() { + let env_vars_from_env_file = match self.cli_options.env_file_name() { Some(env_filenames) => { let mut aggregated_env_vars = IndexMap::new(); for env_filename in env_filenames.iter().rev() { @@ -688,16 +707,17 @@ impl<'a> DenoCompileBinaryWriter<'a> { let metadata = Metadata { argv: compile_flags.args.clone(), - seed: cli_options.seed(), + seed: self.cli_options.seed(), code_cache_key: code_cache_key_hasher.map(|h| h.finish()), - location: cli_options.location_flag().clone(), - permissions: cli_options.permission_flags().clone(), - v8_flags: cli_options.v8_flags().clone(), - unsafely_ignore_certificate_errors: cli_options + location: self.cli_options.location_flag().clone(), + permissions: self.cli_options.permission_flags().clone(), + v8_flags: self.cli_options.v8_flags().clone(), + unsafely_ignore_certificate_errors: self + .cli_options .unsafely_ignore_certificate_errors() .clone(), - log_level: cli_options.log_level(), - ca_stores: cli_options.ca_stores().clone(), + log_level: self.cli_options.log_level(), + ca_stores: self.cli_options.ca_stores().clone(), ca_data, env_vars_from_env_file, entrypoint_key: root_dir_url.specifier_key(entrypoint).into_owned(), @@ -740,11 +760,11 @@ impl<'a> DenoCompileBinaryWriter<'a> { node_modules, unstable_config: UnstableConfig { legacy_flag_enabled: false, - bare_node_builtins: cli_options.unstable_bare_node_builtins(), - sloppy_imports: cli_options.unstable_sloppy_imports(), - features: cli_options.unstable_features(), + bare_node_builtins: self.cli_options.unstable_bare_node_builtins(), + sloppy_imports: self.cli_options.unstable_sloppy_imports(), + features: self.cli_options.unstable_features(), }, - otel_config: cli_options.otel_config(), + otel_config: self.cli_options.otel_config(), }; write_binary_bytes( @@ -756,13 +776,10 @@ impl<'a> DenoCompileBinaryWriter<'a> { vfs, compile_flags, ) + .context("Writing binary bytes") } - fn build_npm_vfs( - &self, - root_path: &Path, - cli_options: &CliOptions, - ) -> Result { + fn build_npm_vfs(&self, root_path: &Path) -> Result { fn maybe_warn_different_system(system_info: &NpmSystemInfo) { if system_info != &NpmSystemInfo::default() { log::warn!("{} The node_modules directory may be incompatible with the target system.", crate::colors::yellow("Warning")); @@ -839,13 +856,18 @@ impl<'a> DenoCompileBinaryWriter<'a> { InnerCliNpmResolverRef::Byonm(_) => { maybe_warn_different_system(&self.npm_system_info); let mut builder = VfsBuilder::new(root_path.to_path_buf())?; - for pkg_json in cli_options.workspace().package_jsons() { + for pkg_json in self.cli_options.workspace().package_jsons() { builder.add_file_at_path(&pkg_json.path)?; } // traverse and add all the node_modules directories in the workspace let mut pending_dirs = VecDeque::new(); pending_dirs.push_back( - cli_options.workspace().root_dir().to_file_path().unwrap(), + self + .cli_options + .workspace() + .root_dir() + .to_file_path() + .unwrap(), ); while let Some(pending_dir) = pending_dirs.pop_front() { let mut entries = fs::read_dir(&pending_dir) diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index 26bb0db75f1d8d..d1084f016c9608 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -51,7 +51,8 @@ pub struct VfsBuilder { impl VfsBuilder { pub fn new(root_path: PathBuf) -> Result { - let root_path = canonicalize_path(&root_path)?; + let root_path = canonicalize_path(&root_path) + .with_context(|| format!("Canonicalizing {}", root_path.display()))?; log::debug!("Building vfs with root '{}'", root_path.display()); Ok(Self { root_dir: VirtualDirectory { diff --git a/cli/tools/compile.rs b/cli/tools/compile.rs index b3e9993379e0e7..4fa996368308ef 100644 --- a/cli/tools/compile.rs +++ b/cli/tools/compile.rs @@ -7,6 +7,7 @@ use crate::factory::CliFactory; use crate::http_util::HttpClientProvider; use crate::standalone::binary::StandaloneRelativeFileBaseUrl; use crate::standalone::is_standalone_binary; +use deno_ast::MediaType; use deno_ast::ModuleSpecifier; use deno_core::anyhow::bail; use deno_core::anyhow::Context; @@ -31,15 +32,12 @@ pub async fn compile( let module_graph_creator = factory.module_graph_creator().await?; let binary_writer = factory.create_compile_binary_writer().await?; let http_client = factory.http_client_provider(); - let module_specifier = cli_options.resolve_main_module()?; - let module_roots = { - let mut vec = Vec::with_capacity(compile_flags.include.len() + 1); - vec.push(module_specifier.clone()); - for side_module in &compile_flags.include { - vec.push(resolve_url_or_path(side_module, cli_options.initial_cwd())?); - } - vec - }; + let entrypoint = cli_options.resolve_main_module()?; + let (module_roots, include_files) = get_module_roots_and_include_files( + entrypoint, + &compile_flags, + cli_options.initial_cwd(), + )?; // this is not supported, so show a warning about it, but don't error in order // to allow someone to still run `deno compile` when this is in a deno.json @@ -82,18 +80,22 @@ pub async fn compile( check_warn_tsconfig(&ts_config_for_emit); let root_dir_url = resolve_root_dir_from_specifiers( cli_options.workspace().root_dir(), - graph.specifiers().map(|(s, _)| s).chain( - cli_options - .node_modules_dir_path() - .and_then(|p| ModuleSpecifier::from_directory_path(p).ok()) - .iter(), - ), + graph + .specifiers() + .map(|(s, _)| s) + .chain( + cli_options + .node_modules_dir_path() + .and_then(|p| ModuleSpecifier::from_directory_path(p).ok()) + .iter(), + ) + .chain(include_files.iter()), ); log::debug!("Binary root dir: {}", root_dir_url); log::info!( "{} {} to {}", colors::green("Compile"), - module_specifier.to_string(), + entrypoint, output_path.display(), ); validate_output_path(&output_path)?; @@ -118,9 +120,9 @@ pub async fn compile( file, &graph, StandaloneRelativeFileBaseUrl::from(&root_dir_url), - module_specifier, + entrypoint, + &include_files, &compile_flags, - cli_options, ) .await .with_context(|| { @@ -212,6 +214,48 @@ fn validate_output_path(output_path: &Path) -> Result<(), AnyError> { Ok(()) } +fn get_module_roots_and_include_files( + entrypoint: &ModuleSpecifier, + compile_flags: &CompileFlags, + initial_cwd: &Path, +) -> Result<(Vec, Vec), AnyError> { + fn is_module_graph_module(url: &ModuleSpecifier) -> bool { + if url.scheme() != "file" { + return true; + } + let media_type = MediaType::from_specifier(url); + match media_type { + MediaType::JavaScript + | MediaType::Jsx + | MediaType::Mjs + | MediaType::Cjs + | MediaType::TypeScript + | MediaType::Mts + | MediaType::Cts + | MediaType::Dts + | MediaType::Dmts + | MediaType::Dcts + | MediaType::Tsx + | MediaType::Json + | MediaType::Wasm => true, + MediaType::Css | MediaType::SourceMap | MediaType::Unknown => false, + } + } + + let mut module_roots = Vec::with_capacity(compile_flags.include.len() + 1); + let mut include_files = Vec::with_capacity(compile_flags.include.len()); + module_roots.push(entrypoint.clone()); + for side_module in &compile_flags.include { + let url = resolve_url_or_path(side_module, initial_cwd)?; + if is_module_graph_module(&url) { + module_roots.push(url); + } else { + include_files.push(url); + } + } + Ok((module_roots, include_files)) +} + async fn resolve_compile_executable_output_path( http_client_provider: &HttpClientProvider, compile_flags: &CompileFlags, diff --git a/tests/specs/compile/include_data_files/__test__.jsonc b/tests/specs/compile/include_data_files/__test__.jsonc new file mode 100644 index 00000000000000..5d5d967ca2c308 --- /dev/null +++ b/tests/specs/compile/include_data_files/__test__.jsonc @@ -0,0 +1,41 @@ +{ + "tempDir": true, + "tests": { + "success": { + "steps": [{ + "if": "unix", + "args": "compile --allow-read=data-file.txt --include data-file.txt --output main main.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data-file.txt --include data-file.txt --output main.exe main.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] + }, + "non_existent": { + "steps": [{ + "if": "unix", + "args": "compile --include does_not_exist.txt --output main main.js", + "output": "non_existent.out", + "exitCode": 1 + }, { + "if": "windows", + "args": "compile --include does_not_exist.txt --output main.exe main.js", + "output": "non_existent.out", + "exitCode": 1 + }] + } + } +} diff --git a/tests/specs/compile/include_data_files/data-file.txt b/tests/specs/compile/include_data_files/data-file.txt new file mode 100644 index 00000000000000..b14df6442ea5a1 --- /dev/null +++ b/tests/specs/compile/include_data_files/data-file.txt @@ -0,0 +1 @@ +Hi diff --git a/tests/specs/compile/include_data_files/main.js b/tests/specs/compile/include_data_files/main.js new file mode 100644 index 00000000000000..4c1f1e98d5fa5f --- /dev/null +++ b/tests/specs/compile/include_data_files/main.js @@ -0,0 +1 @@ +console.log(Deno.readTextFileSync("./data-file.txt").trim()); diff --git a/tests/specs/compile/include_data_files/non_existent.out b/tests/specs/compile/include_data_files/non_existent.out new file mode 100644 index 00000000000000..a88b441ba8cd3b --- /dev/null +++ b/tests/specs/compile/include_data_files/non_existent.out @@ -0,0 +1,6 @@ +Compile file:///[WILDLINE]/main.js to [WILDLINE] +error: Writing deno compile executable to temporary file 'main[WILDLINE]' + +Caused by: + 0: Including [WILDLINE]does_not_exist.txt + 1: [WILDLINE] diff --git a/tests/specs/compile/include_data_files/output.out b/tests/specs/compile/include_data_files/output.out new file mode 100644 index 00000000000000..b14df6442ea5a1 --- /dev/null +++ b/tests/specs/compile/include_data_files/output.out @@ -0,0 +1 @@ +Hi From 6b478cd0a3fdff15d5d9d8849a3019652b919921 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Nov 2024 18:20:14 -0500 Subject: [PATCH 355/436] feat(compile): ability to embed directory in executable (#26939) --- cli/args/flags.rs | 6 ++--- cli/standalone/binary.rs | 14 ++++++++--- .../compile/include_folder/__test__.jsonc | 24 +++++++++++++++++++ tests/specs/compile/include_folder/data/a.txt | 1 + tests/specs/compile/include_folder/data/b.txt | 1 + tests/specs/compile/include_folder/main.js | 8 +++++++ tests/specs/compile/include_folder/output.out | 2 ++ 7 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 tests/specs/compile/include_folder/__test__.jsonc create mode 100644 tests/specs/compile/include_folder/data/a.txt create mode 100644 tests/specs/compile/include_folder/data/b.txt create mode 100644 tests/specs/compile/include_folder/main.js create mode 100644 tests/specs/compile/include_folder/output.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 85b8abefe1b0da..f40d5aed4116ae 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1909,10 +1909,10 @@ On the first invocation with deno will download the proper binary and cache it i Arg::new("include") .long("include") .help( - cstr!("Includes an additional module or local data file in the compiled executable. + cstr!("Includes an additional module or file/directory in the compiled executable. Use this flag if a dynamically imported module or a web worker main module - fails to load in the executable or to embed a file in the executable. This flag can - be passed multiple times, to include multiple additional modules.", + fails to load in the executable or to embed a file or directory in the executable. + This flag can be passed multiple times, to include multiple additional modules.", )) .action(ArgAction::Append) .value_hint(ValueHint::FilePath) diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 81539931376a7d..39e508dc3b9520 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -620,9 +620,17 @@ impl<'a> DenoCompileBinaryWriter<'a> { }; for include_file in include_files { let path = deno_path_util::url_to_file_path(include_file)?; - vfs - .add_file_at_path(&path) - .with_context(|| format!("Including {}", path.display()))?; + if path.is_dir() { + // TODO(#26941): we should analyze if any of these are + // modules in order to include their dependencies + vfs + .add_dir_recursive(&path) + .with_context(|| format!("Including {}", path.display()))?; + } else { + vfs + .add_file_at_path(&path) + .with_context(|| format!("Including {}", path.display()))?; + } } let mut remote_modules_store = RemoteModulesStoreBuilder::default(); let mut code_cache_key_hasher = if self.cli_options.code_cache_enabled() { diff --git a/tests/specs/compile/include_folder/__test__.jsonc b/tests/specs/compile/include_folder/__test__.jsonc new file mode 100644 index 00000000000000..eeaea53b654d3c --- /dev/null +++ b/tests/specs/compile/include_folder/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --allow-read=data --include data --output main main.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include data --output main.exe main.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include_folder/data/a.txt b/tests/specs/compile/include_folder/data/a.txt new file mode 100644 index 00000000000000..78981922613b2a --- /dev/null +++ b/tests/specs/compile/include_folder/data/a.txt @@ -0,0 +1 @@ +a diff --git a/tests/specs/compile/include_folder/data/b.txt b/tests/specs/compile/include_folder/data/b.txt new file mode 100644 index 00000000000000..61780798228d17 --- /dev/null +++ b/tests/specs/compile/include_folder/data/b.txt @@ -0,0 +1 @@ +b diff --git a/tests/specs/compile/include_folder/main.js b/tests/specs/compile/include_folder/main.js new file mode 100644 index 00000000000000..831d26167f2070 --- /dev/null +++ b/tests/specs/compile/include_folder/main.js @@ -0,0 +1,8 @@ +const dataDir = import.meta.dirname + "/data"; +const files = Array.from( + Deno.readDirSync(dataDir).map((entry) => dataDir + "/" + entry.name), +); +files.sort(); +for (const file of files) { + console.log(Deno.readTextFileSync(file).trim()); +} diff --git a/tests/specs/compile/include_folder/output.out b/tests/specs/compile/include_folder/output.out new file mode 100644 index 00000000000000..422c2b7ab3b3c6 --- /dev/null +++ b/tests/specs/compile/include_folder/output.out @@ -0,0 +1,2 @@ +a +b From 8be2bbf074c7b32647a56d97f1c340fcab52c4aa Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Nov 2024 18:59:23 -0500 Subject: [PATCH 356/436] feat: Wasm module support (#26668) Support for Wasm modules. Note this implements the standard where the default export is the instance (not the module). The module will come later with source phase imports. ```ts import { add } from "./math.wasm"; console.log(add(1, 2)); ``` --- Cargo.lock | 14 ++--- Cargo.toml | 2 +- cli/args/mod.rs | 4 ++ cli/errors.rs | 2 +- cli/lsp/documents.rs | 38 +++++++++++-- cli/lsp/tsc.rs | 2 +- cli/module_loader.rs | 16 ++++-- cli/standalone/binary.rs | 4 +- cli/tools/check.rs | 8 ++- cli/tools/info.rs | 24 ++++++--- cli/tools/registry/mod.rs | 8 ++- cli/tsc/99_main_compiler.js | 6 +++ cli/tsc/mod.rs | 11 ++-- ext/node/polyfills/01_require.js | 10 ++-- runtime/worker.rs | 2 +- tests/integration/lsp_tests.rs | 50 ++++++++++++++++-- tests/specs/check/wasm/__test__.jsonc | 5 ++ tests/specs/check/wasm/check.out | 6 +++ tests/specs/check/wasm/main.ts | 3 ++ tests/specs/doc/wasm/__test__.jsonc | 4 ++ tests/specs/doc/wasm/doc.out | 21 ++++++++ tests/specs/info/wasm_module/__test__.jsonc | 4 ++ tests/specs/info/wasm_module/main.js | 7 +++ tests/specs/info/wasm_module/main.out | 10 ++++ .../wasm_module/cjs_importing/__test__.jsonc | 12 +++++ .../run/wasm_module/cjs_importing/main.cjs | 5 ++ .../run/wasm_module/cjs_importing/main.cts | 4 ++ .../run/wasm_module/cjs_importing/main.out | 3 ++ .../run/wasm_module/cjs_importing/math.wasm | Bin 0 -> 318 bytes .../wasm_module/cjs_importing/package.json | 4 ++ .../run/wasm_module/cjs_importing/setup.ts | 7 +++ .../import_file_not_found/__test__.jsonc | 5 ++ .../import_file_not_found/deno.jsonc | 9 ++++ .../wasm_module/import_file_not_found/main.js | 7 +++ .../import_file_not_found/main.out | 3 ++ .../__test__.jsonc | 5 ++ .../import_named_export_not_found/deno.jsonc | 8 +++ .../local_math.ts | 7 +++ .../import_named_export_not_found/main.js | 7 +++ .../import_named_export_not_found/main.out | 3 ++ .../run/wasm_module/imports/__test__.jsonc | 4 ++ tests/specs/run/wasm_module/imports/main.js | 7 +++ tests/specs/run/wasm_module/imports/main.out | 4 ++ .../integrity_check_failed/__test__.jsonc | 5 ++ .../integrity_check_failed/deno.json | 2 + .../integrity_check_failed/deno.lock | 6 +++ .../integrity_check_failed/main.js | 4 ++ .../integrity_check_failed/main.out | 12 +++++ .../map_imports_via_import_map/__test__.jsonc | 4 ++ .../map_imports_via_import_map/deno.json | 8 +++ .../map_imports_via_import_map/local_math.ts | 7 +++ .../map_imports_via_import_map/main.js | 7 +++ .../map_imports_via_import_map/main.out | 3 ++ .../run/wasm_module/no_imports/__test__.jsonc | 4 ++ .../specs/run/wasm_module/no_imports/main.out | 3 ++ .../specs/run/wasm_module/no_imports/main.ts | 4 ++ tests/testdata/wasm/math.ts | 8 +++ tests/testdata/wasm/math.wasm | Bin 0 -> 318 bytes tests/testdata/wasm/math_with_import.wasm | Bin 0 -> 449 bytes tests/util/server/src/lib.rs | 5 ++ 60 files changed, 401 insertions(+), 46 deletions(-) create mode 100644 tests/specs/check/wasm/__test__.jsonc create mode 100644 tests/specs/check/wasm/check.out create mode 100644 tests/specs/check/wasm/main.ts create mode 100644 tests/specs/doc/wasm/__test__.jsonc create mode 100644 tests/specs/doc/wasm/doc.out create mode 100644 tests/specs/info/wasm_module/__test__.jsonc create mode 100644 tests/specs/info/wasm_module/main.js create mode 100644 tests/specs/info/wasm_module/main.out create mode 100644 tests/specs/run/wasm_module/cjs_importing/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/cjs_importing/main.cjs create mode 100644 tests/specs/run/wasm_module/cjs_importing/main.cts create mode 100644 tests/specs/run/wasm_module/cjs_importing/main.out create mode 100644 tests/specs/run/wasm_module/cjs_importing/math.wasm create mode 100644 tests/specs/run/wasm_module/cjs_importing/package.json create mode 100644 tests/specs/run/wasm_module/cjs_importing/setup.ts create mode 100644 tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/import_file_not_found/deno.jsonc create mode 100644 tests/specs/run/wasm_module/import_file_not_found/main.js create mode 100644 tests/specs/run/wasm_module/import_file_not_found/main.out create mode 100644 tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc create mode 100644 tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts create mode 100644 tests/specs/run/wasm_module/import_named_export_not_found/main.js create mode 100644 tests/specs/run/wasm_module/import_named_export_not_found/main.out create mode 100644 tests/specs/run/wasm_module/imports/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/imports/main.js create mode 100644 tests/specs/run/wasm_module/imports/main.out create mode 100644 tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/integrity_check_failed/deno.json create mode 100644 tests/specs/run/wasm_module/integrity_check_failed/deno.lock create mode 100644 tests/specs/run/wasm_module/integrity_check_failed/main.js create mode 100644 tests/specs/run/wasm_module/integrity_check_failed/main.out create mode 100644 tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/map_imports_via_import_map/deno.json create mode 100644 tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts create mode 100644 tests/specs/run/wasm_module/map_imports_via_import_map/main.js create mode 100644 tests/specs/run/wasm_module/map_imports_via_import_map/main.out create mode 100644 tests/specs/run/wasm_module/no_imports/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/no_imports/main.out create mode 100644 tests/specs/run/wasm_module/no_imports/main.ts create mode 100644 tests/testdata/wasm/math.ts create mode 100644 tests/testdata/wasm/math.wasm create mode 100644 tests/testdata/wasm/math_with_import.wasm diff --git a/Cargo.lock b/Cargo.lock index 1a16714bba7dd6..52bb39ee8309de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1466,9 +1466,9 @@ dependencies = [ [[package]] name = "deno_core" -version = "0.320.0" +version = "0.321.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f285eed7b072749f9c3a9c4cf2c9ebb06462a2c22afec94892a6684c38f32696" +checksum = "cd2a54cda74cdc187d5fc2d23370a45cf09f912caf566dd1cd24a50157d809c7" dependencies = [ "anyhow", "bincode", @@ -1480,6 +1480,7 @@ dependencies = [ "deno_ops", "deno_unsync", "futures", + "indexmap 2.3.0", "libc", "memoffset", "parking_lot", @@ -1494,6 +1495,7 @@ dependencies = [ "tokio", "url", "v8", + "wasm_dep_analyzer", ] [[package]] @@ -1981,9 +1983,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.196.0" +version = "0.197.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d35c75ae05062f37ec2ae5fd1d99b2dcdfa0aef70844d3706759b8775056c5f6" +checksum = "37a8825d92301cf445727c43f17fee2a20fcdf4370004339965156ae7c56c97e" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -6517,9 +6519,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.229.0" +version = "0.230.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1dbbda82d67a393ea96f75d8383bc41fcd0bba43164aeaab599e1c2c2d46d7" +checksum = "b5a783242d2af51d6955cc04bf2b64adb643ab588b61e9573c908a69dabf8c2f" dependencies = [ "num-bigint", "serde", diff --git a/Cargo.toml b/Cargo.toml index cfe67ba6920292..cf7e2610bbf774 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "=0.43.3", features = ["transpiling"] } -deno_core = { version = "0.320.0" } +deno_core = { version = "0.321.0" } deno_bench_util = { version = "0.171.0", path = "./bench_util" } deno_config = { version = "=0.39.1", features = ["workspace", "sync"] } diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 61e1443a75eff7..21df6cf115ae8a 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1548,6 +1548,10 @@ impl CliOptions { }) => Url::parse(&flags.module_url) .ok() .map(|url| vec![Cow::Owned(url)]), + DenoSubcommand::Doc(DocFlags { + source_files: DocSourceFileFlag::Paths(paths), + .. + }) => Some(files_to_urls(paths)), _ => None, }) .unwrap_or_default(); diff --git a/cli/errors.rs b/cli/errors.rs index cf23ccd0e0a446..38dc8259e3c61c 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -38,6 +38,7 @@ fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str { ModuleGraphError::ModuleError(err) => match err { ModuleError::InvalidTypeAssertion { .. } => "SyntaxError", ModuleError::ParseErr(_, diagnostic) => get_diagnostic_class(diagnostic), + ModuleError::WasmParseErr(..) => "SyntaxError", ModuleError::UnsupportedMediaType { .. } | ModuleError::UnsupportedImportAttributeType { .. } => "TypeError", ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { @@ -71,7 +72,6 @@ fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str { | JsrLoadError::UnknownExport { .. } => "NotFound", }, }, - ModuleError::WasmParseErr(_, _) => "SyntaxError", }, } } diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index b01544ddf98785..cdc25f3ac32656 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -883,8 +883,13 @@ impl FileSystemDocuments { let doc = if specifier.scheme() == "file" { let path = url_to_file_path(specifier).ok()?; let bytes = fs::read(path).ok()?; - let content = - deno_graph::source::decode_owned_source(specifier, bytes, None).ok()?; + let content = bytes_to_content( + specifier, + MediaType::from_specifier(specifier), + bytes, + None, + ) + .ok()?; Document::new( specifier.clone(), content.into(), @@ -923,19 +928,24 @@ impl FileSystemDocuments { specifier, Some(&cached_file.metadata.headers), ); - let content = deno_graph::source::decode_owned_source( + let media_type = resolve_media_type( + specifier, + Some(&cached_file.metadata.headers), + None, + ); + let content = bytes_to_content( specifier, + media_type, cached_file.content, maybe_charset, ) .ok()?; - let maybe_headers = Some(cached_file.metadata.headers); Document::new( specifier.clone(), content.into(), None, None, - maybe_headers, + Some(cached_file.metadata.headers), is_cjs_resolver, resolver.clone(), config.clone(), @@ -1706,6 +1716,24 @@ fn analyze_module( } } +fn bytes_to_content( + specifier: &ModuleSpecifier, + media_type: MediaType, + bytes: Vec, + maybe_charset: Option<&str>, +) -> Result { + if media_type == MediaType::Wasm { + // we use the dts representation for Wasm modules + Ok(deno_graph::source::wasm::wasm_module_to_dts(&bytes)?) + } else { + Ok(deno_graph::source::decode_owned_source( + specifier, + bytes, + maybe_charset, + )?) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index fc7ff57948abcc..c221a6097b92cd 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -5609,7 +5609,7 @@ mod tests { let (_tx, rx) = mpsc::unbounded_channel(); let state = State::new(state_snapshot, Default::default(), Default::default(), rx); - let mut op_state = OpState::new(None); + let mut op_state = OpState::new(None, None); op_state.put(state); op_state } diff --git a/cli/module_loader.rs b/cli/module_loader.rs index f985286d69bfa8..035ae4264b173c 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -66,6 +66,7 @@ use deno_graph::JsonModule; use deno_graph::Module; use deno_graph::ModuleGraph; use deno_graph::Resolution; +use deno_graph::WasmModule; use deno_runtime::code_cache; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::create_host_defined_options; @@ -368,7 +369,9 @@ impl requested_module_type: RequestedModuleType, ) -> Result { let code_source = self.load_code_source(specifier, maybe_referrer).await?; - let code = if self.shared.is_inspecting { + let code = if self.shared.is_inspecting + || code_source.media_type == MediaType::Wasm + { // we need the code with the source map in order for // it to work with --inspect or --inspect-brk code_source.code @@ -378,6 +381,7 @@ impl }; let module_type = match code_source.media_type { MediaType::Json => ModuleType::Json, + MediaType::Wasm => ModuleType::Wasm, _ => ModuleType::JavaScript, }; @@ -545,6 +549,7 @@ impl Some(Module::Node(module)) => module.specifier.clone(), Some(Module::Js(module)) => module.specifier.clone(), Some(Module::Json(module)) => module.specifier.clone(), + Some(Module::Wasm(module)) => module.specifier.clone(), Some(Module::External(module)) => { node::resolve_specifier_into_node_modules( &module.specifier, @@ -552,7 +557,6 @@ impl ) } None => specifier.into_owned(), - Some(Module::Wasm(_)) => todo!("@dsherret"), }; Ok(specifier) } @@ -717,13 +721,19 @@ impl media_type: *media_type, }))) } + Some(deno_graph::Module::Wasm(WasmModule { + source, specifier, .. + })) => Ok(Some(CodeOrDeferredEmit::Code(ModuleCodeStringSource { + code: ModuleSourceCode::Bytes(source.clone().into()), + found_url: specifier.clone(), + media_type: MediaType::Wasm, + }))), Some( deno_graph::Module::External(_) | deno_graph::Module::Node(_) | deno_graph::Module::Npm(_), ) | None => Ok(None), - Some(deno_graph::Module::Wasm(_)) => todo!("@dsherret"), } } diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 39e508dc3b9520..e35119e0aa7dfa 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -675,10 +675,12 @@ impl<'a> DenoCompileBinaryWriter<'a> { deno_graph::Module::Json(m) => { (Some(m.source.as_bytes().to_vec()), m.media_type) } + deno_graph::Module::Wasm(m) => { + (Some(m.source.to_vec()), MediaType::Wasm) + } deno_graph::Module::Npm(_) | deno_graph::Module::Node(_) | deno_graph::Module::External(_) => (None, MediaType::Unknown), - deno_graph::Module::Wasm(_) => todo!("@dsherret"), }; if module.specifier().scheme() == "file" { let file_path = deno_path_util::url_to_file_path(module.specifier())?; diff --git a/cli/tools/check.rs b/cli/tools/check.rs index f7a488bb459285..ad5c7c3ab17726 100644 --- a/cli/tools/check.rs +++ b/cli/tools/check.rs @@ -380,10 +380,14 @@ fn get_check_hash( hasher.write_str(module.specifier.as_str()); hasher.write_str(&module.source); } + Module::Wasm(module) => { + has_file_to_type_check = true; + hasher.write_str(module.specifier.as_str()); + hasher.write_str(&module.source_dts); + } Module::External(module) => { hasher.write_str(module.specifier.as_str()); } - Module::Wasm(_) => todo!("@dsherret"), } } @@ -438,11 +442,11 @@ fn get_tsc_roots( | MediaType::SourceMap | MediaType::Unknown => None, }, + Module::Wasm(module) => Some((module.specifier.clone(), MediaType::Dmts)), Module::External(_) | Module::Node(_) | Module::Npm(_) | Module::Json(_) => None, - Module::Wasm(_) => todo!("@dsherret"), } } diff --git a/cli/tools/info.rs b/cli/tools/info.rs index a417a60179c80d..6cddf9699518ae 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -446,8 +446,8 @@ impl<'a> GraphDisplayContext<'a> { let maybe_cache_info = match root { Module::Js(module) => module.maybe_cache_info.as_ref(), Module::Json(module) => module.maybe_cache_info.as_ref(), + Module::Wasm(module) => module.maybe_cache_info.as_ref(), Module::Node(_) | Module::Npm(_) | Module::External(_) => None, - Module::Wasm(_) => todo!("@dsherret"), }; if let Some(cache_info) = maybe_cache_info { if let Some(local) = &cache_info.local { @@ -469,8 +469,8 @@ impl<'a> GraphDisplayContext<'a> { let size = match m { Module::Js(module) => module.size(), Module::Json(module) => module.size(), + Module::Wasm(module) => module.size(), Module::Node(_) | Module::Npm(_) | Module::External(_) => 0, - Module::Wasm(_) => todo!("@dsherret"), }; size as f64 }) @@ -569,8 +569,8 @@ impl<'a> GraphDisplayContext<'a> { Specifier(_) => match module { Module::Js(module) => Some(module.size() as u64), Module::Json(module) => Some(module.size() as u64), + Module::Wasm(module) => Some(module.size() as u64), Module::Node(_) | Module::Npm(_) | Module::External(_) => None, - Module::Wasm(_) => todo!("@dsherret"), }, }; format!("{} {}", header_text, maybe_size_to_text(maybe_size)) @@ -583,8 +583,8 @@ impl<'a> GraphDisplayContext<'a> { Package(package) => { tree_node.children.extend(self.build_npm_deps(package)); } - Specifier(_) => { - if let Some(module) = module.js() { + Specifier(_) => match module { + Module::Js(module) => { if let Some(types_dep) = &module.maybe_types_dependency { if let Some(child) = self.build_resolved_info(&types_dep.dependency, true) @@ -596,7 +596,16 @@ impl<'a> GraphDisplayContext<'a> { tree_node.children.extend(self.build_dep_info(dep)); } } - } + Module::Wasm(module) => { + for dep in module.dependencies.values() { + tree_node.children.extend(self.build_dep_info(dep)); + } + } + Module::Json(_) + | Module::Npm(_) + | Module::Node(_) + | Module::External(_) => {} + }, } } tree_node @@ -661,7 +670,7 @@ impl<'a> GraphDisplayContext<'a> { }; self.build_error_msg(specifier, message.as_ref()) } - ModuleError::ParseErr(_, _) => { + ModuleError::ParseErr(_, _) | ModuleError::WasmParseErr(_, _) => { self.build_error_msg(specifier, "(parsing error)") } ModuleError::UnsupportedImportAttributeType { .. } => { @@ -673,7 +682,6 @@ impl<'a> GraphDisplayContext<'a> { ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { self.build_error_msg(specifier, "(missing)") } - ModuleError::WasmParseErr(_, _) => todo!("@dsherret"), } } diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index 35317e12da4674..dec3c1afeba4bf 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -26,7 +26,6 @@ use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_core::url::Url; -use deno_graph::Module; use deno_terminal::colors; use http_body_util::BodyExt; use serde::Deserialize; @@ -1108,13 +1107,12 @@ fn collect_excluded_module_diagnostics( let graph_specifiers = graph .modules() .filter_map(|m| match m { - deno_graph::Module::Js(_) | deno_graph::Module::Json(_) => { - Some(m.specifier()) - } + deno_graph::Module::Js(_) + | deno_graph::Module::Json(_) + | deno_graph::Module::Wasm(_) => Some(m.specifier()), deno_graph::Module::Npm(_) | deno_graph::Module::Node(_) | deno_graph::Module::External(_) => None, - Module::Wasm(_) => todo!("@dsherret"), }) .filter(|s| s.as_str().starts_with(root.as_str())); for specifier in graph_specifiers { diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 68d099253a5f4e..93b9e92d899d76 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -450,6 +450,12 @@ delete Object.prototype.__proto__; // We specify the resolution mode to be CommonJS for some npm files and this // diagnostic gets generated even though we're using custom module resolution. 1452, + // Module '...' cannot be imported using this construct. The specifier only resolves to an + // ES module, which cannot be imported with 'require'. + 1471, + // TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; + // however, the referenced file is an ECMAScript module and cannot be imported with 'require'. + 1479, // TS2306: File '.../index.d.ts' is not a module. // We get this for `x-typescript-types` declaration files which don't export // anything. We prefer to treat these as modules with no exports. diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index c9f726ca28105c..976d407c150b4e 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -650,6 +650,10 @@ fn op_load_inner( media_type = MediaType::Json; Some(Cow::Borrowed(&*module.source)) } + Module::Wasm(module) => { + media_type = MediaType::Dts; + Some(Cow::Borrowed(&*module.source_dts)) + } Module::Npm(_) | Module::Node(_) => None, Module::External(module) => { // means it's Deno code importing an npm module @@ -664,7 +668,6 @@ fn op_load_inner( &mut is_cjs, )?)) } - Module::Wasm(_) => todo!("@dsherret"), } } else if let Some(npm) = state .maybe_npm @@ -890,6 +893,9 @@ fn resolve_graph_specifier_types( Some(Module::Json(module)) => { Ok(Some((module.specifier.clone(), module.media_type))) } + Some(Module::Wasm(module)) => { + Ok(Some((module.specifier.clone(), MediaType::Dmts))) + } Some(Module::Npm(module)) => { if let Some(npm) = &state.maybe_npm.as_ref() { let package_folder = npm @@ -929,7 +935,6 @@ fn resolve_graph_specifier_types( })) } Some(Module::Node(_)) | None => Ok(None), - Some(Module::Wasm(_)) => todo!("@dsherret"), } } @@ -1198,7 +1203,7 @@ mod tests { .context("Unable to get CWD") .unwrap(), ); - let mut op_state = OpState::new(None); + let mut op_state = OpState::new(None, None); op_state.put(state); op_state } diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index 083d4e49bef08c..db032014c2d07b 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -1086,12 +1086,10 @@ function loadESMFromCJS(module, filename, code) { module.exports = namespace; } -Module._extensions[".mjs"] = Module._extensions[".mts"] = function ( - module, - filename, -) { - loadESMFromCJS(module, filename); -}; +Module._extensions[".mjs"] = + Module._extensions[".mts"] = + Module._extensions[".wasm"] = + loadESMFromCJS; function stripBOM(content) { if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) { diff --git a/runtime/worker.rs b/runtime/worker.rs index 909147df9ba1c2..97cbb6428f0e87 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -78,7 +78,7 @@ pub fn validate_import_attributes_callback( for (key, value) in attributes { let msg = if key != "type" { Some(format!("\"{key}\" attribute is not supported.")) - } else if value != "json" { + } else if value != "json" && value != "$$deno-core-internal-wasm-module" { Some(format!("\"{value}\" is not a valid module type.")) } else { None diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 8eaccb54877546..b716aa921e3b25 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -5427,7 +5427,8 @@ fn lsp_code_actions_deno_cache() { let res = client - .write_request( "textDocument/codeAction", + .write_request( + "textDocument/codeAction", json!({ "textDocument": { "uri": "file:///a/file.ts" @@ -5453,8 +5454,7 @@ fn lsp_code_actions_deno_cache() { "only": ["quickfix"] } }), - ) - ; + ); assert_eq!( res, json!([{ @@ -16516,3 +16516,47 @@ fn lsp_jsdoc_named_example() { }), ); } + +#[test] +fn lsp_wasm_module() { + let context = TestContextBuilder::new() + .use_temp_cwd() + .use_http_server() + .build(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + client.did_open(json!({ + "textDocument": { + "uri": "file:///a/file.ts", + "languageId": "typescript", + "version": 1, + "text": "import { add } from \"http://localhost:4545/wasm/math.wasm\";\nadd(1, '');\n" + } + })); + + client.write_request( + "workspace/executeCommand", + json!({ + "command": "deno.cache", + "arguments": [[], "file:///a/file.ts"], + }), + ); + + let diagnostics = client.read_diagnostics(); + assert_eq!( + json!(diagnostics.all()), + json!([ + { + "range": { + "start": { "line": 1, "character": 7 }, + "end": { "line": 1, "character": 9 } + }, + "severity": 1, + "code": 2345, + "source": "deno-ts", + "message": "Argument of type 'string' is not assignable to parameter of type 'number'." + } + ]) + ); + client.shutdown(); +} diff --git a/tests/specs/check/wasm/__test__.jsonc b/tests/specs/check/wasm/__test__.jsonc new file mode 100644 index 00000000000000..cb11ce33bd7aca --- /dev/null +++ b/tests/specs/check/wasm/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --allow-import main.ts", + "output": "check.out", + "exitCode": 1 +} diff --git a/tests/specs/check/wasm/check.out b/tests/specs/check/wasm/check.out new file mode 100644 index 00000000000000..b3a23646db8645 --- /dev/null +++ b/tests/specs/check/wasm/check.out @@ -0,0 +1,6 @@ +Download http://localhost:4545/wasm/math.wasm +Check file:///[WILDLINE]/main.ts +error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'. +console.log(add(1, "")); + ~~ + at file:///[WILDLINE]/main.ts:3:20 diff --git a/tests/specs/check/wasm/main.ts b/tests/specs/check/wasm/main.ts new file mode 100644 index 00000000000000..64a8f64d8dd010 --- /dev/null +++ b/tests/specs/check/wasm/main.ts @@ -0,0 +1,3 @@ +import { add } from "http://localhost:4545/wasm/math.wasm"; + +console.log(add(1, "")); diff --git a/tests/specs/doc/wasm/__test__.jsonc b/tests/specs/doc/wasm/__test__.jsonc new file mode 100644 index 00000000000000..967bd08ea30aaa --- /dev/null +++ b/tests/specs/doc/wasm/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "doc http://localhost:4545/wasm/math.wasm", + "output": "doc.out" +} diff --git a/tests/specs/doc/wasm/doc.out b/tests/specs/doc/wasm/doc.out new file mode 100644 index 00000000000000..9e93f1b9389d01 --- /dev/null +++ b/tests/specs/doc/wasm/doc.out @@ -0,0 +1,21 @@ +Download http://localhost:4545/wasm/math.wasm +Defined in http://localhost:4545/wasm/math.wasm:2:1 + +function add(arg0: number, arg1: number): number + +Defined in http://localhost:4545/wasm/math.wasm:3:1 + +function subtract(arg0: number, arg1: number): number + +Defined in http://localhost:4545/wasm/math.wasm:4:22 + +const __data_end: number + +Defined in http://localhost:4545/wasm/math.wasm:5:22 + +const __heap_base: number + +Defined in http://localhost:4545/wasm/math.wasm:1:22 + +const memory: WebAssembly.Memory + diff --git a/tests/specs/info/wasm_module/__test__.jsonc b/tests/specs/info/wasm_module/__test__.jsonc new file mode 100644 index 00000000000000..37a02b4484e4f8 --- /dev/null +++ b/tests/specs/info/wasm_module/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --allow-import main.js", + "output": "main.out" +} diff --git a/tests/specs/info/wasm_module/main.js b/tests/specs/info/wasm_module/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/info/wasm_module/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/info/wasm_module/main.out b/tests/specs/info/wasm_module/main.out new file mode 100644 index 00000000000000..d8daf39409e589 --- /dev/null +++ b/tests/specs/info/wasm_module/main.out @@ -0,0 +1,10 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +Download http://localhost:4545/wasm/math.ts +local: [WILDLINE]main.js +type: JavaScript +dependencies: 2 unique +size: [WILDLINE] + +file:///[WILDLINE]/main.js ([WILDLINE]) +└─┬ http://localhost:4545/wasm/math_with_import.wasm ([WILDLINE]) + └── http://localhost:4545/wasm/math.ts ([WILDLINE]) diff --git a/tests/specs/run/wasm_module/cjs_importing/__test__.jsonc b/tests/specs/run/wasm_module/cjs_importing/__test__.jsonc new file mode 100644 index 00000000000000..9c91b736925c30 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/__test__.jsonc @@ -0,0 +1,12 @@ +{ + "steps": [{ + "args": "run -A setup.ts", + "output": "[WILDCARD]" + }, { + "args": "run -A --check main.cts", + "output": "main.out" + }, { + "args": "run -A --check main.cjs", + "output": "main.out" + }] +} diff --git a/tests/specs/run/wasm_module/cjs_importing/main.cjs b/tests/specs/run/wasm_module/cjs_importing/main.cjs new file mode 100644 index 00000000000000..51d253203e735d --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/main.cjs @@ -0,0 +1,5 @@ +// @ts-check +const { add, subtract } = require("./math.wasm"); + +console.log(add(1, 2)); +console.log(subtract(9, 3)); diff --git a/tests/specs/run/wasm_module/cjs_importing/main.cts b/tests/specs/run/wasm_module/cjs_importing/main.cts new file mode 100644 index 00000000000000..2b22d48500aaab --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/main.cts @@ -0,0 +1,4 @@ +import WasmModule = require("./math.wasm"); + +console.log(WasmModule.add(1, 2)); +console.log(WasmModule.subtract(9, 3)); diff --git a/tests/specs/run/wasm_module/cjs_importing/main.out b/tests/specs/run/wasm_module/cjs_importing/main.out new file mode 100644 index 00000000000000..69dbf8112737c5 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/main.out @@ -0,0 +1,3 @@ +Check file:///[WILDLINE] +3 +6 diff --git a/tests/specs/run/wasm_module/cjs_importing/math.wasm b/tests/specs/run/wasm_module/cjs_importing/math.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6b3950fcc5297b78e0cdfddc5b91ac72505c7c94 GIT binary patch literal 318 zcmY+8%}#?r6ov1dfkMHg)tw6ymYPaKn^x-52XNyHj2F1lTK+OKM7yGo=A(%*F>&>s zoRfSxK&D0jKo4KVFyJ7i0B~IF5Yd$g^U1Xw@acU1f^dNU^d8(v&2_6!0wfg$fN%QD zYRWBOpj1JY6gP#$P^mprr!q1uMQ|xRh%kcpaO9YdA*4=2HA671$?lgQKey(;R{WEC zR|qqujHUdjy7tgm*6=*-bX)W}Ya{%MnzE;o(Rt~Og^O{@*%&V3?1Zi!yZmOg+$GB- zx=psLO}cyBrqMcCZ{j44*Q-0YpIOo+TlL0dd(B2HW_52Vt2i#JHlxZcd~+z9m_O|| D`Uz8u literal 0 HcmV?d00001 diff --git a/tests/specs/run/wasm_module/cjs_importing/package.json b/tests/specs/run/wasm_module/cjs_importing/package.json new file mode 100644 index 00000000000000..b04e77362d7650 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/package.json @@ -0,0 +1,4 @@ +{ + "args": "run -A main.cjs", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/cjs_importing/setup.ts b/tests/specs/run/wasm_module/cjs_importing/setup.ts new file mode 100644 index 00000000000000..6f5c0e77819096 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/setup.ts @@ -0,0 +1,7 @@ +fetch("http://localhost:4545/wasm/math.wasm").then(async (response) => { + if (!response.ok) { + throw new Error(`Failed to fetch WASM module: ${response.statusText}`); + } + using file = Deno.openSync("math.wasm", { write: true, create: true }); + await response.body!.pipeTo(file.writable); +}); diff --git a/tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc b/tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc new file mode 100644 index 00000000000000..a27fcfa82b7ef9 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "--allow-import main.js", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/run/wasm_module/import_file_not_found/deno.jsonc b/tests/specs/run/wasm_module/import_file_not_found/deno.jsonc new file mode 100644 index 00000000000000..d24935d1788e63 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/deno.jsonc @@ -0,0 +1,9 @@ +{ + "lock": false, + "scopes": { + "http://localhost:4545/wasm/": { + // file won't exist + "http://localhost:4545/wasm/math.ts": "./local_math.ts" + } + } +} diff --git a/tests/specs/run/wasm_module/import_file_not_found/main.js b/tests/specs/run/wasm_module/import_file_not_found/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/import_file_not_found/main.out b/tests/specs/run/wasm_module/import_file_not_found/main.out new file mode 100644 index 00000000000000..54343673f1ce4a --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +error: Module not found "file:///[WILDLINE]/local_math.ts". + at http://localhost:4545/wasm/math_with_import.wasm:1:8 diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc b/tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc new file mode 100644 index 00000000000000..a27fcfa82b7ef9 --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "--allow-import main.js", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc b/tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc new file mode 100644 index 00000000000000..a8f541dcec215e --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc @@ -0,0 +1,8 @@ +{ + "lock": false, + "scopes": { + "http://localhost:4545/wasm/": { + "http://localhost:4545/wasm/math.ts": "./local_math.ts" + } + } +} diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts b/tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts new file mode 100644 index 00000000000000..8a72ea008be64b --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts @@ -0,0 +1,7 @@ +export function addTest(a: number, b: number) { + return (a + b) * 2; +} + +export function subtractTest(a: number, b: number) { + return (a - b) / 2; +} diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/main.js b/tests/specs/run/wasm_module/import_named_export_not_found/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/main.out b/tests/specs/run/wasm_module/import_named_export_not_found/main.out new file mode 100644 index 00000000000000..f79dab7a05dbd5 --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +error: Uncaught SyntaxError: The requested module './math.ts' does not provide an export named 'add' + at (http://localhost:4545/wasm/math_with_import.wasm:[WILDLINE]) diff --git a/tests/specs/run/wasm_module/imports/__test__.jsonc b/tests/specs/run/wasm_module/imports/__test__.jsonc new file mode 100644 index 00000000000000..744ae74d3ec1ec --- /dev/null +++ b/tests/specs/run/wasm_module/imports/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "--allow-import main.js", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/imports/main.js b/tests/specs/run/wasm_module/imports/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/run/wasm_module/imports/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/imports/main.out b/tests/specs/run/wasm_module/imports/main.out new file mode 100644 index 00000000000000..1b1210ded47bb0 --- /dev/null +++ b/tests/specs/run/wasm_module/imports/main.out @@ -0,0 +1,4 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +Download http://localhost:4545/wasm/math.ts +3 +50 diff --git a/tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc b/tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc new file mode 100644 index 00000000000000..711016d2599686 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "--allow-import main.js", + "output": "main.out", + "exitCode": 10 +} diff --git a/tests/specs/run/wasm_module/integrity_check_failed/deno.json b/tests/specs/run/wasm_module/integrity_check_failed/deno.json new file mode 100644 index 00000000000000..2c63c0851048d8 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/deno.json @@ -0,0 +1,2 @@ +{ +} diff --git a/tests/specs/run/wasm_module/integrity_check_failed/deno.lock b/tests/specs/run/wasm_module/integrity_check_failed/deno.lock new file mode 100644 index 00000000000000..adb4b91ee93934 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/deno.lock @@ -0,0 +1,6 @@ +{ + "version": "4", + "remote": { + "http://localhost:4545/wasm/math.wasm": "c4fdd49432f1517835b93274447890007947f9d30674ab7f1474091860113d95" + } +} diff --git a/tests/specs/run/wasm_module/integrity_check_failed/main.js b/tests/specs/run/wasm_module/integrity_check_failed/main.js new file mode 100644 index 00000000000000..1e1b2629d1756d --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/main.js @@ -0,0 +1,4 @@ +import { add, subtract } from "http://localhost:4545/wasm/math.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/integrity_check_failed/main.out b/tests/specs/run/wasm_module/integrity_check_failed/main.out new file mode 100644 index 00000000000000..6434bfcf937062 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/main.out @@ -0,0 +1,12 @@ +Download http://localhost:4545/wasm/math.wasm +error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file. + + Specifier: http://localhost:4545/wasm/math.wasm + Actual: d1643d9d4ba8f34ee5198717860cbc629013179addba6d4e347b68eb721c73b4 + Expected: c4fdd49432f1517835b93274447890007947f9d30674ab7f1474091860113d95 + +This could be caused by: + * the lock file may be corrupt + * the source itself may be corrupt + +Investigate the lockfile; delete it to regenerate the lockfile or --reload to reload the source code from the server. diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc b/tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc new file mode 100644 index 00000000000000..744ae74d3ec1ec --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "--allow-import main.js", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/deno.json b/tests/specs/run/wasm_module/map_imports_via_import_map/deno.json new file mode 100644 index 00000000000000..a8f541dcec215e --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/deno.json @@ -0,0 +1,8 @@ +{ + "lock": false, + "scopes": { + "http://localhost:4545/wasm/": { + "http://localhost:4545/wasm/math.ts": "./local_math.ts" + } + } +} diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts b/tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts new file mode 100644 index 00000000000000..e681c2d7dad320 --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts @@ -0,0 +1,7 @@ +export function add(a: number, b: number) { + return (a + b) * 2; +} + +export function subtract(a: number, b: number) { + return (a - b) / 2; +} diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/main.js b/tests/specs/run/wasm_module/map_imports_via_import_map/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/main.out b/tests/specs/run/wasm_module/map_imports_via_import_map/main.out new file mode 100644 index 00000000000000..3a90c739aab72d --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +6 +25 diff --git a/tests/specs/run/wasm_module/no_imports/__test__.jsonc b/tests/specs/run/wasm_module/no_imports/__test__.jsonc new file mode 100644 index 00000000000000..29c4a86f31dc6a --- /dev/null +++ b/tests/specs/run/wasm_module/no_imports/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --allow-import main.ts", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/no_imports/main.out b/tests/specs/run/wasm_module/no_imports/main.out new file mode 100644 index 00000000000000..ce0d170ffdf80b --- /dev/null +++ b/tests/specs/run/wasm_module/no_imports/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math.wasm +3 +6 diff --git a/tests/specs/run/wasm_module/no_imports/main.ts b/tests/specs/run/wasm_module/no_imports/main.ts new file mode 100644 index 00000000000000..3cd3f675d26ba1 --- /dev/null +++ b/tests/specs/run/wasm_module/no_imports/main.ts @@ -0,0 +1,4 @@ +import { add, subtract } from "http://localhost:4545/wasm/math.wasm"; + +console.log(add(1, 2)); +console.log(subtract(8, 2)); diff --git a/tests/testdata/wasm/math.ts b/tests/testdata/wasm/math.ts new file mode 100644 index 00000000000000..5a1de0865e775b --- /dev/null +++ b/tests/testdata/wasm/math.ts @@ -0,0 +1,8 @@ +// this file is imported by math_with_import.wasm +export function add(a: number, b: number) { + return a + b; +} + +export function subtract(a: number, b: number) { + return a - b; +} diff --git a/tests/testdata/wasm/math.wasm b/tests/testdata/wasm/math.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6b3950fcc5297b78e0cdfddc5b91ac72505c7c94 GIT binary patch literal 318 zcmY+8%}#?r6ov1dfkMHg)tw6ymYPaKn^x-52XNyHj2F1lTK+OKM7yGo=A(%*F>&>s zoRfSxK&D0jKo4KVFyJ7i0B~IF5Yd$g^U1Xw@acU1f^dNU^d8(v&2_6!0wfg$fN%QD zYRWBOpj1JY6gP#$P^mprr!q1uMQ|xRh%kcpaO9YdA*4=2HA671$?lgQKey(;R{WEC zR|qqujHUdjy7tgm*6=*-bX)W}Ya{%MnzE;o(Rt~Og^O{@*%&V3?1Zi!yZmOg+$GB- zx=psLO}cyBrqMcCZ{j44*Q-0YpIOo+TlL0dd(B2HW_52Vt2i#JHlxZcd~+z9m_O|| D`Uz8u literal 0 HcmV?d00001 diff --git a/tests/testdata/wasm/math_with_import.wasm b/tests/testdata/wasm/math_with_import.wasm new file mode 100644 index 0000000000000000000000000000000000000000..64e195e42b6a2ee67e2ef2fe89118c33cc2094ae GIT binary patch literal 449 zcmY+9PfNo<5XEP98~abFcoPu{f+#gL8`Gp7J@lvtk6zYEcAKhATCy9or__^Q%a3MS ztm0gT_vSJD9+1fp0I-Qqtg5hLXRJNE%E-=!)^Jh^;7_+q8QX#q3&1%8XgIh;M290B z>>cq6Z`bQD=vMH5H$!JH)7hd}G1$Ije~)-aN=25W&K1Y5lrv3B8I#eRb&lCS^r4Rj z>w2L3BR;kQKCzKgrlHf`(!On)JT>4{KHdi#Cwwuo<`>b-kG-3*AB4iESd5jL;KeQ^ zM4j5Ts-r|+H1$-R1i}v~xSp^LF#qLk9wPLlG?tQAxm-NwRu^#BUKR^gCb}@JHK#l+ zDb?6`D2;{v`jlv6v~uGWIz{azCt^7EhF<^N8;Kwq-;AQZ@A-l2MXoO{;Ie0_NVSzy eO|~qwVS`>)T8ih|P3Mc4=4Q|`&uQ-Jcl!;wZF?;M literal 0 HcmV?d00001 diff --git a/tests/util/server/src/lib.rs b/tests/util/server/src/lib.rs index 89dc1ffc3b796d..953896cffda570 100644 --- a/tests/util/server/src/lib.rs +++ b/tests/util/server/src/lib.rs @@ -919,6 +919,11 @@ pub fn wildcard_match_detailed( if was_last_wildcard || was_last_wildline || current_text.is_empty() { WildcardMatchResult::Success + } else if current_text == "\n" { + WildcardMatchResult::Fail( + "\n!!!! PROBLEM: Missing final newline at end of expected output !!!!" + .to_string(), + ) } else { output_lines.push("==== HAD TEXT AT END OF FILE ====".to_string()); output_lines.push(colors::red(annotate_whitespace(current_text))); From 9956731ddb09a478504632175e8db4aacbd1e6db Mon Sep 17 00:00:00 2001 From: Cornelius Krassow <58032399+ckrassow@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:00:47 +0100 Subject: [PATCH 357/436] feat(publish): add `--set-version ` flag (#26141) --- cli/args/flags.rs | 54 ++++++++++++------- cli/tools/registry/mod.rs | 33 ++++++++---- .../set_version/multiple_packages/LICENSE | 0 .../multiple_packages/__test__.jsonc | 5 ++ .../set_version/multiple_packages/deno.json | 8 +++ .../multiple_packages/error_set_version.out | 1 + .../packages/package1/deno.json | 7 +++ .../packages/package1/mod.ts | 3 ++ .../packages/package2/deno.json | 7 +++ .../packages/package2/mod.ts | 3 ++ .../specs/publish/set_version/success/LICENSE | 0 .../set_version/success/__test__.jsonc | 4 ++ .../publish/set_version/success/deno.json | 10 ++++ .../specs/publish/set_version/success/mod.ts | 7 +++ .../publish/set_version/success/std_http.ts | 6 +++ .../success/successful_set_version.out | 6 +++ 16 files changed, 127 insertions(+), 27 deletions(-) create mode 100644 tests/specs/publish/set_version/multiple_packages/LICENSE create mode 100644 tests/specs/publish/set_version/multiple_packages/__test__.jsonc create mode 100644 tests/specs/publish/set_version/multiple_packages/deno.json create mode 100644 tests/specs/publish/set_version/multiple_packages/error_set_version.out create mode 100644 tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json create mode 100644 tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts create mode 100644 tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json create mode 100644 tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts create mode 100644 tests/specs/publish/set_version/success/LICENSE create mode 100644 tests/specs/publish/set_version/success/__test__.jsonc create mode 100644 tests/specs/publish/set_version/success/deno.json create mode 100644 tests/specs/publish/set_version/success/mod.ts create mode 100644 tests/specs/publish/set_version/success/std_http.ts create mode 100644 tests/specs/publish/set_version/success/successful_set_version.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index f40d5aed4116ae..b31bfcecf7cb8d 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -428,6 +428,7 @@ pub struct PublishFlags { pub allow_slow_types: bool, pub allow_dirty: bool, pub no_provenance: bool, + pub set_version: Option, } #[derive(Clone, Debug, Eq, PartialEq)] @@ -1391,7 +1392,7 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { "uninstall" => uninstall_parse(&mut flags, &mut m), "upgrade" => upgrade_parse(&mut flags, &mut m), "vendor" => vendor_parse(&mut flags, &mut m), - "publish" => publish_parse(&mut flags, &mut m), + "publish" => publish_parse(&mut flags, &mut m)?, _ => unreachable!(), } } else { @@ -3225,12 +3226,12 @@ fn publish_subcommand() -> Command { command("publish", "Publish the current working directory's package or workspace to JSR", UnstableArgsConfig::ResolutionOnly) .defer(|cmd| { cmd - .arg( - Arg::new("token") - .long("token") - .help("The API token to use when publishing. If unset, interactive authentication is be used") - .help_heading(PUBLISH_HEADING) - ) + .arg( + Arg::new("token") + .long("token") + .help("The API token to use when publishing. If unset, interactive authentication is be used") + .help_heading(PUBLISH_HEADING) + ) .arg(config_arg()) .arg(no_config_arg()) .arg( @@ -3238,29 +3239,38 @@ fn publish_subcommand() -> Command { .long("dry-run") .help("Prepare the package for publishing performing all checks and validations without uploading") .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING), + .help_heading(PUBLISH_HEADING), ) .arg( Arg::new("allow-slow-types") .long("allow-slow-types") .help("Allow publishing with slow types") .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING), + .help_heading(PUBLISH_HEADING), ) .arg( Arg::new("allow-dirty") .long("allow-dirty") .help("Allow publishing if the repository has uncommitted changed") .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING), - ).arg( - Arg::new("no-provenance") - .long("no-provenance") - .help(cstr!("Disable provenance attestation. + .help_heading(PUBLISH_HEADING), + ) + .arg( + Arg::new("no-provenance") + .long("no-provenance") + .help(cstr!("Disable provenance attestation. Enabled by default on Github actions, publicly links the package to where it was built and published from.")) - .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING) - ) + .action(ArgAction::SetTrue) + .help_heading(PUBLISH_HEADING) + ) + .arg( + Arg::new("set-version") + .long("set-version") + .help("Set version for a package to be published. + This flag can be used while publishing individual packages and cannot be used in a workspace.") + .value_name("VERSION") + .help_heading(PUBLISH_HEADING) + ) .arg(check_arg(/* type checks by default */ true)) .arg(no_check_arg()) }) @@ -5229,7 +5239,10 @@ fn vendor_parse(flags: &mut Flags, _matches: &mut ArgMatches) { flags.subcommand = DenoSubcommand::Vendor } -fn publish_parse(flags: &mut Flags, matches: &mut ArgMatches) { +fn publish_parse( + flags: &mut Flags, + matches: &mut ArgMatches, +) -> clap::error::Result<()> { flags.type_check_mode = TypeCheckMode::Local; // local by default unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionOnly); no_check_arg_parse(flags, matches); @@ -5242,7 +5255,10 @@ fn publish_parse(flags: &mut Flags, matches: &mut ArgMatches) { allow_slow_types: matches.get_flag("allow-slow-types"), allow_dirty: matches.get_flag("allow-dirty"), no_provenance: matches.get_flag("no-provenance"), + set_version: matches.remove_one::("set-version"), }); + + Ok(()) } fn compile_args_parse( @@ -10769,6 +10785,7 @@ mod tests { "--allow-slow-types", "--allow-dirty", "--token=asdf", + "--set-version=1.0.1", ]); assert_eq!( r.unwrap(), @@ -10779,6 +10796,7 @@ mod tests { allow_slow_types: true, allow_dirty: true, no_provenance: true, + set_version: Some("1.0.1".to_string()), }), type_check_mode: TypeCheckMode::Local, ..Flags::default() diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index dec3c1afeba4bf..f121c4623c13dd 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -90,7 +90,7 @@ pub async fn publish( let cli_options = cli_factory.cli_options()?; let directory_path = cli_options.initial_cwd(); - let publish_configs = cli_options.start_dir.jsr_packages_for_publish(); + let mut publish_configs = cli_options.start_dir.jsr_packages_for_publish(); if publish_configs.is_empty() { match cli_options.start_dir.maybe_deno_json() { Some(deno_json) => { @@ -108,6 +108,18 @@ pub async fn publish( } } } + + if let Some(version) = &publish_flags.set_version { + if publish_configs.len() > 1 { + bail!("Cannot use --set-version when publishing a workspace. Change your cwd to an individual package instead."); + } + if let Some(publish_config) = publish_configs.get_mut(0) { + let mut config_file = publish_config.config_file.as_ref().clone(); + config_file.json.version = Some(version.clone()); + publish_config.config_file = Arc::new(config_file); + } + } + let specifier_unfurler = Arc::new(SpecifierUnfurler::new( if cli_options.unstable_sloppy_imports() { Some(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( @@ -410,9 +422,12 @@ impl PublishPreparer { let deno_json = &package.config_file; let config_path = deno_json.specifier.to_file_path().unwrap(); let root_dir = config_path.parent().unwrap().to_path_buf(); - let Some(version) = deno_json.json.version.clone() else { - bail!("{} is missing 'version' field", deno_json.specifier); - }; + let version = deno_json.json.version.clone().ok_or_else(|| { + deno_core::anyhow::anyhow!( + "{} is missing 'version' field", + deno_json.specifier + ) + })?; if deno_json.json.exports.is_none() { let mut suggested_entrypoint = None; @@ -435,11 +450,11 @@ impl PublishPreparer { ); bail!( - "You did not specify an entrypoint to \"{}\" package in {}. Add `exports` mapping in the configuration file, eg:\n{}", - package.name, - deno_json.specifier, - exports_content - ); + "You did not specify an entrypoint to \"{}\" package in {}. Add `exports` mapping in the configuration file, eg:\n{}", + package.name, + deno_json.specifier, + exports_content + ); } let Some(name_no_at) = package.name.strip_prefix('@') else { bail!("Invalid package name, use '@/ format"); diff --git a/tests/specs/publish/set_version/multiple_packages/LICENSE b/tests/specs/publish/set_version/multiple_packages/LICENSE new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/publish/set_version/multiple_packages/__test__.jsonc b/tests/specs/publish/set_version/multiple_packages/__test__.jsonc new file mode 100644 index 00000000000000..c191386d80fbc3 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --set-version 1.1.0 --token 'sadfasdf'", + "output": "error_set_version.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/set_version/multiple_packages/deno.json b/tests/specs/publish/set_version/multiple_packages/deno.json new file mode 100644 index 00000000000000..4b3ffe44da36d4 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/deno.json @@ -0,0 +1,8 @@ +{ + "workspace": { + "members": [ + "packages/package1", + "packages/package2" + ] + } +} diff --git a/tests/specs/publish/set_version/multiple_packages/error_set_version.out b/tests/specs/publish/set_version/multiple_packages/error_set_version.out new file mode 100644 index 00000000000000..098692c4c6256b --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/error_set_version.out @@ -0,0 +1 @@ +error: Cannot use --set-version when publishing a workspace. Change your cwd to an individual package instead. diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json b/tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json new file mode 100644 index 00000000000000..737fc9c1393dc7 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/package1", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts b/tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts new file mode 100644 index 00000000000000..a2cd81bed7f3ce --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts @@ -0,0 +1,3 @@ +export function package1() { + return "package1"; +} diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json b/tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json new file mode 100644 index 00000000000000..16987e6194f3e9 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/package2", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts b/tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts new file mode 100644 index 00000000000000..6c1361aa42afdb --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts @@ -0,0 +1,3 @@ +export function package2() { + return "package2"; +} diff --git a/tests/specs/publish/set_version/success/LICENSE b/tests/specs/publish/set_version/success/LICENSE new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/publish/set_version/success/__test__.jsonc b/tests/specs/publish/set_version/success/__test__.jsonc new file mode 100644 index 00000000000000..6f0bf802e7290c --- /dev/null +++ b/tests/specs/publish/set_version/success/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "publish --set-version 1.1.0 --token 'sadfasdf'", + "output": "successful_set_version.out" +} diff --git a/tests/specs/publish/set_version/success/deno.json b/tests/specs/publish/set_version/success/deno.json new file mode 100644 index 00000000000000..fefab899bdbebf --- /dev/null +++ b/tests/specs/publish/set_version/success/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + }, + "imports": { + "@std/http": "./std_http.ts" + } +} diff --git a/tests/specs/publish/set_version/success/mod.ts b/tests/specs/publish/set_version/success/mod.ts new file mode 100644 index 00000000000000..6e8a61bae92273 --- /dev/null +++ b/tests/specs/publish/set_version/success/mod.ts @@ -0,0 +1,7 @@ +import http from "@std/http"; + +export function foobar(): { fileServer(): void } { + return { + fileServer: http.fileServer, + }; +} diff --git a/tests/specs/publish/set_version/success/std_http.ts b/tests/specs/publish/set_version/success/std_http.ts new file mode 100644 index 00000000000000..9d57b36f34eaf9 --- /dev/null +++ b/tests/specs/publish/set_version/success/std_http.ts @@ -0,0 +1,6 @@ +// temp until we get jsr:@std/http in the test server +export default { + fileServer() { + console.log("Hi"); + }, +}; diff --git a/tests/specs/publish/set_version/success/successful_set_version.out b/tests/specs/publish/set_version/success/successful_set_version.out new file mode 100644 index 00000000000000..a5cb9aa821043e --- /dev/null +++ b/tests/specs/publish/set_version/success/successful_set_version.out @@ -0,0 +1,6 @@ +Check file:///[WILDCARD]/success/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/success/mod.ts +Publishing @foo/bar@1.1.0 ... +Successfully published @foo/bar@1.1.0 +Visit http://127.0.0.1:4250/@foo/bar@1.1.0 for details From fadda6a8fb00602e85b7aa415747c56815d1efac Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Nov 2024 19:49:19 -0500 Subject: [PATCH 358/436] fix(lockfile): track dependencies specified in TypeScript compiler options (#26551) We should track dependencies in `jsxImportSource`, `jsxImportSourceTypes`, and `types`. That way, for example, if someone removes or changes the `jsxImportSource` then we can remove those items from the lockfile. --- cli/args/deno_json.rs | 52 +++++++++++++++++-- cli/args/lockfile.rs | 6 +-- .../__test__.jsonc | 13 +++++ .../jsx_import_source_and_types/deno.json | 10 ++++ .../jsx_import_source_and_types/deno.lock.out | 30 +++++++++++ .../jsx_import_source_and_types/index.out | 7 +++ .../jsx_import_source_and_types/index.tsx | 1 + 7 files changed, 109 insertions(+), 10 deletions(-) create mode 100644 tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc create mode 100644 tests/specs/lockfile/jsx_import_source_and_types/deno.json create mode 100644 tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out create mode 100644 tests/specs/lockfile/jsx_import_source_and_types/index.out create mode 100644 tests/specs/lockfile/jsx_import_source_and_types/index.tsx diff --git a/cli/args/deno_json.rs b/cli/args/deno_json.rs index e9ab0189f506b8..a82289e67d3875 100644 --- a/cli/args/deno_json.rs +++ b/cli/args/deno_json.rs @@ -70,7 +70,41 @@ pub fn deno_json_deps( let values = imports_values(config.json.imports.as_ref()) .into_iter() .chain(scope_values(config.json.scopes.as_ref())); - values_to_set(values) + let mut set = values_to_set(values); + + if let Some(serde_json::Value::Object(compiler_options)) = + &config.json.compiler_options + { + // add jsxImportSource + if let Some(serde_json::Value::String(value)) = + compiler_options.get("jsxImportSource") + { + if let Some(dep_req) = value_to_dep_req(value) { + set.insert(dep_req); + } + } + // add jsxImportSourceTypes + if let Some(serde_json::Value::String(value)) = + compiler_options.get("jsxImportSourceTypes") + { + if let Some(dep_req) = value_to_dep_req(value) { + set.insert(dep_req); + } + } + // add the dependencies in the types array + if let Some(serde_json::Value::Array(types)) = compiler_options.get("types") + { + for value in types { + if let serde_json::Value::String(value) = value { + if let Some(dep_req) = value_to_dep_req(value) { + set.insert(dep_req); + } + } + } + } + } + + set } fn imports_values(value: Option<&serde_json::Value>) -> Vec<&String> { @@ -98,15 +132,23 @@ fn values_to_set<'a>( ) -> HashSet { let mut entries = HashSet::new(); for value in values { - if let Ok(req_ref) = JsrPackageReqReference::from_str(value) { - entries.insert(JsrDepPackageReq::jsr(req_ref.into_inner().req)); - } else if let Ok(req_ref) = NpmPackageReqReference::from_str(value) { - entries.insert(JsrDepPackageReq::npm(req_ref.into_inner().req)); + if let Some(dep_req) = value_to_dep_req(value) { + entries.insert(dep_req); } } entries } +fn value_to_dep_req(value: &str) -> Option { + if let Ok(req_ref) = JsrPackageReqReference::from_str(value) { + Some(JsrDepPackageReq::jsr(req_ref.into_inner().req)) + } else if let Ok(req_ref) = NpmPackageReqReference::from_str(value) { + Some(JsrDepPackageReq::npm(req_ref.into_inner().req)) + } else { + None + } +} + pub fn check_warn_tsconfig(ts_config: &TsConfigForEmit) { if let Some(ignored_options) = &ts_config.maybe_ignored_options { log::warn!("{}", ignored_options); diff --git a/cli/args/lockfile.rs b/cli/args/lockfile.rs index 1805d264263baf..a9eb8a0d7cae83 100644 --- a/cli/args/lockfile.rs +++ b/cli/args/lockfile.rs @@ -126,11 +126,7 @@ impl CliLockfile { maybe_deno_json: Option<&ConfigFile>, ) -> HashSet { maybe_deno_json - .map(|c| { - crate::args::deno_json::deno_json_deps(c) - .into_iter() - .collect() - }) + .map(crate::args::deno_json::deno_json_deps) .unwrap_or_default() } diff --git a/tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc b/tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc new file mode 100644 index 00000000000000..08ab2acf957f84 --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run index.tsx", + "output": "index.out" + }, { + "args": [ + "eval", + "console.log(Deno.readTextFileSync('deno.lock').trim())" + ], + "output": "deno.lock.out" + }] +} diff --git a/tests/specs/lockfile/jsx_import_source_and_types/deno.json b/tests/specs/lockfile/jsx_import_source_and_types/deno.json new file mode 100644 index 00000000000000..3755934a580804 --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/deno.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "npm:react", + "jsxImportSourceTypes": "npm:@types/react", + "types": [ + "npm:@types/node" + ] + } +} diff --git a/tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out b/tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out new file mode 100644 index 00000000000000..3a933a1aa28b9a --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out @@ -0,0 +1,30 @@ +{ + "version": "4", + "specifiers": { + "npm:react@*": "18.2.0" + }, + "npm": { + "js-tokens@4.0.0": { + "integrity": "[WILDLINE]" + }, + "loose-envify@1.4.0": { + "integrity": "[WILDLINE]", + "dependencies": [ + "js-tokens" + ] + }, + "react@18.2.0": { + "integrity": "[WILDLINE]", + "dependencies": [ + "loose-envify" + ] + } + }, + "workspace": { + "dependencies": [ + "npm:@types/node@*", + "npm:@types/react@*", + "npm:react@*" + ] + } +} diff --git a/tests/specs/lockfile/jsx_import_source_and_types/index.out b/tests/specs/lockfile/jsx_import_source_and_types/index.out new file mode 100644 index 00000000000000..7fc82c71df2f74 --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/index.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/react +Download http://localhost:4260/loose-envify +Download http://localhost:4260/js-tokens +Download http://localhost:4260/react/react-18.2.0.tgz +Download http://localhost:4260/loose-envify/loose-envify-1.4.0.tgz +Download http://localhost:4260/js-tokens/js-tokens-4.0.0.tgz +1 diff --git a/tests/specs/lockfile/jsx_import_source_and_types/index.tsx b/tests/specs/lockfile/jsx_import_source_and_types/index.tsx new file mode 100644 index 00000000000000..296d5492b0034a --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/index.tsx @@ -0,0 +1 @@ +console.log(1); From 429f3929fae7446d720e21f94f8d7da251458bf3 Mon Sep 17 00:00:00 2001 From: haturau <135221985+haturatu@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:04:48 +0900 Subject: [PATCH 359/436] feat(info): show location for Web Cache (#26205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #26181 --------- Co-authored-by: Bartek IwaƄczuk --- cli/tools/info.rs | 7 +++++++ cli/worker.rs | 17 +++++++++-------- tests/specs/info/flag/041_info_flag.out | 1 + .../flag_location/041_info_flag_location.out | 1 + tests/specs/info/json/info_json.out | 3 ++- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/cli/tools/info.rs b/cli/tools/info.rs index 6cddf9699518ae..c3c37f02685715 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -126,6 +126,7 @@ fn print_cache_info( let registry_cache = dir.registries_folder_path(); let mut origin_dir = dir.origin_data_folder_path(); let deno_dir = dir.root_path_for_display().to_string(); + let web_cache_dir = crate::worker::get_cache_storage_dir(); if let Some(location) = &location { origin_dir = @@ -143,6 +144,7 @@ fn print_cache_info( "typescriptCache": typescript_cache, "registryCache": registry_cache, "originStorage": origin_dir, + "webCacheStorage": web_cache_dir, }); if location.is_some() { @@ -177,6 +179,11 @@ fn print_cache_info( colors::bold("Origin storage:"), origin_dir.display() ); + println!( + "{} {}", + colors::bold("Web cache storage:"), + web_cache_dir.display() + ); if location.is_some() { println!( "{} {}", diff --git a/cli/worker.rs b/cli/worker.rs index 3b09714d59fb3e..0b07bb4bf3d9fe 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -393,6 +393,13 @@ impl CliMainWorker { } } +// TODO(bartlomieju): this should be moved to some other place, added to avoid string +// duplication between worker setups and `deno info` output. +pub fn get_cache_storage_dir() -> PathBuf { + // Note: we currently use temp_dir() to avoid managing storage size. + std::env::temp_dir().join("deno_cache") +} + #[derive(Clone)] pub struct CliMainWorkerFactory { shared: Arc, @@ -529,10 +536,7 @@ impl CliMainWorkerFactory { }); let cache_storage_dir = maybe_storage_key.map(|key| { // TODO(@satyarohith): storage quota management - // Note: we currently use temp_dir() to avoid managing storage size. - std::env::temp_dir() - .join("deno_cache") - .join(checksum::gen(&[key.as_bytes()])) + get_cache_storage_dir().join(checksum::gen(&[key.as_bytes()])) }); // TODO(bartlomieju): this is cruft, update FeatureChecker to spit out @@ -729,10 +733,7 @@ fn create_web_worker_callback( .resolve_storage_key(&args.main_module); let cache_storage_dir = maybe_storage_key.map(|key| { // TODO(@satyarohith): storage quota management - // Note: we currently use temp_dir() to avoid managing storage size. - std::env::temp_dir() - .join("deno_cache") - .join(checksum::gen(&[key.as_bytes()])) + get_cache_storage_dir().join(checksum::gen(&[key.as_bytes()])) }); // TODO(bartlomieju): this is cruft, update FeatureChecker to spit out diff --git a/tests/specs/info/flag/041_info_flag.out b/tests/specs/info/flag/041_info_flag.out index 72a00be303f853..48a08de4d90685 100644 --- a/tests/specs/info/flag/041_info_flag.out +++ b/tests/specs/info/flag/041_info_flag.out @@ -4,3 +4,4 @@ npm modules cache: [WILDCARD]npm Emitted modules cache: [WILDCARD]gen Language server registries cache: [WILDCARD]registries Origin storage: [WILDCARD]location_data +Web cache storage: [WILDCARD]deno_cache diff --git a/tests/specs/info/flag_location/041_info_flag_location.out b/tests/specs/info/flag_location/041_info_flag_location.out index 684db2eec5d062..d3ba01ad3567cc 100644 --- a/tests/specs/info/flag_location/041_info_flag_location.out +++ b/tests/specs/info/flag_location/041_info_flag_location.out @@ -4,4 +4,5 @@ npm modules cache: [WILDCARD]npm Emitted modules cache: [WILDCARD]gen Language server registries cache: [WILDCARD]registries Origin storage: [WILDCARD]location_data[WILDCARD] +Web cache storage: [WILDCARD]deno_cache Local Storage: [WILDCARD]location_data[WILDCARD]local_storage diff --git a/tests/specs/info/json/info_json.out b/tests/specs/info/json/info_json.out index 551f61026dad35..cc43c5f10aa4c0 100644 --- a/tests/specs/info/json/info_json.out +++ b/tests/specs/info/json/info_json.out @@ -5,5 +5,6 @@ "npmCache": "[WILDCARD]npm", "typescriptCache": "[WILDCARD]gen", "registryCache": "[WILDCARD]registries", - "originStorage": "[WILDCARD]location_data" + "originStorage": "[WILDCARD]location_data", + "webCacheStorage": [WILDCARD]deno_cache" } From dabb6775f351a163d3e55e15fef957db8aa28b72 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Nov 2024 20:14:49 -0500 Subject: [PATCH 360/436] fix(publish): improve error message when missing exports (#26945) --- cli/tools/registry/mod.rs | 65 ++++++++++--------- tests/specs/publish/missing_exports/LICENSE | 0 .../publish/missing_exports/__test__.jsonc | 5 ++ tests/specs/publish/missing_exports/deno.json | 7 ++ tests/specs/publish/missing_exports/mod.ts | 3 + .../specs/publish/missing_exports/publish.out | 8 +++ 6 files changed, 56 insertions(+), 32 deletions(-) create mode 100644 tests/specs/publish/missing_exports/LICENSE create mode 100644 tests/specs/publish/missing_exports/__test__.jsonc create mode 100644 tests/specs/publish/missing_exports/deno.json create mode 100644 tests/specs/publish/missing_exports/mod.ts create mode 100644 tests/specs/publish/missing_exports/publish.out diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index f121c4623c13dd..89447f04f9d5fa 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -12,6 +12,7 @@ use std::sync::Arc; use base64::prelude::BASE64_STANDARD; use base64::Engine; use deno_ast::ModuleSpecifier; +use deno_config::deno_json::ConfigFile; use deno_config::workspace::JsrPackageConfig; use deno_config::workspace::PackageJsonDepResolution; use deno_config::workspace::Workspace; @@ -95,8 +96,9 @@ pub async fn publish( match cli_options.start_dir.maybe_deno_json() { Some(deno_json) => { debug_assert!(!deno_json.is_package()); + error_missing_exports_field(deno_json)?; bail!( - "Missing 'name', 'version' and 'exports' field in '{}'.", + "Missing 'name' or 'exports' field in '{}'.", deno_json.specifier ); } @@ -416,9 +418,6 @@ impl PublishPreparer { graph: Arc, diagnostics_collector: &PublishDiagnosticsCollector, ) -> Result, AnyError> { - static SUGGESTED_ENTRYPOINTS: [&str; 4] = - ["mod.ts", "mod.js", "index.ts", "index.js"]; - let deno_json = &package.config_file; let config_path = deno_json.specifier.to_file_path().unwrap(); let root_dir = config_path.parent().unwrap().to_path_buf(); @@ -428,34 +427,6 @@ impl PublishPreparer { deno_json.specifier ) })?; - if deno_json.json.exports.is_none() { - let mut suggested_entrypoint = None; - - for entrypoint in SUGGESTED_ENTRYPOINTS { - if root_dir.join(entrypoint).exists() { - suggested_entrypoint = Some(entrypoint); - break; - } - } - - let exports_content = format!( - r#"{{ - "name": "{}", - "version": "{}", - "exports": "{}" -}}"#, - package.name, - version, - suggested_entrypoint.unwrap_or("") - ); - - bail!( - "You did not specify an entrypoint to \"{}\" package in {}. Add `exports` mapping in the configuration file, eg:\n{}", - package.name, - deno_json.specifier, - exports_content - ); - } let Some(name_no_at) = package.name.strip_prefix('@') else { bail!("Invalid package name, use '@/ format"); }; @@ -1287,6 +1258,36 @@ fn has_license_file<'a>( }) } +fn error_missing_exports_field(deno_json: &ConfigFile) -> Result<(), AnyError> { + static SUGGESTED_ENTRYPOINTS: [&str; 4] = + ["mod.ts", "mod.js", "index.ts", "index.js"]; + let mut suggested_entrypoint = None; + + for entrypoint in SUGGESTED_ENTRYPOINTS { + if deno_json.dir_path().join(entrypoint).exists() { + suggested_entrypoint = Some(entrypoint); + break; + } + } + + let exports_content = format!( + r#"{{ + "name": "{}", + "version": "{}", + "exports": "{}" +}}"#, + deno_json.json.name.as_deref().unwrap_or("@scope/name"), + deno_json.json.name.as_deref().unwrap_or("0.0.0"), + suggested_entrypoint.unwrap_or("") + ); + + bail!( + "You did not specify an entrypoint in {}. Add `exports` mapping in the configuration file, eg:\n{}", + deno_json.specifier, + exports_content + ); +} + #[allow(clippy::print_stderr)] fn ring_bell() { // ASCII code for the bell character. diff --git a/tests/specs/publish/missing_exports/LICENSE b/tests/specs/publish/missing_exports/LICENSE new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/publish/missing_exports/__test__.jsonc b/tests/specs/publish/missing_exports/__test__.jsonc new file mode 100644 index 00000000000000..241bb87e044023 --- /dev/null +++ b/tests/specs/publish/missing_exports/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "publish.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/missing_exports/deno.json b/tests/specs/publish/missing_exports/deno.json new file mode 100644 index 00000000000000..4a66546360ceee --- /dev/null +++ b/tests/specs/publish/missing_exports/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "imports": { + "@std/http": "./std_http.ts" + } +} diff --git a/tests/specs/publish/missing_exports/mod.ts b/tests/specs/publish/missing_exports/mod.ts new file mode 100644 index 00000000000000..8d9b8a22a101a9 --- /dev/null +++ b/tests/specs/publish/missing_exports/mod.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/publish/missing_exports/publish.out b/tests/specs/publish/missing_exports/publish.out new file mode 100644 index 00000000000000..ded06f638baef6 --- /dev/null +++ b/tests/specs/publish/missing_exports/publish.out @@ -0,0 +1,8 @@ +Warning "exports" field should be specified when specifying a "name". + at file:///[WILDLINE]/deno.json +error: You did not specify an entrypoint in file:///[WILDLINE]/deno.json. Add `exports` mapping in the configuration file, eg: +{ + "name": "@foo/bar", + "version": "@foo/bar", + "exports": "mod.ts" +} From 318dd3cbc36f3acc9fcc2eb246c9093a565a2556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 20 Nov 2024 01:23:20 +0000 Subject: [PATCH 361/436] feat(task): add --eval flag (#26943) This commit adds `--eval` flag to `deno task` subcommand. This flag allows to evaluate provided "task name" as a task itself, effectively allowing to use `deno_task_shell` from the command line. Also fixes shebang parsing for `node_modules/.bin/` entries to handle `#!/usr/bin/node -S node` in addition to `#!/usr/bin/node node`. Closes https://github.com/denoland/deno/issues/26918 --- cli/args/flags.rs | 57 ++++++++++++++++++++++++++-- cli/main.rs | 1 + cli/task_runner.rs | 48 ++++++++++++++++------- cli/tools/task.rs | 15 +++++++- tests/specs/task/eval/__test__.jsonc | 35 +++++++++++++++++ tests/specs/task/eval/bin.out | 3 ++ tests/specs/task/eval/echo_pwd.out | 2 + tests/specs/task/eval/no_arg.out | 4 ++ tests/specs/task/eval/package.json | 9 +++++ tests/specs/task/eval/piped.out | 3 ++ 10 files changed, 160 insertions(+), 17 deletions(-) create mode 100644 tests/specs/task/eval/__test__.jsonc create mode 100644 tests/specs/task/eval/bin.out create mode 100644 tests/specs/task/eval/echo_pwd.out create mode 100644 tests/specs/task/eval/no_arg.out create mode 100644 tests/specs/task/eval/package.json create mode 100644 tests/specs/task/eval/piped.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index b31bfcecf7cb8d..5d85f2861cd9e8 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -380,6 +380,7 @@ pub struct TaskFlags { pub cwd: Option, pub task: Option, pub is_run: bool, + pub eval: bool, } #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1386,7 +1387,7 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { "repl" => repl_parse(&mut flags, &mut m)?, "run" => run_parse(&mut flags, &mut m, app, false)?, "serve" => serve_parse(&mut flags, &mut m, app)?, - "task" => task_parse(&mut flags, &mut m), + "task" => task_parse(&mut flags, &mut m, app)?, "test" => test_parse(&mut flags, &mut m)?, "types" => types_parse(&mut flags, &mut m), "uninstall" => uninstall_parse(&mut flags, &mut m), @@ -2931,7 +2932,10 @@ fn task_subcommand() -> Command { deno task build List all available tasks: - deno task" + deno task + +Evaluate a task from string + deno task --eval \"echo $(pwd)\"" ), UnstableArgsConfig::ResolutionAndRuntime, ) @@ -2947,6 +2951,13 @@ List all available tasks: .help("Specify the directory to run the task in") .value_hint(ValueHint::DirPath), ) + .arg( + Arg::new("eval") + .long("eval") + .help( + "Evaluate the passed value as if, it was a task in a configuration file", + ).action(ArgAction::SetTrue) + ) .arg(node_modules_dir_arg()) }) } @@ -5066,7 +5077,11 @@ fn serve_parse( Ok(()) } -fn task_parse(flags: &mut Flags, matches: &mut ArgMatches) { +fn task_parse( + flags: &mut Flags, + matches: &mut ArgMatches, + mut app: Command, +) -> clap::error::Result<()> { flags.config_flag = matches .remove_one::("config") .map(ConfigFlag::Path) @@ -5079,6 +5094,7 @@ fn task_parse(flags: &mut Flags, matches: &mut ArgMatches) { cwd: matches.remove_one::("cwd"), task: None, is_run: false, + eval: matches.get_flag("eval"), }; if let Some((task, mut matches)) = matches.remove_subcommand() { @@ -5091,9 +5107,15 @@ fn task_parse(flags: &mut Flags, matches: &mut ArgMatches) { .flatten() .filter_map(|arg| arg.into_string().ok()), ); + } else if task_flags.eval { + return Err(app.find_subcommand_mut("task").unwrap().error( + clap::error::ErrorKind::MissingRequiredArgument, + "[TASK] must be specified when using --eval", + )); } flags.subcommand = DenoSubcommand::Task(task_flags); + Ok(()) } fn parallel_arg_parse(matches: &mut ArgMatches) -> Option { @@ -10274,6 +10296,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), argv: svec!["hello", "world"], ..Flags::default() @@ -10288,6 +10311,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), ..Flags::default() } @@ -10301,10 +10325,28 @@ mod tests { cwd: Some("foo".to_string()), task: Some("build".to_string()), is_run: false, + eval: false, }), ..Flags::default() } ); + + let r = flags_from_vec(svec!["deno", "task", "--eval", "echo 1"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("echo 1".to_string()), + is_run: false, + eval: true, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--eval"]); + assert!(r.is_err()); } #[test] @@ -10326,6 +10368,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), argv: svec!["--", "hello", "world"], config_flag: ConfigFlag::Path("deno.json".to_owned()), @@ -10343,6 +10386,7 @@ mod tests { cwd: Some("foo".to_string()), task: Some("build".to_string()), is_run: false, + eval: false, }), argv: svec!["--", "hello", "world"], ..Flags::default() @@ -10361,6 +10405,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), argv: svec!["--"], ..Flags::default() @@ -10378,6 +10423,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), argv: svec!["-1", "--test"], ..Flags::default() @@ -10395,6 +10441,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), argv: svec!["--test"], ..Flags::default() @@ -10413,6 +10460,7 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + eval: false, }), log_level: Some(log::Level::Error), ..Flags::default() @@ -10430,6 +10478,7 @@ mod tests { cwd: None, task: None, is_run: false, + eval: false, }), ..Flags::default() } @@ -10446,6 +10495,7 @@ mod tests { cwd: None, task: None, is_run: false, + eval: false, }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), ..Flags::default() @@ -10463,6 +10513,7 @@ mod tests { cwd: None, task: None, is_run: false, + eval: false, }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), ..Flags::default() diff --git a/cli/main.rs b/cli/main.rs index 7d3ef0e6a0563a..3dd2692f053739 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -238,6 +238,7 @@ async fn run_subcommand(flags: Arc) -> Result { cwd: None, task: Some(run_flags.script.clone()), is_run: true, + eval: false, }; new_flags.subcommand = DenoSubcommand::Task(task_flags.clone()); let result = tools::task::execute_script(Arc::new(new_flags), task_flags.clone()).await; diff --git a/cli/task_runner.rs b/cli/task_runner.rs index 43840e868de83e..ec043f280e73cd 100644 --- a/cli/task_runner.rs +++ b/cli/task_runner.rs @@ -483,20 +483,32 @@ fn resolve_execution_path_from_npx_shim( static SCRIPT_PATH_RE: Lazy = lazy_regex::lazy_regex!(r#""\$basedir\/([^"]+)" "\$@""#); - if text.starts_with("#!/usr/bin/env node") { - // launch this file itself because it's a JS file - Some(file_path) - } else { - // Search for... - // > "$basedir/../next/dist/bin/next" "$@" - // ...which is what it will look like on Windows - SCRIPT_PATH_RE - .captures(text) - .and_then(|c| c.get(1)) - .map(|relative_path| { - file_path.parent().unwrap().join(relative_path.as_str()) - }) + let maybe_first_line = { + let index = text.find("\n")?; + Some(&text[0..index]) + }; + + if let Some(first_line) = maybe_first_line { + // NOTE(bartlomieju): this is not perfect, but handle two most common scenarios + // where Node is run without any args. If there are args then we use `NodeCommand` + // struct. + if first_line == "#!/usr/bin/env node" + || first_line == "#!/usr/bin/env -S node" + { + // launch this file itself because it's a JS file + return Some(file_path); + } } + + // Search for... + // > "$basedir/../next/dist/bin/next" "$@" + // ...which is what it will look like on Windows + SCRIPT_PATH_RE + .captures(text) + .and_then(|c| c.get(1)) + .map(|relative_path| { + file_path.parent().unwrap().join(relative_path.as_str()) + }) } fn resolve_managed_npm_commands( @@ -564,6 +576,16 @@ mod test { let unix_shim = r#"#!/usr/bin/env node "use strict"; console.log('Hi!'); +"#; + let path = PathBuf::from("/node_modules/.bin/example"); + assert_eq!( + resolve_execution_path_from_npx_shim(path.clone(), unix_shim).unwrap(), + path + ); + // example shim on unix + let unix_shim = r#"#!/usr/bin/env -S node +"use strict"; +console.log('Hi!'); "#; let path = PathBuf::from("/node_modules/.bin/example"); assert_eq!( diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 682dbf814d384c..85145c7af78eff 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -42,7 +42,7 @@ pub async fn execute_script( let factory = CliFactory::from_flags(flags); let cli_options = factory.cli_options()?; let start_dir = &cli_options.start_dir; - if !start_dir.has_deno_or_pkg_json() { + if !start_dir.has_deno_or_pkg_json() && !task_flags.eval { bail!("deno task couldn't find deno.json(c). See https://docs.deno.com/go/config") } let force_use_pkg_json = @@ -90,6 +90,19 @@ pub async fn execute_script( concurrency: no_of_concurrent_tasks.into(), }; + if task_flags.eval { + return task_runner + .run_deno_task( + &Url::from_directory_path(cli_options.initial_cwd()).unwrap(), + &"".to_string(), + &TaskDefinition { + command: task_flags.task.as_ref().unwrap().to_string(), + dependencies: vec![], + description: None, + }, + ) + .await; + } task_runner.run_task(task_name).await } diff --git a/tests/specs/task/eval/__test__.jsonc b/tests/specs/task/eval/__test__.jsonc new file mode 100644 index 00000000000000..394db3052a04f1 --- /dev/null +++ b/tests/specs/task/eval/__test__.jsonc @@ -0,0 +1,35 @@ +{ + "tests": { + "no_arg": { + "args": "task --eval", + "output": "no_arg.out", + "exitCode": 1 + }, + "echo_pwd": { + "args": ["task", "--eval", "echo $(pwd)"], + "output": "echo_pwd.out" + }, + "piped": { + "args": [ + "task", + "--eval", + "echo 12345 | (deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)' && deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)')" + ], + "output": "piped.out" + }, + "node_modules_bin": { + "tempDir": true, + "steps": [{ + "args": "install", + "output": "[WILDCARD]Initialize @denotest/bin[WILDCARD]" + }, { + "args": [ + "task", + "--eval", + "cli-esm hi hello" + ], + "output": "bin.out" + }] + } + } +} diff --git a/tests/specs/task/eval/bin.out b/tests/specs/task/eval/bin.out new file mode 100644 index 00000000000000..7663216bf79ee8 --- /dev/null +++ b/tests/specs/task/eval/bin.out @@ -0,0 +1,3 @@ +Task cli-esm hi hello +hi +hello diff --git a/tests/specs/task/eval/echo_pwd.out b/tests/specs/task/eval/echo_pwd.out new file mode 100644 index 00000000000000..f0c53d8b49d5d3 --- /dev/null +++ b/tests/specs/task/eval/echo_pwd.out @@ -0,0 +1,2 @@ +Task echo $(pwd) +[WILDCARD] diff --git a/tests/specs/task/eval/no_arg.out b/tests/specs/task/eval/no_arg.out new file mode 100644 index 00000000000000..e46285576246d0 --- /dev/null +++ b/tests/specs/task/eval/no_arg.out @@ -0,0 +1,4 @@ +error: [TASK] must be specified when using --eval + +Usage: deno task [OPTIONS] [TASK] + diff --git a/tests/specs/task/eval/package.json b/tests/specs/task/eval/package.json new file mode 100644 index 00000000000000..c0a34548f57001 --- /dev/null +++ b/tests/specs/task/eval/package.json @@ -0,0 +1,9 @@ +{ + "name": "bin_package", + "devDependencies": { + "@denotest/bin": "1.0.0" + }, + "scripts": { + "sayhi": "cli-esm hi hello" + } +} diff --git a/tests/specs/task/eval/piped.out b/tests/specs/task/eval/piped.out new file mode 100644 index 00000000000000..64ccd7ab72e8f5 --- /dev/null +++ b/tests/specs/task/eval/piped.out @@ -0,0 +1,3 @@ +Task echo 12345 | (deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)' && deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)') +Uint8Array(1) [ 49 ] +Uint8Array(1) [ 50 ] From 03f47e6cf05cb1237bc13733a0c13496f84064b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 20 Nov 2024 18:01:56 +0000 Subject: [PATCH 362/436] fix(fmt): formatting of .svelte files (#26948) Closes https://github.com/denoland/deno/issues/26690 Closes https://github.com/denoland/deno/issues/26324 --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 52bb39ee8309de..bc386c9571267c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4562,9 +4562,9 @@ dependencies = [ [[package]] name = "markup_fmt" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebae65c91eab3d42231232bf48107f351e5a8d511454927218c53aeb68bbdb6f" +checksum = "f303c36143671ac6c54112eb5aa95649b169dae783fdb6ead2c0e88b408c425c" dependencies = [ "aho-corasick", "css_dataset", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 16f39e9d481dbf..ae573827b1c229 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -129,7 +129,7 @@ libz-sys.workspace = true log = { workspace = true, features = ["serde"] } lsp-types.workspace = true malva = "=0.11.0" -markup_fmt = "=0.15.0" +markup_fmt = "=0.16.0" memmem.workspace = true monch.workspace = true notify.workspace = true From 8f7279862249d8274dbef2cf5f48d13f0c0ab53a Mon Sep 17 00:00:00 2001 From: Keith Tan Date: Wed, 20 Nov 2024 20:59:43 +0100 Subject: [PATCH 363/436] feat(lint): Add checked files list to the JSON output(#26936) Fixes #26930 --- cli/tools/lint/reporters.rs | 18 ++++++++++++++++++ tests/specs/lint/json/expected_json.out | 5 +++++ .../stdin_json/expected_from_stdin_json.out | 5 ++++- .../with_report_config_override.out | 5 ++++- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/cli/tools/lint/reporters.rs b/cli/tools/lint/reporters.rs index bf80be9f20ed58..18bc1216a69d7e 100644 --- a/cli/tools/lint/reporters.rs +++ b/cli/tools/lint/reporters.rs @@ -175,6 +175,7 @@ struct JsonLintReporter { version: u8, diagnostics: Vec, errors: Vec, + checked_files: Vec, } impl JsonLintReporter { @@ -183,6 +184,7 @@ impl JsonLintReporter { version: JSON_SCHEMA_VERSION, diagnostics: Vec::new(), errors: Vec::new(), + checked_files: Vec::new(), } } } @@ -209,6 +211,17 @@ impl LintReporter for JsonLintReporter { code: d.code().to_string(), hint: d.hint().map(|h| h.to_string()), }); + + let file_path = d + .specifier + .to_file_path() + .unwrap() + .to_string_lossy() + .to_string(); + + if !self.checked_files.contains(&file_path) { + self.checked_files.push(file_path); + } } fn visit_error(&mut self, file_path: &str, err: &AnyError) { @@ -216,10 +229,15 @@ impl LintReporter for JsonLintReporter { file_path: file_path.to_string(), message: err.to_string(), }); + + if !self.checked_files.contains(&file_path.to_string()) { + self.checked_files.push(file_path.to_string()); + } } fn close(&mut self, _check_count: usize) { sort_diagnostics(&mut self.diagnostics); + self.checked_files.sort(); let json = serde_json::to_string_pretty(&self); #[allow(clippy::print_stdout)] { diff --git a/tests/specs/lint/json/expected_json.out b/tests/specs/lint/json/expected_json.out index 6712c891a592dd..242c47cf561cb8 100644 --- a/tests/specs/lint/json/expected_json.out +++ b/tests/specs/lint/json/expected_json.out @@ -61,5 +61,10 @@ "file_path": "[WILDCARD]malformed.js", "message": "Expected '{', got 'B' at [WILDCARD]malformed.js:4:16\n\n export class A B C\n ~" } + ], + "checked_files": [ + "[WILDCARD]file1.js", + "[WILDCARD]file2.ts", + "[WILDCARD]malformed.js" ] } diff --git a/tests/specs/lint/stdin_json/expected_from_stdin_json.out b/tests/specs/lint/stdin_json/expected_from_stdin_json.out index 5788248aa217c7..8db157bccbf35b 100644 --- a/tests/specs/lint/stdin_json/expected_from_stdin_json.out +++ b/tests/specs/lint/stdin_json/expected_from_stdin_json.out @@ -20,5 +20,8 @@ "hint": [WILDCARD] } ], - "errors": [] + "errors": [], + "checked_files": [ + "[WILDCARD]main.ts" + ] } diff --git a/tests/specs/lint/with_report_config_override/with_report_config_override.out b/tests/specs/lint/with_report_config_override/with_report_config_override.out index ad32e31236f25f..fb873f187e0c87 100644 --- a/tests/specs/lint/with_report_config_override/with_report_config_override.out +++ b/tests/specs/lint/with_report_config_override/with_report_config_override.out @@ -38,5 +38,8 @@ "hint": "If this is intentional, prefix it with an underscore like `_add`" } ], - "errors": [] + "errors": [], + "checked_files": [ + "[WILDCARD]a.ts" + ] } From cf49599359d480b0716b34a8f0a27f37e2f51e48 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Wed, 20 Nov 2024 13:24:04 -0800 Subject: [PATCH 364/436] feat: permission stack traces in ops (#26938) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit improves permission prompts by adding an option to print a full trace of where the permissions is being requested. Due to big performance hint of stack trace collection, this is only enabled when `DENO_TRACE_PERMISSIONS` env var is present. Closes https://github.com/denoland/deno/issues/20756 --------- Co-authored-by: Bartek IwaƄczuk --- cli/args/flags.rs | 41 ++++++------ cli/args/mod.rs | 4 ++ cli/ops/bench.rs | 2 +- cli/ops/testing.rs | 2 +- cli/worker.rs | 4 ++ ext/fetch/lib.rs | 4 +- ext/ffi/call.rs | 4 +- ext/ffi/callback.rs | 2 +- ext/ffi/dlfcn.rs | 2 +- ext/ffi/repr.rs | 42 ++++++------ ext/fs/ops.rs | 88 ++++++++++++------------- ext/kv/lib.rs | 2 +- ext/napi/lib.rs | 2 +- ext/net/ops.rs | 12 ++-- ext/net/ops_tls.rs | 6 +- ext/net/ops_unix.rs | 12 ++-- ext/node/ops/fs.rs | 18 ++--- ext/node/ops/http.rs | 2 +- ext/node/ops/inspector.rs | 4 +- ext/node/ops/os/mod.rs | 14 ++-- ext/node/ops/process.rs | 2 +- ext/node/ops/require.rs | 18 ++--- ext/node/ops/worker_threads.rs | 2 +- ext/websocket/lib.rs | 4 +- runtime/ops/fs_events.rs | 2 +- runtime/ops/os/mod.rs | 30 ++++----- runtime/ops/permissions.rs | 2 +- runtime/ops/process.rs | 8 +-- runtime/ops/worker_host.rs | 2 +- runtime/permissions/prompter.rs | 62 ++++++++++++----- runtime/web_worker.rs | 8 +++ runtime/worker.rs | 7 ++ tests/integration/run_tests.rs | 52 ++++++++++++++- tests/testdata/run/permissions_trace.ts | 9 +++ 34 files changed, 294 insertions(+), 181 deletions(-) create mode 100644 tests/testdata/run/permissions_trace.ts diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 5d85f2861cd9e8..567d4adfb9b82c 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1160,25 +1160,26 @@ static ENV_VARIABLES_HELP: &str = cstr!( Docs: https://docs.deno.com/go/env-vars DENO_AUTH_TOKENS A semi-colon separated list of bearer tokens and hostnames - to use when fetching remote modules from private repositories - (e.g. "abcde12345@deno.land;54321edcba@github.com") - DENO_CERT Load certificate authorities from PEM encoded file - DENO_DIR Set the cache directory - DENO_INSTALL_ROOT Set deno install's output directory - (defaults to $HOME/.deno/bin) - DENO_NO_PACKAGE_JSON Disables auto-resolution of package.json - DENO_NO_UPDATE_CHECK Set to disable checking if a newer Deno version is available - DENO_TLS_CA_STORE Comma-separated list of order dependent certificate stores. - Possible values: "system", "mozilla". - (defaults to "mozilla") - HTTP_PROXY Proxy address for HTTP requests - (module downloads, fetch) - HTTPS_PROXY Proxy address for HTTPS requests - (module downloads, fetch) - NO_COLOR Set to disable color - NO_PROXY Comma-separated list of hosts which do not use a proxy - (module downloads, fetch) - NPM_CONFIG_REGISTRY URL to use for the npm registry."# + to use when fetching remote modules from private repositories + (e.g. "abcde12345@deno.land;54321edcba@github.com") + DENO_CERT Load certificate authorities from PEM encoded file + DENO_DIR Set the cache directory + DENO_INSTALL_ROOT Set deno install's output directory + (defaults to $HOME/.deno/bin) + DENO_NO_PACKAGE_JSON Disables auto-resolution of package.json + DENO_NO_UPDATE_CHECK Set to disable checking if a newer Deno version is available + DENO_TLS_CA_STORE Comma-separated list of order dependent certificate stores. + DENO_TRACE_PERMISSIONS Environmental variable to enable stack traces in permission prompts. + Possible values: "system", "mozilla". + (defaults to "mozilla") + HTTP_PROXY Proxy address for HTTP requests + (module downloads, fetch) + HTTPS_PROXY Proxy address for HTTPS requests + (module downloads, fetch) + NO_COLOR Set to disable color + NO_PROXY Comma-separated list of hosts which do not use a proxy + (module downloads, fetch) + NPM_CONFIG_REGISTRY URL to use for the npm registry."# ); static DENO_HELP: &str = cstr!( @@ -3346,6 +3347,8 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { --deny-run | --deny-run="whoami,ps" --deny-ffi[=<...] (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files. --deny-ffi | --deny-ffi="./libfoo.so" + DENO_TRACE_PERMISSIONS Environmental variable to enable stack traces in permission prompts. + DENO_TRACE_PERMISSIONS=1 deno run main.ts "#)) .arg( { diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 21df6cf115ae8a..bbdfa478c13912 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1912,6 +1912,10 @@ pub fn resolve_no_prompt(flags: &PermissionFlags) -> bool { flags.no_prompt || has_flag_env_var("DENO_NO_PROMPT") } +pub fn has_trace_permissions_enabled() -> bool { + has_flag_env_var("DENO_TRACE_PERMISSIONS") +} + pub fn has_flag_env_var(name: &str) -> bool { let value = env::var(name); matches!(value.as_ref().map(|s| s.as_str()), Ok("1")) diff --git a/cli/ops/bench.rs b/cli/ops/bench.rs index 1f4a4bd9b5879d..a7c788a1899884 100644 --- a/cli/ops/bench.rs +++ b/cli/ops/bench.rs @@ -51,7 +51,7 @@ fn op_bench_get_origin(state: &mut OpState) -> String { #[derive(Clone)] struct PermissionsHolder(Uuid, PermissionsContainer); -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_pledge_test_permissions( state: &mut OpState, diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs index 00aafb8286e3a8..3c6936971a5ae3 100644 --- a/cli/ops/testing.rs +++ b/cli/ops/testing.rs @@ -46,7 +46,7 @@ deno_core::extension!(deno_test, #[derive(Clone)] struct PermissionsHolder(Uuid, PermissionsContainer); -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_pledge_test_permissions( state: &mut OpState, diff --git a/cli/worker.rs b/cli/worker.rs index 0b07bb4bf3d9fe..5761571c5c0e56 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -617,6 +617,8 @@ impl CliMainWorkerFactory { origin_storage_dir, stdio, skip_op_registration: shared.options.skip_op_registration, + enable_stack_trace_arg_in_ops: crate::args::has_trace_permissions_enabled( + ), }; let mut worker = MainWorker::bootstrap_from_options( @@ -813,6 +815,8 @@ fn create_web_worker_callback( strace_ops: shared.options.strace_ops.clone(), close_on_idle: args.close_on_idle, maybe_worker_metadata: args.maybe_worker_metadata, + enable_stack_trace_arg_in_ops: crate::args::has_trace_permissions_enabled( + ), }; WebWorker::bootstrap_from_options(services, options) diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index c8e93b9feaf3b4..303c9556223776 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -397,7 +397,7 @@ impl FetchPermissions for deno_permissions::PermissionsContainer { } } -#[op2] +#[op2(stack_trace)] #[serde] #[allow(clippy::too_many_arguments)] pub fn op_fetch( @@ -866,7 +866,7 @@ fn default_true() -> bool { true } -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_fetch_custom_client( state: &mut OpState, diff --git a/ext/ffi/call.rs b/ext/ffi/call.rs index bbff0ee48f462d..c964071a09f538 100644 --- a/ext/ffi/call.rs +++ b/ext/ffi/call.rs @@ -287,7 +287,7 @@ fn ffi_call( } } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub fn op_ffi_call_ptr_nonblocking( scope: &mut v8::HandleScope, @@ -385,7 +385,7 @@ pub fn op_ffi_call_nonblocking( }) } -#[op2(reentrant)] +#[op2(reentrant, stack_trace)] #[serde] pub fn op_ffi_call_ptr( scope: &mut v8::HandleScope, diff --git a/ext/ffi/callback.rs b/ext/ffi/callback.rs index 29583c800cd36d..eff14503d1d19b 100644 --- a/ext/ffi/callback.rs +++ b/ext/ffi/callback.rs @@ -561,7 +561,7 @@ pub struct RegisterCallbackArgs { result: NativeType, } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_unsafe_callback_create( state: &mut OpState, scope: &mut v8::HandleScope<'scope>, diff --git a/ext/ffi/dlfcn.rs b/ext/ffi/dlfcn.rs index 26d1b71e9f7e38..e1bb121d8c39b6 100644 --- a/ext/ffi/dlfcn.rs +++ b/ext/ffi/dlfcn.rs @@ -124,7 +124,7 @@ pub struct FfiLoadArgs { symbols: HashMap, } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_load<'scope, FP>( scope: &mut v8::HandleScope<'scope>, state: Rc>, diff --git a/ext/ffi/repr.rs b/ext/ffi/repr.rs index fd8a2c8e707336..eea15f3e9771dd 100644 --- a/ext/ffi/repr.rs +++ b/ext/ffi/repr.rs @@ -49,7 +49,7 @@ pub enum ReprError { Permission(#[from] deno_permissions::PermissionCheckError), } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_create( state: &mut OpState, #[bigint] ptr_number: usize, @@ -63,7 +63,7 @@ where Ok(ptr_number as *mut c_void) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_equals( state: &mut OpState, a: *const c_void, @@ -78,7 +78,7 @@ where Ok(a == b) } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_ptr_of( state: &mut OpState, #[anybuffer] buf: *const u8, @@ -92,7 +92,7 @@ where Ok(buf as *mut c_void) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_of_exact( state: &mut OpState, buf: v8::Local, @@ -112,7 +112,7 @@ where Ok(buf.as_ptr() as _) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_offset( state: &mut OpState, ptr: *mut c_void, @@ -142,7 +142,7 @@ unsafe extern "C" fn noop_deleter_callback( ) { } -#[op2(fast)] +#[op2(fast, stack_trace)] #[bigint] pub fn op_ffi_ptr_value( state: &mut OpState, @@ -157,7 +157,7 @@ where Ok(ptr as usize) } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_get_buf( scope: &mut v8::HandleScope<'scope>, state: &mut OpState, @@ -189,7 +189,7 @@ where Ok(array_buffer) } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_buf_copy_into( state: &mut OpState, src: *mut c_void, @@ -219,7 +219,7 @@ where } } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_cstr_read( scope: &mut v8::HandleScope<'scope>, state: &mut OpState, @@ -244,7 +244,7 @@ where Ok(value) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_bool( state: &mut OpState, ptr: *mut c_void, @@ -264,7 +264,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const bool) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_u8( state: &mut OpState, ptr: *mut c_void, @@ -286,7 +286,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_i8( state: &mut OpState, ptr: *mut c_void, @@ -308,7 +308,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_u16( state: &mut OpState, ptr: *mut c_void, @@ -330,7 +330,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_i16( state: &mut OpState, ptr: *mut c_void, @@ -352,7 +352,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_u32( state: &mut OpState, ptr: *mut c_void, @@ -372,7 +372,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const u32) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_i32( state: &mut OpState, ptr: *mut c_void, @@ -392,7 +392,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const i32) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] #[bigint] pub fn op_ffi_read_u64( state: &mut OpState, @@ -418,7 +418,7 @@ where Ok(value) } -#[op2(fast)] +#[op2(fast, stack_trace)] #[bigint] pub fn op_ffi_read_i64( state: &mut OpState, @@ -444,7 +444,7 @@ where Ok(value) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_f32( state: &mut OpState, ptr: *mut c_void, @@ -464,7 +464,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const f32) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_f64( state: &mut OpState, ptr: *mut c_void, @@ -484,7 +484,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const f64) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_ptr( state: &mut OpState, ptr: *mut c_void, diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index e3a511f8e7ff80..7a9778c485c958 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -146,7 +146,7 @@ fn map_permission_error( } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_cwd

(state: &mut OpState) -> Result where @@ -161,7 +161,7 @@ where Ok(path_str) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_chdir

( state: &mut OpState, #[string] directory: &str, @@ -188,7 +188,7 @@ where state.borrow::().umask(mask).context("umask") } -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_fs_open_sync

( state: &mut OpState, @@ -215,7 +215,7 @@ where Ok(rid) } -#[op2(async)] +#[op2(async, stack_trace)] #[smi] pub async fn op_fs_open_async

( state: Rc>, @@ -243,7 +243,7 @@ where Ok(rid) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_mkdir_sync

( state: &mut OpState, #[string] path: String, @@ -266,7 +266,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_mkdir_async

( state: Rc>, #[string] path: String, @@ -291,7 +291,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_chmod_sync

( state: &mut OpState, #[string] path: String, @@ -308,7 +308,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_chmod_async

( state: Rc>, #[string] path: String, @@ -328,7 +328,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_chown_sync

( state: &mut OpState, #[string] path: String, @@ -347,7 +347,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_chown_async

( state: Rc>, #[string] path: String, @@ -368,7 +368,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_remove_sync

( state: &mut OpState, #[string] path: &str, @@ -388,7 +388,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_remove_async

( state: Rc>, #[string] path: String, @@ -419,7 +419,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_copy_file_sync

( state: &mut OpState, #[string] from: &str, @@ -439,7 +439,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_copy_file_async

( state: Rc>, #[string] from: String, @@ -463,7 +463,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_stat_sync

( state: &mut OpState, #[string] path: String, @@ -482,7 +482,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_stat_async

( state: Rc>, @@ -504,7 +504,7 @@ where Ok(SerializableStat::from(stat)) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_lstat_sync

( state: &mut OpState, #[string] path: String, @@ -523,7 +523,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_lstat_async

( state: Rc>, @@ -545,7 +545,7 @@ where Ok(SerializableStat::from(stat)) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_realpath_sync

( state: &mut OpState, @@ -568,7 +568,7 @@ where Ok(path_string) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_realpath_async

( state: Rc>, @@ -596,7 +596,7 @@ where Ok(path_string) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_fs_read_dir_sync

( state: &mut OpState, @@ -615,7 +615,7 @@ where Ok(entries) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_read_dir_async

( state: Rc>, @@ -640,7 +640,7 @@ where Ok(entries) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_rename_sync

( state: &mut OpState, #[string] oldpath: String, @@ -661,7 +661,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_rename_async

( state: Rc>, #[string] oldpath: String, @@ -686,7 +686,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_link_sync

( state: &mut OpState, #[string] oldpath: &str, @@ -708,7 +708,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_link_async

( state: Rc>, #[string] oldpath: String, @@ -734,7 +734,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_symlink_sync

( state: &mut OpState, #[string] oldpath: &str, @@ -758,7 +758,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_symlink_async

( state: Rc>, #[string] oldpath: String, @@ -786,7 +786,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_read_link_sync

( state: &mut OpState, @@ -806,7 +806,7 @@ where Ok(target_string) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_read_link_async

( state: Rc>, @@ -831,7 +831,7 @@ where Ok(target_string) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_truncate_sync

( state: &mut OpState, #[string] path: &str, @@ -851,7 +851,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_truncate_async

( state: Rc>, #[string] path: String, @@ -875,7 +875,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_utime_sync

( state: &mut OpState, #[string] path: &str, @@ -896,7 +896,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_utime_async

( state: Rc>, #[string] path: String, @@ -927,7 +927,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_make_temp_dir_sync

( state: &mut OpState, @@ -969,7 +969,7 @@ where .context("tmpdir") } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_make_temp_dir_async

( state: Rc>, @@ -1015,7 +1015,7 @@ where .context("tmpdir") } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_make_temp_file_sync

( state: &mut OpState, @@ -1063,7 +1063,7 @@ where .context("tmpfile") } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_make_temp_file_async

( state: Rc>, @@ -1235,7 +1235,7 @@ fn tmp_name( Ok(path) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_write_file_sync

( state: &mut OpState, #[string] path: String, @@ -1261,7 +1261,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[allow(clippy::too_many_arguments)] pub async fn op_fs_write_file_async

( state: Rc>, @@ -1315,7 +1315,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_fs_read_file_sync

( state: &mut OpState, @@ -1336,7 +1336,7 @@ where Ok(buf.into()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_read_file_async

( state: Rc>, @@ -1378,7 +1378,7 @@ where Ok(buf.into()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_read_file_text_sync

( state: &mut OpState, @@ -1399,7 +1399,7 @@ where Ok(str) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_read_file_text_async

( state: Rc>, diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs index 5392b97210d92d..ce7509721ae0e2 100644 --- a/ext/kv/lib.rs +++ b/ext/kv/lib.rs @@ -178,7 +178,7 @@ pub enum KvErrorKind { InvalidRange, } -#[op2(async)] +#[op2(async, stack_trace)] #[smi] async fn op_kv_database_open( state: Rc>, diff --git a/ext/napi/lib.rs b/ext/napi/lib.rs index 88b8c238dffa1f..6db6af48a282df 100644 --- a/ext/napi/lib.rs +++ b/ext/napi/lib.rs @@ -530,7 +530,7 @@ static NAPI_LOADED_MODULES: std::sync::LazyLock< RwLock>, > = std::sync::LazyLock::new(|| RwLock::new(HashMap::new())); -#[op2(reentrant)] +#[op2(reentrant, stack_trace)] fn op_napi_open( scope: &mut v8::HandleScope<'scope>, isolate: *mut v8::Isolate, diff --git a/ext/net/ops.rs b/ext/net/ops.rs index 9a8b70f0f6d965..8d62bdeb4dcb1e 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -182,7 +182,7 @@ pub async fn op_net_recv_udp( Ok((nread, IpAddr::from(remote_addr))) } -#[op2(async)] +#[op2(async, stack_trace)] #[number] pub async fn op_net_send_udp( state: Rc>, @@ -343,7 +343,7 @@ pub async fn op_net_set_multi_ttl_udp( Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_connect_tcp( state: Rc>, @@ -401,7 +401,7 @@ impl Resource for UdpSocketResource { } } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_tcp( state: &mut OpState, @@ -501,7 +501,7 @@ where Ok((rid, IpAddr::from(local_addr))) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_udp( state: &mut OpState, @@ -516,7 +516,7 @@ where net_listen_udp::(state, addr, reuse_address, loopback) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_unstable_net_listen_udp( state: &mut OpState, @@ -601,7 +601,7 @@ pub struct NameServer { port: u16, } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_dns_resolve( state: Rc>, diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index c7d65dd85ef7b8..4d2073fd092c92 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -251,7 +251,7 @@ pub fn op_tls_cert_resolver_resolve_error( lookup.resolve(sni, Err(error)) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_tls_start( state: Rc>, @@ -340,7 +340,7 @@ where Ok((rid, IpAddr::from(local_addr), IpAddr::from(remote_addr))) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_connect_tls( state: Rc>, @@ -445,7 +445,7 @@ pub struct ListenTlsArgs { load_balanced: bool, } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_tls( state: &mut OpState, diff --git a/ext/net/ops_unix.rs b/ext/net/ops_unix.rs index 04ae84906fba3f..483dc99b400c58 100644 --- a/ext/net/ops_unix.rs +++ b/ext/net/ops_unix.rs @@ -85,7 +85,7 @@ pub async fn op_net_accept_unix( Ok((rid, local_addr_path, remote_addr_path)) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_connect_unix( state: Rc>, @@ -118,7 +118,7 @@ where Ok((rid, local_addr_path, remote_addr_path)) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_recv_unixpacket( state: Rc>, @@ -140,7 +140,7 @@ pub async fn op_net_recv_unixpacket( Ok((nread, path)) } -#[op2(async)] +#[op2(async, stack_trace)] #[number] pub async fn op_net_send_unixpacket( state: Rc>, @@ -171,7 +171,7 @@ where Ok(nwritten) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_unix( state: &mut OpState, @@ -222,7 +222,7 @@ where Ok((rid, pathname)) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_unixpacket( state: &mut OpState, @@ -235,7 +235,7 @@ where net_listen_unixpacket::(state, path) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_unstable_net_listen_unixpacket( state: &mut OpState, diff --git a/ext/node/ops/fs.rs b/ext/node/ops/fs.rs index 9c0e4e1ccff212..58a688a1fec2f1 100644 --- a/ext/node/ops/fs.rs +++ b/ext/node/ops/fs.rs @@ -26,7 +26,7 @@ pub enum FsError { Fs(#[from] deno_io::fs::FsError), } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_fs_exists_sync

( state: &mut OpState, #[string] path: String, @@ -41,7 +41,7 @@ where Ok(fs.exists_sync(&path)) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_fs_exists

( state: Rc>, #[string] path: String, @@ -60,7 +60,7 @@ where Ok(fs.exists_async(path).await?) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_cp_sync

( state: &mut OpState, #[string] path: &str, @@ -81,7 +81,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_cp

( state: Rc>, #[string] path: String, @@ -117,7 +117,7 @@ pub struct StatFs { pub ffree: u64, } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_statfs

( state: Rc>, @@ -258,7 +258,7 @@ where } } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_lutimes_sync

( state: &mut OpState, #[string] path: &str, @@ -279,7 +279,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_lutimes

( state: Rc>, #[string] path: String, @@ -305,7 +305,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_node_lchown_sync

( state: &mut OpState, #[string] path: String, @@ -323,7 +323,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_lchown

( state: Rc>, #[string] path: String, diff --git a/ext/node/ops/http.rs b/ext/node/ops/http.rs index 69571078fe26e1..f4adb940606651 100644 --- a/ext/node/ops/http.rs +++ b/ext/node/ops/http.rs @@ -49,7 +49,7 @@ use std::cmp::min; use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_http_request

( state: &mut OpState, diff --git a/ext/node/ops/inspector.rs b/ext/node/ops/inspector.rs index 34a7e004c1d946..9986aeb1970bd7 100644 --- a/ext/node/ops/inspector.rs +++ b/ext/node/ops/inspector.rs @@ -20,7 +20,7 @@ pub fn op_inspector_enabled() -> bool { false } -#[op2] +#[op2(stack_trace)] pub fn op_inspector_open

( _state: &mut OpState, _port: Option, @@ -85,7 +85,7 @@ struct JSInspectorSession { impl GarbageCollected for JSInspectorSession {} -#[op2] +#[op2(stack_trace)] #[cppgc] pub fn op_inspector_connect<'s, P>( isolate: *mut v8::Isolate, diff --git a/ext/node/ops/os/mod.rs b/ext/node/ops/os/mod.rs index d291277ad4d896..ddb2a70c64883b 100644 --- a/ext/node/ops/os/mod.rs +++ b/ext/node/ops/os/mod.rs @@ -21,7 +21,7 @@ pub enum OsError { FailedToGetUserInfo(#[source] std::io::Error), } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_os_get_priority

( state: &mut OpState, pid: u32, @@ -37,7 +37,7 @@ where priority::get_priority(pid).map_err(OsError::Priority) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_os_set_priority

( state: &mut OpState, pid: u32, @@ -193,7 +193,7 @@ fn get_user_info(_uid: u32) -> Result { }) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_os_user_info

( state: &mut OpState, @@ -212,7 +212,7 @@ where get_user_info(uid) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_geteuid

( state: &mut OpState, ) -> Result @@ -233,7 +233,7 @@ where Ok(euid) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_getegid

( state: &mut OpState, ) -> Result @@ -254,7 +254,7 @@ where Ok(egid) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_cpus

(state: &mut OpState) -> Result, OsError> where @@ -268,7 +268,7 @@ where cpus::cpu_info().ok_or(OsError::FailedToGetCpuInfo) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_homedir

( state: &mut OpState, diff --git a/ext/node/ops/process.rs b/ext/node/ops/process.rs index 282567226ea6cc..45c599bee24fbf 100644 --- a/ext/node/ops/process.rs +++ b/ext/node/ops/process.rs @@ -45,7 +45,7 @@ fn kill(pid: i32, _sig: i32) -> i32 { } } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_process_kill( state: &mut OpState, #[smi] pid: i32, diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index 06c034fd507104..f8de07a3be2c62 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -125,7 +125,7 @@ pub fn op_require_init_paths() -> Vec { vec![] } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_require_node_module_paths

( state: &mut OpState, @@ -295,7 +295,7 @@ pub fn op_require_path_is_absolute(#[string] p: String) -> bool { PathBuf::from(p).is_absolute() } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_require_stat

( state: &mut OpState, #[string] path: String, @@ -317,7 +317,7 @@ where Ok(-1) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_real_path

( state: &mut OpState, @@ -381,7 +381,7 @@ pub fn op_require_path_basename( } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_try_self_parent_path

( state: &mut OpState, @@ -412,7 +412,7 @@ where Ok(None) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_try_self

( state: &mut OpState, @@ -476,7 +476,7 @@ where } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_read_file

( state: &mut OpState, @@ -507,7 +507,7 @@ pub fn op_require_as_file_path(#[string] file_or_url: String) -> String { file_or_url } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_resolve_exports

( state: &mut OpState, @@ -583,7 +583,7 @@ pub fn op_require_is_maybe_cjs( loader.is_maybe_cjs(&url) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_require_read_package_scope

( state: &mut OpState, @@ -604,7 +604,7 @@ where .flatten() } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_require_package_imports_resolve

( state: &mut OpState, diff --git a/ext/node/ops/worker_threads.rs b/ext/node/ops/worker_threads.rs index d2e57588265360..37a7b477d02317 100644 --- a/ext/node/ops/worker_threads.rs +++ b/ext/node/ops/worker_threads.rs @@ -45,7 +45,7 @@ pub enum WorkerThreadsFilenameError { } // todo(dsherret): we should remove this and do all this work inside op_create_worker -#[op2] +#[op2(stack_trace)] #[string] pub fn op_worker_threads_filename

( state: &mut OpState, diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index a5734271cf17be..5aef1a7a550646 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -148,7 +148,7 @@ impl Resource for WsCancelResource { // This op is needed because creating a WS instance in JavaScript is a sync // operation and should throw error when permissions are not fulfilled, // but actual op that connects WS is async. -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_ws_check_permission_and_cancel_handle( state: &mut OpState, @@ -443,7 +443,7 @@ fn populate_common_request_headers( Ok(request) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_ws_create( state: Rc>, diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index c8e0228bc04199..a91722f91a1ad0 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -162,7 +162,7 @@ fn start_watcher( Ok(()) } -#[op2] +#[op2(stack_trace)] #[smi] fn op_fs_events_open( state: &mut OpState, diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs index 74c708c53295b2..b8ebc88bedca2e 100644 --- a/runtime/ops/os/mod.rs +++ b/runtime/ops/os/mod.rs @@ -87,7 +87,7 @@ pub enum OsError { Io(#[from] std::io::Error), } -#[op2] +#[op2(stack_trace)] #[string] fn op_exec_path(state: &mut OpState) -> Result { let current_exe = env::current_exe().unwrap(); @@ -103,7 +103,7 @@ fn op_exec_path(state: &mut OpState) -> Result { .map_err(OsError::InvalidUtf8) } -#[op2(fast)] +#[op2(fast, stack_trace)] fn op_set_env( state: &mut OpState, #[string] key: &str, @@ -123,7 +123,7 @@ fn op_set_env( Ok(()) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_env( state: &mut OpState, @@ -132,7 +132,7 @@ fn op_env( Ok(env::vars().collect()) } -#[op2] +#[op2(stack_trace)] #[string] fn op_get_env( state: &mut OpState, @@ -159,7 +159,7 @@ fn op_get_env( Ok(r) } -#[op2(fast)] +#[op2(fast, stack_trace)] fn op_delete_env( state: &mut OpState, #[string] key: String, @@ -189,7 +189,7 @@ fn op_exit(state: &mut OpState) { crate::exit(code) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_loadavg( state: &mut OpState, @@ -200,7 +200,7 @@ fn op_loadavg( Ok(sys_info::loadavg()) } -#[op2] +#[op2(stack_trace, stack_trace)] #[string] fn op_hostname( state: &mut OpState, @@ -211,7 +211,7 @@ fn op_hostname( Ok(sys_info::hostname()) } -#[op2] +#[op2(stack_trace)] #[string] fn op_os_release( state: &mut OpState, @@ -222,7 +222,7 @@ fn op_os_release( Ok(sys_info::os_release()) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_network_interfaces( state: &mut OpState, @@ -274,7 +274,7 @@ impl From for NetworkInterface { } } -#[op2] +#[op2(stack_trace)] #[serde] fn op_system_memory_info( state: &mut OpState, @@ -286,7 +286,7 @@ fn op_system_memory_info( } #[cfg(not(windows))] -#[op2] +#[op2(stack_trace)] #[smi] fn op_gid( state: &mut OpState, @@ -302,7 +302,7 @@ fn op_gid( } #[cfg(windows)] -#[op2] +#[op2(stack_trace)] #[smi] fn op_gid( state: &mut OpState, @@ -314,7 +314,7 @@ fn op_gid( } #[cfg(not(windows))] -#[op2] +#[op2(stack_trace)] #[smi] fn op_uid( state: &mut OpState, @@ -330,7 +330,7 @@ fn op_uid( } #[cfg(windows)] -#[op2] +#[op2(stack_trace)] #[smi] fn op_uid( state: &mut OpState, @@ -519,7 +519,7 @@ fn os_uptime(state: &mut OpState) -> Result { Ok(sys_info::os_uptime()) } -#[op2(fast)] +#[op2(fast, stack_trace)] #[number] fn op_os_uptime( state: &mut OpState, diff --git a/runtime/ops/permissions.rs b/runtime/ops/permissions.rs index 9ad963f3bc1aa4..b5f9e284df96e5 100644 --- a/runtime/ops/permissions.rs +++ b/runtime/ops/permissions.rs @@ -99,7 +99,7 @@ pub fn op_revoke_permission( Ok(PermissionStatus::from(perm)) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_request_permission( state: &mut OpState, diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index ee2f660dccf80c..83d9317d320d88 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -802,7 +802,7 @@ fn get_requires_allow_all_env_vars(env: &RunEnv) -> Vec<&str> { found_envs } -#[op2] +#[op2(stack_trace)] #[serde] fn op_spawn_child( state: &mut OpState, @@ -844,7 +844,7 @@ async fn op_spawn_wait( Ok(result) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_spawn_sync( state: &mut OpState, @@ -928,7 +928,7 @@ mod deprecated { stderr_rid: Option, } - #[op2] + #[op2(stack_trace)] #[serde] pub fn op_run( state: &mut OpState, @@ -1129,7 +1129,7 @@ mod deprecated { } } - #[op2(fast)] + #[op2(fast, stack_trace)] pub fn op_kill( state: &mut OpState, #[smi] pid: i32, diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index 521284a6a065b2..131bad19623fde 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -133,7 +133,7 @@ pub enum CreateWorkerError { } /// Create worker as the host -#[op2] +#[op2(stack_trace)] #[serde] fn op_create_worker( state: &mut OpState, diff --git a/runtime/permissions/prompter.rs b/runtime/permissions/prompter.rs index 168a845a29611a..0272744cc2f555 100644 --- a/runtime/permissions/prompter.rs +++ b/runtime/permissions/prompter.rs @@ -1,5 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use crate::is_standalone; +use deno_core::error::JsStackFrame; use deno_core::parking_lot::Mutex; use deno_terminal::colors; use once_cell::sync::Lazy; @@ -10,8 +12,6 @@ use std::io::StderrLock; use std::io::StdinLock; use std::io::Write as IoWrite; -use crate::is_standalone; - /// Helper function to make control characters visible so users can see the underlying filename. fn escape_control_characters(s: &str) -> std::borrow::Cow { if !s.contains(|c: char| c.is_ascii_control() || c.is_control()) { @@ -53,6 +53,13 @@ static MAYBE_BEFORE_PROMPT_CALLBACK: Lazy>> = static MAYBE_AFTER_PROMPT_CALLBACK: Lazy>> = Lazy::new(|| Mutex::new(None)); +static MAYBE_CURRENT_STACKTRACE: Lazy>>> = + Lazy::new(|| Mutex::new(None)); + +pub fn set_current_stacktrace(trace: Vec) { + *MAYBE_CURRENT_STACKTRACE.lock() = Some(trace); +} + pub fn permission_prompt( message: &str, flag: &str, @@ -62,9 +69,10 @@ pub fn permission_prompt( if let Some(before_callback) = MAYBE_BEFORE_PROMPT_CALLBACK.lock().as_mut() { before_callback(); } + let stack = MAYBE_CURRENT_STACKTRACE.lock().take(); let r = PERMISSION_PROMPTER .lock() - .prompt(message, flag, api_name, is_unary); + .prompt(message, flag, api_name, is_unary, stack); if let Some(after_callback) = MAYBE_AFTER_PROMPT_CALLBACK.lock().as_mut() { after_callback(); } @@ -92,6 +100,7 @@ pub trait PermissionPrompter: Send + Sync { name: &str, api_name: Option<&str>, is_unary: bool, + stack: Option>, ) -> PromptResponse; } @@ -298,6 +307,7 @@ impl PermissionPrompter for TtyPrompter { name: &str, api_name: Option<&str>, is_unary: bool, + stack: Option>, ) -> PromptResponse { if !std::io::stdin().is_terminal() || !std::io::stderr().is_terminal() { return PromptResponse::Deny; @@ -340,7 +350,7 @@ impl PermissionPrompter for TtyPrompter { }; // output everything in one shot to make the tests more reliable - { + let stack_lines_count = { let mut output = String::new(); write!(&mut output, "┏ {PERMISSION_EMOJI} ").unwrap(); write!(&mut output, "{}", colors::bold("Deno requests ")).unwrap(); @@ -354,6 +364,27 @@ impl PermissionPrompter for TtyPrompter { ) .unwrap(); } + let stack_lines_count = if let Some(stack) = stack { + let len = stack.len(); + for (idx, frame) in stack.into_iter().enumerate() { + writeln!( + &mut output, + "┃ {} {}", + colors::gray(if idx != len - 1 { "├─" } else { "└─" }), + colors::gray(deno_core::error::format_frame::< + deno_core::error::NoAnsiColors, + >(&frame)) + ) + .unwrap(); + } + len + } else { + writeln!( + &mut output, + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.", + ).unwrap(); + 1 + }; let msg = format!( "Learn more at: {}", colors::cyan_with_underline(&format!( @@ -372,7 +403,9 @@ impl PermissionPrompter for TtyPrompter { write!(&mut output, " {opts} > ").unwrap(); stderr_lock.write_all(output.as_bytes()).unwrap(); - } + + stack_lines_count + }; let value = loop { // Clear stdin each time we loop around in case the user accidentally pasted @@ -391,30 +424,24 @@ impl PermissionPrompter for TtyPrompter { if result.is_err() || input.len() != 1 { break PromptResponse::Deny; }; + + let clear_n = if api_name.is_some() { 5 } else { 4 } + stack_lines_count; + match input.as_bytes()[0] as char { 'y' | 'Y' => { - clear_n_lines( - &mut stderr_lock, - if api_name.is_some() { 5 } else { 4 }, - ); + clear_n_lines(&mut stderr_lock, clear_n); let msg = format!("Granted {message}."); writeln!(stderr_lock, "✅ {}", colors::bold(&msg)).unwrap(); break PromptResponse::Allow; } 'n' | 'N' | '\x1b' => { - clear_n_lines( - &mut stderr_lock, - if api_name.is_some() { 5 } else { 4 }, - ); + clear_n_lines(&mut stderr_lock, clear_n); let msg = format!("Denied {message}."); writeln!(stderr_lock, "❌ {}", colors::bold(&msg)).unwrap(); break PromptResponse::Deny; } 'A' if is_unary => { - clear_n_lines( - &mut stderr_lock, - if api_name.is_some() { 5 } else { 4 }, - ); + clear_n_lines(&mut stderr_lock, clear_n); let msg = format!("Granted all {name} access."); writeln!(stderr_lock, "✅ {}", colors::bold(&msg)).unwrap(); break PromptResponse::AllowAll; @@ -475,6 +502,7 @@ pub mod tests { _name: &str, _api_name: Option<&str>, _is_unary: bool, + _stack: Option>, ) -> PromptResponse { if STUB_PROMPT_VALUE.load(Ordering::SeqCst) { PromptResponse::Allow diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index a282d11b9a02a2..214ae59c80b7b6 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -373,6 +373,7 @@ pub struct WebWorkerOptions { pub strace_ops: Option>, pub close_on_idle: bool, pub maybe_worker_metadata: Option, + pub enable_stack_trace_arg_in_ops: bool, } /// This struct is an implementation of `Worker` Web API @@ -585,6 +586,13 @@ impl WebWorker { validate_import_attributes_callback, )), import_assertions_support: deno_core::ImportAssertionsSupport::Error, + maybe_op_stack_trace_callback: if options.enable_stack_trace_arg_in_ops { + Some(Box::new(|stack| { + deno_permissions::prompter::set_current_stacktrace(stack) + })) + } else { + None + }, ..Default::default() }); diff --git a/runtime/worker.rs b/runtime/worker.rs index 97cbb6428f0e87..65fc99c766ba95 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -207,6 +207,7 @@ pub struct WorkerOptions { pub cache_storage_dir: Option, pub origin_storage_dir: Option, pub stdio: Stdio, + pub enable_stack_trace_arg_in_ops: bool, } impl Default for WorkerOptions { @@ -231,6 +232,7 @@ impl Default for WorkerOptions { create_params: Default::default(), bootstrap: Default::default(), stdio: Default::default(), + enable_stack_trace_arg_in_ops: false, } } } @@ -544,6 +546,11 @@ impl MainWorker { ) as Box, ) }), + maybe_op_stack_trace_callback: if options.enable_stack_trace_arg_in_ops { + Some(Box::new(|stack| { + deno_permissions::prompter::set_current_stacktrace(stack) + })) + } else { None }, ..Default::default() }); diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index c97b700c5ddedc..18cded90cb3164 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -179,6 +179,7 @@ fn _090_run_permissions_request() { console.expect(concat!( "┏ ⚠ Deno requests run access to \"ls\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -189,6 +190,7 @@ fn _090_run_permissions_request() { console.expect(concat!( "┏ ⚠ Deno requests run access to \"cat\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -210,6 +212,7 @@ fn _090_run_permissions_request_sync() { console.expect(concat!( "┏ ⚠ Deno requests run access to \"ls\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -220,6 +223,7 @@ fn _090_run_permissions_request_sync() { console.expect(concat!( "┏ ⚠ Deno requests run access to \"cat\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -242,6 +246,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests run access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -253,6 +258,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests read access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -264,6 +270,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests write access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-write\r\n", "┠─ Run again with --allow-write to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all write permissions)", @@ -275,6 +282,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests net access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-net\r\n", "┠─ Run again with --allow-net to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all net permissions)", @@ -286,6 +294,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests env access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -297,6 +306,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests sys access to \"loadavg\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-sys\r\n", "┠─ Run again with --allow-sys to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)", @@ -308,6 +318,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠ Deno requests ffi access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-ffi\r\n", "┠─ Run again with --allow-ffi to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all ffi permissions)", @@ -328,6 +339,7 @@ fn permissions_prompt_allow_all_2() { // "env" permissions console.expect(concat!( "┏ ⚠ Deno requests env access to \"FOO\".\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -340,6 +352,7 @@ fn permissions_prompt_allow_all_2() { console.expect(concat!( "┏ ⚠ Deno requests sys access to \"loadavg\".\r\n", "┠─ Requested by `Deno.loadavg()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-sys\r\n", "┠─ Run again with --allow-sys to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)", @@ -352,6 +365,7 @@ fn permissions_prompt_allow_all_2() { console.expect(concat!( "┏ ⚠ Deno requests read access to .\r\n", "┠─ Requested by `Deno.cwd()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -372,6 +386,7 @@ fn permissions_prompt_allow_all_lowercase_a() { console.expect(concat!( "┏ ⚠ Deno requests run access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -406,6 +421,7 @@ fn permissions_cache() { "prompt\r\n", "┏ ⚠ Deno requests read access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -418,6 +434,32 @@ fn permissions_cache() { }); } +#[test] +fn permissions_trace() { + TestContext::default() + .new_command() + .env("DENO_TRACE_PERMISSIONS", "1") + .args_vec(["run", "--quiet", "run/permissions_trace.ts"]) + .with_pty(|mut console| { + let text = console.read_until("Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)"); + test_util::assertions::assert_wildcard_match(&text, concat!( + "┏ ⚠ Deno requests sys access to \"hostname\".\r\n", + "┠─ Requested by `Deno.hostname()` API.\r\n", + "┃ ├─ Object.hostname (ext:runtime/30_os.js:43:10)\r\n", + "┃ ├─ foo (file://[WILDCARD]/run/permissions_trace.ts:2:8)\r\n", + "┃ ├─ bar (file://[WILDCARD]/run/permissions_trace.ts:6:3)\r\n", + "┃ └─ file://[WILDCARD]/run/permissions_trace.ts:9:1\r\n", + "┠─ Learn more at: https://docs.deno.com/go/--allow-sys\r\n", + "┠─ Run again with --allow-sys to bypass this prompt.\r\n", + "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)", + )); + + console.human_delay(); + console.write_line_raw("y"); + console.expect("✅ Granted sys access to \"hostname\"."); + }); +} + itest!(lock_write_fetch { args: "run --quiet --allow-import --allow-read --allow-write --allow-env --allow-run run/lock_write_fetch/main.ts", @@ -1512,6 +1554,7 @@ mod permissions { console.expect(concat!( "┏ ⚠ Deno requests read access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1521,6 +1564,7 @@ mod permissions { console.expect(concat!( "┏ ⚠ Deno requests read access to \"bar\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1542,6 +1586,7 @@ mod permissions { console.expect(concat!( "┏ ⚠ Deno requests read access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1551,6 +1596,7 @@ mod permissions { console.expect(concat!( "┏ ⚠ Deno requests read access to \"bar\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1572,6 +1618,7 @@ mod permissions { console.expect(concat!( "┏ ⚠ Deno requests read access.\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1596,6 +1643,7 @@ mod permissions { console.expect(concat!( "┏ ⚠ Deno requests read access.\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1673,6 +1721,7 @@ fn issue9750() { console.expect(concat!( "┏ ⚠ Deno requests env access.\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -1682,6 +1731,7 @@ fn issue9750() { console.expect("Denied env access."); console.expect(concat!( "┏ ⚠ Deno requests env access to \"SECRET\".\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -2723,7 +2773,7 @@ fn stdio_streams_are_locked_in_permission_prompt() { console.human_delay(); console.write_line_raw("y"); // We ensure that nothing gets written here between the permission prompt and this text, despire the delay - console.expect_raw_next(format!("y{newline}\x1b[5A\x1b[0J✅ Granted read access to \"")); + console.expect_raw_next(format!("y{newline}\x1b[6A\x1b[0J✅ Granted read access to \"")); // Back to spamming! console.expect(malicious_output); diff --git a/tests/testdata/run/permissions_trace.ts b/tests/testdata/run/permissions_trace.ts new file mode 100644 index 00000000000000..d061ac6bf86280 --- /dev/null +++ b/tests/testdata/run/permissions_trace.ts @@ -0,0 +1,9 @@ +function foo() { + Deno.hostname(); +} + +function bar() { + foo(); +} + +bar(); From 0670206a2cf7751e6927912bddc06ce0b5839b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 20 Nov 2024 23:21:41 +0000 Subject: [PATCH 365/436] chore: use forked sqlformat-rs (#26952) Some crucial fixes have not yet been released, so I forked it for the time being. --- Cargo.lock | 25 +++++++++++++------------ cli/Cargo.toml | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc386c9571267c..8850726cec4919 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1232,6 +1232,7 @@ dependencies = [ "deno_resolver", "deno_runtime", "deno_semver", + "deno_sqlformat", "deno_task_shell", "deno_terminal 0.2.0", "deno_tower_lsp", @@ -1291,7 +1292,6 @@ dependencies = [ "sha2", "shell-escape", "spki", - "sqlformat", "strsim", "tar", "tempfile", @@ -2147,6 +2147,18 @@ dependencies = [ "url", ] +[[package]] +name = "deno_sqlformat" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e196799ec0cc240fac1fb5c5bf813ef92a9602740a059cfcbb20593b2deee52" +dependencies = [ + "nom 7.1.3", + "once_cell", + "regex", + "unicode_categories", +] + [[package]] name = "deno_task_shell" version = "0.18.1" @@ -6797,17 +6809,6 @@ dependencies = [ "der", ] -[[package]] -name = "sqlformat" -version = "0.3.1" -source = "git+https://github.com/shssoichiro/sqlformat-rs.git?rev=827d639#827d639bef94d8e5a5a0e29b41185c8d572f24e6" -dependencies = [ - "nom 7.1.3", - "once_cell", - "regex", - "unicode_categories", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ae573827b1c229..d6f509eb97525b 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -151,8 +151,8 @@ serde_repr.workspace = true sha2.workspace = true shell-escape = "=0.1.5" spki = { version = "0.7", features = ["pem"] } -# NOTE(bartlomieju): for now using github URL, because 0.3.2 with important fixes hasn't been released yet. -sqlformat = { git = "https://github.com/shssoichiro/sqlformat-rs.git", rev = "827d639" } +# NOTE(bartlomieju): using temporary fork for now, revert back to `sqlformat-rs` later +sqlformat = { package = "deno_sqlformat", version = "0.3.2" } strsim = "0.11.1" tar.workspace = true tempfile.workspace = true From 56f31628f7a9d4a3dc54c70c4df1067b8a214ec6 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:22:15 -0800 Subject: [PATCH 366/436] feat: subcommand to view and update outdated dependencies (#26942) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #20487 Currently spelled ``` deno outdated ``` and ``` deno outdated --update ``` Works across package.json and deno.json, and in workspaces. There's a bit of duplicated code, I'll refactor to reduce this in follow ups ## Currently supported: ### Printing outdated deps (current output below which basically mimics pnpm, but requesting feedback / suggestions) ``` deno outdated ``` ![Screenshot 2024-11-19 at 2 01 56 PM](https://github.com/user-attachments/assets/51fea83a-181a-4082-b388-163313ce15e7) ### Updating deps semver compatible: ``` deno outdated --update ``` latest: ``` deno outdated --latest ``` current output is basic, again would love suggestions ![Screenshot 2024-11-19 at 2 13 46 PM](https://github.com/user-attachments/assets/e4c4db87-cd67-4b74-9ea7-4bd80106d5e9) #### Filters ``` deno outdated --update "@std/*" deno outdated --update --latest "@std/* "!@std/fmt" ``` #### Update to specific versions ``` deno outdated --update @std/fmt@1.0.2 @std/cli@^1.0.3 ``` ### Include all workspace members ``` deno outdated --recursive deno outdated --update --recursive ``` ## Future work - interactive update - update deps in js/ts files - better support for transitive deps Known issues (to be fixed in follow ups): - If no top level dependencies have changed, we won't update transitive deps (even if they could be updated) - Can't filter transitive deps, or update them to specific versions ## TODO (in this PR): - ~~spec tests for filters~~ - ~~spec test for mixed workspace (have tested manually)~~ - tweak output - suggestion when you try `deno update` --------- Co-authored-by: Bartek IwaƄczuk --- cli/args/flags.rs | 192 ++++ cli/args/mod.rs | 1 + cli/main.rs | 5 + cli/npm/managed/mod.rs | 2 +- cli/tools/registry/mod.rs | 1 + cli/tools/registry/pm.rs | 32 +- cli/tools/registry/pm/cache_deps.rs | 17 +- cli/tools/registry/pm/deps.rs | 964 ++++++++++++++++++ cli/tools/registry/pm/outdated.rs | 661 ++++++++++++ tests/registry/jsr/@denotest/add/0.2.1/mod.ts | 4 + .../jsr/@denotest/add/0.2.1_meta.json | 8 + tests/registry/jsr/@denotest/add/meta.json | 3 +- .../@denotest/multiple-exports/0.2.0/add.ts | 1 + .../multiple-exports/0.2.0/data.json | 3 + .../multiple-exports/0.2.0/subtract.ts | 1 + .../multiple-exports/0.2.0_meta.json | 7 + .../@denotest/multiple-exports/0.5.0/add.ts | 1 + .../multiple-exports/0.5.0/data.json | 3 + .../multiple-exports/0.5.0/subtract.ts | 1 + .../multiple-exports/0.5.0_meta.json | 7 + .../jsr/@denotest/multiple-exports/meta.json | 4 +- .../jsr/@denotest/subtract/0.2.0/mod.ts | 3 + .../jsr/@denotest/subtract/0.2.0_meta.json | 8 + .../registry/jsr/@denotest/subtract/meta.json | 4 +- .../has-patch-versions/0.1.0/package.json | 5 + .../has-patch-versions/0.1.1/package.json | 5 + .../has-patch-versions/0.2.0/package.json | 4 + tests/specs/update/deno_json/__test__.jsonc | 101 ++ tests/specs/update/deno_json/deno.json | 19 + tests/specs/update/deno_json/deno.lock | 43 + .../specs/update/deno_json/deno.lock.orig.out | 43 + .../update/deno_json/filtered/deno.json.out | 19 + .../update/deno_json/filtered/update.out | 10 + tests/specs/update/deno_json/outdated.out | 15 + .../update/deno_json/outdated_compatible.out | 7 + tests/specs/update/deno_json/print_file.ts | 2 + .../deno_json/update_compatible/deno.json.out | 19 + .../deno_json/update_compatible/deno.lock.out | 43 + .../deno_json/update_compatible/update.out | 7 + .../deno_json/update_latest/deno.json.out | 19 + .../deno_json/update_latest/deno.lock.out | 43 + .../update/deno_json/update_latest/update.out | 16 + .../update/mixed_workspace/__test__.jsonc | 153 +++ tests/specs/update/mixed_workspace/deno.json | 6 + tests/specs/update/mixed_workspace/deno.lock | 55 + .../update/mixed_workspace/deno.lock.orig.out | 55 + .../filtered/member_a_deno.json.out | 10 + .../filtered/member_b_package.json.out | 8 + .../mixed_workspace/filtered/update.out | 12 + .../update/mixed_workspace/member-a/deno.json | 10 + .../update/mixed_workspace/member-a/mod.ts | 0 .../mixed_workspace/member-b/package.json | 8 + .../update/mixed_workspace/print_file.ts | 2 + .../print_outdated/member_a.out | 9 + .../print_outdated/member_b.out | 7 + .../print_outdated/recursive.out | 15 + .../mixed_workspace/print_outdated/root.out | 5 + .../update_latest/recursive/update.out | 16 + .../update_latest/root/deno.json.out | 6 + .../update_latest/root/update.out | 3 + .../update_latest/subdir/member_a.out | 10 + .../subdir/member_a_deno.json.out | 10 + .../update_latest/subdir/member_b.out | 7 + .../subdir/member_b_package.json.out | 8 + .../specs/update/package_json/__test__.jsonc | 100 ++ tests/specs/update/package_json/deno.lock | 28 + .../update/package_json/deno.lock.orig.out | 28 + .../package_json/filtered/package.json.out | 9 + .../update/package_json/filtered/update.out | 9 + tests/specs/update/package_json/outdated.out | 9 + .../package_json/outdated_compatible.out | 5 + tests/specs/update/package_json/package.json | 9 + tests/specs/update/package_json/print_file.ts | 2 + .../update_compatible/deno.lock.out | 28 + .../update_compatible/package.json.out | 9 + .../package_json/update_compatible/update.out | 4 + .../package_json/update_latest/deno.lock.out | 28 + .../update_latest/package.json.out | 9 + .../package_json/update_latest/update.out | 14 + tests/util/server/src/npm.rs | 68 +- 80 files changed, 3109 insertions(+), 18 deletions(-) create mode 100644 cli/tools/registry/pm/deps.rs create mode 100644 cli/tools/registry/pm/outdated.rs create mode 100644 tests/registry/jsr/@denotest/add/0.2.1/mod.ts create mode 100644 tests/registry/jsr/@denotest/add/0.2.1_meta.json create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts create mode 100644 tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json create mode 100644 tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts create mode 100644 tests/registry/jsr/@denotest/subtract/0.2.0_meta.json create mode 100644 tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json create mode 100644 tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json create mode 100644 tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json create mode 100644 tests/specs/update/deno_json/__test__.jsonc create mode 100644 tests/specs/update/deno_json/deno.json create mode 100644 tests/specs/update/deno_json/deno.lock create mode 100644 tests/specs/update/deno_json/deno.lock.orig.out create mode 100644 tests/specs/update/deno_json/filtered/deno.json.out create mode 100644 tests/specs/update/deno_json/filtered/update.out create mode 100644 tests/specs/update/deno_json/outdated.out create mode 100644 tests/specs/update/deno_json/outdated_compatible.out create mode 100644 tests/specs/update/deno_json/print_file.ts create mode 100644 tests/specs/update/deno_json/update_compatible/deno.json.out create mode 100644 tests/specs/update/deno_json/update_compatible/deno.lock.out create mode 100644 tests/specs/update/deno_json/update_compatible/update.out create mode 100644 tests/specs/update/deno_json/update_latest/deno.json.out create mode 100644 tests/specs/update/deno_json/update_latest/deno.lock.out create mode 100644 tests/specs/update/deno_json/update_latest/update.out create mode 100644 tests/specs/update/mixed_workspace/__test__.jsonc create mode 100644 tests/specs/update/mixed_workspace/deno.json create mode 100644 tests/specs/update/mixed_workspace/deno.lock create mode 100644 tests/specs/update/mixed_workspace/deno.lock.orig.out create mode 100644 tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out create mode 100644 tests/specs/update/mixed_workspace/filtered/member_b_package.json.out create mode 100644 tests/specs/update/mixed_workspace/filtered/update.out create mode 100644 tests/specs/update/mixed_workspace/member-a/deno.json create mode 100644 tests/specs/update/mixed_workspace/member-a/mod.ts create mode 100644 tests/specs/update/mixed_workspace/member-b/package.json create mode 100644 tests/specs/update/mixed_workspace/print_file.ts create mode 100644 tests/specs/update/mixed_workspace/print_outdated/member_a.out create mode 100644 tests/specs/update/mixed_workspace/print_outdated/member_b.out create mode 100644 tests/specs/update/mixed_workspace/print_outdated/recursive.out create mode 100644 tests/specs/update/mixed_workspace/print_outdated/root.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/recursive/update.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/root/deno.json.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/root/update.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out create mode 100644 tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out create mode 100644 tests/specs/update/package_json/__test__.jsonc create mode 100644 tests/specs/update/package_json/deno.lock create mode 100644 tests/specs/update/package_json/deno.lock.orig.out create mode 100644 tests/specs/update/package_json/filtered/package.json.out create mode 100644 tests/specs/update/package_json/filtered/update.out create mode 100644 tests/specs/update/package_json/outdated.out create mode 100644 tests/specs/update/package_json/outdated_compatible.out create mode 100644 tests/specs/update/package_json/package.json create mode 100644 tests/specs/update/package_json/print_file.ts create mode 100644 tests/specs/update/package_json/update_compatible/deno.lock.out create mode 100644 tests/specs/update/package_json/update_compatible/package.json.out create mode 100644 tests/specs/update/package_json/update_compatible/update.out create mode 100644 tests/specs/update/package_json/update_latest/deno.lock.out create mode 100644 tests/specs/update/package_json/update_latest/package.json.out create mode 100644 tests/specs/update/package_json/update_latest/update.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 567d4adfb9b82c..694506557401ef 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -465,6 +465,7 @@ pub enum DenoSubcommand { Serve(ServeFlags), Task(TaskFlags), Test(TestFlags), + Outdated(OutdatedFlags), Types, Upgrade(UpgradeFlags), Vendor, @@ -472,6 +473,19 @@ pub enum DenoSubcommand { Help(HelpFlags), } +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum OutdatedKind { + Update { latest: bool }, + PrintOutdated { compatible: bool }, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct OutdatedFlags { + pub filters: Vec, + pub recursive: bool, + pub kind: OutdatedKind, +} + impl DenoSubcommand { pub fn is_run(&self) -> bool { matches!(self, Self::Run(_)) @@ -1203,6 +1217,7 @@ static DENO_HELP: &str = cstr!( deno add jsr:@std/assert | deno add npm:express install Installs dependencies either in the local project or globally to a bin directory uninstall Uninstalls a dependency or an executable script in the installation root's bin directory + outdated Find and update outdated dependencies remove Remove dependencies from the configuration file Tooling: @@ -1385,6 +1400,7 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { "jupyter" => jupyter_parse(&mut flags, &mut m), "lint" => lint_parse(&mut flags, &mut m)?, "lsp" => lsp_parse(&mut flags, &mut m), + "outdated" => outdated_parse(&mut flags, &mut m)?, "repl" => repl_parse(&mut flags, &mut m)?, "run" => run_parse(&mut flags, &mut m, app, false)?, "serve" => serve_parse(&mut flags, &mut m, app)?, @@ -1627,6 +1643,7 @@ pub fn clap_root() -> Command { .subcommand(json_reference_subcommand()) .subcommand(jupyter_subcommand()) .subcommand(uninstall_subcommand()) + .subcommand(outdated_subcommand()) .subcommand(lsp_subcommand()) .subcommand(lint_subcommand()) .subcommand(publish_subcommand()) @@ -2617,6 +2634,83 @@ fn jupyter_subcommand() -> Command { .conflicts_with("install")) } +fn outdated_subcommand() -> Command { + command( + "outdated", + cstr!("Find and update outdated dependencies. +By default, outdated dependencies are only displayed. + +Display outdated dependencies: + deno outdated + deno outdated --compatible + +Update dependencies: + deno outdated --update + deno outdated --update --latest + deno outdated --update + +Filters can be used to select which packages to act on. Filters can include wildcards (*) to match multiple packages. + deno outdated --update --latest \"@std/*\" + deno outdated --update --latest \"react*\" +Note that filters act on their aliases configured in deno.json / package.json, not the actual package names: + Given \"foobar\": \"npm:react@17.0.0\" in deno.json or package.json, the filter \"foobar\" would update npm:react to + the latest version. + deno outdated --update --latest foobar +Filters can be combined, and negative filters can be used to exclude results: + deno outdated --update --latest \"@std/*\" \"!@std/fmt*\" + +Specific version requirements to update to can be specified: + deno outdated --update @std/fmt@^1.0.2 +"), + UnstableArgsConfig::None, + ) + .defer(|cmd| { + cmd + .arg( + Arg::new("filters") + .num_args(0..) + .action(ArgAction::Append) + .help(concat!("Filters selecting which packages to act on. Can include wildcards (*) to match multiple packages. ", + "If a version requirement is specified, the matching packages will be updated to the given requirement."), + ) + ) + .arg(no_lock_arg()) + .arg(lock_arg()) + .arg( + Arg::new("latest") + .long("latest") + .action(ArgAction::SetTrue) + .help( + "Update to the latest version, regardless of semver constraints", + ) + .requires("update") + .conflicts_with("compatible"), + ) + .arg( + Arg::new("update") + .long("update") + .short('u') + .action(ArgAction::SetTrue) + .conflicts_with("compatible") + .help("Update dependency versions"), + ) + .arg( + Arg::new("compatible") + .long("compatible") + .action(ArgAction::SetTrue) + .help("Only output versions that satisfy semver requirements") + .conflicts_with("update"), + ) + .arg( + Arg::new("recursive") + .long("recursive") + .short('r') + .action(ArgAction::SetTrue) + .help("include all workspace members"), + ) + }) +} + fn uninstall_subcommand() -> Command { command( "uninstall", @@ -4353,6 +4447,31 @@ fn remove_parse(flags: &mut Flags, matches: &mut ArgMatches) { }); } +fn outdated_parse( + flags: &mut Flags, + matches: &mut ArgMatches, +) -> clap::error::Result<()> { + let filters = match matches.remove_many::("filters") { + Some(f) => f.collect(), + None => vec![], + }; + let recursive = matches.get_flag("recursive"); + let update = matches.get_flag("update"); + let kind = if update { + let latest = matches.get_flag("latest"); + OutdatedKind::Update { latest } + } else { + let compatible = matches.get_flag("compatible"); + OutdatedKind::PrintOutdated { compatible } + }; + flags.subcommand = DenoSubcommand::Outdated(OutdatedFlags { + filters, + recursive, + kind, + }); + Ok(()) +} + fn bench_parse( flags: &mut Flags, matches: &mut ArgMatches, @@ -11299,4 +11418,77 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n" assert!(r.is_err()); } } + + #[test] + fn outdated_subcommand() { + let cases = [ + ( + svec![], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::PrintOutdated { compatible: false }, + recursive: false, + }, + ), + ( + svec!["--recursive"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::PrintOutdated { compatible: false }, + recursive: true, + }, + ), + ( + svec!["--recursive", "--compatible"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::PrintOutdated { compatible: true }, + recursive: true, + }, + ), + ( + svec!["--update"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::Update { latest: false }, + recursive: false, + }, + ), + ( + svec!["--update", "--latest"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::Update { latest: true }, + recursive: false, + }, + ), + ( + svec!["--update", "--recursive"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::Update { latest: false }, + recursive: true, + }, + ), + ( + svec!["--update", "@foo/bar"], + OutdatedFlags { + filters: svec!["@foo/bar"], + kind: OutdatedKind::Update { latest: false }, + recursive: false, + }, + ), + ]; + for (input, expected) in cases { + let mut args = svec!["deno", "outdated"]; + args.extend(input); + let r = flags_from_vec(args.clone()).unwrap(); + assert_eq!( + r.subcommand, + DenoSubcommand::Outdated(expected), + "incorrect result for args: {:?}", + args + ); + } + } } diff --git a/cli/args/mod.rs b/cli/args/mod.rs index bbdfa478c13912..37e1f00ffa1efd 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1628,6 +1628,7 @@ impl CliOptions { DenoSubcommand::Install(_) | DenoSubcommand::Add(_) | DenoSubcommand::Remove(_) + | DenoSubcommand::Outdated(_) ) { // For `deno install/add/remove` we want to force the managed resolver so it can set up `node_modules/` directory. return false; diff --git a/cli/main.rs b/cli/main.rs index 3dd2692f053739..017e343178f68b 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -188,6 +188,11 @@ async fn run_subcommand(flags: Arc) -> Result { tools::lint::lint(flags, lint_flags).await } }), + DenoSubcommand::Outdated(update_flags) => { + spawn_subcommand(async move { + tools::registry::outdated(flags, update_flags).await + }) + } DenoSubcommand::Repl(repl_flags) => { spawn_subcommand(async move { tools::repl::run(flags, repl_flags).await }) } diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index 2e64f5f188c27b..88094d51414f74 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -500,7 +500,7 @@ impl ManagedCliNpmResolver { self.resolve_pkg_folder_from_pkg_id(&pkg_id) } - fn resolve_pkg_id_from_pkg_req( + pub fn resolve_pkg_id_from_pkg_req( &self, req: &PackageReq, ) -> Result { diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index 89447f04f9d5fa..ba61d352d30712 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -68,6 +68,7 @@ use auth::get_auth_method; use auth::AuthMethod; pub use pm::add; pub use pm::cache_top_level_deps; +pub use pm::outdated; pub use pm::remove; pub use pm::AddCommandName; pub use pm::AddRmPackageReq; diff --git a/cli/tools/registry/pm.rs b/cli/tools/registry/pm.rs index c1ea2c75ea52b7..5718cd3ec116fc 100644 --- a/cli/tools/registry/pm.rs +++ b/cli/tools/registry/pm.rs @@ -16,6 +16,7 @@ use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; use deno_semver::Version; use deno_semver::VersionReq; +use deps::KeyPath; use jsonc_parser::cst::CstObject; use jsonc_parser::cst::CstObjectProp; use jsonc_parser::cst::CstRootNode; @@ -32,10 +33,13 @@ use crate::jsr::JsrFetchResolver; use crate::npm::NpmFetchResolver; mod cache_deps; +pub(crate) mod deps; +mod outdated; pub use cache_deps::cache_top_level_deps; +pub use outdated::outdated; -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash)] enum ConfigKind { DenoJson, PackageJson, @@ -86,6 +90,28 @@ impl ConfigUpdater { self.cst.to_string() } + fn get_property_for_mutation( + &mut self, + key_path: &KeyPath, + ) -> Option { + let mut current_node = self.root_object.clone(); + + self.modified = true; + + for (i, part) in key_path.parts.iter().enumerate() { + let s = part.as_str(); + if i < key_path.parts.len().saturating_sub(1) { + let object = current_node.object_value(s)?; + current_node = object; + } else { + // last part + return current_node.get(s); + } + } + + None + } + fn add(&mut self, selected: SelectedPackage, dev: bool) { fn insert_index(object: &CstObject, searching_name: &str) -> usize { object @@ -824,7 +850,7 @@ async fn npm_install_after_modification( flags: Arc, // explicitly provided to prevent redownloading jsr_resolver: Option>, -) -> Result<(), AnyError> { +) -> Result { // clear the previously cached package.json from memory before reloading it node_resolver::PackageJsonThreadLocalCache::clear(); @@ -842,7 +868,7 @@ async fn npm_install_after_modification( lockfile.write_if_changed()?; } - Ok(()) + Ok(cli_factory) } #[cfg(test)] diff --git a/cli/tools/registry/pm/cache_deps.rs b/cli/tools/registry/pm/cache_deps.rs index d3c8da868c32f9..f9d67e4d4f4435 100644 --- a/cli/tools/registry/pm/cache_deps.rs +++ b/cli/tools/registry/pm/cache_deps.rs @@ -8,7 +8,7 @@ use crate::graph_container::ModuleGraphUpdatePermit; use deno_core::error::AnyError; use deno_core::futures::stream::FuturesUnordered; use deno_core::futures::StreamExt; -use deno_semver::package::PackageReq; +use deno_semver::jsr::JsrPackageReqReference; pub async fn cache_top_level_deps( // todo(dsherret): don't pass the factory into this function. Instead use ctor deps @@ -56,15 +56,20 @@ pub async fn cache_top_level_deps( match specifier.scheme() { "jsr" => { let specifier_str = specifier.as_str(); - let specifier_str = - specifier_str.strip_prefix("jsr:").unwrap_or(specifier_str); - if let Ok(req) = PackageReq::from_str(specifier_str) { - if !seen_reqs.insert(req.clone()) { + if let Ok(req) = JsrPackageReqReference::from_str(specifier_str) { + if let Some(sub_path) = req.sub_path() { + if sub_path.ends_with('/') { + continue; + } + roots.push(specifier.clone()); + continue; + } + if !seen_reqs.insert(req.req().clone()) { continue; } let jsr_resolver = jsr_resolver.clone(); info_futures.push(async move { - if let Some(nv) = jsr_resolver.req_to_nv(&req).await { + if let Some(nv) = jsr_resolver.req_to_nv(req.req()).await { if let Some(info) = jsr_resolver.package_version_info(&nv).await { return Some((specifier.clone(), info)); diff --git a/cli/tools/registry/pm/deps.rs b/cli/tools/registry/pm/deps.rs new file mode 100644 index 00000000000000..4778d6f3278178 --- /dev/null +++ b/cli/tools/registry/pm/deps.rs @@ -0,0 +1,964 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::sync::atomic::AtomicBool; +use std::sync::Arc; + +use deno_ast::ModuleSpecifier; +use deno_config::deno_json::ConfigFile; +use deno_config::deno_json::ConfigFileRc; +use deno_config::workspace::Workspace; +use deno_config::workspace::WorkspaceDirectory; +use deno_core::anyhow::bail; +use deno_core::error::AnyError; +use deno_core::futures::future::try_join; +use deno_core::futures::stream::FuturesOrdered; +use deno_core::futures::stream::FuturesUnordered; +use deno_core::futures::FutureExt; +use deno_core::futures::StreamExt; +use deno_core::serde_json; +use deno_graph::FillFromLockfileOptions; +use deno_package_json::PackageJsonDepValue; +use deno_package_json::PackageJsonDepValueParseError; +use deno_package_json::PackageJsonRc; +use deno_runtime::deno_permissions::PermissionsContainer; +use deno_semver::jsr::JsrPackageReqReference; +use deno_semver::npm::NpmPackageReqReference; +use deno_semver::package::PackageNv; +use deno_semver::package::PackageReq; +use deno_semver::package::PackageReqReference; +use deno_semver::VersionReq; +use import_map::ImportMap; +use import_map::ImportMapWithDiagnostics; +use import_map::SpecifierMapEntry; +use indexmap::IndexMap; +use tokio::sync::Semaphore; + +use crate::args::CliLockfile; +use crate::graph_container::MainModuleGraphContainer; +use crate::graph_container::ModuleGraphContainer; +use crate::graph_container::ModuleGraphUpdatePermit; +use crate::jsr::JsrFetchResolver; +use crate::module_loader::ModuleLoadPreparer; +use crate::npm::CliNpmResolver; +use crate::npm::NpmFetchResolver; + +use super::ConfigUpdater; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ImportMapKind { + Inline, + Outline, +} + +#[derive(Clone)] +pub enum DepLocation { + DenoJson(ConfigFileRc, KeyPath, ImportMapKind), + PackageJson(PackageJsonRc, KeyPath), +} + +impl DepLocation { + pub fn is_deno_json(&self) -> bool { + matches!(self, DepLocation::DenoJson(..)) + } + + pub fn file_path(&self) -> Cow { + match self { + DepLocation::DenoJson(arc, _, _) => { + Cow::Owned(arc.specifier.to_file_path().unwrap()) + } + DepLocation::PackageJson(arc, _) => Cow::Borrowed(arc.path.as_ref()), + } + } + fn config_kind(&self) -> super::ConfigKind { + match self { + DepLocation::DenoJson(_, _, _) => super::ConfigKind::DenoJson, + DepLocation::PackageJson(_, _) => super::ConfigKind::PackageJson, + } + } +} + +struct DebugAdapter(T); + +impl<'a> std::fmt::Debug for DebugAdapter<&'a ConfigFileRc> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ConfigFile") + .field("specifier", &self.0.specifier) + .finish() + } +} +impl<'a> std::fmt::Debug for DebugAdapter<&'a PackageJsonRc> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("PackageJson") + .field("path", &self.0.path) + .finish() + } +} + +impl std::fmt::Debug for DepLocation { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + DepLocation::DenoJson(arc, key_path, kind) => { + let mut debug = f.debug_tuple("DenoJson"); + debug + .field(&DebugAdapter(arc)) + .field(key_path) + .field(kind) + .finish() + } + DepLocation::PackageJson(arc, key_path) => { + let mut debug = f.debug_tuple("PackageJson"); + debug.field(&DebugAdapter(arc)).field(key_path).finish() + } + } + } +} + +#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +pub enum DepKind { + Jsr, + Npm, +} + +impl DepKind { + pub fn scheme(&self) -> &'static str { + match self { + DepKind::Npm => "npm", + DepKind::Jsr => "jsr", + } + } +} + +#[derive(Clone, Debug)] +pub enum KeyPart { + Imports, + Scopes, + Dependencies, + DevDependencies, + String(String), +} + +impl From for KeyPart { + fn from(value: String) -> Self { + KeyPart::String(value) + } +} + +impl From for KeyPart { + fn from(value: PackageJsonDepKind) -> Self { + match value { + PackageJsonDepKind::Normal => Self::Dependencies, + PackageJsonDepKind::Dev => Self::DevDependencies, + } + } +} + +impl KeyPart { + pub fn as_str(&self) -> &str { + match self { + KeyPart::Imports => "imports", + KeyPart::Scopes => "scopes", + KeyPart::Dependencies => "dependencies", + KeyPart::DevDependencies => "devDependencies", + KeyPart::String(s) => s, + } + } +} + +#[derive(Clone, Debug)] +pub struct KeyPath { + pub parts: Vec, +} + +impl KeyPath { + fn from_parts(parts: impl IntoIterator) -> Self { + Self { + parts: parts.into_iter().collect(), + } + } + fn last(&self) -> Option<&KeyPart> { + self.parts.last() + } + fn push(&mut self, part: KeyPart) { + self.parts.push(part) + } +} + +#[derive(Clone, Debug)] +pub struct Dep { + pub req: PackageReq, + pub kind: DepKind, + pub location: DepLocation, + #[allow(dead_code)] + pub id: DepId, + #[allow(dead_code)] + pub alias: Option, +} + +fn import_map_entries( + import_map: &ImportMap, +) -> impl Iterator)> { + import_map + .imports() + .entries() + .map(|entry| { + ( + KeyPath::from_parts([ + KeyPart::Imports, + KeyPart::String(entry.raw_key.into()), + ]), + entry, + ) + }) + .chain(import_map.scopes().flat_map(|scope| { + let path = KeyPath::from_parts([ + KeyPart::Scopes, + scope.raw_key.to_string().into(), + ]); + + scope.imports.entries().map(move |entry| { + let mut full_path = path.clone(); + full_path.push(KeyPart::String(entry.raw_key.to_string())); + (full_path, entry) + }) + })) +} + +fn to_import_map_value_from_imports( + deno_json: &ConfigFile, +) -> serde_json::Value { + let mut value = serde_json::Map::with_capacity(2); + if let Some(imports) = &deno_json.json.imports { + value.insert("imports".to_string(), imports.clone()); + } + if let Some(scopes) = &deno_json.json.scopes { + value.insert("scopes".to_string(), scopes.clone()); + } + serde_json::Value::Object(value) +} + +fn deno_json_import_map( + deno_json: &ConfigFile, +) -> Result, AnyError> { + let (value, kind) = + if deno_json.json.imports.is_some() || deno_json.json.scopes.is_some() { + ( + to_import_map_value_from_imports(deno_json), + ImportMapKind::Inline, + ) + } else { + match deno_json.to_import_map_path()? { + Some(path) => { + let text = std::fs::read_to_string(&path)?; + let value = serde_json::from_str(&text)?; + (value, ImportMapKind::Outline) + } + None => return Ok(None), + } + }; + + import_map::parse_from_value(deno_json.specifier.clone(), value) + .map_err(Into::into) + .map(|import_map| Some((import_map, kind))) +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum PackageJsonDepKind { + Normal, + Dev, +} + +type PackageJsonDeps = IndexMap< + String, + Result< + (PackageJsonDepKind, PackageJsonDepValue), + PackageJsonDepValueParseError, + >, +>; + +/// Resolve the package.json's dependencies. +// TODO(nathanwhit): Remove once we update deno_package_json with dev deps split out +fn resolve_local_package_json_deps( + package_json: &PackageJsonRc, +) -> PackageJsonDeps { + /// Gets the name and raw version constraint for a registry info or + /// package.json dependency entry taking into account npm package aliases. + fn parse_dep_entry_name_and_raw_version<'a>( + key: &'a str, + value: &'a str, + ) -> (&'a str, &'a str) { + if let Some(package_and_version) = value.strip_prefix("npm:") { + if let Some((name, version)) = package_and_version.rsplit_once('@') { + // if empty, then the name was scoped and there's no version + if name.is_empty() { + (package_and_version, "*") + } else { + (name, version) + } + } else { + (package_and_version, "*") + } + } else { + (key, value) + } + } + + fn parse_entry( + key: &str, + value: &str, + ) -> Result { + if let Some(workspace_key) = value.strip_prefix("workspace:") { + let version_req = VersionReq::parse_from_npm(workspace_key)?; + return Ok(PackageJsonDepValue::Workspace(version_req)); + } + if value.starts_with("file:") + || value.starts_with("git:") + || value.starts_with("http:") + || value.starts_with("https:") + { + return Err(PackageJsonDepValueParseError::Unsupported { + scheme: value.split(':').next().unwrap().to_string(), + }); + } + let (name, version_req) = parse_dep_entry_name_and_raw_version(key, value); + let result = VersionReq::parse_from_npm(version_req); + match result { + Ok(version_req) => Ok(PackageJsonDepValue::Req(PackageReq { + name: name.to_string(), + version_req, + })), + Err(err) => Err(PackageJsonDepValueParseError::VersionReq(err)), + } + } + + fn insert_deps( + deps: Option<&IndexMap>, + result: &mut PackageJsonDeps, + kind: PackageJsonDepKind, + ) { + if let Some(deps) = deps { + for (key, value) in deps { + result.entry(key.to_string()).or_insert_with(|| { + parse_entry(key, value).map(|entry| (kind, entry)) + }); + } + } + } + + let deps = package_json.dependencies.as_ref(); + let dev_deps = package_json.dev_dependencies.as_ref(); + let mut result = IndexMap::new(); + + // favors the deps over dev_deps + insert_deps(deps, &mut result, PackageJsonDepKind::Normal); + insert_deps(dev_deps, &mut result, PackageJsonDepKind::Dev); + + result +} + +fn add_deps_from_deno_json( + deno_json: &Arc, + mut filter: impl DepFilter, + deps: &mut Vec, +) { + let (import_map, import_map_kind) = match deno_json_import_map(deno_json) { + Ok(Some((import_map, import_map_kind))) => (import_map, import_map_kind), + Ok(None) => return, + Err(e) => { + log::warn!("failed to parse imports from {}: {e}", &deno_json.specifier); + return; + } + }; + for (key_path, entry) in import_map_entries(&import_map.import_map) { + let Some(value) = entry.value else { continue }; + let kind = match value.scheme() { + "npm" => DepKind::Npm, + "jsr" => DepKind::Jsr, + _ => continue, + }; + let req = match parse_req_reference(value.as_str(), kind) { + Ok(req) => req.req.clone(), + Err(err) => { + log::warn!("failed to parse package req \"{}\": {err}", value.as_str()); + continue; + } + }; + let alias: &str = key_path.last().unwrap().as_str().trim_end_matches('/'); + let alias = (alias != req.name).then(|| alias.to_string()); + if !filter.should_include(alias.as_deref(), &req, kind) { + continue; + } + let id = DepId(deps.len()); + deps.push(Dep { + location: DepLocation::DenoJson( + deno_json.clone(), + key_path, + import_map_kind, + ), + kind, + req, + id, + alias, + }); + } +} + +fn add_deps_from_package_json( + package_json: &PackageJsonRc, + mut filter: impl DepFilter, + deps: &mut Vec, +) { + let package_json_deps = resolve_local_package_json_deps(package_json); + for (k, v) in package_json_deps { + let (package_dep_kind, v) = match v { + Ok((k, v)) => (k, v), + Err(e) => { + log::warn!("bad package json dep value: {e}"); + continue; + } + }; + match v { + deno_package_json::PackageJsonDepValue::Req(req) => { + let alias = k.as_str(); + let alias = (alias != req.name).then(|| alias.to_string()); + if !filter.should_include(alias.as_deref(), &req, DepKind::Npm) { + continue; + } + let id = DepId(deps.len()); + deps.push(Dep { + id, + kind: DepKind::Npm, + location: DepLocation::PackageJson( + package_json.clone(), + KeyPath::from_parts([package_dep_kind.into(), k.into()]), + ), + req, + alias, + }) + } + deno_package_json::PackageJsonDepValue::Workspace(_) => continue, + } + } +} + +fn deps_from_workspace( + workspace: &Arc, + dep_filter: impl DepFilter, +) -> Result, AnyError> { + let mut deps = Vec::with_capacity(256); + for deno_json in workspace.deno_jsons() { + add_deps_from_deno_json(deno_json, dep_filter, &mut deps); + } + for package_json in workspace.package_jsons() { + add_deps_from_package_json(package_json, dep_filter, &mut deps); + } + + Ok(deps) +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct DepId(usize); + +#[derive(Debug, Clone)] +pub enum Change { + Update(DepId, VersionReq), +} + +pub trait DepFilter: Copy { + fn should_include( + &mut self, + alias: Option<&str>, + package_req: &PackageReq, + dep_kind: DepKind, + ) -> bool; +} + +impl DepFilter for T +where + T: FnMut(Option<&str>, &PackageReq, DepKind) -> bool + Copy, +{ + fn should_include<'a>( + &mut self, + alias: Option<&'a str>, + package_req: &'a PackageReq, + dep_kind: DepKind, + ) -> bool { + (*self)(alias, package_req, dep_kind) + } +} + +#[derive(Clone, Debug)] +pub struct PackageLatestVersion { + pub semver_compatible: Option, + pub latest: Option, +} + +pub struct DepManager { + deps: Vec, + resolved_versions: Vec>, + latest_versions: Vec, + + pending_changes: Vec, + + dependencies_resolved: AtomicBool, + module_load_preparer: Arc, + // TODO(nathanwhit): probably shouldn't be pub + pub(crate) jsr_fetch_resolver: Arc, + pub(crate) npm_fetch_resolver: Arc, + npm_resolver: Arc, + permissions_container: PermissionsContainer, + main_module_graph_container: Arc, + lockfile: Option>, +} + +pub struct DepManagerArgs { + pub module_load_preparer: Arc, + pub jsr_fetch_resolver: Arc, + pub npm_fetch_resolver: Arc, + pub npm_resolver: Arc, + pub permissions_container: PermissionsContainer, + pub main_module_graph_container: Arc, + pub lockfile: Option>, +} + +impl DepManager { + pub fn reloaded_after_modification(self, args: DepManagerArgs) -> Self { + let mut new = Self::with_deps_args(self.deps, args); + new.latest_versions = self.latest_versions; + new + } + fn with_deps_args(deps: Vec, args: DepManagerArgs) -> Self { + let DepManagerArgs { + module_load_preparer, + jsr_fetch_resolver, + npm_fetch_resolver, + npm_resolver, + permissions_container, + main_module_graph_container, + lockfile, + } = args; + Self { + deps, + resolved_versions: Vec::new(), + latest_versions: Vec::new(), + jsr_fetch_resolver, + dependencies_resolved: AtomicBool::new(false), + module_load_preparer, + npm_fetch_resolver, + npm_resolver, + permissions_container, + main_module_graph_container, + lockfile, + pending_changes: Vec::new(), + } + } + pub fn from_workspace_dir( + workspace_dir: &Arc, + dep_filter: impl DepFilter, + args: DepManagerArgs, + ) -> Result { + let mut deps = Vec::with_capacity(256); + if let Some(deno_json) = workspace_dir.maybe_deno_json() { + if deno_json.specifier.scheme() != "file" { + bail!("remote deno.json files are not supported"); + } + let path = deno_json.specifier.to_file_path().unwrap(); + if path.parent().unwrap() == workspace_dir.dir_path() { + add_deps_from_deno_json(deno_json, dep_filter, &mut deps); + } + } + if let Some(package_json) = workspace_dir.maybe_pkg_json() { + add_deps_from_package_json(package_json, dep_filter, &mut deps); + } + + Ok(Self::with_deps_args(deps, args)) + } + pub fn from_workspace( + workspace: &Arc, + dep_filter: impl DepFilter, + args: DepManagerArgs, + ) -> Result { + let deps = deps_from_workspace(workspace, dep_filter)?; + Ok(Self::with_deps_args(deps, args)) + } + + async fn run_dependency_resolution(&self) -> Result<(), AnyError> { + if self + .dependencies_resolved + .load(std::sync::atomic::Ordering::Relaxed) + { + return Ok(()); + } + + let mut graph_permit = self + .main_module_graph_container + .acquire_update_permit() + .await; + let graph = graph_permit.graph_mut(); + // populate the information from the lockfile + if let Some(lockfile) = &self.lockfile { + let lockfile = lockfile.lock(); + graph.fill_from_lockfile(FillFromLockfileOptions { + redirects: lockfile + .content + .redirects + .iter() + .map(|(from, to)| (from.as_str(), to.as_str())), + package_specifiers: lockfile + .content + .packages + .specifiers + .iter() + .map(|(dep, id)| (dep, id.as_str())), + }); + } + + let npm_resolver = self.npm_resolver.as_managed().unwrap(); + if self.deps.iter().all(|dep| match dep.kind { + DepKind::Npm => { + npm_resolver.resolve_pkg_id_from_pkg_req(&dep.req).is_ok() + } + DepKind::Jsr => graph.packages.mappings().contains_key(&dep.req), + }) { + self + .dependencies_resolved + .store(true, std::sync::atomic::Ordering::Relaxed); + graph_permit.commit(); + return Ok(()); + } + + npm_resolver.ensure_top_level_package_json_install().await?; + let mut roots = Vec::new(); + let mut info_futures = FuturesUnordered::new(); + for dep in &self.deps { + if dep.location.is_deno_json() { + match dep.kind { + DepKind::Npm => roots.push( + ModuleSpecifier::parse(&format!("npm:/{}/", dep.req)).unwrap(), + ), + DepKind::Jsr => info_futures.push(async { + if let Some(nv) = self.jsr_fetch_resolver.req_to_nv(&dep.req).await + { + if let Some(info) = + self.jsr_fetch_resolver.package_version_info(&nv).await + { + let specifier = + ModuleSpecifier::parse(&format!("jsr:/{}/", dep.req)) + .unwrap(); + return Some((specifier, info)); + } + } + None + }), + } + } + } + + while let Some(info_future) = info_futures.next().await { + if let Some((specifier, info)) = info_future { + let exports = info.exports(); + for (k, _) in exports { + if let Ok(spec) = specifier.join(k) { + roots.push(spec); + } + } + } + } + + self + .module_load_preparer + .prepare_module_load( + graph, + &roots, + false, + deno_config::deno_json::TsTypeLib::DenoWindow, + self.permissions_container.clone(), + None, + ) + .await?; + + graph_permit.commit(); + + Ok(()) + } + + pub fn resolved_version(&self, id: DepId) -> Option<&PackageNv> { + self.resolved_versions[id.0].as_ref() + } + + pub async fn resolve_current_versions(&mut self) -> Result<(), AnyError> { + self.run_dependency_resolution().await?; + + let graph = self.main_module_graph_container.graph(); + + let mut resolved = Vec::with_capacity(self.deps.len()); + let snapshot = self.npm_resolver.as_managed().unwrap().snapshot(); + let resolved_npm = snapshot.package_reqs(); + let resolved_jsr = graph.packages.mappings(); + for dep in &self.deps { + match dep.kind { + DepKind::Npm => { + let resolved_version = resolved_npm.get(&dep.req).cloned(); + resolved.push(resolved_version); + } + DepKind::Jsr => { + let resolved_version = resolved_jsr.get(&dep.req).cloned(); + resolved.push(resolved_version) + } + } + } + + self.resolved_versions = resolved; + + Ok(()) + } + + async fn load_latest_versions( + &self, + ) -> Result, AnyError> { + if self.latest_versions.len() == self.deps.len() { + return Ok(self.latest_versions.clone()); + } + let latest_tag_req = deno_semver::VersionReq::from_raw_text_and_inner( + "latest".into(), + deno_semver::RangeSetOrTag::Tag("latest".into()), + ); + let mut latest_versions = Vec::with_capacity(self.deps.len()); + + let npm_sema = Semaphore::new(32); + let jsr_sema = Semaphore::new(32); + let mut futs = FuturesOrdered::new(); + + for dep in &self.deps { + match dep.kind { + DepKind::Npm => futs.push_back( + async { + let semver_req = &dep.req; + let latest_req = PackageReq { + name: dep.req.name.clone(), + version_req: latest_tag_req.clone(), + }; + let _permit = npm_sema.acquire().await; + let semver_compatible = + self.npm_fetch_resolver.req_to_nv(semver_req).await; + let latest = self.npm_fetch_resolver.req_to_nv(&latest_req).await; + PackageLatestVersion { + latest, + semver_compatible, + } + } + .boxed_local(), + ), + DepKind::Jsr => futs.push_back( + async { + let semver_req = &dep.req; + let latest_req = PackageReq { + name: dep.req.name.clone(), + version_req: deno_semver::WILDCARD_VERSION_REQ.clone(), + }; + let _permit = jsr_sema.acquire().await; + let semver_compatible = + self.jsr_fetch_resolver.req_to_nv(semver_req).await; + let latest = self.jsr_fetch_resolver.req_to_nv(&latest_req).await; + PackageLatestVersion { + latest, + semver_compatible, + } + } + .boxed_local(), + ), + } + } + while let Some(nv) = futs.next().await { + latest_versions.push(nv); + } + + Ok(latest_versions) + } + + pub async fn resolve_versions(&mut self) -> Result<(), AnyError> { + let (_, latest_versions) = try_join( + self.run_dependency_resolution(), + self.load_latest_versions(), + ) + .await?; + + self.latest_versions = latest_versions; + + self.resolve_current_versions().await?; + + Ok(()) + } + + pub fn deps_with_resolved_latest_versions( + &self, + ) -> impl IntoIterator, PackageLatestVersion)> + '_ + { + self + .resolved_versions + .iter() + .zip(self.latest_versions.iter()) + .enumerate() + .map(|(i, (resolved, latest))| { + (DepId(i), resolved.clone(), latest.clone()) + }) + } + + pub fn get_dep(&self, id: DepId) -> &Dep { + &self.deps[id.0] + } + + pub fn update_dep(&mut self, dep_id: DepId, new_version_req: VersionReq) { + self + .pending_changes + .push(Change::Update(dep_id, new_version_req)); + } + + pub fn commit_changes(&mut self) -> Result<(), AnyError> { + let changes = std::mem::take(&mut self.pending_changes); + let mut config_updaters = HashMap::new(); + for change in changes { + match change { + Change::Update(dep_id, version_req) => { + // TODO: move most of this to ConfigUpdater + let dep = &mut self.deps[dep_id.0]; + dep.req.version_req = version_req.clone(); + match &dep.location { + DepLocation::DenoJson(arc, key_path, import_map_kind) => { + if matches!(import_map_kind, ImportMapKind::Outline) { + // not supported + continue; + } + let updater = + get_or_create_updater(&mut config_updaters, &dep.location)?; + + let Some(property) = updater.get_property_for_mutation(key_path) + else { + log::warn!( + "failed to find property at path {key_path:?} for file {}", + arc.specifier + ); + continue; + }; + let Some(string_value) = cst_string_literal(&property) else { + continue; + }; + let mut req_reference = match dep.kind { + DepKind::Npm => NpmPackageReqReference::from_str(&string_value) + .unwrap() + .into_inner(), + DepKind::Jsr => JsrPackageReqReference::from_str(&string_value) + .unwrap() + .into_inner(), + }; + req_reference.req.version_req = version_req; + let mut new_value = + format!("{}:{}", dep.kind.scheme(), req_reference); + if string_value.ends_with('/') && !new_value.ends_with('/') { + // the display impl for PackageReqReference maps `/` to the root + // subpath, but for the import map the trailing `/` is significant + new_value.push('/'); + } + if string_value + .trim_start_matches(format!("{}:", dep.kind.scheme()).as_str()) + .starts_with('/') + { + // this is gross + new_value = new_value.replace(':', ":/"); + } + property + .set_value(jsonc_parser::cst::CstInputValue::String(new_value)); + } + DepLocation::PackageJson(arc, key_path) => { + let updater = + get_or_create_updater(&mut config_updaters, &dep.location)?; + let Some(property) = updater.get_property_for_mutation(key_path) + else { + log::warn!( + "failed to find property at path {key_path:?} for file {}", + arc.path.display() + ); + continue; + }; + let Some(string_value) = cst_string_literal(&property) else { + continue; + }; + let new_value = if string_value.starts_with("npm:") { + // aliased + let rest = string_value.trim_start_matches("npm:"); + let mut parts = rest.split('@'); + let first = parts.next().unwrap(); + if first.is_empty() { + let scope_and_name = parts.next().unwrap(); + format!("npm:@{scope_and_name}@{version_req}") + } else { + format!("npm:{first}@{version_req}") + } + } else if string_value.contains(":") { + bail!("Unexpected package json dependency string: \"{string_value}\" in {}", arc.path.display()); + } else { + version_req.to_string() + }; + property + .set_value(jsonc_parser::cst::CstInputValue::String(new_value)); + } + } + } + } + } + + for (_, updater) in config_updaters { + updater.commit()?; + } + + Ok(()) + } +} + +fn get_or_create_updater<'a>( + config_updaters: &'a mut HashMap, + location: &DepLocation, +) -> Result<&'a mut ConfigUpdater, AnyError> { + match config_updaters.entry(location.file_path().into_owned()) { + std::collections::hash_map::Entry::Occupied(occupied_entry) => { + Ok(occupied_entry.into_mut()) + } + std::collections::hash_map::Entry::Vacant(vacant_entry) => { + let updater = ConfigUpdater::new( + location.config_kind(), + location.file_path().into_owned(), + )?; + Ok(vacant_entry.insert(updater)) + } + } +} + +fn cst_string_literal( + property: &jsonc_parser::cst::CstObjectProp, +) -> Option { + // TODO(nathanwhit): ensure this unwrap is safe + let value = property.value().unwrap(); + let Some(string) = value.as_string_lit() else { + log::warn!("malformed entry"); + return None; + }; + let Ok(string_value) = string.decoded_value() else { + log::warn!("malformed string: {string:?}"); + return None; + }; + Some(string_value) +} + +fn parse_req_reference( + input: &str, + kind: DepKind, +) -> Result< + PackageReqReference, + deno_semver::package::PackageReqReferenceParseError, +> { + Ok(match kind { + DepKind::Npm => NpmPackageReqReference::from_str(input)?.into_inner(), + DepKind::Jsr => JsrPackageReqReference::from_str(input)?.into_inner(), + }) +} diff --git a/cli/tools/registry/pm/outdated.rs b/cli/tools/registry/pm/outdated.rs new file mode 100644 index 00000000000000..2a29014267d67e --- /dev/null +++ b/cli/tools/registry/pm/outdated.rs @@ -0,0 +1,661 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::collections::HashSet; +use std::sync::Arc; + +use deno_core::error::AnyError; +use deno_semver::package::PackageNv; +use deno_semver::package::PackageReq; +use deno_semver::VersionReq; +use deno_terminal::colors; + +use crate::args::CacheSetting; +use crate::args::CliOptions; +use crate::args::Flags; +use crate::args::OutdatedFlags; +use crate::factory::CliFactory; +use crate::file_fetcher::FileFetcher; +use crate::jsr::JsrFetchResolver; +use crate::npm::NpmFetchResolver; +use crate::tools::registry::pm::deps::DepKind; + +use super::deps::Dep; +use super::deps::DepManager; +use super::deps::DepManagerArgs; +use super::deps::PackageLatestVersion; + +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] +struct OutdatedPackage { + kind: DepKind, + latest: String, + semver_compatible: String, + current: String, + name: String, +} + +#[allow(clippy::print_stdout)] +fn print_outdated_table(packages: &[OutdatedPackage]) { + const HEADINGS: &[&str] = &["Package", "Current", "Update", "Latest"]; + + let mut longest_package = 0; + let mut longest_current = 0; + let mut longest_update = 0; + let mut longest_latest = 0; + + for package in packages { + let name_len = package.kind.scheme().len() + 1 + package.name.len(); + longest_package = longest_package.max(name_len); + longest_current = longest_current.max(package.current.len()); + longest_update = longest_update.max(package.semver_compatible.len()); + longest_latest = longest_latest.max(package.latest.len()); + } + + let package_column_width = longest_package.max(HEADINGS[0].len()) + 2; + let current_column_width = longest_current.max(HEADINGS[1].len()) + 2; + let update_column_width = longest_update.max(HEADINGS[2].len()) + 2; + let latest_column_width = longest_latest.max(HEADINGS[3].len()) + 2; + + let package_fill = "─".repeat(package_column_width); + let current_fill = "─".repeat(current_column_width); + let update_fill = "─".repeat(update_column_width); + let latest_fill = "─".repeat(latest_column_width); + + println!("┌{package_fill}┬{current_fill}┬{update_fill}┬{latest_fill}┐"); + println!( + "│ {}{} │ {}{} │ {}{} │ {}{} │", + colors::intense_blue(HEADINGS[0]), + " ".repeat(package_column_width - 2 - HEADINGS[0].len()), + colors::intense_blue(HEADINGS[1]), + " ".repeat(current_column_width - 2 - HEADINGS[1].len()), + colors::intense_blue(HEADINGS[2]), + " ".repeat(update_column_width - 2 - HEADINGS[2].len()), + colors::intense_blue(HEADINGS[3]), + " ".repeat(latest_column_width - 2 - HEADINGS[3].len()) + ); + for package in packages { + println!("├{package_fill}┌{current_fill}┌{update_fill}┌{latest_fill}─",); + + print!( + "│ {: Result<(), AnyError> { + let mut outdated = Vec::new(); + let mut seen = std::collections::BTreeSet::new(); + for (dep_id, resolved, latest_versions) in + deps.deps_with_resolved_latest_versions() + { + let dep = deps.get_dep(dep_id); + + let Some(resolved) = resolved else { continue }; + + let latest = { + let preferred = if compatible { + &latest_versions.semver_compatible + } else { + &latest_versions.latest + }; + if let Some(v) = preferred { + v + } else { + continue; + } + }; + + if latest > &resolved + && seen.insert((dep.kind, dep.req.name.clone(), resolved.version.clone())) + { + outdated.push(OutdatedPackage { + kind: dep.kind, + name: dep.req.name.clone(), + current: resolved.version.to_string(), + latest: latest_versions + .latest + .map(|l| l.version.to_string()) + .unwrap_or_default(), + semver_compatible: latest_versions + .semver_compatible + .map(|l| l.version.to_string()) + .unwrap_or_default(), + }) + } + } + + if !outdated.is_empty() { + outdated.sort(); + print_outdated_table(&outdated); + } + + Ok(()) +} + +pub async fn outdated( + flags: Arc, + update_flags: OutdatedFlags, +) -> Result<(), AnyError> { + let factory = CliFactory::from_flags(flags.clone()); + let cli_options = factory.cli_options()?; + let workspace = cli_options.workspace(); + let http_client = factory.http_client_provider(); + let deps_http_cache = factory.global_http_cache()?; + let mut file_fetcher = FileFetcher::new( + deps_http_cache.clone(), + CacheSetting::RespectHeaders, + true, + http_client.clone(), + Default::default(), + None, + ); + file_fetcher.set_download_log_level(log::Level::Trace); + let file_fetcher = Arc::new(file_fetcher); + let npm_fetch_resolver = Arc::new(NpmFetchResolver::new( + file_fetcher.clone(), + cli_options.npmrc().clone(), + )); + let jsr_fetch_resolver = + Arc::new(JsrFetchResolver::new(file_fetcher.clone())); + + let args = dep_manager_args( + &factory, + cli_options, + npm_fetch_resolver.clone(), + jsr_fetch_resolver.clone(), + ) + .await?; + + let filter_set = filter::FilterSet::from_filter_strings( + update_flags.filters.iter().map(|s| s.as_str()), + )?; + + let filter_fn = |alias: Option<&str>, req: &PackageReq, _: DepKind| { + if filter_set.is_empty() { + return true; + } + let name = alias.unwrap_or(&req.name); + filter_set.matches(name) + }; + let mut deps = if update_flags.recursive { + super::deps::DepManager::from_workspace(workspace, filter_fn, args)? + } else { + super::deps::DepManager::from_workspace_dir( + &cli_options.start_dir, + filter_fn, + args, + )? + }; + + deps.resolve_versions().await?; + + match update_flags.kind { + crate::args::OutdatedKind::Update { latest } => { + update(deps, latest, &filter_set, flags).await?; + } + crate::args::OutdatedKind::PrintOutdated { compatible } => { + print_outdated(&mut deps, compatible)?; + } + } + + Ok(()) +} + +fn choose_new_version_req( + dep: &Dep, + resolved: Option<&PackageNv>, + latest_versions: &PackageLatestVersion, + update_to_latest: bool, + filter_set: &filter::FilterSet, +) -> Option { + let explicit_version_req = filter_set + .matching_filter(dep.alias.as_deref().unwrap_or(&dep.req.name)) + .version_spec() + .cloned(); + + if let Some(version_req) = explicit_version_req { + if let Some(resolved) = resolved { + // todo(nathanwhit): handle tag + if version_req.tag().is_none() && version_req.matches(&resolved.version) { + return None; + } + } + Some(version_req) + } else { + let preferred = if update_to_latest { + latest_versions.latest.as_ref()? + } else { + latest_versions.semver_compatible.as_ref()? + }; + if preferred.version <= resolved?.version { + return None; + } + Some( + VersionReq::parse_from_specifier( + format!("^{}", preferred.version).as_str(), + ) + .unwrap(), + ) + } +} + +async fn update( + mut deps: DepManager, + update_to_latest: bool, + filter_set: &filter::FilterSet, + flags: Arc, +) -> Result<(), AnyError> { + let mut updated = Vec::new(); + + for (dep_id, resolved, latest_versions) in deps + .deps_with_resolved_latest_versions() + .into_iter() + .collect::>() + { + let dep = deps.get_dep(dep_id); + let new_version_req = choose_new_version_req( + dep, + resolved.as_ref(), + &latest_versions, + update_to_latest, + filter_set, + ); + let Some(new_version_req) = new_version_req else { + continue; + }; + + updated.push(( + dep_id, + format!("{}:{}", dep.kind.scheme(), dep.req.name), + deps.resolved_version(dep.id).cloned(), + new_version_req.clone(), + )); + + deps.update_dep(dep_id, new_version_req); + } + + deps.commit_changes()?; + + if !updated.is_empty() { + let factory = super::npm_install_after_modification( + flags.clone(), + Some(deps.jsr_fetch_resolver.clone()), + ) + .await?; + + let mut updated_to_versions = HashSet::new(); + let cli_options = factory.cli_options()?; + let args = dep_manager_args( + &factory, + cli_options, + deps.npm_fetch_resolver.clone(), + deps.jsr_fetch_resolver.clone(), + ) + .await?; + + let mut deps = deps.reloaded_after_modification(args); + deps.resolve_current_versions().await?; + for (dep_id, package_name, maybe_current_version, new_version_req) in + updated + { + if let Some(nv) = deps.resolved_version(dep_id) { + updated_to_versions.insert(( + package_name, + maybe_current_version, + nv.version.clone(), + )); + } else { + log::warn!( + "Failed to resolve version for new version requirement: {} -> {}", + package_name, + new_version_req + ); + } + } + + log::info!( + "Updated {} dependenc{}:", + updated_to_versions.len(), + if updated_to_versions.len() == 1 { + "y" + } else { + "ies" + } + ); + let mut updated_to_versions = + updated_to_versions.into_iter().collect::>(); + updated_to_versions.sort_by(|(k, _, _), (k2, _, _)| k.cmp(k2)); + let max_name = updated_to_versions + .iter() + .map(|(name, _, _)| name.len()) + .max() + .unwrap_or(0); + let max_old = updated_to_versions + .iter() + .map(|(_, maybe_current, _)| { + maybe_current + .as_ref() + .map(|v| v.version.to_string().len()) + .unwrap_or(0) + }) + .max() + .unwrap_or(0); + let max_new = updated_to_versions + .iter() + .map(|(_, _, new_version)| new_version.to_string().len()) + .max() + .unwrap_or(0); + + for (package_name, maybe_current_version, new_version) in + updated_to_versions + { + let current_version = if let Some(current_version) = maybe_current_version + { + current_version.version.to_string() + } else { + "".to_string() + }; + + log::info!( + " - {}{} {}{} -> {}{}", + format!( + "{}{}", + colors::gray(package_name[0..4].to_string()), + package_name[4..].to_string() + ), + " ".repeat(max_name - package_name.len()), + " ".repeat(max_old - current_version.len()), + colors::gray(¤t_version), + " ".repeat(max_new - new_version.to_string().len()), + colors::green(&new_version), + ); + } + } else { + log::info!( + "All {}dependencies are up to date.", + if filter_set.is_empty() { + "" + } else { + "matching " + } + ); + } + + Ok(()) +} + +async fn dep_manager_args( + factory: &CliFactory, + cli_options: &CliOptions, + npm_fetch_resolver: Arc, + jsr_fetch_resolver: Arc, +) -> Result { + Ok(DepManagerArgs { + module_load_preparer: factory.module_load_preparer().await?.clone(), + jsr_fetch_resolver, + npm_fetch_resolver, + npm_resolver: factory.npm_resolver().await?.clone(), + permissions_container: factory.root_permissions_container()?.clone(), + main_module_graph_container: factory + .main_module_graph_container() + .await? + .clone(), + lockfile: cli_options.maybe_lockfile().cloned(), + }) +} + +mod filter { + use deno_core::anyhow::anyhow; + use deno_core::anyhow::Context; + use deno_core::error::AnyError; + use deno_semver::VersionReq; + + enum FilterKind { + Exclude, + Include, + } + pub struct Filter { + kind: FilterKind, + regex: regex::Regex, + version_spec: Option, + } + + fn pattern_to_regex(pattern: &str) -> Result { + let escaped = regex::escape(pattern); + let unescaped_star = escaped.replace(r"\*", ".*"); + Ok(regex::Regex::new(&format!("^{}$", unescaped_star))?) + } + + impl Filter { + pub fn version_spec(&self) -> Option<&VersionReq> { + self.version_spec.as_ref() + } + pub fn from_str(input: &str) -> Result { + let (kind, first_idx) = if input.starts_with('!') { + (FilterKind::Exclude, 1) + } else { + (FilterKind::Include, 0) + }; + let s = &input[first_idx..]; + let (pattern, version_spec) = + if let Some(scope_name) = s.strip_prefix('@') { + if let Some(idx) = scope_name.find('@') { + let (pattern, version_spec) = s.split_at(idx + 1); + ( + pattern, + Some( + VersionReq::parse_from_specifier( + version_spec.trim_start_matches('@'), + ) + .with_context(|| format!("Invalid filter \"{input}\""))?, + ), + ) + } else { + (s, None) + } + } else { + let mut parts = s.split('@'); + let Some(pattern) = parts.next() else { + return Err(anyhow!("Invalid filter \"{input}\"")); + }; + ( + pattern, + parts + .next() + .map(VersionReq::parse_from_specifier) + .transpose() + .with_context(|| format!("Invalid filter \"{input}\""))?, + ) + }; + + Ok(Filter { + kind, + regex: pattern_to_regex(pattern) + .with_context(|| format!("Invalid filter \"{input}\""))?, + version_spec, + }) + } + + pub fn matches(&self, name: &str) -> bool { + self.regex.is_match(name) + } + } + + pub struct FilterSet { + filters: Vec, + has_exclude: bool, + has_include: bool, + } + impl FilterSet { + pub fn from_filter_strings<'a>( + filter_strings: impl IntoIterator, + ) -> Result { + let filters = filter_strings + .into_iter() + .map(Filter::from_str) + .collect::, _>>()?; + let has_exclude = filters + .iter() + .any(|f| matches!(f.kind, FilterKind::Exclude)); + let has_include = filters + .iter() + .any(|f| matches!(f.kind, FilterKind::Include)); + Ok(FilterSet { + filters, + has_exclude, + has_include, + }) + } + + pub fn is_empty(&self) -> bool { + self.filters.is_empty() + } + + pub fn matches(&self, name: &str) -> bool { + self.matching_filter(name).is_included() + } + + pub fn matching_filter(&self, name: &str) -> MatchResult<'_> { + if self.filters.is_empty() { + return MatchResult::Included; + } + let mut matched = None; + for filter in &self.filters { + match filter.kind { + FilterKind::Include => { + if matched.is_none() && filter.matches(name) { + matched = Some(filter); + } + } + FilterKind::Exclude => { + if filter.matches(name) { + return MatchResult::Excluded; + } + } + } + } + if let Some(filter) = matched { + MatchResult::Matches(filter) + } else if self.has_exclude && !self.has_include { + MatchResult::Included + } else { + MatchResult::Excluded + } + } + } + + pub enum MatchResult<'a> { + Matches(&'a Filter), + Included, + Excluded, + } + + impl MatchResult<'_> { + pub fn version_spec(&self) -> Option<&VersionReq> { + match self { + MatchResult::Matches(filter) => filter.version_spec(), + _ => None, + } + } + pub fn is_included(&self) -> bool { + matches!(self, MatchResult::Included | MatchResult::Matches(_)) + } + } + + #[cfg(test)] + mod test { + fn matches_filters<'a, 'b>( + filters: impl IntoIterator, + name: &str, + ) -> bool { + let filters = super::FilterSet::from_filter_strings(filters).unwrap(); + filters.matches(name) + } + + fn version_spec(s: &str) -> deno_semver::VersionReq { + deno_semver::VersionReq::parse_from_specifier(s).unwrap() + } + + #[test] + fn basic_glob() { + assert!(matches_filters(["foo*"], "foo")); + assert!(matches_filters(["foo*"], "foobar")); + assert!(!matches_filters(["foo*"], "barfoo")); + + assert!(matches_filters(["*foo"], "foo")); + assert!(matches_filters(["*foo"], "barfoo")); + assert!(!matches_filters(["*foo"], "foobar")); + + assert!(matches_filters(["@scope/foo*"], "@scope/foobar")); + } + + #[test] + fn basic_glob_with_version() { + assert!(matches_filters(["foo*@1"], "foo",)); + assert!(matches_filters(["foo*@1"], "foobar",)); + assert!(matches_filters(["foo*@1"], "foo-bar",)); + assert!(!matches_filters(["foo*@1"], "barfoo",)); + assert!(matches_filters(["@scope/*@1"], "@scope/foo")); + } + + #[test] + fn glob_exclude() { + assert!(!matches_filters(["!foo*"], "foo")); + assert!(!matches_filters(["!foo*"], "foobar")); + assert!(matches_filters(["!foo*"], "barfoo")); + + assert!(!matches_filters(["!*foo"], "foo")); + assert!(!matches_filters(["!*foo"], "barfoo")); + assert!(matches_filters(["!*foo"], "foobar")); + + assert!(!matches_filters(["!@scope/foo*"], "@scope/foobar")); + } + + #[test] + fn multiple_globs() { + assert!(matches_filters(["foo*", "bar*"], "foo")); + assert!(matches_filters(["foo*", "bar*"], "bar")); + assert!(!matches_filters(["foo*", "bar*"], "baz")); + + assert!(matches_filters(["foo*", "!bar*"], "foo")); + assert!(!matches_filters(["foo*", "!bar*"], "bar")); + assert!(matches_filters(["foo*", "!bar*"], "foobar")); + assert!(!matches_filters(["foo*", "!*bar"], "foobar")); + assert!(!matches_filters(["foo*", "!*bar"], "baz")); + + let filters = + super::FilterSet::from_filter_strings(["foo*@1", "bar*@2"]).unwrap(); + + assert_eq!( + filters.matching_filter("foo").version_spec().cloned(), + Some(version_spec("1")) + ); + + assert_eq!( + filters.matching_filter("bar").version_spec().cloned(), + Some(version_spec("2")) + ); + } + } +} diff --git a/tests/registry/jsr/@denotest/add/0.2.1/mod.ts b/tests/registry/jsr/@denotest/add/0.2.1/mod.ts new file mode 100644 index 00000000000000..864e8dd321d82e --- /dev/null +++ b/tests/registry/jsr/@denotest/add/0.2.1/mod.ts @@ -0,0 +1,4 @@ +// This is renamed to `add()` in 1.0.0. +export function sum(a: number, b: number): number { + return a + b; +} diff --git a/tests/registry/jsr/@denotest/add/0.2.1_meta.json b/tests/registry/jsr/@denotest/add/0.2.1_meta.json new file mode 100644 index 00000000000000..6eebe219854055 --- /dev/null +++ b/tests/registry/jsr/@denotest/add/0.2.1_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/add/meta.json b/tests/registry/jsr/@denotest/add/meta.json index 72aea80cc34536..f1a50109d8bc08 100644 --- a/tests/registry/jsr/@denotest/add/meta.json +++ b/tests/registry/jsr/@denotest/add/meta.json @@ -4,6 +4,7 @@ "yanked": true }, "1.0.0": {}, - "0.2.0": {} + "0.2.0": {}, + "0.2.1": {} } } diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts new file mode 100644 index 00000000000000..de02f69024bf76 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/add@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json new file mode 100644 index 00000000000000..885e71c6ccde35 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json @@ -0,0 +1,3 @@ +{ + "a": 1 +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts new file mode 100644 index 00000000000000..215c42310d69bb --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/subtract@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json b/tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json new file mode 100644 index 00000000000000..d9f58b9a61a03f --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json @@ -0,0 +1,7 @@ +{ + "exports": { + "./add": "./add.ts", + "./subtract": "./subtract.ts", + "./data-json": "./data.json" + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts new file mode 100644 index 00000000000000..de02f69024bf76 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/add@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json new file mode 100644 index 00000000000000..885e71c6ccde35 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json @@ -0,0 +1,3 @@ +{ + "a": 1 +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts new file mode 100644 index 00000000000000..215c42310d69bb --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/subtract@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json b/tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json new file mode 100644 index 00000000000000..d9f58b9a61a03f --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json @@ -0,0 +1,7 @@ +{ + "exports": { + "./add": "./add.ts", + "./subtract": "./subtract.ts", + "./data-json": "./data.json" + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/meta.json b/tests/registry/jsr/@denotest/multiple-exports/meta.json index 02601e4d0d5188..aaaf18a184ff65 100644 --- a/tests/registry/jsr/@denotest/multiple-exports/meta.json +++ b/tests/registry/jsr/@denotest/multiple-exports/meta.json @@ -1,5 +1,7 @@ { "versions": { - "1.0.0": {} + "1.0.0": {}, + "0.5.0": {}, + "0.2.0": {} } } diff --git a/tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts b/tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts new file mode 100644 index 00000000000000..74e49ea6fa9601 --- /dev/null +++ b/tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts @@ -0,0 +1,3 @@ +export function sub(a: number, b: number): number { + return a - b; +} diff --git a/tests/registry/jsr/@denotest/subtract/0.2.0_meta.json b/tests/registry/jsr/@denotest/subtract/0.2.0_meta.json new file mode 100644 index 00000000000000..6eebe219854055 --- /dev/null +++ b/tests/registry/jsr/@denotest/subtract/0.2.0_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/subtract/meta.json b/tests/registry/jsr/@denotest/subtract/meta.json index 02601e4d0d5188..2f4cee59dfe7f8 100644 --- a/tests/registry/jsr/@denotest/subtract/meta.json +++ b/tests/registry/jsr/@denotest/subtract/meta.json @@ -1,5 +1,7 @@ { + "latest": "1.0.0", "versions": { - "1.0.0": {} + "1.0.0": {}, + "0.2.0": {} } } diff --git a/tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json b/tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json new file mode 100644 index 00000000000000..45684d4f5265a9 --- /dev/null +++ b/tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/has-patch-versions", + "version": "0.1.0" + +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json b/tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json new file mode 100644 index 00000000000000..4483df34e58e21 --- /dev/null +++ b/tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/has-patch-versions", + "version": "0.1.1" + +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json b/tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json new file mode 100644 index 00000000000000..55efaaa3263f48 --- /dev/null +++ b/tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@denotest/has-patch-versions", + "version": "0.2.0" +} \ No newline at end of file diff --git a/tests/specs/update/deno_json/__test__.jsonc b/tests/specs/update/deno_json/__test__.jsonc new file mode 100644 index 00000000000000..8b4aa26b5c082d --- /dev/null +++ b/tests/specs/update/deno_json/__test__.jsonc @@ -0,0 +1,101 @@ +{ + "tempDir": true, + "tests": { + // just to make sure install doesn't change the lockfile + "sanity_lockfile_up_to_date": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": [ + "eval", + "const now = Deno.readTextFileSync('./deno.lock'); console.log(now.trim());" + ], + "output": "deno.lock.orig.out" + } + ] + }, + "print_outdated": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "outdated.out" + } + ] + }, + "print_outdated_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --compatible", + "output": "outdated_compatible.out" + } + ] + }, + "update_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update", + "output": "./update_compatible/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_compatible/deno.json.out" + }, + { + "args": "-A print_file.ts ./deno.lock", + "output": "./update_compatible/deno.lock.out" + } + ] + }, + "update_latest": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest", + "output": "update_latest/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_latest/deno.json.out" + }, + { + "args": "-A print_file.ts ./deno.lock", + "output": "./update_latest/deno.lock.out" + } + ] + }, + "update_filtered": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest @denotest/add @denotest/b* !@denotest/breaking* @denotest/with-subpath@0.5.0", + "output": "filtered/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "filtered/deno.json.out" + } + ] + } + } +} diff --git a/tests/specs/update/deno_json/deno.json b/tests/specs/update/deno_json/deno.json new file mode 100644 index 00000000000000..4f880e6db9108d --- /dev/null +++ b/tests/specs/update/deno_json/deno.json @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/add/": "jsr:/@denotest/add@^0.2.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/bin": "npm:@denotest/bin@0.6.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.0" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/add/": "jsr:/@denotest/add@^0.2.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/deno.lock b/tests/specs/update/deno_json/deno.lock new file mode 100644 index 00000000000000..7c4d5e36906fb7 --- /dev/null +++ b/tests/specs/update/deno_json/deno.lock @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.0", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.0": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/bin@0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } +} diff --git a/tests/specs/update/deno_json/deno.lock.orig.out b/tests/specs/update/deno_json/deno.lock.orig.out new file mode 100644 index 00000000000000..7c4d5e36906fb7 --- /dev/null +++ b/tests/specs/update/deno_json/deno.lock.orig.out @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.0", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.0": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/bin@0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } +} diff --git a/tests/specs/update/deno_json/filtered/deno.json.out b/tests/specs/update/deno_json/filtered/deno.json.out new file mode 100644 index 00000000000000..4458e2d037b92b --- /dev/null +++ b/tests/specs/update/deno_json/filtered/deno.json.out @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.5.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/bin": "npm:@denotest/bin@^1.0.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.0" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.5.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/filtered/update.out b/tests/specs/update/deno_json/filtered/update.out new file mode 100644 index 00000000000000..ce16c6f6b710f7 --- /dev/null +++ b/tests/specs/update/deno_json/filtered/update.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0/data.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +[UNORDERED_END] +Updated 3 dependencies: + - jsr:@denotest/add 0.2.0 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 0.5.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 diff --git a/tests/specs/update/deno_json/outdated.out b/tests/specs/update/deno_json/outdated.out new file mode 100644 index 00000000000000..07ff9f3416a8f1 --- /dev/null +++ b/tests/specs/update/deno_json/outdated.out @@ -0,0 +1,15 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/deno_json/outdated_compatible.out b/tests/specs/update/deno_json/outdated_compatible.out new file mode 100644 index 00000000000000..54511a537f2fdd --- /dev/null +++ b/tests/specs/update/deno_json/outdated_compatible.out @@ -0,0 +1,7 @@ +┌──────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├──────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │ +├──────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +└──────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/deno_json/print_file.ts b/tests/specs/update/deno_json/print_file.ts new file mode 100644 index 00000000000000..c57b6c3a4e56f3 --- /dev/null +++ b/tests/specs/update/deno_json/print_file.ts @@ -0,0 +1,2 @@ +const file = Deno.args[0]; +console.log(Deno.readTextFileSync(file).trim()); diff --git a/tests/specs/update/deno_json/update_compatible/deno.json.out b/tests/specs/update/deno_json/update_compatible/deno.json.out new file mode 100644 index 00000000000000..e453eff3c9c566 --- /dev/null +++ b/tests/specs/update/deno_json/update_compatible/deno.json.out @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.1", + "@denotest/add/": "jsr:/@denotest/add@^0.2.1/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/bin": "npm:@denotest/bin@0.6.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.1" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^0.2.1", + "@denotest/add/": "jsr:/@denotest/add@^0.2.1/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/update_compatible/deno.lock.out b/tests/specs/update/deno_json/update_compatible/deno.lock.out new file mode 100644 index 00000000000000..994d6f7ac9c992 --- /dev/null +++ b/tests/specs/update/deno_json/update_compatible/deno.lock.out @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@~0.2.1": "0.2.1", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1": "0.1.1" + }, + "jsr": { + "@denotest/add@0.2.1": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.1": { + "integrity": "sha512-slUqYhu6DrPiSdNzmW5aMdW2/osIYnDP0yY3CwgLzAiyK0/cwb0epSpTSyZEmTKXA3rezxxC7ASSsnD34uH1/w==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@~0.2.1", + "jsr:@denotest/multiple-exports@0.2.0", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/bin@0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1" + ] + } +} diff --git a/tests/specs/update/deno_json/update_compatible/update.out b/tests/specs/update/deno_json/update_compatible/update.out new file mode 100644 index 00000000000000..17c5358fe650d5 --- /dev/null +++ b/tests/specs/update/deno_json/update_compatible/update.out @@ -0,0 +1,7 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/add/0.2.1/mod.ts +Download http://localhost:4260/@denotest/has-patch-versions/0.1.1.tgz +[UNORDERED_END] +Updated 2 dependencies: + - jsr:@denotest/add 0.2.0 -> 0.2.1 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.1.1 diff --git a/tests/specs/update/deno_json/update_latest/deno.json.out b/tests/specs/update/deno_json/update_latest/deno.json.out new file mode 100644 index 00000000000000..5e4e99bd66f1e2 --- /dev/null +++ b/tests/specs/update/deno_json/update_latest/deno.json.out @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@^1.0.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@^2.0.0", + "@denotest/bin": "npm:@denotest/bin@^1.0.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.2.0" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@^1.0.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/update_latest/deno.lock.out b/tests/specs/update/deno_json/update_latest/deno.lock.out new file mode 100644 index 00000000000000..ad83546ab194b3 --- /dev/null +++ b/tests/specs/update/deno_json/update_latest/deno.lock.out @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@1": "1.0.0", + "jsr:@denotest/multiple-exports@1": "1.0.0", + "jsr:@denotest/subtract@1": "1.0.0", + "npm:@denotest/bin@1": "1.0.0", + "npm:@denotest/breaking-change-between-versions@2": "2.0.0", + "npm:@denotest/has-patch-versions@0.2": "0.2.0" + }, + "jsr": { + "@denotest/add@1.0.0": { + "integrity": "3b2e675c1ad7fba2a45bc251992e01aff08a3c974ac09079b11e6a5b95d4bfcb" + }, + "@denotest/multiple-exports@1.0.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@1.0.0": { + "integrity": "e178a7101c073e93d9efa6833d5cbf83bc1bc8d509b7c2a5ecbf74265e917597" + } + }, + "npm": { + "@denotest/bin@1.0.0": { + "integrity": "sha512-ZtrWnYYPIzw4a9H1uNeZRZRWuLCpHZZU/SllIyFLqcTLH/3zdRI8UH4Z1Kf+8N++bWGO3fg8Ev4vvS1LoLlidg==" + }, + "@denotest/breaking-change-between-versions@2.0.0": { + "integrity": "sha512-3eQpPhhJYbSHaAmpgyVT8IM3+MkxcAQl90Uw8zmuTiFs64Wt3HGzSz74cwPlvfqqesRktm8fBZMmrtxVo3ENzw==" + }, + "@denotest/has-patch-versions@0.2.0": { + "integrity": "sha512-7XIVGrBMyqnts5/wcc7dn7rVl4IWrCiGUT2GLDSLWnogOMIZBapJJLW9n8Leq1bDTJ3U6aDTEFKz9fVSOwZfLQ==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@1", + "jsr:@denotest/multiple-exports@1", + "jsr:@denotest/subtract@1", + "npm:@denotest/bin@1", + "npm:@denotest/breaking-change-between-versions@2", + "npm:@denotest/has-patch-versions@0.2" + ] + } +} diff --git a/tests/specs/update/deno_json/update_latest/update.out b/tests/specs/update/deno_json/update_latest/update.out new file mode 100644 index 00000000000000..35e1ef9fe5dacb --- /dev/null +++ b/tests/specs/update/deno_json/update_latest/update.out @@ -0,0 +1,16 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +[UNORDERED_END] +Updated 6 dependencies: + - jsr:@denotest/add 0.2.0 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 1.0.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/mixed_workspace/__test__.jsonc b/tests/specs/update/mixed_workspace/__test__.jsonc new file mode 100644 index 00000000000000..8c846467d47894 --- /dev/null +++ b/tests/specs/update/mixed_workspace/__test__.jsonc @@ -0,0 +1,153 @@ +{ + "tempDir": true, + "tests": { + // just to make sure install doesn't change the lockfile + "sanity_lockfile_up_to_date": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": [ + "eval", + "const now = Deno.readTextFileSync('./deno.lock'); console.log(now.trim());" + ], + "output": "deno.lock.orig.out" + } + ] + }, + "print_outdated_root": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "print_outdated/root.out" + } + ] + }, + "print_outdated_recursive": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --recursive", + "output": "print_outdated/recursive.out" + } + ] + }, + "print_outdated_subdir": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "cwd": "member-a", + "args": "outdated", + "output": "print_outdated/member_a.out" + }, + { + "cwd": "member-b", + "args": "outdated", + "output": "print_outdated/member_b.out" + } + ] + }, + "update_latest_root": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest", + "output": "update_latest/root/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_latest/root/deno.json.out" + } + ] + }, + "update_latest_subdir": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "cwd": "member-a", + "args": "outdated --update --latest", + "output": "update_latest/subdir/member_a.out" + }, + { + "args": "-A print_file.ts ./member-a/deno.json", + "output": "update_latest/subdir/member_a_deno.json.out" + }, + { + "cwd": "member-b", + "args": "outdated --update --latest", + "output": "update_latest/subdir/member_b.out" + }, + { + "args": "-A print_file.ts ./member-b/package.json", + "output": "update_latest/subdir/member_b_package.json.out" + } + ] + }, + "update_latest_recursive": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest --recursive", + "output": "update_latest/recursive/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "update_latest/root/deno.json.out" + }, + { + "args": "-A print_file.ts ./member-a/deno.json", + "output": "update_latest/subdir/member_a_deno.json.out" + }, + { + "args": "-A print_file.ts ./member-b/package.json", + "output": "update_latest/subdir/member_b_package.json.out" + } + ] + }, + "update_filtered": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest --recursive @denotest/add @denotest/sub* !@denotest/breaking* aliased @denotest/with-subpath@0.5.0", + "output": "filtered/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_latest/root/deno.json.out" + }, + { + "args": "-A print_file.ts ./member-a/deno.json", + "output": "./filtered/member_a_deno.json.out" + }, + { + "args": "-A print_file.ts ./member-b/package.json", + "output": "./filtered/member_b_package.json.out" + } + ] + } + } +} diff --git a/tests/specs/update/mixed_workspace/deno.json b/tests/specs/update/mixed_workspace/deno.json new file mode 100644 index 00000000000000..e4034d3a31f0e9 --- /dev/null +++ b/tests/specs/update/mixed_workspace/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": ["./member-a", "./member-b"], + "imports": { + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0" + } +} diff --git a/tests/specs/update/mixed_workspace/deno.lock b/tests/specs/update/mixed_workspace/deno.lock new file mode 100644 index 00000000000000..23613ce58dfb2f --- /dev/null +++ b/tests/specs/update/mixed_workspace/deno.lock @@ -0,0 +1,55 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.1", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1.0": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.1": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/subtract@0.2" + ], + "members": { + "member-a": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "npm:@denotest/breaking-change-between-versions@1.0.0" + ] + }, + "member-b": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6.0", + "npm:@denotest/has-patch-versions@0.1.0" + ] + } + } + } + } +} diff --git a/tests/specs/update/mixed_workspace/deno.lock.orig.out b/tests/specs/update/mixed_workspace/deno.lock.orig.out new file mode 100644 index 00000000000000..23613ce58dfb2f --- /dev/null +++ b/tests/specs/update/mixed_workspace/deno.lock.orig.out @@ -0,0 +1,55 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.1", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1.0": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.1": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/subtract@0.2" + ], + "members": { + "member-a": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "npm:@denotest/breaking-change-between-versions@1.0.0" + ] + }, + "member-b": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6.0", + "npm:@denotest/has-patch-versions@0.1.0" + ] + } + } + } + } +} diff --git a/tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out b/tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out new file mode 100644 index 00000000000000..2b622efee554c2 --- /dev/null +++ b/tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out @@ -0,0 +1,10 @@ +{ + "name": "@denotest/member-a", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.5.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/filtered/member_b_package.json.out b/tests/specs/update/mixed_workspace/filtered/member_b_package.json.out new file mode 100644 index 00000000000000..7e582feeabb116 --- /dev/null +++ b/tests/specs/update/mixed_workspace/filtered/member_b_package.json.out @@ -0,0 +1,8 @@ +{ + "name": "@denotest/member-b", + "version": "0.1.0", + "dependencies": { + "@denotest/has-patch-versions": "0.1.0", + "aliased": "npm:@denotest/bin@^1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/filtered/update.out b/tests/specs/update/mixed_workspace/filtered/update.out new file mode 100644 index 00000000000000..26543e51676186 --- /dev/null +++ b/tests/specs/update/mixed_workspace/filtered/update.out @@ -0,0 +1,12 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0/data.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +[UNORDERED_END] +Updated 4 dependencies: + - jsr:@denotest/add 0.2.1 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 0.5.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 diff --git a/tests/specs/update/mixed_workspace/member-a/deno.json b/tests/specs/update/mixed_workspace/member-a/deno.json new file mode 100644 index 00000000000000..0340d3bb920117 --- /dev/null +++ b/tests/specs/update/mixed_workspace/member-a/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@denotest/member-a", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/add/": "jsr:/@denotest/add@^0.2.0/", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/member-a/mod.ts b/tests/specs/update/mixed_workspace/member-a/mod.ts new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/update/mixed_workspace/member-b/package.json b/tests/specs/update/mixed_workspace/member-b/package.json new file mode 100644 index 00000000000000..0f9929a478c962 --- /dev/null +++ b/tests/specs/update/mixed_workspace/member-b/package.json @@ -0,0 +1,8 @@ +{ + "name": "@denotest/member-b", + "version": "0.1.0", + "dependencies": { + "@denotest/has-patch-versions": "0.1.0", + "aliased": "npm:@denotest/bin@0.6.0" + } +} diff --git a/tests/specs/update/mixed_workspace/print_file.ts b/tests/specs/update/mixed_workspace/print_file.ts new file mode 100644 index 00000000000000..c57b6c3a4e56f3 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_file.ts @@ -0,0 +1,2 @@ +const file = Deno.args[0]; +console.log(Deno.readTextFileSync(file).trim()); diff --git a/tests/specs/update/mixed_workspace/print_outdated/member_a.out b/tests/specs/update/mixed_workspace/print_outdated/member_a.out new file mode 100644 index 00000000000000..8699aac2bfbfa2 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/member_a.out @@ -0,0 +1,9 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/add │ 0.2.1 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/mixed_workspace/print_outdated/member_b.out b/tests/specs/update/mixed_workspace/print_outdated/member_b.out new file mode 100644 index 00000000000000..fc8ef320a8dc14 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/member_b.out @@ -0,0 +1,7 @@ +┌──────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├──────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.0 │ 0.2.0 │ +├──────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +└──────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/mixed_workspace/print_outdated/recursive.out b/tests/specs/update/mixed_workspace/print_outdated/recursive.out new file mode 100644 index 00000000000000..ca03776a9ca3a4 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/recursive.out @@ -0,0 +1,15 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/add │ 0.2.1 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.0 │ 0.2.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/mixed_workspace/print_outdated/root.out b/tests/specs/update/mixed_workspace/print_outdated/root.out new file mode 100644 index 00000000000000..c7934edc79fa66 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/root.out @@ -0,0 +1,5 @@ +┌────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────┌─────────┌────────┌───────── +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +└────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/mixed_workspace/update_latest/recursive/update.out b/tests/specs/update/mixed_workspace/update_latest/recursive/update.out new file mode 100644 index 00000000000000..ef6e36ded5e732 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/recursive/update.out @@ -0,0 +1,16 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +[UNORDERED_END] +Updated 6 dependencies: + - jsr:@denotest/add 0.2.1 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 1.0.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/root/deno.json.out b/tests/specs/update/mixed_workspace/update_latest/root/deno.json.out new file mode 100644 index 00000000000000..0317e6c39f66e6 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/root/deno.json.out @@ -0,0 +1,6 @@ +{ + "workspace": ["./member-a", "./member-b"], + "imports": { + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/update_latest/root/update.out b/tests/specs/update/mixed_workspace/update_latest/root/update.out new file mode 100644 index 00000000000000..15d21621e8604c --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/root/update.out @@ -0,0 +1,3 @@ +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Updated 1 dependency: + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out new file mode 100644 index 00000000000000..f16e0b7f2a940a --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +[UNORDERED_END] +Updated 3 dependencies: + - jsr:@denotest/add 0.2.1 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out new file mode 100644 index 00000000000000..9210123b828976 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out @@ -0,0 +1,10 @@ +{ + "name": "@denotest/member-a", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@^1.0.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@^2.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out new file mode 100644 index 00000000000000..5ca3297e20ee84 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out @@ -0,0 +1,7 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +[UNORDERED_END] +Updated 2 dependencies: + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out new file mode 100644 index 00000000000000..1426fcd7f8114f --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out @@ -0,0 +1,8 @@ +{ + "name": "@denotest/member-b", + "version": "0.1.0", + "dependencies": { + "@denotest/has-patch-versions": "^0.2.0", + "aliased": "npm:@denotest/bin@^1.0.0" + } +} diff --git a/tests/specs/update/package_json/__test__.jsonc b/tests/specs/update/package_json/__test__.jsonc new file mode 100644 index 00000000000000..19d576dfc00194 --- /dev/null +++ b/tests/specs/update/package_json/__test__.jsonc @@ -0,0 +1,100 @@ +{ + "tempDir": true, + "tests": { + "sanity_lockfile_up_to_date": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": [ + "eval", + "const now = Deno.readTextFileSync('./deno.lock'); console.log(now.trim());" + ], + "output": "deno.lock.orig.out" + } + ] + }, + "print_outdated": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "outdated.out" + } + ] + }, + "print_outdated_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --compatible", + "output": "outdated_compatible.out" + } + ] + }, + "update_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update", + "output": "./update_compatible/update.out" + }, + { + "args": "-A ./print_file.ts ./package.json", + "output": "./update_compatible/package.json.out" + }, + { + "args": "-A ./print_file.ts ./deno.lock", + "output": "./update_compatible/deno.lock.out" + } + ] + }, + "update_latest": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest", + "output": "update_latest/update.out" + }, + { + "args": "-A ./print_file.ts ./package.json", + "output": "update_latest/package.json.out" + }, + { + "args": "-A ./print_file.ts ./deno.lock", + "output": "update_latest/deno.lock.out" + } + ] + }, + "update_filtered": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest @denotest/has-patch* aliased@0.7.0", + "output": "filtered/update.out" + }, + { + "args": "-A print_file.ts ./package.json", + "output": "filtered/package.json.out" + } + ] + } + } +} diff --git a/tests/specs/update/package_json/deno.lock b/tests/specs/update/package_json/deno.lock new file mode 100644 index 00000000000000..05253094db79a0 --- /dev/null +++ b/tests/specs/update/package_json/deno.lock @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@0.6": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } + } +} diff --git a/tests/specs/update/package_json/deno.lock.orig.out b/tests/specs/update/package_json/deno.lock.orig.out new file mode 100644 index 00000000000000..05253094db79a0 --- /dev/null +++ b/tests/specs/update/package_json/deno.lock.orig.out @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@0.6": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } + } +} diff --git a/tests/specs/update/package_json/filtered/package.json.out b/tests/specs/update/package_json/filtered/package.json.out new file mode 100644 index 00000000000000..39faff22d668ce --- /dev/null +++ b/tests/specs/update/package_json/filtered/package.json.out @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.2.0", + "@denotest/breaking-change-between-versions": "1.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@0.7.0" + } +} diff --git a/tests/specs/update/package_json/filtered/update.out b/tests/specs/update/package_json/filtered/update.out new file mode 100644 index 00000000000000..3093281f10fb84 --- /dev/null +++ b/tests/specs/update/package_json/filtered/update.out @@ -0,0 +1,9 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/0.7.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Initialize @denotest/has-patch-versions@0.2.0 +Initialize @denotest/bin@0.7.0 +[UNORDERED_END] +Updated 2 dependencies: + - npm:@denotest/bin 0.6.0 -> 0.7.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/package_json/outdated.out b/tests/specs/update/package_json/outdated.out new file mode 100644 index 00000000000000..d672aace7f08ad --- /dev/null +++ b/tests/specs/update/package_json/outdated.out @@ -0,0 +1,9 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/package_json/outdated_compatible.out b/tests/specs/update/package_json/outdated_compatible.out new file mode 100644 index 00000000000000..8a682c461cbb51 --- /dev/null +++ b/tests/specs/update/package_json/outdated_compatible.out @@ -0,0 +1,5 @@ +┌──────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├──────────────────────────────────┌─────────┌────────┌───────── +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +└──────────────────────────────────┮─────────┮────────┮────────┘ diff --git a/tests/specs/update/package_json/package.json b/tests/specs/update/package_json/package.json new file mode 100644 index 00000000000000..9cd8cf59dcd60a --- /dev/null +++ b/tests/specs/update/package_json/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.1.0", + "@denotest/breaking-change-between-versions": "1.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@^0.6.0" + } +} diff --git a/tests/specs/update/package_json/print_file.ts b/tests/specs/update/package_json/print_file.ts new file mode 100644 index 00000000000000..c57b6c3a4e56f3 --- /dev/null +++ b/tests/specs/update/package_json/print_file.ts @@ -0,0 +1,2 @@ +const file = Deno.args[0]; +console.log(Deno.readTextFileSync(file).trim()); diff --git a/tests/specs/update/package_json/update_compatible/deno.lock.out b/tests/specs/update/package_json/update_compatible/deno.lock.out new file mode 100644 index 00000000000000..f82a21ee46c785 --- /dev/null +++ b/tests/specs/update/package_json/update_compatible/deno.lock.out @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@0.6": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1": "0.1.1" + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.1": { + "integrity": "sha512-slUqYhu6DrPiSdNzmW5aMdW2/osIYnDP0yY3CwgLzAiyK0/cwb0epSpTSyZEmTKXA3rezxxC7ASSsnD34uH1/w==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1" + ] + } + } +} diff --git a/tests/specs/update/package_json/update_compatible/package.json.out b/tests/specs/update/package_json/update_compatible/package.json.out new file mode 100644 index 00000000000000..6f822ee5d61457 --- /dev/null +++ b/tests/specs/update/package_json/update_compatible/package.json.out @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.1.1", + "@denotest/breaking-change-between-versions": "1.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@^0.6.0" + } +} diff --git a/tests/specs/update/package_json/update_compatible/update.out b/tests/specs/update/package_json/update_compatible/update.out new file mode 100644 index 00000000000000..4c3c740791992a --- /dev/null +++ b/tests/specs/update/package_json/update_compatible/update.out @@ -0,0 +1,4 @@ +Download http://localhost:4260/@denotest/has-patch-versions/0.1.1.tgz +Initialize @denotest/has-patch-versions@0.1.1 +Updated 1 dependency: + - npm:@denotest/has-patch-versions 0.1.0 -> 0.1.1 diff --git a/tests/specs/update/package_json/update_latest/deno.lock.out b/tests/specs/update/package_json/update_latest/deno.lock.out new file mode 100644 index 00000000000000..9a9b1bad5ebcbc --- /dev/null +++ b/tests/specs/update/package_json/update_latest/deno.lock.out @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@1": "1.0.0", + "npm:@denotest/breaking-change-between-versions@2": "2.0.0", + "npm:@denotest/has-patch-versions@0.2": "0.2.0" + }, + "npm": { + "@denotest/bin@1.0.0": { + "integrity": "sha512-ZtrWnYYPIzw4a9H1uNeZRZRWuLCpHZZU/SllIyFLqcTLH/3zdRI8UH4Z1Kf+8N++bWGO3fg8Ev4vvS1LoLlidg==" + }, + "@denotest/breaking-change-between-versions@2.0.0": { + "integrity": "sha512-3eQpPhhJYbSHaAmpgyVT8IM3+MkxcAQl90Uw8zmuTiFs64Wt3HGzSz74cwPlvfqqesRktm8fBZMmrtxVo3ENzw==" + }, + "@denotest/has-patch-versions@0.2.0": { + "integrity": "sha512-7XIVGrBMyqnts5/wcc7dn7rVl4IWrCiGUT2GLDSLWnogOMIZBapJJLW9n8Leq1bDTJ3U6aDTEFKz9fVSOwZfLQ==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@1", + "npm:@denotest/breaking-change-between-versions@2", + "npm:@denotest/has-patch-versions@0.2" + ] + } + } +} diff --git a/tests/specs/update/package_json/update_latest/package.json.out b/tests/specs/update/package_json/update_latest/package.json.out new file mode 100644 index 00000000000000..fb483d78bd7cdf --- /dev/null +++ b/tests/specs/update/package_json/update_latest/package.json.out @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.2.0", + "@denotest/breaking-change-between-versions": "^2.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@^1.0.0" + } +} diff --git a/tests/specs/update/package_json/update_latest/update.out b/tests/specs/update/package_json/update_latest/update.out new file mode 100644 index 00000000000000..a24ae1e32b36cf --- /dev/null +++ b/tests/specs/update/package_json/update_latest/update.out @@ -0,0 +1,14 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +Initialize @denotest/has-patch-versions@0.2.0 +Initialize @denotest/breaking-change-between-versions@2.0.0 +Initialize @denotest/bin@1.0.0 +[UNORDERED_END] +Updated 3 dependencies: +[UNORDERED_START] + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 +[UNORDERED_END] diff --git a/tests/util/server/src/npm.rs b/tests/util/server/src/npm.rs index 31686fa8543dfb..081989ddb5fed1 100644 --- a/tests/util/server/src/npm.rs +++ b/tests/util/server/src/npm.rs @@ -2,6 +2,7 @@ use std::collections::HashMap; use std::fs; +use std::path::Path; use anyhow::Context; use anyhow::Result; @@ -189,6 +190,60 @@ impl TestNpmRegistry { } } +// NOTE: extracted out partially from the `tar` crate, all credits to the original authors +fn append_dir_all( + builder: &mut tar::Builder, + path: &Path, + src_path: &Path, +) -> Result<()> { + builder.follow_symlinks(true); + let mode = tar::HeaderMode::Deterministic; + builder.mode(mode); + let mut stack = vec![(src_path.to_path_buf(), true, false)]; + let mut entries = Vec::new(); + while let Some((src, is_dir, is_symlink)) = stack.pop() { + let dest = path.join(src.strip_prefix(src_path).unwrap()); + // In case of a symlink pointing to a directory, is_dir is false, but src.is_dir() will return true + if is_dir || (is_symlink && src.is_dir()) { + for entry in fs::read_dir(&src)? { + let entry = entry?; + let file_type = entry.file_type()?; + stack.push((entry.path(), file_type.is_dir(), file_type.is_symlink())); + } + if dest != Path::new("") { + entries.push((src, dest)); + } + } else { + entries.push((src, dest)); + } + } + entries.sort_by(|(_, a), (_, b)| a.cmp(b)); + for (src, dest) in entries { + let mut header = tar::Header::new_gnu(); + let metadata = src.metadata().with_context(|| { + format!("trying to get metadata for {}", src.display()) + })?; + header.set_metadata_in_mode(&metadata, mode); + // this is what `tar` sets the mtime to on unix in deterministic mode, on windows it uses a different + // value, which causes the tarball to have a different hash on windows. force it to be the same + // to ensure the same output on all platforms + header.set_mtime(1153704088); + + let data = if src.is_file() { + Box::new( + fs::File::open(&src) + .with_context(|| format!("trying to open file {}", src.display()))?, + ) as Box + } else { + Box::new(std::io::empty()) as Box + }; + builder + .append_data(&mut header, dest, data) + .with_context(|| "appending data")?; + } + Ok(()) +} + fn get_npm_package( registry_hostname: &str, local_path: &str, @@ -228,11 +283,14 @@ fn get_npm_package( GzEncoder::new(&mut tarball_bytes, Compression::default()); { let mut builder = Builder::new(&mut encoder); - builder - .append_dir_all("package", &version_folder) - .with_context(|| { - format!("Error adding tarball for directory: {}", version_folder) - })?; + append_dir_all( + &mut builder, + Path::new("package"), + version_folder.as_path(), + ) + .with_context(|| { + format!("Error adding tarball for directory {}", version_folder,) + })?; builder.finish()?; } encoder.finish()?; From b729bf0ad9a2711b9740b30dcf78d826fbc76349 Mon Sep 17 00:00:00 2001 From: Yazan AbdAl-Rahman Date: Thu, 21 Nov 2024 01:30:43 +0200 Subject: [PATCH 367/436] feat(permission): support suffix wildcards in `--allow-env` flag (#25255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds support for suffix wildcard for `--allow-env` flag. Specifying flag like `--allow-env=DENO_*` will enable access to all environmental variables starting with `DENO_*`. Closes #24847 --------- Co-authored-by: Bartek IwaƄczuk Co-authored-by: David Sherret --- runtime/permissions/lib.rs | 203 ++++++++++++++++-- .../process_env_permissions/__test__.jsonc | 26 +++ .../process_env_permissions/main.js | 5 + .../allow_env_wildcard_worker/__test__.jsonc | 10 + .../run/allow_env_wildcard_worker/main.js | 12 ++ .../run/allow_env_wildcard_worker/main.out | 11 + .../run/allow_env_wildcard_worker/worker.js | 3 + 7 files changed, 250 insertions(+), 20 deletions(-) create mode 100644 tests/specs/permission/process_env_permissions/__test__.jsonc create mode 100644 tests/specs/permission/process_env_permissions/main.js create mode 100644 tests/specs/run/allow_env_wildcard_worker/__test__.jsonc create mode 100644 tests/specs/run/allow_env_wildcard_worker/main.js create mode 100644 tests/specs/run/allow_env_wildcard_worker/main.out create mode 100644 tests/specs/run/allow_env_wildcard_worker/worker.js diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index 71ef7d22899be9..a0b901d200a128 100644 --- a/runtime/permissions/lib.rs +++ b/runtime/permissions/lib.rs @@ -294,7 +294,7 @@ impl UnitPermission { /// A normalized environment variable name. On Windows this will /// be uppercase and on other platforms it will stay as-is. #[derive(Clone, Eq, PartialEq, Hash, Debug)] -struct EnvVarName { +pub struct EnvVarName { inner: String, } @@ -1114,15 +1114,37 @@ impl ImportDescriptor { pub struct EnvDescriptorParseError; #[derive(Clone, Eq, PartialEq, Hash, Debug)] -pub struct EnvDescriptor(EnvVarName); +pub enum EnvDescriptor { + Name(EnvVarName), + PrefixPattern(EnvVarName), +} impl EnvDescriptor { pub fn new(env: impl AsRef) -> Self { - Self(EnvVarName::new(env)) + if let Some(prefix_pattern) = env.as_ref().strip_suffix('*') { + Self::PrefixPattern(EnvVarName::new(prefix_pattern)) + } else { + Self::Name(EnvVarName::new(env)) + } + } +} + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +enum EnvQueryDescriptorInner { + Name(EnvVarName), + PrefixPattern(EnvVarName), +} + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +pub struct EnvQueryDescriptor(EnvQueryDescriptorInner); + +impl EnvQueryDescriptor { + pub fn new(env: impl AsRef) -> Self { + Self(EnvQueryDescriptorInner::Name(EnvVarName::new(env))) } } -impl QueryDescriptor for EnvDescriptor { +impl QueryDescriptor for EnvQueryDescriptor { type AllowDesc = EnvDescriptor; type DenyDesc = EnvDescriptor; @@ -1131,19 +1153,45 @@ impl QueryDescriptor for EnvDescriptor { } fn display_name(&self) -> Cow { - Cow::from(self.0.as_ref()) + Cow::from(match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => env_var_name.as_ref(), + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref() + } + }) } fn from_allow(allow: &Self::AllowDesc) -> Self { - allow.clone() + match allow { + Self::AllowDesc::Name(s) => { + Self(EnvQueryDescriptorInner::Name(s.clone())) + } + Self::AllowDesc::PrefixPattern(s) => { + Self(EnvQueryDescriptorInner::PrefixPattern(s.clone())) + } + } } fn as_allow(&self) -> Option { - Some(self.clone()) + Some(match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + Self::AllowDesc::Name(env_var_name.clone()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + Self::AllowDesc::PrefixPattern(env_var_name.clone()) + } + }) } fn as_deny(&self) -> Self::DenyDesc { - self.clone() + match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + Self::DenyDesc::Name(env_var_name.clone()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + Self::DenyDesc::PrefixPattern(env_var_name.clone()) + } + } } fn check_in_permission( @@ -1156,19 +1204,79 @@ impl QueryDescriptor for EnvDescriptor { } fn matches_allow(&self, other: &Self::AllowDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + }, + } } fn matches_deny(&self, other: &Self::DenyDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + p == env_var_name + } + }, + } } fn revokes(&self, other: &Self::AllowDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + p == env_var_name + } + }, + } } fn stronger_than_deny(&self, other: &Self::DenyDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + p == env_var_name + } + }, + } } fn overlaps_deny(&self, _other: &Self::DenyDesc) -> bool { @@ -1176,9 +1284,14 @@ impl QueryDescriptor for EnvDescriptor { } } -impl AsRef for EnvDescriptor { +impl AsRef for EnvQueryDescriptor { fn as_ref(&self) -> &str { - self.0.as_ref() + match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => env_var_name.as_ref(), + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref() + } + } } } @@ -1749,20 +1862,20 @@ impl UnaryPermission { } } -impl UnaryPermission { +impl UnaryPermission { pub fn query(&self, env: Option<&str>) -> PermissionState { self.query_desc( - env.map(EnvDescriptor::new).as_ref(), + env.map(EnvQueryDescriptor::new).as_ref(), AllowPartial::TreatAsPartialGranted, ) } pub fn request(&mut self, env: Option<&str>) -> PermissionState { - self.request_desc(env.map(EnvDescriptor::new).as_ref()) + self.request_desc(env.map(EnvQueryDescriptor::new).as_ref()) } pub fn revoke(&mut self, env: Option<&str>) -> PermissionState { - self.revoke_desc(env.map(EnvDescriptor::new).as_ref()) + self.revoke_desc(env.map(EnvQueryDescriptor::new).as_ref()) } pub fn check( @@ -1771,7 +1884,7 @@ impl UnaryPermission { api_name: Option<&str>, ) -> Result<(), PermissionDeniedError> { skip_check_if_is_permission_fully_granted!(self); - self.check_desc(Some(&EnvDescriptor::new(env)), false, api_name) + self.check_desc(Some(&EnvQueryDescriptor::new(env)), false, api_name) } pub fn check_all(&mut self) -> Result<(), PermissionDeniedError> { @@ -1905,7 +2018,7 @@ pub struct Permissions { pub read: UnaryPermission, pub write: UnaryPermission, pub net: UnaryPermission, - pub env: UnaryPermission, + pub env: UnaryPermission, pub sys: UnaryPermission, pub run: UnaryPermission, pub ffi: UnaryPermission, @@ -4564,6 +4677,56 @@ mod tests { assert_eq!(perms.env.revoke(Some("HomE")), PermissionState::Prompt); } + #[test] + fn test_env_wildcards() { + set_prompter(Box::new(TestPrompter)); + let _prompt_value = PERMISSION_PROMPT_STUB_VALUE_SETTER.lock(); + let mut perms = Permissions::allow_all(); + perms.env = UnaryPermission { + granted_global: false, + ..Permissions::new_unary( + Some(HashSet::from([EnvDescriptor::new("HOME_*")])), + None, + false, + ) + }; + assert_eq!(perms.env.query(Some("HOME")), PermissionState::Prompt); + assert_eq!(perms.env.query(Some("HOME_")), PermissionState::Granted); + assert_eq!(perms.env.query(Some("HOME_TEST")), PermissionState::Granted); + + // assert no privilege escalation + let parser = TestPermissionDescriptorParser; + assert!(perms + .env + .create_child_permissions( + ChildUnaryPermissionArg::GrantedList(vec!["HOME_SUB".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_ok()); + assert!(perms + .env + .create_child_permissions( + ChildUnaryPermissionArg::GrantedList(vec!["HOME*".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_err()); + assert!(perms + .env + .create_child_permissions( + ChildUnaryPermissionArg::GrantedList(vec!["OUTSIDE".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_err()); + assert!(perms + .env + .create_child_permissions( + // ok because this is a subset of HOME_* + ChildUnaryPermissionArg::GrantedList(vec!["HOME_S*".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_ok()); + } + #[test] fn test_check_partial_denied() { let parser = TestPermissionDescriptorParser; diff --git a/tests/specs/permission/process_env_permissions/__test__.jsonc b/tests/specs/permission/process_env_permissions/__test__.jsonc new file mode 100644 index 00000000000000..d3c756e0dc7570 --- /dev/null +++ b/tests/specs/permission/process_env_permissions/__test__.jsonc @@ -0,0 +1,26 @@ +{ + "tempDir": true, + "tests": { + "deno_env_wildcard_tests": { + "envs": { + "MYAPP_HELLO": "Hello\tworld,", + "MYAPP_GOODBYE": "farewell", + "OTHER_VAR": "ignore" + }, + "steps": [ + { + "args": "run --allow-env=MYAPP_* main.js", + "output": "Hello\tworld,\nfarewell\ndone\n" + }, + { + "args": "run --allow-env main.js", + "output": "Hello\tworld,\nfarewell\ndone\n" + }, + { + "args": "run --allow-env=MYAPP_HELLO,MYAPP_GOODBYE,MYAPP_TEST,MYAPP_DONE main.js", + "output": "Hello\tworld,\nfarewell\ndone\n" + } + ] + } + } +} diff --git a/tests/specs/permission/process_env_permissions/main.js b/tests/specs/permission/process_env_permissions/main.js new file mode 100644 index 00000000000000..7a412659c9a314 --- /dev/null +++ b/tests/specs/permission/process_env_permissions/main.js @@ -0,0 +1,5 @@ +console.log(Deno.env.get("MYAPP_HELLO")); +console.log(Deno.env.get("MYAPP_GOODBYE")); +Deno.env.set("MYAPP_TEST", "done"); +Deno.env.set("MYAPP_DONE", "done"); +console.log(Deno.env.get("MYAPP_DONE")); diff --git a/tests/specs/run/allow_env_wildcard_worker/__test__.jsonc b/tests/specs/run/allow_env_wildcard_worker/__test__.jsonc new file mode 100644 index 00000000000000..6cfde6207f746a --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/__test__.jsonc @@ -0,0 +1,10 @@ +{ + "envs": { + "DENO_HELLO": "hello", + "DENO_BYE": "bye", + "AWS_HELLO": "aws" + }, + "args": "run --allow-env --allow-read --unstable-worker-options main.js", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/run/allow_env_wildcard_worker/main.js b/tests/specs/run/allow_env_wildcard_worker/main.js new file mode 100644 index 00000000000000..8d1a45fa61fc52 --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/main.js @@ -0,0 +1,12 @@ +console.log("main1", Deno.env.get("DENO_HELLO")); +console.log("main2", Deno.env.get("DENO_BYE")); +console.log("main3", Deno.env.get("AWS_HELLO")); + +new Worker(import.meta.resolve("./worker.js"), { + type: "module", + deno: { + permissions: { + env: ["DENO_*"], + }, + }, +}); diff --git a/tests/specs/run/allow_env_wildcard_worker/main.out b/tests/specs/run/allow_env_wildcard_worker/main.out new file mode 100644 index 00000000000000..01a7c42e398be3 --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/main.out @@ -0,0 +1,11 @@ +main1 hello +main2 bye +main3 aws +worker1 hello +worker2 bye +error: Uncaught (in worker "") (in promise) NotCapable: Requires env access to "AWS_HELLO", run again with the --allow-env flag +console.log("worker3", Deno.env.get("AWS_HELLO")); + ^ +[WILDCARD] +error: Uncaught (in promise) Error: Unhandled error in child worker. +[WILDCARD] diff --git a/tests/specs/run/allow_env_wildcard_worker/worker.js b/tests/specs/run/allow_env_wildcard_worker/worker.js new file mode 100644 index 00000000000000..0238cbf6dc7b2d --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/worker.js @@ -0,0 +1,3 @@ +console.log("worker1", Deno.env.get("DENO_HELLO")); +console.log("worker2", Deno.env.get("DENO_BYE")); +console.log("worker3", Deno.env.get("AWS_HELLO")); From f0b245c8eee563a8d52db07b25a72d7382c2620b Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 21 Nov 2024 00:35:12 +0100 Subject: [PATCH 368/436] feat(task): workspace support with --filter and --recursive (#26949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds workspace support to "deno taks". Two new flags were added: - "--recursive" - allows to run a specified task in workspace members, eg. "deno task --recursive dev" - "--filter" - allows to run a specified task only in specific workspace members, eg. "deno task --recursive --filter 'client/*' dev" "--filter" flag implies "--recursive" flag. Closes https://github.com/denoland/deno/issues/24991 --------- Signed-off-by: Bartek IwaƄczuk Signed-off-by: David Sherret Co-authored-by: Bartek IwaƄczuk Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Co-authored-by: David Sherret Co-authored-by: David Sherret --- Cargo.lock | 4 +- Cargo.toml | 2 +- cli/args/flags.rs | 97 +++++- cli/main.rs | 2 + cli/tools/task.rs | 277 +++++++++++++----- .../__test__.jsonc | 5 + .../deno_json_lifecycle_script_names/bin.out | 2 + .../deno.jsonc | 7 + .../package.json | 5 + tests/specs/task/filter/__test__.jsonc | 59 ++++ tests/specs/task/filter/deno/bar/deno.json | 7 + tests/specs/task/filter/deno/deno.json | 6 + tests/specs/task/filter/deno/foo/deno.json | 7 + tests/specs/task/filter/deno_all.out | 4 + tests/specs/task/filter/deno_exact.out | 2 + tests/specs/task/filter/deno_multi.out | 0 tests/specs/task/filter/deno_scoped/deno.json | 3 + .../task/filter/deno_scoped/foo_bar/deno.json | 7 + .../task/filter/deno_scoped/foo_baz/deno.json | 7 + tests/specs/task/filter/deno_scoped_exact.out | 2 + tests/specs/task/filter/deno_scoped_multi.out | 4 + .../task/filter/deno_workspace_order.out | 4 + .../filter/deno_workspace_order/deno.json | 6 + .../deno_workspace_order/foo_bar/deno.json | 7 + .../deno_workspace_order/foo_baz/deno.json | 10 + tests/specs/task/filter/npm/bar/package.json | 6 + tests/specs/task/filter/npm/foo/package.json | 6 + tests/specs/task/filter/npm/package.json | 3 + tests/specs/task/filter/npm_all.out | 4 + tests/specs/task/filter/npm_exact.out | 2 + tests/specs/task/filter/npm_multi.out | 4 + .../filter/npm_multi/multi-a/package.json | 6 + .../filter/npm_multi/multi-b/package.json | 6 + .../specs/task/filter/npm_multi/package.json | 3 + .../filter/npm_scoped/foo_bar/package.json | 6 + .../filter/npm_scoped/foo_baz/package.json | 6 + .../specs/task/filter/npm_scoped/package.json | 3 + tests/specs/task/filter/npm_scoped_exact.out | 2 + tests/specs/task/filter/npm_scoped_multi.out | 4 + .../specs/task/filter/npm_workspace_order.out | 4 + .../npm_workspace_order/foo_bar/package.json | 6 + .../npm_workspace_order/foo_baz/package.json | 9 + .../filter/npm_workspace_order/package.json | 3 + 43 files changed, 541 insertions(+), 78 deletions(-) create mode 100644 tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc create mode 100644 tests/specs/task/deno_json_lifecycle_script_names/bin.out create mode 100644 tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc create mode 100644 tests/specs/task/deno_json_lifecycle_script_names/package.json create mode 100644 tests/specs/task/filter/__test__.jsonc create mode 100644 tests/specs/task/filter/deno/bar/deno.json create mode 100644 tests/specs/task/filter/deno/deno.json create mode 100644 tests/specs/task/filter/deno/foo/deno.json create mode 100644 tests/specs/task/filter/deno_all.out create mode 100644 tests/specs/task/filter/deno_exact.out create mode 100644 tests/specs/task/filter/deno_multi.out create mode 100644 tests/specs/task/filter/deno_scoped/deno.json create mode 100644 tests/specs/task/filter/deno_scoped/foo_bar/deno.json create mode 100644 tests/specs/task/filter/deno_scoped/foo_baz/deno.json create mode 100644 tests/specs/task/filter/deno_scoped_exact.out create mode 100644 tests/specs/task/filter/deno_scoped_multi.out create mode 100644 tests/specs/task/filter/deno_workspace_order.out create mode 100644 tests/specs/task/filter/deno_workspace_order/deno.json create mode 100644 tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json create mode 100644 tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json create mode 100644 tests/specs/task/filter/npm/bar/package.json create mode 100644 tests/specs/task/filter/npm/foo/package.json create mode 100644 tests/specs/task/filter/npm/package.json create mode 100644 tests/specs/task/filter/npm_all.out create mode 100644 tests/specs/task/filter/npm_exact.out create mode 100644 tests/specs/task/filter/npm_multi.out create mode 100644 tests/specs/task/filter/npm_multi/multi-a/package.json create mode 100644 tests/specs/task/filter/npm_multi/multi-b/package.json create mode 100644 tests/specs/task/filter/npm_multi/package.json create mode 100644 tests/specs/task/filter/npm_scoped/foo_bar/package.json create mode 100644 tests/specs/task/filter/npm_scoped/foo_baz/package.json create mode 100644 tests/specs/task/filter/npm_scoped/package.json create mode 100644 tests/specs/task/filter/npm_scoped_exact.out create mode 100644 tests/specs/task/filter/npm_scoped_multi.out create mode 100644 tests/specs/task/filter/npm_workspace_order.out create mode 100644 tests/specs/task/filter/npm_workspace_order/foo_bar/package.json create mode 100644 tests/specs/task/filter/npm_workspace_order/foo_baz/package.json create mode 100644 tests/specs/task/filter/npm_workspace_order/package.json diff --git a/Cargo.lock b/Cargo.lock index 8850726cec4919..2896c0e0585066 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1435,9 +1435,9 @@ dependencies = [ [[package]] name = "deno_config" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a91aa99751ebe305a7edad12a3ad751f3b3b9f5ecddbfe4a0459e3cdc8493b6" +checksum = "38fb809500238be2b10eee42944a47b3ac38974e1edbb47f73afcfca7df143bf" dependencies = [ "anyhow", "deno_package_json", diff --git a/Cargo.toml b/Cargo.toml index cf7e2610bbf774..0dfe7e8bd9d58c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ deno_ast = { version = "=0.43.3", features = ["transpiling"] } deno_core = { version = "0.321.0" } deno_bench_util = { version = "0.171.0", path = "./bench_util" } -deno_config = { version = "=0.39.1", features = ["workspace", "sync"] } +deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_npm = "=0.25.4" diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 694506557401ef..34647667285437 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -380,6 +380,8 @@ pub struct TaskFlags { pub cwd: Option, pub task: Option, pub is_run: bool, + pub recursive: bool, + pub filter: Option, pub eval: bool, } @@ -3046,13 +3048,27 @@ Evaluate a task from string .help("Specify the directory to run the task in") .value_hint(ValueHint::DirPath), ) + .arg( + Arg::new("recursive") + .long("recursive") + .short('r') + .help("Run the task in all projects in the workspace") + .action(ArgAction::SetTrue), + ) + .arg( + Arg::new("filter") + .long("filter") + .short('f') + .help("Filter members of the workspace by name - should be used with --recursive") + .value_parser(value_parser!(String)), + ) .arg( Arg::new("eval") .long("eval") .help( "Evaluate the passed value as if, it was a task in a configuration file", ).action(ArgAction::SetTrue) - ) + ) .arg(node_modules_dir_arg()) }) } @@ -5212,10 +5228,15 @@ fn task_parse( unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionAndRuntime); node_modules_arg_parse(flags, matches); + let filter = matches.remove_one::("filter"); + let recursive = matches.get_flag("recursive") || filter.is_some(); + let mut task_flags = TaskFlags { cwd: matches.remove_one::("cwd"), task: None, is_run: false, + recursive, + filter, eval: matches.get_flag("eval"), }; @@ -10418,6 +10439,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), argv: svec!["hello", "world"], @@ -10433,6 +10456,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), ..Flags::default() @@ -10447,6 +10472,56 @@ mod tests { cwd: Some("foo".to_string()), task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--filter", "*", "build"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("build".to_string()), + is_run: false, + recursive: true, + filter: Some("*".to_string()), + eval: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--recursive", "build"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("build".to_string()), + is_run: false, + recursive: true, + filter: None, + eval: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "-r", "build"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("build".to_string()), + is_run: false, + recursive: true, + filter: None, eval: false, }), ..Flags::default() @@ -10461,6 +10536,8 @@ mod tests { cwd: None, task: Some("echo 1".to_string()), is_run: false, + recursive: false, + filter: None, eval: true, }), ..Flags::default() @@ -10490,6 +10567,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), argv: svec!["--", "hello", "world"], @@ -10508,6 +10587,8 @@ mod tests { cwd: Some("foo".to_string()), task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), argv: svec!["--", "hello", "world"], @@ -10527,6 +10608,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), argv: svec!["--"], @@ -10545,6 +10628,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), argv: svec!["-1", "--test"], @@ -10563,6 +10648,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), argv: svec!["--test"], @@ -10582,6 +10669,8 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, eval: false, }), log_level: Some(log::Level::Error), @@ -10600,6 +10689,8 @@ mod tests { cwd: None, task: None, is_run: false, + recursive: false, + filter: None, eval: false, }), ..Flags::default() @@ -10617,6 +10708,8 @@ mod tests { cwd: None, task: None, is_run: false, + recursive: false, + filter: None, eval: false, }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), @@ -10635,6 +10728,8 @@ mod tests { cwd: None, task: None, is_run: false, + recursive: false, + filter: None, eval: false, }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), diff --git a/cli/main.rs b/cli/main.rs index 017e343178f68b..29f5914bbfd467 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -243,6 +243,8 @@ async fn run_subcommand(flags: Arc) -> Result { cwd: None, task: Some(run_flags.script.clone()), is_run: true, + recursive: false, + filter: None, eval: false, }; new_flags.subcommand = DenoSubcommand::Task(task_flags.clone()); diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 85145c7af78eff..b0c290adc0fcf2 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -8,6 +8,7 @@ use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; +use deno_config::workspace::FolderConfigs; use deno_config::workspace::TaskDefinition; use deno_config::workspace::TaskOrScript; use deno_config::workspace::WorkspaceDirectory; @@ -25,6 +26,7 @@ use deno_path_util::normalize_path; use deno_runtime::deno_node::NodeResolver; use deno_task_shell::ShellCommand; use indexmap::IndexMap; +use regex::Regex; use crate::args::CliOptions; use crate::args::Flags; @@ -35,6 +37,12 @@ use crate::npm::CliNpmResolver; use crate::task_runner; use crate::util::fs::canonicalize_path; +#[derive(Debug)] +struct PackageTaskInfo { + matched_tasks: Vec, + tasks_config: WorkspaceTasksConfig, +} + pub async fn execute_script( flags: Arc, task_flags: TaskFlags, @@ -55,18 +63,145 @@ pub async fn execute_script( v == "1" }) .unwrap_or(false); - let mut tasks_config = start_dir.to_tasks_config()?; - if force_use_pkg_json { - tasks_config = tasks_config.with_only_pkg_json() + + fn arg_to_regex(input: &str) -> Result { + let mut regex_str = regex::escape(input); + regex_str = regex_str.replace("\\*", ".*"); + + Regex::new(®ex_str) } - let Some(task_name) = &task_flags.task else { - print_available_tasks( - &mut std::io::stdout(), - &cli_options.start_dir, - &tasks_config, - )?; - return Ok(0); + let packages_task_configs: Vec = if let Some(filter) = + &task_flags.filter + { + let task_name = task_flags.task.as_ref().unwrap(); + + // Filter based on package name + let package_regex = arg_to_regex(filter)?; + let task_regex = arg_to_regex(task_name)?; + + let mut packages_task_info: Vec = vec![]; + + fn matches_package( + config: &FolderConfigs, + force_use_pkg_json: bool, + regex: &Regex, + ) -> bool { + if !force_use_pkg_json { + if let Some(deno_json) = &config.deno_json { + if let Some(name) = &deno_json.json.name { + if regex.is_match(name) { + return true; + } + } + } + } + + if let Some(package_json) = &config.pkg_json { + if let Some(name) = &package_json.name { + if regex.is_match(name) { + return true; + } + } + } + + false + } + + let workspace = cli_options.workspace(); + for folder in workspace.config_folders() { + if !matches_package(folder.1, force_use_pkg_json, &package_regex) { + continue; + } + + let member_dir = workspace.resolve_member_dir(folder.0); + let mut tasks_config = member_dir.to_tasks_config()?; + if force_use_pkg_json { + tasks_config = tasks_config.with_only_pkg_json(); + } + + // Any of the matched tasks could be a child task of another matched + // one. Therefore we need to filter these out to ensure that every + // task is only run once. + let mut matched: HashSet = HashSet::new(); + let mut visited: HashSet = HashSet::new(); + + fn visit_task( + tasks_config: &WorkspaceTasksConfig, + visited: &mut HashSet, + name: &str, + ) { + if visited.contains(name) { + return; + } + + visited.insert(name.to_string()); + + if let Some((_, TaskOrScript::Task(_, task))) = &tasks_config.task(name) + { + for dep in &task.dependencies { + visit_task(tasks_config, visited, dep); + } + } + } + + // Match tasks in deno.json + for name in tasks_config.task_names() { + if task_regex.is_match(name) && !visited.contains(name) { + matched.insert(name.to_string()); + visit_task(&tasks_config, &mut visited, name); + } + } + + packages_task_info.push(PackageTaskInfo { + matched_tasks: matched + .iter() + .map(|s| s.to_string()) + .collect::>(), + tasks_config, + }); + } + + // Logging every task definition would be too spammy. Pnpm only + // logs a simple message too. + if packages_task_info + .iter() + .all(|config| config.matched_tasks.is_empty()) + { + log::warn!( + "{}", + colors::red(format!( + "No matching task or script '{}' found in selected packages.", + task_name + )) + ); + return Ok(0); + } + + // FIXME: Sort packages topologically + // + + packages_task_info + } else { + let mut tasks_config = start_dir.to_tasks_config()?; + + if force_use_pkg_json { + tasks_config = tasks_config.with_only_pkg_json() + } + + let Some(task_name) = &task_flags.task else { + print_available_tasks( + &mut std::io::stdout(), + &cli_options.start_dir, + &tasks_config, + )?; + return Ok(0); + }; + + vec![PackageTaskInfo { + tasks_config, + matched_tasks: vec![task_name.to_string()], + }] }; let npm_resolver = factory.npm_resolver().await?; @@ -81,7 +216,6 @@ pub async fn execute_script( .unwrap_or_else(|| NonZeroUsize::new(2).unwrap()); let task_runner = TaskRunner { - tasks_config, task_flags: &task_flags, npm_resolver: npm_resolver.as_ref(), node_resolver: node_resolver.as_ref(), @@ -94,7 +228,7 @@ pub async fn execute_script( return task_runner .run_deno_task( &Url::from_directory_path(cli_options.initial_cwd()).unwrap(), - &"".to_string(), + "", &TaskDefinition { command: task_flags.task.as_ref().unwrap().to_string(), dependencies: vec![], @@ -103,7 +237,15 @@ pub async fn execute_script( ) .await; } - task_runner.run_task(task_name).await + + for task_config in &packages_task_configs { + let exit_code = task_runner.run_tasks(task_config).await?; + if exit_code > 0 { + return Ok(exit_code); + } + } + + Ok(0) } struct RunSingleOptions<'a> { @@ -114,7 +256,6 @@ struct RunSingleOptions<'a> { } struct TaskRunner<'a> { - tasks_config: WorkspaceTasksConfig, task_flags: &'a TaskFlags, npm_resolver: &'a dyn CliNpmResolver, node_resolver: &'a NodeResolver, @@ -124,12 +265,16 @@ struct TaskRunner<'a> { } impl<'a> TaskRunner<'a> { - pub async fn run_task( + pub async fn run_tasks( &self, - task_name: &str, + pkg_tasks_config: &PackageTaskInfo, ) -> Result { - match sort_tasks_topo(task_name, &self.tasks_config) { - Ok(sorted) => self.run_tasks_in_parallel(sorted).await, + match sort_tasks_topo(pkg_tasks_config) { + Ok(sorted) => { + self + .run_tasks_in_parallel(&pkg_tasks_config.tasks_config, sorted) + .await + } Err(err) => match err { TaskError::NotFound(name) => { if self.task_flags.is_run { @@ -138,7 +283,7 @@ impl<'a> TaskRunner<'a> { log::error!("Task not found: {}", name); if log::log_enabled!(log::Level::Error) { - self.print_available_tasks()?; + self.print_available_tasks(&pkg_tasks_config.tasks_config)?; } Ok(1) } @@ -150,16 +295,20 @@ impl<'a> TaskRunner<'a> { } } - pub fn print_available_tasks(&self) -> Result<(), std::io::Error> { + pub fn print_available_tasks( + &self, + tasks_config: &WorkspaceTasksConfig, + ) -> Result<(), std::io::Error> { print_available_tasks( &mut std::io::stderr(), &self.cli_options.start_dir, - &self.tasks_config, + tasks_config, ) } async fn run_tasks_in_parallel( &self, + tasks_config: &WorkspaceTasksConfig, task_names: Vec, ) -> Result { struct PendingTasksContext { @@ -181,22 +330,23 @@ impl<'a> TaskRunner<'a> { fn get_next_task<'a>( &mut self, runner: &'a TaskRunner<'a>, + tasks_config: &'a WorkspaceTasksConfig, ) -> Option>> { for name in &self.task_names { if self.completed.contains(name) || self.running.contains(name) { continue; } - let should_run = if let Ok((_, def)) = runner.get_task(name) { - match def { - TaskOrScript::Task(_, def) => def - .dependencies - .iter() - .all(|dep| self.completed.contains(dep)), - TaskOrScript::Script(_, _) => true, - } - } else { - false + let Some((folder_url, task_or_script)) = tasks_config.task(name) + else { + continue; + }; + let should_run = match task_or_script { + TaskOrScript::Task(_, def) => def + .dependencies + .iter() + .all(|dep| self.completed.contains(dep)), + TaskOrScript::Script(_, _) => true, }; if !should_run { @@ -207,10 +357,15 @@ impl<'a> TaskRunner<'a> { let name = name.clone(); return Some( async move { - runner - .run_task_no_dependencies(&name) - .await - .map(|exit_code| (exit_code, name)) + match task_or_script { + TaskOrScript::Task(_, def) => { + runner.run_deno_task(folder_url, &name, def).await + } + TaskOrScript::Script(scripts, _) => { + runner.run_npm_script(folder_url, &name, scripts).await + } + } + .map(|exit_code| (exit_code, name)) } .boxed_local(), ); @@ -229,7 +384,7 @@ impl<'a> TaskRunner<'a> { while context.has_remaining_tasks() { while queue.len() < self.concurrency { - if let Some(task) = context.get_next_task(self) { + if let Some(task) = context.get_next_task(self, tasks_config) { queue.push(task); } else { break; @@ -253,37 +408,10 @@ impl<'a> TaskRunner<'a> { Ok(0) } - fn get_task( - &self, - task_name: &str, - ) -> Result<(&Url, TaskOrScript), TaskError> { - let Some(result) = self.tasks_config.task(task_name) else { - return Err(TaskError::NotFound(task_name.to_string())); - }; - - Ok(result) - } - - async fn run_task_no_dependencies( - &self, - task_name: &String, - ) -> Result { - let (dir_url, task_or_script) = self.get_task(task_name.as_str()).unwrap(); - - match task_or_script { - TaskOrScript::Task(_tasks, definition) => { - self.run_deno_task(dir_url, task_name, definition).await - } - TaskOrScript::Script(scripts, _script) => { - self.run_npm_script(dir_url, task_name, scripts).await - } - } - } - - async fn run_deno_task( + pub async fn run_deno_task( &self, dir_url: &Url, - task_name: &String, + task_name: &str, definition: &TaskDefinition, ) -> Result { let cwd = match &self.task_flags.cwd { @@ -306,10 +434,10 @@ impl<'a> TaskRunner<'a> { .await } - async fn run_npm_script( + pub async fn run_npm_script( &self, dir_url: &Url, - task_name: &String, + task_name: &str, scripts: &IndexMap, ) -> Result { // ensure the npm packages are installed if using a managed resolver @@ -327,7 +455,7 @@ impl<'a> TaskRunner<'a> { // dealing with package.json here and not deno.json let task_names = vec![ format!("pre{}", task_name), - task_name.clone(), + task_name.to_string(), format!("post{}", task_name), ]; let custom_commands = task_runner::resolve_custom_commands( @@ -394,8 +522,7 @@ enum TaskError { } fn sort_tasks_topo( - name: &str, - task_config: &WorkspaceTasksConfig, + pkg_task_config: &PackageTaskInfo, ) -> Result, TaskError> { fn sort_visit<'a>( name: &'a str, @@ -416,12 +543,12 @@ fn sort_tasks_topo( }); } - let Some(def) = tasks_config.task(name) else { + let Some((_, task_or_script)) = tasks_config.task(name) else { return Err(TaskError::NotFound(name.to_string())); }; - if let TaskOrScript::Task(_, actual_def) = def.1 { - for dep in &actual_def.dependencies { + if let TaskOrScript::Task(_, task) = task_or_script { + for dep in &task.dependencies { let mut path = path.clone(); path.push(name); sort_visit(dep, sorted, path, tasks_config)? @@ -435,7 +562,9 @@ fn sort_tasks_topo( let mut sorted: Vec = vec![]; - sort_visit(name, &mut sorted, Vec::new(), task_config)?; + for name in &pkg_task_config.matched_tasks { + sort_visit(name, &mut sorted, Vec::new(), &pkg_task_config.tasks_config)?; + } Ok(sorted) } diff --git a/tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc b/tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc new file mode 100644 index 00000000000000..d22f77cc2b759e --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "task test", + "output": "bin.out", + "exitCode": 0 +} diff --git a/tests/specs/task/deno_json_lifecycle_script_names/bin.out b/tests/specs/task/deno_json_lifecycle_script_names/bin.out new file mode 100644 index 00000000000000..ad66595f1ed77e --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/bin.out @@ -0,0 +1,2 @@ +Task test echo 'test' +test diff --git a/tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc b/tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc new file mode 100644 index 00000000000000..de2f8be880b051 --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc @@ -0,0 +1,7 @@ +{ + "task": { + // should not execute this one because it's in a deno.json + // and not in the package.json + "pretest": "echo 'should not be in output'" + } +} diff --git a/tests/specs/task/deno_json_lifecycle_script_names/package.json b/tests/specs/task/deno_json_lifecycle_script_names/package.json new file mode 100644 index 00000000000000..e66cb27e3d21fe --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "test": "echo 'test'" + } +} diff --git a/tests/specs/task/filter/__test__.jsonc b/tests/specs/task/filter/__test__.jsonc new file mode 100644 index 00000000000000..8baaf04dd4655f --- /dev/null +++ b/tests/specs/task/filter/__test__.jsonc @@ -0,0 +1,59 @@ +{ + "tests": { + "npm_all": { + "cwd": "./npm", + "args": "task --filter * dev", + "output": "npm_all.out" + }, + "npm_exact": { + "cwd": "./npm", + "args": "task --filter foo dev", + "output": "npm_exact.out" + }, + "npm_multi": { + "cwd": "./npm_multi", + "args": "task --filter multi-* dev", + "output": "npm_multi.out" + }, + "npm_scoped_exact": { + "cwd": "./npm_scoped", + "args": "task --filter @foo/bar dev", + "output": "npm_scoped_exact.out" + }, + "npm_scoped_multi": { + "cwd": "./npm_scoped", + "args": "task --filter @foo/* dev", + "output": "npm_scoped_multi.out" + }, + "npm_workspace_order": { + "cwd": "./npm_workspace_order", + "args": "task --filter @foo/* dev", + "output": "npm_workspace_order.out" + }, + "deno_all": { + "cwd": "./deno", + "args": "task --filter * dev", + "output": "deno_all.out" + }, + "deno_exact": { + "cwd": "./deno", + "args": "task --filter foo dev", + "output": "deno_exact.out" + }, + "deno_scoped_exact": { + "cwd": "./deno_scoped", + "args": "task --filter @foo/bar dev", + "output": "deno_scoped_exact.out" + }, + "deno_scoped_multi": { + "cwd": "./deno_scoped", + "args": "task --filter @foo/* dev", + "output": "deno_scoped_multi.out" + }, + "deno_workspace_order": { + "cwd": "./deno_workspace_order", + "args": "task --filter @foo/* dev", + "output": "deno_workspace_order.out" + } + } +} diff --git a/tests/specs/task/filter/deno/bar/deno.json b/tests/specs/task/filter/deno/bar/deno.json new file mode 100644 index 00000000000000..9bc7d54233bb1c --- /dev/null +++ b/tests/specs/task/filter/deno/bar/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@deno/bar", + "tasks": { + "dev": "echo '@deno/bar'" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/deno/deno.json b/tests/specs/task/filter/deno/deno.json new file mode 100644 index 00000000000000..133ab666b4abd5 --- /dev/null +++ b/tests/specs/task/filter/deno/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": [ + "./foo", + "./bar" + ] +} diff --git a/tests/specs/task/filter/deno/foo/deno.json b/tests/specs/task/filter/deno/foo/deno.json new file mode 100644 index 00000000000000..6efb2125b7447f --- /dev/null +++ b/tests/specs/task/filter/deno/foo/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@deno/foo", + "tasks": { + "dev": "echo '@deno/foo'" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/deno_all.out b/tests/specs/task/filter/deno_all.out new file mode 100644 index 00000000000000..c3c34415597c3a --- /dev/null +++ b/tests/specs/task/filter/deno_all.out @@ -0,0 +1,4 @@ +Task dev echo '@deno/bar' +@deno/bar +Task dev echo '@deno/foo' +@deno/foo diff --git a/tests/specs/task/filter/deno_exact.out b/tests/specs/task/filter/deno_exact.out new file mode 100644 index 00000000000000..4bfebd6e929077 --- /dev/null +++ b/tests/specs/task/filter/deno_exact.out @@ -0,0 +1,2 @@ +Task dev echo '@deno/foo' +@deno/foo diff --git a/tests/specs/task/filter/deno_multi.out b/tests/specs/task/filter/deno_multi.out new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/task/filter/deno_scoped/deno.json b/tests/specs/task/filter/deno_scoped/deno.json new file mode 100644 index 00000000000000..7a26f9ca68dbb5 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped/deno.json @@ -0,0 +1,3 @@ +{ + "workspace": ["./foo_bar", "./foo_baz"] +} diff --git a/tests/specs/task/filter/deno_scoped/foo_bar/deno.json b/tests/specs/task/filter/deno_scoped/foo_bar/deno.json new file mode 100644 index 00000000000000..1773d76c260307 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped/foo_bar/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "exports": {}, + "tasks": { + "dev": "echo '@foo/bar'" + } +} diff --git a/tests/specs/task/filter/deno_scoped/foo_baz/deno.json b/tests/specs/task/filter/deno_scoped/foo_baz/deno.json new file mode 100644 index 00000000000000..f3e59719e50c66 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped/foo_baz/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/baz", + "exports": {}, + "tasks": { + "dev": "echo '@foo/baz'" + } +} diff --git a/tests/specs/task/filter/deno_scoped_exact.out b/tests/specs/task/filter/deno_scoped_exact.out new file mode 100644 index 00000000000000..f7d61e87149d5b --- /dev/null +++ b/tests/specs/task/filter/deno_scoped_exact.out @@ -0,0 +1,2 @@ +Task dev echo '@foo/bar' +@foo/bar diff --git a/tests/specs/task/filter/deno_scoped_multi.out b/tests/specs/task/filter/deno_scoped_multi.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped_multi.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/deno_workspace_order.out b/tests/specs/task/filter/deno_workspace_order.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/deno_workspace_order/deno.json b/tests/specs/task/filter/deno_workspace_order/deno.json new file mode 100644 index 00000000000000..cd73d72b22a353 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": [ + "./foo_bar", + "./foo_baz" + ] +} diff --git a/tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json b/tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json new file mode 100644 index 00000000000000..5be2ceac7f9a42 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "tasks": { + "dev": "echo '@foo/bar'" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json b/tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json new file mode 100644 index 00000000000000..083cea5bf00895 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@foo/baz", + "tasks": { + "dev": "echo '@foo/baz'" + }, + "imports": { + "@foo/bar": "jsr:@foo/bar" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/npm/bar/package.json b/tests/specs/task/filter/npm/bar/package.json new file mode 100644 index 00000000000000..3723db6f01daff --- /dev/null +++ b/tests/specs/task/filter/npm/bar/package.json @@ -0,0 +1,6 @@ +{ + "name": "bar", + "scripts": { + "dev": "echo 'bar'" + } +} diff --git a/tests/specs/task/filter/npm/foo/package.json b/tests/specs/task/filter/npm/foo/package.json new file mode 100644 index 00000000000000..86fa20d1118966 --- /dev/null +++ b/tests/specs/task/filter/npm/foo/package.json @@ -0,0 +1,6 @@ +{ + "name": "foo", + "scripts": { + "dev": "echo 'foo'" + } +} diff --git a/tests/specs/task/filter/npm/package.json b/tests/specs/task/filter/npm/package.json new file mode 100644 index 00000000000000..2d70009f2ca46b --- /dev/null +++ b/tests/specs/task/filter/npm/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo", "./bar"] +} diff --git a/tests/specs/task/filter/npm_all.out b/tests/specs/task/filter/npm_all.out new file mode 100644 index 00000000000000..592d4640cd1e25 --- /dev/null +++ b/tests/specs/task/filter/npm_all.out @@ -0,0 +1,4 @@ +Task dev echo 'bar' +bar +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_exact.out b/tests/specs/task/filter/npm_exact.out new file mode 100644 index 00000000000000..f879b66df86830 --- /dev/null +++ b/tests/specs/task/filter/npm_exact.out @@ -0,0 +1,2 @@ +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_multi.out b/tests/specs/task/filter/npm_multi.out new file mode 100644 index 00000000000000..58898a59650190 --- /dev/null +++ b/tests/specs/task/filter/npm_multi.out @@ -0,0 +1,4 @@ +Task dev echo 'multi-a' +multi-a +Task dev echo 'multi-b' +multi-b diff --git a/tests/specs/task/filter/npm_multi/multi-a/package.json b/tests/specs/task/filter/npm_multi/multi-a/package.json new file mode 100644 index 00000000000000..348d7273ff074a --- /dev/null +++ b/tests/specs/task/filter/npm_multi/multi-a/package.json @@ -0,0 +1,6 @@ +{ + "name": "multi-a", + "scripts": { + "dev": "echo 'multi-a'" + } +} diff --git a/tests/specs/task/filter/npm_multi/multi-b/package.json b/tests/specs/task/filter/npm_multi/multi-b/package.json new file mode 100644 index 00000000000000..f11006aea471c9 --- /dev/null +++ b/tests/specs/task/filter/npm_multi/multi-b/package.json @@ -0,0 +1,6 @@ +{ + "name": "multi-b", + "scripts": { + "dev": "echo 'multi-b'" + } +} diff --git a/tests/specs/task/filter/npm_multi/package.json b/tests/specs/task/filter/npm_multi/package.json new file mode 100644 index 00000000000000..b6000c04870f44 --- /dev/null +++ b/tests/specs/task/filter/npm_multi/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./multi-a", "./multi-b"] +} diff --git a/tests/specs/task/filter/npm_scoped/foo_bar/package.json b/tests/specs/task/filter/npm_scoped/foo_bar/package.json new file mode 100644 index 00000000000000..0e2c92c8beab5d --- /dev/null +++ b/tests/specs/task/filter/npm_scoped/foo_bar/package.json @@ -0,0 +1,6 @@ +{ + "name": "@foo/bar", + "scripts": { + "dev": "echo '@foo/bar'" + } +} diff --git a/tests/specs/task/filter/npm_scoped/foo_baz/package.json b/tests/specs/task/filter/npm_scoped/foo_baz/package.json new file mode 100644 index 00000000000000..77ec9209b19884 --- /dev/null +++ b/tests/specs/task/filter/npm_scoped/foo_baz/package.json @@ -0,0 +1,6 @@ +{ + "name": "@foo/baz", + "scripts": { + "dev": "echo '@foo/baz'" + } +} diff --git a/tests/specs/task/filter/npm_scoped/package.json b/tests/specs/task/filter/npm_scoped/package.json new file mode 100644 index 00000000000000..d02abfb3f84613 --- /dev/null +++ b/tests/specs/task/filter/npm_scoped/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo_bar", "./foo_baz"] +} diff --git a/tests/specs/task/filter/npm_scoped_exact.out b/tests/specs/task/filter/npm_scoped_exact.out new file mode 100644 index 00000000000000..f7d61e87149d5b --- /dev/null +++ b/tests/specs/task/filter/npm_scoped_exact.out @@ -0,0 +1,2 @@ +Task dev echo '@foo/bar' +@foo/bar diff --git a/tests/specs/task/filter/npm_scoped_multi.out b/tests/specs/task/filter/npm_scoped_multi.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/npm_scoped_multi.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/npm_workspace_order.out b/tests/specs/task/filter/npm_workspace_order.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/npm_workspace_order/foo_bar/package.json b/tests/specs/task/filter/npm_workspace_order/foo_bar/package.json new file mode 100644 index 00000000000000..0e2c92c8beab5d --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order/foo_bar/package.json @@ -0,0 +1,6 @@ +{ + "name": "@foo/bar", + "scripts": { + "dev": "echo '@foo/bar'" + } +} diff --git a/tests/specs/task/filter/npm_workspace_order/foo_baz/package.json b/tests/specs/task/filter/npm_workspace_order/foo_baz/package.json new file mode 100644 index 00000000000000..79f4b4b793d5a3 --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order/foo_baz/package.json @@ -0,0 +1,9 @@ +{ + "name": "@foo/baz", + "scripts": { + "dev": "echo '@foo/baz'" + }, + "dependencies": { + "@foo/bar": "workspace:*" + } +} diff --git a/tests/specs/task/filter/npm_workspace_order/package.json b/tests/specs/task/filter/npm_workspace_order/package.json new file mode 100644 index 00000000000000..d02abfb3f84613 --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo_bar", "./foo_baz"] +} From d17f4590a246675b12ced7272b93b670b37f9f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Nov 2024 00:03:11 +0000 Subject: [PATCH 369/436] feat(init): add --npm flag to initialize npm projects (#26896) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds support for `deno init --npm `. Running this will actually call to `npm:create-` package that is equivalent to running `npm create `. User will be prompted if they want to allow all permissions and lifecycle scripts to be executed. Closes https://github.com/denoland/deno/issues/26461 --------- Signed-off-by: Bartek IwaƄczuk Co-authored-by: crowlkats Co-authored-by: David Sherret --- cli/args/flags.rs | 121 ++++++++++++++++++++++++++-- cli/args/mod.rs | 3 +- cli/main.rs | 4 +- cli/tools/init/mod.rs | 68 +++++++++++++++- tests/specs/init/npm/__test__.jsonc | 6 ++ tests/specs/init/npm/init.out | 1 + 6 files changed, 191 insertions(+), 12 deletions(-) create mode 100644 tests/specs/init/npm/__test__.jsonc create mode 100644 tests/specs/init/npm/init.out diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 34647667285437..f6d53cd15e035a 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -222,6 +222,8 @@ impl FmtFlags { #[derive(Clone, Debug, Eq, PartialEq)] pub struct InitFlags { + pub package: Option, + pub package_args: Vec, pub dir: Option, pub lib: bool, pub serve: bool, @@ -1395,7 +1397,7 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { "doc" => doc_parse(&mut flags, &mut m)?, "eval" => eval_parse(&mut flags, &mut m)?, "fmt" => fmt_parse(&mut flags, &mut m)?, - "init" => init_parse(&mut flags, &mut m), + "init" => init_parse(&mut flags, &mut m)?, "info" => info_parse(&mut flags, &mut m)?, "install" => install_parse(&mut flags, &mut m)?, "json_reference" => json_reference_parse(&mut flags, &mut m, app), @@ -2448,7 +2450,19 @@ fn init_subcommand() -> Command { command("init", "scaffolds a basic Deno project with a script, test, and configuration file", UnstableArgsConfig::None).defer( |cmd| { cmd - .arg(Arg::new("dir").value_hint(ValueHint::DirPath)) + .arg(Arg::new("args") + .num_args(0..) + .action(ArgAction::Append) + .value_name("DIRECTORY OR PACKAGE") + .trailing_var_arg(true) + ) + .arg( + Arg::new("npm") + .long("npm") + .help("Generate a npm create-* project") + .conflicts_with_all(["lib", "serve"]) + .action(ArgAction::SetTrue), + ) .arg( Arg::new("lib") .long("lib") @@ -4820,12 +4834,44 @@ fn fmt_parse( Ok(()) } -fn init_parse(flags: &mut Flags, matches: &mut ArgMatches) { +fn init_parse( + flags: &mut Flags, + matches: &mut ArgMatches, +) -> Result<(), clap::Error> { + let mut lib = matches.get_flag("lib"); + let mut serve = matches.get_flag("serve"); + let mut dir = None; + let mut package = None; + let mut package_args = vec![]; + + if let Some(mut args) = matches.remove_many::("args") { + let name = args.next().unwrap(); + let mut args = args.collect::>(); + + if matches.get_flag("npm") { + package = Some(name); + package_args = args; + } else { + dir = Some(name); + + if !args.is_empty() { + args.insert(0, "init".to_string()); + let inner_matches = init_subcommand().try_get_matches_from_mut(args)?; + lib = inner_matches.get_flag("lib"); + serve = inner_matches.get_flag("serve"); + } + } + } + flags.subcommand = DenoSubcommand::Init(InitFlags { - dir: matches.remove_one::("dir"), - lib: matches.get_flag("lib"), - serve: matches.get_flag("serve"), + package, + package_args, + dir, + lib, + serve, }); + + Ok(()) } fn info_parse( @@ -10907,6 +10953,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: false, serve: false, @@ -10920,6 +10968,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: Some(String::from("foo")), lib: false, serve: false, @@ -10933,6 +10983,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: false, serve: false, @@ -10947,6 +10999,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: true, serve: false, @@ -10960,6 +11014,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: false, serve: true, @@ -10973,6 +11029,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: Some(String::from("foo")), lib: true, serve: false, @@ -10980,6 +11038,57 @@ mod tests { ..Flags::default() } ); + + let r = flags_from_vec(svec!["deno", "init", "--lib", "--npm", "vite"]); + assert!(r.is_err()); + + let r = flags_from_vec(svec!["deno", "init", "--serve", "--npm", "vite"]); + assert!(r.is_err()); + + let r = flags_from_vec(svec!["deno", "init", "--npm", "vite", "--lib"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Init(InitFlags { + package: Some("vite".to_string()), + package_args: svec!["--lib"], + dir: None, + lib: false, + serve: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "init", "--npm", "vite", "--serve"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Init(InitFlags { + package: Some("vite".to_string()), + package_args: svec!["--serve"], + dir: None, + lib: false, + serve: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "init", "--npm", "vite", "new_dir"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Init(InitFlags { + package: Some("vite".to_string()), + package_args: svec!["new_dir"], + dir: None, + lib: false, + serve: false, + }), + ..Flags::default() + } + ); } #[test] diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 37e1f00ffa1efd..a1a9c49cbe4421 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1628,9 +1628,10 @@ impl CliOptions { DenoSubcommand::Install(_) | DenoSubcommand::Add(_) | DenoSubcommand::Remove(_) + | DenoSubcommand::Init(_) | DenoSubcommand::Outdated(_) ) { - // For `deno install/add/remove` we want to force the managed resolver so it can set up `node_modules/` directory. + // For `deno install/add/remove/init` we want to force the managed resolver so it can set up `node_modules/` directory. return false; } if self.node_modules_dir().ok().flatten().is_none() diff --git a/cli/main.rs b/cli/main.rs index 29f5914bbfd467..c49c8a83a6d54e 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -144,9 +144,7 @@ async fn run_subcommand(flags: Arc) -> Result { } DenoSubcommand::Init(init_flags) => { spawn_subcommand(async { - // make compiler happy since init_project is sync - tokio::task::yield_now().await; - tools::init::init_project(init_flags) + tools::init::init_project(init_flags).await }) } DenoSubcommand::Info(info_flags) => { diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs index 4e4a686c5f2d7b..8f486dad53184c 100644 --- a/cli/tools/init/mod.rs +++ b/cli/tools/init/mod.rs @@ -1,15 +1,28 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use crate::args::DenoSubcommand; +use crate::args::Flags; use crate::args::InitFlags; +use crate::args::PackagesAllowedScripts; +use crate::args::PermissionFlags; +use crate::args::RunFlags; use crate::colors; +use color_print::cformat; +use color_print::cstr; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::serde_json::json; +use deno_runtime::WorkerExecutionMode; use log::info; +use std::io::IsTerminal; use std::io::Write; use std::path::Path; -pub fn init_project(init_flags: InitFlags) -> Result<(), AnyError> { +pub async fn init_project(init_flags: InitFlags) -> Result { + if let Some(package) = &init_flags.package { + return init_npm(package, init_flags.package_args).await; + } + let cwd = std::env::current_dir().context("Can't read current working directory.")?; let dir = if let Some(dir) = &init_flags.dir { @@ -235,7 +248,58 @@ Deno.test(function addTest() { info!(" {}", colors::gray("# Run the tests")); info!(" deno test"); } - Ok(()) + Ok(0) +} + +async fn init_npm(name: &str, args: Vec) -> Result { + let script_name = format!("npm:create-{}", name); + + fn print_manual_usage(script_name: &str, args: &[String]) -> i32 { + log::info!("{}", cformat!("You can initialize project manually by running deno run {} {} and applying desired permissions.", script_name, args.join(" "))); + 1 + } + + if std::io::stdin().is_terminal() { + log::info!( + cstr!("⚠ Do you fully trust {} package? Deno will invoke code from it with all permissions. Do you want to continue? [y/n]"), + script_name + ); + loop { + let _ = std::io::stdout().write(b"> ")?; + std::io::stdout().flush()?; + let mut answer = String::new(); + if std::io::stdin().read_line(&mut answer).is_ok() { + let answer = answer.trim().to_ascii_lowercase(); + if answer != "y" { + return Ok(print_manual_usage(&script_name, &args)); + } else { + break; + } + } + } + } else { + return Ok(print_manual_usage(&script_name, &args)); + } + + let new_flags = Flags { + permissions: PermissionFlags { + allow_all: true, + ..Default::default() + }, + allow_scripts: PackagesAllowedScripts::All, + argv: args, + subcommand: DenoSubcommand::Run(RunFlags { + script: script_name, + ..Default::default() + }), + ..Default::default() + }; + crate::tools::run::run_script( + WorkerExecutionMode::Run, + new_flags.into(), + None, + ) + .await } fn create_json_file( diff --git a/tests/specs/init/npm/__test__.jsonc b/tests/specs/init/npm/__test__.jsonc new file mode 100644 index 00000000000000..ccc9d181ddb6ff --- /dev/null +++ b/tests/specs/init/npm/__test__.jsonc @@ -0,0 +1,6 @@ +{ + "tempDir": true, + "args": "init --npm vite my-project", + "output": "init.out", + "exitCode": 1 +} diff --git a/tests/specs/init/npm/init.out b/tests/specs/init/npm/init.out new file mode 100644 index 00000000000000..f4ba9394375f48 --- /dev/null +++ b/tests/specs/init/npm/init.out @@ -0,0 +1 @@ +You can initialize project manually by running deno run npm:create-vite my-project and applying desired permissions. From be10901dfcfe84bda6b02828a9253f08365d5cfb Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 20 Nov 2024 20:02:58 -0500 Subject: [PATCH 370/436] docs: fix casing of Wasm (#26954) --- cli/tsc/dts/lib.deno.shared_globals.d.ts | 58 +++++++++---------- .../close_in_wasm_reactions.js | 2 +- .../worker_close_in_wasm_reactions.js | 2 +- .../workers/close_in_wasm_reactions.js | 2 +- tests/unit/wasm_test.ts | 4 +- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/cli/tsc/dts/lib.deno.shared_globals.d.ts b/cli/tsc/dts/lib.deno.shared_globals.d.ts index ba872ef46e7761..96790fb6652be5 100644 --- a/cli/tsc/dts/lib.deno.shared_globals.d.ts +++ b/cli/tsc/dts/lib.deno.shared_globals.d.ts @@ -15,14 +15,14 @@ /// /// -/** @category WASM */ +/** @category Wasm */ declare namespace WebAssembly { /** * The `WebAssembly.CompileError` object indicates an error during WebAssembly decoding or validation. * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/CompileError) * - * @category WASM + * @category Wasm */ export class CompileError extends Error { /** Creates a new `WebAssembly.CompileError` object. */ @@ -36,7 +36,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) * - * @category WASM + * @category Wasm */ export class Global { /** Creates a new `Global` object. */ @@ -59,7 +59,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) * - * @category WASM + * @category Wasm */ export class Instance { /** Creates a new Instance object. */ @@ -79,7 +79,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/LinkError) * - * @category WASM + * @category Wasm */ export class LinkError extends Error { /** Creates a new WebAssembly.LinkError object. */ @@ -95,7 +95,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) * - * @category WASM + * @category Wasm */ export class Memory { /** Creates a new `Memory` object. */ @@ -117,7 +117,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) * - * @category WASM + * @category Wasm */ export class Module { /** Creates a new `Module` object. */ @@ -145,7 +145,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/RuntimeError) * - * @category WASM + * @category Wasm */ export class RuntimeError extends Error { /** Creates a new `WebAssembly.RuntimeError` object. */ @@ -160,7 +160,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table) * - * @category WASM + * @category Wasm */ export class Table { /** Creates a new `Table` object. */ @@ -182,7 +182,7 @@ declare namespace WebAssembly { /** The `GlobalDescriptor` describes the options you can pass to * `new WebAssembly.Global()`. * - * @category WASM + * @category Wasm */ export interface GlobalDescriptor { mutable?: boolean; @@ -192,7 +192,7 @@ declare namespace WebAssembly { /** The `MemoryDescriptor` describes the options you can pass to * `new WebAssembly.Memory()`. * - * @category WASM + * @category Wasm */ export interface MemoryDescriptor { initial: number; @@ -203,7 +203,7 @@ declare namespace WebAssembly { /** A `ModuleExportDescriptor` is the description of a declared export in a * `WebAssembly.Module`. * - * @category WASM + * @category Wasm */ export interface ModuleExportDescriptor { kind: ImportExportKind; @@ -213,7 +213,7 @@ declare namespace WebAssembly { /** A `ModuleImportDescriptor` is the description of a declared import in a * `WebAssembly.Module`. * - * @category WASM + * @category Wasm */ export interface ModuleImportDescriptor { kind: ImportExportKind; @@ -224,7 +224,7 @@ declare namespace WebAssembly { /** The `TableDescriptor` describes the options you can pass to * `new WebAssembly.Table()`. * - * @category WASM + * @category Wasm */ export interface TableDescriptor { element: TableKind; @@ -234,7 +234,7 @@ declare namespace WebAssembly { /** The value returned from `WebAssembly.instantiate`. * - * @category WASM + * @category Wasm */ export interface WebAssemblyInstantiatedSource { /* A `WebAssembly.Instance` object that contains all the exported WebAssembly functions. */ @@ -247,21 +247,21 @@ declare namespace WebAssembly { module: Module; } - /** @category WASM */ + /** @category Wasm */ export type ImportExportKind = "function" | "global" | "memory" | "table"; - /** @category WASM */ + /** @category Wasm */ export type TableKind = "anyfunc"; - /** @category WASM */ + /** @category Wasm */ export type ValueType = "f32" | "f64" | "i32" | "i64"; - /** @category WASM */ + /** @category Wasm */ export type ExportValue = Function | Global | Memory | Table; - /** @category WASM */ + /** @category Wasm */ export type Exports = Record; - /** @category WASM */ + /** @category Wasm */ export type ImportValue = ExportValue | number; - /** @category WASM */ + /** @category Wasm */ export type ModuleImports = Record; - /** @category WASM */ + /** @category Wasm */ export type Imports = Record; /** @@ -272,7 +272,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) * - * @category WASM + * @category Wasm */ export function compile(bytes: BufferSource): Promise; @@ -284,7 +284,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) * - * @category WASM + * @category Wasm */ export function compileStreaming( source: Response | Promise, @@ -301,7 +301,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) * - * @category WASM + * @category Wasm */ export function instantiate( bytes: BufferSource, @@ -318,7 +318,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) * - * @category WASM + * @category Wasm */ export function instantiate( moduleObject: Module, @@ -332,7 +332,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming) * - * @category WASM + * @category Wasm */ export function instantiateStreaming( response: Response | PromiseLike, @@ -346,7 +346,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate) * - * @category WASM + * @category Wasm */ export function validate(bytes: BufferSource): boolean; } diff --git a/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js b/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js index abe5731085bff8..2cb0e4a7680217 100644 --- a/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js +++ b/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js @@ -1,6 +1,6 @@ // https://github.com/denoland/deno/issues/12263 // Test for a panic that happens when a worker is closed in the reactions of a -// WASM async operation. +// Wasm async operation. // The minimum valid wasm module, plus two additional zero bytes. const buffer = new Uint8Array([ diff --git a/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js b/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js index 828320a240b1fa..2f62707efff67b 100644 --- a/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js +++ b/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js @@ -2,7 +2,7 @@ // https://github.com/denoland/deno/issues/12263 // Test for a panic that happens when a worker is closed in the reactions of a -// WASM async operation. +// Wasm async operation. new Worker( import.meta.resolve("./close_in_wasm_reactions.js"), diff --git a/tests/testdata/workers/close_in_wasm_reactions.js b/tests/testdata/workers/close_in_wasm_reactions.js index abe5731085bff8..2cb0e4a7680217 100644 --- a/tests/testdata/workers/close_in_wasm_reactions.js +++ b/tests/testdata/workers/close_in_wasm_reactions.js @@ -1,6 +1,6 @@ // https://github.com/denoland/deno/issues/12263 // Test for a panic that happens when a worker is closed in the reactions of a -// WASM async operation. +// Wasm async operation. // The minimum valid wasm module, plus two additional zero bytes. const buffer = new Uint8Array([ diff --git a/tests/unit/wasm_test.ts b/tests/unit/wasm_test.ts index e0db41ed0edb62..8ee9392f934c36 100644 --- a/tests/unit/wasm_test.ts +++ b/tests/unit/wasm_test.ts @@ -32,7 +32,7 @@ Deno.test(async function wasmInstantiateWorksWithBuffer() { }); // V8's default implementation of `WebAssembly.instantiateStreaming()` if you -// don't set the WASM streaming callback, is to take a byte source. Here we +// don't set the Wasm streaming callback, is to take a byte source. Here we // check that our implementation of the callback disallows it. Deno.test( async function wasmInstantiateStreamingFailsWithBuffer() { @@ -95,7 +95,7 @@ Deno.test( Deno.test( { permissions: { net: true } }, async function wasmStreamingNonTrivial() { - // deno-dom's WASM file is a real-world non-trivial case that gave us + // deno-dom's Wasm file is a real-world non-trivial case that gave us // trouble when implementing this. await WebAssembly.instantiateStreaming(fetch( "http://localhost:4545/assets/deno_dom_0.1.3-alpha2.wasm", From 3da4eca7c1ed97906654671669e0bb3b095bc637 Mon Sep 17 00:00:00 2001 From: denobot <33910674+denobot@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:05:02 -0500 Subject: [PATCH 371/436] 2.1.0 (#26957) Bumped versions for 2.1.0 Co-authored-by: bartlomieju --- .github/workflows/ci.generate.ts | 2 +- .github/workflows/ci.yml | 8 ++-- Cargo.lock | 58 +++++++++++++------------- Cargo.toml | 56 ++++++++++++------------- Releases.md | 70 ++++++++++++++++++++++++++++++++ bench_util/Cargo.toml | 2 +- cli/Cargo.toml | 2 +- ext/broadcast_channel/Cargo.toml | 2 +- ext/cache/Cargo.toml | 2 +- ext/canvas/Cargo.toml | 2 +- ext/console/Cargo.toml | 2 +- ext/cron/Cargo.toml | 2 +- ext/crypto/Cargo.toml | 2 +- ext/fetch/Cargo.toml | 2 +- ext/ffi/Cargo.toml | 2 +- ext/fs/Cargo.toml | 2 +- ext/http/Cargo.toml | 2 +- ext/io/Cargo.toml | 2 +- ext/kv/Cargo.toml | 2 +- ext/napi/Cargo.toml | 2 +- ext/napi/sym/Cargo.toml | 2 +- ext/net/Cargo.toml | 2 +- ext/node/Cargo.toml | 2 +- ext/tls/Cargo.toml | 2 +- ext/url/Cargo.toml | 2 +- ext/web/Cargo.toml | 2 +- ext/webgpu/Cargo.toml | 2 +- ext/webidl/Cargo.toml | 2 +- ext/websocket/Cargo.toml | 2 +- ext/webstorage/Cargo.toml | 2 +- resolvers/deno/Cargo.toml | 2 +- resolvers/node/Cargo.toml | 2 +- runtime/Cargo.toml | 2 +- runtime/permissions/Cargo.toml | 2 +- 34 files changed, 161 insertions(+), 91 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 5ed02d3cdece84..941ee47984e1f6 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify"; // Bump this number when you want to purge the cache. // Note: the tools/release/01_bump_crate_versions.ts script will update this version // automatically via regex, so ensure that this line maintains this format. -const cacheVersion = 25; +const cacheVersion = 26; const ubuntuX86Runner = "ubuntu-24.04"; const ubuntuX86XlRunner = "ubuntu-24.04-xl"; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39a3afe76907c9..20e9fef503c999 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -361,8 +361,8 @@ jobs: path: |- ~/.cargo/registry/index ~/.cargo/registry/cache - key: '25-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' - restore-keys: '25-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' + key: '26-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' + restore-keys: '26-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' if: '!(matrix.skip)' - name: Restore cache build output (PR) uses: actions/cache/restore@v4 @@ -375,7 +375,7 @@ jobs: !./target/*/*.zip !./target/*/*.tar.gz key: never_saved - restore-keys: '25-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' + restore-keys: '26-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' - name: Apply and update mtime cache if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' uses: ./.github/mtime_cache @@ -685,7 +685,7 @@ jobs: !./target/*/*.zip !./target/*/*.sha256sum !./target/*/*.tar.gz - key: '25-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' + key: '26-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' publish-canary: name: publish canary runs-on: ubuntu-24.04 diff --git a/Cargo.lock b/Cargo.lock index 2896c0e0585066..bf6d3a37147e94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1201,7 +1201,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.6" +version = "2.1.0" dependencies = [ "anstream", "async-trait", @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "deno_bench_util" -version = "0.171.0" +version = "0.172.0" dependencies = [ "bencher", "deno_core", @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.171.0" +version = "0.172.0" dependencies = [ "async-trait", "deno_core", @@ -1391,7 +1391,7 @@ dependencies = [ [[package]] name = "deno_cache" -version = "0.109.0" +version = "0.110.0" dependencies = [ "async-trait", "deno_core", @@ -1424,7 +1424,7 @@ dependencies = [ [[package]] name = "deno_canvas" -version = "0.46.0" +version = "0.47.0" dependencies = [ "deno_core", "deno_webgpu", @@ -1459,7 +1459,7 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.177.0" +version = "0.178.0" dependencies = [ "deno_core", ] @@ -1506,7 +1506,7 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_cron" -version = "0.57.0" +version = "0.58.0" dependencies = [ "anyhow", "async-trait", @@ -1519,7 +1519,7 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.191.0" +version = "0.192.0" dependencies = [ "aes", "aes-gcm", @@ -1587,7 +1587,7 @@ dependencies = [ [[package]] name = "deno_fetch" -version = "0.201.0" +version = "0.202.0" dependencies = [ "base64 0.21.7", "bytes", @@ -1621,7 +1621,7 @@ dependencies = [ [[package]] name = "deno_ffi" -version = "0.164.0" +version = "0.165.0" dependencies = [ "deno_core", "deno_permissions", @@ -1641,7 +1641,7 @@ dependencies = [ [[package]] name = "deno_fs" -version = "0.87.0" +version = "0.88.0" dependencies = [ "async-trait", "base32", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "deno_http" -version = "0.175.0" +version = "0.176.0" dependencies = [ "async-compression", "async-trait", @@ -1733,7 +1733,7 @@ dependencies = [ [[package]] name = "deno_io" -version = "0.87.0" +version = "0.88.0" dependencies = [ "async-trait", "deno_core", @@ -1754,7 +1754,7 @@ dependencies = [ [[package]] name = "deno_kv" -version = "0.85.0" +version = "0.86.0" dependencies = [ "anyhow", "async-trait", @@ -1827,7 +1827,7 @@ dependencies = [ [[package]] name = "deno_napi" -version = "0.108.0" +version = "0.109.0" dependencies = [ "deno_core", "deno_permissions", @@ -1855,7 +1855,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.169.0" +version = "0.170.0" dependencies = [ "deno_core", "deno_permissions", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "deno_node" -version = "0.114.0" +version = "0.115.0" dependencies = [ "aead-gcm-stream", "aes", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "deno_permissions" -version = "0.37.0" +version = "0.38.0" dependencies = [ "deno_core", "deno_path_util", @@ -2042,7 +2042,7 @@ dependencies = [ [[package]] name = "deno_resolver" -version = "0.9.0" +version = "0.10.0" dependencies = [ "anyhow", "base32", @@ -2061,7 +2061,7 @@ dependencies = [ [[package]] name = "deno_runtime" -version = "0.186.0" +version = "0.187.0" dependencies = [ "async-trait", "color-print", @@ -2198,7 +2198,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.164.0" +version = "0.165.0" dependencies = [ "deno_core", "deno_native_certs", @@ -2247,7 +2247,7 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.177.0" +version = "0.178.0" dependencies = [ "deno_bench_util", "deno_console", @@ -2259,7 +2259,7 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.208.0" +version = "0.209.0" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "deno_webgpu" -version = "0.144.0" +version = "0.145.0" dependencies = [ "deno_core", "raw-window-handle", @@ -2294,7 +2294,7 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.177.0" +version = "0.178.0" dependencies = [ "deno_bench_util", "deno_core", @@ -2302,7 +2302,7 @@ dependencies = [ [[package]] name = "deno_websocket" -version = "0.182.0" +version = "0.183.0" dependencies = [ "bytes", "deno_core", @@ -2324,7 +2324,7 @@ dependencies = [ [[package]] name = "deno_webstorage" -version = "0.172.0" +version = "0.173.0" dependencies = [ "deno_core", "deno_web", @@ -4752,7 +4752,7 @@ dependencies = [ [[package]] name = "napi_sym" -version = "0.107.0" +version = "0.108.0" dependencies = [ "quote", "serde", @@ -4807,7 +4807,7 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.16.0" +version = "0.17.0" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 0dfe7e8bd9d58c..5f66c0d44de82f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,17 +48,17 @@ repository = "https://github.com/denoland/deno" deno_ast = { version = "=0.43.3", features = ["transpiling"] } deno_core = { version = "0.321.0" } -deno_bench_util = { version = "0.171.0", path = "./bench_util" } +deno_bench_util = { version = "0.172.0", path = "./bench_util" } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_npm = "=0.25.4" deno_path_util = "=0.2.1" -deno_permissions = { version = "0.37.0", path = "./runtime/permissions" } -deno_runtime = { version = "0.186.0", path = "./runtime" } +deno_permissions = { version = "0.38.0", path = "./runtime/permissions" } +deno_runtime = { version = "0.187.0", path = "./runtime" } deno_semver = "=0.5.16" deno_terminal = "0.2.0" -napi_sym = { version = "0.107.0", path = "./ext/napi/sym" } +napi_sym = { version = "0.108.0", path = "./ext/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } denokv_proto = "0.8.4" @@ -67,32 +67,32 @@ denokv_remote = "0.8.4" denokv_sqlite = { default-features = false, version = "0.8.4" } # exts -deno_broadcast_channel = { version = "0.171.0", path = "./ext/broadcast_channel" } -deno_cache = { version = "0.109.0", path = "./ext/cache" } -deno_canvas = { version = "0.46.0", path = "./ext/canvas" } -deno_console = { version = "0.177.0", path = "./ext/console" } -deno_cron = { version = "0.57.0", path = "./ext/cron" } -deno_crypto = { version = "0.191.0", path = "./ext/crypto" } -deno_fetch = { version = "0.201.0", path = "./ext/fetch" } -deno_ffi = { version = "0.164.0", path = "./ext/ffi" } -deno_fs = { version = "0.87.0", path = "./ext/fs" } -deno_http = { version = "0.175.0", path = "./ext/http" } -deno_io = { version = "0.87.0", path = "./ext/io" } -deno_kv = { version = "0.85.0", path = "./ext/kv" } -deno_napi = { version = "0.108.0", path = "./ext/napi" } -deno_net = { version = "0.169.0", path = "./ext/net" } -deno_node = { version = "0.114.0", path = "./ext/node" } -deno_tls = { version = "0.164.0", path = "./ext/tls" } -deno_url = { version = "0.177.0", path = "./ext/url" } -deno_web = { version = "0.208.0", path = "./ext/web" } -deno_webgpu = { version = "0.144.0", path = "./ext/webgpu" } -deno_webidl = { version = "0.177.0", path = "./ext/webidl" } -deno_websocket = { version = "0.182.0", path = "./ext/websocket" } -deno_webstorage = { version = "0.172.0", path = "./ext/webstorage" } +deno_broadcast_channel = { version = "0.172.0", path = "./ext/broadcast_channel" } +deno_cache = { version = "0.110.0", path = "./ext/cache" } +deno_canvas = { version = "0.47.0", path = "./ext/canvas" } +deno_console = { version = "0.178.0", path = "./ext/console" } +deno_cron = { version = "0.58.0", path = "./ext/cron" } +deno_crypto = { version = "0.192.0", path = "./ext/crypto" } +deno_fetch = { version = "0.202.0", path = "./ext/fetch" } +deno_ffi = { version = "0.165.0", path = "./ext/ffi" } +deno_fs = { version = "0.88.0", path = "./ext/fs" } +deno_http = { version = "0.176.0", path = "./ext/http" } +deno_io = { version = "0.88.0", path = "./ext/io" } +deno_kv = { version = "0.86.0", path = "./ext/kv" } +deno_napi = { version = "0.109.0", path = "./ext/napi" } +deno_net = { version = "0.170.0", path = "./ext/net" } +deno_node = { version = "0.115.0", path = "./ext/node" } +deno_tls = { version = "0.165.0", path = "./ext/tls" } +deno_url = { version = "0.178.0", path = "./ext/url" } +deno_web = { version = "0.209.0", path = "./ext/web" } +deno_webgpu = { version = "0.145.0", path = "./ext/webgpu" } +deno_webidl = { version = "0.178.0", path = "./ext/webidl" } +deno_websocket = { version = "0.183.0", path = "./ext/websocket" } +deno_webstorage = { version = "0.173.0", path = "./ext/webstorage" } # resolvers -deno_resolver = { version = "0.9.0", path = "./resolvers/deno" } -node_resolver = { version = "0.16.0", path = "./resolvers/node" } +deno_resolver = { version = "0.10.0", path = "./resolvers/deno" } +node_resolver = { version = "0.17.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" diff --git a/Releases.md b/Releases.md index 5ce25815bdb54d..2cb2dfbd80c8ae 100644 --- a/Releases.md +++ b/Releases.md @@ -6,6 +6,76 @@ https://github.com/denoland/deno/releases We also have one-line install commands at: https://github.com/denoland/deno_install +### 2.1.0 / 2024.11.21 + +- feat(cli): add `--unstable-node-globals` flag (#26617) +- feat(cli): support multiple env file argument (#26527) +- feat(compile): ability to embed directory in executable (#26939) +- feat(compile): ability to embed local data files (#26934) +- feat(ext/fetch): Make fetch client parameters configurable (#26909) +- feat(ext/fetch): allow embedders to use `hickory_dns_resolver` instead of + default `GaiResolver` (#26740) +- feat(ext/fs): add ctime to Deno.stats and use it in node compat layer (#24801) +- feat(ext/http): Make http server parameters configurable (#26785) +- feat(ext/node): perf_hooks.monitorEventLoopDelay() (#26905) +- feat(fetch): accept async iterables for body (#26882) +- feat(fmt): support SQL (#26750) +- feat(info): show location for Web Cache (#26205) +- feat(init): add --npm flag to initialize npm projects (#26896) +- feat(jupyter): Add `Deno.jupyter.image` API (#26284) +- feat(lint): Add checked files list to the JSON output(#26936) +- feat(lsp): auto-imports with @deno-types directives (#26821) +- feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a + package.json (#26439) +- feat(permission): support suffix wildcards in `--allow-env` flag (#25255) +- feat(publish): add `--set-version ` flag (#26141) +- feat(runtime): remove public OTEL trace API (#26854) +- feat(task): add --eval flag (#26943) +- feat(task): dependencies (#26467) +- feat(task): support object notation, remove support for JSDocs (#26886) +- feat(task): workspace support with --filter and --recursive (#26949) +- feat(watch): log which file changed on HMR or watch change (#25801) +- feat: OpenTelemetry Tracing API and Exporting (#26710) +- feat: Wasm module support (#26668) +- feat: fmt and lint respect .gitignore file (#26897) +- feat: permission stack traces in ops (#26938) +- feat: subcommand to view and update outdated dependencies (#26942) +- feat: upgrade V8 to 13.0 (#26851) +- fix(cli): preserve comments in doc tests (#26828) +- fix(cli): show prefix hint when installing a package globally (#26629) +- fix(ext/cache): gracefully error when cache creation failed (#26895) +- fix(ext/http): prefer brotli for `accept-encoding: gzip, deflate, br, zstd` + (#26814) +- fix(ext/node): New async setInterval function to improve the nodejs + compatibility (#26703) +- fix(ext/node): add autoSelectFamily option to net.createConnection (#26661) +- fix(ext/node): handle `--allow-sys=inspector` (#26836) +- fix(ext/node): increase tolerance for interval test (#26899) +- fix(ext/node): process.getBuiltinModule (#26833) +- fix(ext/node): use ERR_NOT_IMPLEMENTED for notImplemented (#26853) +- fix(ext/node): zlib.crc32() (#26856) +- fix(ext/webgpu): Create GPUQuerySet converter before usage (#26883) +- fix(ext/websocket): initialize `error` attribute of WebSocket ErrorEvent + (#26796) +- fix(ext/webstorage): use error class for sqlite error case (#26806) +- fix(fmt): error instead of panic on unstable format (#26859) +- fix(fmt): formatting of .svelte files (#26948) +- fix(install): percent encodings in interactive progress bar (#26600) +- fix(install): re-setup bin entries after running lifecycle scripts (#26752) +- fix(lockfile): track dependencies specified in TypeScript compiler options + (#26551) +- fix(lsp): ignore editor indent settings if deno.json is present (#26912) +- fix(lsp): skip code action edits that can't be converted (#26831) +- fix(node): handle resolving ".//" in npm packages (#26920) +- fix(node/crypto): support promisify on generateKeyPair (#26913) +- fix(permissions): say to use --allow-run instead of --allow-all (#26842) +- fix(publish): improve error message when missing exports (#26945) +- fix: otel resiliency (#26857) +- fix: update message for unsupported schemes with npm and jsr (#26884) +- perf(compile): code cache (#26528) +- perf(windows): delay load webgpu and some other dlls (#26917) +- perf: use available system memory for v8 isolate memory limit (#26868) + ### 2.0.6 / 2024.11.10 - feat(ext/http): abort event when request is cancelled (#26781) diff --git a/bench_util/Cargo.toml b/bench_util/Cargo.toml index d6eefc3a5d8c9e..7bb785e6e55f87 100644 --- a/bench_util/Cargo.toml +++ b/bench_util/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_bench_util" -version = "0.171.0" +version = "0.172.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d6f509eb97525b..c6818848371ac4 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.0.6" +version = "2.1.0" authors.workspace = true default-run = "deno" edition.workspace = true diff --git a/ext/broadcast_channel/Cargo.toml b/ext/broadcast_channel/Cargo.toml index 90ac0383579759..b92b1c7beb3fdf 100644 --- a/ext/broadcast_channel/Cargo.toml +++ b/ext/broadcast_channel/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_broadcast_channel" -version = "0.171.0" +version = "0.172.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cache/Cargo.toml b/ext/cache/Cargo.toml index 56fa0a527f3eab..c79024e82c16a0 100644 --- a/ext/cache/Cargo.toml +++ b/ext/cache/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cache" -version = "0.109.0" +version = "0.110.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/canvas/Cargo.toml b/ext/canvas/Cargo.toml index 4231d7c84d4802..8fcb2c4a9c8e19 100644 --- a/ext/canvas/Cargo.toml +++ b/ext/canvas/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_canvas" -version = "0.46.0" +version = "0.47.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/console/Cargo.toml b/ext/console/Cargo.toml index 80f1cca84d8cb6..9f925ac61b316d 100644 --- a/ext/console/Cargo.toml +++ b/ext/console/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_console" -version = "0.177.0" +version = "0.178.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cron/Cargo.toml b/ext/cron/Cargo.toml index 966ccdc958316c..23ac77d5eda371 100644 --- a/ext/cron/Cargo.toml +++ b/ext/cron/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cron" -version = "0.57.0" +version = "0.58.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/crypto/Cargo.toml b/ext/crypto/Cargo.toml index a5794dc68b447b..4a44314221f9fe 100644 --- a/ext/crypto/Cargo.toml +++ b/ext/crypto/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_crypto" -version = "0.191.0" +version = "0.192.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fetch/Cargo.toml b/ext/fetch/Cargo.toml index 00c85f2aa163a0..9ebd9ec03f2006 100644 --- a/ext/fetch/Cargo.toml +++ b/ext/fetch/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fetch" -version = "0.201.0" +version = "0.202.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml index 295e8be8460dc5..e63d22e57dc9ac 100644 --- a/ext/ffi/Cargo.toml +++ b/ext/ffi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_ffi" -version = "0.164.0" +version = "0.165.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fs/Cargo.toml b/ext/fs/Cargo.toml index ace1b89f3a03dc..f37d1f699796ca 100644 --- a/ext/fs/Cargo.toml +++ b/ext/fs/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fs" -version = "0.87.0" +version = "0.88.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/http/Cargo.toml b/ext/http/Cargo.toml index ed98fe349c1872..5105b47ddef6e8 100644 --- a/ext/http/Cargo.toml +++ b/ext/http/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_http" -version = "0.175.0" +version = "0.176.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/io/Cargo.toml b/ext/io/Cargo.toml index 6ef049ff9b087e..8f7c0e197a7df7 100644 --- a/ext/io/Cargo.toml +++ b/ext/io/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_io" -version = "0.87.0" +version = "0.88.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/kv/Cargo.toml b/ext/kv/Cargo.toml index aa7381766740ac..870e4fec3b69d1 100644 --- a/ext/kv/Cargo.toml +++ b/ext/kv/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_kv" -version = "0.85.0" +version = "0.86.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/Cargo.toml b/ext/napi/Cargo.toml index df3ec0287b936c..19f4036a886e3a 100644 --- a/ext/napi/Cargo.toml +++ b/ext/napi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_napi" -version = "0.108.0" +version = "0.109.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/sym/Cargo.toml b/ext/napi/sym/Cargo.toml index 7c13a9165c8205..83107782b814c5 100644 --- a/ext/napi/sym/Cargo.toml +++ b/ext/napi/sym/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "napi_sym" -version = "0.107.0" +version = "0.108.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/net/Cargo.toml b/ext/net/Cargo.toml index 1febbd5338be93..1cb109dd2182e1 100644 --- a/ext/net/Cargo.toml +++ b/ext/net/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_net" -version = "0.169.0" +version = "0.170.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 36910a844690c2..3502d3b5f851d1 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_node" -version = "0.114.0" +version = "0.115.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 943fc8413e8842..81d28d44212247 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_tls" -version = "0.164.0" +version = "0.165.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/url/Cargo.toml b/ext/url/Cargo.toml index 557a4669e6aa59..2b390e8b07c9a4 100644 --- a/ext/url/Cargo.toml +++ b/ext/url/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_url" -version = "0.177.0" +version = "0.178.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml index db28d0e5786493..c00298991b9dce 100644 --- a/ext/web/Cargo.toml +++ b/ext/web/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_web" -version = "0.208.0" +version = "0.209.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml index f23bb8371e9c18..73541ba6a2c754 100644 --- a/ext/webgpu/Cargo.toml +++ b/ext/webgpu/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webgpu" -version = "0.144.0" +version = "0.145.0" authors = ["the Deno authors"] edition.workspace = true license = "MIT" diff --git a/ext/webidl/Cargo.toml b/ext/webidl/Cargo.toml index 8c3f6f6128839e..9f6fdc49437224 100644 --- a/ext/webidl/Cargo.toml +++ b/ext/webidl/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webidl" -version = "0.177.0" +version = "0.178.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/websocket/Cargo.toml b/ext/websocket/Cargo.toml index 61f1f5959c4ae8..bdbc1694353ca1 100644 --- a/ext/websocket/Cargo.toml +++ b/ext/websocket/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_websocket" -version = "0.182.0" +version = "0.183.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webstorage/Cargo.toml b/ext/webstorage/Cargo.toml index 01e23ab839a643..928844c5aaa16c 100644 --- a/ext/webstorage/Cargo.toml +++ b/ext/webstorage/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webstorage" -version = "0.172.0" +version = "0.173.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index c2d4a3bc29af51..6be746cecb1662 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_resolver" -version = "0.9.0" +version = "0.10.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/node/Cargo.toml b/resolvers/node/Cargo.toml index eeac79c2566b9c..7f914479ad553c 100644 --- a/resolvers/node/Cargo.toml +++ b/resolvers/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "node_resolver" -version = "0.16.0" +version = "0.17.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index b59cd14fa95694..d4c41b831fe3c9 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_runtime" -version = "0.186.0" +version = "0.187.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/permissions/Cargo.toml b/runtime/permissions/Cargo.toml index e088eb8ce53813..1e7133de6ddb48 100644 --- a/runtime/permissions/Cargo.toml +++ b/runtime/permissions/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_permissions" -version = "0.37.0" +version = "0.38.0" authors.workspace = true edition.workspace = true license.workspace = true From 0b8df9f24d0119386dff4341bc4a6a1142688f2d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 21 Nov 2024 00:13:47 -0500 Subject: [PATCH 372/436] chore: fix cargo publish (#26958) --- resolvers/deno/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index 6be746cecb1662..0de8b31b38d558 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -25,6 +25,7 @@ deno_package_json.features = ["sync"] deno_path_util.workspace = true deno_semver.workspace = true node_resolver.workspace = true +node_resolver.features = ["sync"] thiserror.workspace = true url.workspace = true From e515ed23e8af7f849cad9a74e40c64c973149e6d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 21 Nov 2024 09:43:51 -0500 Subject: [PATCH 373/436] fix(task): ensure root config always looks up dependencies in root (#26959) We were accidentally looking up dependencies in the member. --- cli/tools/task.rs | 188 +++++++++++------- .../__test__.jsonc | 5 + .../dependencies_root_not_cycle/deno.json | 10 + .../member/deno.json | 8 + .../task/dependencies_root_not_cycle/task.out | 6 + .../__test__.jsonc | 14 ++ .../deno.jsonc | 12 ++ .../member/deno.jsonc | 12 ++ .../member_depending_root_and_member.out | 10 + .../root_dependending_root.out | 4 + 10 files changed, 202 insertions(+), 67 deletions(-) create mode 100644 tests/specs/task/dependencies_root_not_cycle/__test__.jsonc create mode 100644 tests/specs/task/dependencies_root_not_cycle/deno.json create mode 100644 tests/specs/task/dependencies_root_not_cycle/member/deno.json create mode 100644 tests/specs/task/dependencies_root_not_cycle/task.out create mode 100644 tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc create mode 100644 tests/specs/task/dependencies_shadowed_root_name/deno.jsonc create mode 100644 tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc create mode 100644 tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out create mode 100644 tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out diff --git a/cli/tools/task.rs b/cli/tools/task.rs index b0c290adc0fcf2..478853f4e64f61 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -12,6 +12,7 @@ use deno_config::workspace::FolderConfigs; use deno_config::workspace::TaskDefinition; use deno_config::workspace::TaskOrScript; use deno_config::workspace::WorkspaceDirectory; +use deno_config::workspace::WorkspaceMemberTasksConfig; use deno_config::workspace::WorkspaceTasksConfig; use deno_core::anyhow::anyhow; use deno_core::anyhow::bail; @@ -270,11 +271,7 @@ impl<'a> TaskRunner<'a> { pkg_tasks_config: &PackageTaskInfo, ) -> Result { match sort_tasks_topo(pkg_tasks_config) { - Ok(sorted) => { - self - .run_tasks_in_parallel(&pkg_tasks_config.tasks_config, sorted) - .await - } + Ok(sorted) => self.run_tasks_in_parallel(sorted).await, Err(err) => match err { TaskError::NotFound(name) => { if self.task_flags.is_run { @@ -308,64 +305,62 @@ impl<'a> TaskRunner<'a> { async fn run_tasks_in_parallel( &self, - tasks_config: &WorkspaceTasksConfig, - task_names: Vec, + tasks: Vec>, ) -> Result { - struct PendingTasksContext { - completed: HashSet, - running: HashSet, - task_names: Vec, + struct PendingTasksContext<'a> { + completed: HashSet, + running: HashSet, + tasks: &'a [ResolvedTask<'a>], } - impl PendingTasksContext { + impl<'a> PendingTasksContext<'a> { fn has_remaining_tasks(&self) -> bool { - self.completed.len() < self.task_names.len() + self.completed.len() < self.tasks.len() } - fn mark_complete(&mut self, task_name: String) { - self.running.remove(&task_name); - self.completed.insert(task_name); + fn mark_complete(&mut self, task: &ResolvedTask) { + self.running.remove(&task.id); + self.completed.insert(task.id); } - fn get_next_task<'a>( + fn get_next_task<'b>( &mut self, - runner: &'a TaskRunner<'a>, - tasks_config: &'a WorkspaceTasksConfig, - ) -> Option>> { - for name in &self.task_names { - if self.completed.contains(name) || self.running.contains(name) { + runner: &'b TaskRunner<'b>, + ) -> Option< + LocalBoxFuture<'b, Result<(i32, &'a ResolvedTask<'a>), AnyError>>, + > + where + 'a: 'b, + { + for task in self.tasks.iter() { + if self.completed.contains(&task.id) + || self.running.contains(&task.id) + { continue; } - let Some((folder_url, task_or_script)) = tasks_config.task(name) - else { - continue; - }; - let should_run = match task_or_script { - TaskOrScript::Task(_, def) => def - .dependencies - .iter() - .all(|dep| self.completed.contains(dep)), - TaskOrScript::Script(_, _) => true, - }; - + let should_run = task + .dependencies + .iter() + .all(|dep_id| self.completed.contains(dep_id)); if !should_run { continue; } - self.running.insert(name.clone()); - let name = name.clone(); + self.running.insert(task.id); return Some( async move { - match task_or_script { + match task.task_or_script { TaskOrScript::Task(_, def) => { - runner.run_deno_task(folder_url, &name, def).await + runner.run_deno_task(task.folder_url, task.name, def).await } TaskOrScript::Script(scripts, _) => { - runner.run_npm_script(folder_url, &name, scripts).await + runner + .run_npm_script(task.folder_url, task.name, scripts) + .await } } - .map(|exit_code| (exit_code, name)) + .map(|exit_code| (exit_code, task)) } .boxed_local(), ); @@ -375,16 +370,16 @@ impl<'a> TaskRunner<'a> { } let mut context = PendingTasksContext { - completed: HashSet::with_capacity(task_names.len()), + completed: HashSet::with_capacity(tasks.len()), running: HashSet::with_capacity(self.concurrency), - task_names, + tasks: &tasks, }; let mut queue = futures_unordered::FuturesUnordered::new(); while context.has_remaining_tasks() { while queue.len() < self.concurrency { - if let Some(task) = context.get_next_task(self, tasks_config) { + if let Some(task) = context.get_next_task(self) { queue.push(task); } else { break; @@ -393,7 +388,7 @@ impl<'a> TaskRunner<'a> { // If queue is empty at this point, then there are no more tasks in the queue. let Some(result) = queue.next().await else { - debug_assert_eq!(context.task_names.len(), 0); + debug_assert_eq!(context.tasks.len(), 0); break; }; @@ -521,46 +516,105 @@ enum TaskError { TaskDepCycle { path: Vec }, } -fn sort_tasks_topo( - pkg_task_config: &PackageTaskInfo, -) -> Result, TaskError> { +struct ResolvedTask<'a> { + id: usize, + name: &'a str, + folder_url: &'a Url, + task_or_script: TaskOrScript<'a>, + dependencies: Vec, +} + +fn sort_tasks_topo<'a>( + pkg_task_config: &'a PackageTaskInfo, +) -> Result>, TaskError> { + trait TasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)>; + } + + impl TasksConfig for WorkspaceTasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)> { + if let Some(member) = &self.member { + if let Some((dir_url, task_or_script)) = member.task(name) { + return Some((dir_url, task_or_script, self as &dyn TasksConfig)); + } + } + if let Some(root) = &self.root { + if let Some((dir_url, task_or_script)) = root.task(name) { + // switch to only using the root tasks for the dependencies + return Some((dir_url, task_or_script, root as &dyn TasksConfig)); + } + } + None + } + } + + impl TasksConfig for WorkspaceMemberTasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)> { + self.task(name).map(|(dir_url, task_or_script)| { + (dir_url, task_or_script, self as &dyn TasksConfig) + }) + } + } + fn sort_visit<'a>( name: &'a str, - sorted: &mut Vec, - mut path: Vec<&'a str>, - tasks_config: &'a WorkspaceTasksConfig, - ) -> Result<(), TaskError> { - // Already sorted - if sorted.iter().any(|sorted_name| sorted_name == name) { - return Ok(()); + sorted: &mut Vec>, + mut path: Vec<(&'a Url, &'a str)>, + tasks_config: &'a dyn TasksConfig, + ) -> Result { + let Some((folder_url, task_or_script, tasks_config)) = + tasks_config.task(name) + else { + return Err(TaskError::NotFound(name.to_string())); + }; + + if let Some(existing_task) = sorted + .iter() + .find(|task| task.name == name && task.folder_url == folder_url) + { + // already exists + return Ok(existing_task.id); } - // Graph has a cycle - if path.contains(&name) { - path.push(name); + if path.contains(&(folder_url, name)) { + path.push((folder_url, name)); return Err(TaskError::TaskDepCycle { - path: path.iter().map(|s| s.to_string()).collect(), + path: path.iter().map(|(_, s)| s.to_string()).collect(), }); } - let Some((_, task_or_script)) = tasks_config.task(name) else { - return Err(TaskError::NotFound(name.to_string())); - }; - + let mut dependencies: Vec = Vec::new(); if let TaskOrScript::Task(_, task) = task_or_script { + dependencies.reserve(task.dependencies.len()); for dep in &task.dependencies { let mut path = path.clone(); - path.push(name); - sort_visit(dep, sorted, path, tasks_config)? + path.push((folder_url, name)); + dependencies.push(sort_visit(dep, sorted, path, tasks_config)?); } } - sorted.push(name.to_string()); + let id = sorted.len(); + sorted.push(ResolvedTask { + id, + name, + folder_url, + task_or_script, + dependencies, + }); - Ok(()) + Ok(id) } - let mut sorted: Vec = vec![]; + let mut sorted: Vec> = vec![]; for name in &pkg_task_config.matched_tasks { sort_visit(name, &mut sorted, Vec::new(), &pkg_task_config.tasks_config)?; diff --git a/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc b/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc new file mode 100644 index 00000000000000..073210358209a1 --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "task a", + "cwd": "member", + "output": "task.out" +} diff --git a/tests/specs/task/dependencies_root_not_cycle/deno.json b/tests/specs/task/dependencies_root_not_cycle/deno.json new file mode 100644 index 00000000000000..43a4952f938732 --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/deno.json @@ -0,0 +1,10 @@ +{ + "tasks": { + "a": "echo root-a", + "b": { + "dependencies": ["a"], + "command": "echo b" + } + }, + "workspace": ["./member"] +} diff --git a/tests/specs/task/dependencies_root_not_cycle/member/deno.json b/tests/specs/task/dependencies_root_not_cycle/member/deno.json new file mode 100644 index 00000000000000..08c3493c73a1da --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/member/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "a": { + "dependencies": ["b"], + "command": "echo a" + } + } +} diff --git a/tests/specs/task/dependencies_root_not_cycle/task.out b/tests/specs/task/dependencies_root_not_cycle/task.out new file mode 100644 index 00000000000000..0194f31e4e3fad --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/task.out @@ -0,0 +1,6 @@ +Task a echo root-a +root-a +Task b echo b +b +Task a echo a +a diff --git a/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc b/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc new file mode 100644 index 00000000000000..9d3d50582c5f11 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "root_dependending_root": { + "args": "task root-depending-root", + "cwd": "member", + "output": "root_dependending_root.out" + }, + "member_depending_root_and_member": { + "args": "task member-dependending-root-and-member", + "cwd": "member", + "output": "member_depending_root_and_member.out" + } + } +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc b/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc new file mode 100644 index 00000000000000..88f0ee4e9eef09 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "build": "echo root", + "root-depending-root": { + "dependencies": [ + "build" + ], + "command": "echo test" + } + }, + "workspace": ["./member"] +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc b/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc new file mode 100644 index 00000000000000..df5ac047a3842d --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "build": "echo member", + "member-dependending-root-and-member": { + "dependencies": [ + "build", + "root-depending-root" + ], + "command": "echo member-test" + } + } +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out b/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out new file mode 100644 index 00000000000000..3b6fd0e0a440f0 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Task build echo member +member +Task build echo root +root +Task root-depending-root echo test +test +[UNORDERED_END] +Task member-dependending-root-and-member echo member-test +member-test diff --git a/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out b/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out new file mode 100644 index 00000000000000..2b8d9d5efebf22 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out @@ -0,0 +1,4 @@ +Task build echo root +root +Task root-depending-root echo test +test From 3f3568bd95aac366bd03044850dd7d2c6d013ea7 Mon Sep 17 00:00:00 2001 From: Cornelius Krassow <58032399+ckrassow@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:54:20 +0100 Subject: [PATCH 374/436] fix(cli): Fix typo in doc subcommand help output (#26321) --- cli/args/flags.rs | 2 +- tests/integration/flags_tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index f6d53cd15e035a..d8ab46b6544d2a 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1232,7 +1232,7 @@ static DENO_HELP: &str = cstr!( compile Compile the script into a self contained executable deno compile main.ts | deno compile --target=x86_64-unknown-linux-gnu coverage Print coverage reports - doc Genereate and show documentation for a module or built-ins + doc Generate and show documentation for a module or built-ins deno doc | deno doc --json | deno doc --html mod.ts fmt Format source files deno fmt | deno fmt main.ts diff --git a/tests/integration/flags_tests.rs b/tests/integration/flags_tests.rs index 663da363da88a2..e233ca5baf4b40 100644 --- a/tests/integration/flags_tests.rs +++ b/tests/integration/flags_tests.rs @@ -24,7 +24,7 @@ fn help_output() { "Type-check the dependencies", "Compile the script into a self contained executable", "Print coverage reports", - "Genereate and show documentation for a module or built-ins", + "Generate and show documentation for a module or built-ins", "Format source files", "Show info about cache or info related to source file", "Deno kernel for Jupyter notebooks", From aa0ba6580eeb8045433d3eeffc19fc14a36f0361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Nov 2024 16:27:37 +0000 Subject: [PATCH 375/436] fix: Buffer global in --unstable-node-globals (#26973) --- runtime/js/98_global_scope_shared.js | 2 +- tests/specs/run/unstable/node_globals.out | 8 +++++++- tests/specs/run/unstable/node_globals.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/runtime/js/98_global_scope_shared.js b/runtime/js/98_global_scope_shared.js index f8e76b7ce7e981..c01bde6fad68f6 100644 --- a/runtime/js/98_global_scope_shared.js +++ b/runtime/js/98_global_scope_shared.js @@ -32,7 +32,7 @@ import { DOMException } from "ext:deno_web/01_dom_exception.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import * as imageData from "ext:deno_web/16_image_data.js"; import process from "node:process"; -import Buffer from "node:buffer"; +import { Buffer } from "node:buffer"; import { clearImmediate, setImmediate } from "node:timers"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; diff --git a/tests/specs/run/unstable/node_globals.out b/tests/specs/run/unstable/node_globals.out index 77045c7cbd785d..8262ace2712274 100644 --- a/tests/specs/run/unstable/node_globals.out +++ b/tests/specs/run/unstable/node_globals.out @@ -1,4 +1,10 @@ global: true -Buffer: true +Buffer: function from( + value, + encodingOrOffset, + length, +) { + return _from(value, encodingOrOffset, length); +} setImmediate: true clearImmediate: true diff --git a/tests/specs/run/unstable/node_globals.ts b/tests/specs/run/unstable/node_globals.ts index 706b7eb6549ed1..3a000ea3417f61 100644 --- a/tests/specs/run/unstable/node_globals.ts +++ b/tests/specs/run/unstable/node_globals.ts @@ -2,6 +2,6 @@ import * as nodeBuffer from "node:buffer"; import * as nodeTimers from "node:timers"; console.log(`global: ${globalThis === global}`); -console.log(`Buffer: ${Buffer === nodeBuffer.default}`); +console.log(`Buffer: ${Buffer.from}`); console.log(`setImmediate: ${setImmediate === nodeTimers.setImmediate}`); console.log(`clearImmediate: ${clearImmediate === nodeTimers.clearImmediate}`); From bfa9230d3b92115f73854339da972881c0d41e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Nov 2024 16:29:40 +0000 Subject: [PATCH 376/436] fix(watch): don't panic if there's no path provided (#26972) Closes https://github.com/denoland/deno/issues/26970 --- cli/util/file_watcher.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs index eb3fb8c6029c21..b9318a6e4bd612 100644 --- a/cli/util/file_watcher.rs +++ b/cli/util/file_watcher.rs @@ -185,9 +185,11 @@ impl WatcherCommunicator { pub fn show_path_changed(&self, changed_paths: Option>) { if let Some(paths) = changed_paths { - self.print( - format!("Restarting! File change detected: {:?}", paths[0]).to_string(), - ) + if !paths.is_empty() { + self.print(format!("Restarting! File change detected: {:?}", paths[0])) + } else { + self.print("Restarting! File change detected.".to_string()) + } } } } From 75f8164b043339bf4883774dad29250c46201df2 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 21 Nov 2024 17:30:07 +0100 Subject: [PATCH 377/436] chore: update url + idna (#26963) They were pinned to old versions. This commit removes the pin. --- Cargo.lock | 211 +++++++++++++++++- Cargo.toml | 3 +- ext/node/Cargo.toml | 2 +- tests/specs/doc/invalid_url/invalid_url.out | 2 +- tests/wpt/runner/expectation.json | 229 +------------------- 5 files changed, 211 insertions(+), 236 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf6d3a37147e94..5ca7f30c947a47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1911,7 +1911,7 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-util", - "idna 0.3.0", + "idna 1.0.3", "indexmap 2.3.0", "ipnetwork", "k256", @@ -3982,6 +3982,124 @@ dependencies = [ "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3990,9 +4108,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4000,12 +4118,23 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -4477,6 +4606,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "litrs" version = "0.4.1" @@ -7636,6 +7771,16 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -8048,12 +8193,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 1.0.3", "percent-encoding", "serde", ] @@ -8076,12 +8221,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.1" @@ -8690,6 +8847,18 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wtf8" version = "0.1.0" @@ -8880,6 +9049,28 @@ dependencies = [ "uuid", ] +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "zip" version = "2.1.6" diff --git a/Cargo.toml b/Cargo.toml index 5f66c0d44de82f..d1e958fe1b8674 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -200,8 +200,7 @@ tower-http = { version = "0.6.1", features = ["decompression-br", "decompression tower-lsp = { package = "deno_tower_lsp", version = "0.1.0", features = ["proposed"] } tower-service = "0.3.2" twox-hash = "=1.6.3" -# Upgrading past 2.4.1 may cause WPT failures -url = { version = "< 2.5.0", features = ["serde", "expose_internals"] } +url = { version = "2.5", features = ["serde", "expose_internals"] } uuid = { version = "1.3.0", features = ["v4"] } webpki-root-certs = "0.26.5" webpki-roots = "0.26" diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 3502d3b5f851d1..e1650282c2b3b5 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -54,7 +54,7 @@ http.workspace = true http-body-util.workspace = true hyper.workspace = true hyper-util.workspace = true -idna = "0.3.0" +idna = "1.0.3" indexmap.workspace = true ipnetwork = "0.20.0" k256 = "0.13.1" diff --git a/tests/specs/doc/invalid_url/invalid_url.out b/tests/specs/doc/invalid_url/invalid_url.out index 038c53177a336c..17974318c7f019 100644 --- a/tests/specs/doc/invalid_url/invalid_url.out +++ b/tests/specs/doc/invalid_url/invalid_url.out @@ -1,4 +1,4 @@ error: Invalid URL 'https://raw.githubusercontent.com%2Fdyedgreen%2Fdeno-sqlite%2Frework_api%2Fmod.ts' Caused by: - invalid domain character + invalid international domain name diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json index 23cc85b498811f..1a7cb8c560f8f6 100644 --- a/tests/wpt/runner/expectation.json +++ b/tests/wpt/runner/expectation.json @@ -3741,18 +3741,12 @@ "ab--c.ß (using .hostname)", "ab--c.ß (using .host)", "ab--c.ß (using .hostname)", - "‍.example (using URL)", - "‍.example (using URL.host)", - "‍.example (using URL.hostname)", "‍.example (using )", "‍.example (using .host)", "‍.example (using .hostname)", "‍.example (using )", "‍.example (using .host)", "‍.example (using .hostname)", - "xn--1ug.example (using URL)", - "xn--1ug.example (using URL.host)", - "xn--1ug.example (using URL.hostname)", "xn--1ug.example (using )", "xn--1ug.example (using .host)", "xn--1ug.example (using .hostname)", @@ -3874,18 +3868,8 @@ ], "url-searchparams.any.html": true, "url-searchparams.any.worker.html": true, - "url-setters-stripping.any.html": [ - "Setting port with leading U+0000 (https:)", - "Setting port with leading U+001F (https:)", - "Setting port with leading U+0000 (wpt++:)", - "Setting port with leading U+001F (wpt++:)" - ], - "url-setters-stripping.any.worker.html": [ - "Setting port with leading U+0000 (https:)", - "Setting port with leading U+001F (https:)", - "Setting port with leading U+0000 (wpt++:)", - "Setting port with leading U+001F (wpt++:)" - ], + "url-setters-stripping.any.html": true, + "url-setters-stripping.any.worker.html": true, "url-tojson.any.html": true, "url-tojson.any.worker.html": true, "urlencoded-parser.any.html": true, @@ -3894,12 +3878,8 @@ "urlsearchparams-append.any.worker.html": true, "urlsearchparams-constructor.any.html": true, "urlsearchparams-constructor.any.worker.html": true, - "urlsearchparams-delete.any.html": [ - "Changing the query of a URL with an opaque path can impact the path if the URL has no fragment" - ], - "urlsearchparams-delete.any.worker.html": [ - "Changing the query of a URL with an opaque path can impact the path if the URL has no fragment" - ], + "urlsearchparams-delete.any.html": true, + "urlsearchparams-delete.any.worker.html": true, "urlsearchparams-foreach.any.html": true, "urlsearchparams-foreach.any.worker.html": true, "urlsearchparams-get.any.html": true, @@ -3932,182 +3912,7 @@ "Input − with encoding utf-8", "Input ĂĄ| with encoding utf-8" ], - "IdnaTestV2.window.html": [ - "ToASCII(\"a‌b\") C1", - "ToASCII(\"A‌B\") C1", - "ToASCII(\"A‌b\") C1", - "ToASCII(\"xn--ab-j1t\") C1", - "ToASCII(\"a‍b\") C2", - "ToASCII(\"A‍B\") C2", - "ToASCII(\"A‍b\") C2", - "ToASCII(\"xn--ab-m1t\") C2", - "ToASCII(\"1.aß‌‍b‌‍cßßßßdÏ‚ÏƒĂŸĂŸĂŸĂŸĂŸĂŸĂŸĂŸeßßßßßßßßßßxßßßßßßßßßßyĂŸĂŸĂŸĂŸĂŸĂŸĂŸĂŸÌ‚ĂŸz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ASS‌‍B‌‍CSSSSSSSSDÎŁÎŁSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ASS‌‍B‌‍CSSSSSSSSDÎŁÎŁSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSƜSSZ\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssƝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssƝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa69989dba9gc\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Aß‌‍b‌‍cßßßßdÏ‚ÏƒĂŸĂŸĂŸĂŸĂŸĂŸĂŸĂŸeßßßßßßßßßßxßßßßßßßßßßyĂŸĂŸĂŸĂŸĂŸĂŸĂŸĂŸÌ‚ĂŸz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.xn--abcdexyz-qyacaaabaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaa010ze2isb1140zba8cc\") C1; C2; A4_2 (ignored)", - "ToASCII(\"‌x‍n‌-‍-bß\") C1; C2", - "ToASCII(\"‌X‍N‌-‍-BSS\") C1; C2", - "ToASCII(\"‌x‍n‌-‍-bss\") C1; C2", - "ToASCII(\"‌X‍n‌-‍-Bss\") C1; C2", - "ToASCII(\"xn--xn--bss-7z6ccid\") C1; C2", - "ToASCII(\"‌X‍n‌-‍-Bß\") C1; C2", - "ToASCII(\"xn--xn--b-pqa5796ccahd\") C1; C2", - "ToASCII(\"àźč‍\") C2", - "ToASCII(\"xn--dmc225h\") C2", - "ToASCII(\"‍\") C2", - "ToASCII(\"xn--1ug\") C2", - "ToASCII(\"àźč‌\") C1", - "ToASCII(\"xn--dmc025h\") C1", - "ToASCII(\"‌\") C1", - "ToASCII(\"xn--0ug\") C1", - "ToASCII(\"ÛŻâ€ŒÛŻ\") C1", - "ToASCII(\"xn--cmba004q\") C1", - "ToASCII(\"ĂŸÛ«ă€‚â€\") C2", - "ToASCII(\"SSÛ«ă€‚â€\") C2", - "ToASCII(\"ssÛ«ă€‚â€\") C2", - "ToASCII(\"SsÛ«ă€‚â€\") C2", - "ToASCII(\"xn--ss-59d.xn--1ug\") C2", - "ToASCII(\"xn--zca012a.xn--1ug\") C2", - "ToASCII(\"‌ꞃ.抶-\") C1; V3 (ignored)", - "ToASCII(\"‌그á†Č.抶-\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug3307c.xn----d87b\") C1; V3 (ignored)", - "ToASCII(\"Å둄-‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Ă„ë‘„-.‌\") C1; V3 (ignored)", - "ToASCII(\"xn----1fa1788k.xn--0ug\") C1; V3 (ignored)", - "ToASCII(\"å둄-‌\") C1; V3 (ignored)", - "ToASCII(\"Ă„ë‘„-‌\") C1; V3 (ignored)", - "ToASCII(\"êĄŠáĄ‘â€1.。𐋣-\") C2; V3 (ignored); A4_2 (ignored)", - "ToASCII(\"xn--1-o7j663bdl7m..xn----381i\") C2; V3 (ignored); A4_2 (ignored)", - "ToASCII(\"1.ä°č‍-ă€‚ì›ˆ\") C2; V3 (ignored)", - "ToASCII(\"1.ä°č‍-。ᄋᅼᆿ\") C2; V3 (ignored)", - "ToASCII(\"1.xn----tgnz80r.xn--kp5b\") C2; V3 (ignored)", - "ToASCII(\"-3.‍ヌ᱕\") C2; V3 (ignored)", - "ToASCII(\"-3.xn--fbf739aq5o\") C2; V3 (ignored)", - "ToASCII(\"ς-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"ς-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"ÎŁ-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"σ-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"xn----zmb.xn--1--i1t\") C1; V3 (ignored)", - "ToASCII(\"xn----xmb.xn--1--i1t\") C1; V3 (ignored)", - "ToASCII(\"ÎŁ-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"σ-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"áĄŻâš‰ć§¶đŸ„‰ïŒŽÛ·â€đŸŽȘ‍\") C2; P1; V6", - "ToASCII(\"đŸ”éšâŻźïŒŽá â€Œ\") C1", - "ToASCII(\"9隁⯼.᠍‌\") C1", - "ToASCII(\"xn--9-mfs8024b.xn--0ug\") C1", - "ToASCII(\"ĂŸâ€Œê«¶áą„.⊶⎥⎖\") C1", - "ToASCII(\"ssâ€Œê«¶áą„.⊶⎥⎖\") C1", - "ToASCII(\"xn--ss-4ep585bkm5p.xn--ifh802b6a\") C1", - "ToASCII(\"xn--zca682johfi89m.xn--ifh802b6a\") C1", - "ToASCII(\"ĂŸâ€Œê«¶áą„ïŒŽâŠ¶âŽĄâŽ–\") C1", - "ToASCII(\"ssâ€Œê«¶áą„ïŒŽâŠ¶âŽĄâŽ–\") C1", - "ToASCII(\"-ïœĄâ€\") C2; V3 (ignored)", - "ToASCII(\"-。‍\") C2; V3 (ignored)", - "ToASCII(\"-.xn--1ug\") C2; V3 (ignored)", - "ToASCII(\"ς‍-.⮣𩟙\") C2; V3 (ignored)", - "ToASCII(\"σ‍-.⮣𩟙\") C2; V3 (ignored)", - "ToASCII(\"xn----zmb048s.xn--rlj2573p\") C2; V3 (ignored)", - "ToASCII(\"xn----xmb348s.xn--rlj2573p\") C2; V3 (ignored)", - "ToASCII(\"é±Šă€‚â€Œ\") C1", - "ToASCII(\"xn--rt6a.xn--0ug\") C1", - "ToASCII(\"â€ŒâŽšă€‚Ï‚\") C1", - "ToASCII(\"â€ŒâŽšă€‚Ïƒ\") C1", - "ToASCII(\"xn--0ug262c.xn--4xa\") C1", - "ToASCII(\"xn--0ug262c.xn--3xa\") C1", - "ToASCII(\"â€ŒâŽšïœĄÏ‚\") C1", - "ToASCII(\"â€ŒâŽšïœĄÏƒ\") C1", - "ToASCII(\"â€âŸ•ă€‚â€ŒÌê„“êĄŽ\") C1; C2", - "ToASCII(\"â€âŸ•ă€‚â€Œê„“ÌêĄŽ\") C1; C2", - "ToASCII(\"â€è°·ă€‚â€Œê„“ÌêĄŽ\") C1; C2", - "ToASCII(\"xn--1ug0273b.xn--0sa359l6n7g13a\") C1; C2", - "ToASCII(\"‍。‌\") C1; C2", - "ToASCII(\"xn--1ug.xn--0ug\") C1; C2", - "ToASCII(\"‌。。\") C1; A4_2 (ignored)", - "ToASCII(\"xn--0ug..\") C1; A4_2 (ignored)", - "ToASCII(\"áĄČ-đŸč.ß-‌-\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-3.ß-‌-\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-3.SS-‌-\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-3.ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-3.Ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"xn---3-p9o.xn--ss---276a\") C1; V3 (ignored)", - "ToASCII(\"xn---3-p9o.xn-----fia9303a\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-đŸč.SS-‌-\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-đŸč.ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"áĄČ-đŸč.Ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"đŸ™ïœĄâ€đŸžâ€â·\") C2", - "ToASCII(\"1。‍2‍7\") C2", - "ToASCII(\"1.xn--27-l1tb\") C2", - "ToASCII(\"‌.ß⮉-\") C1; V3 (ignored)", - "ToASCII(\"‌.ss⮉-\") C1; V3 (ignored)", - "ToASCII(\"‌.Ss⮉-\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug.xn--ss--bi1b\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug.xn----pfa2305a\") C1; V3 (ignored)", - "ToASCII(\"⮏󠅋-.‍⮉\") C2; V3 (ignored)", - "ToASCII(\"xn----3vs.xn--1ug532c\") C2; V3 (ignored)", - "ToASCII(\"⮏󠅋-‍⎉\") C2; V3 (ignored)", - "ToASCII(\"。⮖ͩ.‌\") C1; A4_2 (ignored)", - "ToASCII(\".xn--hva754s.xn--0ug\") C1; A4_2 (ignored)", - "ToASCII(\"â€æ”ŒêŻ­ă€‚áą–-⎘\") C2", - "ToASCII(\"xn--1ug592ykp6b.xn----mck373i\") C2", - "ToASCII(\"‌ꖚ.16.3íˆ’Ûł\") C1", - "ToASCII(\"‌ꖚ.16.3á„á…­á†©Ûł\") C1", - "ToASCII(\"xn--0ug2473c.16.xn--3-nyc0117m\") C1", - "ToASCII(\"𝟏𝹙⾖.‍\") C2", - "ToASCII(\"1𝹙⾖.‍\") C2", - "ToASCII(\"xn--1-5bt6845n.xn--1ug\") C2", - "ToASCII(\"-‍.⎞𐋷\") C2; V3 (ignored)", - "ToASCII(\"xn----ugn.xn--mlj8559d\") C2; V3 (ignored)", - "ToASCII(\"ćŹƒđŒïŒŽâ€à­„\") C2", - "ToASCII(\"欃𝍌.‍ୄ\") C2", - "ToASCII(\"xn--b6s0078f.xn--0ic557h\") C2", - "ToASCII(\"‍.F\") C2", - "ToASCII(\"‍.f\") C2", - "ToASCII(\"xn--1ug.f\") C2", - "ToASCII(\"‍ăšČïœĄĂŸ\") C2", - "ToASCII(\"‍ăšČ。ß\") C2", - "ToASCII(\"‍ăšČ。SS\") C2", - "ToASCII(\"‍ăšČ。ss\") C2", - "ToASCII(\"‍ăšČ。Ss\") C2", - "ToASCII(\"xn--1ug914h.ss\") C2", - "ToASCII(\"xn--1ug914h.xn--zca\") C2", - "ToASCII(\"‍ăšČïœĄSS\") C2", - "ToASCII(\"‍ăšČïœĄss\") C2", - "ToASCII(\"‍ăšČïœĄSs\") C2", - "ToASCII(\"ç’Œđš­ïœĄâ€Œó ‡Ÿ\") C1", - "ToASCII(\"ç’Œđš­ă€‚â€Œó ‡Ÿ\") C1", - "ToASCII(\"xn--gky8837e.xn--0ug\") C1", - "ToASCII(\"‌.‌\") C1", - "ToASCII(\"xn--0ug.xn--0ug\") C1", - "ToASCII(\"𝟠4ó ‡—đˆ»ïŒŽâ€đ‹”â›§â€\") C2", - "ToASCII(\"84ó ‡—đˆ».â€đ‹”â›§â€\") C2", - "ToASCII(\"xn--84-s850a.xn--1uga573cfq1w\") C2", - "ToASCII(\"‍‌ó †ȘïœĄĂŸđ‘“ƒ\") C1; C2", - "ToASCII(\"‍‌ó †Ș。ß𑓃\") C1; C2", - "ToASCII(\"‍‌ó †Ș。SS𑓃\") C1; C2", - "ToASCII(\"‍‌ó †Ș。ss𑓃\") C1; C2", - "ToASCII(\"‍‌ó †Ș。Ss𑓃\") C1; C2", - "ToASCII(\"xn--0ugb.xn--ss-bh7o\") C1; C2", - "ToASCII(\"xn--0ugb.xn--zca0732l\") C1; C2", - "ToASCII(\"‍‌ó †ȘïœĄSS𑓃\") C1; C2", - "ToASCII(\"‍‌ó †ȘïœĄss𑓃\") C1; C2", - "ToASCII(\"‍‌ó †ȘïœĄSs𑓃\") C1; C2", - "ToASCII(\"ă€‚â€Œăƒ¶ä’©.êĄȘ\") C1; A4_2 (ignored)", - "ToASCII(\".xn--0ug287dj0o.xn--gd9a\") C1; A4_2 (ignored)", - "ToASCII(\"æą‰ă€‚â€Œ\") C1", - "ToASCII(\"xn--7zv.xn--0ug\") C1", - "ToASCII(\"đ‹·ă€‚â€\") C2", - "ToASCII(\"xn--r97c.xn--1ug\") C2" - ], + "IdnaTestV2.window.html": true, "javascript-urls.window.html": false, "url-constructor.any.html?exclude=(file|javascript|mailto)": [ "Parsing: without base", @@ -4760,21 +4565,11 @@ ": Setting .pathname = '/foo' Opaque paths cannot be set" ], "url-setters.any.html?exclude=(file|javascript|mailto)": [ - "URL: Setting .host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", - "URL: Setting .host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", "URL: Setting .hostname = 'example.com:8080' : delimiter invalidates entire value", "URL: Setting .hostname = 'example.com:' : delimiter invalidates entire value", "URL: Setting .hostname = 'h' Drop /. from path", "URL: Setting .hostname = ''", - "URL: Setting .port = 'randomstring' Setting port to a string that doesn't parse as a number", - "URL: Setting .pathname = '' Non-special URLs can have their paths erased", - "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased", - "URL: Setting .pathname = '/.//p' Serialize /. in path", - "URL: Setting .pathname = '/..//p'", - "URL: Setting .pathname = '//p'", - "URL: Setting .pathname = 'p' Drop /. from path", - "URL: Setting .search = '' Do not drop trailing spaces from non-trailing opaque paths", - "URL: Setting .search = ''" + "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased" ], "url-setters.any.html?include=file": [ "URL: Setting .pathname = '\\\\' File URLs and (back)slashes", @@ -4784,21 +4579,11 @@ "url-setters.any.html?include=javascript": true, "url-setters.any.html?include=mailto": true, "url-setters.any.worker.html?exclude=(file|javascript|mailto)": [ - "URL: Setting .host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", - "URL: Setting .host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", "URL: Setting .hostname = 'example.com:8080' : delimiter invalidates entire value", "URL: Setting .hostname = 'example.com:' : delimiter invalidates entire value", "URL: Setting .hostname = 'h' Drop /. from path", "URL: Setting .hostname = ''", - "URL: Setting .port = 'randomstring' Setting port to a string that doesn't parse as a number", - "URL: Setting .pathname = '' Non-special URLs can have their paths erased", - "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased", - "URL: Setting .pathname = '/.//p' Serialize /. in path", - "URL: Setting .pathname = '/..//p'", - "URL: Setting .pathname = '//p'", - "URL: Setting .pathname = 'p' Drop /. from path", - "URL: Setting .search = '' Do not drop trailing spaces from non-trailing opaque paths", - "URL: Setting .search = ''" + "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased" ], "url-setters.any.worker.html?include=file": [ "URL: Setting .pathname = '\\\\' File URLs and (back)slashes", From 928808163816c69ac53ee4d56d2762a7f4c7312f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 21 Nov 2024 11:37:10 -0500 Subject: [PATCH 378/436] fix(node): regression where ts files were sometimes resolved instead of js (#26971) --- ext/node/polyfills/01_require.js | 54 +++++++++++------- .../npm/pkg_index_ts_and_js/__test__.jsonc | 4 ++ tests/specs/npm/pkg_index_ts_and_js/index.js | 1 + .../node_modules/package/index.js | 3 + .../node_modules/package/json/index.js | 1 + .../node_modules/package/json/index.json | 1 + .../node_modules/package/package.json | 3 + .../node_modules/package/subdir/index.js | 1 + .../node_modules/package/subdir/index.ts | 1 + .../node_modules/package/wasm/index.js | 1 + .../node_modules/package/wasm/index.wasm | Bin 0 -> 318 bytes .../npm/pkg_index_ts_and_js/package.json | 5 ++ 12 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc create mode 100644 tests/specs/npm/pkg_index_ts_and_js/index.js create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js create mode 100644 tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm create mode 100644 tests/specs/npm/pkg_index_ts_and_js/package.json diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index db032014c2d07b..df73cad6b7ddc2 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -1060,22 +1060,39 @@ Module.prototype._compile = function (content, filename, format) { return result; }; -Module._extensions[".js"] = - Module._extensions[".ts"] = - Module._extensions[".jsx"] = - Module._extensions[".tsx"] = - function (module, filename) { - const content = op_require_read_file(filename); - const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; - module._compile(content, filename, format); - }; - -Module._extensions[".cjs"] = - Module._extensions[".cts"] = - function (module, filename) { - const content = op_require_read_file(filename); - module._compile(content, filename, "commonjs"); - }; +Module._extensions[".js"] = function (module, filename) { + // We don't define everything on Module.extensions in + // order to prevent probing for these files + if ( + StringPrototypeEndsWith(filename, ".js") || + StringPrototypeEndsWith(filename, ".ts") || + StringPrototypeEndsWith(filename, ".jsx") || + StringPrototypeEndsWith(filename, ".tsx") + ) { + return loadMaybeCjs(module, filename); + } else if (StringPrototypeEndsWith(filename, ".mts")) { + return loadESMFromCJS(module, filename); + } else if (StringPrototypeEndsWith(filename, ".cts")) { + return loadCjs(module, filename); + } else { + return loadMaybeCjs(module, filename); + } +}; + +Module._extensions[".cjs"] = loadCjs; +Module._extensions[".mjs"] = loadESMFromCJS; +Module._extensions[".wasm"] = loadESMFromCJS; + +function loadMaybeCjs(module, filename) { + const content = op_require_read_file(filename); + const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; + module._compile(content, filename, format); +} + +function loadCjs(module, filename) { + const content = op_require_read_file(filename); + module._compile(content, filename, "commonjs"); +} function loadESMFromCJS(module, filename, code) { const namespace = op_import_sync( @@ -1086,11 +1103,6 @@ function loadESMFromCJS(module, filename, code) { module.exports = namespace; } -Module._extensions[".mjs"] = - Module._extensions[".mts"] = - Module._extensions[".wasm"] = - loadESMFromCJS; - function stripBOM(content) { if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) { content = StringPrototypeSlice(content, 1); diff --git a/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc b/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc new file mode 100644 index 00000000000000..689f6e1f41512e --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run index.js", + "output": "Hi\nWasm\nJSON\n" +} diff --git a/tests/specs/npm/pkg_index_ts_and_js/index.js b/tests/specs/npm/pkg_index_ts_and_js/index.js new file mode 100644 index 00000000000000..c6ef1486e6f64b --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/index.js @@ -0,0 +1 @@ +import "package"; diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js new file mode 100644 index 00000000000000..4c83afcf50ad8e --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js @@ -0,0 +1,3 @@ +require("./subdir"); +require("./wasm"); +require("./json"); diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js new file mode 100644 index 00000000000000..e998adfbdcc3b4 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js @@ -0,0 +1 @@ +console.log("JSON"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json @@ -0,0 +1 @@ +{} diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json new file mode 100644 index 00000000000000..028ddbb95b53eb --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json @@ -0,0 +1,3 @@ +{ + "name": "package" +} \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js new file mode 100644 index 00000000000000..1b8b5ee92b1f68 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js @@ -0,0 +1 @@ +console.log("Hi") \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts new file mode 100644 index 00000000000000..e9cffd2de027b4 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts @@ -0,0 +1 @@ +console.log("No"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js new file mode 100644 index 00000000000000..9174e5fd65b085 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js @@ -0,0 +1 @@ +console.log("Wasm"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6b3950fcc5297b78e0cdfddc5b91ac72505c7c94 GIT binary patch literal 318 zcmY+8%}#?r6ov1dfkMHg)tw6ymYPaKn^x-52XNyHj2F1lTK+OKM7yGo=A(%*F>&>s zoRfSxK&D0jKo4KVFyJ7i0B~IF5Yd$g^U1Xw@acU1f^dNU^d8(v&2_6!0wfg$fN%QD zYRWBOpj1JY6gP#$P^mprr!q1uMQ|xRh%kcpaO9YdA*4=2HA671$?lgQKey(;R{WEC zR|qqujHUdjy7tgm*6=*-bX)W}Ya{%MnzE;o(Rt~Og^O{@*%&V3?1Zi!yZmOg+$GB- zx=psLO}cyBrqMcCZ{j44*Q-0YpIOo+TlL0dd(B2HW_52Vt2i#JHlxZcd~+z9m_O|| D`Uz8u literal 0 HcmV?d00001 diff --git a/tests/specs/npm/pkg_index_ts_and_js/package.json b/tests/specs/npm/pkg_index_ts_and_js/package.json new file mode 100644 index 00000000000000..f0b3ee21dd5975 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "package": "*" + } +} From 566a6c2ce750d28c4ffe170017a64413296977fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Nov 2024 16:56:46 +0000 Subject: [PATCH 379/436] fix(task): update --filter flag description (#26974) `--recursive` is now implied by `--filter`. --- cli/args/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index d8ab46b6544d2a..3e48fa2909f455 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -3073,7 +3073,7 @@ Evaluate a task from string Arg::new("filter") .long("filter") .short('f') - .help("Filter members of the workspace by name - should be used with --recursive") + .help("Filter members of the workspace by name, implies --recursive flag") .value_parser(value_parser!(String)), ) .arg( From 6ee8efc5b4ba18348040bb8207f72b6c72353b94 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 21 Nov 2024 12:00:10 -0500 Subject: [PATCH 380/436] fix(install/global): do not error if path is an npm pkg and relative file (#26975) Closes https://github.com/denoland/deno/issues/26969 --- cli/tools/installer.rs | 31 ++++++++++-------- tests/registry/npm/cli.ts/registry.json | 32 +++++++++++++++++++ .../pkg_name_same_as_file/__test__.jsonc | 20 ++++++++++++ .../pkg_name_same_as_file/file_not_exists.out | 1 + 4 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 tests/registry/npm/cli.ts/registry.json create mode 100644 tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc create mode 100644 tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index fe477a8e6cc540..df5981e6e7b85e 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -359,6 +359,7 @@ async fn install_global( // ensure the module is cached let factory = CliFactory::from_flags(flags.clone()); + let cli_options = factory.cli_options()?; let http_client = factory.http_client_provider(); let deps_http_cache = factory.global_http_cache()?; let mut deps_file_fetcher = FileFetcher::new( @@ -381,20 +382,22 @@ async fn install_global( )); let entry_text = install_flags_global.module_url.as_str(); - let req = super::registry::AddRmPackageReq::parse(entry_text); - - // found a package requirement but missing the prefix - if let Ok(Err(package_req)) = req { - if jsr_resolver.req_to_nv(&package_req).await.is_some() { - bail!( - "{entry_text} is missing a prefix. Did you mean `{}`?", - crate::colors::yellow(format!("deno install -g jsr:{package_req}")) - ); - } else if npm_resolver.req_to_nv(&package_req).await.is_some() { - bail!( - "{entry_text} is missing a prefix. Did you mean `{}`?", - crate::colors::yellow(format!("deno install -g npm:{package_req}")) - ); + if !cli_options.initial_cwd().join(entry_text).exists() { + // check for package requirement missing prefix + if let Ok(Err(package_req)) = + super::registry::AddRmPackageReq::parse(entry_text) + { + if jsr_resolver.req_to_nv(&package_req).await.is_some() { + bail!( + "{entry_text} is missing a prefix. Did you mean `{}`?", + crate::colors::yellow(format!("deno install -g jsr:{package_req}")) + ); + } else if npm_resolver.req_to_nv(&package_req).await.is_some() { + bail!( + "{entry_text} is missing a prefix. Did you mean `{}`?", + crate::colors::yellow(format!("deno install -g npm:{package_req}")) + ); + } } } diff --git a/tests/registry/npm/cli.ts/registry.json b/tests/registry/npm/cli.ts/registry.json new file mode 100644 index 00000000000000..d58dc8537820a5 --- /dev/null +++ b/tests/registry/npm/cli.ts/registry.json @@ -0,0 +1,32 @@ +{ + "name": "cli.ts", + "description": "Package with name like a file path", + "dist-tags": { + "latest": "2.2.0" + }, + "versions": { + "2.2.0": { + "name": "cli.ts", + "version": "2.2.0", + "description": "Package with name like a file path", + "license": "MIT", + "author": {}, + "engines": { + "node": ">=6" + }, + "gitHead": "91440c5a1615354fb9419354650937c434eb9f49", + "_id": "cli.ts@2.2.0", + "_nodeVersion": "10.16.0", + "_npmVersion": "6.9.0", + "dist": { + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "shasum": "ee8472dbb129e727b31e8a10a427dee9dfe4008b", + "tarball": "http://localhost:4260/cli.ts/cli.ts-2.2.0.tgz", + "fileCount": 5, + "unpackedSize": 5508 + }, + "directories": {}, + "_hasShrinkwrap": false + } + } +} diff --git a/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc b/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc new file mode 100644 index 00000000000000..980361361a8c32 --- /dev/null +++ b/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc @@ -0,0 +1,20 @@ +{ + "tempDir": true, + "tests": { + "file_exists": { + "steps": [{ + "args": ["eval", "Deno.writeTextFileSync('cli.ts', '')"], + "output": "[WILDCARD]" + }, { + // success + "args": "install --root ./bins -g --name my-cli cli.ts", + "output": "[WILDCARD]" + }] + }, + "file_not_exists": { + "args": "install --root ./bins -g --name my-cli cli.ts", + "output": "file_not_exists.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out b/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out new file mode 100644 index 00000000000000..92a0bb8dcd7c62 --- /dev/null +++ b/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out @@ -0,0 +1 @@ +error: cli.ts is missing a prefix. Did you mean `deno install -g npm:cli.ts`? From a875a3785ba2b11f9bfd3dc31fd674670b587b44 Mon Sep 17 00:00:00 2001 From: Bhuwan Pandit Date: Thu, 21 Nov 2024 17:27:00 +0000 Subject: [PATCH 381/436] docs(cli/add): add clarification to add command (#26968) Signed-off-by: Bhuwan Pandit --- cli/args/flags.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 3e48fa2909f455..472eb9a376905e 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1704,8 +1704,11 @@ fn add_subcommand() -> Command { "Add dependencies to your configuration file. deno add jsr:@std/path -You can add multiple dependencies at once: - deno add jsr:@std/path jsr:@std/assert" +You can also add npm packages: + deno add npm:react + +Or multiple dependencies at once: + deno add jsr:@std/path jsr:@std/assert npm:chalk" ), UnstableArgsConfig::None, ) From 8a5609ad73a1a92663ab49b562ca303be92e8306 Mon Sep 17 00:00:00 2001 From: denobot <33910674+denobot@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:35:32 -0500 Subject: [PATCH 382/436] chore: forward v2.1.1 release commit to main (#26981) Co-authored-by: dsherret --- .github/workflows/ci.generate.ts | 2 +- .github/workflows/ci.yml | 8 ++--- Cargo.lock | 58 ++++++++++++++++---------------- Cargo.toml | 56 +++++++++++++++--------------- Releases.md | 10 ++++++ bench_util/Cargo.toml | 2 +- cli/Cargo.toml | 2 +- ext/broadcast_channel/Cargo.toml | 2 +- ext/cache/Cargo.toml | 2 +- ext/canvas/Cargo.toml | 2 +- ext/console/Cargo.toml | 2 +- ext/cron/Cargo.toml | 2 +- ext/crypto/Cargo.toml | 2 +- ext/fetch/Cargo.toml | 2 +- ext/ffi/Cargo.toml | 2 +- ext/fs/Cargo.toml | 2 +- ext/http/Cargo.toml | 2 +- ext/io/Cargo.toml | 2 +- ext/kv/Cargo.toml | 2 +- ext/napi/Cargo.toml | 2 +- ext/napi/sym/Cargo.toml | 2 +- ext/net/Cargo.toml | 2 +- ext/node/Cargo.toml | 2 +- ext/tls/Cargo.toml | 2 +- ext/url/Cargo.toml | 2 +- ext/web/Cargo.toml | 2 +- ext/webgpu/Cargo.toml | 2 +- ext/webidl/Cargo.toml | 2 +- ext/websocket/Cargo.toml | 2 +- ext/webstorage/Cargo.toml | 2 +- resolvers/deno/Cargo.toml | 2 +- resolvers/node/Cargo.toml | 2 +- runtime/Cargo.toml | 2 +- runtime/permissions/Cargo.toml | 2 +- 34 files changed, 101 insertions(+), 91 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 941ee47984e1f6..53a0f46e504ab9 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify"; // Bump this number when you want to purge the cache. // Note: the tools/release/01_bump_crate_versions.ts script will update this version // automatically via regex, so ensure that this line maintains this format. -const cacheVersion = 26; +const cacheVersion = 27; const ubuntuX86Runner = "ubuntu-24.04"; const ubuntuX86XlRunner = "ubuntu-24.04-xl"; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20e9fef503c999..ee8527bcef3019 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -361,8 +361,8 @@ jobs: path: |- ~/.cargo/registry/index ~/.cargo/registry/cache - key: '26-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' - restore-keys: '26-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' + key: '27-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' + restore-keys: '27-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' if: '!(matrix.skip)' - name: Restore cache build output (PR) uses: actions/cache/restore@v4 @@ -375,7 +375,7 @@ jobs: !./target/*/*.zip !./target/*/*.tar.gz key: never_saved - restore-keys: '26-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' + restore-keys: '27-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' - name: Apply and update mtime cache if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' uses: ./.github/mtime_cache @@ -685,7 +685,7 @@ jobs: !./target/*/*.zip !./target/*/*.sha256sum !./target/*/*.tar.gz - key: '26-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' + key: '27-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' publish-canary: name: publish canary runs-on: ubuntu-24.04 diff --git a/Cargo.lock b/Cargo.lock index 5ca7f30c947a47..798bb240577696 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1201,7 +1201,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.1.0" +version = "2.1.1" dependencies = [ "anstream", "async-trait", @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "deno_bench_util" -version = "0.172.0" +version = "0.173.0" dependencies = [ "bencher", "deno_core", @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.172.0" +version = "0.173.0" dependencies = [ "async-trait", "deno_core", @@ -1391,7 +1391,7 @@ dependencies = [ [[package]] name = "deno_cache" -version = "0.110.0" +version = "0.111.0" dependencies = [ "async-trait", "deno_core", @@ -1424,7 +1424,7 @@ dependencies = [ [[package]] name = "deno_canvas" -version = "0.47.0" +version = "0.48.0" dependencies = [ "deno_core", "deno_webgpu", @@ -1459,7 +1459,7 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.178.0" +version = "0.179.0" dependencies = [ "deno_core", ] @@ -1506,7 +1506,7 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_cron" -version = "0.58.0" +version = "0.59.0" dependencies = [ "anyhow", "async-trait", @@ -1519,7 +1519,7 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.192.0" +version = "0.193.0" dependencies = [ "aes", "aes-gcm", @@ -1587,7 +1587,7 @@ dependencies = [ [[package]] name = "deno_fetch" -version = "0.202.0" +version = "0.203.0" dependencies = [ "base64 0.21.7", "bytes", @@ -1621,7 +1621,7 @@ dependencies = [ [[package]] name = "deno_ffi" -version = "0.165.0" +version = "0.166.0" dependencies = [ "deno_core", "deno_permissions", @@ -1641,7 +1641,7 @@ dependencies = [ [[package]] name = "deno_fs" -version = "0.88.0" +version = "0.89.0" dependencies = [ "async-trait", "base32", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "deno_http" -version = "0.176.0" +version = "0.177.0" dependencies = [ "async-compression", "async-trait", @@ -1733,7 +1733,7 @@ dependencies = [ [[package]] name = "deno_io" -version = "0.88.0" +version = "0.89.0" dependencies = [ "async-trait", "deno_core", @@ -1754,7 +1754,7 @@ dependencies = [ [[package]] name = "deno_kv" -version = "0.86.0" +version = "0.87.0" dependencies = [ "anyhow", "async-trait", @@ -1827,7 +1827,7 @@ dependencies = [ [[package]] name = "deno_napi" -version = "0.109.0" +version = "0.110.0" dependencies = [ "deno_core", "deno_permissions", @@ -1855,7 +1855,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.170.0" +version = "0.171.0" dependencies = [ "deno_core", "deno_permissions", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "deno_node" -version = "0.115.0" +version = "0.116.0" dependencies = [ "aead-gcm-stream", "aes", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "deno_permissions" -version = "0.38.0" +version = "0.39.0" dependencies = [ "deno_core", "deno_path_util", @@ -2042,7 +2042,7 @@ dependencies = [ [[package]] name = "deno_resolver" -version = "0.10.0" +version = "0.11.0" dependencies = [ "anyhow", "base32", @@ -2061,7 +2061,7 @@ dependencies = [ [[package]] name = "deno_runtime" -version = "0.187.0" +version = "0.188.0" dependencies = [ "async-trait", "color-print", @@ -2198,7 +2198,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.165.0" +version = "0.166.0" dependencies = [ "deno_core", "deno_native_certs", @@ -2247,7 +2247,7 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.178.0" +version = "0.179.0" dependencies = [ "deno_bench_util", "deno_console", @@ -2259,7 +2259,7 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.209.0" +version = "0.210.0" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "deno_webgpu" -version = "0.145.0" +version = "0.146.0" dependencies = [ "deno_core", "raw-window-handle", @@ -2294,7 +2294,7 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.178.0" +version = "0.179.0" dependencies = [ "deno_bench_util", "deno_core", @@ -2302,7 +2302,7 @@ dependencies = [ [[package]] name = "deno_websocket" -version = "0.183.0" +version = "0.184.0" dependencies = [ "bytes", "deno_core", @@ -2324,7 +2324,7 @@ dependencies = [ [[package]] name = "deno_webstorage" -version = "0.173.0" +version = "0.174.0" dependencies = [ "deno_core", "deno_web", @@ -4887,7 +4887,7 @@ dependencies = [ [[package]] name = "napi_sym" -version = "0.108.0" +version = "0.109.0" dependencies = [ "quote", "serde", @@ -4942,7 +4942,7 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.17.0" +version = "0.18.0" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index d1e958fe1b8674..987c291fcf7498 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,17 +48,17 @@ repository = "https://github.com/denoland/deno" deno_ast = { version = "=0.43.3", features = ["transpiling"] } deno_core = { version = "0.321.0" } -deno_bench_util = { version = "0.172.0", path = "./bench_util" } +deno_bench_util = { version = "0.173.0", path = "./bench_util" } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_npm = "=0.25.4" deno_path_util = "=0.2.1" -deno_permissions = { version = "0.38.0", path = "./runtime/permissions" } -deno_runtime = { version = "0.187.0", path = "./runtime" } +deno_permissions = { version = "0.39.0", path = "./runtime/permissions" } +deno_runtime = { version = "0.188.0", path = "./runtime" } deno_semver = "=0.5.16" deno_terminal = "0.2.0" -napi_sym = { version = "0.108.0", path = "./ext/napi/sym" } +napi_sym = { version = "0.109.0", path = "./ext/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } denokv_proto = "0.8.4" @@ -67,32 +67,32 @@ denokv_remote = "0.8.4" denokv_sqlite = { default-features = false, version = "0.8.4" } # exts -deno_broadcast_channel = { version = "0.172.0", path = "./ext/broadcast_channel" } -deno_cache = { version = "0.110.0", path = "./ext/cache" } -deno_canvas = { version = "0.47.0", path = "./ext/canvas" } -deno_console = { version = "0.178.0", path = "./ext/console" } -deno_cron = { version = "0.58.0", path = "./ext/cron" } -deno_crypto = { version = "0.192.0", path = "./ext/crypto" } -deno_fetch = { version = "0.202.0", path = "./ext/fetch" } -deno_ffi = { version = "0.165.0", path = "./ext/ffi" } -deno_fs = { version = "0.88.0", path = "./ext/fs" } -deno_http = { version = "0.176.0", path = "./ext/http" } -deno_io = { version = "0.88.0", path = "./ext/io" } -deno_kv = { version = "0.86.0", path = "./ext/kv" } -deno_napi = { version = "0.109.0", path = "./ext/napi" } -deno_net = { version = "0.170.0", path = "./ext/net" } -deno_node = { version = "0.115.0", path = "./ext/node" } -deno_tls = { version = "0.165.0", path = "./ext/tls" } -deno_url = { version = "0.178.0", path = "./ext/url" } -deno_web = { version = "0.209.0", path = "./ext/web" } -deno_webgpu = { version = "0.145.0", path = "./ext/webgpu" } -deno_webidl = { version = "0.178.0", path = "./ext/webidl" } -deno_websocket = { version = "0.183.0", path = "./ext/websocket" } -deno_webstorage = { version = "0.173.0", path = "./ext/webstorage" } +deno_broadcast_channel = { version = "0.173.0", path = "./ext/broadcast_channel" } +deno_cache = { version = "0.111.0", path = "./ext/cache" } +deno_canvas = { version = "0.48.0", path = "./ext/canvas" } +deno_console = { version = "0.179.0", path = "./ext/console" } +deno_cron = { version = "0.59.0", path = "./ext/cron" } +deno_crypto = { version = "0.193.0", path = "./ext/crypto" } +deno_fetch = { version = "0.203.0", path = "./ext/fetch" } +deno_ffi = { version = "0.166.0", path = "./ext/ffi" } +deno_fs = { version = "0.89.0", path = "./ext/fs" } +deno_http = { version = "0.177.0", path = "./ext/http" } +deno_io = { version = "0.89.0", path = "./ext/io" } +deno_kv = { version = "0.87.0", path = "./ext/kv" } +deno_napi = { version = "0.110.0", path = "./ext/napi" } +deno_net = { version = "0.171.0", path = "./ext/net" } +deno_node = { version = "0.116.0", path = "./ext/node" } +deno_tls = { version = "0.166.0", path = "./ext/tls" } +deno_url = { version = "0.179.0", path = "./ext/url" } +deno_web = { version = "0.210.0", path = "./ext/web" } +deno_webgpu = { version = "0.146.0", path = "./ext/webgpu" } +deno_webidl = { version = "0.179.0", path = "./ext/webidl" } +deno_websocket = { version = "0.184.0", path = "./ext/websocket" } +deno_webstorage = { version = "0.174.0", path = "./ext/webstorage" } # resolvers -deno_resolver = { version = "0.10.0", path = "./resolvers/deno" } -node_resolver = { version = "0.17.0", path = "./resolvers/node" } +deno_resolver = { version = "0.11.0", path = "./resolvers/deno" } +node_resolver = { version = "0.18.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" diff --git a/Releases.md b/Releases.md index 2cb2dfbd80c8ae..0e977d0311bc0b 100644 --- a/Releases.md +++ b/Releases.md @@ -6,6 +6,16 @@ https://github.com/denoland/deno/releases We also have one-line install commands at: https://github.com/denoland/deno_install +### 2.1.1 / 2024.11.21 + +- docs(add): clarification to add command (#26968) +- docs(doc): fix typo in doc subcommand help output (#26321) +- fix(node): regression where ts files were sometimes resolved instead of js + (#26971) +- fix(task): ensure root config always looks up dependencies in root (#26959) +- fix(watch): don't panic if there's no path provided (#26972) +- fix: Buffer global in --unstable-node-globals (#26973) + ### 2.1.0 / 2024.11.21 - feat(cli): add `--unstable-node-globals` flag (#26617) diff --git a/bench_util/Cargo.toml b/bench_util/Cargo.toml index 7bb785e6e55f87..4d39ae30e4b61b 100644 --- a/bench_util/Cargo.toml +++ b/bench_util/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_bench_util" -version = "0.172.0" +version = "0.173.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c6818848371ac4..6a1fc51bc45d8d 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.1.0" +version = "2.1.1" authors.workspace = true default-run = "deno" edition.workspace = true diff --git a/ext/broadcast_channel/Cargo.toml b/ext/broadcast_channel/Cargo.toml index b92b1c7beb3fdf..e7c3f584b61fbe 100644 --- a/ext/broadcast_channel/Cargo.toml +++ b/ext/broadcast_channel/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_broadcast_channel" -version = "0.172.0" +version = "0.173.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cache/Cargo.toml b/ext/cache/Cargo.toml index c79024e82c16a0..9005bf5b24418f 100644 --- a/ext/cache/Cargo.toml +++ b/ext/cache/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cache" -version = "0.110.0" +version = "0.111.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/canvas/Cargo.toml b/ext/canvas/Cargo.toml index 8fcb2c4a9c8e19..5dca4424376b8b 100644 --- a/ext/canvas/Cargo.toml +++ b/ext/canvas/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_canvas" -version = "0.47.0" +version = "0.48.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/console/Cargo.toml b/ext/console/Cargo.toml index 9f925ac61b316d..1d76390b6e02d4 100644 --- a/ext/console/Cargo.toml +++ b/ext/console/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_console" -version = "0.178.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cron/Cargo.toml b/ext/cron/Cargo.toml index 23ac77d5eda371..d1809da1354ca0 100644 --- a/ext/cron/Cargo.toml +++ b/ext/cron/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cron" -version = "0.58.0" +version = "0.59.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/crypto/Cargo.toml b/ext/crypto/Cargo.toml index 4a44314221f9fe..dfb81c62a32604 100644 --- a/ext/crypto/Cargo.toml +++ b/ext/crypto/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_crypto" -version = "0.192.0" +version = "0.193.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fetch/Cargo.toml b/ext/fetch/Cargo.toml index 9ebd9ec03f2006..90b1b152d95778 100644 --- a/ext/fetch/Cargo.toml +++ b/ext/fetch/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fetch" -version = "0.202.0" +version = "0.203.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml index e63d22e57dc9ac..2f0813a58b9674 100644 --- a/ext/ffi/Cargo.toml +++ b/ext/ffi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_ffi" -version = "0.165.0" +version = "0.166.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fs/Cargo.toml b/ext/fs/Cargo.toml index f37d1f699796ca..1d7d5d3d9aabed 100644 --- a/ext/fs/Cargo.toml +++ b/ext/fs/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fs" -version = "0.88.0" +version = "0.89.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/http/Cargo.toml b/ext/http/Cargo.toml index 5105b47ddef6e8..5dc3cd9a7b83c0 100644 --- a/ext/http/Cargo.toml +++ b/ext/http/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_http" -version = "0.176.0" +version = "0.177.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/io/Cargo.toml b/ext/io/Cargo.toml index 8f7c0e197a7df7..caaf67ab0b6b35 100644 --- a/ext/io/Cargo.toml +++ b/ext/io/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_io" -version = "0.88.0" +version = "0.89.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/kv/Cargo.toml b/ext/kv/Cargo.toml index 870e4fec3b69d1..972aabfbb7cdb7 100644 --- a/ext/kv/Cargo.toml +++ b/ext/kv/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_kv" -version = "0.86.0" +version = "0.87.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/Cargo.toml b/ext/napi/Cargo.toml index 19f4036a886e3a..f9a1f73007ba5a 100644 --- a/ext/napi/Cargo.toml +++ b/ext/napi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_napi" -version = "0.109.0" +version = "0.110.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/sym/Cargo.toml b/ext/napi/sym/Cargo.toml index 83107782b814c5..74d7b450ba67a0 100644 --- a/ext/napi/sym/Cargo.toml +++ b/ext/napi/sym/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "napi_sym" -version = "0.108.0" +version = "0.109.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/net/Cargo.toml b/ext/net/Cargo.toml index 1cb109dd2182e1..8669f650e3f708 100644 --- a/ext/net/Cargo.toml +++ b/ext/net/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_net" -version = "0.170.0" +version = "0.171.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index e1650282c2b3b5..5e47a74e1dc352 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_node" -version = "0.115.0" +version = "0.116.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 81d28d44212247..6b4bc98909a930 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_tls" -version = "0.165.0" +version = "0.166.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/url/Cargo.toml b/ext/url/Cargo.toml index 2b390e8b07c9a4..e2ea7dae581f8b 100644 --- a/ext/url/Cargo.toml +++ b/ext/url/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_url" -version = "0.178.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml index c00298991b9dce..f56f21b72f6178 100644 --- a/ext/web/Cargo.toml +++ b/ext/web/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_web" -version = "0.209.0" +version = "0.210.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml index 73541ba6a2c754..93be59b734c31a 100644 --- a/ext/webgpu/Cargo.toml +++ b/ext/webgpu/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webgpu" -version = "0.145.0" +version = "0.146.0" authors = ["the Deno authors"] edition.workspace = true license = "MIT" diff --git a/ext/webidl/Cargo.toml b/ext/webidl/Cargo.toml index 9f6fdc49437224..9bf65335c04871 100644 --- a/ext/webidl/Cargo.toml +++ b/ext/webidl/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webidl" -version = "0.178.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/websocket/Cargo.toml b/ext/websocket/Cargo.toml index bdbc1694353ca1..d6177dada0f39a 100644 --- a/ext/websocket/Cargo.toml +++ b/ext/websocket/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_websocket" -version = "0.183.0" +version = "0.184.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webstorage/Cargo.toml b/ext/webstorage/Cargo.toml index 928844c5aaa16c..580eb95e2fe074 100644 --- a/ext/webstorage/Cargo.toml +++ b/ext/webstorage/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webstorage" -version = "0.173.0" +version = "0.174.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index 0de8b31b38d558..b2c4bd2384ccb7 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_resolver" -version = "0.10.0" +version = "0.11.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/node/Cargo.toml b/resolvers/node/Cargo.toml index 7f914479ad553c..fb302705730a04 100644 --- a/resolvers/node/Cargo.toml +++ b/resolvers/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "node_resolver" -version = "0.17.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index d4c41b831fe3c9..94fe4ce02bd2ac 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_runtime" -version = "0.187.0" +version = "0.188.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/permissions/Cargo.toml b/runtime/permissions/Cargo.toml index 1e7133de6ddb48..efbc657055f23c 100644 --- a/runtime/permissions/Cargo.toml +++ b/runtime/permissions/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_permissions" -version = "0.38.0" +version = "0.39.0" authors.workspace = true edition.workspace = true license.workspace = true From a19b3f44d469f96eec8dbde0ba3474841061de0d Mon Sep 17 00:00:00 2001 From: Caleb Cox Date: Thu, 21 Nov 2024 14:24:54 -0600 Subject: [PATCH 383/436] fix(cli): remove extraneous comma in task --eval help (#26985) --- cli/args/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 472eb9a376905e..5e89f88a91af52 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -3083,7 +3083,7 @@ Evaluate a task from string Arg::new("eval") .long("eval") .help( - "Evaluate the passed value as if, it was a task in a configuration file", + "Evaluate the passed value as if it was a task in a configuration file", ).action(ArgAction::SetTrue) ) .arg(node_modules_dir_arg()) From 8f7787f81b185716406da752ff91f5ffa146c971 Mon Sep 17 00:00:00 2001 From: Charlie Bellini Date: Fri, 22 Nov 2024 00:04:47 +0100 Subject: [PATCH 384/436] fix(ext/websocket): don't throw exception when sending to closed socket (#26932) [The WebSocket specification for the `send` function](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send) says: > The browser will throw an exception if you call `send()` when the connection is in the `CONNECTING` state. If you call `send()` when the connection is in the `CLOSING` or `CLOSED` states, the browser will silently discard the data. and: > ### Exceptions > > `InvalidStateError` [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) > > Thrown if [`WebSocket.readyState`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/readyState) is `CONNECTING`. This pull request fixes the current behavior to match the specification. Also, I believe it fixes #17586. --- ext/websocket/01_websocket.js | 6 +++++- tests/unit/websocket_test.ts | 15 +++++++++++++++ tests/wpt/runner/expectation.json | 4 ++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index 468999b95dda62..78572f5f002fab 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -330,10 +330,14 @@ class WebSocket extends EventTarget { webidl.requiredArguments(arguments.length, 1, prefix); data = webidl.converters.WebSocketSend(data, prefix, "Argument 1"); - if (this[_readyState] !== OPEN) { + if (this[_readyState] === CONNECTING) { throw new DOMException("'readyState' not OPEN", "InvalidStateError"); } + if (this[_readyState] !== OPEN) { + return; + } + if (this[_sendQueue].length === 0) { // Fast path if the send queue is empty, for example when only synchronous // data is being sent. diff --git a/tests/unit/websocket_test.ts b/tests/unit/websocket_test.ts index 3aafe8da22dbfa..d9878828db4d97 100644 --- a/tests/unit/websocket_test.ts +++ b/tests/unit/websocket_test.ts @@ -806,3 +806,18 @@ Deno.test("Close connection", async () => { await server.finished; conn.close(); }); + +Deno.test("send to a closed socket", async () => { + const { promise, resolve } = Promise.withResolvers(); + const ws = new WebSocket("ws://localhost:4242"); + const blob = new Blob(["foo"]); + ws.onerror = () => fail(); + ws.onopen = () => { + ws.close(); + ws.send(blob); + }; + ws.onclose = () => { + resolve(); + }; + await promise; +}); diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json index 1a7cb8c560f8f6..6140f4379d03c2 100644 --- a/tests/wpt/runner/expectation.json +++ b/tests/wpt/runner/expectation.json @@ -11303,10 +11303,10 @@ "006.html?default": true, "006.html?wpt_flags=h2": false, "006.html?wss": false, - "007.html?default": false, + "007.html?default": true, "007.html?wpt_flags=h2": false, "007.html?wss": false, - "008.html?default": false, + "008.html?default": true, "008.html?wss": false, "009.html?default": { "ignore": true From 45fad6a622700bac0b656a8500529bc4f41aed86 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 21 Nov 2024 18:16:40 -0500 Subject: [PATCH 385/436] chore(compile): log code cache file path (#26977) Ref #26976 --- cli/standalone/code_cache.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cli/standalone/code_cache.rs b/cli/standalone/code_cache.rs index 25b490544cf1d7..9580b9b44e16c1 100644 --- a/cli/standalone/code_cache.rs +++ b/cli/standalone/code_cache.rs @@ -42,7 +42,11 @@ impl DenoCompileCodeCache { // attempt to deserialize the cache data match deserialize(&file_path, cache_key) { Ok(data) => { - log::debug!("Loaded {} code cache entries", data.len()); + log::debug!( + "Loaded {} code cache entries from {}", + data.len(), + file_path.display() + ); Self { strategy: CodeCacheStrategy::SubsequentRun( SubsequentRunCodeCacheStrategy { @@ -53,7 +57,11 @@ impl DenoCompileCodeCache { } } Err(err) => { - log::debug!("Failed to deserialize code cache: {:#}", err); + log::debug!( + "Failed to deserialize code cache from {}: {:#}", + file_path.display(), + err + ); Self { strategy: CodeCacheStrategy::FirstRun(FirstRunCodeCacheStrategy { cache_key, @@ -186,6 +194,7 @@ impl FirstRunCodeCacheStrategy { Ok(()) => { if let Err(err) = std::fs::rename(&temp_file, &self.file_path) { log::debug!("Failed to rename code cache: {}", err); + let _ = std::fs::remove_file(&temp_file); } else { log::debug!("Serialized {} code cache entries", count); } From 5ca47ee97a06c1b76bbdd58b50efd7016da2b020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 22 Nov 2024 00:46:23 +0000 Subject: [PATCH 386/436] fix: support non-function exports in Wasm modules (#26992) Closes https://github.com/denoland/deno/issues/26986 --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- .../wasm_module/table_global_memory/__test__.jsonc | 4 ++++ .../run/wasm_module/table_global_memory/main.js | 2 ++ .../run/wasm_module/table_global_memory/main.out | 7 +++++++ .../run/wasm_module/table_global_memory/mod.wasm | Bin 0 -> 80 bytes .../run/wasm_module/table_global_memory/mod.wat | 6 ++++++ 7 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 tests/specs/run/wasm_module/table_global_memory/__test__.jsonc create mode 100644 tests/specs/run/wasm_module/table_global_memory/main.js create mode 100644 tests/specs/run/wasm_module/table_global_memory/main.out create mode 100644 tests/specs/run/wasm_module/table_global_memory/mod.wasm create mode 100644 tests/specs/run/wasm_module/table_global_memory/mod.wat diff --git a/Cargo.lock b/Cargo.lock index 798bb240577696..7947106e665edd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1466,9 +1466,9 @@ dependencies = [ [[package]] name = "deno_core" -version = "0.321.0" +version = "0.322.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2a54cda74cdc187d5fc2d23370a45cf09f912caf566dd1cd24a50157d809c7" +checksum = "2f593ef2b8acab8cd3ace9d50052edc65a3654fdbde808070cfa5da5cf7aaae6" dependencies = [ "anyhow", "bincode", @@ -1983,9 +1983,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.197.0" +version = "0.198.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a8825d92301cf445727c43f17fee2a20fcdf4370004339965156ae7c56c97e" +checksum = "870826735cd9aa0376d2aadca14365b753e830e3cc16891efb9232845a6982a4" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -6666,9 +6666,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.230.0" +version = "0.231.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a783242d2af51d6955cc04bf2b64adb643ab588b61e9573c908a69dabf8c2f" +checksum = "1a0c48b8842ebae21c52da1d978fba5c2be5991680bddfdc1a36ee0ccbc60114" dependencies = [ "num-bigint", "serde", diff --git a/Cargo.toml b/Cargo.toml index 987c291fcf7498..f72d3c80d3f06a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "=0.43.3", features = ["transpiling"] } -deno_core = { version = "0.321.0" } +deno_core = { version = "0.322.0" } deno_bench_util = { version = "0.173.0", path = "./bench_util" } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } diff --git a/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc new file mode 100644 index 00000000000000..1dbb89a020ab81 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --check main.js", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/table_global_memory/main.js b/tests/specs/run/wasm_module/table_global_memory/main.js new file mode 100644 index 00000000000000..a5ff412a922246 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/main.js @@ -0,0 +1,2 @@ +import * as wasm from "./mod.wasm"; +console.log(wasm); diff --git a/tests/specs/run/wasm_module/table_global_memory/main.out b/tests/specs/run/wasm_module/table_global_memory/main.out new file mode 100644 index 00000000000000..81a5b4b47c18ee --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/main.out @@ -0,0 +1,7 @@ +Check [WILDCARD] +[Module: null prototype] { + func: [Function: 0], + global: Global [WebAssembly.Global] {}, + memory: Memory [WebAssembly.Memory] {}, + table: Table [WebAssembly.Table] {} +} diff --git a/tests/specs/run/wasm_module/table_global_memory/mod.wasm b/tests/specs/run/wasm_module/table_global_memory/mod.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a99e01c5dc23e9d59fbc0c399fe5343f233dde95 GIT binary patch literal 80 zcmWN_yAgmO5Cy>ZyyKjaF6_ik1P4t(96y1Pt;>dsa1{ceat5R$RCxeS+M4mh1mBOU b>$5Md?+|k$tfW%Uw}WlD#*hVrqX7N~p~ws^ literal 0 HcmV?d00001 diff --git a/tests/specs/run/wasm_module/table_global_memory/mod.wat b/tests/specs/run/wasm_module/table_global_memory/mod.wat new file mode 100644 index 00000000000000..d2a92f0ac1518b --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/mod.wat @@ -0,0 +1,6 @@ +(module + (func (export "func") unreachable) + (table (export "table") 0 funcref) + (memory (export "memory") 0) + (global (export "global") i32 i32.const 0) +) From 9c0e6369b2f5d03aa281c1e0df4f9ef590214c70 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 22 Nov 2024 10:59:19 -0500 Subject: [PATCH 387/436] chore(check): add test for Wasm memory and table (#26996) --- .../wasm_module/table_global_memory/__test__.jsonc | 13 +++++++++++-- .../run/wasm_module/table_global_memory/check.out | 14 ++++++++++++++ .../run/wasm_module/table_global_memory/check.ts | 4 ++++ .../run/wasm_module/table_global_memory/main.out | 1 - 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tests/specs/run/wasm_module/table_global_memory/check.out create mode 100644 tests/specs/run/wasm_module/table_global_memory/check.ts diff --git a/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc index 1dbb89a020ab81..55f16ed0c2eee1 100644 --- a/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc +++ b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc @@ -1,4 +1,13 @@ { - "args": "run --check main.js", - "output": "main.out" + "tests": { + "run": { + "args": "run main.js", + "output": "main.out" + }, + "check": { + "args": "check check.ts", + "output": "check.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/run/wasm_module/table_global_memory/check.out b/tests/specs/run/wasm_module/table_global_memory/check.out new file mode 100644 index 00000000000000..e335a7c9070ba8 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/check.out @@ -0,0 +1,14 @@ +Check file:///[WILDLINE]/check.ts +error: TS2322 [ERROR]: Type 'Function | null' is not assignable to type 'number'. + Type 'null' is not assignable to type 'number'. +const value1: number = table.get(0); + ~~~~~~ + at file:///[WILDLINE]/check.ts:2:7 + +TS2322 [ERROR]: Type 'ArrayBuffer | SharedArrayBuffer' is not assignable to type 'number'. + Type 'ArrayBuffer' is not assignable to type 'number'. +const value2: number = memory.buffer; + ~~~~~~ + at file:///[WILDLINE]/check.ts:3:7 + +Found 2 errors. diff --git a/tests/specs/run/wasm_module/table_global_memory/check.ts b/tests/specs/run/wasm_module/table_global_memory/check.ts new file mode 100644 index 00000000000000..c0e43ed2aa380d --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/check.ts @@ -0,0 +1,4 @@ +import { memory, table } from "./mod.wasm"; +const value1: number = table.get(0); +const value2: number = memory.buffer; +console.log(value1, value2); diff --git a/tests/specs/run/wasm_module/table_global_memory/main.out b/tests/specs/run/wasm_module/table_global_memory/main.out index 81a5b4b47c18ee..c095b0dd9298d2 100644 --- a/tests/specs/run/wasm_module/table_global_memory/main.out +++ b/tests/specs/run/wasm_module/table_global_memory/main.out @@ -1,4 +1,3 @@ -Check [WILDCARD] [Module: null prototype] { func: [Function: 0], global: Global [WebAssembly.Global] {}, From 4ded7519e97922d12ce3398054db92e7a7b2497e Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 22 Nov 2024 14:26:38 -0500 Subject: [PATCH 388/436] fix(compile): correct buffered reading of assets and files (#27008) Closes #27006 --- cli/standalone/virtual_fs.rs | 25 ++++---- .../include/buffered_reads/__test__.jsonc | 27 +++++++++ .../compile/include/buffered_reads/main.ts | 57 +++++++++++++++++++ .../compile/include/buffered_reads/setup.js | 7 +++ .../data_files}/__test__.jsonc | 0 .../data_files}/data-file.txt | 0 .../data_files}/main.js | 0 .../data_files}/non_existent.out | 0 .../data_files}/output.out | 0 .../folder}/__test__.jsonc | 0 .../folder}/data/a.txt | 0 .../folder}/data/b.txt | 0 .../folder}/main.js | 0 .../folder}/output.out | 0 14 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 tests/specs/compile/include/buffered_reads/__test__.jsonc create mode 100644 tests/specs/compile/include/buffered_reads/main.ts create mode 100644 tests/specs/compile/include/buffered_reads/setup.js rename tests/specs/compile/{include_data_files => include/data_files}/__test__.jsonc (100%) rename tests/specs/compile/{include_data_files => include/data_files}/data-file.txt (100%) rename tests/specs/compile/{include_data_files => include/data_files}/main.js (100%) rename tests/specs/compile/{include_data_files => include/data_files}/non_existent.out (100%) rename tests/specs/compile/{include_data_files => include/data_files}/output.out (100%) rename tests/specs/compile/{include_folder => include/folder}/__test__.jsonc (100%) rename tests/specs/compile/{include_folder => include/folder}/data/a.txt (100%) rename tests/specs/compile/{include_folder => include/folder}/data/b.txt (100%) rename tests/specs/compile/{include_folder => include/folder}/main.js (100%) rename tests/specs/compile/{include_folder => include/folder}/output.out (100%) diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index d1084f016c9608..be7e937ee1e5b4 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -634,7 +634,7 @@ impl FileBackedVfsFile { } fn read_to_buf(&self, buf: &mut [u8]) -> FsResult { - let pos = { + let read_pos = { let mut pos = self.pos.lock(); let read_pos = *pos; // advance the position due to the read @@ -643,12 +643,12 @@ impl FileBackedVfsFile { }; self .vfs - .read_file(&self.file, pos, buf) + .read_file(&self.file, read_pos, buf) .map_err(|err| err.into()) } fn read_to_end(&self) -> FsResult> { - let pos = { + let read_pos = { let mut pos = self.pos.lock(); let read_pos = *pos; // todo(dsherret): should this always set it to the end of the file? @@ -658,12 +658,12 @@ impl FileBackedVfsFile { } read_pos }; - if pos > self.file.len { + if read_pos > self.file.len { return Ok(Vec::new()); } - let size = (self.file.len - pos) as usize; + let size = (self.file.len - read_pos) as usize; let mut buf = vec![0; size]; - self.vfs.read_file(&self.file, pos, &mut buf)?; + self.vfs.read_file(&self.file, read_pos, &mut buf)?; Ok(buf) } } @@ -893,8 +893,9 @@ impl FileBackedVfs { buf: &mut [u8], ) -> std::io::Result { let read_range = self.get_read_range(file, pos, buf.len() as u64)?; - buf.copy_from_slice(&self.vfs_data[read_range]); - Ok(buf.len()) + let read_len = read_range.len(); + buf[..read_len].copy_from_slice(&self.vfs_data[read_range]); + Ok(read_len) } fn get_read_range( @@ -903,15 +904,15 @@ impl FileBackedVfs { pos: u64, len: u64, ) -> std::io::Result> { - let data = &self.vfs_data; - let start = self.fs_root.start_file_offset + file.offset + pos; - let end = start + len; - if end > data.len() as u64 { + if pos > file.len { return Err(std::io::Error::new( std::io::ErrorKind::UnexpectedEof, "unexpected EOF", )); } + let file_offset = self.fs_root.start_file_offset + file.offset; + let start = file_offset + pos; + let end = file_offset + std::cmp::min(pos + len, file.len); Ok(start as usize..end as usize) } diff --git a/tests/specs/compile/include/buffered_reads/__test__.jsonc b/tests/specs/compile/include/buffered_reads/__test__.jsonc new file mode 100644 index 00000000000000..7640fed56b4565 --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/__test__.jsonc @@ -0,0 +1,27 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A setup.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --allow-read=data --include data --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "[WILDCARD]", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include data --output main.exe main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "[WILDCARD]", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/buffered_reads/main.ts b/tests/specs/compile/include/buffered_reads/main.ts new file mode 100644 index 00000000000000..7f78eab612ddeb --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/main.ts @@ -0,0 +1,57 @@ +// buffer larger than file +{ + using file = Deno.openSync(import.meta.dirname + "/data/1.txt"); + const data = new Uint8Array(13); + const len = file.readSync(data); + if (len !== 13) { + throw new Error("Unexpected read length"); + } + if (file.readSync(new Uint8Array(1024)) !== null) { + throw new Error("Unexpected."); + } + const textData = new TextDecoder().decode(data); + if (textData !== "Hello, world!") { + throw new Error("Unexpected file data (1): " + textData); + } +} + +// buffer smaller than file +{ + using file = Deno.openSync(import.meta.dirname + "/data/1.txt"); + const finalData = new Uint8Array(13); + const data = new Uint8Array(2); + let pos = 0; + while (true) { + const len = file.readSync(data); + if (len === 0 || len == null) { + break; + } + finalData.set(data.subarray(0, len), pos); + pos += len; + } + const textData = new TextDecoder().decode(finalData); + if (textData !== "Hello, world!") { + throw new Error("Unexpected file data (2): " + textData); + } +} + +// large amount of data, small reads +{ + const bytes = new Uint8Array((1024 ** 2) * 20); + using file = Deno.openSync(import.meta.dirname + "/data/2.dat"); + const buffer = new Uint8Array(2); + let pos = 0; + while (true) { + const len = file.readSync(buffer); + if (len === 0 || len == null) { + break; + } + bytes.set(buffer.subarray(0, len), pos); + pos += len; + } + for (let i = 0; i < bytes.length; i++) { + if (bytes[i] !== i % 256) { + throw new Error("Unexpected data."); + } + } +} diff --git a/tests/specs/compile/include/buffered_reads/setup.js b/tests/specs/compile/include/buffered_reads/setup.js new file mode 100644 index 00000000000000..39cd5cb8b0d058 --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/setup.js @@ -0,0 +1,7 @@ +Deno.mkdirSync("data"); +Deno.writeTextFileSync("data/1.txt", "Hello, world!"); +const bytes = new Uint8Array((1024 ** 2) * 20); +for (let i = 0; i < bytes.length; i++) { + bytes[i] = i % 256; +} +Deno.writeFileSync("data/2.dat", bytes); diff --git a/tests/specs/compile/include_data_files/__test__.jsonc b/tests/specs/compile/include/data_files/__test__.jsonc similarity index 100% rename from tests/specs/compile/include_data_files/__test__.jsonc rename to tests/specs/compile/include/data_files/__test__.jsonc diff --git a/tests/specs/compile/include_data_files/data-file.txt b/tests/specs/compile/include/data_files/data-file.txt similarity index 100% rename from tests/specs/compile/include_data_files/data-file.txt rename to tests/specs/compile/include/data_files/data-file.txt diff --git a/tests/specs/compile/include_data_files/main.js b/tests/specs/compile/include/data_files/main.js similarity index 100% rename from tests/specs/compile/include_data_files/main.js rename to tests/specs/compile/include/data_files/main.js diff --git a/tests/specs/compile/include_data_files/non_existent.out b/tests/specs/compile/include/data_files/non_existent.out similarity index 100% rename from tests/specs/compile/include_data_files/non_existent.out rename to tests/specs/compile/include/data_files/non_existent.out diff --git a/tests/specs/compile/include_data_files/output.out b/tests/specs/compile/include/data_files/output.out similarity index 100% rename from tests/specs/compile/include_data_files/output.out rename to tests/specs/compile/include/data_files/output.out diff --git a/tests/specs/compile/include_folder/__test__.jsonc b/tests/specs/compile/include/folder/__test__.jsonc similarity index 100% rename from tests/specs/compile/include_folder/__test__.jsonc rename to tests/specs/compile/include/folder/__test__.jsonc diff --git a/tests/specs/compile/include_folder/data/a.txt b/tests/specs/compile/include/folder/data/a.txt similarity index 100% rename from tests/specs/compile/include_folder/data/a.txt rename to tests/specs/compile/include/folder/data/a.txt diff --git a/tests/specs/compile/include_folder/data/b.txt b/tests/specs/compile/include/folder/data/b.txt similarity index 100% rename from tests/specs/compile/include_folder/data/b.txt rename to tests/specs/compile/include/folder/data/b.txt diff --git a/tests/specs/compile/include_folder/main.js b/tests/specs/compile/include/folder/main.js similarity index 100% rename from tests/specs/compile/include_folder/main.js rename to tests/specs/compile/include/folder/main.js diff --git a/tests/specs/compile/include_folder/output.out b/tests/specs/compile/include/folder/output.out similarity index 100% rename from tests/specs/compile/include_folder/output.out rename to tests/specs/compile/include/folder/output.out From 50538ba35d5e8d34eb6833ae8d818ebcb698bc5d Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Fri, 22 Nov 2024 22:42:27 +0100 Subject: [PATCH 389/436] fix(node/fs): missing uv error context for readFile (#27011) Dart's Node wrapper code in `npm:sass` does string slicing on the thrown error message which broke because of our missing uv error context. Code in question: ```js _systemErrorToFileSystemException0(callback) { var error, t1, exception, t2; try { t1 = callback.call$0(); return t1; } catch (exception) { error = A.unwrapException(exception); if (!type$.JsSystemError._is(error)) throw exception; t1 = error; t2 = J.getInterceptor$x(t1); throw A.wrapException(new A.FileSystemException0(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); } } ``` Fixes https://github.com/denoland/deno/issues/26994 --- ext/node/polyfills/_fs/_fs_readFile.ts | 4 ++-- tests/unit_node/_fs/_fs_readFile_test.ts | 25 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts index cf7e0305d82100..029e57c5029e0c 100644 --- a/ext/node/polyfills/_fs/_fs_readFile.ts +++ b/ext/node/polyfills/_fs/_fs_readFile.ts @@ -88,7 +88,7 @@ export function readFile( } const buffer = maybeDecode(data, encoding); (cb as BinaryCallback)(null, buffer); - }, (err) => cb && cb(denoErrorToNodeError(err))); + }, (err) => cb && cb(denoErrorToNodeError(err, { path, syscall: "open" }))); } } @@ -122,7 +122,7 @@ export function readFileSync( try { data = Deno.readFileSync(path); } catch (err) { - throw denoErrorToNodeError(err); + throw denoErrorToNodeError(err, { path, syscall: "open" }); } const encoding = getEncoding(opt); if (encoding && encoding !== "binary") { diff --git a/tests/unit_node/_fs/_fs_readFile_test.ts b/tests/unit_node/_fs/_fs_readFile_test.ts index ea36b9d866af4d..a75f12d1f6fe39 100644 --- a/tests/unit_node/_fs/_fs_readFile_test.ts +++ b/tests/unit_node/_fs/_fs_readFile_test.ts @@ -2,7 +2,7 @@ import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { promises, readFile, readFileSync } from "node:fs"; import * as path from "@std/path"; -import { assert, assertEquals } from "@std/assert"; +import { assert, assertEquals, assertMatch } from "@std/assert"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); @@ -121,3 +121,26 @@ Deno.test("fs.promises.readFile with no arg call rejects with error correctly", // @ts-ignore no arg call needs to be supported await promises.readFile().catch((_e) => {}); }); + +Deno.test("fs.readFile error message contains path + syscall", async () => { + const path = "/does/not/exist"; + const err = await new Promise((resolve) => { + readFile(path, "utf-8", (err) => resolve(err)); + }); + if (err instanceof Error) { + assert(err.message.includes(path), "Path not found in error message"); + assertMatch(err.message, /[,\s]open\s/); + } +}); + +Deno.test("fs.readFileSync error message contains path + syscall", () => { + const path = "/does/not/exist"; + try { + readFileSync(path, "utf-8"); + } catch (err) { + if (err instanceof Error) { + assert(err.message.includes(path), "Path not found in error message"); + assertMatch(err.message, /[,\s]open\s/); + } + } +}); From 5462b5828ddc265dff25add269423d5cbe21024e Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 22 Nov 2024 22:35:10 +0000 Subject: [PATCH 390/436] fix(lsp): remove stray debug output (#27010) --- cli/lsp/tsc.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index c221a6097b92cd..ae87a9914f4501 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4454,11 +4454,7 @@ fn op_load<'s>( == NodeModuleKind::Cjs, }) }; - - lsp_warn!("op_load {} {}", &specifier, maybe_load_response.is_some()); - let serialized = serde_v8::to_v8(scope, maybe_load_response)?; - state.performance.measure(mark); Ok(serialized) } From 9eee2a0e9ef4d11aefba2707e7ef1959df02ac93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Baptista?= <15786310+M4RC3L05@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:57:33 +0000 Subject: [PATCH 391/436] fix(fmt): return `None` if sql fmt result is the same (#27014) Similar with https://github.com/denoland/deno/pull/25848, we need to make `format_sql` to return `None` so we do not flag well formatted sql files as being wrong. Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com> --- cli/tools/fmt.rs | 6 +++++- tests/specs/fmt/sql/__test__.jsonc | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index 9c2c7091294125..c2c2a6bb6bf3ca 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -549,7 +549,11 @@ pub fn format_sql( // Add single new line to the end of file. formatted_str.push('\n'); - Ok(Some(formatted_str)) + Ok(if formatted_str == file_text { + None + } else { + Some(formatted_str) + }) } /// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, IPYNB or SQL file. diff --git a/tests/specs/fmt/sql/__test__.jsonc b/tests/specs/fmt/sql/__test__.jsonc index a335e79c24d971..27c08abd835346 100644 --- a/tests/specs/fmt/sql/__test__.jsonc +++ b/tests/specs/fmt/sql/__test__.jsonc @@ -7,7 +7,7 @@ }, "flag": { "args": "fmt --unstable-sql", - "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]well_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 7 files\n" + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 7 files\n" }, "config_file": { "steps": [{ @@ -18,8 +18,12 @@ "output": "[WILDCARD]" }, { "args": "fmt", - "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]well_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 8 files\n" + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 8 files\n" }] + }, + "well_formatted_check": { + "args": "fmt --unstable-sql --check well_formatted.sql", + "output": "Checked 1 file\n" } } } From 9967e75e7e1e1194229a1f1274d1b6f9f30f5ebd Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 22 Nov 2024 18:30:59 -0500 Subject: [PATCH 392/436] chore: update to file_test_runner 0.7.3 (#27016) --- Cargo.lock | 4 ++-- tests/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7947106e665edd..6e929168f5313a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3086,9 +3086,9 @@ checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "file_test_runner" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b23dcc1b671771c6f59fdace6da685735c925f859733e8fd07fba6cae6462a" +checksum = "cf50901549edf2241e33d1715aec0575adc5510a09724877a1e0afe7ffafb0fb" dependencies = [ "anyhow", "crossbeam-channel", diff --git a/tests/Cargo.toml b/tests/Cargo.toml index ede509e38095b2..31cc022ce26ca0 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -45,7 +45,7 @@ deno_semver.workspace = true deno_terminal.workspace = true deno_tls.workspace = true fastwebsockets = { workspace = true, features = ["upgrade", "unstable-split"] } -file_test_runner = "0.7.2" +file_test_runner = "0.7.3" flaky_test = "=0.2.2" hickory-client = "=0.24" hickory-server = "=0.24" From 12b377247be2b74155ded3a678ff2996ef3d7c9f Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sat, 23 Nov 2024 01:26:30 +0000 Subject: [PATCH 393/436] fix(lsp): wasm file import completions (#27018) --- cli/util/path.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cli/util/path.rs b/cli/util/path.rs index 58bed664f9ba98..173f357c087f42 100644 --- a/cli/util/path.rs +++ b/cli/util/path.rs @@ -27,7 +27,16 @@ pub fn is_importable_ext(path: &Path) -> bool { if let Some(ext) = get_extension(path) { matches!( ext.as_str(), - "ts" | "tsx" | "js" | "jsx" | "mjs" | "mts" | "cjs" | "cts" | "json" + "ts" + | "tsx" + | "js" + | "jsx" + | "mjs" + | "mts" + | "cjs" + | "cts" + | "json" + | "wasm" ) } else { false @@ -222,6 +231,7 @@ mod test { assert!(is_script_ext(Path::new("foo.cjs"))); assert!(is_script_ext(Path::new("foo.cts"))); assert!(!is_script_ext(Path::new("foo.json"))); + assert!(!is_script_ext(Path::new("foo.wasm"))); assert!(!is_script_ext(Path::new("foo.mjsx"))); } @@ -243,6 +253,7 @@ mod test { assert!(is_importable_ext(Path::new("foo.cjs"))); assert!(is_importable_ext(Path::new("foo.cts"))); assert!(is_importable_ext(Path::new("foo.json"))); + assert!(is_importable_ext(Path::new("foo.wasm"))); assert!(!is_importable_ext(Path::new("foo.mjsx"))); } From 6b7e4c331b5c6b5177a0bb9c76eaf4036e9ed847 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Mon, 25 Nov 2024 01:02:38 -0500 Subject: [PATCH 394/436] fix(ext/node): add `fs.promises.fstat` and `FileHandle#stat` (#26719) Co-authored-by: Yoshiya Hinosawa --- ext/node/polyfills/_fs/_fs_fstat.ts | 21 +++++++++++++++++++++ ext/node/polyfills/fs.ts | 3 ++- ext/node/polyfills/fs/promises.ts | 1 + ext/node/polyfills/internal/fs/handle.ts | 10 +++++++++- tests/unit_node/_fs/_fs_handle_test.ts | 24 ++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/ext/node/polyfills/_fs/_fs_fstat.ts b/ext/node/polyfills/_fs/_fs_fstat.ts index c1722487eb3160..1a845dfff4a453 100644 --- a/ext/node/polyfills/_fs/_fs_fstat.ts +++ b/ext/node/polyfills/_fs/_fs_fstat.ts @@ -63,3 +63,24 @@ export function fstatSync( const origin = new FsFile(fd, Symbol.for("Deno.internal.FsFile")).statSync(); return CFISBIS(origin, options?.bigint || false); } + +export function fstatPromise(fd: number): Promise; +export function fstatPromise( + fd: number, + options: { bigint: false }, +): Promise; +export function fstatPromise( + fd: number, + options: { bigint: true }, +): Promise; +export function fstatPromise( + fd: number, + options?: statOptions, +): Stats | BigIntStats { + return new Promise((resolve, reject) => { + fstat(fd, options, (err, stats) => { + if (err) reject(err); + else resolve(stats); + }); + }); +} diff --git a/ext/node/polyfills/fs.ts b/ext/node/polyfills/fs.ts index 7a3cf4e67f2d52..cbdc36afe55652 100644 --- a/ext/node/polyfills/fs.ts +++ b/ext/node/polyfills/fs.ts @@ -23,7 +23,7 @@ import Dir from "ext:deno_node/_fs/_fs_dir.ts"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import { exists, existsSync } from "ext:deno_node/_fs/_fs_exists.ts"; import { fdatasync, fdatasyncSync } from "ext:deno_node/_fs/_fs_fdatasync.ts"; -import { fstat, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts"; +import { fstat, fstatPromise, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts"; import { fsync, fsyncSync } from "ext:deno_node/_fs/_fs_fsync.ts"; import { ftruncate, ftruncateSync } from "ext:deno_node/_fs/_fs_ftruncate.ts"; import { futimes, futimesSync } from "ext:deno_node/_fs/_fs_futimes.ts"; @@ -174,6 +174,7 @@ const promises = { lstat: lstatPromise, stat: statPromise, statfs: statfsPromise, + fstat: fstatPromise, link: linkPromise, unlink: unlinkPromise, chmod: chmodPromise, diff --git a/ext/node/polyfills/fs/promises.ts b/ext/node/polyfills/fs/promises.ts index 3e5329dbbe932f..a5125dac8dc9d7 100644 --- a/ext/node/polyfills/fs/promises.ts +++ b/ext/node/polyfills/fs/promises.ts @@ -16,6 +16,7 @@ export const readlink = fsPromises.readlink; export const symlink = fsPromises.symlink; export const lstat = fsPromises.lstat; export const stat = fsPromises.stat; +export const fstat = fsPromises.fstat; export const link = fsPromises.link; export const unlink = fsPromises.unlink; export const chmod = fsPromises.chmod; diff --git a/ext/node/polyfills/internal/fs/handle.ts b/ext/node/polyfills/internal/fs/handle.ts index fc3a7ae20599a0..9ec0fc97e25642 100644 --- a/ext/node/polyfills/internal/fs/handle.ts +++ b/ext/node/polyfills/internal/fs/handle.ts @@ -6,6 +6,7 @@ import { EventEmitter } from "node:events"; import { Buffer } from "node:buffer"; import { promises, read, write } from "node:fs"; +export type { BigIntStats, Stats } from "ext:deno_node/_fs/_fs_stat.ts"; import { BinaryOptionsArgument, FileOptionsArgument, @@ -141,6 +142,13 @@ export class FileHandle extends EventEmitter { // Note that Deno.close is not async return Promise.resolve(core.close(this.fd)); } + + stat(): Promise; + stat(options: { bigint: false }): Promise; + stat(options: { bigint: true }): Promise; + stat(options?: { bigint: boolean }): Promise { + return fsCall(promises.fstat, this, options); + } } function fsCall(fn, handle, ...args) { @@ -152,7 +160,7 @@ function fsCall(fn, handle, ...args) { }); } - return fn(handle, ...args); + return fn(handle.fd, ...args); } export default { diff --git a/tests/unit_node/_fs/_fs_handle_test.ts b/tests/unit_node/_fs/_fs_handle_test.ts index 755e091fd7a505..e26b82aa067f16 100644 --- a/tests/unit_node/_fs/_fs_handle_test.ts +++ b/tests/unit_node/_fs/_fs_handle_test.ts @@ -93,3 +93,27 @@ Deno.test("[node/fs filehandle.write] Write from string", async function () { assertEquals(res.bytesWritten, 11); assertEquals(decoder.decode(data), "hello world"); }); + +Deno.test("[node/fs filehandle.stat] Get file status", async function () { + const fileHandle = await fs.open(testData); + const stat = await fileHandle.stat(); + + assertEquals(stat.isFile(), true); + assertEquals(stat.size, "hello world".length); + + await fileHandle.close(); +}); + +Deno.test("[node/fs filehandle.writeFile] Write to file", async function () { + const tempFile: string = await Deno.makeTempFile(); + const fileHandle = await fs.open(tempFile, "w"); + + const str = "hello world"; + await fileHandle.writeFile(str); + + const data = Deno.readFileSync(tempFile); + await Deno.remove(tempFile); + await fileHandle.close(); + + assertEquals(decoder.decode(data), "hello world"); +}); From 8ea95c34b5fc7cf0bfe6ea230e4bab9b2504fd2f Mon Sep 17 00:00:00 2001 From: snek Date: Mon, 25 Nov 2024 10:45:06 +0100 Subject: [PATCH 395/436] feat: Instrument Deno.serve (#26964) Add basic trace to Deno.serve. Also updates a bit of the testing infra to make it easier to deal with. --- ext/http/00_serve.ts | 193 ++++++++++++++-------- runtime/js/telemetry.ts | 66 ++++---- runtime/ops/otel.rs | 6 +- tests/specs/cli/otel_basic/__test__.jsonc | 12 -- tests/specs/cli/otel_basic/basic.out | 80 +++++++-- tests/specs/cli/otel_basic/main.ts | 35 ++-- 6 files changed, 247 insertions(+), 145 deletions(-) diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index fcdb87d092c7a0..766a6d2739a3e8 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -34,8 +34,11 @@ const { ObjectHasOwn, ObjectPrototypeIsPrototypeOf, PromisePrototypeCatch, + SafePromisePrototypeFinally, PromisePrototypeThen, + String, StringPrototypeIncludes, + StringPrototypeSlice, Symbol, TypeError, TypedArrayPrototypeGetSymbolToStringTag, @@ -513,91 +516,139 @@ function fastSyncResponseOrStream( * This function returns a promise that will only reject in the case of abnormal exit. */ function mapToCallback(context, callback, onError) { - return async function (req) { - const asyncContext = getAsyncContext(); - setAsyncContext(context.asyncContext); - + let mapped = async function (req, span) { + // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback + // 500 error. + let innerRequest; + let response; try { - // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback - // 500 error. - let innerRequest; - let response; - try { - innerRequest = new InnerRequest(req, context); - const request = fromInnerRequest(innerRequest, "immutable"); - innerRequest.request = request; - response = await callback( - request, - new ServeHandlerInfo(innerRequest), + innerRequest = new InnerRequest(req, context); + const request = fromInnerRequest(innerRequest, "immutable"); + innerRequest.request = request; + + if (span) { + span.updateName(request.method); + span.setAttribute("http.request.method", request.method); + const url = new URL(request.url); + span.setAttribute("url.full", request.url); + span.setAttribute( + "url.scheme", + StringPrototypeSlice(url.protocol, 0, -1), ); + span.setAttribute("url.path", url.pathname); + span.setAttribute("url.query", StringPrototypeSlice(url.search, 1)); + } - // Throwing Error if the handler return value is not a Response class - if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { - throw new TypeError( - "Return value from serve handler must be a response or a promise resolving to a response", - ); - } + response = await callback( + request, + new ServeHandlerInfo(innerRequest), + ); - if (response.type === "error") { - throw new TypeError( - "Return value from serve handler must not be an error response (like Response.error())", - ); - } + // Throwing Error if the handler return value is not a Response class + if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { + throw new TypeError( + "Return value from serve handler must be a response or a promise resolving to a response", + ); + } + + if (response.type === "error") { + throw new TypeError( + "Return value from serve handler must not be an error response (like Response.error())", + ); + } - if (response.bodyUsed) { + if (response.bodyUsed) { + throw new TypeError( + "The body of the Response returned from the serve handler has already been consumed", + ); + } + } catch (error) { + try { + response = await onError(error); + if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { throw new TypeError( - "The body of the Response returned from the serve handler has already been consumed", + "Return value from onError handler must be a response or a promise resolving to a response", ); } } catch (error) { - try { - response = await onError(error); - if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { - throw new TypeError( - "Return value from onError handler must be a response or a promise resolving to a response", - ); - } - } catch (error) { - // deno-lint-ignore no-console - console.error("Exception in onError while handling exception", error); - response = internalServerError(); - } - } - const inner = toInnerResponse(response); - if (innerRequest?.[_upgraded]) { - // We're done here as the connection has been upgraded during the callback and no longer requires servicing. - if (response !== UPGRADE_RESPONSE_SENTINEL) { - // deno-lint-ignore no-console - console.error("Upgrade response was not returned from callback"); - context.close(); - } - innerRequest?.[_upgraded](); - return; + // deno-lint-ignore no-console + console.error("Exception in onError while handling exception", error); + response = internalServerError(); } + } - // Did everything shut down while we were waiting? - if (context.closed) { - // We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate - innerRequest?.close(); - op_http_set_promise_complete(req, 503); - return; - } + if (span) { + span.setAttribute( + "http.response.status_code", + String(response.status), + ); + } - const status = inner.status; - const headers = inner.headerList; - if (headers && headers.length > 0) { - if (headers.length == 1) { - op_http_set_response_header(req, headers[0][0], headers[0][1]); - } else { - op_http_set_response_headers(req, headers); - } + const inner = toInnerResponse(response); + if (innerRequest?.[_upgraded]) { + // We're done here as the connection has been upgraded during the callback and no longer requires servicing. + if (response !== UPGRADE_RESPONSE_SENTINEL) { + // deno-lint-ignore no-console + console.error("Upgrade response was not returned from callback"); + context.close(); } + innerRequest?.[_upgraded](); + return; + } - fastSyncResponseOrStream(req, inner.body, status, innerRequest); - } finally { - setAsyncContext(asyncContext); + // Did everything shut down while we were waiting? + if (context.closed) { + // We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate + innerRequest?.close(); + op_http_set_promise_complete(req, 503); + return; + } + + const status = inner.status; + const headers = inner.headerList; + if (headers && headers.length > 0) { + if (headers.length == 1) { + op_http_set_response_header(req, headers[0][0], headers[0][1]); + } else { + op_http_set_response_headers(req, headers); + } } + + fastSyncResponseOrStream(req, inner.body, status, innerRequest); }; + + if (internals.telemetry.tracingEnabled) { + const { Span, enterSpan, endSpan } = internals.telemetry; + const origMapped = mapped; + mapped = function (req, _span) { + const oldCtx = getAsyncContext(); + setAsyncContext(context.asyncContext); + const span = new Span("deno.serve"); + try { + enterSpan(span); + return SafePromisePrototypeFinally( + origMapped(req, span), + () => endSpan(span), + ); + } finally { + // equiv to exitSpan. + setAsyncContext(oldCtx); + } + }; + } else { + const origMapped = mapped; + mapped = function (req, span) { + const oldCtx = getAsyncContext(); + setAsyncContext(context.asyncContext); + try { + return origMapped(req, span); + } finally { + setAsyncContext(oldCtx); + } + }; + } + + return mapped; } type RawHandler = ( @@ -795,7 +846,7 @@ function serveHttpOn(context, addr, callback) { // Attempt to pull as many requests out of the queue as possible before awaiting. This API is // a synchronous, non-blocking API that returns u32::MAX if anything goes wrong. while ((req = op_http_try_wait(rid)) !== null) { - PromisePrototypeCatch(callback(req), promiseErrorHandler); + PromisePrototypeCatch(callback(req, undefined), promiseErrorHandler); } currentPromise = op_http_wait(rid); if (!ref) { @@ -815,7 +866,7 @@ function serveHttpOn(context, addr, callback) { if (req === null) { break; } - PromisePrototypeCatch(callback(req), promiseErrorHandler); + PromisePrototypeCatch(callback(req, undefined), promiseErrorHandler); } try { diff --git a/runtime/js/telemetry.ts b/runtime/js/telemetry.ts index ecef3b5e68be13..96c1c9369f2d67 100644 --- a/runtime/js/telemetry.ts +++ b/runtime/js/telemetry.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { core, primordials } from "ext:core/mod.js"; +import { core, internals, primordials } from "ext:core/mod.js"; import { op_crypto_get_random_values, op_otel_instrumentation_scope_create_and_enter, @@ -32,11 +32,9 @@ const { ObjectDefineProperty, WeakRefPrototypeDeref, String, + StringPrototypePadStart, ObjectPrototypeIsPrototypeOf, - DataView, - DataViewPrototypeSetUint32, SafeWeakRef, - TypedArrayPrototypeGetBuffer, } = primordials; const { AsyncVariable, setAsyncContext } = core; @@ -404,7 +402,7 @@ export class Span { span.#asyncContext = NO_ASYNC_CONTEXT; }; - exitSpan = (span: Span) => { + endSpan = (span: Span) => { const endTime = now(); submit( span.#spanId, @@ -449,39 +447,11 @@ export class Span { const currentSpan: Span | { spanContext(): { traceId: string; spanId: string }; } = CURRENT.get()?.getValue(SPAN_KEY); - if (!currentSpan) { - const buffer = new Uint8Array(TRACE_ID_BYTES + SPAN_ID_BYTES); - if (DETERMINISTIC) { - DataViewPrototypeSetUint32( - new DataView(TypedArrayPrototypeGetBuffer(buffer)), - TRACE_ID_BYTES - 4, - COUNTER, - true, - ); - COUNTER += 1; - DataViewPrototypeSetUint32( - new DataView(TypedArrayPrototypeGetBuffer(buffer)), - TRACE_ID_BYTES + SPAN_ID_BYTES - 4, - COUNTER, - true, - ); - COUNTER += 1; - } else { - op_crypto_get_random_values(buffer); - } - this.#traceId = TypedArrayPrototypeSubarray(buffer, 0, TRACE_ID_BYTES); - this.#spanId = TypedArrayPrototypeSubarray(buffer, TRACE_ID_BYTES); - } else { - this.#spanId = new Uint8Array(SPAN_ID_BYTES); + if (currentSpan) { if (DETERMINISTIC) { - DataViewPrototypeSetUint32( - new DataView(TypedArrayPrototypeGetBuffer(this.#spanId)), - SPAN_ID_BYTES - 4, - COUNTER, - true, - ); - COUNTER += 1; + this.#spanId = StringPrototypePadStart(String(COUNTER++), 16, "0"); } else { + this.#spanId = new Uint8Array(SPAN_ID_BYTES); op_crypto_get_random_values(this.#spanId); } // deno-lint-ignore prefer-primordials @@ -493,6 +463,16 @@ export class Span { this.#traceId = context.traceId; this.#parentSpanId = context.spanId; } + } else { + if (DETERMINISTIC) { + this.#traceId = StringPrototypePadStart(String(COUNTER++), 32, "0"); + this.#spanId = StringPrototypePadStart(String(COUNTER++), 16, "0"); + } else { + const buffer = new Uint8Array(TRACE_ID_BYTES + SPAN_ID_BYTES); + op_crypto_get_random_values(buffer); + this.#traceId = TypedArrayPrototypeSubarray(buffer, 0, TRACE_ID_BYTES); + this.#spanId = TypedArrayPrototypeSubarray(buffer, TRACE_ID_BYTES); + } } } @@ -717,4 +697,16 @@ export function bootstrap( } } -export const telemetry = { SpanExporter, ContextManager }; +export const telemetry = { + SpanExporter, + ContextManager, +}; +internals.telemetry = { + Span, + enterSpan, + exitSpan, + endSpan, + get tracingEnabled() { + return TRACING_ENABLED; + }, +}; diff --git a/runtime/ops/otel.rs b/runtime/ops/otel.rs index 61a7b0ef0dff8f..19f09d9f6d99de 100644 --- a/runtime/ops/otel.rs +++ b/runtime/ops/otel.rs @@ -835,9 +835,9 @@ fn op_otel_span_set_dropped( #[smi] dropped_events_count: u32, ) { if let Some(temporary_span) = state.try_borrow_mut::() { - temporary_span.0.dropped_attributes_count = dropped_attributes_count; - temporary_span.0.links.dropped_count = dropped_links_count; - temporary_span.0.events.dropped_count = dropped_events_count; + temporary_span.0.dropped_attributes_count += dropped_attributes_count; + temporary_span.0.links.dropped_count += dropped_links_count; + temporary_span.0.events.dropped_count += dropped_events_count; } } diff --git a/tests/specs/cli/otel_basic/__test__.jsonc b/tests/specs/cli/otel_basic/__test__.jsonc index 5a27e92625307b..991413c3d53847 100644 --- a/tests/specs/cli/otel_basic/__test__.jsonc +++ b/tests/specs/cli/otel_basic/__test__.jsonc @@ -2,30 +2,18 @@ "steps": [ { "args": "run -A main.ts basic.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "basic.out" }, { "args": "run -A main.ts natural_exit.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "natural_exit.out" }, { "args": "run -A main.ts deno_dot_exit.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "deno_dot_exit.out" }, { "args": "run -A main.ts uncaught.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "uncaught.out" } ] diff --git a/tests/specs/cli/otel_basic/basic.out b/tests/specs/cli/otel_basic/basic.out index 3745cb7f359929..1883866a1d1349 100644 --- a/tests/specs/cli/otel_basic/basic.out +++ b/tests/specs/cli/otel_basic/basic.out @@ -1,16 +1,53 @@ { "spans": [ { - "traceId": "10000000000000000000000000000002", - "spanId": "1000000000000003", + "traceId": "00000000000000000000000000000001", + "spanId": "0000000000000002", "traceState": "", - "parentSpanId": "1000000000000001", + "parentSpanId": "", "flags": 1, - "name": "inner span", + "name": "GET", "kind": 1, "startTimeUnixNano": "[WILDCARD]", "endTimeUnixNano": "[WILDCARD]", - "attributes": [], + "attributes": [ + { + "key": "http.request.method", + "value": { + "stringValue": "GET" + } + }, + { + "key": "url.full", + "value": { + "stringValue": "http://localhost:[WILDCARD]/" + } + }, + { + "key": "url.scheme", + "value": { + "stringValue": "http" + } + }, + { + "key": "url.path", + "value": { + "stringValue": "/" + } + }, + { + "key": "url.query", + "value": { + "stringValue": "" + } + }, + { + "key": "http.response.status_code", + "value": { + "stringValue": "200" + } + } + ], "droppedAttributesCount": 0, "events": [], "droppedEventsCount": 0, @@ -22,10 +59,10 @@ } }, { - "traceId": "10000000000000000000000000000002", + "traceId": "00000000000000000000000000000001", "spanId": "1000000000000001", "traceState": "", - "parentSpanId": "", + "parentSpanId": "0000000000000002", "flags": 1, "name": "outer span", "kind": 1, @@ -41,6 +78,27 @@ "message": "", "code": 0 } + }, + { + "traceId": "00000000000000000000000000000001", + "spanId": "1000000000000002", + "traceState": "", + "parentSpanId": "1000000000000001", + "flags": 1, + "name": "inner span", + "kind": 1, + "startTimeUnixNano": "[WILDCARD]", + "endTimeUnixNano": "[WILDCARD]", + "attributes": [], + "droppedAttributesCount": 0, + "events": [], + "droppedEventsCount": 0, + "links": [], + "droppedLinksCount": 0, + "status": { + "message": "", + "code": 0 + } } ], "logs": [ @@ -55,8 +113,8 @@ "attributes": [], "droppedAttributesCount": 0, "flags": 1, - "traceId": "10000000000000000000000000000002", - "spanId": "1000000000000003" + "traceId": "00000000000000000000000000000001", + "spanId": "1000000000000002" }, { "timeUnixNano": "0", @@ -69,8 +127,8 @@ "attributes": [], "droppedAttributesCount": 0, "flags": 1, - "traceId": "10000000000000000000000000000002", - "spanId": "1000000000000003" + "traceId": "00000000000000000000000000000001", + "spanId": "1000000000000002" } ] } diff --git a/tests/specs/cli/otel_basic/main.ts b/tests/specs/cli/otel_basic/main.ts index 5415a7437d1054..bdbae0cc0ed7b2 100644 --- a/tests/specs/cli/otel_basic/main.ts +++ b/tests/specs/cli/otel_basic/main.ts @@ -12,26 +12,39 @@ const server = Deno.serve( const command = new Deno.Command(Deno.execPath(), { args: ["run", "-A", "-q", "--unstable-otel", Deno.args[0]], env: { + DENO_UNSTABLE_OTEL_DETERMINISTIC: "1", OTEL_EXPORTER_OTLP_PROTOCOL: "http/json", OTEL_EXPORTER_OTLP_ENDPOINT: `http://localhost:${port}`, }, stdout: "null", }); const child = command.spawn(); - child.output().then(() => { - server.shutdown(); - - console.log(JSON.stringify(data, null, 2)); - }); + child.output() + .then(() => server.shutdown()) + .then(() => { + data.logs.sort((a, b) => + Number( + BigInt(a.observedTimeUnixNano) - BigInt(b.observedTimeUnixNano), + ) + ); + data.spans.sort((a, b) => + Number(BigInt(`0x${a.spanId}`) - BigInt(`0x${b.spanId}`)) + ); + console.log(JSON.stringify(data, null, 2)); + }); }, async handler(req) { const body = await req.json(); - if (body.resourceLogs) { - data.logs.push(...body.resourceLogs[0].scopeLogs[0].logRecords); - } - if (body.resourceSpans) { - data.spans.push(...body.resourceSpans[0].scopeSpans[0].spans); - } + body.resourceLogs?.forEach((rLogs) => { + rLogs.scopeLogs.forEach((sLogs) => { + data.logs.push(...sLogs.logRecords); + }); + }); + body.resourceSpans?.forEach((rSpans) => { + rSpans.scopeSpans.forEach((sSpans) => { + data.spans.push(...sSpans.spans); + }); + }); return Response.json({ partialSuccess: {} }, { status: 200 }); }, }, From d04d5677d9161373160515ecdabfbbdc4b94d5b7 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 25 Nov 2024 22:35:53 +0900 Subject: [PATCH 396/436] chore: update node_compat setup script (#27051) This PR updates the node_compat setup script. Now the copied version in each test file is corrected. Also `TODO.md` links to the correct files in Node.js repo. --- tests/node_compat/common.ts | 1 - tests/node_compat/config.jsonc | 1 - tests/node_compat/runner/TODO.md | 6182 ++++++++--------- tests/node_compat/runner/setup.ts | 3 +- tests/node_compat/runner/suite | 2 +- .../node_compat/test/common/child_process.js | 2 +- tests/node_compat/test/common/countdown.js | 2 +- tests/node_compat/test/common/dns.js | 2 +- tests/node_compat/test/common/duplexpair.js | 2 +- tests/node_compat/test/common/fixtures.js | 2 +- tests/node_compat/test/common/hijackstdio.js | 2 +- tests/node_compat/test/common/index.mjs | 2 +- tests/node_compat/test/common/tmpdir.js | 2 +- .../test/fixtures/GH-1899-output.js | 2 +- tests/node_compat/test/fixtures/a.js | 2 +- .../test/fixtures/child-process-persistent.js | 2 +- .../child_process_should_emit_error.js | 2 +- tests/node_compat/test/fixtures/loop.js | 2 +- .../test/internet/test-dns-idna2008.js | 2 +- .../test/internet/test-dns-lookup.js | 2 +- .../internet/test-dns-promises-resolve.js | 2 +- .../test/internet/test-dns-regress-6244.js | 2 +- ...t-dns-setserver-in-callback-of-resolve4.js | 2 +- .../internet/test-http-https-default-ports.js | 2 +- .../test/parallel/test-assert-async.js | 2 +- .../test/parallel/test-assert-fail.js | 2 +- .../parallel/test-assert-strict-exists.js | 2 +- .../test/parallel/test-bad-unicode.js | 2 +- .../test/parallel/test-btoa-atob.js | 2 +- .../test/parallel/test-buffer-ascii.js | 2 +- .../test/parallel/test-buffer-badhex.js | 2 +- .../test/parallel/test-buffer-bigint64.js | 2 +- .../test/parallel/test-buffer-bytelength.js | 2 +- .../parallel/test-buffer-compare-offset.js | 2 +- .../test/parallel/test-buffer-concat.js | 2 +- .../test/parallel/test-buffer-constants.js | 2 +- .../test/parallel/test-buffer-copy.js | 2 +- .../test/parallel/test-buffer-equals.js | 2 +- .../test-buffer-failed-alloc-typed-arrays.js | 2 +- .../test/parallel/test-buffer-fakes.js | 2 +- .../test/parallel/test-buffer-inheritance.js | 2 +- .../test/parallel/test-buffer-isascii.js | 2 +- .../test/parallel/test-buffer-isencoding.js | 2 +- .../test/parallel/test-buffer-isutf8.js | 2 +- .../test/parallel/test-buffer-iterator.js | 2 +- .../test/parallel/test-buffer-new.js | 2 +- .../test-buffer-no-negative-allocation.js | 2 +- .../parallel/test-buffer-nopendingdep-map.js | 2 +- .../parallel/test-buffer-of-no-deprecation.js | 2 +- .../parallel/test-buffer-over-max-length.js | 2 +- .../parallel/test-buffer-parent-property.js | 2 +- .../test/parallel/test-buffer-read.js | 2 +- .../test/parallel/test-buffer-readdouble.js | 2 +- .../test/parallel/test-buffer-readfloat.js | 2 +- .../test/parallel/test-buffer-readint.js | 2 +- .../test/parallel/test-buffer-readuint.js | 2 +- .../test/parallel/test-buffer-safe-unsafe.js | 2 +- .../test/parallel/test-buffer-slice.js | 2 +- .../test/parallel/test-buffer-slow.js | 2 +- .../test/parallel/test-buffer-swap.js | 2 +- .../test/parallel/test-buffer-tojson.js | 2 +- .../parallel/test-buffer-tostring-range.js | 2 +- .../test-buffer-tostring-rangeerror.js | 2 +- .../test/parallel/test-buffer-tostring.js | 2 +- .../test/parallel/test-buffer-writedouble.js | 2 +- .../test/parallel/test-buffer-writefloat.js | 2 +- .../test/parallel/test-buffer-writeint.js | 2 +- .../test/parallel/test-buffer-writeuint.js | 2 +- .../parallel/test-buffer-zero-fill-cli.js | 2 +- .../parallel/test-buffer-zero-fill-reset.js | 2 +- .../test/parallel/test-buffer-zero-fill.js | 2 +- .../test-child-process-default-options.js | 2 +- .../test-child-process-double-pipe.js | 2 +- .../parallel/test-child-process-exec-cwd.js | 2 +- .../parallel/test-child-process-exec-env.js | 2 +- .../parallel/test-child-process-exec-error.js | 2 +- ...-process-exec-stdout-stderr-data-string.js | 2 +- .../test-child-process-execfile-maxbuf.js | 2 +- .../test-child-process-execfilesync-maxbuf.js | 2 +- .../test-child-process-flush-stdio.js | 2 +- .../test-child-process-ipc-next-tick.js | 2 +- .../test/parallel/test-child-process-kill.js | 2 +- .../test-child-process-set-blocking.js | 2 +- .../parallel/test-child-process-spawn-args.js | 2 +- .../test-child-process-spawn-event.js | 2 +- .../test-child-process-spawnsync-args.js | 2 +- .../test-child-process-spawnsync-maxbuf.js | 2 +- ...ild-process-spawnsync-validation-errors.js | 2 +- .../parallel/test-child-process-spawnsync.js | 2 +- .../test-console-async-write-error.js | 2 +- .../test/parallel/test-console-group.js | 2 +- .../test-console-log-stdio-broken-dest.js | 2 +- .../test-console-log-throw-primitive.js | 2 +- .../test-console-no-swallow-stack-overflow.js | 2 +- .../parallel/test-console-sync-write-error.js | 2 +- .../test/parallel/test-console-table.js | 2 +- .../test/parallel/test-console-tty-colors.js | 2 +- .../test/parallel/test-crypto-dh-shared.js | 2 +- .../test/parallel/test-crypto-hash.js | 2 +- .../parallel/test-crypto-secret-keygen.js | 2 +- .../parallel/test-crypto-update-encoding.js | 2 +- .../parallel/test-dgram-close-during-bind.js | 2 +- .../test/parallel/test-dgram-close-signal.js | 2 +- ...est-diagnostics-channel-has-subscribers.js | 2 +- .../parallel/test-diagnostics-channel-net.js | 2 +- ...gnostics-channel-object-channel-pub-sub.js | 2 +- .../test-diagnostics-channel-pub-sub.js | 2 +- .../test-diagnostics-channel-symbol-named.js | 2 +- ...st-diagnostics-channel-sync-unsubscribe.js | 2 +- ...tics-channel-tracing-channel-args-types.js | 2 +- ...nel-tracing-channel-callback-run-stores.js | 2 +- ...nnel-tracing-channel-promise-run-stores.js | 2 +- ...tics-channel-tracing-channel-sync-error.js | 2 +- ...iagnostics-channel-tracing-channel-sync.js | 2 +- .../parallel/test-diagnostics-channel-udp.js | 2 +- .../test/parallel/test-dns-memory-error.js | 2 +- .../test/parallel/test-dns-promises-exists.js | 2 +- .../parallel/test-dns-resolvens-typeerror.js | 2 +- .../test-dns-setservers-type-check.js | 2 +- .../test-eval-strict-referenceerror.js | 2 +- tests/node_compat/test/parallel/test-eval.js | 2 +- .../test-event-emitter-add-listeners.js | 2 +- .../test-event-emitter-emit-context.js | 2 +- .../test-event-emitter-error-monitor.js | 2 +- .../parallel/test-event-emitter-errors.js | 2 +- .../test-event-emitter-get-max-listeners.js | 2 +- .../test-event-emitter-invalid-listener.js | 2 +- .../test-event-emitter-listener-count.js | 2 +- ...st-event-emitter-listeners-side-effects.js | 2 +- .../parallel/test-event-emitter-listeners.js | 2 +- .../test-event-emitter-method-names.js | 2 +- .../test-event-emitter-modify-in-emit.js | 2 +- .../parallel/test-event-emitter-num-args.js | 2 +- .../test/parallel/test-event-emitter-once.js | 2 +- ...test-event-emitter-remove-all-listeners.js | 2 +- .../test-event-emitter-remove-listeners.js | 2 +- ...-emitter-set-max-listeners-side-effects.js | 2 +- .../test-event-emitter-special-event-names.js | 2 +- .../parallel/test-event-emitter-subclass.js | 2 +- .../parallel/test-event-emitter-symbols.js | 2 +- .../test/parallel/test-events-list.js | 2 +- .../parallel/test-events-on-async-iterator.js | 2 +- .../test-events-uncaught-exception-stack.js | 2 +- .../parallel/test-eventtarget-brandcheck.js | 2 +- .../test/parallel/test-exception-handler.js | 2 +- .../test/parallel/test-exception-handler2.js | 2 +- .../test/parallel/test-file-read-noexist.js | 2 +- .../test/parallel/test-file-write-stream.js | 2 +- .../test/parallel/test-file-write-stream2.js | 2 +- .../test/parallel/test-file-write-stream3.js | 2 +- .../test/parallel/test-file-write-stream4.js | 2 +- .../test/parallel/test-fs-access.js | 2 +- .../test/parallel/test-fs-append-file-sync.js | 2 +- .../test/parallel/test-fs-chown-type-check.js | 2 +- .../test/parallel/test-fs-copyfile.js | 2 +- .../test/parallel/test-fs-empty-readStream.js | 2 +- .../test/parallel/test-fs-lchown.js | 2 +- .../test/parallel/test-fs-open-flags.js | 2 +- .../test/parallel/test-fs-open-mode-mask.js | 2 +- .../test/parallel/test-fs-open-no-close.js | 2 +- .../parallel/test-fs-open-numeric-flags.js | 2 +- .../test-fs-promises-writefile-with-fd.js | 2 +- .../parallel/test-fs-read-stream-autoClose.js | 2 +- .../test-fs-read-stream-concurrent-reads.js | 2 +- .../test-fs-read-stream-double-close.js | 2 +- .../parallel/test-fs-read-stream-encoding.js | 2 +- .../test/parallel/test-fs-read-stream-fd.js | 2 +- .../parallel/test-fs-read-stream-inherit.js | 2 +- .../test-fs-read-stream-patch-open.js | 2 +- .../parallel/test-fs-read-stream-resume.js | 2 +- .../test-fs-read-stream-throw-type-error.js | 2 +- .../test/parallel/test-fs-read-type.js | 2 +- .../test/parallel/test-fs-read-zero-length.js | 2 +- .../node_compat/test/parallel/test-fs-read.js | 2 +- .../test-fs-readdir-stack-overflow.js | 2 +- .../test/parallel/test-fs-readdir.js | 2 +- .../test/parallel/test-fs-readfile-empty.js | 2 +- .../test/parallel/test-fs-readv-sync.js | 2 +- .../test/parallel/test-fs-readv.js | 2 +- .../test/parallel/test-fs-realpath-native.js | 2 +- ...fs-rmdir-recursive-sync-warns-not-found.js | 2 +- ...t-fs-rmdir-recursive-sync-warns-on-file.js | 2 +- ...est-fs-rmdir-recursive-throws-not-found.js | 2 +- .../test-fs-rmdir-recursive-throws-on-file.js | 2 +- ...test-fs-rmdir-recursive-warns-not-found.js | 2 +- .../test-fs-rmdir-recursive-warns-on-file.js | 2 +- .../test/parallel/test-fs-rmdir-type-check.js | 2 +- .../test/parallel/test-fs-utimes.js | 2 +- .../test/parallel/test-fs-watchfile.js | 2 +- .../test/parallel/test-fs-write-buffer.js | 2 +- .../parallel/test-fs-write-file-buffer.js | 2 +- .../test-fs-write-file-invalid-path.js | 2 +- .../test/parallel/test-fs-write-file-sync.js | 2 +- .../test/parallel/test-fs-write-no-fd.js | 2 +- .../test-fs-write-stream-autoclose-option.js | 2 +- ...-fs-write-stream-close-without-callback.js | 2 +- .../test-fs-write-stream-double-close.js | 2 +- .../test/parallel/test-fs-write-stream-end.js | 2 +- .../test/parallel/test-fs-write-stream-fs.js | 2 +- .../test-fs-write-stream-throw-type-error.js | 2 +- .../test/parallel/test-fs-write-stream.js | 2 +- .../test/parallel/test-fs-write-sync.js | 2 +- .../test/parallel/test-fs-write.js | 2 +- .../test/parallel/test-fs-writev-sync.js | 2 +- .../parallel/test-handle-wrap-close-abort.js | 2 +- .../test/parallel/test-http-agent-getname.js | 2 +- .../test/parallel/test-http-client-get-url.js | 2 +- .../test-http-client-read-in-error.js | 2 +- .../parallel/test-http-header-validators.js | 2 +- .../test/parallel/test-http-localaddress.js | 2 +- ...tp-outgoing-internal-headernames-getter.js | 2 +- ...tp-outgoing-internal-headernames-setter.js | 2 +- .../test-http-outgoing-internal-headers.js | 2 +- .../test-http-outgoing-renderHeaders.js | 2 +- .../parallel/test-http-outgoing-settimeout.js | 2 +- ....parse-only-support-http-https-protocol.js | 2 +- .../test/parallel/test-icu-transcode.js | 2 +- .../parallel/test-net-access-byteswritten.js | 2 +- ...t-net-better-error-messages-listen-path.js | 2 +- ...net-better-error-messages-port-hostname.js | 2 +- .../test-net-connect-after-destroy.js | 2 +- .../test/parallel/test-net-connect-destroy.js | 2 +- .../test-net-connect-immediate-destroy.js | 2 +- .../test-net-connect-immediate-finish.js | 2 +- .../test/parallel/test-net-connect-no-arg.js | 2 +- .../test/parallel/test-net-dns-error.js | 2 +- .../test/parallel/test-net-during-close.js | 2 +- .../parallel/test-net-end-without-connect.js | 2 +- .../test/parallel/test-net-isip.js | 2 +- .../test/parallel/test-net-isipv4.js | 2 +- .../test/parallel/test-net-isipv6.js | 2 +- ...n-close-server-callback-is-not-function.js | 2 +- .../parallel/test-net-listen-close-server.js | 2 +- .../test/parallel/test-net-listening.js | 2 +- .../test/parallel/test-net-localerror.js | 2 +- .../test/parallel/test-net-options-lookup.js | 2 +- .../parallel/test-net-pipe-connect-errors.js | 2 +- .../test-net-server-listen-options-signal.js | 2 +- .../test-net-server-listen-options.js | 2 +- .../test-net-server-listen-remove-callback.js | 2 +- .../test/parallel/test-net-server-options.js | 2 +- .../test-net-server-unref-persistent.js | 2 +- .../test/parallel/test-net-server-unref.js | 2 +- .../parallel/test-net-socket-destroy-twice.js | 2 +- .../test-net-socket-no-halfopen-enforcer.js | 2 +- .../parallel/test-net-socket-setnodelay.js | 2 +- .../parallel/test-net-timeout-no-handle.js | 2 +- .../parallel/test-next-tick-doesnt-hang.js | 2 +- .../test-next-tick-fixed-queue-regression.js | 2 +- .../test-next-tick-intentional-starvation.js | 2 +- .../test/parallel/test-next-tick-ordering.js | 2 +- .../test/parallel/test-next-tick-ordering2.js | 2 +- .../parallel/test-next-tick-when-exiting.js | 2 +- .../test/parallel/test-next-tick.js | 2 +- .../test/parallel/test-nodeeventtarget.js | 2 +- tests/node_compat/test/parallel/test-os.js | 2 +- .../parallel/test-outgoing-message-destroy.js | 2 +- .../parallel/test-outgoing-message-pipe.js | 2 +- .../test/parallel/test-parse-args.mjs | 2 +- .../test/parallel/test-path-basename.js | 2 +- .../test/parallel/test-path-dirname.js | 2 +- .../test/parallel/test-path-extname.js | 2 +- .../test/parallel/test-path-isabsolute.js | 2 +- .../test/parallel/test-path-join.js | 2 +- .../test/parallel/test-path-makelong.js | 2 +- .../test/parallel/test-path-normalize.js | 2 +- .../test/parallel/test-path-parse-format.js | 2 +- .../test/parallel/test-path-posix-exists.js | 2 +- .../test/parallel/test-path-relative.js | 2 +- .../test/parallel/test-path-win32-exists.js | 2 +- .../parallel/test-path-zero-length-strings.js | 2 +- tests/node_compat/test/parallel/test-path.js | 2 +- .../test/parallel/test-process-beforeexit.js | 2 +- ...ocess-binding-internalbinding-allowlist.js | 2 +- .../test-process-env-allowed-flags.js | 2 +- .../test-process-exit-from-before-exit.js | 2 +- .../parallel/test-process-exit-handler.js | 2 +- .../parallel/test-process-exit-recursive.js | 2 +- .../test/parallel/test-process-exit.js | 2 +- .../test/parallel/test-process-kill-pid.js | 2 +- .../test/parallel/test-process-uptime.js | 2 +- .../parallel/test-promise-unhandled-silent.js | 2 +- .../test-promise-unhandled-throw-handler.js | 2 +- .../test/parallel/test-punycode.js | 2 +- .../test/parallel/test-querystring-escape.js | 2 +- .../test-querystring-maxKeys-non-finite.js | 2 +- .../test-querystring-multichar-separator.js | 2 +- .../test-readline-emit-keypress-events.js | 2 +- ...st-readline-interface-escapecodetimeout.js | 2 +- .../test/parallel/test-readline-keys.js | 2 +- .../test/parallel/test-readline-position.js | 2 +- .../test/parallel/test-readline-reopen.js | 2 +- .../parallel/test-readline-set-raw-mode.js | 2 +- .../test-readline-undefined-columns.js | 2 +- .../test/parallel/test-readline.js | 2 +- .../parallel/test-stream-add-abort-signal.js | 2 +- .../parallel/test-stream-aliases-legacy.js | 2 +- .../test/parallel/test-stream-auto-destroy.js | 2 +- ...riters-in-synchronously-recursion-write.js | 2 +- .../test/parallel/test-stream-backpressure.js | 2 +- .../test/parallel/test-stream-big-packet.js | 2 +- .../test/parallel/test-stream-big-push.js | 2 +- .../test/parallel/test-stream-construct.js | 2 +- .../test-stream-destroy-event-order.js | 2 +- .../parallel/test-stream-duplex-destroy.js | 2 +- .../test/parallel/test-stream-duplex-end.js | 2 +- .../test/parallel/test-stream-duplex-props.js | 2 +- .../test-stream-duplex-readable-end.js | 2 +- .../test-stream-duplex-writable-finished.js | 2 +- .../test/parallel/test-stream-duplex.js | 2 +- .../test/parallel/test-stream-end-paused.js | 2 +- .../test/parallel/test-stream-error-once.js | 2 +- .../parallel/test-stream-events-prepend.js | 2 +- .../test/parallel/test-stream-inheritance.js | 2 +- .../test/parallel/test-stream-ispaused.js | 2 +- .../test-stream-objectmode-undefined.js | 2 +- .../test-stream-once-readable-pipe.js | 2 +- .../parallel/test-stream-pipe-after-end.js | 2 +- ...t-stream-pipe-await-drain-manual-resume.js | 2 +- ...tream-pipe-await-drain-push-while-write.js | 2 +- .../parallel/test-stream-pipe-await-drain.js | 2 +- .../test-stream-pipe-cleanup-pause.js | 2 +- .../test/parallel/test-stream-pipe-cleanup.js | 2 +- .../test-stream-pipe-error-handling.js | 2 +- .../test/parallel/test-stream-pipe-event.js | 2 +- .../test-stream-pipe-flow-after-unpipe.js | 2 +- .../test/parallel/test-stream-pipe-flow.js | 2 +- .../test-stream-pipe-manual-resume.js | 2 +- .../test-stream-pipe-multiple-pipes.js | 2 +- .../parallel/test-stream-pipe-needDrain.js | 2 +- ...test-stream-pipe-same-destination-twice.js | 2 +- .../test-stream-pipe-unpipe-streams.js | 2 +- .../test-stream-pipe-without-listenerCount.js | 2 +- .../test-stream-pipeline-async-iterator.js | 2 +- ...t-stream-pipeline-queued-end-in-destroy.js | 2 +- .../test-stream-pipeline-with-empty-string.js | 2 +- .../test/parallel/test-stream-push-strings.js | 2 +- .../parallel/test-stream-readable-aborted.js | 2 +- ...t-stream-readable-add-chunk-during-data.js | 2 +- ...stream-readable-constructor-set-methods.js | 2 +- .../parallel/test-stream-readable-data.js | 2 +- .../parallel/test-stream-readable-destroy.js | 2 +- .../parallel/test-stream-readable-didRead.js | 2 +- ...eam-readable-emit-readable-short-stream.js | 2 +- .../test-stream-readable-emittedReadable.js | 2 +- .../test-stream-readable-end-destroyed.js | 2 +- .../parallel/test-stream-readable-ended.js | 2 +- .../test-stream-readable-error-end.js | 2 +- .../parallel/test-stream-readable-event.js | 2 +- .../test-stream-readable-flow-recursion.js | 2 +- .../test-stream-readable-hwm-0-async.js | 2 +- ...test-stream-readable-hwm-0-no-flow-data.js | 2 +- .../parallel/test-stream-readable-hwm-0.js | 2 +- .../test-stream-readable-infinite-read.js | 2 +- .../test-stream-readable-invalid-chunk.js | 2 +- .../test-stream-readable-needReadable.js | 2 +- .../test-stream-readable-next-no-null.js | 2 +- ...st-stream-readable-no-unneeded-readable.js | 2 +- ...stream-readable-object-multi-push-async.js | 2 +- .../test-stream-readable-pause-and-resume.js | 2 +- ...st-stream-readable-readable-then-resume.js | 2 +- .../parallel/test-stream-readable-readable.js | 2 +- ...est-stream-readable-reading-readingMore.js | 2 +- .../test-stream-readable-resume-hwm.js | 2 +- .../test-stream-readable-resumeScheduled.js | 2 +- ...m-readable-setEncoding-existing-buffers.js | 2 +- .../test-stream-readable-setEncoding-null.js | 2 +- .../parallel/test-stream-readable-unshift.js | 2 +- ...tream-readable-with-unimplemented-_read.js | 2 +- .../test-stream-readableListening-state.js | 2 +- .../test-stream-transform-callback-twice.js | 2 +- ...tream-transform-constructor-set-methods.js | 2 +- .../parallel/test-stream-transform-destroy.js | 2 +- .../test-stream-transform-final-sync.js | 2 +- .../parallel/test-stream-transform-final.js | 2 +- .../test-stream-transform-flush-data.js | 2 +- ...tream-transform-objectmode-falsey-value.js | 2 +- ...st-stream-transform-split-highwatermark.js | 2 +- .../test-stream-transform-split-objectmode.js | 2 +- .../test/parallel/test-stream-uint8array.js | 2 +- .../test/parallel/test-stream-unpipe-event.js | 2 +- .../test-stream-unshift-empty-chunk.js | 2 +- .../parallel/test-stream-unshift-read-race.js | 2 +- .../parallel/test-stream-writable-aborted.js | 2 +- ...stream-writable-change-default-encoding.js | 2 +- .../test-stream-writable-clear-buffer.js | 2 +- ...stream-writable-constructor-set-methods.js | 2 +- .../test-stream-writable-decoded-encoding.js | 2 +- .../parallel/test-stream-writable-destroy.js | 2 +- .../test-stream-writable-end-cb-error.js | 2 +- .../test-stream-writable-end-multiple.js | 2 +- .../test-stream-writable-ended-state.js | 2 +- .../test-stream-writable-final-async.js | 2 +- .../test-stream-writable-final-destroy.js | 2 +- .../test-stream-writable-final-throw.js | 2 +- .../test-stream-writable-finish-destroyed.js | 2 +- .../test-stream-writable-finished-state.js | 2 +- .../parallel/test-stream-writable-finished.js | 2 +- .../test-stream-writable-invalid-chunk.js | 2 +- .../test-stream-writable-needdrain-state.js | 2 +- .../parallel/test-stream-writable-null.js | 2 +- .../test-stream-writable-properties.js | 2 +- .../parallel/test-stream-writable-writable.js | 2 +- .../test-stream-writable-write-cb-error.js | 2 +- .../test-stream-writable-write-cb-twice.js | 2 +- .../test-stream-writable-write-error.js | 2 +- ...est-stream-writable-write-writev-finish.js | 2 +- .../test-stream-writableState-ending.js | 2 +- ...ableState-uncorked-bufferedRequestCount.js | 2 +- .../parallel/test-stream-write-destroy.js | 2 +- .../test/parallel/test-stream-write-drain.js | 2 +- .../test/parallel/test-stream-write-final.js | 2 +- .../test/parallel/test-stream-writev.js | 2 +- ...est-stream2-base64-single-char-read-end.js | 2 +- .../test/parallel/test-stream2-basic.js | 2 +- .../parallel/test-stream2-compatibility.js | 2 +- .../parallel/test-stream2-decode-partial.js | 2 +- .../test/parallel/test-stream2-finish-pipe.js | 2 +- .../parallel/test-stream2-large-read-stall.js | 2 +- .../test/parallel/test-stream2-objects.js | 2 +- .../test-stream2-pipe-error-handling.js | 2 +- .../test-stream2-pipe-error-once-listener.js | 2 +- .../test/parallel/test-stream2-push.js | 2 +- .../parallel/test-stream2-read-sync-stack.js | 2 +- ...st-stream2-readable-empty-buffer-no-eof.js | 2 +- .../test-stream2-readable-legacy-drain.js | 2 +- .../test-stream2-readable-non-empty-end.js | 2 +- .../test-stream2-readable-wrap-destroy.js | 2 +- .../test-stream2-readable-wrap-empty.js | 2 +- .../test-stream2-readable-wrap-error.js | 2 +- .../parallel/test-stream2-readable-wrap.js | 2 +- .../parallel/test-stream2-set-encoding.js | 2 +- .../test/parallel/test-stream2-transform.js | 2 +- .../parallel/test-stream2-unpipe-drain.js | 2 +- .../test/parallel/test-stream2-unpipe-leak.js | 2 +- .../test/parallel/test-stream2-writable.js | 2 +- .../test/parallel/test-stream3-cork-end.js | 2 +- .../test/parallel/test-stream3-cork-uncork.js | 2 +- .../parallel/test-stream3-pause-then-read.js | 2 +- .../parallel/test-streams-highwatermark.js | 2 +- .../test/parallel/test-string-decoder.js | 2 +- .../test/parallel/test-timers-api-refs.js | 2 +- .../test/parallel/test-timers-args.js | 2 +- ...-timers-clear-null-does-not-throw-error.js | 2 +- ...imers-clear-object-does-not-throw-error.js | 2 +- ...imers-clear-timeout-interval-equivalent.js | 2 +- .../parallel/test-timers-clearImmediate.js | 2 +- .../parallel/test-timers-interval-throw.js | 2 +- .../parallel/test-timers-non-integer-delay.js | 2 +- .../test/parallel/test-timers-refresh.js | 2 +- ...-timers-same-timeout-wrong-list-deleted.js | 2 +- .../test-timers-timeout-with-non-integer.js | 2 +- .../test-timers-uncaught-exception.js | 2 +- .../test-timers-unref-throw-then-ref.js | 2 +- .../test/parallel/test-timers-user-call.js | 2 +- .../test/parallel/test-timers-zero-timeout.js | 2 +- .../test/parallel/test-tty-stdin-end.js | 2 +- .../parallel/test-url-domain-ascii-unicode.js | 2 +- .../test/parallel/test-url-fileurltopath.js | 2 +- .../parallel/test-url-format-invalid-input.js | 2 +- .../test/parallel/test-url-format-whatwg.js | 2 +- .../test/parallel/test-url-format.js | 2 +- .../test/parallel/test-url-parse-query.js | 2 +- .../test/parallel/test-url-pathtofileurl.js | 2 +- .../test/parallel/test-url-relative.js | 2 +- .../test-util-deprecate-invalid-code.js | 2 +- .../test/parallel/test-util-deprecate.js | 2 +- .../test/parallel/test-util-inherits.js | 2 +- .../test-util-inspect-long-running.js | 2 +- .../test/parallel/test-util-types-exists.js | 2 +- .../parallel/test-vm-access-process-env.js | 2 +- ...t-vm-attributes-property-not-on-sandbox.js | 2 +- .../test/parallel/test-vm-codegen.js | 2 +- .../parallel/test-vm-context-async-script.js | 2 +- .../test-vm-context-property-forwarding.js | 2 +- .../test-vm-create-and-run-in-context.js | 2 +- .../test-vm-create-context-accessors.js | 2 +- .../parallel/test-vm-create-context-arg.js | 2 +- ...st-vm-create-context-circular-reference.js | 2 +- .../test/parallel/test-vm-createcacheddata.js | 2 +- .../test/parallel/test-vm-cross-context.js | 2 +- .../test-vm-data-property-writable.js | 2 +- .../parallel/test-vm-deleting-property.js | 2 +- .../parallel/test-vm-function-declaration.js | 2 +- .../parallel/test-vm-function-redefinition.js | 2 +- .../test/parallel/test-vm-getters.js | 2 +- .../parallel/test-vm-global-assignment.js | 2 +- .../test-vm-global-define-property.js | 2 +- .../test/parallel/test-vm-global-identity.js | 2 +- .../test/parallel/test-vm-global-setter.js | 2 +- .../test/parallel/test-vm-harmony-symbols.js | 2 +- .../parallel/test-vm-indexed-properties.js | 2 +- .../parallel/test-vm-inherited_properties.js | 2 +- .../test/parallel/test-vm-is-context.js | 2 +- .../test/parallel/test-vm-low-stack-space.js | 2 +- .../test-vm-new-script-new-context.js | 2 +- .../test-vm-new-script-this-context.js | 2 +- .../test/parallel/test-vm-not-strict.js | 2 +- .../parallel/test-vm-options-validation.js | 2 +- ...st-vm-parse-abort-on-uncaught-exception.js | 2 +- .../parallel/test-vm-preserves-property.js | 2 +- .../test-vm-property-not-on-sandbox.js | 2 +- .../test/parallel/test-vm-proxies.js | 2 +- .../test/parallel/test-vm-proxy-failure-CP.js | 2 +- .../test-vm-script-throw-in-tostring.js | 2 +- .../parallel/test-vm-set-property-proxy.js | 2 +- .../test-vm-set-proto-null-on-globalthis.js | 2 +- .../test/parallel/test-vm-source-map-url.js | 2 +- .../test/parallel/test-vm-static-this.js | 2 +- .../test/parallel/test-vm-strict-mode.js | 2 +- .../test/parallel/test-vm-symbols.js | 2 +- .../test-vm-timeout-escape-promise-2.js | 2 +- .../test-vm-timeout-escape-promise.js | 2 +- .../test/parallel/test-vm-timeout.js | 2 +- .../test-whatwg-encoding-custom-api-basics.js | 2 +- ...g-encoding-custom-textdecoder-ignorebom.js | 2 +- ...g-encoding-custom-textdecoder-streaming.js | 2 +- ...ents-add-event-listener-options-passive.js | 2 +- ...vents-add-event-listener-options-signal.js | 2 +- .../test-whatwg-events-customevent.js | 2 +- .../test-whatwg-url-custom-deepequal.js | 2 +- .../parallel/test-whatwg-url-custom-global.js | 2 +- ...test-whatwg-url-custom-href-side-effect.js | 2 +- .../test-whatwg-url-custom-tostringtag.js | 2 +- .../test-whatwg-url-override-hostname.js | 2 +- ...rker-message-port-infinite-message-loop.js | 2 +- ...essage-port-multiple-sharedarraybuffers.js | 2 +- .../parallel/test-zlib-close-after-error.js | 2 +- .../parallel/test-zlib-close-after-write.js | 2 +- .../test-zlib-deflate-raw-inherits.js | 2 +- .../test/parallel/test-zlib-destroy-pipe.js | 2 +- .../test/parallel/test-zlib-from-string.js | 2 +- .../test/parallel/test-zlib-no-stream.js | 2 +- .../test/parallel/test-zlib-sync-no-event.js | 2 +- .../test/parallel/test-zlib-truncated.js | 2 +- .../test-zlib-unzip-one-byte-chunks.js | 2 +- .../parallel/test-zlib-write-after-end.js | 2 +- .../test/pseudo-tty/console-dumb-tty.js | 2 +- .../test/pseudo-tty/console_colors.js | 2 +- .../test/pseudo-tty/no_dropped_stdio.js | 2 +- .../test/pseudo-tty/no_interleaved_stdio.js | 2 +- .../test-tty-color-support-warning-2.js | 2 +- .../test-tty-color-support-warning.js | 2 +- .../test/pseudo-tty/test-tty-stdin-end.js | 2 +- .../test/pseudo-tty/test-tty-stdout-end.js | 2 +- 545 files changed, 3634 insertions(+), 3635 deletions(-) diff --git a/tests/node_compat/common.ts b/tests/node_compat/common.ts index 9f56744fa7462b..75a06566a6b043 100644 --- a/tests/node_compat/common.ts +++ b/tests/node_compat/common.ts @@ -12,7 +12,6 @@ import * as JSONC from "@std/jsonc"; type TestSuites = Record; interface Config { - nodeVersion: string; /** Ignored files won't regenerated by the update script */ ignore: TestSuites; /** diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index 31b184505054b1..d163765daaf580 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -1,5 +1,4 @@ { - "nodeVersion": "18.12.1", "ignore": { "common": ["index.js", "internet.js"], "fixtures": [ diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index cb7e6034b96b54..135d45dd8fcd10 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -3,3094 +3,3094 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/config.json` and run `deno task setup` in `tests/node_compat/runner` dir instead. -- [abort/test-abort-backtrace.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-backtrace.js) -- [abort/test-abort-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-fatal-error.js) -- [abort/test-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-uncaught-exception.js) -- [abort/test-addon-register-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-addon-register-signal-handler.js) -- [abort/test-addon-uv-handle-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-addon-uv-handle-leak.js) -- [abort/test-http-parser-consume.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-http-parser-consume.js) -- [abort/test-process-abort-exitcode.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-process-abort-exitcode.js) -- [abort/test-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-signal-handler.js) -- [abort/test-worker-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-worker-abort-uncaught-exception.js) -- [abort/test-zlib-invalid-internals-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-zlib-invalid-internals-usage.js) -- [benchmark/test-bechmark-readline.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-bechmark-readline.js) -- [benchmark/test-benchmark-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-assert.js) -- [benchmark/test-benchmark-async-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-async-hooks.js) -- [benchmark/test-benchmark-blob.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-blob.js) -- [benchmark/test-benchmark-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-buffer.js) -- [benchmark/test-benchmark-child-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-child-process.js) -- [benchmark/test-benchmark-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-cluster.js) -- [benchmark/test-benchmark-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-crypto.js) -- [benchmark/test-benchmark-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-dgram.js) -- [benchmark/test-benchmark-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-dns.js) -- [benchmark/test-benchmark-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-domain.js) -- [benchmark/test-benchmark-es.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-es.js) -- [benchmark/test-benchmark-esm.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-esm.js) -- [benchmark/test-benchmark-events.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-events.js) -- [benchmark/test-benchmark-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-fs.js) -- [benchmark/test-benchmark-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-http.js) -- [benchmark/test-benchmark-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-http2.js) -- [benchmark/test-benchmark-mime.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-mime.js) -- [benchmark/test-benchmark-misc.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-misc.js) -- [benchmark/test-benchmark-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-module.js) -- [benchmark/test-benchmark-napi.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-napi.js) -- [benchmark/test-benchmark-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-net.js) -- [benchmark/test-benchmark-os.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-os.js) -- [benchmark/test-benchmark-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-path.js) -- [benchmark/test-benchmark-policy.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-policy.js) -- [benchmark/test-benchmark-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-process.js) -- [benchmark/test-benchmark-querystring.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-querystring.js) -- [benchmark/test-benchmark-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-streams.js) -- [benchmark/test-benchmark-string_decoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-string_decoder.js) -- [benchmark/test-benchmark-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-timers.js) -- [benchmark/test-benchmark-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-tls.js) -- [benchmark/test-benchmark-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-url.js) -- [benchmark/test-benchmark-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-util.js) -- [benchmark/test-benchmark-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-v8.js) -- [benchmark/test-benchmark-validators.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-validators.js) -- [benchmark/test-benchmark-vm.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-vm.js) -- [benchmark/test-benchmark-webstreams.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-webstreams.js) -- [benchmark/test-benchmark-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-worker.js) -- [benchmark/test-benchmark-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-zlib.js) -- [es-module/test-cjs-esm-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-esm-warn.js) -- [es-module/test-cjs-legacyMainResolve-permission.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-legacyMainResolve-permission.js) -- [es-module/test-cjs-legacyMainResolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-legacyMainResolve.js) -- [es-module/test-cjs-prototype-pollution.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-prototype-pollution.js) -- [es-module/test-dynamic-import-script-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-dynamic-import-script-lifetime.js) -- [es-module/test-esm-assertionless-json-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-assertionless-json-import.js) -- [es-module/test-esm-cjs-builtins.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-builtins.js) -- [es-module/test-esm-cjs-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-exports.js) -- [es-module/test-esm-cjs-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-main.js) -- [es-module/test-esm-data-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-data-urls.js) -- [es-module/test-esm-dynamic-import-attribute.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-attribute.js) -- [es-module/test-esm-dynamic-import-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-commonjs.js) -- [es-module/test-esm-dynamic-import-mutating-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-mutating-fs.js) -- [es-module/test-esm-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import.js) -- [es-module/test-esm-encoded-path-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-encoded-path-native.js) -- [es-module/test-esm-error-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-error-cache.js) -- [es-module/test-esm-import-attributes-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-attributes-errors.js) -- [es-module/test-esm-import-attributes-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-attributes-validation.js) -- [es-module/test-esm-invalid-data-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-invalid-data-urls.js) -- [es-module/test-esm-invalid-pjson.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-invalid-pjson.js) -- [es-module/test-esm-loader-cache-clearing.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-cache-clearing.js) -- [es-module/test-esm-loader-modulemap.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-modulemap.js) -- [es-module/test-esm-loader-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-search.js) -- [es-module/test-esm-named-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-named-exports.js) -- [es-module/test-esm-preserve-symlinks-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-preserve-symlinks-main.js) -- [es-module/test-esm-preserve-symlinks.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-preserve-symlinks.js) -- [es-module/test-esm-repl-imports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-repl-imports.js) -- [es-module/test-esm-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-repl.js) -- [es-module/test-esm-symlink-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink-main.js) -- [es-module/test-esm-symlink-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink-type.js) -- [es-module/test-esm-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink.js) -- [es-module/test-esm-type-field-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-type-field-errors.js) -- [es-module/test-esm-undefined-cjs-global-like-variables.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-undefined-cjs-global-like-variables.js) -- [es-module/test-esm-unknown-extension.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-unknown-extension.js) -- [es-module/test-esm-url-extname.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-url-extname.js) -- [es-module/test-esm-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-windows.js) -- [es-module/test-loaders-hidden-from-users.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-loaders-hidden-from-users.js) -- [es-module/test-vm-compile-function-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-compile-function-leak.js) -- [es-module/test-vm-compile-function-lineoffset.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-compile-function-lineoffset.js) -- [es-module/test-vm-contextified-script-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-contextified-script-leak.js) -- [es-module/test-vm-source-text-module-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-source-text-module-leak.js) -- [es-module/test-vm-synthetic-module-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-synthetic-module-leak.js) -- [es-module/test-wasm-memory-out-of-bound.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-memory-out-of-bound.js) -- [es-module/test-wasm-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-simple.js) -- [es-module/test-wasm-web-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-web-api.js) -- [internet/test-corepack-yarn-install.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-corepack-yarn-install.js) -- [internet/test-dgram-broadcast-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-broadcast-multi-process.js) -- [internet/test-dgram-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-connect.js) -- [internet/test-dgram-membership.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-membership.js) -- [internet/test-dgram-multicast-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-multi-process.js) -- [internet/test-dgram-multicast-set-interface-lo.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-set-interface-lo.js) -- [internet/test-dgram-multicast-ssm-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-ssm-multi-process.js) -- [internet/test-dgram-multicast-ssmv6-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-ssmv6-multi-process.js) -- [internet/test-dns-any.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-any.js) -- [internet/test-dns-cares-domains.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-cares-domains.js) -- [internet/test-dns-getDefaultResultOrder.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-getDefaultResultOrder.js) -- [internet/test-dns-ipv4.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-ipv4.js) -- [internet/test-dns-ipv6.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-ipv6.js) -- [internet/test-dns-txt-sigsegv.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-txt-sigsegv.js) -- [internet/test-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns.js) -- [internet/test-http-dns-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-http-dns-fail.js) -- [internet/test-http2-issue-32922.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-http2-issue-32922.js) -- [internet/test-https-autoselectfamily-slow-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-autoselectfamily-slow-timeout.js) -- [internet/test-https-issue-43963.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-issue-43963.js) -- [internet/test-inspector-help-page.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-inspector-help-page.js) -- [internet/test-net-autoselectfamily-timeout-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-autoselectfamily-timeout-close.js) -- [internet/test-net-connect-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-connect-timeout.js) -- [internet/test-net-connect-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-connect-unref.js) -- [internet/test-snapshot-dns-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-snapshot-dns-lookup.js) -- [internet/test-snapshot-dns-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-snapshot-dns-resolve.js) -- [internet/test-tls-add-ca-cert.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-add-ca-cert.js) -- [internet/test-tls-autoselectfamily-backing-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-autoselectfamily-backing-socket.js) -- [internet/test-tls-autoselectfamily-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-autoselectfamily-servername.js) -- [internet/test-trace-events-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-trace-events-dns.js) -- [internet/test-uv-threadpool-schedule.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-uv-threadpool-schedule.js) -- [known_issues/test-cli-print-var-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-cli-print-var-crypto.js) -- [known_issues/test-cwd-enoent-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-cwd-enoent-file.js) -- [known_issues/test-dgram-bind-shared-ports-after-port-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js) -- [known_issues/test-fs-writeFileSync-invalid-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-fs-writeFileSync-invalid-windows.js) -- [known_issues/test-http-path-contains-unicode.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-http-path-contains-unicode.js) -- [known_issues/test-inspector-cluster-port-clash.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-inspector-cluster-port-clash.js) -- [known_issues/test-permission-model-path-resolution.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-permission-model-path-resolution.js) -- [known_issues/test-repl-require-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-repl-require-context.js) -- [known_issues/test-stdin-is-always-net.socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-stdin-is-always-net.socket.js) -- [known_issues/test-stream-writable-sync-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-stream-writable-sync-error.js) -- [known_issues/test-url-parse-conformance.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-url-parse-conformance.js) -- [known_issues/test-vm-function-declaration-uses-define.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-function-declaration-uses-define.js) -- [known_issues/test-vm-ownkeys.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-ownkeys.js) -- [known_issues/test-vm-ownpropertynames.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-ownpropertynames.js) -- [known_issues/test-vm-ownpropertysymbols.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-ownpropertysymbols.js) -- [known_issues/test-vm-timeout-escape-nexttick.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-timeout-escape-nexttick.js) -- [known_issues/test-vm-timeout-escape-queuemicrotask.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-timeout-escape-queuemicrotask.js) -- [message/assert_throws_stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/assert_throws_stack.js) -- [message/eval_messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/eval_messages.js) -- [message/internal_assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/internal_assert.js) -- [message/internal_assert_fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/internal_assert_fail.js) -- [message/max_tick_depth.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/max_tick_depth.js) -- [message/nexttick_throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/nexttick_throw.js) -- [message/stdin_messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/stdin_messages.js) -- [message/util-inspect-error-cause.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/util-inspect-error-cause.js) -- [message/util_inspect_error.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/util_inspect_error.js) -- [parallel/test-abortcontroller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-abortcontroller.js) -- [parallel/test-aborted-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-aborted-util.js) -- [parallel/test-abortsignal-cloneable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-abortsignal-cloneable.js) -- [parallel/test-accessor-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-accessor-properties.js) -- [parallel/test-arm-math-illegal-instruction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-arm-math-illegal-instruction.js) -- [parallel/test-assert-builtins-not-read-from-filesystem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-builtins-not-read-from-filesystem.js) -- [parallel/test-assert-calltracker-calls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-calls.js) -- [parallel/test-assert-calltracker-getCalls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-getCalls.js) -- [parallel/test-assert-calltracker-report.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-report.js) -- [parallel/test-assert-calltracker-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-verify.js) -- [parallel/test-assert-checktag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-checktag.js) -- [parallel/test-assert-deep.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-deep.js) -- [parallel/test-assert-esm-cjs-message-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-esm-cjs-message-verify.js) -- [parallel/test-assert-fail-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-fail-deprecation.js) -- [parallel/test-assert-first-line.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-first-line.js) -- [parallel/test-assert-if-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-if-error.js) -- [parallel/test-assert-typedarray-deepequal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-typedarray-deepequal.js) -- [parallel/test-async-hooks-async-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-async-await.js) -- [parallel/test-async-hooks-asyncresource-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-asyncresource-constructor.js) -- [parallel/test-async-hooks-close-during-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-close-during-destroy.js) -- [parallel/test-async-hooks-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-constructor.js) -- [parallel/test-async-hooks-correctly-switch-promise-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-correctly-switch-promise-hook.js) -- [parallel/test-async-hooks-destroy-on-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-destroy-on-gc.js) -- [parallel/test-async-hooks-disable-during-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-disable-during-promise.js) -- [parallel/test-async-hooks-disable-gc-tracking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-disable-gc-tracking.js) -- [parallel/test-async-hooks-enable-before-promise-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-before-promise-resolve.js) -- [parallel/test-async-hooks-enable-disable-enable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-disable-enable.js) -- [parallel/test-async-hooks-enable-disable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-disable.js) -- [parallel/test-async-hooks-enable-during-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-during-promise.js) -- [parallel/test-async-hooks-enable-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-recursive.js) -- [parallel/test-async-hooks-execution-async-resource-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-execution-async-resource-await.js) -- [parallel/test-async-hooks-execution-async-resource.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-execution-async-resource.js) -- [parallel/test-async-hooks-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-fatal-error.js) -- [parallel/test-async-hooks-http-agent-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-http-agent-destroy.js) -- [parallel/test-async-hooks-http-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-http-agent.js) -- [parallel/test-async-hooks-http-parser-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-http-parser-destroy.js) -- [parallel/test-async-hooks-prevent-double-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-prevent-double-destroy.js) -- [parallel/test-async-hooks-promise-enable-disable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-promise-enable-disable.js) -- [parallel/test-async-hooks-promise-triggerid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-promise-triggerid.js) -- [parallel/test-async-hooks-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-promise.js) -- [parallel/test-async-hooks-recursive-stack-runInAsyncScope.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-recursive-stack-runInAsyncScope.js) -- [parallel/test-async-hooks-run-in-async-scope-caught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js) -- [parallel/test-async-hooks-run-in-async-scope-this-arg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js) -- [parallel/test-async-hooks-top-level-clearimmediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-top-level-clearimmediate.js) -- [parallel/test-async-hooks-vm-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-vm-gc.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-1.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-2.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-3.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-4.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-4.js) -- [parallel/test-async-local-storage-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-bind.js) -- [parallel/test-async-local-storage-contexts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-contexts.js) -- [parallel/test-async-local-storage-deep-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-deep-stack.js) -- [parallel/test-async-local-storage-exit-does-not-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-exit-does-not-leak.js) -- [parallel/test-async-local-storage-http-multiclients.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-http-multiclients.js) -- [parallel/test-async-local-storage-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-snapshot.js) -- [parallel/test-async-wrap-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-constructor.js) -- [parallel/test-async-wrap-destroyid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-destroyid.js) -- [parallel/test-async-wrap-pop-id-during-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-pop-id-during-load.js) -- [parallel/test-async-wrap-promise-after-enabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-promise-after-enabled.js) -- [parallel/test-async-wrap-tlssocket-asyncreset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-tlssocket-asyncreset.js) -- [parallel/test-async-wrap-trigger-id.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-trigger-id.js) -- [parallel/test-async-wrap-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-uncaughtexception.js) -- [parallel/test-asyncresource-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-asyncresource-bind.js) -- [parallel/test-atomics-wake.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-atomics-wake.js) -- [parallel/test-bash-completion.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-bash-completion.js) -- [parallel/test-beforeexit-event-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-beforeexit-event-exit.js) -- [parallel/test-benchmark-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-benchmark-cli.js) -- [parallel/test-binding-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-binding-constants.js) -- [parallel/test-blob-buffer-too-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-buffer-too-large.js) -- [parallel/test-blob-createobjecturl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-createobjecturl.js) -- [parallel/test-blob-file-backed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-file-backed.js) -- [parallel/test-blob.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob.js) -- [parallel/test-blocklist-clone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blocklist-clone.js) -- [parallel/test-bootstrap-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-bootstrap-modules.js) -- [parallel/test-broadcastchannel-custom-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-broadcastchannel-custom-inspect.js) -- [parallel/test-buffer-backing-arraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-backing-arraybuffer.js) -- [parallel/test-buffer-compare.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-compare.js) -- [parallel/test-buffer-constructor-deprecation-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-constructor-deprecation-error.js) -- [parallel/test-buffer-constructor-node-modules-paths.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-constructor-node-modules-paths.js) -- [parallel/test-buffer-constructor-outside-node-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-constructor-outside-node-modules.js) -- [parallel/test-buffer-fill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-fill.js) -- [parallel/test-buffer-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-inspect.js) -- [parallel/test-buffer-pending-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-pending-deprecation.js) -- [parallel/test-buffer-pool-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-pool-untransferable.js) -- [parallel/test-buffer-prototype-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-prototype-inspect.js) -- [parallel/test-buffer-set-inspect-max-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-set-inspect-max-bytes.js) -- [parallel/test-buffer-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-sharedarraybuffer.js) -- [parallel/test-buffer-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-write.js) -- [parallel/test-c-ares.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-c-ares.js) -- [parallel/test-child-process-advanced-serialization-largebuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-advanced-serialization-largebuffer.js) -- [parallel/test-child-process-advanced-serialization.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-advanced-serialization.js) -- [parallel/test-child-process-bad-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-bad-stdio.js) -- [parallel/test-child-process-can-write-to-stdout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-can-write-to-stdout.js) -- [parallel/test-child-process-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-constructor.js) -- [parallel/test-child-process-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-cwd.js) -- [parallel/test-child-process-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-destroy.js) -- [parallel/test-child-process-detached.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-detached.js) -- [parallel/test-child-process-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-disconnect.js) -- [parallel/test-child-process-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-env.js) -- [parallel/test-child-process-exec-any-shells-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-any-shells-windows.js) -- [parallel/test-child-process-exec-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-encoding.js) -- [parallel/test-child-process-exec-std-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-std-encoding.js) -- [parallel/test-child-process-exec-timeout-expire.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-timeout-expire.js) -- [parallel/test-child-process-exec-timeout-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-timeout-kill.js) -- [parallel/test-child-process-exec-timeout-not-expired.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-timeout-not-expired.js) -- [parallel/test-child-process-execFile-promisified-abortController.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-execFile-promisified-abortController.js) -- [parallel/test-child-process-execfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-execfile.js) -- [parallel/test-child-process-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exit-code.js) -- [parallel/test-child-process-fork-abort-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-abort-signal.js) -- [parallel/test-child-process-fork-and-spawn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-and-spawn.js) -- [parallel/test-child-process-fork-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-args.js) -- [parallel/test-child-process-fork-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-close.js) -- [parallel/test-child-process-fork-closed-channel-segfault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-closed-channel-segfault.js) -- [parallel/test-child-process-fork-detached.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-detached.js) -- [parallel/test-child-process-fork-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-dgram.js) -- [parallel/test-child-process-fork-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-exec-argv.js) -- [parallel/test-child-process-fork-exec-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-exec-path.js) -- [parallel/test-child-process-fork-getconnections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-getconnections.js) -- [parallel/test-child-process-fork-net-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-net-server.js) -- [parallel/test-child-process-fork-net-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-net-socket.js) -- [parallel/test-child-process-fork-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-net.js) -- [parallel/test-child-process-fork-no-shell.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-no-shell.js) -- [parallel/test-child-process-fork-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-ref.js) -- [parallel/test-child-process-fork-ref2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-ref2.js) -- [parallel/test-child-process-fork-stdio-string-variant.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-stdio-string-variant.js) -- [parallel/test-child-process-fork-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-stdio.js) -- [parallel/test-child-process-fork-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-timeout-kill-signal.js) -- [parallel/test-child-process-fork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork.js) -- [parallel/test-child-process-fork3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork3.js) -- [parallel/test-child-process-http-socket-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-http-socket-leak.js) -- [parallel/test-child-process-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-internal.js) -- [parallel/test-child-process-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-ipc.js) -- [parallel/test-child-process-no-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-no-deprecation.js) -- [parallel/test-child-process-pipe-dataflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-pipe-dataflow.js) -- [parallel/test-child-process-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-promisified.js) -- [parallel/test-child-process-recv-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-recv-handle.js) -- [parallel/test-child-process-reject-null-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-reject-null-bytes.js) -- [parallel/test-child-process-send-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-after-close.js) -- [parallel/test-child-process-send-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-cb.js) -- [parallel/test-child-process-send-keep-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-keep-open.js) -- [parallel/test-child-process-send-returns-boolean.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-returns-boolean.js) -- [parallel/test-child-process-send-type-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-type-error.js) -- [parallel/test-child-process-send-utf8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-utf8.js) -- [parallel/test-child-process-server-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-server-close.js) -- [parallel/test-child-process-silent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-silent.js) -- [parallel/test-child-process-spawn-argv0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-argv0.js) -- [parallel/test-child-process-spawn-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-controller.js) -- [parallel/test-child-process-spawn-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-error.js) -- [parallel/test-child-process-spawn-shell.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-shell.js) -- [parallel/test-child-process-spawn-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-timeout-kill-signal.js) -- [parallel/test-child-process-spawn-typeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-typeerror.js) -- [parallel/test-child-process-spawnsync-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-env.js) -- [parallel/test-child-process-spawnsync-input.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-input.js) -- [parallel/test-child-process-spawnsync-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-kill-signal.js) -- [parallel/test-child-process-spawnsync-shell.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-shell.js) -- [parallel/test-child-process-spawnsync-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-timeout.js) -- [parallel/test-child-process-stdin-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdin-ipc.js) -- [parallel/test-child-process-stdin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdin.js) -- [parallel/test-child-process-stdio-big-write-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-big-write-end.js) -- [parallel/test-child-process-stdio-inherit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-inherit.js) -- [parallel/test-child-process-stdio-merge-stdouts-into-cat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-merge-stdouts-into-cat.js) -- [parallel/test-child-process-stdio-overlapped.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-overlapped.js) -- [parallel/test-child-process-stdio-reuse-readable-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-reuse-readable-stdio.js) -- [parallel/test-child-process-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio.js) -- [parallel/test-child-process-stdout-flush-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdout-flush-exit.js) -- [parallel/test-child-process-stdout-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdout-flush.js) -- [parallel/test-child-process-stdout-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdout-ipc.js) -- [parallel/test-child-process-uid-gid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-uid-gid.js) -- [parallel/test-child-process-validate-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-validate-stdio.js) -- [parallel/test-child-process-windows-hide.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-windows-hide.js) -- [parallel/test-cli-bad-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-bad-options.js) -- [parallel/test-cli-eval-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-eval-event.js) -- [parallel/test-cli-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-eval.js) -- [parallel/test-cli-node-options-disallowed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-options-disallowed.js) -- [parallel/test-cli-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-options.js) -- [parallel/test-cli-node-print-help.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-print-help.js) -- [parallel/test-cli-options-negation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-options-negation.js) -- [parallel/test-cli-options-precedence.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-options-precedence.js) -- [parallel/test-cli-permission-deny-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-permission-deny-fs.js) -- [parallel/test-cli-permission-multiple-allow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-permission-multiple-allow.js) -- [parallel/test-cli-syntax-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-eval.js) -- [parallel/test-cli-syntax-piped-bad.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-piped-bad.js) -- [parallel/test-cli-syntax-piped-good.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-piped-good.js) -- [parallel/test-client-request-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-client-request-destroy.js) -- [parallel/test-cluster-accept-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-accept-fail.js) -- [parallel/test-cluster-advanced-serialization.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-advanced-serialization.js) -- [parallel/test-cluster-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-basic.js) -- [parallel/test-cluster-bind-privileged-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-bind-privileged-port.js) -- [parallel/test-cluster-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-bind-twice.js) -- [parallel/test-cluster-call-and-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-call-and-destroy.js) -- [parallel/test-cluster-child-index-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-child-index-dgram.js) -- [parallel/test-cluster-child-index-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-child-index-net.js) -- [parallel/test-cluster-concurrent-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-concurrent-disconnect.js) -- [parallel/test-cluster-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-cwd.js) -- [parallel/test-cluster-dgram-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-1.js) -- [parallel/test-cluster-dgram-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-2.js) -- [parallel/test-cluster-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-bind-fd.js) -- [parallel/test-cluster-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-ipv6only.js) -- [parallel/test-cluster-dgram-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-reuse.js) -- [parallel/test-cluster-disconnect-before-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-before-exit.js) -- [parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js) -- [parallel/test-cluster-disconnect-idle-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-idle-worker.js) -- [parallel/test-cluster-disconnect-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-leak.js) -- [parallel/test-cluster-disconnect-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-race.js) -- [parallel/test-cluster-disconnect-unshared-tcp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-unshared-tcp.js) -- [parallel/test-cluster-disconnect-unshared-udp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-unshared-udp.js) -- [parallel/test-cluster-disconnect-with-no-workers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-with-no-workers.js) -- [parallel/test-cluster-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect.js) -- [parallel/test-cluster-eaccess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-eaccess.js) -- [parallel/test-cluster-eaddrinuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-eaddrinuse.js) -- [parallel/test-cluster-fork-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-fork-env.js) -- [parallel/test-cluster-fork-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-fork-stdio.js) -- [parallel/test-cluster-fork-windowsHide.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-fork-windowsHide.js) -- [parallel/test-cluster-http-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-http-pipe.js) -- [parallel/test-cluster-invalid-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-invalid-message.js) -- [parallel/test-cluster-ipc-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-ipc-throw.js) -- [parallel/test-cluster-kill-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-kill-disconnect.js) -- [parallel/test-cluster-kill-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-kill-infinite-loop.js) -- [parallel/test-cluster-listen-pipe-readable-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-listen-pipe-readable-writable.js) -- [parallel/test-cluster-listening-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-listening-port.js) -- [parallel/test-cluster-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-message.js) -- [parallel/test-cluster-net-listen-backlog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen-backlog.js) -- [parallel/test-cluster-net-listen-ipv6only-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen-ipv6only-false.js) -- [parallel/test-cluster-net-listen-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen-relative-path.js) -- [parallel/test-cluster-net-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen.js) -- [parallel/test-cluster-net-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-send.js) -- [parallel/test-cluster-net-server-drop-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-server-drop-connection.js) -- [parallel/test-cluster-primary-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-primary-error.js) -- [parallel/test-cluster-primary-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-primary-kill.js) -- [parallel/test-cluster-process-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-process-disconnect.js) -- [parallel/test-cluster-rr-domain-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-domain-listen.js) -- [parallel/test-cluster-rr-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-handle-close.js) -- [parallel/test-cluster-rr-handle-keep-loop-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-handle-keep-loop-alive.js) -- [parallel/test-cluster-rr-handle-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-handle-ref-unref.js) -- [parallel/test-cluster-rr-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-ref.js) -- [parallel/test-cluster-send-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-deadlock.js) -- [parallel/test-cluster-send-handle-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-handle-twice.js) -- [parallel/test-cluster-send-socket-to-worker-http-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-socket-to-worker-http-server.js) -- [parallel/test-cluster-server-restart-none.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-server-restart-none.js) -- [parallel/test-cluster-server-restart-rr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-server-restart-rr.js) -- [parallel/test-cluster-setup-primary-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-argv.js) -- [parallel/test-cluster-setup-primary-cumulative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-cumulative.js) -- [parallel/test-cluster-setup-primary-emit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-emit.js) -- [parallel/test-cluster-setup-primary-multiple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-multiple.js) -- [parallel/test-cluster-setup-primary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary.js) -- [parallel/test-cluster-shared-handle-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-shared-handle-bind-error.js) -- [parallel/test-cluster-shared-handle-bind-privileged-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-shared-handle-bind-privileged-port.js) -- [parallel/test-cluster-shared-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-shared-leak.js) -- [parallel/test-cluster-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-uncaught-exception.js) -- [parallel/test-cluster-worker-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-constructor.js) -- [parallel/test-cluster-worker-death.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-death.js) -- [parallel/test-cluster-worker-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-destroy.js) -- [parallel/test-cluster-worker-disconnect-on-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-disconnect-on-error.js) -- [parallel/test-cluster-worker-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-disconnect.js) -- [parallel/test-cluster-worker-events.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-events.js) -- [parallel/test-cluster-worker-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-exit.js) -- [parallel/test-cluster-worker-forced-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-forced-exit.js) -- [parallel/test-cluster-worker-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-handle-close.js) -- [parallel/test-cluster-worker-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-init.js) -- [parallel/test-cluster-worker-isconnected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-isconnected.js) -- [parallel/test-cluster-worker-isdead.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-isdead.js) -- [parallel/test-cluster-worker-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-kill-signal.js) -- [parallel/test-cluster-worker-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-kill.js) -- [parallel/test-cluster-worker-no-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-no-exit.js) -- [parallel/test-cluster-worker-wait-server-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-wait-server-close.js) -- [parallel/test-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-code-cache.js) -- [parallel/test-common-countdown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-countdown.js) -- [parallel/test-common-expect-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-expect-warning.js) -- [parallel/test-common-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-gc.js) -- [parallel/test-common-must-not-call.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-must-not-call.js) -- [parallel/test-common.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common.js) -- [parallel/test-console-assign-undefined.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-assign-undefined.js) -- [parallel/test-console-clear.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-clear.js) -- [parallel/test-console-count.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-count.js) -- [parallel/test-console-formatTime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-formatTime.js) -- [parallel/test-console-instance.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-instance.js) -- [parallel/test-console-issue-43095.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-issue-43095.js) -- [parallel/test-console-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-methods.js) -- [parallel/test-console-not-call-toString.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-not-call-toString.js) -- [parallel/test-console-self-assign.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-self-assign.js) -- [parallel/test-console-stdio-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-stdio-setters.js) -- [parallel/test-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console.js) -- [parallel/test-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-constants.js) -- [parallel/test-corepack-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-corepack-version.js) -- [parallel/test-coverage-with-inspector-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-coverage-with-inspector-disabled.js) -- [parallel/test-crypto-aes-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-aes-wrap.js) -- [parallel/test-crypto-async-sign-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-async-sign-verify.js) -- [parallel/test-crypto-authenticated-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-authenticated-stream.js) -- [parallel/test-crypto-authenticated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-authenticated.js) -- [parallel/test-crypto-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-certificate.js) -- [parallel/test-crypto-cipher-decipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-cipher-decipher.js) -- [parallel/test-crypto-cipheriv-decipheriv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-cipheriv-decipheriv.js) -- [parallel/test-crypto-classes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-classes.js) -- [parallel/test-crypto-des3-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-des3-wrap.js) -- [parallel/test-crypto-dh-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-constructor.js) -- [parallel/test-crypto-dh-curves.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-curves.js) -- [parallel/test-crypto-dh-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-errors.js) -- [parallel/test-crypto-dh-generate-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-generate-keys.js) -- [parallel/test-crypto-dh-group-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-group-setters.js) -- [parallel/test-crypto-dh-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-leak.js) -- [parallel/test-crypto-dh-modp2-views.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-modp2-views.js) -- [parallel/test-crypto-dh-modp2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-modp2.js) -- [parallel/test-crypto-dh-odd-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-odd-key.js) -- [parallel/test-crypto-dh-padding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-padding.js) -- [parallel/test-crypto-dh-stateless.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-stateless.js) -- [parallel/test-crypto-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-domain.js) -- [parallel/test-crypto-domains.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-domains.js) -- [parallel/test-crypto-ecb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-ecb.js) -- [parallel/test-crypto-ecdh-convert-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-ecdh-convert-key.js) -- [parallel/test-crypto-encoding-validation-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-encoding-validation-error.js) -- [parallel/test-crypto-fips.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-fips.js) -- [parallel/test-crypto-from-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-from-binary.js) -- [parallel/test-crypto-getcipherinfo.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-getcipherinfo.js) -- [parallel/test-crypto-hash-stream-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-hash-stream-pipe.js) -- [parallel/test-crypto-key-objects-messageport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-key-objects-messageport.js) -- [parallel/test-crypto-key-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-key-objects.js) -- [parallel/test-crypto-keygen-async-dsa-key-object.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-dsa-key-object.js) -- [parallel/test-crypto-keygen-async-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-dsa.js) -- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js) -- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js) -- [parallel/test-crypto-keygen-async-elliptic-curve-jwk.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk.js) -- [parallel/test-crypto-keygen-async-encrypted-private-key-der.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-encrypted-private-key-der.js) -- [parallel/test-crypto-keygen-async-encrypted-private-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-encrypted-private-key.js) -- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js) -- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js) -- [parallel/test-crypto-keygen-async-explicit-elliptic-curve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve.js) -- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js) -- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js) -- [parallel/test-crypto-keygen-async-named-elliptic-curve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve.js) -- [parallel/test-crypto-keygen-async-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-rsa.js) -- [parallel/test-crypto-keygen-bit-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-bit-length.js) -- [parallel/test-crypto-keygen-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-deprecation.js) -- [parallel/test-crypto-keygen-dh-classic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-dh-classic.js) -- [parallel/test-crypto-keygen-duplicate-deprecated-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js) -- [parallel/test-crypto-keygen-eddsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-eddsa.js) -- [parallel/test-crypto-keygen-empty-passphrase-no-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js) -- [parallel/test-crypto-keygen-empty-passphrase-no-prompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-empty-passphrase-no-prompt.js) -- [parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js) -- [parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js) -- [parallel/test-crypto-keygen-key-object-without-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-key-object-without-encoding.js) -- [parallel/test-crypto-keygen-key-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-key-objects.js) -- [parallel/test-crypto-keygen-missing-oid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-missing-oid.js) -- [parallel/test-crypto-keygen-no-rsassa-pss-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-no-rsassa-pss-params.js) -- [parallel/test-crypto-keygen-non-standard-public-exponent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-non-standard-public-exponent.js) -- [parallel/test-crypto-keygen-promisify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-promisify.js) -- [parallel/test-crypto-keygen-rfc8017-9-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rfc8017-9-1.js) -- [parallel/test-crypto-keygen-rfc8017-a-2-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js) -- [parallel/test-crypto-keygen-rsa-pss.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rsa-pss.js) -- [parallel/test-crypto-keygen-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-sync.js) -- [parallel/test-crypto-keygen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen.js) -- [parallel/test-crypto-lazy-transform-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-lazy-transform-writable.js) -- [parallel/test-crypto-no-algorithm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-no-algorithm.js) -- [parallel/test-crypto-op-during-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-op-during-process-exit.js) -- [parallel/test-crypto-padding-aes256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-padding-aes256.js) -- [parallel/test-crypto-padding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-padding.js) -- [parallel/test-crypto-private-decrypt-gh32240.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-private-decrypt-gh32240.js) -- [parallel/test-crypto-psychic-signatures.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-psychic-signatures.js) -- [parallel/test-crypto-publicDecrypt-fails-first-time.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-publicDecrypt-fails-first-time.js) -- [parallel/test-crypto-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-random.js) -- [parallel/test-crypto-randomfillsync-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-randomfillsync-regression.js) -- [parallel/test-crypto-randomuuid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-randomuuid.js) -- [parallel/test-crypto-rsa-dsa-revert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-rsa-dsa-revert.js) -- [parallel/test-crypto-rsa-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-rsa-dsa.js) -- [parallel/test-crypto-scrypt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-scrypt.js) -- [parallel/test-crypto-secure-heap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-secure-heap.js) -- [parallel/test-crypto-sign-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-sign-verify.js) -- [parallel/test-crypto-subtle-zero-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-subtle-zero-length.js) -- [parallel/test-crypto-verify-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-verify-failure.js) -- [parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js) -- [parallel/test-crypto-worker-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-worker-thread.js) -- [parallel/test-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto.js) -- [parallel/test-cwd-enoent-preload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cwd-enoent-preload.js) -- [parallel/test-cwd-enoent-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cwd-enoent-repl.js) -- [parallel/test-cwd-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cwd-enoent.js) -- [parallel/test-datetime-change-notify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-datetime-change-notify.js) -- [parallel/test-debugger-backtrace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-backtrace.js) -- [parallel/test-debugger-break.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-break.js) -- [parallel/test-debugger-breakpoint-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-breakpoint-exists.js) -- [parallel/test-debugger-clear-breakpoints.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-clear-breakpoints.js) -- [parallel/test-debugger-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-exceptions.js) -- [parallel/test-debugger-exec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-exec.js) -- [parallel/test-debugger-heap-profiler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-heap-profiler.js) -- [parallel/test-debugger-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-list.js) -- [parallel/test-debugger-low-level.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-low-level.js) -- [parallel/test-debugger-object-type-remote-object.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-object-type-remote-object.js) -- [parallel/test-debugger-pid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-pid.js) -- [parallel/test-debugger-preserve-breaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-preserve-breaks.js) -- [parallel/test-debugger-profile-command.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-profile-command.js) -- [parallel/test-debugger-profile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-profile.js) -- [parallel/test-debugger-random-port-with-inspect-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-random-port-with-inspect-port.js) -- [parallel/test-debugger-random-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-random-port.js) -- [parallel/test-debugger-repeat-last.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-repeat-last.js) -- [parallel/test-debugger-restart-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-restart-message.js) -- [parallel/test-debugger-run-after-quit-restart.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-run-after-quit-restart.js) -- [parallel/test-debugger-sb-before-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-sb-before-load.js) -- [parallel/test-debugger-scripts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-scripts.js) -- [parallel/test-debugger-unavailable-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-unavailable-port.js) -- [parallel/test-debugger-use-strict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-use-strict.js) -- [parallel/test-debugger-watch-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-watch-validation.js) -- [parallel/test-debugger-websocket-secret-mismatch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-websocket-secret-mismatch.js) -- [parallel/test-delayed-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-delayed-require.js) -- [parallel/test-dgram-abort-closed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-abort-closed.js) -- [parallel/test-dgram-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-address.js) -- [parallel/test-dgram-bind-default-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-default-address.js) -- [parallel/test-dgram-bind-error-repeat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-error-repeat.js) -- [parallel/test-dgram-bind-fd-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-fd-error.js) -- [parallel/test-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-fd.js) -- [parallel/test-dgram-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind.js) -- [parallel/test-dgram-bytes-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bytes-length.js) -- [parallel/test-dgram-close-in-listening.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-close-in-listening.js) -- [parallel/test-dgram-close-is-not-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-close-is-not-callback.js) -- [parallel/test-dgram-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-close.js) -- [parallel/test-dgram-cluster-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-cluster-bind-error.js) -- [parallel/test-dgram-cluster-close-during-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-cluster-close-during-bind.js) -- [parallel/test-dgram-cluster-close-in-listening.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-cluster-close-in-listening.js) -- [parallel/test-dgram-connect-send-callback-buffer-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-callback-buffer-length.js) -- [parallel/test-dgram-connect-send-callback-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-callback-buffer.js) -- [parallel/test-dgram-connect-send-callback-multi-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-callback-multi-buffer.js) -- [parallel/test-dgram-connect-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-default-host.js) -- [parallel/test-dgram-connect-send-empty-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-empty-array.js) -- [parallel/test-dgram-connect-send-empty-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-empty-buffer.js) -- [parallel/test-dgram-connect-send-empty-packet.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-empty-packet.js) -- [parallel/test-dgram-connect-send-multi-buffer-copy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-multi-buffer-copy.js) -- [parallel/test-dgram-connect-send-multi-string-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-multi-string-array.js) -- [parallel/test-dgram-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect.js) -- [parallel/test-dgram-create-socket-handle-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-create-socket-handle-fd.js) -- [parallel/test-dgram-create-socket-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-create-socket-handle.js) -- [parallel/test-dgram-createSocket-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-createSocket-type.js) -- [parallel/test-dgram-custom-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-custom-lookup.js) -- [parallel/test-dgram-deprecation-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-deprecation-error.js) -- [parallel/test-dgram-error-message-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-error-message-address.js) -- [parallel/test-dgram-exclusive-implicit-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-exclusive-implicit-bind.js) -- [parallel/test-dgram-implicit-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-implicit-bind.js) -- [parallel/test-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-ipv6only.js) -- [parallel/test-dgram-listen-after-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-listen-after-bind.js) -- [parallel/test-dgram-membership.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-membership.js) -- [parallel/test-dgram-msgsize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-msgsize.js) -- [parallel/test-dgram-multicast-loopback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-multicast-loopback.js) -- [parallel/test-dgram-multicast-set-interface.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-multicast-set-interface.js) -- [parallel/test-dgram-multicast-setTTL.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-multicast-setTTL.js) -- [parallel/test-dgram-oob-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-oob-buffer.js) -- [parallel/test-dgram-recv-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-recv-error.js) -- [parallel/test-dgram-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-ref.js) -- [parallel/test-dgram-send-address-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-address-types.js) -- [parallel/test-dgram-send-bad-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-bad-arguments.js) -- [parallel/test-dgram-send-callback-buffer-empty-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer-empty-address.js) -- [parallel/test-dgram-send-callback-buffer-length-empty-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js) -- [parallel/test-dgram-send-callback-buffer-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer-length.js) -- [parallel/test-dgram-send-callback-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer.js) -- [parallel/test-dgram-send-callback-multi-buffer-empty-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-multi-buffer-empty-address.js) -- [parallel/test-dgram-send-callback-multi-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-multi-buffer.js) -- [parallel/test-dgram-send-callback-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-recursive.js) -- [parallel/test-dgram-send-cb-quelches-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-cb-quelches-error.js) -- [parallel/test-dgram-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-default-host.js) -- [parallel/test-dgram-send-empty-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-empty-array.js) -- [parallel/test-dgram-send-empty-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-empty-buffer.js) -- [parallel/test-dgram-send-empty-packet.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-empty-packet.js) -- [parallel/test-dgram-send-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-error.js) -- [parallel/test-dgram-send-invalid-msg-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-invalid-msg-type.js) -- [parallel/test-dgram-send-multi-buffer-copy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-multi-buffer-copy.js) -- [parallel/test-dgram-send-multi-string-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-multi-string-array.js) -- [parallel/test-dgram-send-queue-info.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-queue-info.js) -- [parallel/test-dgram-sendto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-sendto.js) -- [parallel/test-dgram-setBroadcast.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-setBroadcast.js) -- [parallel/test-dgram-setTTL.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-setTTL.js) -- [parallel/test-dgram-socket-buffer-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-socket-buffer-size.js) -- [parallel/test-dgram-udp4.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp4.js) -- [parallel/test-dgram-udp6-link-local-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp6-link-local-address.js) -- [parallel/test-dgram-udp6-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp6-send-default-host.js) -- [parallel/test-dgram-unref-in-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-unref-in-cluster.js) -- [parallel/test-dgram-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-unref.js) -- [parallel/test-diagnostics-channel-bind-store.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-bind-store.js) -- [parallel/test-diagnostics-channel-http-server-start.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-http-server-start.js) -- [parallel/test-diagnostics-channel-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-http.js) -- [parallel/test-diagnostics-channel-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-memory-leak.js) -- [parallel/test-diagnostics-channel-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-process.js) -- [parallel/test-diagnostics-channel-safe-subscriber-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js) -- [parallel/test-diagnostics-channel-tracing-channel-async-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js) -- [parallel/test-diagnostics-channel-tracing-channel-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-async.js) -- [parallel/test-diagnostics-channel-tracing-channel-run-stores.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js) -- [parallel/test-diagnostics-channel-worker-threads.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-worker-threads.js) -- [parallel/test-directory-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-directory-import.js) -- [parallel/test-disable-proto-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-disable-proto-delete.js) -- [parallel/test-disable-proto-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-disable-proto-throw.js) -- [parallel/test-dns-cancel-reverse-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-cancel-reverse-lookup.js) -- [parallel/test-dns-channel-cancel-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-channel-cancel-promise.js) -- [parallel/test-dns-channel-cancel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-channel-cancel.js) -- [parallel/test-dns-channel-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-channel-timeout.js) -- [parallel/test-dns-default-verbatim-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-default-verbatim-false.js) -- [parallel/test-dns-default-verbatim-true.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-default-verbatim-true.js) -- [parallel/test-dns-get-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-get-server.js) -- [parallel/test-dns-lookup-promises-options-deprecated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookup-promises-options-deprecated.js) -- [parallel/test-dns-lookup-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookup-promises.js) -- [parallel/test-dns-lookupService-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookupService-promises.js) -- [parallel/test-dns-lookupService.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookupService.js) -- [parallel/test-dns-multi-channel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-multi-channel.js) -- [parallel/test-dns-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-perf_hooks.js) -- [parallel/test-dns-resolve-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-resolve-promises.js) -- [parallel/test-dns-resolveany-bad-ancount.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-resolveany-bad-ancount.js) -- [parallel/test-dns-resolveany.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-resolveany.js) -- [parallel/test-dns-set-default-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-set-default-order.js) -- [parallel/test-dns-setlocaladdress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-setlocaladdress.js) -- [parallel/test-dns-setserver-when-querying.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-setserver-when-querying.js) -- [parallel/test-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns.js) -- [parallel/test-domain-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-abort-on-uncaught.js) -- [parallel/test-domain-add-remove.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-add-remove.js) -- [parallel/test-domain-async-id-map-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-async-id-map-leak.js) -- [parallel/test-domain-bind-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-bind-timeout.js) -- [parallel/test-domain-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-crypto.js) -- [parallel/test-domain-dep0097.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-dep0097.js) -- [parallel/test-domain-ee-error-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-ee-error-listener.js) -- [parallel/test-domain-ee-implicit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-ee-implicit.js) -- [parallel/test-domain-ee.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-ee.js) -- [parallel/test-domain-emit-error-handler-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-emit-error-handler-stack.js) -- [parallel/test-domain-enter-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-enter-exit.js) -- [parallel/test-domain-error-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-error-types.js) -- [parallel/test-domain-from-timer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-from-timer.js) -- [parallel/test-domain-fs-enoent-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-fs-enoent-stream.js) -- [parallel/test-domain-http-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-http-server.js) -- [parallel/test-domain-implicit-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-implicit-binding.js) -- [parallel/test-domain-implicit-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-implicit-fs.js) -- [parallel/test-domain-intercept.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-intercept.js) -- [parallel/test-domain-load-after-set-uncaught-exception-capture.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-load-after-set-uncaught-exception-capture.js) -- [parallel/test-domain-multi.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-multi.js) -- [parallel/test-domain-multiple-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-multiple-errors.js) -- [parallel/test-domain-nested-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-nested-throw.js) -- [parallel/test-domain-nested.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-nested.js) -- [parallel/test-domain-nexttick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-nexttick.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-0.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-1.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-2.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-3.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-4.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-4.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-5.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-5.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-6.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-6.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-7.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-7.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-8.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-9.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js) -- [parallel/test-domain-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-promise.js) -- [parallel/test-domain-run.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-run.js) -- [parallel/test-domain-safe-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-safe-exit.js) -- [parallel/test-domain-set-uncaught-exception-capture-after-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-set-uncaught-exception-capture-after-load.js) -- [parallel/test-domain-stack-empty-in-process-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-stack-empty-in-process-uncaughtexception.js) -- [parallel/test-domain-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-stack.js) -- [parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js) -- [parallel/test-domain-thrown-error-handler-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-thrown-error-handler-stack.js) -- [parallel/test-domain-timer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-timer.js) -- [parallel/test-domain-timers-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-timers-uncaught-exception.js) -- [parallel/test-domain-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-timers.js) -- [parallel/test-domain-top-level-error-handler-clears-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-top-level-error-handler-clears-stack.js) -- [parallel/test-domain-top-level-error-handler-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-top-level-error-handler-throw.js) -- [parallel/test-domain-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-uncaught-exception.js) -- [parallel/test-domain-vm-promise-isolation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-vm-promise-isolation.js) -- [parallel/test-domain-with-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-with-abort-on-uncaught-exception.js) -- [parallel/test-domexception-cause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domexception-cause.js) -- [parallel/test-dotenv-edge-cases.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv-edge-cases.js) -- [parallel/test-dotenv-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv-node-options.js) -- [parallel/test-dotenv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv.js) -- [parallel/test-double-tls-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-double-tls-client.js) -- [parallel/test-double-tls-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-double-tls-server.js) -- [parallel/test-dsa-fips-invalid-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dsa-fips-invalid-key.js) -- [parallel/test-dummy-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dummy-stdio.js) -- [parallel/test-emit-after-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-emit-after-uncaught-exception.js) -- [parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js) -- [parallel/test-env-var-no-warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-env-var-no-warnings.js) -- [parallel/test-err-name-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-err-name-deprecation.js) -- [parallel/test-error-aggregateTwoErrors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-aggregateTwoErrors.js) -- [parallel/test-error-format-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-format-list.js) -- [parallel/test-error-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-prepare-stack-trace.js) -- [parallel/test-error-reporting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-reporting.js) -- [parallel/test-error-serdes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-serdes.js) -- [parallel/test-errors-aborterror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-aborterror.js) -- [parallel/test-errors-systemerror-frozen-intrinsics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-frozen-intrinsics.js) -- [parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js) -- [parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js) -- [parallel/test-errors-systemerror-stackTraceLimit-deleted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted.js) -- [parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js) -- [parallel/test-errors-systemerror-stackTraceLimit-not-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-not-writable.js) -- [parallel/test-errors-systemerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror.js) -- [parallel/test-eslint-alphabetize-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-alphabetize-errors.js) -- [parallel/test-eslint-async-iife-no-unused-result.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-async-iife-no-unused-result.js) -- [parallel/test-eslint-avoid-prototype-pollution.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-avoid-prototype-pollution.js) -- [parallel/test-eslint-crypto-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-crypto-check.js) -- [parallel/test-eslint-documented-deprecation-codes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-documented-deprecation-codes.js) -- [parallel/test-eslint-documented-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-documented-errors.js) -- [parallel/test-eslint-duplicate-requires.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-duplicate-requires.js) -- [parallel/test-eslint-eslint-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-eslint-check.js) -- [parallel/test-eslint-inspector-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-inspector-check.js) -- [parallel/test-eslint-lowercase-name-for-primitive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-lowercase-name-for-primitive.js) -- [parallel/test-eslint-no-array-destructuring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-no-array-destructuring.js) -- [parallel/test-eslint-no-unescaped-regexp-dot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-no-unescaped-regexp-dot.js) -- [parallel/test-eslint-non-ascii-character.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-non-ascii-character.js) -- [parallel/test-eslint-prefer-assert-iferror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-assert-iferror.js) -- [parallel/test-eslint-prefer-assert-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-assert-methods.js) -- [parallel/test-eslint-prefer-common-mustnotcall.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-common-mustnotcall.js) -- [parallel/test-eslint-prefer-common-mustsucceed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-common-mustsucceed.js) -- [parallel/test-eslint-prefer-primordials.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-primordials.js) -- [parallel/test-eslint-prefer-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-proto.js) -- [parallel/test-eslint-prefer-util-format-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-util-format-errors.js) -- [parallel/test-eslint-require-common-first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-require-common-first.js) -- [parallel/test-eslint-required-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-required-modules.js) -- [parallel/test-eval-disallow-code-generation-from-strings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eval-disallow-code-generation-from-strings.js) -- [parallel/test-event-capture-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-capture-rejections.js) -- [parallel/test-event-emitter-check-listener-leaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-check-listener-leaks.js) -- [parallel/test-event-emitter-max-listeners-warning-for-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning-for-null.js) -- [parallel/test-event-emitter-max-listeners-warning-for-symbol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js) -- [parallel/test-event-emitter-max-listeners-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning.js) -- [parallel/test-event-target.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-target.js) -- [parallel/test-eventemitter-asyncresource.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventemitter-asyncresource.js) -- [parallel/test-events-customevent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-customevent.js) -- [parallel/test-events-getmaxlisteners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-getmaxlisteners.js) -- [parallel/test-events-listener-count-with-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-listener-count-with-listener.js) -- [parallel/test-events-static-geteventlisteners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-static-geteventlisteners.js) -- [parallel/test-eventtarget-memoryleakwarning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget-memoryleakwarning.js) -- [parallel/test-eventtarget-once-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget-once-twice.js) -- [parallel/test-eventtarget.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget.js) -- [parallel/test-experimental-shared-value-conveyor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-experimental-shared-value-conveyor.js) -- [parallel/test-file-validate-mode-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-file-validate-mode-flag.js) -- [parallel/test-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-file.js) -- [parallel/test-filehandle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-filehandle-close.js) -- [parallel/test-filehandle-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-filehandle-readablestream.js) -- [parallel/test-fixed-queue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fixed-queue.js) -- [parallel/test-force-repl-with-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-force-repl-with-eval.js) -- [parallel/test-force-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-force-repl.js) -- [parallel/test-freelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-freelist.js) -- [parallel/test-freeze-intrinsics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-freeze-intrinsics.js) -- [parallel/test-fs-append-file-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-append-file-flush.js) -- [parallel/test-fs-assert-encoding-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-assert-encoding-error.js) -- [parallel/test-fs-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-buffer.js) -- [parallel/test-fs-buffertype-writesync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-buffertype-writesync.js) -- [parallel/test-fs-close-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-close-errors.js) -- [parallel/test-fs-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-close.js) -- [parallel/test-fs-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-constants.js) -- [parallel/test-fs-copyfile-respect-permissions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-copyfile-respect-permissions.js) -- [parallel/test-fs-error-messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-error-messages.js) -- [parallel/test-fs-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-exists.js) -- [parallel/test-fs-existssync-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-existssync-false.js) -- [parallel/test-fs-fchmod.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fchmod.js) -- [parallel/test-fs-fchown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fchown.js) -- [parallel/test-fs-filehandle-use-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-filehandle-use-after-close.js) -- [parallel/test-fs-filehandle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-filehandle.js) -- [parallel/test-fs-fmap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fmap.js) -- [parallel/test-fs-fsync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fsync.js) -- [parallel/test-fs-lchmod.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-lchmod.js) -- [parallel/test-fs-link.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-link.js) -- [parallel/test-fs-long-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-long-path.js) -- [parallel/test-fs-make-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-make-callback.js) -- [parallel/test-fs-makeStatsCallback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-makeStatsCallback.js) -- [parallel/test-fs-mkdir-mode-mask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdir-mode-mask.js) -- [parallel/test-fs-mkdir-recursive-eaccess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdir-recursive-eaccess.js) -- [parallel/test-fs-mkdir-rmdir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdir-rmdir.js) -- [parallel/test-fs-mkdtemp-prefix-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdtemp-prefix-check.js) -- [parallel/test-fs-mkdtemp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdtemp.js) -- [parallel/test-fs-non-number-arguments-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-non-number-arguments-throw.js) -- [parallel/test-fs-null-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-null-bytes.js) -- [parallel/test-fs-options-immutable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-options-immutable.js) -- [parallel/test-fs-promises-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-exists.js) -- [parallel/test-fs-promises-file-handle-aggregate-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-aggregate-errors.js) -- [parallel/test-fs-promises-file-handle-append-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-append-file.js) -- [parallel/test-fs-promises-file-handle-chmod.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-chmod.js) -- [parallel/test-fs-promises-file-handle-close-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-close-errors.js) -- [parallel/test-fs-promises-file-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-close.js) -- [parallel/test-fs-promises-file-handle-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-dispose.js) -- [parallel/test-fs-promises-file-handle-op-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-op-errors.js) -- [parallel/test-fs-promises-file-handle-read-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-read-worker.js) -- [parallel/test-fs-promises-file-handle-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-read.js) -- [parallel/test-fs-promises-file-handle-readFile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-readFile.js) -- [parallel/test-fs-promises-file-handle-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-stat.js) -- [parallel/test-fs-promises-file-handle-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-stream.js) -- [parallel/test-fs-promises-file-handle-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-sync.js) -- [parallel/test-fs-promises-file-handle-truncate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-truncate.js) -- [parallel/test-fs-promises-file-handle-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-write.js) -- [parallel/test-fs-promises-file-handle-writeFile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-writeFile.js) -- [parallel/test-fs-promises-readfile-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-readfile-empty.js) -- [parallel/test-fs-promises-readfile-with-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-readfile-with-fd.js) -- [parallel/test-fs-promises-readfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-readfile.js) -- [parallel/test-fs-promises-watch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-watch.js) -- [parallel/test-fs-promises-write-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-write-optional-params.js) -- [parallel/test-fs-promises-writefile-typedarray.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-writefile-typedarray.js) -- [parallel/test-fs-promises-writefile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-writefile.js) -- [parallel/test-fs-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises.js) -- [parallel/test-fs-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promisified.js) -- [parallel/test-fs-read-empty-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-empty-buffer.js) -- [parallel/test-fs-read-file-assert-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-file-assert-encoding.js) -- [parallel/test-fs-read-file-sync-hostname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-file-sync-hostname.js) -- [parallel/test-fs-read-file-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-file-sync.js) -- [parallel/test-fs-read-offset-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-offset-null.js) -- [parallel/test-fs-read-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-optional-params.js) -- [parallel/test-fs-read-promises-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-promises-optional-params.js) -- [parallel/test-fs-read-stream-err.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-err.js) -- [parallel/test-fs-read-stream-fd-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-fd-leak.js) -- [parallel/test-fs-read-stream-file-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-file-handle.js) -- [parallel/test-fs-read-stream-pos.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-pos.js) -- [parallel/test-fs-readSync-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readSync-optional-params.js) -- [parallel/test-fs-readdir-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readdir-buffer.js) -- [parallel/test-fs-readdir-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readdir-types.js) -- [parallel/test-fs-readdir-ucs2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readdir-ucs2.js) -- [parallel/test-fs-readfile-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-error.js) -- [parallel/test-fs-readfile-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-fd.js) -- [parallel/test-fs-readfile-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-flags.js) -- [parallel/test-fs-readfile-pipe-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-pipe-large.js) -- [parallel/test-fs-readfile-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-pipe.js) -- [parallel/test-fs-readfile-unlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-unlink.js) -- [parallel/test-fs-readfile-zero-byte-liar.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-zero-byte-liar.js) -- [parallel/test-fs-readfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile.js) -- [parallel/test-fs-readfilesync-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfilesync-enoent.js) -- [parallel/test-fs-readfilesync-pipe-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfilesync-pipe-large.js) -- [parallel/test-fs-readlink-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readlink-type-check.js) -- [parallel/test-fs-readv-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readv-promises.js) -- [parallel/test-fs-readv-promisify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readv-promisify.js) -- [parallel/test-fs-ready-event-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-ready-event-stream.js) -- [parallel/test-fs-realpath-buffer-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath-buffer-encoding.js) -- [parallel/test-fs-realpath-on-substed-drive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath-on-substed-drive.js) -- [parallel/test-fs-realpath-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath-pipe.js) -- [parallel/test-fs-realpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath.js) -- [parallel/test-fs-rename-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-rename-type-check.js) -- [parallel/test-fs-rm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-rm.js) -- [parallel/test-fs-sir-writes-alot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-sir-writes-alot.js) -- [parallel/test-fs-stat-bigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stat-bigint.js) -- [parallel/test-fs-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stat.js) -- [parallel/test-fs-statfs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-statfs.js) -- [parallel/test-fs-stream-construct-compat-error-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-error-read.js) -- [parallel/test-fs-stream-construct-compat-error-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-error-write.js) -- [parallel/test-fs-stream-construct-compat-graceful-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-graceful-fs.js) -- [parallel/test-fs-stream-construct-compat-old-node.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-old-node.js) -- [parallel/test-fs-stream-destroy-emit-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-destroy-emit-error.js) -- [parallel/test-fs-stream-double-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-double-close.js) -- [parallel/test-fs-stream-fs-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-fs-options.js) -- [parallel/test-fs-stream-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-options.js) -- [parallel/test-fs-symlink-buffer-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-buffer-path.js) -- [parallel/test-fs-symlink-dir-junction-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-dir-junction-relative.js) -- [parallel/test-fs-symlink-dir-junction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-dir-junction.js) -- [parallel/test-fs-symlink-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-dir.js) -- [parallel/test-fs-symlink-longpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-longpath.js) -- [parallel/test-fs-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink.js) -- [parallel/test-fs-sync-fd-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-sync-fd-leak.js) -- [parallel/test-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-syncwritestream.js) -- [parallel/test-fs-timestamp-parsing-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-timestamp-parsing-error.js) -- [parallel/test-fs-truncate-clear-file-zero.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate-clear-file-zero.js) -- [parallel/test-fs-truncate-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate-fd.js) -- [parallel/test-fs-truncate-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate-sync.js) -- [parallel/test-fs-truncate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate.js) -- [parallel/test-fs-unlink-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-unlink-type-check.js) -- [parallel/test-fs-util-validateoffsetlength.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-util-validateoffsetlength.js) -- [parallel/test-fs-utils-get-dirents.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-utils-get-dirents.js) -- [parallel/test-fs-utimes-y2K38.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-utimes-y2K38.js) -- [parallel/test-fs-watch-abort-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-abort-signal.js) -- [parallel/test-fs-watch-close-when-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-close-when-destroyed.js) -- [parallel/test-fs-watch-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-encoding.js) -- [parallel/test-fs-watch-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-enoent.js) -- [parallel/test-fs-watch-file-enoent-after-deletion.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-file-enoent-after-deletion.js) -- [parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js) -- [parallel/test-fs-watch-recursive-add-file-to-new-folder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js) -- [parallel/test-fs-watch-recursive-add-file-with-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-with-url.js) -- [parallel/test-fs-watch-recursive-add-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file.js) -- [parallel/test-fs-watch-recursive-add-folder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-folder.js) -- [parallel/test-fs-watch-recursive-assert-leaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-assert-leaks.js) -- [parallel/test-fs-watch-recursive-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-promise.js) -- [parallel/test-fs-watch-recursive-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-symlink.js) -- [parallel/test-fs-watch-recursive-update-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-update-file.js) -- [parallel/test-fs-watch-recursive-validate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-validate.js) -- [parallel/test-fs-watch-recursive-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-watch-file.js) -- [parallel/test-fs-watch-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-ref-unref.js) -- [parallel/test-fs-watch-stop-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-stop-async.js) -- [parallel/test-fs-watch-stop-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-stop-sync.js) -- [parallel/test-fs-watch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch.js) -- [parallel/test-fs-watchfile-bigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watchfile-bigint.js) -- [parallel/test-fs-watchfile-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watchfile-ref-unref.js) -- [parallel/test-fs-whatwg-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-whatwg-url.js) -- [parallel/test-fs-write-buffer-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-buffer-large.js) -- [parallel/test-fs-write-file-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-file-flush.js) -- [parallel/test-fs-write-file-typedarrays.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-file-typedarrays.js) -- [parallel/test-fs-write-negativeoffset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-negativeoffset.js) -- [parallel/test-fs-write-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-optional-params.js) -- [parallel/test-fs-write-reuse-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-reuse-callback.js) -- [parallel/test-fs-write-sigxfsz.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-sigxfsz.js) -- [parallel/test-fs-write-stream-change-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-change-open.js) -- [parallel/test-fs-write-stream-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-encoding.js) -- [parallel/test-fs-write-stream-err.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-err.js) -- [parallel/test-fs-write-stream-file-handle-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-file-handle-2.js) -- [parallel/test-fs-write-stream-file-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-file-handle.js) -- [parallel/test-fs-write-stream-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-flush.js) -- [parallel/test-fs-write-stream-patch-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-patch-open.js) -- [parallel/test-fs-write-sync-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-sync-optional-params.js) -- [parallel/test-fs-writefile-with-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writefile-with-fd.js) -- [parallel/test-fs-writev-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writev-promises.js) -- [parallel/test-fs-writev.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writev.js) -- [parallel/test-gc-http-client-connaborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-http-client-connaborted.js) -- [parallel/test-gc-net-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-net-timeout.js) -- [parallel/test-gc-tls-external-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-tls-external-memory.js) -- [parallel/test-global-console-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-console-exists.js) -- [parallel/test-global-customevent-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-customevent-disabled.js) -- [parallel/test-global-customevent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-customevent.js) -- [parallel/test-global-domexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-domexception.js) -- [parallel/test-global-encoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-encoder.js) -- [parallel/test-global-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-setters.js) -- [parallel/test-global-webcrypto-classes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto-classes.js) -- [parallel/test-global-webcrypto-disbled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto-disbled.js) -- [parallel/test-global-webcrypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto.js) -- [parallel/test-global-webstreams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webstreams.js) -- [parallel/test-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global.js) -- [parallel/test-h2-large-header-cause-client-to-hangup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-h2-large-header-cause-client-to-hangup.js) -- [parallel/test-handle-wrap-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-handle-wrap-hasref.js) -- [parallel/test-heap-prof-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-basic.js) -- [parallel/test-heap-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-dir-absolute.js) -- [parallel/test-heap-prof-dir-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-dir-name.js) -- [parallel/test-heap-prof-dir-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-dir-relative.js) -- [parallel/test-heap-prof-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-exec-argv.js) -- [parallel/test-heap-prof-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-exit.js) -- [parallel/test-heap-prof-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-interval.js) -- [parallel/test-heap-prof-invalid-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-invalid-args.js) -- [parallel/test-heap-prof-loop-drained.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-loop-drained.js) -- [parallel/test-heap-prof-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-name.js) -- [parallel/test-heap-prof-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-sigint.js) -- [parallel/test-heapdump-async-hooks-init-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heapdump-async-hooks-init-promise.js) -- [parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js) -- [parallel/test-heapsnapshot-near-heap-limit-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heapsnapshot-near-heap-limit-worker.js) -- [parallel/test-http-1.0-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-1.0-keep-alive.js) -- [parallel/test-http-1.0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-1.0.js) -- [parallel/test-http-abort-before-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-before-end.js) -- [parallel/test-http-abort-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-client.js) -- [parallel/test-http-abort-queued.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-queued.js) -- [parallel/test-http-abort-stream-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-stream-end.js) -- [parallel/test-http-aborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-aborted.js) -- [parallel/test-http-addrequest-localaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-addrequest-localaddress.js) -- [parallel/test-http-after-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-after-connect.js) -- [parallel/test-http-agent-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-abort-controller.js) -- [parallel/test-http-agent-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-close.js) -- [parallel/test-http-agent-destroyed-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-destroyed-socket.js) -- [parallel/test-http-agent-domain-reused-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-domain-reused-gc.js) -- [parallel/test-http-agent-error-on-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-error-on-idle.js) -- [parallel/test-http-agent-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-false.js) -- [parallel/test-http-agent-keepalive-delay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-keepalive-delay.js) -- [parallel/test-http-agent-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-keepalive.js) -- [parallel/test-http-agent-maxsockets-respected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-maxsockets-respected.js) -- [parallel/test-http-agent-maxsockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-maxsockets.js) -- [parallel/test-http-agent-maxtotalsockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-maxtotalsockets.js) -- [parallel/test-http-agent-no-protocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-no-protocol.js) -- [parallel/test-http-agent-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-null.js) -- [parallel/test-http-agent-remove.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-remove.js) -- [parallel/test-http-agent-reuse-drained-socket-only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-reuse-drained-socket-only.js) -- [parallel/test-http-agent-scheduling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-scheduling.js) -- [parallel/test-http-agent-timeout-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-timeout-option.js) -- [parallel/test-http-agent-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-timeout.js) -- [parallel/test-http-agent-uninitialized-with-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-uninitialized-with-handle.js) -- [parallel/test-http-agent-uninitialized.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-uninitialized.js) -- [parallel/test-http-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent.js) -- [parallel/test-http-allow-content-length-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-allow-content-length-304.js) -- [parallel/test-http-allow-req-after-204-res.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-allow-req-after-204-res.js) -- [parallel/test-http-automatic-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-automatic-headers.js) -- [parallel/test-http-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-autoselectfamily.js) -- [parallel/test-http-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-bind-twice.js) -- [parallel/test-http-blank-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-blank-header.js) -- [parallel/test-http-buffer-sanity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-buffer-sanity.js) -- [parallel/test-http-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-byteswritten.js) -- [parallel/test-http-catch-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-catch-uncaughtexception.js) -- [parallel/test-http-chunk-extensions-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunk-extensions-limit.js) -- [parallel/test-http-chunk-problem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunk-problem.js) -- [parallel/test-http-chunked-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked-304.js) -- [parallel/test-http-chunked-smuggling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked-smuggling.js) -- [parallel/test-http-chunked.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked.js) -- [parallel/test-http-client-abort-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-destroy.js) -- [parallel/test-http-client-abort-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-event.js) -- [parallel/test-http-client-abort-keep-alive-destroy-res.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-keep-alive-destroy-res.js) -- [parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js) -- [parallel/test-http-client-abort-keep-alive-queued-unix-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-keep-alive-queued-unix-socket.js) -- [parallel/test-http-client-abort-no-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-no-agent.js) -- [parallel/test-http-client-abort-response-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-response-event.js) -- [parallel/test-http-client-abort-unix-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-unix-socket.js) -- [parallel/test-http-client-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort.js) -- [parallel/test-http-client-abort2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort2.js) -- [parallel/test-http-client-abort3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort3.js) -- [parallel/test-http-client-aborted-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-aborted-event.js) -- [parallel/test-http-client-agent-abort-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent-abort-close-event.js) -- [parallel/test-http-client-agent-end-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent-end-close-event.js) -- [parallel/test-http-client-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent.js) -- [parallel/test-http-client-check-http-token.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-check-http-token.js) -- [parallel/test-http-client-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-close-event.js) -- [parallel/test-http-client-close-with-default-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-close-with-default-agent.js) -- [parallel/test-http-client-default-headers-exist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-default-headers-exist.js) -- [parallel/test-http-client-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-defaults.js) -- [parallel/test-http-client-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-encoding.js) -- [parallel/test-http-client-error-rawbytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-error-rawbytes.js) -- [parallel/test-http-client-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-finished.js) -- [parallel/test-http-client-headers-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-headers-array.js) -- [parallel/test-http-client-headers-host-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-headers-host-array.js) -- [parallel/test-http-client-immediate-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-immediate-error.js) -- [parallel/test-http-client-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-incomingmessage-destroy.js) -- [parallel/test-http-client-invalid-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-invalid-path.js) -- [parallel/test-http-client-keep-alive-hint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-keep-alive-hint.js) -- [parallel/test-http-client-keep-alive-release-before-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-keep-alive-release-before-finish.js) -- [parallel/test-http-client-override-global-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-override-global-agent.js) -- [parallel/test-http-client-parse-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-parse-error.js) -- [parallel/test-http-client-pipe-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-pipe-end.js) -- [parallel/test-http-client-race-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-race-2.js) -- [parallel/test-http-client-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-race.js) -- [parallel/test-http-client-readable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-readable.js) -- [parallel/test-http-client-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-reject-chunked-with-content-length.js) -- [parallel/test-http-client-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-reject-cr-no-lf.js) -- [parallel/test-http-client-reject-unexpected-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-reject-unexpected-agent.js) -- [parallel/test-http-client-req-error-dont-double-fire.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-req-error-dont-double-fire.js) -- [parallel/test-http-client-request-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-request-options.js) -- [parallel/test-http-client-res-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-res-destroyed.js) -- [parallel/test-http-client-response-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-response-domain.js) -- [parallel/test-http-client-response-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-response-timeout.js) -- [parallel/test-http-client-set-timeout-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-set-timeout-after-end.js) -- [parallel/test-http-client-set-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-set-timeout.js) -- [parallel/test-http-client-spurious-aborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-spurious-aborted.js) -- [parallel/test-http-client-timeout-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-agent.js) -- [parallel/test-http-client-timeout-connect-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-connect-listener.js) -- [parallel/test-http-client-timeout-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-event.js) -- [parallel/test-http-client-timeout-on-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-on-connect.js) -- [parallel/test-http-client-timeout-option-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-option-listeners.js) -- [parallel/test-http-client-timeout-option-with-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-option-with-agent.js) -- [parallel/test-http-client-timeout-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-option.js) -- [parallel/test-http-client-timeout-with-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-with-data.js) -- [parallel/test-http-client-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout.js) -- [parallel/test-http-client-unescaped-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-unescaped-path.js) -- [parallel/test-http-client-upload-buf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-upload-buf.js) -- [parallel/test-http-client-upload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-upload.js) -- [parallel/test-http-common.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-common.js) -- [parallel/test-http-conn-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-conn-reset.js) -- [parallel/test-http-connect-req-res.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-connect-req-res.js) -- [parallel/test-http-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-connect.js) -- [parallel/test-http-content-length-mismatch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-content-length-mismatch.js) -- [parallel/test-http-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-content-length.js) -- [parallel/test-http-contentLength0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-contentLength0.js) -- [parallel/test-http-correct-hostname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-correct-hostname.js) -- [parallel/test-http-createConnection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-createConnection.js) -- [parallel/test-http-date-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-date-header.js) -- [parallel/test-http-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-debug.js) -- [parallel/test-http-decoded-auth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-decoded-auth.js) -- [parallel/test-http-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-default-encoding.js) -- [parallel/test-http-default-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-default-port.js) -- [parallel/test-http-destroyed-socket-write2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-destroyed-socket-write2.js) -- [parallel/test-http-dns-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-dns-error.js) -- [parallel/test-http-double-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-double-content-length.js) -- [parallel/test-http-dump-req-when-res-ends.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-dump-req-when-res-ends.js) -- [parallel/test-http-early-hints-invalid-argument.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-early-hints-invalid-argument.js) -- [parallel/test-http-early-hints.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-early-hints.js) -- [parallel/test-http-end-throw-socket-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-end-throw-socket-handling.js) -- [parallel/test-http-eof-on-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-eof-on-connect.js) -- [parallel/test-http-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-exceptions.js) -- [parallel/test-http-expect-continue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-expect-continue.js) -- [parallel/test-http-expect-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-expect-handling.js) -- [parallel/test-http-extra-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-extra-response.js) -- [parallel/test-http-flush-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-flush-headers.js) -- [parallel/test-http-flush-response-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-flush-response-headers.js) -- [parallel/test-http-full-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-full-response.js) -- [parallel/test-http-generic-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-generic-streams.js) -- [parallel/test-http-get-pipeline-problem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-get-pipeline-problem.js) -- [parallel/test-http-head-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-request.js) -- [parallel/test-http-head-response-has-no-body-end-implicit-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-response-has-no-body-end-implicit-headers.js) -- [parallel/test-http-head-response-has-no-body-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-response-has-no-body-end.js) -- [parallel/test-http-head-response-has-no-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-response-has-no-body.js) -- [parallel/test-http-head-throw-on-response-body-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-throw-on-response-body-write.js) -- [parallel/test-http-header-badrequest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-badrequest.js) -- [parallel/test-http-header-obstext.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-obstext.js) -- [parallel/test-http-header-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-overflow.js) -- [parallel/test-http-header-owstext.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-owstext.js) -- [parallel/test-http-header-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-read.js) -- [parallel/test-http-hex-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-hex-write.js) -- [parallel/test-http-highwatermark.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-highwatermark.js) -- [parallel/test-http-host-header-ipv6-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-host-header-ipv6-fail.js) -- [parallel/test-http-host-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-host-headers.js) -- [parallel/test-http-hostname-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-hostname-typechecking.js) -- [parallel/test-http-incoming-matchKnownFields.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-matchKnownFields.js) -- [parallel/test-http-incoming-message-connection-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-message-connection-setter.js) -- [parallel/test-http-incoming-message-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-message-destroy.js) -- [parallel/test-http-incoming-message-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-message-options.js) -- [parallel/test-http-incoming-pipelined-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-pipelined-socket-destroy.js) -- [parallel/test-http-information-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-information-headers.js) -- [parallel/test-http-information-processing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-information-processing.js) -- [parallel/test-http-insecure-parser-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-insecure-parser-per-stream.js) -- [parallel/test-http-insecure-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-insecure-parser.js) -- [parallel/test-http-invalid-path-chars.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalid-path-chars.js) -- [parallel/test-http-invalid-te.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalid-te.js) -- [parallel/test-http-invalid-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalid-urls.js) -- [parallel/test-http-invalidheaderfield.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalidheaderfield.js) -- [parallel/test-http-invalidheaderfield2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalidheaderfield2.js) -- [parallel/test-http-keep-alive-close-on-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-close-on-header.js) -- [parallel/test-http-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-drop-requests.js) -- [parallel/test-http-keep-alive-max-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-max-requests.js) -- [parallel/test-http-keep-alive-pipeline-max-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-pipeline-max-requests.js) -- [parallel/test-http-keep-alive-timeout-custom.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-timeout-custom.js) -- [parallel/test-http-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-timeout.js) -- [parallel/test-http-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive.js) -- [parallel/test-http-keepalive-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-client.js) -- [parallel/test-http-keepalive-free.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-free.js) -- [parallel/test-http-keepalive-override.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-override.js) -- [parallel/test-http-keepalive-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-request.js) -- [parallel/test-http-listening.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-listening.js) -- [parallel/test-http-localaddress-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-localaddress-bind-error.js) -- [parallel/test-http-malformed-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-malformed-request.js) -- [parallel/test-http-many-ended-pipelines.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-many-ended-pipelines.js) -- [parallel/test-http-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-header-size-per-stream.js) -- [parallel/test-http-max-header-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-header-size.js) -- [parallel/test-http-max-headers-count.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-headers-count.js) -- [parallel/test-http-max-http-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-http-headers.js) -- [parallel/test-http-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-methods.js) -- [parallel/test-http-missing-header-separator-cr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-missing-header-separator-cr.js) -- [parallel/test-http-missing-header-separator-lf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-missing-header-separator-lf.js) -- [parallel/test-http-multi-line-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-multi-line-headers.js) -- [parallel/test-http-multiple-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-multiple-headers.js) -- [parallel/test-http-mutable-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-mutable-headers.js) -- [parallel/test-http-no-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-no-content-length.js) -- [parallel/test-http-no-read-no-dump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-no-read-no-dump.js) -- [parallel/test-http-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-nodelay.js) -- [parallel/test-http-outgoing-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-buffer.js) -- [parallel/test-http-outgoing-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-destroy.js) -- [parallel/test-http-outgoing-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-destroyed.js) -- [parallel/test-http-outgoing-end-cork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-end-cork.js) -- [parallel/test-http-outgoing-end-multiple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-end-multiple.js) -- [parallel/test-http-outgoing-end-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-end-types.js) -- [parallel/test-http-outgoing-finish-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-finish-writable.js) -- [parallel/test-http-outgoing-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-finish.js) -- [parallel/test-http-outgoing-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-finished.js) -- [parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js) -- [parallel/test-http-outgoing-message-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-message-capture-rejection.js) -- [parallel/test-http-outgoing-message-inheritance.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-message-inheritance.js) -- [parallel/test-http-outgoing-message-write-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-message-write-callback.js) -- [parallel/test-http-outgoing-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-properties.js) -- [parallel/test-http-outgoing-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-proto.js) -- [parallel/test-http-outgoing-writableFinished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-writableFinished.js) -- [parallel/test-http-outgoing-write-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-write-types.js) -- [parallel/test-http-parser-bad-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-bad-ref.js) -- [parallel/test-http-parser-finish-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-finish-error.js) -- [parallel/test-http-parser-free.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-free.js) -- [parallel/test-http-parser-freed-before-upgrade.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-freed-before-upgrade.js) -- [parallel/test-http-parser-lazy-loaded.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-lazy-loaded.js) -- [parallel/test-http-parser-memory-retention.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-memory-retention.js) -- [parallel/test-http-parser-multiple-execute.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-multiple-execute.js) -- [parallel/test-http-parser-timeout-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-timeout-reset.js) -- [parallel/test-http-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser.js) -- [parallel/test-http-pause-no-dump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pause-no-dump.js) -- [parallel/test-http-pause-resume-one-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pause-resume-one-end.js) -- [parallel/test-http-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pause.js) -- [parallel/test-http-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-perf_hooks.js) -- [parallel/test-http-pipe-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipe-fs.js) -- [parallel/test-http-pipeline-assertionerror-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-assertionerror-finish.js) -- [parallel/test-http-pipeline-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-flood.js) -- [parallel/test-http-pipeline-requests-connection-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-requests-connection-leak.js) -- [parallel/test-http-pipeline-socket-parser-typeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-socket-parser-typeerror.js) -- [parallel/test-http-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-proxy.js) -- [parallel/test-http-raw-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-raw-headers.js) -- [parallel/test-http-readable-data-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-readable-data-event.js) -- [parallel/test-http-remove-connection-header-persists-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-remove-connection-header-persists-connection.js) -- [parallel/test-http-remove-header-stays-removed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-remove-header-stays-removed.js) -- [parallel/test-http-req-close-robust-from-tampering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-req-close-robust-from-tampering.js) -- [parallel/test-http-req-res-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-req-res-close.js) -- [parallel/test-http-request-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-agent.js) -- [parallel/test-http-request-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-arguments.js) -- [parallel/test-http-request-dont-override-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-dont-override-options.js) -- [parallel/test-http-request-end-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-end-twice.js) -- [parallel/test-http-request-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-end.js) -- [parallel/test-http-request-host-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-host-header.js) -- [parallel/test-http-request-invalid-method-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-invalid-method-error.js) -- [parallel/test-http-request-join-authorization-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-join-authorization-headers.js) -- [parallel/test-http-request-large-payload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-large-payload.js) -- [parallel/test-http-request-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-methods.js) -- [parallel/test-http-request-smuggling-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-smuggling-content-length.js) -- [parallel/test-http-res-write-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-res-write-after-end.js) -- [parallel/test-http-res-write-end-dont-take-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-res-write-end-dont-take-array.js) -- [parallel/test-http-response-add-header-after-sent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-add-header-after-sent.js) -- [parallel/test-http-response-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-close.js) -- [parallel/test-http-response-cork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-cork.js) -- [parallel/test-http-response-multi-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-multi-content-length.js) -- [parallel/test-http-response-multiheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-multiheaders.js) -- [parallel/test-http-response-no-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-no-headers.js) -- [parallel/test-http-response-readable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-readable.js) -- [parallel/test-http-response-remove-header-after-sent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-remove-header-after-sent.js) -- [parallel/test-http-response-setheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-setheaders.js) -- [parallel/test-http-response-splitting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-splitting.js) -- [parallel/test-http-response-status-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-status-message.js) -- [parallel/test-http-response-statuscode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-statuscode.js) -- [parallel/test-http-response-writehead-returns-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-writehead-returns-this.js) -- [parallel/test-http-same-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-same-map.js) -- [parallel/test-http-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-async-dispose.js) -- [parallel/test-http-server-capture-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-capture-rejections.js) -- [parallel/test-http-server-client-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-client-error.js) -- [parallel/test-http-server-close-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-all.js) -- [parallel/test-http-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-destroy-timeout.js) -- [parallel/test-http-server-close-idle-wait-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-idle-wait-response.js) -- [parallel/test-http-server-close-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-idle.js) -- [parallel/test-http-server-connection-list-when-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-connection-list-when-close.js) -- [parallel/test-http-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-connections-checking-leak.js) -- [parallel/test-http-server-consumed-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-consumed-timeout.js) -- [parallel/test-http-server-de-chunked-trailer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-de-chunked-trailer.js) -- [parallel/test-http-server-delete-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-delete-parser.js) -- [parallel/test-http-server-destroy-socket-on-client-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-destroy-socket-on-client-error.js) -- [parallel/test-http-server-headers-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-delayed-headers.js) -- [parallel/test-http-server-headers-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-interrupted-headers.js) -- [parallel/test-http-server-headers-timeout-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-keepalive.js) -- [parallel/test-http-server-headers-timeout-pipelining.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-pipelining.js) -- [parallel/test-http-server-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-incomingmessage-destroy.js) -- [parallel/test-http-server-keep-alive-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keep-alive-defaults.js) -- [parallel/test-http-server-keep-alive-max-requests-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keep-alive-max-requests-null.js) -- [parallel/test-http-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keep-alive-timeout.js) -- [parallel/test-http-server-keepalive-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keepalive-end.js) -- [parallel/test-http-server-keepalive-req-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keepalive-req-gc.js) -- [parallel/test-http-server-multiheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-multiheaders.js) -- [parallel/test-http-server-multiheaders2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-multiheaders2.js) -- [parallel/test-http-server-non-utf8-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-non-utf8-header.js) -- [parallel/test-http-server-options-highwatermark.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-options-highwatermark.js) -- [parallel/test-http-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-options-incoming-message.js) -- [parallel/test-http-server-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-options-server-response.js) -- [parallel/test-http-server-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-reject-chunked-with-content-length.js) -- [parallel/test-http-server-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-reject-cr-no-lf.js) -- [parallel/test-http-server-request-timeout-delayed-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-delayed-body.js) -- [parallel/test-http-server-request-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-delayed-headers.js) -- [parallel/test-http-server-request-timeout-interrupted-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-interrupted-body.js) -- [parallel/test-http-server-request-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-interrupted-headers.js) -- [parallel/test-http-server-request-timeout-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-keepalive.js) -- [parallel/test-http-server-request-timeout-pipelining.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-pipelining.js) -- [parallel/test-http-server-request-timeout-upgrade.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-upgrade.js) -- [parallel/test-http-server-request-timeouts-mixed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeouts-mixed.js) -- [parallel/test-http-server-response-standalone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-response-standalone.js) -- [parallel/test-http-server-stale-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-stale-close.js) -- [parallel/test-http-server-timeouts-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-timeouts-validation.js) -- [parallel/test-http-server-unconsume-consume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-unconsume-consume.js) -- [parallel/test-http-server-unconsume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-unconsume.js) -- [parallel/test-http-server-write-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-write-after-end.js) -- [parallel/test-http-server-write-end-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-write-end-after-end.js) -- [parallel/test-http-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server.js) -- [parallel/test-http-set-cookies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-cookies.js) -- [parallel/test-http-set-header-chain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-header-chain.js) -- [parallel/test-http-set-max-idle-http-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-max-idle-http-parser.js) -- [parallel/test-http-set-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-timeout-server.js) -- [parallel/test-http-set-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-timeout.js) -- [parallel/test-http-set-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-trailers.js) -- [parallel/test-http-should-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-should-keep-alive.js) -- [parallel/test-http-socket-encoding-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-socket-encoding-error.js) -- [parallel/test-http-socket-error-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-socket-error-listeners.js) -- [parallel/test-http-status-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-status-code.js) -- [parallel/test-http-status-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-status-message.js) -- [parallel/test-http-status-reason-invalid-chars.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-status-reason-invalid-chars.js) -- [parallel/test-http-sync-write-error-during-continue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-sync-write-error-during-continue.js) -- [parallel/test-http-timeout-client-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-timeout-client-warning.js) -- [parallel/test-http-timeout-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-timeout-overflow.js) -- [parallel/test-http-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-timeout.js) -- [parallel/test-http-transfer-encoding-repeated-chunked.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-transfer-encoding-repeated-chunked.js) -- [parallel/test-http-transfer-encoding-smuggling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-transfer-encoding-smuggling.js) -- [parallel/test-http-uncaught-from-request-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-uncaught-from-request-callback.js) -- [parallel/test-http-unix-socket-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-unix-socket-keep-alive.js) -- [parallel/test-http-unix-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-unix-socket.js) -- [parallel/test-http-upgrade-advertise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-advertise.js) -- [parallel/test-http-upgrade-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-agent.js) -- [parallel/test-http-upgrade-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-binary.js) -- [parallel/test-http-upgrade-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-client.js) -- [parallel/test-http-upgrade-client2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-client2.js) -- [parallel/test-http-upgrade-reconsume-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-reconsume-stream.js) -- [parallel/test-http-upgrade-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-server.js) -- [parallel/test-http-upgrade-server2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-server2.js) -- [parallel/test-http-url.parse-auth-with-header-in-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-auth-with-header-in-request.js) -- [parallel/test-http-url.parse-auth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-auth.js) -- [parallel/test-http-url.parse-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-basic.js) -- [parallel/test-http-url.parse-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-path.js) -- [parallel/test-http-url.parse-post.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-post.js) -- [parallel/test-http-url.parse-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-search.js) -- [parallel/test-http-wget.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-wget.js) -- [parallel/test-http-writable-true-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-writable-true-after-close.js) -- [parallel/test-http-write-callbacks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-callbacks.js) -- [parallel/test-http-write-empty-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-empty-string.js) -- [parallel/test-http-write-head-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-head-2.js) -- [parallel/test-http-write-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-head.js) -- [parallel/test-http-zero-length-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-zero-length-write.js) -- [parallel/test-http-zerolengthbuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-zerolengthbuffer.js) -- [parallel/test-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http.js) -- [parallel/test-http2-altsvc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-altsvc.js) -- [parallel/test-http2-autoselect-protocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-autoselect-protocol.js) -- [parallel/test-http2-backpressure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-backpressure.js) -- [parallel/test-http2-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-binding.js) -- [parallel/test-http2-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-buffersize.js) -- [parallel/test-http2-byteswritten-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-byteswritten-server.js) -- [parallel/test-http2-cancel-while-client-reading.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-cancel-while-client-reading.js) -- [parallel/test-http2-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-capture-rejection.js) -- [parallel/test-http2-clean-output.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-clean-output.js) -- [parallel/test-http2-client-connection-tunnelling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-connection-tunnelling.js) -- [parallel/test-http2-client-data-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-data-end.js) -- [parallel/test-http2-client-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-destroy.js) -- [parallel/test-http2-client-http1-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-http1-server.js) -- [parallel/test-http2-client-jsstream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-jsstream-destroy.js) -- [parallel/test-http2-client-onconnect-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-onconnect-errors.js) -- [parallel/test-http2-client-port-80.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-port-80.js) -- [parallel/test-http2-client-priority-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-priority-before-connect.js) -- [parallel/test-http2-client-promisify-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-promisify-connect.js) -- [parallel/test-http2-client-request-listeners-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-request-listeners-warning.js) -- [parallel/test-http2-client-request-options-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-request-options-errors.js) -- [parallel/test-http2-client-rststream-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-rststream-before-connect.js) -- [parallel/test-http2-client-set-priority.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-set-priority.js) -- [parallel/test-http2-client-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-setLocalWindowSize.js) -- [parallel/test-http2-client-setNextStreamID-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-setNextStreamID-errors.js) -- [parallel/test-http2-client-settings-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-settings-before-connect.js) -- [parallel/test-http2-client-shutdown-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-shutdown-before-connect.js) -- [parallel/test-http2-client-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-socket-destroy.js) -- [parallel/test-http2-client-stream-destroy-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-stream-destroy-before-connect.js) -- [parallel/test-http2-client-unescaped-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-unescaped-path.js) -- [parallel/test-http2-client-upload-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-upload-reject.js) -- [parallel/test-http2-client-upload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-upload.js) -- [parallel/test-http2-client-write-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-write-before-connect.js) -- [parallel/test-http2-client-write-empty-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-write-empty-string.js) -- [parallel/test-http2-close-while-writing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-close-while-writing.js) -- [parallel/test-http2-compat-aborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-aborted.js) -- [parallel/test-http2-compat-client-upload-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-client-upload-reject.js) -- [parallel/test-http2-compat-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-errors.js) -- [parallel/test-http2-compat-expect-continue-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-expect-continue-check.js) -- [parallel/test-http2-compat-expect-continue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-expect-continue.js) -- [parallel/test-http2-compat-expect-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-expect-handling.js) -- [parallel/test-http2-compat-method-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-method-connect.js) -- [parallel/test-http2-compat-serverrequest-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-end.js) -- [parallel/test-http2-compat-serverrequest-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-headers.js) -- [parallel/test-http2-compat-serverrequest-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-host.js) -- [parallel/test-http2-compat-serverrequest-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-pause.js) -- [parallel/test-http2-compat-serverrequest-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-pipe.js) -- [parallel/test-http2-compat-serverrequest-settimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-settimeout.js) -- [parallel/test-http2-compat-serverrequest-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-trailers.js) -- [parallel/test-http2-compat-serverrequest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest.js) -- [parallel/test-http2-compat-serverresponse-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-close.js) -- [parallel/test-http2-compat-serverresponse-createpushresponse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-createpushresponse.js) -- [parallel/test-http2-compat-serverresponse-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-destroy.js) -- [parallel/test-http2-compat-serverresponse-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-drain.js) -- [parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js) -- [parallel/test-http2-compat-serverresponse-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-end.js) -- [parallel/test-http2-compat-serverresponse-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-finished.js) -- [parallel/test-http2-compat-serverresponse-flushheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-flushheaders.js) -- [parallel/test-http2-compat-serverresponse-headers-after-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js) -- [parallel/test-http2-compat-serverresponse-headers-send-date.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-headers-send-date.js) -- [parallel/test-http2-compat-serverresponse-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-headers.js) -- [parallel/test-http2-compat-serverresponse-settimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-settimeout.js) -- [parallel/test-http2-compat-serverresponse-statuscode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statuscode.js) -- [parallel/test-http2-compat-serverresponse-statusmessage-property-set.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property-set.js) -- [parallel/test-http2-compat-serverresponse-statusmessage-property.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property.js) -- [parallel/test-http2-compat-serverresponse-statusmessage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statusmessage.js) -- [parallel/test-http2-compat-serverresponse-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-trailers.js) -- [parallel/test-http2-compat-serverresponse-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-write.js) -- [parallel/test-http2-compat-serverresponse-writehead-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-writehead-array.js) -- [parallel/test-http2-compat-serverresponse-writehead.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-writehead.js) -- [parallel/test-http2-compat-serverresponse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse.js) -- [parallel/test-http2-compat-short-stream-client-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-short-stream-client-server.js) -- [parallel/test-http2-compat-socket-destroy-delayed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-socket-destroy-delayed.js) -- [parallel/test-http2-compat-socket-set.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-socket-set.js) -- [parallel/test-http2-compat-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-socket.js) -- [parallel/test-http2-compat-write-early-hints-invalid-argument-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-type.js) -- [parallel/test-http2-compat-write-early-hints-invalid-argument-value.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-value.js) -- [parallel/test-http2-compat-write-early-hints.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-early-hints.js) -- [parallel/test-http2-compat-write-head-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-head-destroyed.js) -- [parallel/test-http2-connect-method-extended-cant-turn-off.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-method-extended-cant-turn-off.js) -- [parallel/test-http2-connect-method-extended.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-method-extended.js) -- [parallel/test-http2-connect-method.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-method.js) -- [parallel/test-http2-connect-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-options.js) -- [parallel/test-http2-connect-tls-with-delay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-tls-with-delay.js) -- [parallel/test-http2-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect.js) -- [parallel/test-http2-cookies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-cookies.js) -- [parallel/test-http2-create-client-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-create-client-connect.js) -- [parallel/test-http2-create-client-secure-session.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-create-client-secure-session.js) -- [parallel/test-http2-create-client-session.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-create-client-session.js) -- [parallel/test-http2-createsecureserver-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-createsecureserver-options.js) -- [parallel/test-http2-createserver-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-createserver-options.js) -- [parallel/test-http2-createwritereq.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-createwritereq.js) -- [parallel/test-http2-date-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-date-header.js) -- [parallel/test-http2-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-debug.js) -- [parallel/test-http2-destroy-after-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-destroy-after-write.js) -- [parallel/test-http2-dont-lose-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-dont-lose-data.js) -- [parallel/test-http2-dont-override.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-dont-override.js) -- [parallel/test-http2-empty-frame-without-eof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-empty-frame-without-eof.js) -- [parallel/test-http2-endafterheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-endafterheaders.js) -- [parallel/test-http2-error-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-error-order.js) -- [parallel/test-http2-exceeds-server-trailer-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-exceeds-server-trailer-size.js) -- [parallel/test-http2-forget-closed-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-forget-closed-streams.js) -- [parallel/test-http2-generic-streams-sendfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-generic-streams-sendfile.js) -- [parallel/test-http2-generic-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-generic-streams.js) -- [parallel/test-http2-getpackedsettings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-getpackedsettings.js) -- [parallel/test-http2-goaway-delayed-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-goaway-delayed-request.js) -- [parallel/test-http2-goaway-opaquedata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-goaway-opaquedata.js) -- [parallel/test-http2-head-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-head-request.js) -- [parallel/test-http2-https-fallback-http-server-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-https-fallback-http-server-options.js) -- [parallel/test-http2-https-fallback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-https-fallback.js) -- [parallel/test-http2-info-headers-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-info-headers-errors.js) -- [parallel/test-http2-info-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-info-headers.js) -- [parallel/test-http2-invalidargtypes-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-invalidargtypes-errors.js) -- [parallel/test-http2-invalidheaderfield.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-invalidheaderfield.js) -- [parallel/test-http2-invalidheaderfields-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-invalidheaderfields-client.js) -- [parallel/test-http2-large-write-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-write-close.js) -- [parallel/test-http2-large-write-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-write-destroy.js) -- [parallel/test-http2-large-write-multiple-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-write-multiple-requests.js) -- [parallel/test-http2-large-writes-session-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-writes-session-memory-leak.js) -- [parallel/test-http2-malformed-altsvc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-malformed-altsvc.js) -- [parallel/test-http2-many-writes-and-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-many-writes-and-destroy.js) -- [parallel/test-http2-max-concurrent-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-concurrent-streams.js) -- [parallel/test-http2-max-invalid-frames.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-invalid-frames.js) -- [parallel/test-http2-max-session-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-session-memory-leak.js) -- [parallel/test-http2-max-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-settings.js) -- [parallel/test-http2-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-methods.js) -- [parallel/test-http2-misbehaving-flow-control-paused.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misbehaving-flow-control-paused.js) -- [parallel/test-http2-misbehaving-flow-control.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misbehaving-flow-control.js) -- [parallel/test-http2-misbehaving-multiplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misbehaving-multiplex.js) -- [parallel/test-http2-misc-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misc-util.js) -- [parallel/test-http2-misused-pseudoheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misused-pseudoheaders.js) -- [parallel/test-http2-multi-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multi-content-length.js) -- [parallel/test-http2-multiheaders-raw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multiheaders-raw.js) -- [parallel/test-http2-multiheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multiheaders.js) -- [parallel/test-http2-multiplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multiplex.js) -- [parallel/test-http2-multistream-destroy-on-read-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multistream-destroy-on-read-tls.js) -- [parallel/test-http2-no-more-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-no-more-streams.js) -- [parallel/test-http2-no-wanttrailers-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-no-wanttrailers-listener.js) -- [parallel/test-http2-onping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-onping.js) -- [parallel/test-http2-options-max-headers-block-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-max-headers-block-length.js) -- [parallel/test-http2-options-max-headers-exceeds-nghttp2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-max-headers-exceeds-nghttp2.js) -- [parallel/test-http2-options-max-reserved-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-max-reserved-streams.js) -- [parallel/test-http2-options-server-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-server-request.js) -- [parallel/test-http2-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-server-response.js) -- [parallel/test-http2-origin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-origin.js) -- [parallel/test-http2-pack-end-stream-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-pack-end-stream-flag.js) -- [parallel/test-http2-padding-aligned.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-padding-aligned.js) -- [parallel/test-http2-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-perf_hooks.js) -- [parallel/test-http2-ping-settings-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-ping-settings-heapdump.js) -- [parallel/test-http2-ping-unsolicited-ack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-ping-unsolicited-ack.js) -- [parallel/test-http2-ping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-ping.js) -- [parallel/test-http2-pipe-named-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-pipe-named-pipe.js) -- [parallel/test-http2-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-pipe.js) -- [parallel/test-http2-priority-cycle-.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-priority-cycle-.js) -- [parallel/test-http2-priority-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-priority-event.js) -- [parallel/test-http2-propagate-session-destroy-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-propagate-session-destroy-code.js) -- [parallel/test-http2-removed-header-stays-removed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-removed-header-stays-removed.js) -- [parallel/test-http2-request-remove-connect-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-request-remove-connect-listener.js) -- [parallel/test-http2-request-response-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-request-response-proto.js) -- [parallel/test-http2-res-corked.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-res-corked.js) -- [parallel/test-http2-res-writable-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-res-writable-properties.js) -- [parallel/test-http2-reset-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-reset-flood.js) -- [parallel/test-http2-respond-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-errors.js) -- [parallel/test-http2-respond-file-204.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-204.js) -- [parallel/test-http2-respond-file-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-304.js) -- [parallel/test-http2-respond-file-404.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-404.js) -- [parallel/test-http2-respond-file-compat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-compat.js) -- [parallel/test-http2-respond-file-error-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-error-dir.js) -- [parallel/test-http2-respond-file-error-pipe-offset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-error-pipe-offset.js) -- [parallel/test-http2-respond-file-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-errors.js) -- [parallel/test-http2-respond-file-fd-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd-errors.js) -- [parallel/test-http2-respond-file-fd-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd-invalid.js) -- [parallel/test-http2-respond-file-fd-range.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd-range.js) -- [parallel/test-http2-respond-file-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd.js) -- [parallel/test-http2-respond-file-filehandle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-filehandle.js) -- [parallel/test-http2-respond-file-push.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-push.js) -- [parallel/test-http2-respond-file-range.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-range.js) -- [parallel/test-http2-respond-file-with-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-with-pipe.js) -- [parallel/test-http2-respond-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file.js) -- [parallel/test-http2-respond-nghttperrors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-nghttperrors.js) -- [parallel/test-http2-respond-no-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-no-data.js) -- [parallel/test-http2-respond-with-fd-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-with-fd-errors.js) -- [parallel/test-http2-respond-with-file-connection-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-with-file-connection-abort.js) -- [parallel/test-http2-response-splitting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-response-splitting.js) -- [parallel/test-http2-sensitive-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-sensitive-headers.js) -- [parallel/test-http2-sent-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-sent-headers.js) -- [parallel/test-http2-serve-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-serve-file.js) -- [parallel/test-http2-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-async-dispose.js) -- [parallel/test-http2-server-close-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-close-callback.js) -- [parallel/test-http2-server-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-errors.js) -- [parallel/test-http2-server-http1-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-http1-client.js) -- [parallel/test-http2-server-push-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-disabled.js) -- [parallel/test-http2-server-push-stream-errors-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream-errors-args.js) -- [parallel/test-http2-server-push-stream-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream-errors.js) -- [parallel/test-http2-server-push-stream-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream-head.js) -- [parallel/test-http2-server-push-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream.js) -- [parallel/test-http2-server-rst-before-respond.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-rst-before-respond.js) -- [parallel/test-http2-server-rst-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-rst-stream.js) -- [parallel/test-http2-server-session-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-session-destroy.js) -- [parallel/test-http2-server-sessionerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-sessionerror.js) -- [parallel/test-http2-server-set-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-set-header.js) -- [parallel/test-http2-server-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-setLocalWindowSize.js) -- [parallel/test-http2-server-settimeout-no-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-settimeout-no-callback.js) -- [parallel/test-http2-server-shutdown-before-respond.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-shutdown-before-respond.js) -- [parallel/test-http2-server-shutdown-options-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-shutdown-options-errors.js) -- [parallel/test-http2-server-shutdown-redundant.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-shutdown-redundant.js) -- [parallel/test-http2-server-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-socket-destroy.js) -- [parallel/test-http2-server-startup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-startup.js) -- [parallel/test-http2-server-stream-session-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-stream-session-destroy.js) -- [parallel/test-http2-server-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-timeout.js) -- [parallel/test-http2-server-unknown-protocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-unknown-protocol.js) -- [parallel/test-http2-session-gc-while-write-scheduled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-gc-while-write-scheduled.js) -- [parallel/test-http2-session-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-settings.js) -- [parallel/test-http2-session-stream-state.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-stream-state.js) -- [parallel/test-http2-session-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-timeout.js) -- [parallel/test-http2-session-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-unref.js) -- [parallel/test-http2-settings-unsolicited-ack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-settings-unsolicited-ack.js) -- [parallel/test-http2-short-stream-client-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-short-stream-client-server.js) -- [parallel/test-http2-single-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-single-headers.js) -- [parallel/test-http2-socket-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-close.js) -- [parallel/test-http2-socket-proxy-handler-for-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-proxy-handler-for-has.js) -- [parallel/test-http2-socket-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-proxy.js) -- [parallel/test-http2-status-code-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-status-code-invalid.js) -- [parallel/test-http2-status-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-status-code.js) -- [parallel/test-http2-stream-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-stream-client.js) -- [parallel/test-http2-stream-destroy-event-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-stream-destroy-event-order.js) -- [parallel/test-http2-stream-removelisteners-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-stream-removelisteners-after-close.js) -- [parallel/test-http2-timeouts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-timeouts.js) -- [parallel/test-http2-tls-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-tls-disconnect.js) -- [parallel/test-http2-too-large-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-large-headers.js) -- [parallel/test-http2-too-many-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-headers.js) -- [parallel/test-http2-too-many-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-settings.js) -- [parallel/test-http2-too-many-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-streams.js) -- [parallel/test-http2-trailers-after-session-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-trailers-after-session-close.js) -- [parallel/test-http2-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-trailers.js) -- [parallel/test-http2-unbound-socket-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-unbound-socket-proxy.js) -- [parallel/test-http2-update-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-update-settings.js) -- [parallel/test-http2-util-assert-valid-pseudoheader.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-assert-valid-pseudoheader.js) -- [parallel/test-http2-util-asserts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-asserts.js) -- [parallel/test-http2-util-headers-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-headers-list.js) -- [parallel/test-http2-util-nghttp2error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-nghttp2error.js) -- [parallel/test-http2-util-update-options-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-update-options-buffer.js) -- [parallel/test-http2-window-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-window-size.js) -- [parallel/test-http2-write-callbacks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-write-callbacks.js) -- [parallel/test-http2-write-empty-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-write-empty-string.js) -- [parallel/test-http2-write-finishes-after-stream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-write-finishes-after-stream-destroy.js) -- [parallel/test-http2-zero-length-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-zero-length-header.js) -- [parallel/test-http2-zero-length-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-zero-length-write.js) -- [parallel/test-https-abortcontroller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-abortcontroller.js) -- [parallel/test-https-agent-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-abort-controller.js) -- [parallel/test-https-agent-additional-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-additional-options.js) -- [parallel/test-https-agent-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-constructor.js) -- [parallel/test-https-agent-create-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-create-connection.js) -- [parallel/test-https-agent-disable-session-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-disable-session-reuse.js) -- [parallel/test-https-agent-getname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-getname.js) -- [parallel/test-https-agent-keylog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-keylog.js) -- [parallel/test-https-agent-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-servername.js) -- [parallel/test-https-agent-session-eviction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-session-eviction.js) -- [parallel/test-https-agent-session-injection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-session-injection.js) -- [parallel/test-https-agent-session-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-session-reuse.js) -- [parallel/test-https-agent-sni.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-sni.js) -- [parallel/test-https-agent-sockets-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-sockets-leak.js) -- [parallel/test-https-agent-unref-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-unref-socket.js) -- [parallel/test-https-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent.js) -- [parallel/test-https-argument-of-creating.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-argument-of-creating.js) -- [parallel/test-https-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-autoselectfamily.js) -- [parallel/test-https-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-byteswritten.js) -- [parallel/test-https-client-checkServerIdentity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-checkServerIdentity.js) -- [parallel/test-https-client-get-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-get-url.js) -- [parallel/test-https-client-override-global-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-override-global-agent.js) -- [parallel/test-https-client-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-reject.js) -- [parallel/test-https-client-renegotiation-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-renegotiation-limit.js) -- [parallel/test-https-client-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-resume.js) -- [parallel/test-https-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-close.js) -- [parallel/test-https-connect-address-family.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-connect-address-family.js) -- [parallel/test-https-connecting-to-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-connecting-to-http.js) -- [parallel/test-https-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-drain.js) -- [parallel/test-https-eof-for-eom.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-eof-for-eom.js) -- [parallel/test-https-foafssl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-foafssl.js) -- [parallel/test-https-host-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-host-headers.js) -- [parallel/test-https-hwm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-hwm.js) -- [parallel/test-https-insecure-parse-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-insecure-parse-per-stream.js) -- [parallel/test-https-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-keep-alive-drop-requests.js) -- [parallel/test-https-localaddress-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-localaddress-bind-error.js) -- [parallel/test-https-localaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-localaddress.js) -- [parallel/test-https-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-max-header-size-per-stream.js) -- [parallel/test-https-max-headers-count.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-max-headers-count.js) -- [parallel/test-https-options-boolean-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-options-boolean-check.js) -- [parallel/test-https-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-pfx.js) -- [parallel/test-https-request-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-request-arguments.js) -- [parallel/test-https-resume-after-renew.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-resume-after-renew.js) -- [parallel/test-https-selfsigned-no-keycertsign-no-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-selfsigned-no-keycertsign-no-crash.js) -- [parallel/test-https-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-async-dispose.js) -- [parallel/test-https-server-close-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-all.js) -- [parallel/test-https-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-destroy-timeout.js) -- [parallel/test-https-server-close-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-idle.js) -- [parallel/test-https-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-connections-checking-leak.js) -- [parallel/test-https-server-headers-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-headers-timeout.js) -- [parallel/test-https-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-options-incoming-message.js) -- [parallel/test-https-server-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-options-server-response.js) -- [parallel/test-https-server-request-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-request-timeout.js) -- [parallel/test-https-set-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-set-timeout-server.js) -- [parallel/test-https-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-simple.js) -- [parallel/test-https-socket-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-socket-options.js) -- [parallel/test-https-strict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-strict.js) -- [parallel/test-https-timeout-server-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-timeout-server-2.js) -- [parallel/test-https-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-timeout-server.js) -- [parallel/test-https-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-timeout.js) -- [parallel/test-https-truncate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-truncate.js) -- [parallel/test-https-unix-socket-self-signed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-unix-socket-self-signed.js) -- [parallel/test-icu-data-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-data-dir.js) -- [parallel/test-icu-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-env.js) -- [parallel/test-icu-minimum-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-minimum-version.js) -- [parallel/test-icu-punycode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-punycode.js) -- [parallel/test-icu-stringwidth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-stringwidth.js) -- [parallel/test-inspect-address-in-use.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-address-in-use.js) -- [parallel/test-inspect-async-hook-setup-at-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-async-hook-setup-at-inspect.js) -- [parallel/test-inspect-publish-uid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-publish-uid.js) -- [parallel/test-inspect-support-for-node_options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-support-for-node_options.js) -- [parallel/test-inspector-already-activated-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-already-activated-cli.js) -- [parallel/test-inspector-async-call-stack-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-call-stack-abort.js) -- [parallel/test-inspector-async-call-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-call-stack.js) -- [parallel/test-inspector-async-hook-after-done.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-hook-after-done.js) -- [parallel/test-inspector-async-hook-setup-at-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js) -- [parallel/test-inspector-async-hook-setup-at-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-hook-setup-at-signal.js) -- [parallel/test-inspector-async-stack-traces-promise-then.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-stack-traces-promise-then.js) -- [parallel/test-inspector-async-stack-traces-set-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-stack-traces-set-interval.js) -- [parallel/test-inspector-bindings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-bindings.js) -- [parallel/test-inspector-break-e.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-break-e.js) -- [parallel/test-inspector-break-when-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-break-when-eval.js) -- [parallel/test-inspector-close-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-close-worker.js) -- [parallel/test-inspector-connect-main-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-connect-main-thread.js) -- [parallel/test-inspector-connect-to-main-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-connect-to-main-thread.js) -- [parallel/test-inspector-console-top-frame.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-console-top-frame.js) -- [parallel/test-inspector-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-console.js) -- [parallel/test-inspector-contexts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-contexts.js) -- [parallel/test-inspector-debug-brk-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-debug-brk-flag.js) -- [parallel/test-inspector-debug-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-debug-end.js) -- [parallel/test-inspector-enabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-enabled.js) -- [parallel/test-inspector-esm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-esm.js) -- [parallel/test-inspector-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-exception.js) -- [parallel/test-inspector-has-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-has-idle.js) -- [parallel/test-inspector-has-inspector-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-has-inspector-false.js) -- [parallel/test-inspector-heap-allocation-tracker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-heap-allocation-tracker.js) -- [parallel/test-inspector-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-heapdump.js) -- [parallel/test-inspector-inspect-brk-node.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-inspect-brk-node.js) -- [parallel/test-inspector-invalid-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-invalid-args.js) -- [parallel/test-inspector-ip-detection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-ip-detection.js) -- [parallel/test-inspector-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-module.js) -- [parallel/test-inspector-multisession-js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-multisession-js.js) -- [parallel/test-inspector-multisession-ws.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-multisession-ws.js) -- [parallel/test-inspector-not-blocked-on-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-not-blocked-on-idle.js) -- [parallel/test-inspector-open-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-open-coverage.js) -- [parallel/test-inspector-open-port-integer-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-open-port-integer-overflow.js) -- [parallel/test-inspector-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-open.js) -- [parallel/test-inspector-overwrite-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-overwrite-config.js) -- [parallel/test-inspector-port-zero-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-port-zero-cluster.js) -- [parallel/test-inspector-port-zero.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-port-zero.js) -- [parallel/test-inspector-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-promises.js) -- [parallel/test-inspector-reported-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-reported-host.js) -- [parallel/test-inspector-resource-name-to-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-resource-name-to-url.js) -- [parallel/test-inspector-runtime-evaluate-with-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-runtime-evaluate-with-timeout.js) -- [parallel/test-inspector-scriptparsed-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-scriptparsed-context.js) -- [parallel/test-inspector-stop-profile-after-done.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-stop-profile-after-done.js) -- [parallel/test-inspector-stops-no-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-stops-no-file.js) -- [parallel/test-inspector-stress-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-stress-http.js) -- [parallel/test-inspector-tracing-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-tracing-domain.js) -- [parallel/test-inspector-vm-global-accessors-getter-sideeffect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-vm-global-accessors-getter-sideeffect.js) -- [parallel/test-inspector-vm-global-accessors-sideeffects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-vm-global-accessors-sideeffects.js) -- [parallel/test-inspector-wait-for-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-wait-for-connection.js) -- [parallel/test-inspector-waiting-for-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-waiting-for-disconnect.js) -- [parallel/test-inspector-workers-flat-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-workers-flat-list.js) -- [parallel/test-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector.js) -- [parallel/test-instanceof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-instanceof.js) -- [parallel/test-internal-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-assert.js) -- [parallel/test-internal-error-original-names.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-error-original-names.js) -- [parallel/test-internal-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-errors.js) -- [parallel/test-internal-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-fs-syncwritestream.js) -- [parallel/test-internal-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-fs.js) -- [parallel/test-internal-iterable-weak-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-iterable-weak-map.js) -- [parallel/test-internal-module-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-module-require.js) -- [parallel/test-internal-module-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-module-wrap.js) -- [parallel/test-internal-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-modules.js) -- [parallel/test-internal-process-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-process-binding.js) -- [parallel/test-internal-socket-list-receive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-socket-list-receive.js) -- [parallel/test-internal-socket-list-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-socket-list-send.js) -- [parallel/test-internal-util-assertCrypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-assertCrypto.js) -- [parallel/test-internal-util-classwrapper.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-classwrapper.js) -- [parallel/test-internal-util-decorate-error-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-decorate-error-stack.js) -- [parallel/test-internal-util-helpers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-helpers.js) -- [parallel/test-internal-util-normalizeencoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-normalizeencoding.js) -- [parallel/test-internal-util-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-objects.js) -- [parallel/test-internal-util-weakreference.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-weakreference.js) -- [parallel/test-internal-validators-validateoneof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-validators-validateoneof.js) -- [parallel/test-internal-validators-validateport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-validators-validateport.js) -- [parallel/test-internal-webidl-converttoint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-webidl-converttoint.js) -- [parallel/test-intl-v8BreakIterator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-intl-v8BreakIterator.js) -- [parallel/test-intl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-intl.js) -- [parallel/test-js-stream-call-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-js-stream-call-properties.js) -- [parallel/test-kill-segfault-freebsd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-kill-segfault-freebsd.js) -- [parallel/test-listen-fd-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-cluster.js) -- [parallel/test-listen-fd-detached-inherit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-detached-inherit.js) -- [parallel/test-listen-fd-detached.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-detached.js) -- [parallel/test-listen-fd-ebadf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-ebadf.js) -- [parallel/test-listen-fd-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-server.js) -- [parallel/test-macos-app-sandbox.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-macos-app-sandbox.js) -- [parallel/test-math-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-math-random.js) -- [parallel/test-memory-usage-emfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-memory-usage-emfile.js) -- [parallel/test-memory-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-memory-usage.js) -- [parallel/test-messagechannel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messagechannel.js) -- [parallel/test-messageevent-brandcheck.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messageevent-brandcheck.js) -- [parallel/test-messageport-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messageport-hasref.js) -- [parallel/test-messaging-maketransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messaging-maketransferable.js) -- [parallel/test-microtask-queue-integration.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-microtask-queue-integration.js) -- [parallel/test-microtask-queue-run-immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-microtask-queue-run-immediate.js) -- [parallel/test-microtask-queue-run.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-microtask-queue-run.js) -- [parallel/test-mime-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-mime-api.js) -- [parallel/test-mime-whatwg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-mime-whatwg.js) -- [parallel/test-module-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-binding.js) -- [parallel/test-module-builtin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-builtin.js) -- [parallel/test-module-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-cache.js) -- [parallel/test-module-children.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-children.js) -- [parallel/test-module-circular-dependency-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-circular-dependency-warning.js) -- [parallel/test-module-circular-symlinks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-circular-symlinks.js) -- [parallel/test-module-create-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-create-require.js) -- [parallel/test-module-globalpaths-nodepath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-globalpaths-nodepath.js) -- [parallel/test-module-isBuiltin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-isBuiltin.js) -- [parallel/test-module-loading-deprecated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-loading-deprecated.js) -- [parallel/test-module-loading-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-loading-error.js) -- [parallel/test-module-loading-globalpaths.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-loading-globalpaths.js) -- [parallel/test-module-main-extension-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-main-extension-lookup.js) -- [parallel/test-module-main-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-main-fail.js) -- [parallel/test-module-main-preserve-symlinks-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-main-preserve-symlinks-fail.js) -- [parallel/test-module-multi-extensions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-multi-extensions.js) -- [parallel/test-module-nodemodulepaths.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-nodemodulepaths.js) -- [parallel/test-module-parent-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-parent-deprecation.js) -- [parallel/test-module-parent-setter-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-parent-setter-deprecation.js) -- [parallel/test-module-prototype-mutation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-prototype-mutation.js) -- [parallel/test-module-readonly.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-readonly.js) -- [parallel/test-module-relative-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-relative-lookup.js) -- [parallel/test-module-run-main-monkey-patch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-run-main-monkey-patch.js) -- [parallel/test-module-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-stat.js) -- [parallel/test-module-symlinked-peer-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-symlinked-peer-modules.js) -- [parallel/test-module-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-version.js) -- [parallel/test-module-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-wrap.js) -- [parallel/test-module-wrapper.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-wrapper.js) -- [parallel/test-net-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-after-close.js) -- [parallel/test-net-allow-half-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-allow-half-open.js) -- [parallel/test-net-autoselectfamily-commandline-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-commandline-option.js) -- [parallel/test-net-autoselectfamily-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-default.js) -- [parallel/test-net-autoselectfamily-ipv4first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-ipv4first.js) -- [parallel/test-net-better-error-messages-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-better-error-messages-listen.js) -- [parallel/test-net-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-binary.js) -- [parallel/test-net-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bind-twice.js) -- [parallel/test-net-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-buffersize.js) -- [parallel/test-net-bytes-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bytes-read.js) -- [parallel/test-net-bytes-stats.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bytes-stats.js) -- [parallel/test-net-bytes-written-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bytes-written-large.js) -- [parallel/test-net-can-reset-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-can-reset-timeout.js) -- [parallel/test-net-child-process-connect-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-child-process-connect-reset.js) -- [parallel/test-net-client-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-client-bind-twice.js) -- [parallel/test-net-connect-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-abort-controller.js) -- [parallel/test-net-connect-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-buffer.js) -- [parallel/test-net-connect-buffer2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-buffer2.js) -- [parallel/test-net-connect-call-socket-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-call-socket-connect.js) -- [parallel/test-net-connect-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-keepalive.js) -- [parallel/test-net-connect-memleak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-memleak.js) -- [parallel/test-net-connect-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-nodelay.js) -- [parallel/test-net-connect-options-allowhalfopen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-allowhalfopen.js) -- [parallel/test-net-connect-options-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-fd.js) -- [parallel/test-net-connect-options-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-invalid.js) -- [parallel/test-net-connect-options-ipv6.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-ipv6.js) -- [parallel/test-net-connect-options-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-path.js) -- [parallel/test-net-connect-options-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-port.js) -- [parallel/test-net-connect-paused-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-paused-connection.js) -- [parallel/test-net-connect-reset-after-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset-after-destroy.js) -- [parallel/test-net-connect-reset-before-connected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset-before-connected.js) -- [parallel/test-net-connect-reset-until-connected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset-until-connected.js) -- [parallel/test-net-connect-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset.js) -- [parallel/test-net-deprecated-setsimultaneousaccepts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-deprecated-setsimultaneousaccepts.js) -- [parallel/test-net-dns-custom-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-dns-custom-lookup.js) -- [parallel/test-net-dns-lookup-skip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-dns-lookup-skip.js) -- [parallel/test-net-dns-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-dns-lookup.js) -- [parallel/test-net-eaddrinuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-eaddrinuse.js) -- [parallel/test-net-end-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-end-destroyed.js) -- [parallel/test-net-error-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-error-twice.js) -- [parallel/test-net-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-keepalive.js) -- [parallel/test-net-large-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-large-string.js) -- [parallel/test-net-listen-after-destroying-stdin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-after-destroying-stdin.js) -- [parallel/test-net-listen-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-error.js) -- [parallel/test-net-listen-exclusive-random-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-exclusive-random-ports.js) -- [parallel/test-net-listen-fd0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-fd0.js) -- [parallel/test-net-listen-ipv6only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-ipv6only.js) -- [parallel/test-net-local-address-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-local-address-port.js) -- [parallel/test-net-normalize-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-normalize-args.js) -- [parallel/test-net-onread-static-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-onread-static-buffer.js) -- [parallel/test-net-pause-resume-connecting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-pause-resume-connecting.js) -- [parallel/test-net-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-perf_hooks.js) -- [parallel/test-net-persistent-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-persistent-keepalive.js) -- [parallel/test-net-persistent-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-persistent-nodelay.js) -- [parallel/test-net-persistent-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-persistent-ref-unref.js) -- [parallel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-pingpong.js) -- [parallel/test-net-reconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-reconnect.js) -- [parallel/test-net-remote-address-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-remote-address-port.js) -- [parallel/test-net-remote-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-remote-address.js) -- [parallel/test-net-server-call-listen-multiple-times.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-call-listen-multiple-times.js) -- [parallel/test-net-server-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-capture-rejection.js) -- [parallel/test-net-server-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-close.js) -- [parallel/test-net-server-drop-connections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-drop-connections.js) -- [parallel/test-net-server-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-keepalive.js) -- [parallel/test-net-server-listen-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-listen-handle.js) -- [parallel/test-net-server-max-connections-close-makes-more-available.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-max-connections-close-makes-more-available.js) -- [parallel/test-net-server-max-connections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-max-connections.js) -- [parallel/test-net-server-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-nodelay.js) -- [parallel/test-net-server-pause-on-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-pause-on-connect.js) -- [parallel/test-net-server-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-reset.js) -- [parallel/test-net-server-simultaneous-accepts-produce-warning-once.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-simultaneous-accepts-produce-warning-once.js) -- [parallel/test-net-server-try-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-try-ports.js) -- [parallel/test-net-settimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-settimeout.js) -- [parallel/test-net-socket-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-byteswritten.js) -- [parallel/test-net-socket-close-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-close-after-end.js) -- [parallel/test-net-socket-connect-invalid-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js) -- [parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js) -- [parallel/test-net-socket-connect-without-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connect-without-cb.js) -- [parallel/test-net-socket-connecting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connecting.js) -- [parallel/test-net-socket-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-constructor.js) -- [parallel/test-net-socket-destroy-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-destroy-send.js) -- [parallel/test-net-socket-end-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-end-before-connect.js) -- [parallel/test-net-socket-end-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-end-callback.js) -- [parallel/test-net-socket-local-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-local-address.js) -- [parallel/test-net-socket-ready-without-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-ready-without-cb.js) -- [parallel/test-net-socket-reset-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-reset-send.js) -- [parallel/test-net-socket-reset-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-reset-twice.js) -- [parallel/test-net-socket-timeout-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-timeout-unref.js) -- [parallel/test-net-socket-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-timeout.js) -- [parallel/test-net-socket-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-write-after-close.js) -- [parallel/test-net-socket-write-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-write-error.js) -- [parallel/test-net-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-stream.js) -- [parallel/test-net-sync-cork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-sync-cork.js) -- [parallel/test-net-throttle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-throttle.js) -- [parallel/test-net-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-writable.js) -- [parallel/test-net-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-after-close.js) -- [parallel/test-net-write-after-end-nt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-after-end-nt.js) -- [parallel/test-net-write-cb-on-destroy-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-cb-on-destroy-before-connect.js) -- [parallel/test-net-write-connect-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-connect-write.js) -- [parallel/test-net-write-fully-async-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-fully-async-buffer.js) -- [parallel/test-net-write-fully-async-hex-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-fully-async-hex-string.js) -- [parallel/test-net-write-slow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-slow.js) -- [parallel/test-next-tick-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-next-tick-domain.js) -- [parallel/test-next-tick-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-next-tick-errors.js) -- [parallel/test-no-addons-resolution-condition.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-no-addons-resolution-condition.js) -- [parallel/test-no-node-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-no-node-snapshot.js) -- [parallel/test-npm-install.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-npm-install.js) -- [parallel/test-npm-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-npm-version.js) -- [parallel/test-openssl-ca-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-openssl-ca-options.js) -- [parallel/test-options-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-options-binding.js) -- [parallel/test-os-checked-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-checked-function.js) -- [parallel/test-os-eol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-eol.js) -- [parallel/test-os-homedir-no-envvar.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-homedir-no-envvar.js) -- [parallel/test-os-process-priority.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-process-priority.js) -- [parallel/test-os-userinfo-handles-getter-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-userinfo-handles-getter-errors.js) -- [parallel/test-path-posix-relative-on-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-path-posix-relative-on-windows.js) -- [parallel/test-pending-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pending-deprecation.js) -- [parallel/test-perf-gc-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-gc-crash.js) -- [parallel/test-perf-hooks-histogram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-histogram.js) -- [parallel/test-perf-hooks-resourcetiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-resourcetiming.js) -- [parallel/test-perf-hooks-usertiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-usertiming.js) -- [parallel/test-perf-hooks-worker-timeorigin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-worker-timeorigin.js) -- [parallel/test-performance-eventlooputil.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-eventlooputil.js) -- [parallel/test-performance-function-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-function-async.js) -- [parallel/test-performance-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-function.js) -- [parallel/test-performance-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-gc.js) -- [parallel/test-performance-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-global.js) -- [parallel/test-performance-measure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-measure.js) -- [parallel/test-performance-nodetiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-nodetiming.js) -- [parallel/test-performance-resourcetimingbufferfull.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-resourcetimingbufferfull.js) -- [parallel/test-performance-resourcetimingbuffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-resourcetimingbuffersize.js) -- [parallel/test-performanceobserver-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performanceobserver-gc.js) -- [parallel/test-performanceobserver.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performanceobserver.js) -- [parallel/test-permission-allow-child-process-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-allow-child-process-cli.js) -- [parallel/test-permission-allow-worker-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-allow-worker-cli.js) -- [parallel/test-permission-child-process-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-child-process-cli.js) -- [parallel/test-permission-experimental.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-experimental.js) -- [parallel/test-permission-fs-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-read.js) -- [parallel/test-permission-fs-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-relative-path.js) -- [parallel/test-permission-fs-supported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-supported.js) -- [parallel/test-permission-fs-symlink-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink-relative.js) -- [parallel/test-permission-fs-symlink-target-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink-target-write.js) -- [parallel/test-permission-fs-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink.js) -- [parallel/test-permission-fs-traversal-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-traversal-path.js) -- [parallel/test-permission-fs-wildcard.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-wildcard.js) -- [parallel/test-permission-fs-windows-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-windows-path.js) -- [parallel/test-permission-fs-write-report.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write-report.js) -- [parallel/test-permission-fs-write-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write-v8.js) -- [parallel/test-permission-fs-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write.js) -- [parallel/test-permission-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-has.js) -- [parallel/test-permission-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-inspector.js) -- [parallel/test-permission-processbinding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-processbinding.js) -- [parallel/test-permission-warning-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-warning-flags.js) -- [parallel/test-permission-worker-threads-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-worker-threads-cli.js) -- [parallel/test-pipe-abstract-socket-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-abstract-socket-http.js) -- [parallel/test-pipe-abstract-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-abstract-socket.js) -- [parallel/test-pipe-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-address.js) -- [parallel/test-pipe-file-to-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-file-to-http.js) -- [parallel/test-pipe-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-head.js) -- [parallel/test-pipe-outgoing-message-data-emitted-after-ended.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-outgoing-message-data-emitted-after-ended.js) -- [parallel/test-pipe-return-val.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-return-val.js) -- [parallel/test-pipe-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-stream.js) -- [parallel/test-pipe-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-unref.js) -- [parallel/test-pipe-writev.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-writev.js) -- [parallel/test-policy-crypto-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-crypto-default-encoding.js) -- [parallel/test-policy-crypto-hash-tampering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-crypto-hash-tampering.js) -- [parallel/test-policy-dependencies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-dependencies.js) -- [parallel/test-policy-dependency-conditions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-dependency-conditions.js) -- [parallel/test-policy-integrity-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-integrity-flag.js) -- [parallel/test-policy-manifest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-manifest.js) -- [parallel/test-policy-parse-integrity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-parse-integrity.js) -- [parallel/test-policy-process-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-process-binding.js) -- [parallel/test-policy-scopes-dependencies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-scopes-dependencies.js) -- [parallel/test-policy-scopes-integrity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-scopes-integrity.js) -- [parallel/test-policy-scopes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-scopes.js) -- [parallel/test-preload-print-process-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload-print-process-argv.js) -- [parallel/test-preload-self-referential.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload-self-referential.js) -- [parallel/test-preload-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload-worker.js) -- [parallel/test-preload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload.js) -- [parallel/test-primordials-apply.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-primordials-apply.js) -- [parallel/test-primordials-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-primordials-promise.js) -- [parallel/test-primordials-regexp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-primordials-regexp.js) -- [parallel/test-priority-queue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-priority-queue.js) -- [parallel/test-process-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-abort.js) -- [parallel/test-process-argv-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-argv-0.js) -- [parallel/test-process-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-assert.js) -- [parallel/test-process-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-beforeexit-throw-exit.js) -- [parallel/test-process-binding-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-binding-util.js) -- [parallel/test-process-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-binding.js) -- [parallel/test-process-chdir-errormessage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-chdir-errormessage.js) -- [parallel/test-process-chdir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-chdir.js) -- [parallel/test-process-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-config.js) -- [parallel/test-process-constants-noatime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-constants-noatime.js) -- [parallel/test-process-constrained-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-constrained-memory.js) -- [parallel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-cpuUsage.js) -- [parallel/test-process-dlopen-error-message-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-dlopen-error-message-crash.js) -- [parallel/test-process-dlopen-undefined-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-dlopen-undefined-exports.js) -- [parallel/test-process-domain-segfault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-domain-segfault.js) -- [parallel/test-process-emit-warning-from-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-emit-warning-from-native.js) -- [parallel/test-process-emit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-emit.js) -- [parallel/test-process-emitwarning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-emitwarning.js) -- [parallel/test-process-env-allowed-flags-are-documented.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-allowed-flags-are-documented.js) -- [parallel/test-process-env-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-delete.js) -- [parallel/test-process-env-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-deprecation.js) -- [parallel/test-process-env-ignore-getter-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-ignore-getter-setter.js) -- [parallel/test-process-env-sideeffects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-sideeffects.js) -- [parallel/test-process-env-symbols.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-symbols.js) -- [parallel/test-process-env-tz.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-tz.js) -- [parallel/test-process-env-windows-error-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-windows-error-reset.js) -- [parallel/test-process-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env.js) -- [parallel/test-process-euid-egid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-euid-egid.js) -- [parallel/test-process-exception-capture-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture-errors.js) -- [parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js) -- [parallel/test-process-exception-capture-should-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught.js) -- [parallel/test-process-exception-capture.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture.js) -- [parallel/test-process-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exec-argv.js) -- [parallel/test-process-execpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-execpath.js) -- [parallel/test-process-exit-code-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exit-code-validation.js) -- [parallel/test-process-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exit-code.js) -- [parallel/test-process-external-stdio-close-spawn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-external-stdio-close-spawn.js) -- [parallel/test-process-external-stdio-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-external-stdio-close.js) -- [parallel/test-process-features.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-features.js) -- [parallel/test-process-getactivehandles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactivehandles.js) -- [parallel/test-process-getactiverequests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiverequests.js) -- [parallel/test-process-getactiveresources-track-active-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-active-handles.js) -- [parallel/test-process-getactiveresources-track-active-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-active-requests.js) -- [parallel/test-process-getactiveresources-track-interval-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-interval-lifetime.js) -- [parallel/test-process-getactiveresources-track-multiple-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-multiple-timers.js) -- [parallel/test-process-getactiveresources-track-timer-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-timer-lifetime.js) -- [parallel/test-process-getactiveresources.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources.js) -- [parallel/test-process-getgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getgroups.js) -- [parallel/test-process-hrtime-bigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-hrtime-bigint.js) -- [parallel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-hrtime.js) -- [parallel/test-process-initgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-initgroups.js) -- [parallel/test-process-kill-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-kill-null.js) -- [parallel/test-process-next-tick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-next-tick.js) -- [parallel/test-process-no-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-no-deprecation.js) -- [parallel/test-process-ppid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-ppid.js) -- [parallel/test-process-prototype.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-prototype.js) -- [parallel/test-process-raw-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-raw-debug.js) -- [parallel/test-process-really-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-really-exit.js) -- [parallel/test-process-redirect-warnings-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-redirect-warnings-env.js) -- [parallel/test-process-redirect-warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-redirect-warnings.js) -- [parallel/test-process-release.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-release.js) -- [parallel/test-process-remove-all-signal-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-remove-all-signal-listeners.js) -- [parallel/test-process-setgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setgroups.js) -- [parallel/test-process-setsourcemapsenabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setsourcemapsenabled.js) -- [parallel/test-process-setuid-io-uring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setuid-io-uring.js) -- [parallel/test-process-title-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-title-cli.js) -- [parallel/test-process-uid-gid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-uid-gid.js) -- [parallel/test-process-umask-mask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-umask-mask.js) -- [parallel/test-process-umask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-umask.js) -- [parallel/test-process-uncaught-exception-monitor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-uncaught-exception-monitor.js) -- [parallel/test-process-versions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-versions.js) -- [parallel/test-process-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-warning.js) -- [parallel/test-promise-handled-rejection-no-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-handled-rejection-no-warning.js) -- [parallel/test-promise-hook-create-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-create-hook.js) -- [parallel/test-promise-hook-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-exceptions.js) -- [parallel/test-promise-hook-on-after.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-after.js) -- [parallel/test-promise-hook-on-before.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-before.js) -- [parallel/test-promise-hook-on-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-init.js) -- [parallel/test-promise-hook-on-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-resolve.js) -- [parallel/test-promise-reject-callback-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-reject-callback-exception.js) -- [parallel/test-promise-swallowed-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-swallowed-event.js) -- [parallel/test-promise-unhandled-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-default.js) -- [parallel/test-promise-unhandled-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-error.js) -- [parallel/test-promise-unhandled-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-flag.js) -- [parallel/test-promise-unhandled-silent-no-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-silent-no-hook.js) -- [parallel/test-promise-unhandled-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-throw.js) -- [parallel/test-promise-unhandled-warn-no-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-warn-no-hook.js) -- [parallel/test-promise-unhandled-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-warn.js) -- [parallel/test-promises-unhandled-proxy-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-unhandled-proxy-rejections.js) -- [parallel/test-promises-unhandled-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-unhandled-rejections.js) -- [parallel/test-promises-unhandled-symbol-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-unhandled-symbol-rejections.js) -- [parallel/test-promises-warning-on-unhandled-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-warning-on-unhandled-rejection.js) -- [parallel/test-queue-microtask-uncaught-asynchooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-queue-microtask-uncaught-asynchooks.js) -- [parallel/test-queue-microtask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-queue-microtask.js) -- [parallel/test-readable-from-iterator-closing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-from-iterator-closing.js) -- [parallel/test-readable-from-web-enqueue-then-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-from-web-enqueue-then-close.js) -- [parallel/test-readable-from.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-from.js) -- [parallel/test-readable-large-hwm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-large-hwm.js) -- [parallel/test-readable-single-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-single-end.js) -- [parallel/test-readline-async-iterators-backpressure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-async-iterators-backpressure.js) -- [parallel/test-readline-async-iterators-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-async-iterators-destroy.js) -- [parallel/test-readline-async-iterators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-async-iterators.js) -- [parallel/test-readline-carriage-return-between-chunks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-carriage-return-between-chunks.js) -- [parallel/test-readline-csi.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-csi.js) -- [parallel/test-readline-input-onerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-input-onerror.js) -- [parallel/test-readline-interface-no-trailing-newline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-interface-no-trailing-newline.js) -- [parallel/test-readline-interface-recursive-writes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-interface-recursive-writes.js) -- [parallel/test-readline-interface.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-interface.js) -- [parallel/test-readline-promises-interface.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-promises-interface.js) -- [parallel/test-readline-promises-tab-complete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-promises-tab-complete.js) -- [parallel/test-readline-tab-complete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-tab-complete.js) -- [parallel/test-ref-unref-return.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-ref-unref-return.js) -- [parallel/test-regression-object-prototype.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-regression-object-prototype.js) -- [parallel/test-release-changelog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-release-changelog.js) -- [parallel/test-release-npm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-release-npm.js) -- [parallel/test-repl-array-prototype-tempering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-array-prototype-tempering.js) -- [parallel/test-repl-autocomplete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-autocomplete.js) -- [parallel/test-repl-autolibs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-autolibs.js) -- [parallel/test-repl-clear-immediate-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-clear-immediate-crash.js) -- [parallel/test-repl-cli-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-cli-eval.js) -- [parallel/test-repl-colors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-colors.js) -- [parallel/test-repl-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-context.js) -- [parallel/test-repl-definecommand.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-definecommand.js) -- [parallel/test-repl-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-domain.js) -- [parallel/test-repl-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-dynamic-import.js) -- [parallel/test-repl-editor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-editor.js) -- [parallel/test-repl-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-empty.js) -- [parallel/test-repl-end-emits-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-end-emits-exit.js) -- [parallel/test-repl-envvars.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-envvars.js) -- [parallel/test-repl-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-eval.js) -- [parallel/test-repl-function-definition-edge-case.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-function-definition-edge-case.js) -- [parallel/test-repl-harmony.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-harmony.js) -- [parallel/test-repl-history-navigation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-history-navigation.js) -- [parallel/test-repl-history-perm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-history-perm.js) -- [parallel/test-repl-import-referrer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-import-referrer.js) -- [parallel/test-repl-inspect-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-inspect-defaults.js) -- [parallel/test-repl-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-inspector.js) -- [parallel/test-repl-let-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-let-process.js) -- [parallel/test-repl-load-multiline-no-trailing-newline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-load-multiline-no-trailing-newline.js) -- [parallel/test-repl-load-multiline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-load-multiline.js) -- [parallel/test-repl-mode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-mode.js) -- [parallel/test-repl-multiline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-multiline.js) -- [parallel/test-repl-no-terminal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-no-terminal.js) -- [parallel/test-repl-null-thrown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-null-thrown.js) -- [parallel/test-repl-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-null.js) -- [parallel/test-repl-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-options.js) -- [parallel/test-repl-permission-model.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-permission-model.js) -- [parallel/test-repl-persistent-history.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-persistent-history.js) -- [parallel/test-repl-preprocess-top-level-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-preprocess-top-level-await.js) -- [parallel/test-repl-pretty-custom-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-custom-stack.js) -- [parallel/test-repl-pretty-stack-custom-writer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-stack-custom-writer.js) -- [parallel/test-repl-pretty-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-stack.js) -- [parallel/test-repl-preview.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-preview.js) -- [parallel/test-repl-programmatic-history.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-programmatic-history.js) -- [parallel/test-repl-recoverable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-recoverable.js) -- [parallel/test-repl-require-after-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-after-write.js) -- [parallel/test-repl-require-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-cache.js) -- [parallel/test-repl-require-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-context.js) -- [parallel/test-repl-require-self-referential.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-self-referential.js) -- [parallel/test-repl-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require.js) -- [parallel/test-repl-reset-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-reset-event.js) -- [parallel/test-repl-reverse-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-reverse-search.js) -- [parallel/test-repl-save-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-save-load.js) -- [parallel/test-repl-setprompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-setprompt.js) -- [parallel/test-repl-sigint-nested-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-sigint-nested-eval.js) -- [parallel/test-repl-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-sigint.js) -- [parallel/test-repl-stdin-push-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-stdin-push-null.js) -- [parallel/test-repl-strict-mode-previews.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-strict-mode-previews.js) -- [parallel/test-repl-syntax-error-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-syntax-error-handling.js) -- [parallel/test-repl-syntax-error-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-syntax-error-stack.js) -- [parallel/test-repl-tab-complete-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-crash.js) -- [parallel/test-repl-tab-complete-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-import.js) -- [parallel/test-repl-tab-complete-nested-repls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-nested-repls.js) -- [parallel/test-repl-tab-complete-no-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-no-warn.js) -- [parallel/test-repl-tab-complete-on-editor-mode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-on-editor-mode.js) -- [parallel/test-repl-tab-complete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete.js) -- [parallel/test-repl-tab.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab.js) -- [parallel/test-repl-throw-null-or-undefined.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-throw-null-or-undefined.js) -- [parallel/test-repl-top-level-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-top-level-await.js) -- [parallel/test-repl-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception-async.js) -- [parallel/test-repl-uncaught-exception-evalcallback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception-evalcallback.js) -- [parallel/test-repl-uncaught-exception-standalone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception-standalone.js) -- [parallel/test-repl-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception.js) -- [parallel/test-repl-underscore.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-underscore.js) -- [parallel/test-repl-unexpected-token-recoverable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-unexpected-token-recoverable.js) -- [parallel/test-repl-unsafe-array-iteration.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-unsafe-array-iteration.js) -- [parallel/test-repl-unsupported-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-unsupported-option.js) -- [parallel/test-repl-use-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-use-global.js) -- [parallel/test-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl.js) -- [parallel/test-require-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-cache.js) -- [parallel/test-require-delete-array-iterator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-delete-array-iterator.js) -- [parallel/test-require-dot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-dot.js) -- [parallel/test-require-empty-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-empty-main.js) -- [parallel/test-require-enoent-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-enoent-dir.js) -- [parallel/test-require-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-exceptions.js) -- [parallel/test-require-extension-over-directory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extension-over-directory.js) -- [parallel/test-require-extensions-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extensions-main.js) -- [parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js) -- [parallel/test-require-extensions-same-filename-as-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extensions-same-filename-as-dir.js) -- [parallel/test-require-invalid-main-no-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-invalid-main-no-exports.js) -- [parallel/test-require-invalid-package.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-invalid-package.js) -- [parallel/test-require-json.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-json.js) -- [parallel/test-require-long-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-long-path.js) -- [parallel/test-require-mjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-mjs.js) -- [parallel/test-require-node-prefix.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-node-prefix.js) -- [parallel/test-require-nul.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-nul.js) -- [parallel/test-require-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-process.js) -- [parallel/test-require-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-resolve.js) -- [parallel/test-require-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-symlink.js) -- [parallel/test-require-unicode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-unicode.js) -- [parallel/test-resource-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-resource-usage.js) -- [parallel/test-runner-cli-concurrency.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli-concurrency.js) -- [parallel/test-runner-cli-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli-timeout.js) -- [parallel/test-runner-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli.js) -- [parallel/test-runner-concurrency.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-concurrency.js) -- [parallel/test-runner-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-coverage.js) -- [parallel/test-runner-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-exit-code.js) -- [parallel/test-runner-extraneous-async-activity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-extraneous-async-activity.js) -- [parallel/test-runner-filetest-location.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-filetest-location.js) -- [parallel/test-runner-import-no-scheme.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-import-no-scheme.js) -- [parallel/test-runner-misc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-misc.js) -- [parallel/test-runner-mock-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-mock-timers.js) -- [parallel/test-runner-mocking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-mocking.js) -- [parallel/test-runner-option-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-option-validation.js) -- [parallel/test-runner-reporters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-reporters.js) -- [parallel/test-runner-root-after-with-refed-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-root-after-with-refed-handles.js) -- [parallel/test-runner-string-to-regexp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-string-to-regexp.js) -- [parallel/test-runner-test-filter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-test-filter.js) -- [parallel/test-runner-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-typechecking.js) -- [parallel/test-safe-get-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-safe-get-env.js) -- [parallel/test-security-revert-unknown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-security-revert-unknown.js) -- [parallel/test-set-http-max-http-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-http-max-http-headers.js) -- [parallel/test-set-incoming-message-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-incoming-message-header.js) -- [parallel/test-set-process-debug-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-process-debug-port.js) -- [parallel/test-setproctitle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-setproctitle.js) -- [parallel/test-shadow-realm-allowed-builtin-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-allowed-builtin-modules.js) -- [parallel/test-shadow-realm-custom-loaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-custom-loaders.js) -- [parallel/test-shadow-realm-gc-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-gc-module.js) -- [parallel/test-shadow-realm-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-gc.js) -- [parallel/test-shadow-realm-globals.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-globals.js) -- [parallel/test-shadow-realm-import-value-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-import-value-resolve.js) -- [parallel/test-shadow-realm-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-module.js) -- [parallel/test-shadow-realm-preload-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-preload-module.js) -- [parallel/test-shadow-realm-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-prepare-stack-trace.js) -- [parallel/test-shadow-realm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm.js) -- [parallel/test-sigint-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sigint-infinite-loop.js) -- [parallel/test-signal-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-args.js) -- [parallel/test-signal-handler-remove-on-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-handler-remove-on-exit.js) -- [parallel/test-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-handler.js) -- [parallel/test-signal-safety.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-safety.js) -- [parallel/test-signal-unregister.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-unregister.js) -- [parallel/test-single-executable-blob-config-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-blob-config-errors.js) -- [parallel/test-single-executable-blob-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-blob-config.js) -- [parallel/test-snapshot-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-api.js) -- [parallel/test-snapshot-argv1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-argv1.js) -- [parallel/test-snapshot-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-basic.js) -- [parallel/test-snapshot-cjs-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-cjs-main.js) -- [parallel/test-snapshot-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-console.js) -- [parallel/test-snapshot-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-cwd.js) -- [parallel/test-snapshot-dns-lookup-localhost-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-lookup-localhost-promise.js) -- [parallel/test-snapshot-dns-lookup-localhost.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-lookup-localhost.js) -- [parallel/test-snapshot-dns-resolve-localhost-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-resolve-localhost-promise.js) -- [parallel/test-snapshot-dns-resolve-localhost.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-resolve-localhost.js) -- [parallel/test-snapshot-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-error.js) -- [parallel/test-snapshot-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-eval.js) -- [parallel/test-snapshot-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-gzip.js) -- [parallel/test-snapshot-incompatible.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-incompatible.js) -- [parallel/test-snapshot-namespaced-builtin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-namespaced-builtin.js) -- [parallel/test-snapshot-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-net.js) -- [parallel/test-snapshot-typescript.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-typescript.js) -- [parallel/test-snapshot-umd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-umd.js) -- [parallel/test-snapshot-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-warning.js) -- [parallel/test-snapshot-weak-reference.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-weak-reference.js) -- [parallel/test-snapshot-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-worker.js) -- [parallel/test-socket-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-address.js) -- [parallel/test-socket-options-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-options-invalid.js) -- [parallel/test-socket-write-after-fin-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-write-after-fin-error.js) -- [parallel/test-socket-write-after-fin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-write-after-fin.js) -- [parallel/test-socket-writes-before-passed-to-tls-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-writes-before-passed-to-tls-socket.js) -- [parallel/test-socketaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socketaddress.js) -- [parallel/test-source-map-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-source-map-api.js) -- [parallel/test-source-map-enable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-source-map-enable.js) -- [parallel/test-spawn-cmd-named-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-spawn-cmd-named-pipe.js) -- [parallel/test-stack-size-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stack-size-limit.js) -- [parallel/test-startup-empty-regexp-statics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-startup-empty-regexp-statics.js) -- [parallel/test-startup-large-pages.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-startup-large-pages.js) -- [parallel/test-stdin-child-proc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-child-proc.js) -- [parallel/test-stdin-from-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-from-file.js) -- [parallel/test-stdin-hang.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-hang.js) -- [parallel/test-stdin-pause-resume-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pause-resume-sync.js) -- [parallel/test-stdin-pause-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pause-resume.js) -- [parallel/test-stdin-pipe-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pipe-large.js) -- [parallel/test-stdin-pipe-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pipe-resume.js) -- [parallel/test-stdin-resume-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-resume-pause.js) -- [parallel/test-stdin-script-child-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-script-child-option.js) -- [parallel/test-stdin-script-child.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-script-child.js) -- [parallel/test-stdio-closed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-closed.js) -- [parallel/test-stdio-pipe-access.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-pipe-access.js) -- [parallel/test-stdio-pipe-redirect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-pipe-redirect.js) -- [parallel/test-stdio-pipe-stderr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-pipe-stderr.js) -- [parallel/test-stdio-undestroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-undestroy.js) -- [parallel/test-stdout-cannot-be-closed-child-process-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js) -- [parallel/test-stdout-close-catch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-close-catch.js) -- [parallel/test-stdout-close-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-close-unref.js) -- [parallel/test-stdout-pipeline-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-pipeline-destroy.js) -- [parallel/test-stdout-stderr-reading.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-stderr-reading.js) -- [parallel/test-stdout-stderr-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-stderr-write.js) -- [parallel/test-stdout-to-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-to-file.js) -- [parallel/test-strace-openat-openssl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-strace-openat-openssl.js) -- [parallel/test-stream-base-prototype-accessors-enumerability.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-base-prototype-accessors-enumerability.js) -- [parallel/test-stream-base-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-base-typechecking.js) -- [parallel/test-stream-catch-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-catch-rejections.js) -- [parallel/test-stream-compose-operator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-compose-operator.js) -- [parallel/test-stream-compose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-compose.js) -- [parallel/test-stream-consumers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-consumers.js) -- [parallel/test-stream-decoder-objectmode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-decoder-objectmode.js) -- [parallel/test-stream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-destroy.js) -- [parallel/test-stream-drop-take.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-drop-take.js) -- [parallel/test-stream-duplex-readable-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-duplex-readable-writable.js) -- [parallel/test-stream-end-of-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-end-of-streams.js) -- [parallel/test-stream-filter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-filter.js) -- [parallel/test-stream-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-finished.js) -- [parallel/test-stream-flatMap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-flatMap.js) -- [parallel/test-stream-forEach.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-forEach.js) -- [parallel/test-stream-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-map.js) -- [parallel/test-stream-passthrough-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-passthrough-drain.js) -- [parallel/test-stream-pipe-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipe-deadlock.js) -- [parallel/test-stream-pipe-error-unhandled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipe-error-unhandled.js) -- [parallel/test-stream-pipeline-duplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-duplex.js) -- [parallel/test-stream-pipeline-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-http2.js) -- [parallel/test-stream-pipeline-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-listeners.js) -- [parallel/test-stream-pipeline-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-process.js) -- [parallel/test-stream-pipeline-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-uncaught.js) -- [parallel/test-stream-pipeline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline.js) -- [parallel/test-stream-preprocess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-preprocess.js) -- [parallel/test-stream-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-promises.js) -- [parallel/test-stream-push-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-push-order.js) -- [parallel/test-stream-readable-async-iterators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-async-iterators.js) -- [parallel/test-stream-readable-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-default-encoding.js) -- [parallel/test-stream-readable-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-dispose.js) -- [parallel/test-stream-readable-strategy-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-strategy-option.js) -- [parallel/test-stream-readable-unpipe-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-unpipe-resume.js) -- [parallel/test-stream-reduce.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-reduce.js) -- [parallel/test-stream-set-default-hwm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-set-default-hwm.js) -- [parallel/test-stream-toArray.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-toArray.js) -- [parallel/test-stream-toWeb-allows-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-toWeb-allows-server-response.js) -- [parallel/test-stream-transform-hwm0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-transform-hwm0.js) -- [parallel/test-stream-wrap-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-wrap-drain.js) -- [parallel/test-stream-wrap-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-wrap-encoding.js) -- [parallel/test-stream-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-wrap.js) -- [parallel/test-stream-writable-end-cb-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-writable-end-cb-uncaught.js) -- [parallel/test-stream-writable-samecb-singletick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-writable-samecb-singletick.js) -- [parallel/test-stream2-finish-pipe-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream2-finish-pipe-error.js) -- [parallel/test-stream2-httpclient-response-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream2-httpclient-response-end.js) -- [parallel/test-stream3-pipeline-async-iterator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream3-pipeline-async-iterator.js) -- [parallel/test-string-decoder-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-string-decoder-end.js) -- [parallel/test-string-decoder-fuzz.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-string-decoder-fuzz.js) -- [parallel/test-stringbytes-external.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stringbytes-external.js) -- [parallel/test-structuredClone-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-structuredClone-global.js) -- [parallel/test-sync-fileread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sync-fileread.js) -- [parallel/test-sync-io-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sync-io-option.js) -- [parallel/test-sys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sys.js) -- [parallel/test-tcp-wrap-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tcp-wrap-connect.js) -- [parallel/test-tcp-wrap-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tcp-wrap-listen.js) -- [parallel/test-tcp-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tcp-wrap.js) -- [parallel/test-tick-processor-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tick-processor-arguments.js) -- [parallel/test-tick-processor-version-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tick-processor-version-check.js) -- [parallel/test-timer-immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timer-immediate.js) -- [parallel/test-timers-active.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-active.js) -- [parallel/test-timers-clearImmediate-als.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-clearImmediate-als.js) -- [parallel/test-timers-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-destroyed.js) -- [parallel/test-timers-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-dispose.js) -- [parallel/test-timers-enroll-invalid-msecs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-enroll-invalid-msecs.js) -- [parallel/test-timers-enroll-second-time.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-enroll-second-time.js) -- [parallel/test-timers-immediate-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-promisified.js) -- [parallel/test-timers-immediate-queue-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-queue-throw.js) -- [parallel/test-timers-immediate-queue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-queue.js) -- [parallel/test-timers-immediate-unref-nested-once.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-unref-nested-once.js) -- [parallel/test-timers-immediate-unref-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-unref-simple.js) -- [parallel/test-timers-immediate-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-unref.js) -- [parallel/test-timers-immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate.js) -- [parallel/test-timers-interval-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-interval-promisified.js) -- [parallel/test-timers-linked-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-linked-list.js) -- [parallel/test-timers-max-duration-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-max-duration-warning.js) -- [parallel/test-timers-nested.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-nested.js) -- [parallel/test-timers-next-tick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-next-tick.js) -- [parallel/test-timers-now.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-now.js) -- [parallel/test-timers-ordering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-ordering.js) -- [parallel/test-timers-promises-scheduler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-promises-scheduler.js) -- [parallel/test-timers-refresh-in-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-refresh-in-callback.js) -- [parallel/test-timers-reset-process-domain-on-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-reset-process-domain-on-throw.js) -- [parallel/test-timers-setimmediate-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-setimmediate-infinite-loop.js) -- [parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js) -- [parallel/test-timers-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-this.js) -- [parallel/test-timers-throw-when-cb-not-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-throw-when-cb-not-function.js) -- [parallel/test-timers-timeout-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-timeout-promisified.js) -- [parallel/test-timers-timeout-to-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-timeout-to-interval.js) -- [parallel/test-timers-to-primitive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-to-primitive.js) -- [parallel/test-timers-unenroll-unref-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unenroll-unref-interval.js) -- [parallel/test-timers-unref-active.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref-active.js) -- [parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js) -- [parallel/test-timers-unref-remove-other-unref-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref-remove-other-unref-timers.js) -- [parallel/test-timers-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref.js) -- [parallel/test-timers-unrefd-interval-still-fires.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unrefd-interval-still-fires.js) -- [parallel/test-timers-unrefed-in-beforeexit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unrefed-in-beforeexit.js) -- [parallel/test-timers-unrefed-in-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unrefed-in-callback.js) -- [parallel/test-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers.js) -- [parallel/test-tls-0-dns-altname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-0-dns-altname.js) -- [parallel/test-tls-add-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-add-context.js) -- [parallel/test-tls-addca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-addca.js) -- [parallel/test-tls-alert-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-alert-handling.js) -- [parallel/test-tls-alert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-alert.js) -- [parallel/test-tls-alpn-server-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-alpn-server-client.js) -- [parallel/test-tls-async-cb-after-socket-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-async-cb-after-socket-end.js) -- [parallel/test-tls-basic-validations.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-basic-validations.js) -- [parallel/test-tls-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-buffersize.js) -- [parallel/test-tls-ca-concat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ca-concat.js) -- [parallel/test-tls-canonical-ip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-canonical-ip.js) -- [parallel/test-tls-cert-chains-concat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-chains-concat.js) -- [parallel/test-tls-cert-chains-in-ca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-chains-in-ca.js) -- [parallel/test-tls-cert-ext-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-ext-encoding.js) -- [parallel/test-tls-cert-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-regression.js) -- [parallel/test-tls-check-server-identity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-check-server-identity.js) -- [parallel/test-tls-cipher-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cipher-list.js) -- [parallel/test-tls-cli-max-version-1.2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-max-version-1.2.js) -- [parallel/test-tls-cli-max-version-1.3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-max-version-1.3.js) -- [parallel/test-tls-cli-min-max-conflict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-max-conflict.js) -- [parallel/test-tls-cli-min-version-1.0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.0.js) -- [parallel/test-tls-cli-min-version-1.1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.1.js) -- [parallel/test-tls-cli-min-version-1.2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.2.js) -- [parallel/test-tls-cli-min-version-1.3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.3.js) -- [parallel/test-tls-client-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-abort.js) -- [parallel/test-tls-client-abort2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-abort2.js) -- [parallel/test-tls-client-auth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-auth.js) -- [parallel/test-tls-client-default-ciphers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-default-ciphers.js) -- [parallel/test-tls-client-destroy-soon.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-destroy-soon.js) -- [parallel/test-tls-client-getephemeralkeyinfo.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-getephemeralkeyinfo.js) -- [parallel/test-tls-client-mindhsize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-mindhsize.js) -- [parallel/test-tls-client-reject-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-reject-12.js) -- [parallel/test-tls-client-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-reject.js) -- [parallel/test-tls-client-renegotiation-13.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-renegotiation-13.js) -- [parallel/test-tls-client-renegotiation-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-renegotiation-limit.js) -- [parallel/test-tls-client-resume-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-resume-12.js) -- [parallel/test-tls-client-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-resume.js) -- [parallel/test-tls-client-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-verify.js) -- [parallel/test-tls-clientcertengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-clientcertengine-invalid-arg-type.js) -- [parallel/test-tls-clientcertengine-unsupported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-clientcertengine-unsupported.js) -- [parallel/test-tls-close-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-close-error.js) -- [parallel/test-tls-close-event-after-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-close-event-after-write.js) -- [parallel/test-tls-close-notify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-close-notify.js) -- [parallel/test-tls-cnnic-whitelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cnnic-whitelist.js) -- [parallel/test-tls-connect-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-abort-controller.js) -- [parallel/test-tls-connect-address-family.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-address-family.js) -- [parallel/test-tls-connect-allow-half-open-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-allow-half-open-option.js) -- [parallel/test-tls-connect-given-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-given-socket.js) -- [parallel/test-tls-connect-hints-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-hints-option.js) -- [parallel/test-tls-connect-hwm-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-hwm-option.js) -- [parallel/test-tls-connect-memleak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-memleak.js) -- [parallel/test-tls-connect-no-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-no-host.js) -- [parallel/test-tls-connect-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-pipe.js) -- [parallel/test-tls-connect-secure-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-secure-context.js) -- [parallel/test-tls-connect-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-simple.js) -- [parallel/test-tls-connect-stream-writes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-stream-writes.js) -- [parallel/test-tls-connect-timeout-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-timeout-option.js) -- [parallel/test-tls-delayed-attach-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-delayed-attach-error.js) -- [parallel/test-tls-delayed-attach.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-delayed-attach.js) -- [parallel/test-tls-destroy-stream-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-destroy-stream-12.js) -- [parallel/test-tls-destroy-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-destroy-stream.js) -- [parallel/test-tls-destroy-whilst-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-destroy-whilst-write.js) -- [parallel/test-tls-dhe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-dhe.js) -- [parallel/test-tls-disable-renegotiation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-disable-renegotiation.js) -- [parallel/test-tls-ecdh-auto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ecdh-auto.js) -- [parallel/test-tls-ecdh-multiple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ecdh-multiple.js) -- [parallel/test-tls-ecdh.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ecdh.js) -- [parallel/test-tls-econnreset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-econnreset.js) -- [parallel/test-tls-empty-sni-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-empty-sni-context.js) -- [parallel/test-tls-enable-keylog-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-enable-keylog-cli.js) -- [parallel/test-tls-enable-trace-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-enable-trace-cli.js) -- [parallel/test-tls-enable-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-enable-trace.js) -- [parallel/test-tls-env-bad-extra-ca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-bad-extra-ca.js) -- [parallel/test-tls-env-extra-ca-file-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-extra-ca-file-load.js) -- [parallel/test-tls-env-extra-ca-no-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-extra-ca-no-crypto.js) -- [parallel/test-tls-env-extra-ca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-extra-ca.js) -- [parallel/test-tls-error-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-error-servername.js) -- [parallel/test-tls-exportkeyingmaterial.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-exportkeyingmaterial.js) -- [parallel/test-tls-external-accessor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-external-accessor.js) -- [parallel/test-tls-fast-writing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-fast-writing.js) -- [parallel/test-tls-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-finished.js) -- [parallel/test-tls-friendly-error-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-friendly-error-message.js) -- [parallel/test-tls-generic-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-generic-stream.js) -- [parallel/test-tls-getcertificate-x509.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-getcertificate-x509.js) -- [parallel/test-tls-getcipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-getcipher.js) -- [parallel/test-tls-getprotocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-getprotocol.js) -- [parallel/test-tls-handshake-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-handshake-error.js) -- [parallel/test-tls-handshake-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-handshake-exception.js) -- [parallel/test-tls-handshake-nohang.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-handshake-nohang.js) -- [parallel/test-tls-hello-parser-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-hello-parser-failure.js) -- [parallel/test-tls-honorcipherorder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-honorcipherorder.js) -- [parallel/test-tls-inception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-inception.js) -- [parallel/test-tls-interleave.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-interleave.js) -- [parallel/test-tls-invalid-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-invalid-pfx.js) -- [parallel/test-tls-invoke-queued.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-invoke-queued.js) -- [parallel/test-tls-ip-servername-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ip-servername-deprecation.js) -- [parallel/test-tls-js-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-js-stream.js) -- [parallel/test-tls-junk-closes-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-junk-closes-server.js) -- [parallel/test-tls-junk-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-junk-server.js) -- [parallel/test-tls-key-mismatch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-key-mismatch.js) -- [parallel/test-tls-keyengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-keyengine-invalid-arg-type.js) -- [parallel/test-tls-keyengine-unsupported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-keyengine-unsupported.js) -- [parallel/test-tls-keylog-tlsv13.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-keylog-tlsv13.js) -- [parallel/test-tls-legacy-deprecated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-legacy-deprecated.js) -- [parallel/test-tls-max-send-fragment.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-max-send-fragment.js) -- [parallel/test-tls-min-max-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-min-max-version.js) -- [parallel/test-tls-multi-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-multi-key.js) -- [parallel/test-tls-multi-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-multi-pfx.js) -- [parallel/test-tls-multiple-cas-as-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-multiple-cas-as-string.js) -- [parallel/test-tls-net-connect-prefer-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-net-connect-prefer-path.js) -- [parallel/test-tls-net-socket-keepalive-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-net-socket-keepalive-12.js) -- [parallel/test-tls-net-socket-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-net-socket-keepalive.js) -- [parallel/test-tls-no-cert-required.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-cert-required.js) -- [parallel/test-tls-no-rsa-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-rsa-key.js) -- [parallel/test-tls-no-sslv23.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-sslv23.js) -- [parallel/test-tls-no-sslv3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-sslv3.js) -- [parallel/test-tls-ocsp-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ocsp-callback.js) -- [parallel/test-tls-on-empty-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-on-empty-socket.js) -- [parallel/test-tls-onread-static-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-onread-static-buffer.js) -- [parallel/test-tls-options-boolean-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-options-boolean-check.js) -- [parallel/test-tls-over-http-tunnel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-over-http-tunnel.js) -- [parallel/test-tls-passphrase.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-passphrase.js) -- [parallel/test-tls-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-pause.js) -- [parallel/test-tls-peer-certificate-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-peer-certificate-encoding.js) -- [parallel/test-tls-peer-certificate-multi-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-peer-certificate-multi-keys.js) -- [parallel/test-tls-peer-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-peer-certificate.js) -- [parallel/test-tls-pfx-authorizationerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-pfx-authorizationerror.js) -- [parallel/test-tls-psk-circuit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-circuit.js) -- [parallel/test-tls-psk-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-errors.js) -- [parallel/test-tls-psk-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-server.js) -- [parallel/test-tls-reduced-SECLEVEL-in-cipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js) -- [parallel/test-tls-reinitialize-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reinitialize-listeners.js) -- [parallel/test-tls-request-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-request-timeout.js) -- [parallel/test-tls-retain-handle-no-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-retain-handle-no-abort.js) -- [parallel/test-tls-reuse-host-from-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reuse-host-from-socket.js) -- [parallel/test-tls-root-certificates.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-root-certificates.js) -- [parallel/test-tls-secure-context-usage-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-secure-context-usage-order.js) -- [parallel/test-tls-secure-session.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-secure-session.js) -- [parallel/test-tls-securepair-fiftharg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-securepair-fiftharg.js) -- [parallel/test-tls-securepair-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-securepair-leak.js) -- [parallel/test-tls-securepair-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-securepair-server.js) -- [parallel/test-tls-server-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-capture-rejection.js) -- [parallel/test-tls-server-connection-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-connection-server.js) -- [parallel/test-tls-server-failed-handshake-emits-clienterror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js) -- [parallel/test-tls-server-parent-constructor-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-parent-constructor-options.js) -- [parallel/test-tls-server-setoptions-clientcertengine.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-setoptions-clientcertengine.js) -- [parallel/test-tls-server-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-verify.js) -- [parallel/test-tls-session-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-session-cache.js) -- [parallel/test-tls-set-ciphers-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-ciphers-error.js) -- [parallel/test-tls-set-ciphers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-ciphers.js) -- [parallel/test-tls-set-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-encoding.js) -- [parallel/test-tls-set-secure-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-secure-context.js) -- [parallel/test-tls-set-sigalgs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-sigalgs.js) -- [parallel/test-tls-sni-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-sni-option.js) -- [parallel/test-tls-sni-server-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-sni-server-client.js) -- [parallel/test-tls-sni-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-sni-servername.js) -- [parallel/test-tls-snicallback-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-snicallback-error.js) -- [parallel/test-tls-socket-allow-half-open-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-allow-half-open-option.js) -- [parallel/test-tls-socket-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-close.js) -- [parallel/test-tls-socket-constructor-alpn-options-parsing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-constructor-alpn-options-parsing.js) -- [parallel/test-tls-socket-default-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-default-options.js) -- [parallel/test-tls-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-destroy.js) -- [parallel/test-tls-socket-failed-handshake-emits-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-failed-handshake-emits-error.js) -- [parallel/test-tls-socket-snicallback-without-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-snicallback-without-server.js) -- [parallel/test-tls-startcom-wosign-whitelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-startcom-wosign-whitelist.js) -- [parallel/test-tls-starttls-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-starttls-server.js) -- [parallel/test-tls-streamwrap-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-streamwrap-buffersize.js) -- [parallel/test-tls-ticket-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket-12.js) -- [parallel/test-tls-ticket-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket-cluster.js) -- [parallel/test-tls-ticket-invalid-arg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket-invalid-arg.js) -- [parallel/test-tls-ticket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket.js) -- [parallel/test-tls-timeout-server-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-timeout-server-2.js) -- [parallel/test-tls-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-timeout-server.js) -- [parallel/test-tls-tlswrap-segfault-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-tlswrap-segfault-2.js) -- [parallel/test-tls-tlswrap-segfault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-tlswrap-segfault.js) -- [parallel/test-tls-translate-peer-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-translate-peer-certificate.js) -- [parallel/test-tls-transport-destroy-after-own-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-transport-destroy-after-own-gc.js) -- [parallel/test-tls-use-after-free-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-use-after-free-regression.js) -- [parallel/test-tls-wrap-econnreset-localaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset-localaddress.js) -- [parallel/test-tls-wrap-econnreset-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset-pipe.js) -- [parallel/test-tls-wrap-econnreset-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset-socket.js) -- [parallel/test-tls-wrap-econnreset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset.js) -- [parallel/test-tls-wrap-event-emmiter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-event-emmiter.js) -- [parallel/test-tls-wrap-no-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-no-abort.js) -- [parallel/test-tls-wrap-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-timeout.js) -- [parallel/test-tls-write-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-write-error.js) -- [parallel/test-tls-writewrap-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-writewrap-leak.js) -- [parallel/test-tls-zero-clear-in.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-zero-clear-in.js) -- [parallel/test-tojson-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tojson-perf_hooks.js) -- [parallel/test-trace-atomics-wait.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-atomics-wait.js) -- [parallel/test-trace-events-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-all.js) -- [parallel/test-trace-events-api-worker-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-api-worker-disabled.js) -- [parallel/test-trace-events-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-api.js) -- [parallel/test-trace-events-async-hooks-dynamic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-async-hooks-dynamic.js) -- [parallel/test-trace-events-async-hooks-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-async-hooks-worker.js) -- [parallel/test-trace-events-async-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-async-hooks.js) -- [parallel/test-trace-events-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-binding.js) -- [parallel/test-trace-events-bootstrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-bootstrap.js) -- [parallel/test-trace-events-category-used.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-category-used.js) -- [parallel/test-trace-events-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-console.js) -- [parallel/test-trace-events-dynamic-enable-workers-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-dynamic-enable-workers-disabled.js) -- [parallel/test-trace-events-dynamic-enable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-dynamic-enable.js) -- [parallel/test-trace-events-environment.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-environment.js) -- [parallel/test-trace-events-file-pattern.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-file-pattern.js) -- [parallel/test-trace-events-fs-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-fs-async.js) -- [parallel/test-trace-events-fs-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-fs-sync.js) -- [parallel/test-trace-events-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-http.js) -- [parallel/test-trace-events-metadata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-metadata.js) -- [parallel/test-trace-events-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-net.js) -- [parallel/test-trace-events-none.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-none.js) -- [parallel/test-trace-events-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-process-exit.js) -- [parallel/test-trace-events-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-promises.js) -- [parallel/test-trace-events-threadpool.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-threadpool.js) -- [parallel/test-trace-events-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-v8.js) -- [parallel/test-trace-events-vm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-vm.js) -- [parallel/test-trace-events-worker-metadata-with-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-worker-metadata-with-name.js) -- [parallel/test-trace-events-worker-metadata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-worker-metadata.js) -- [parallel/test-trace-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-exit.js) -- [parallel/test-tracing-no-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tracing-no-crash.js) -- [parallel/test-tty-backwards-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tty-backwards-api.js) -- [parallel/test-tty-stdin-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tty-stdin-pipe.js) -- [parallel/test-ttywrap-invalid-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-ttywrap-invalid-fd.js) -- [parallel/test-ttywrap-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-ttywrap-stack.js) -- [parallel/test-tz-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tz-version.js) -- [parallel/test-unhandled-exception-rethrow-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unhandled-exception-rethrow-error.js) -- [parallel/test-unhandled-exception-with-worker-inuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unhandled-exception-with-worker-inuse.js) -- [parallel/test-unicode-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unicode-node-options.js) -- [parallel/test-url-canParse-whatwg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-canParse-whatwg.js) -- [parallel/test-url-is-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-is-url.js) -- [parallel/test-url-null-char.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-null-char.js) -- [parallel/test-url-parse-format.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-parse-format.js) -- [parallel/test-utf8-scripts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-utf8-scripts.js) -- [parallel/test-util-callbackify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-callbackify.js) -- [parallel/test-util-emit-experimental-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-emit-experimental-warning.js) -- [parallel/test-util-inspect-getters-accessing-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-inspect-getters-accessing-this.js) -- [parallel/test-util-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-internal.js) -- [parallel/test-util-log.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-log.js) -- [parallel/test-util-primordial-monkeypatching.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-primordial-monkeypatching.js) -- [parallel/test-util-sigint-watchdog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-sigint-watchdog.js) -- [parallel/test-util-sleep.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-sleep.js) -- [parallel/test-uv-binding-constant.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-binding-constant.js) -- [parallel/test-uv-errmap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-errmap.js) -- [parallel/test-uv-errno.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-errno.js) -- [parallel/test-uv-unmapped-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-unmapped-exception.js) -- [parallel/test-v8-collect-gc-profile-exit-before-stop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-collect-gc-profile-exit-before-stop.js) -- [parallel/test-v8-collect-gc-profile-in-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-collect-gc-profile-in-worker.js) -- [parallel/test-v8-collect-gc-profile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-collect-gc-profile.js) -- [parallel/test-v8-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-coverage.js) -- [parallel/test-v8-deserialize-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-deserialize-buffer.js) -- [parallel/test-v8-flag-pool-size-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-flag-pool-size-0.js) -- [parallel/test-v8-flag-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-flag-type-check.js) -- [parallel/test-v8-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-flags.js) -- [parallel/test-v8-getheapsnapshot-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-getheapsnapshot-twice.js) -- [parallel/test-v8-global-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-global-setter.js) -- [parallel/test-v8-serdes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-serdes.js) -- [parallel/test-v8-serialize-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-serialize-leak.js) -- [parallel/test-v8-startup-snapshot-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-startup-snapshot-api.js) -- [parallel/test-v8-stats.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-stats.js) -- [parallel/test-v8-stop-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-stop-coverage.js) -- [parallel/test-v8-take-coverage-noop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-take-coverage-noop.js) -- [parallel/test-v8-take-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-take-coverage.js) -- [parallel/test-v8-version-tag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-version-tag.js) -- [parallel/test-validators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-validators.js) -- [parallel/test-vfs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vfs.js) -- [parallel/test-vm-api-handles-getter-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-api-handles-getter-errors.js) -- [parallel/test-vm-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-basic.js) -- [parallel/test-vm-cached-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-cached-data.js) -- [parallel/test-vm-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-context.js) -- [parallel/test-vm-dynamic-import-callback-missing-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-dynamic-import-callback-missing-flag.js) -- [parallel/test-vm-global-get-own.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-global-get-own.js) -- [parallel/test-vm-global-non-writable-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-global-non-writable-properties.js) -- [parallel/test-vm-global-property-interceptors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-global-property-interceptors.js) -- [parallel/test-vm-measure-memory-lazy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-measure-memory-lazy.js) -- [parallel/test-vm-measure-memory-multi-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-measure-memory-multi-context.js) -- [parallel/test-vm-measure-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-measure-memory.js) -- [parallel/test-vm-module-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-basic.js) -- [parallel/test-vm-module-cached-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-cached-data.js) -- [parallel/test-vm-module-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-dynamic-import.js) -- [parallel/test-vm-module-dynamic-namespace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-dynamic-namespace.js) -- [parallel/test-vm-module-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-errors.js) -- [parallel/test-vm-module-import-meta.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-import-meta.js) -- [parallel/test-vm-module-link.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-link.js) -- [parallel/test-vm-module-reevaluate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-reevaluate.js) -- [parallel/test-vm-module-synthetic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-synthetic.js) -- [parallel/test-vm-no-dynamic-import-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-no-dynamic-import-callback.js) -- [parallel/test-vm-run-in-new-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-run-in-new-context.js) -- [parallel/test-vm-sigint-existing-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-sigint-existing-handler.js) -- [parallel/test-vm-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-sigint.js) -- [parallel/test-vm-strict-assign.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-strict-assign.js) -- [parallel/test-vm-syntax-error-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-syntax-error-message.js) -- [parallel/test-vm-syntax-error-stderr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-syntax-error-stderr.js) -- [parallel/test-vm-timeout-escape-promise-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-timeout-escape-promise-module.js) -- [parallel/test-warn-sigprof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-warn-sigprof.js) -- [parallel/test-warn-stream-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-warn-stream-wrap.js) -- [parallel/test-weakref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-weakref.js) -- [parallel/test-webcrypto-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-constructors.js) -- [parallel/test-webcrypto-cryptokey-workers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-cryptokey-workers.js) -- [parallel/test-webcrypto-derivebits-cfrg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits-cfrg.js) -- [parallel/test-webcrypto-derivebits-ecdh.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits-ecdh.js) -- [parallel/test-webcrypto-derivebits-hkdf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits-hkdf.js) -- [parallel/test-webcrypto-derivebits.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits.js) -- [parallel/test-webcrypto-derivekey-cfrg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivekey-cfrg.js) -- [parallel/test-webcrypto-derivekey-ecdh.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivekey-ecdh.js) -- [parallel/test-webcrypto-derivekey.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivekey.js) -- [parallel/test-webcrypto-digest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-digest.js) -- [parallel/test-webcrypto-encrypt-decrypt-aes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-encrypt-decrypt-aes.js) -- [parallel/test-webcrypto-encrypt-decrypt-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js) -- [parallel/test-webcrypto-encrypt-decrypt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-encrypt-decrypt.js) -- [parallel/test-webcrypto-export-import-cfrg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import-cfrg.js) -- [parallel/test-webcrypto-export-import-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import-ec.js) -- [parallel/test-webcrypto-export-import-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import-rsa.js) -- [parallel/test-webcrypto-export-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import.js) -- [parallel/test-webcrypto-getRandomValues.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-getRandomValues.js) -- [parallel/test-webcrypto-keygen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-keygen.js) -- [parallel/test-webcrypto-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-random.js) -- [parallel/test-webcrypto-sign-verify-ecdsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-ecdsa.js) -- [parallel/test-webcrypto-sign-verify-eddsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-eddsa.js) -- [parallel/test-webcrypto-sign-verify-hmac.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-hmac.js) -- [parallel/test-webcrypto-sign-verify-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-rsa.js) -- [parallel/test-webcrypto-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-util.js) -- [parallel/test-webcrypto-webidl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-webidl.js) -- [parallel/test-webcrypto-wrap-unwrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-wrap-unwrap.js) -- [parallel/test-websocket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-websocket.js) -- [parallel/test-webstream-encoding-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-encoding-inspect.js) -- [parallel/test-webstream-readablestream-pipeto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-readablestream-pipeto.js) -- [parallel/test-webstream-string-tag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-string-tag.js) -- [parallel/test-webstreams-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-abort-controller.js) -- [parallel/test-webstreams-compose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-compose.js) -- [parallel/test-webstreams-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-finished.js) -- [parallel/test-webstreams-pipeline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-pipeline.js) -- [parallel/test-whatwg-encoding-custom-fatal-streaming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js) -- [parallel/test-whatwg-encoding-custom-internals.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-internals.js) -- [parallel/test-whatwg-encoding-custom-interop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-interop.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-fatal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-fatal.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js) -- [parallel/test-whatwg-encoding-custom-textdecoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder.js) -- [parallel/test-whatwg-events-event-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-events-event-constructors.js) -- [parallel/test-whatwg-events-eventtarget-this-of-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-events-eventtarget-this-of-listener.js) -- [parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js) -- [parallel/test-whatwg-readablebytestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestream.js) -- [parallel/test-whatwg-readablebytestreambyob.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestreambyob.js) -- [parallel/test-whatwg-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablestream.js) -- [parallel/test-whatwg-transformstream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-transformstream.js) -- [parallel/test-whatwg-url-canparse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-canparse.js) -- [parallel/test-whatwg-url-custom-domainto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-domainto.js) -- [parallel/test-whatwg-url-custom-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-inspect.js) -- [parallel/test-whatwg-url-custom-parsing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-parsing.js) -- [parallel/test-whatwg-url-custom-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-properties.js) -- [parallel/test-whatwg-url-custom-searchparams-append.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-append.js) -- [parallel/test-whatwg-url-custom-searchparams-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-constructor.js) -- [parallel/test-whatwg-url-custom-searchparams-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-delete.js) -- [parallel/test-whatwg-url-custom-searchparams-entries.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-entries.js) -- [parallel/test-whatwg-url-custom-searchparams-foreach.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-foreach.js) -- [parallel/test-whatwg-url-custom-searchparams-get.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-get.js) -- [parallel/test-whatwg-url-custom-searchparams-getall.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-getall.js) -- [parallel/test-whatwg-url-custom-searchparams-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-has.js) -- [parallel/test-whatwg-url-custom-searchparams-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-inspect.js) -- [parallel/test-whatwg-url-custom-searchparams-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-keys.js) -- [parallel/test-whatwg-url-custom-searchparams-set.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-set.js) -- [parallel/test-whatwg-url-custom-searchparams-sort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-sort.js) -- [parallel/test-whatwg-url-custom-searchparams-stringifier.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-stringifier.js) -- [parallel/test-whatwg-url-custom-searchparams-values.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-values.js) -- [parallel/test-whatwg-url-custom-searchparams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams.js) -- [parallel/test-whatwg-url-custom-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-setters.js) -- [parallel/test-whatwg-url-invalidthis.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-invalidthis.js) -- [parallel/test-whatwg-url-toascii.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-toascii.js) -- [parallel/test-whatwg-webstreams-adapters-streambase.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-streambase.js) -- [parallel/test-whatwg-webstreams-adapters-to-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-readablestream.js) -- [parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js) -- [parallel/test-whatwg-webstreams-adapters-to-streamduplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js) -- [parallel/test-whatwg-webstreams-adapters-to-streamreadable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-streamreadable.js) -- [parallel/test-whatwg-webstreams-adapters-to-streamwritable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-streamwritable.js) -- [parallel/test-whatwg-webstreams-adapters-to-writablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-writablestream.js) -- [parallel/test-whatwg-webstreams-compression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-compression.js) -- [parallel/test-whatwg-webstreams-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-coverage.js) -- [parallel/test-whatwg-webstreams-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-encoding.js) -- [parallel/test-whatwg-webstreams-transfer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-transfer.js) -- [parallel/test-whatwg-writablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-writablestream.js) -- [parallel/test-windows-abort-exitcode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-windows-abort-exitcode.js) -- [parallel/test-windows-failed-heap-allocation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-windows-failed-heap-allocation.js) -- [parallel/test-worker-abort-on-uncaught-exception-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-abort-on-uncaught-exception-terminate.js) -- [parallel/test-worker-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-abort-on-uncaught-exception.js) -- [parallel/test-worker-arraybuffer-zerofill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-arraybuffer-zerofill.js) -- [parallel/test-worker-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-beforeexit-throw-exit.js) -- [parallel/test-worker-broadcastchannel-wpt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-broadcastchannel-wpt.js) -- [parallel/test-worker-broadcastchannel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-broadcastchannel.js) -- [parallel/test-worker-cjs-workerdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cjs-workerdata.js) -- [parallel/test-worker-cleanexit-with-js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cleanexit-with-js.js) -- [parallel/test-worker-cleanexit-with-moduleload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cleanexit-with-moduleload.js) -- [parallel/test-worker-cleanup-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cleanup-handles.js) -- [parallel/test-worker-console-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-console-listeners.js) -- [parallel/test-worker-crypto-sign-transfer-result.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-crypto-sign-transfer-result.js) -- [parallel/test-worker-data-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-data-url.js) -- [parallel/test-worker-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-debug.js) -- [parallel/test-worker-dns-terminate-during-query.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-dns-terminate-during-query.js) -- [parallel/test-worker-dns-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-dns-terminate.js) -- [parallel/test-worker-environmentdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-environmentdata.js) -- [parallel/test-worker-error-stack-getter-throws.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-error-stack-getter-throws.js) -- [parallel/test-worker-esm-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-esm-exit.js) -- [parallel/test-worker-esm-missing-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-esm-missing-main.js) -- [parallel/test-worker-esmodule.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-esmodule.js) -- [parallel/test-worker-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-event.js) -- [parallel/test-worker-execargv-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-execargv-invalid.js) -- [parallel/test-worker-execargv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-execargv.js) -- [parallel/test-worker-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-code.js) -- [parallel/test-worker-exit-event-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-event-error.js) -- [parallel/test-worker-exit-from-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-from-uncaught-exception.js) -- [parallel/test-worker-exit-heapsnapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-heapsnapshot.js) -- [parallel/test-worker-fs-stat-watcher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-fs-stat-watcher.js) -- [parallel/test-worker-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-hasref.js) -- [parallel/test-worker-heap-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-heap-snapshot.js) -- [parallel/test-worker-heapdump-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-heapdump-failure.js) -- [parallel/test-worker-http2-generic-streams-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-http2-generic-streams-terminate.js) -- [parallel/test-worker-http2-stream-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-http2-stream-terminate.js) -- [parallel/test-worker-init-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-init-failure.js) -- [parallel/test-worker-invalid-workerdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-invalid-workerdata.js) -- [parallel/test-worker-load-file-with-extension-other-than-js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-load-file-with-extension-other-than-js.js) -- [parallel/test-worker-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-memory.js) -- [parallel/test-worker-message-channel-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-channel-sharedarraybuffer.js) -- [parallel/test-worker-message-channel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-channel.js) -- [parallel/test-worker-message-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-event.js) -- [parallel/test-worker-message-not-serializable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-not-serializable.js) -- [parallel/test-worker-message-port-arraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-arraybuffer.js) -- [parallel/test-worker-message-port-close-while-receiving.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-close-while-receiving.js) -- [parallel/test-worker-message-port-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-close.js) -- [parallel/test-worker-message-port-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-constructor.js) -- [parallel/test-worker-message-port-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-drain.js) -- [parallel/test-worker-message-port-inspect-during-init-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-inspect-during-init-hook.js) -- [parallel/test-worker-message-port-jstransferable-nested-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-jstransferable-nested-untransferable.js) -- [parallel/test-worker-message-port-message-before-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-message-before-close.js) -- [parallel/test-worker-message-port-message-port-transferring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-message-port-transferring.js) -- [parallel/test-worker-message-port-move.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-move.js) -- [parallel/test-worker-message-port-terminate-transfer-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-terminate-transfer-list.js) -- [parallel/test-worker-message-port-transfer-closed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-closed.js) -- [parallel/test-worker-message-port-transfer-duplicate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-duplicate.js) -- [parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js) -- [parallel/test-worker-message-port-transfer-fake-js-transferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js) -- [parallel/test-worker-message-port-transfer-filehandle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-filehandle.js) -- [parallel/test-worker-message-port-transfer-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-native.js) -- [parallel/test-worker-message-port-transfer-self.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-self.js) -- [parallel/test-worker-message-port-transfer-target.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-target.js) -- [parallel/test-worker-message-port-transfer-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-terminate.js) -- [parallel/test-worker-message-port-wasm-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-wasm-module.js) -- [parallel/test-worker-message-port-wasm-threads.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-wasm-threads.js) -- [parallel/test-worker-message-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port.js) -- [parallel/test-worker-message-transfer-port-mark-as-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-transfer-port-mark-as-untransferable.js) -- [parallel/test-worker-message-type-unknown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-type-unknown.js) -- [parallel/test-worker-messageport-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-messageport-hasref.js) -- [parallel/test-worker-mjs-workerdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-mjs-workerdata.js) -- [parallel/test-worker-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-name.js) -- [parallel/test-worker-nearheaplimit-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nearheaplimit-deadlock.js) -- [parallel/test-worker-nested-on-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nested-on-process-exit.js) -- [parallel/test-worker-nested-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nested-uncaught.js) -- [parallel/test-worker-nexttick-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nexttick-terminate.js) -- [parallel/test-worker-no-atomics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-no-atomics.js) -- [parallel/test-worker-no-sab.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-no-sab.js) -- [parallel/test-worker-no-stdin-stdout-interaction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-no-stdin-stdout-interaction.js) -- [parallel/test-worker-non-fatal-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-non-fatal-uncaught-exception.js) -- [parallel/test-worker-on-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-on-process-exit.js) -- [parallel/test-worker-onmessage-not-a-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-onmessage-not-a-function.js) -- [parallel/test-worker-onmessage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-onmessage.js) -- [parallel/test-worker-parent-port-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-parent-port-ref.js) -- [parallel/test-worker-process-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-argv.js) -- [parallel/test-worker-process-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-cwd.js) -- [parallel/test-worker-process-env-shared.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-env-shared.js) -- [parallel/test-worker-process-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-env.js) -- [parallel/test-worker-process-exit-async-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-exit-async-module.js) -- [parallel/test-worker-ref-onexit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-ref-onexit.js) -- [parallel/test-worker-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-ref.js) -- [parallel/test-worker-relative-path-double-dot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-relative-path-double-dot.js) -- [parallel/test-worker-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-relative-path.js) -- [parallel/test-worker-resource-limits.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-resource-limits.js) -- [parallel/test-worker-safe-getters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-safe-getters.js) -- [parallel/test-worker-sharedarraybuffer-from-worker-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js) -- [parallel/test-worker-stack-overflow-stack-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stack-overflow-stack-size.js) -- [parallel/test-worker-stack-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stack-overflow.js) -- [parallel/test-worker-stdio-from-preload-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stdio-from-preload-module.js) -- [parallel/test-worker-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stdio.js) -- [parallel/test-worker-syntax-error-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-syntax-error-file.js) -- [parallel/test-worker-syntax-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-syntax-error.js) -- [parallel/test-worker-terminate-http2-respond-with-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-http2-respond-with-file.js) -- [parallel/test-worker-terminate-microtask-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-microtask-loop.js) -- [parallel/test-worker-terminate-nested.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-nested.js) -- [parallel/test-worker-terminate-null-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-null-handler.js) -- [parallel/test-worker-terminate-ref-public-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-ref-public-port.js) -- [parallel/test-worker-terminate-source-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-source-map.js) -- [parallel/test-worker-terminate-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-timers.js) -- [parallel/test-worker-terminate-unrefed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-unrefed.js) -- [parallel/test-worker-track-unmanaged-fds.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-track-unmanaged-fds.js) -- [parallel/test-worker-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-type-check.js) -- [parallel/test-worker-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-uncaught-exception-async.js) -- [parallel/test-worker-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-uncaught-exception.js) -- [parallel/test-worker-unref-from-message-during-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-unref-from-message-during-exit.js) -- [parallel/test-worker-unsupported-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-unsupported-path.js) -- [parallel/test-worker-unsupported-things.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-unsupported-things.js) -- [parallel/test-worker-vm-context-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-vm-context-terminate.js) -- [parallel/test-worker-voluntarily-exit-followed-by-addition.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-voluntarily-exit-followed-by-addition.js) -- [parallel/test-worker-voluntarily-exit-followed-by-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-voluntarily-exit-followed-by-throw.js) -- [parallel/test-worker-workerdata-messageport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-workerdata-messageport.js) -- [parallel/test-worker-workerdata-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-workerdata-sharedarraybuffer.js) -- [parallel/test-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker.js) -- [parallel/test-wrap-js-stream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-destroy.js) -- [parallel/test-wrap-js-stream-duplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-duplex.js) -- [parallel/test-wrap-js-stream-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-exceptions.js) -- [parallel/test-wrap-js-stream-read-stop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-read-stop.js) -- [parallel/test-x509-escaping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-x509-escaping.js) -- [parallel/test-zlib-brotli-16GB.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-16GB.js) -- [parallel/test-zlib-brotli-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-flush.js) -- [parallel/test-zlib-brotli-from-brotli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-from-brotli.js) -- [parallel/test-zlib-brotli-from-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-from-string.js) -- [parallel/test-zlib-brotli-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-kmaxlength-rangeerror.js) -- [parallel/test-zlib-brotli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli.js) -- [parallel/test-zlib-bytes-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-bytes-read.js) -- [parallel/test-zlib-close-in-ondata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-close-in-ondata.js) -- [parallel/test-zlib-const.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-const.js) -- [parallel/test-zlib-create-raw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-create-raw.js) -- [parallel/test-zlib-deflate-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-deflate-constructors.js) -- [parallel/test-zlib-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-destroy.js) -- [parallel/test-zlib-dictionary-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-dictionary-fail.js) -- [parallel/test-zlib-dictionary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-dictionary.js) -- [parallel/test-zlib-failed-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-failed-init.js) -- [parallel/test-zlib-flush-drain-longblock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-drain-longblock.js) -- [parallel/test-zlib-flush-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-drain.js) -- [parallel/test-zlib-flush-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-flags.js) -- [parallel/test-zlib-flush-write-sync-interleaved.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-write-sync-interleaved.js) -- [parallel/test-zlib-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush.js) -- [parallel/test-zlib-from-concatenated-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-from-concatenated-gzip.js) -- [parallel/test-zlib-from-gzip-with-trailing-garbage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js) -- [parallel/test-zlib-from-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-from-gzip.js) -- [parallel/test-zlib-invalid-arg-value-brotli-compress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js) -- [parallel/test-zlib-invalid-input-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-invalid-input-memory.js) -- [parallel/test-zlib-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-kmaxlength-rangeerror.js) -- [parallel/test-zlib-maxOutputLength.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-maxOutputLength.js) -- [parallel/test-zlib-not-string-or-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-not-string-or-buffer.js) -- [parallel/test-zlib-object-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-object-write.js) -- [parallel/test-zlib-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-params.js) -- [parallel/test-zlib-premature-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-premature-end.js) -- [parallel/test-zlib-reset-before-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-reset-before-write.js) -- [parallel/test-zlib-unused-weak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-unused-weak.js) -- [parallel/test-zlib-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-write-after-close.js) -- [parallel/test-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib.js) -- [pseudo-tty/readline-dumb-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/readline-dumb-tty.js) -- [pseudo-tty/ref_keeps_node_running.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/ref_keeps_node_running.js) -- [pseudo-tty/repl-dumb-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/repl-dumb-tty.js) -- [pseudo-tty/stdin-setrawmode.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/stdin-setrawmode.js) -- [pseudo-tty/test-assert-colors.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-assert-colors.js) -- [pseudo-tty/test-assert-no-color.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-assert-no-color.js) -- [pseudo-tty/test-assert-position-indicator.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-assert-position-indicator.js) -- [pseudo-tty/test-async-wrap-getasyncid-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-async-wrap-getasyncid-tty.js) -- [pseudo-tty/test-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-fatal-error.js) -- [pseudo-tty/test-handle-wrap-hasref-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-handle-wrap-hasref-tty.js) -- [pseudo-tty/test-readable-tty-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-readable-tty-keepalive.js) -- [pseudo-tty/test-repl-external-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-repl-external-module.js) -- [pseudo-tty/test-set-raw-mode-reset-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js) -- [pseudo-tty/test-set-raw-mode-reset-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-set-raw-mode-reset-signal.js) -- [pseudo-tty/test-set-raw-mode-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-set-raw-mode-reset.js) -- [pseudo-tty/test-stderr-stdout-handle-sigwinch.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js) -- [pseudo-tty/test-stdin-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-stdin-write.js) -- [pseudo-tty/test-stdout-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-stdout-read.js) -- [pseudo-tty/test-trace-sigint-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-trace-sigint-disabled.js) -- [pseudo-tty/test-trace-sigint-on-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-trace-sigint-on-idle.js) -- [pseudo-tty/test-trace-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-trace-sigint.js) -- [pseudo-tty/test-tty-color-support.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-color-support.js) -- [pseudo-tty/test-tty-isatty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-isatty.js) -- [pseudo-tty/test-tty-stdin-call-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-stdin-call-end.js) -- [pseudo-tty/test-tty-stdout-resize.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-stdout-resize.js) -- [pseudo-tty/test-tty-stream-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-stream-constructors.js) -- [pseudo-tty/test-tty-window-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-window-size.js) -- [pseudo-tty/test-tty-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-wrap.js) -- [pummel/test-child-process-spawn-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-child-process-spawn-loop.js) -- [pummel/test-crypto-dh-hash.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-crypto-dh-hash.js) -- [pummel/test-crypto-dh-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-crypto-dh-keys.js) -- [pummel/test-crypto-timing-safe-equal-benchmarks.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-crypto-timing-safe-equal-benchmarks.js) -- [pummel/test-dh-regr.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-dh-regr.js) -- [pummel/test-fs-largefile.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-largefile.js) -- [pummel/test-fs-readfile-tostring-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-readfile-tostring-fail.js) -- [pummel/test-fs-watch-file-slow.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-file-slow.js) -- [pummel/test-fs-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-file.js) -- [pummel/test-fs-watch-non-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-non-recursive.js) -- [pummel/test-fs-watch-system-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-system-limit.js) -- [pummel/test-hash-seed.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-hash-seed.js) -- [pummel/test-heapdump-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-dns.js) -- [pummel/test-heapdump-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-env.js) -- [pummel/test-heapdump-fs-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-fs-promise.js) -- [pummel/test-heapdump-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-http2.js) -- [pummel/test-heapdump-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-inspector.js) -- [pummel/test-heapdump-shadow-realm.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-shadow-realm.js) -- [pummel/test-heapdump-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-tls.js) -- [pummel/test-heapdump-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-worker.js) -- [pummel/test-heapdump-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-zlib.js) -- [pummel/test-heapsnapshot-near-heap-limit-big.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit-big.js) -- [pummel/test-heapsnapshot-near-heap-limit-bounded.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit-bounded.js) -- [pummel/test-heapsnapshot-near-heap-limit-by-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit-by-api.js) -- [pummel/test-heapsnapshot-near-heap-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit.js) -- [pummel/test-http-many-keep-alive-connections.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-http-many-keep-alive-connections.js) -- [pummel/test-http-upload-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-http-upload-timeout.js) -- [pummel/test-https-large-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-https-large-response.js) -- [pummel/test-https-no-reader.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-https-no-reader.js) -- [pummel/test-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-keep-alive.js) -- [pummel/test-net-many-clients.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-many-clients.js) -- [pummel/test-net-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-pause.js) -- [pummel/test-net-pingpong-delay.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-pingpong-delay.js) -- [pummel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-pingpong.js) -- [pummel/test-net-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-timeout.js) -- [pummel/test-net-timeout2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-timeout2.js) -- [pummel/test-net-write-callbacks.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-write-callbacks.js) -- [pummel/test-next-tick-infinite-calls.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-next-tick-infinite-calls.js) -- [pummel/test-policy-integrity-dep.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-dep.js) -- [pummel/test-policy-integrity-parent-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-parent-commonjs.js) -- [pummel/test-policy-integrity-parent-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-parent-module.js) -- [pummel/test-policy-integrity-parent-no-package-json.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-parent-no-package-json.js) -- [pummel/test-policy-integrity-worker-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-worker-commonjs.js) -- [pummel/test-policy-integrity-worker-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-worker-module.js) -- [pummel/test-policy-integrity-worker-no-package-json.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-worker-no-package-json.js) -- [pummel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-process-cpuUsage.js) -- [pummel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-process-hrtime.js) -- [pummel/test-regress-GH-892.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-regress-GH-892.js) -- [pummel/test-stream-pipe-multi.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-stream-pipe-multi.js) -- [pummel/test-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-timers.js) -- [pummel/test-tls-server-large-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-tls-server-large-request.js) -- [pummel/test-tls-throttle.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-tls-throttle.js) -- [pummel/test-vm-memleak.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-vm-memleak.js) -- [pummel/test-vm-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-vm-race.js) -- [pummel/test-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-watch-file.js) -- [pummel/test-webcrypto-derivebits-pbkdf2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-webcrypto-derivebits-pbkdf2.js) -- [pummel/test-worker-take-heapsnapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-worker-take-heapsnapshot.js) -- [sequential/test-async-wrap-getasyncid.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-async-wrap-getasyncid.js) -- [sequential/test-buffer-creation-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-buffer-creation-regression.js) -- [sequential/test-child-process-emfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-child-process-emfile.js) -- [sequential/test-child-process-execsync.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-child-process-execsync.js) -- [sequential/test-child-process-pass-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-child-process-pass-fd.js) -- [sequential/test-cli-syntax-bad.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-bad.js) -- [sequential/test-cli-syntax-file-not-found.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-file-not-found.js) -- [sequential/test-cli-syntax-good.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-good.js) -- [sequential/test-cli-syntax-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-require.js) -- [sequential/test-cluster-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-inspect-brk.js) -- [sequential/test-cluster-net-listen-ipv6only-none.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-net-listen-ipv6only-none.js) -- [sequential/test-cluster-net-listen-ipv6only-rr.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-net-listen-ipv6only-rr.js) -- [sequential/test-cluster-send-handle-large-payload.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-send-handle-large-payload.js) -- [sequential/test-cpu-prof-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-default.js) -- [sequential/test-cpu-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-absolute.js) -- [sequential/test-cpu-prof-dir-and-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-and-name.js) -- [sequential/test-cpu-prof-dir-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-relative.js) -- [sequential/test-cpu-prof-dir-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-worker.js) -- [sequential/test-cpu-prof-drained.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-drained.js) -- [sequential/test-cpu-prof-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-exit.js) -- [sequential/test-cpu-prof-invalid-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-invalid-options.js) -- [sequential/test-cpu-prof-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-kill.js) -- [sequential/test-cpu-prof-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-name.js) -- [sequential/test-cpu-prof-worker-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-worker-argv.js) -- [sequential/test-crypto-timing-safe-equal.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-crypto-timing-safe-equal.js) -- [sequential/test-debug-prompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debug-prompt.js) -- [sequential/test-debugger-custom-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-custom-port.js) -- [sequential/test-debugger-debug-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-debug-brk.js) -- [sequential/test-debugger-invalid-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-invalid-args.js) -- [sequential/test-debugger-pid.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-pid.js) -- [sequential/test-deprecation-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-deprecation-flags.js) -- [sequential/test-dgram-bind-shared-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-dgram-bind-shared-ports.js) -- [sequential/test-dgram-implicit-bind-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-dgram-implicit-bind-failure.js) -- [sequential/test-dgram-pingpong.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-dgram-pingpong.js) -- [sequential/test-diagnostic-dir-cpu-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-diagnostic-dir-cpu-prof.js) -- [sequential/test-diagnostic-dir-heap-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-diagnostic-dir-heap-prof.js) -- [sequential/test-fs-opendir-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-opendir-recursive.js) -- [sequential/test-fs-readdir-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-readdir-recursive.js) -- [sequential/test-fs-stat-sync-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-stat-sync-overflow.js) -- [sequential/test-fs-watch.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-watch.js) -- [sequential/test-gc-http-client-onerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client-onerror.js) -- [sequential/test-gc-http-client-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client-timeout.js) -- [sequential/test-gc-http-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client.js) -- [sequential/test-get-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-get-heapsnapshot-options.js) -- [sequential/test-heapdump-flag-custom-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump-flag-custom-dir.js) -- [sequential/test-heapdump-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump-flag.js) -- [sequential/test-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump.js) -- [sequential/test-http-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-econnrefused.js) -- [sequential/test-http-keep-alive-large-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-keep-alive-large-write.js) -- [sequential/test-http-keepalive-maxsockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-keepalive-maxsockets.js) -- [sequential/test-http-max-sockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-max-sockets.js) -- [sequential/test-http-regr-gh-2928.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-regr-gh-2928.js) -- [sequential/test-http-server-keep-alive-timeout-slow-client-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-server-keep-alive-timeout-slow-client-headers.js) -- [sequential/test-http-server-keep-alive-timeout-slow-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-server-keep-alive-timeout-slow-server.js) -- [sequential/test-http2-large-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-large-file.js) -- [sequential/test-http2-max-session-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-max-session-memory.js) -- [sequential/test-http2-ping-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-ping-flood.js) -- [sequential/test-http2-settings-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-settings-flood.js) -- [sequential/test-http2-timeout-large-write-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-timeout-large-write-file.js) -- [sequential/test-http2-timeout-large-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-timeout-large-write.js) -- [sequential/test-https-connect-localport.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-https-connect-localport.js) -- [sequential/test-https-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-https-server-keep-alive-timeout.js) -- [sequential/test-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-init.js) -- [sequential/test-inspector-port-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-inspector-port-cluster.js) -- [sequential/test-module-loading.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-module-loading.js) -- [sequential/test-net-GH-5504.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-GH-5504.js) -- [sequential/test-net-better-error-messages-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-better-error-messages-port.js) -- [sequential/test-net-connect-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-connect-econnrefused.js) -- [sequential/test-net-connect-handle-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-connect-handle-econnrefused.js) -- [sequential/test-net-connect-local-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-connect-local-error.js) -- [sequential/test-net-listen-shared-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-listen-shared-ports.js) -- [sequential/test-net-localport.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-localport.js) -- [sequential/test-net-reconnect-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-reconnect-error.js) -- [sequential/test-net-response-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-response-size.js) -- [sequential/test-net-server-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-server-address.js) -- [sequential/test-net-server-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-server-bind.js) -- [sequential/test-next-tick-error-spin.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-next-tick-error-spin.js) -- [sequential/test-perf-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-perf-hooks.js) -- [sequential/test-performance-eventloopdelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-performance-eventloopdelay.js) -- [sequential/test-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-pipe.js) -- [sequential/test-process-title.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-process-title.js) -- [sequential/test-process-warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-process-warnings.js) -- [sequential/test-repl-timeout-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-repl-timeout-throw.js) -- [sequential/test-require-cache-without-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-require-cache-without-stat.js) -- [sequential/test-resolution-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-resolution-inspect-brk.js) -- [sequential/test-single-executable-application-disable-experimental-sea-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js) -- [sequential/test-single-executable-application-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-empty.js) -- [sequential/test-single-executable-application-snapshot-and-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-snapshot-and-code-cache.js) -- [sequential/test-single-executable-application-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-snapshot.js) -- [sequential/test-single-executable-application-use-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-use-code-cache.js) -- [sequential/test-single-executable-application.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application.js) -- [sequential/test-stream2-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-stream2-fs.js) -- [sequential/test-stream2-stderr-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-stream2-stderr-sync.js) -- [sequential/test-timers-block-eventloop.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-timers-block-eventloop.js) -- [sequential/test-timers-set-interval-excludes-callback-duration.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-timers-set-interval-excludes-callback-duration.js) -- [sequential/test-tls-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-connect.js) -- [sequential/test-tls-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-lookup.js) -- [sequential/test-tls-psk-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-psk-client.js) -- [sequential/test-tls-securepair-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-securepair-client.js) -- [sequential/test-tls-session-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-session-timeout.js) -- [sequential/test-util-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-util-debug.js) -- [sequential/test-vm-break-on-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-vm-break-on-sigint.js) -- [sequential/test-vm-timeout-escape-promise-module-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-vm-timeout-escape-promise-module-2.js) -- [sequential/test-vm-timeout-rethrow.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-vm-timeout-rethrow.js) -- [sequential/test-worker-eventlooputil.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-eventlooputil.js) -- [sequential/test-worker-fshandles-error-on-termination.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-fshandles-error-on-termination.js) -- [sequential/test-worker-fshandles-open-close-on-termination.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-fshandles-open-close-on-termination.js) -- [sequential/test-worker-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-heapsnapshot-options.js) -- [sequential/test-worker-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-prof.js) -- [sequential/test-write-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-write-heapsnapshot-options.js) +- [abort/test-abort-backtrace.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-backtrace.js) +- [abort/test-abort-fatal-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-fatal-error.js) +- [abort/test-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-uncaught-exception.js) +- [abort/test-addon-register-signal-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-addon-register-signal-handler.js) +- [abort/test-addon-uv-handle-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-addon-uv-handle-leak.js) +- [abort/test-http-parser-consume.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-http-parser-consume.js) +- [abort/test-process-abort-exitcode.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-process-abort-exitcode.js) +- [abort/test-signal-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-signal-handler.js) +- [abort/test-worker-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-worker-abort-uncaught-exception.js) +- [abort/test-zlib-invalid-internals-usage.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-zlib-invalid-internals-usage.js) +- [benchmark/test-bechmark-readline.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-bechmark-readline.js) +- [benchmark/test-benchmark-assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-assert.js) +- [benchmark/test-benchmark-async-hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-async-hooks.js) +- [benchmark/test-benchmark-blob.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-blob.js) +- [benchmark/test-benchmark-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-buffer.js) +- [benchmark/test-benchmark-child-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-child-process.js) +- [benchmark/test-benchmark-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-cluster.js) +- [benchmark/test-benchmark-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-crypto.js) +- [benchmark/test-benchmark-dgram.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-dgram.js) +- [benchmark/test-benchmark-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-dns.js) +- [benchmark/test-benchmark-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-domain.js) +- [benchmark/test-benchmark-es.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-es.js) +- [benchmark/test-benchmark-esm.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-esm.js) +- [benchmark/test-benchmark-events.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-events.js) +- [benchmark/test-benchmark-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-fs.js) +- [benchmark/test-benchmark-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-http.js) +- [benchmark/test-benchmark-http2.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-http2.js) +- [benchmark/test-benchmark-mime.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-mime.js) +- [benchmark/test-benchmark-misc.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-misc.js) +- [benchmark/test-benchmark-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-module.js) +- [benchmark/test-benchmark-napi.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-napi.js) +- [benchmark/test-benchmark-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-net.js) +- [benchmark/test-benchmark-os.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-os.js) +- [benchmark/test-benchmark-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-path.js) +- [benchmark/test-benchmark-policy.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-policy.js) +- [benchmark/test-benchmark-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-process.js) +- [benchmark/test-benchmark-querystring.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-querystring.js) +- [benchmark/test-benchmark-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-streams.js) +- [benchmark/test-benchmark-string_decoder.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-string_decoder.js) +- [benchmark/test-benchmark-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-timers.js) +- [benchmark/test-benchmark-tls.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-tls.js) +- [benchmark/test-benchmark-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-url.js) +- [benchmark/test-benchmark-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-util.js) +- [benchmark/test-benchmark-v8.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-v8.js) +- [benchmark/test-benchmark-validators.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-validators.js) +- [benchmark/test-benchmark-vm.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-vm.js) +- [benchmark/test-benchmark-webstreams.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-webstreams.js) +- [benchmark/test-benchmark-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-worker.js) +- [benchmark/test-benchmark-zlib.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-zlib.js) +- [es-module/test-cjs-esm-warn.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-esm-warn.js) +- [es-module/test-cjs-legacyMainResolve-permission.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-legacyMainResolve-permission.js) +- [es-module/test-cjs-legacyMainResolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-legacyMainResolve.js) +- [es-module/test-cjs-prototype-pollution.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-prototype-pollution.js) +- [es-module/test-dynamic-import-script-lifetime.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-dynamic-import-script-lifetime.js) +- [es-module/test-esm-assertionless-json-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-assertionless-json-import.js) +- [es-module/test-esm-cjs-builtins.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-cjs-builtins.js) +- [es-module/test-esm-cjs-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-cjs-exports.js) +- [es-module/test-esm-cjs-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-cjs-main.js) +- [es-module/test-esm-data-urls.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-data-urls.js) +- [es-module/test-esm-dynamic-import-attribute.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import-attribute.js) +- [es-module/test-esm-dynamic-import-commonjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import-commonjs.js) +- [es-module/test-esm-dynamic-import-mutating-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import-mutating-fs.js) +- [es-module/test-esm-dynamic-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import.js) +- [es-module/test-esm-encoded-path-native.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-encoded-path-native.js) +- [es-module/test-esm-error-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-error-cache.js) +- [es-module/test-esm-import-attributes-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-import-attributes-errors.js) +- [es-module/test-esm-import-attributes-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-import-attributes-validation.js) +- [es-module/test-esm-invalid-data-urls.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-invalid-data-urls.js) +- [es-module/test-esm-invalid-pjson.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-invalid-pjson.js) +- [es-module/test-esm-loader-cache-clearing.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-loader-cache-clearing.js) +- [es-module/test-esm-loader-modulemap.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-loader-modulemap.js) +- [es-module/test-esm-loader-search.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-loader-search.js) +- [es-module/test-esm-named-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-named-exports.js) +- [es-module/test-esm-preserve-symlinks-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-preserve-symlinks-main.js) +- [es-module/test-esm-preserve-symlinks.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-preserve-symlinks.js) +- [es-module/test-esm-repl-imports.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-repl-imports.js) +- [es-module/test-esm-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-repl.js) +- [es-module/test-esm-symlink-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-symlink-main.js) +- [es-module/test-esm-symlink-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-symlink-type.js) +- [es-module/test-esm-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-symlink.js) +- [es-module/test-esm-type-field-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-type-field-errors.js) +- [es-module/test-esm-undefined-cjs-global-like-variables.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-undefined-cjs-global-like-variables.js) +- [es-module/test-esm-unknown-extension.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-unknown-extension.js) +- [es-module/test-esm-url-extname.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-url-extname.js) +- [es-module/test-esm-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-windows.js) +- [es-module/test-loaders-hidden-from-users.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-loaders-hidden-from-users.js) +- [es-module/test-vm-compile-function-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-compile-function-leak.js) +- [es-module/test-vm-compile-function-lineoffset.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-compile-function-lineoffset.js) +- [es-module/test-vm-contextified-script-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-contextified-script-leak.js) +- [es-module/test-vm-source-text-module-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-source-text-module-leak.js) +- [es-module/test-vm-synthetic-module-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-synthetic-module-leak.js) +- [es-module/test-wasm-memory-out-of-bound.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-wasm-memory-out-of-bound.js) +- [es-module/test-wasm-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-wasm-simple.js) +- [es-module/test-wasm-web-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-wasm-web-api.js) +- [internet/test-corepack-yarn-install.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-corepack-yarn-install.js) +- [internet/test-dgram-broadcast-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-broadcast-multi-process.js) +- [internet/test-dgram-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-connect.js) +- [internet/test-dgram-membership.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-membership.js) +- [internet/test-dgram-multicast-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-multi-process.js) +- [internet/test-dgram-multicast-set-interface-lo.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-set-interface-lo.js) +- [internet/test-dgram-multicast-ssm-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-ssm-multi-process.js) +- [internet/test-dgram-multicast-ssmv6-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-ssmv6-multi-process.js) +- [internet/test-dns-any.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-any.js) +- [internet/test-dns-cares-domains.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-cares-domains.js) +- [internet/test-dns-getDefaultResultOrder.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-getDefaultResultOrder.js) +- [internet/test-dns-ipv4.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-ipv4.js) +- [internet/test-dns-ipv6.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-ipv6.js) +- [internet/test-dns-txt-sigsegv.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-txt-sigsegv.js) +- [internet/test-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns.js) +- [internet/test-http-dns-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-http-dns-fail.js) +- [internet/test-http2-issue-32922.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-http2-issue-32922.js) +- [internet/test-https-autoselectfamily-slow-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-https-autoselectfamily-slow-timeout.js) +- [internet/test-https-issue-43963.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-https-issue-43963.js) +- [internet/test-inspector-help-page.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-inspector-help-page.js) +- [internet/test-net-autoselectfamily-timeout-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-net-autoselectfamily-timeout-close.js) +- [internet/test-net-connect-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-net-connect-timeout.js) +- [internet/test-net-connect-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-net-connect-unref.js) +- [internet/test-snapshot-dns-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-snapshot-dns-lookup.js) +- [internet/test-snapshot-dns-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-snapshot-dns-resolve.js) +- [internet/test-tls-add-ca-cert.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-tls-add-ca-cert.js) +- [internet/test-tls-autoselectfamily-backing-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-tls-autoselectfamily-backing-socket.js) +- [internet/test-tls-autoselectfamily-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-tls-autoselectfamily-servername.js) +- [internet/test-trace-events-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-trace-events-dns.js) +- [internet/test-uv-threadpool-schedule.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-uv-threadpool-schedule.js) +- [known_issues/test-cli-print-var-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-cli-print-var-crypto.js) +- [known_issues/test-cwd-enoent-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-cwd-enoent-file.js) +- [known_issues/test-dgram-bind-shared-ports-after-port-0.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js) +- [known_issues/test-fs-writeFileSync-invalid-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-fs-writeFileSync-invalid-windows.js) +- [known_issues/test-http-path-contains-unicode.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-http-path-contains-unicode.js) +- [known_issues/test-inspector-cluster-port-clash.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-inspector-cluster-port-clash.js) +- [known_issues/test-permission-model-path-resolution.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-permission-model-path-resolution.js) +- [known_issues/test-repl-require-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-repl-require-context.js) +- [known_issues/test-stdin-is-always-net.socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-stdin-is-always-net.socket.js) +- [known_issues/test-stream-writable-sync-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-stream-writable-sync-error.js) +- [known_issues/test-url-parse-conformance.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-url-parse-conformance.js) +- [known_issues/test-vm-function-declaration-uses-define.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-function-declaration-uses-define.js) +- [known_issues/test-vm-ownkeys.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-ownkeys.js) +- [known_issues/test-vm-ownpropertynames.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-ownpropertynames.js) +- [known_issues/test-vm-ownpropertysymbols.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-ownpropertysymbols.js) +- [known_issues/test-vm-timeout-escape-nexttick.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-timeout-escape-nexttick.js) +- [known_issues/test-vm-timeout-escape-queuemicrotask.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-timeout-escape-queuemicrotask.js) +- [message/assert_throws_stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/assert_throws_stack.js) +- [message/eval_messages.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/eval_messages.js) +- [message/internal_assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/internal_assert.js) +- [message/internal_assert_fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/internal_assert_fail.js) +- [message/max_tick_depth.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/max_tick_depth.js) +- [message/nexttick_throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/nexttick_throw.js) +- [message/stdin_messages.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/stdin_messages.js) +- [message/util-inspect-error-cause.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/util-inspect-error-cause.js) +- [message/util_inspect_error.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/util_inspect_error.js) +- [parallel/test-abortcontroller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-abortcontroller.js) +- [parallel/test-aborted-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-aborted-util.js) +- [parallel/test-abortsignal-cloneable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-abortsignal-cloneable.js) +- [parallel/test-accessor-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-accessor-properties.js) +- [parallel/test-arm-math-illegal-instruction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-arm-math-illegal-instruction.js) +- [parallel/test-assert-builtins-not-read-from-filesystem.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-builtins-not-read-from-filesystem.js) +- [parallel/test-assert-calltracker-calls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-calls.js) +- [parallel/test-assert-calltracker-getCalls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-getCalls.js) +- [parallel/test-assert-calltracker-report.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-report.js) +- [parallel/test-assert-calltracker-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-verify.js) +- [parallel/test-assert-checktag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-checktag.js) +- [parallel/test-assert-deep.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-deep.js) +- [parallel/test-assert-esm-cjs-message-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-esm-cjs-message-verify.js) +- [parallel/test-assert-fail-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-fail-deprecation.js) +- [parallel/test-assert-first-line.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-first-line.js) +- [parallel/test-assert-if-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-if-error.js) +- [parallel/test-assert-typedarray-deepequal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-typedarray-deepequal.js) +- [parallel/test-async-hooks-async-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-async-await.js) +- [parallel/test-async-hooks-asyncresource-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-asyncresource-constructor.js) +- [parallel/test-async-hooks-close-during-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-close-during-destroy.js) +- [parallel/test-async-hooks-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-constructor.js) +- [parallel/test-async-hooks-correctly-switch-promise-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-correctly-switch-promise-hook.js) +- [parallel/test-async-hooks-destroy-on-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-destroy-on-gc.js) +- [parallel/test-async-hooks-disable-during-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-disable-during-promise.js) +- [parallel/test-async-hooks-disable-gc-tracking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-disable-gc-tracking.js) +- [parallel/test-async-hooks-enable-before-promise-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-before-promise-resolve.js) +- [parallel/test-async-hooks-enable-disable-enable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-disable-enable.js) +- [parallel/test-async-hooks-enable-disable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-disable.js) +- [parallel/test-async-hooks-enable-during-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-during-promise.js) +- [parallel/test-async-hooks-enable-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-recursive.js) +- [parallel/test-async-hooks-execution-async-resource-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-execution-async-resource-await.js) +- [parallel/test-async-hooks-execution-async-resource.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-execution-async-resource.js) +- [parallel/test-async-hooks-fatal-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-fatal-error.js) +- [parallel/test-async-hooks-http-agent-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-http-agent-destroy.js) +- [parallel/test-async-hooks-http-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-http-agent.js) +- [parallel/test-async-hooks-http-parser-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-http-parser-destroy.js) +- [parallel/test-async-hooks-prevent-double-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-prevent-double-destroy.js) +- [parallel/test-async-hooks-promise-enable-disable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-promise-enable-disable.js) +- [parallel/test-async-hooks-promise-triggerid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-promise-triggerid.js) +- [parallel/test-async-hooks-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-promise.js) +- [parallel/test-async-hooks-recursive-stack-runInAsyncScope.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-recursive-stack-runInAsyncScope.js) +- [parallel/test-async-hooks-run-in-async-scope-caught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js) +- [parallel/test-async-hooks-run-in-async-scope-this-arg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js) +- [parallel/test-async-hooks-top-level-clearimmediate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-top-level-clearimmediate.js) +- [parallel/test-async-hooks-vm-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-vm-gc.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-1.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-2.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-3.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-4.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-4.js) +- [parallel/test-async-local-storage-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-bind.js) +- [parallel/test-async-local-storage-contexts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-contexts.js) +- [parallel/test-async-local-storage-deep-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-deep-stack.js) +- [parallel/test-async-local-storage-exit-does-not-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-exit-does-not-leak.js) +- [parallel/test-async-local-storage-http-multiclients.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-http-multiclients.js) +- [parallel/test-async-local-storage-snapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-snapshot.js) +- [parallel/test-async-wrap-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-constructor.js) +- [parallel/test-async-wrap-destroyid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-destroyid.js) +- [parallel/test-async-wrap-pop-id-during-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-pop-id-during-load.js) +- [parallel/test-async-wrap-promise-after-enabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-promise-after-enabled.js) +- [parallel/test-async-wrap-tlssocket-asyncreset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-tlssocket-asyncreset.js) +- [parallel/test-async-wrap-trigger-id.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-trigger-id.js) +- [parallel/test-async-wrap-uncaughtexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-uncaughtexception.js) +- [parallel/test-asyncresource-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-asyncresource-bind.js) +- [parallel/test-atomics-wake.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-atomics-wake.js) +- [parallel/test-bash-completion.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-bash-completion.js) +- [parallel/test-beforeexit-event-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-beforeexit-event-exit.js) +- [parallel/test-benchmark-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-benchmark-cli.js) +- [parallel/test-binding-constants.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-binding-constants.js) +- [parallel/test-blob-buffer-too-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob-buffer-too-large.js) +- [parallel/test-blob-createobjecturl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob-createobjecturl.js) +- [parallel/test-blob-file-backed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob-file-backed.js) +- [parallel/test-blob.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob.js) +- [parallel/test-blocklist-clone.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blocklist-clone.js) +- [parallel/test-bootstrap-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-bootstrap-modules.js) +- [parallel/test-broadcastchannel-custom-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-broadcastchannel-custom-inspect.js) +- [parallel/test-buffer-backing-arraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-backing-arraybuffer.js) +- [parallel/test-buffer-compare.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-compare.js) +- [parallel/test-buffer-constructor-deprecation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-constructor-deprecation-error.js) +- [parallel/test-buffer-constructor-node-modules-paths.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-constructor-node-modules-paths.js) +- [parallel/test-buffer-constructor-outside-node-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-constructor-outside-node-modules.js) +- [parallel/test-buffer-fill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-fill.js) +- [parallel/test-buffer-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-inspect.js) +- [parallel/test-buffer-pending-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-pending-deprecation.js) +- [parallel/test-buffer-pool-untransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-pool-untransferable.js) +- [parallel/test-buffer-prototype-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-prototype-inspect.js) +- [parallel/test-buffer-set-inspect-max-bytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-set-inspect-max-bytes.js) +- [parallel/test-buffer-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-sharedarraybuffer.js) +- [parallel/test-buffer-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-write.js) +- [parallel/test-c-ares.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-c-ares.js) +- [parallel/test-child-process-advanced-serialization-largebuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-advanced-serialization-largebuffer.js) +- [parallel/test-child-process-advanced-serialization.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-advanced-serialization.js) +- [parallel/test-child-process-bad-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-bad-stdio.js) +- [parallel/test-child-process-can-write-to-stdout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-can-write-to-stdout.js) +- [parallel/test-child-process-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-constructor.js) +- [parallel/test-child-process-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-cwd.js) +- [parallel/test-child-process-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-destroy.js) +- [parallel/test-child-process-detached.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-detached.js) +- [parallel/test-child-process-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-disconnect.js) +- [parallel/test-child-process-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-env.js) +- [parallel/test-child-process-exec-any-shells-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-any-shells-windows.js) +- [parallel/test-child-process-exec-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-encoding.js) +- [parallel/test-child-process-exec-std-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-std-encoding.js) +- [parallel/test-child-process-exec-timeout-expire.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-timeout-expire.js) +- [parallel/test-child-process-exec-timeout-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-timeout-kill.js) +- [parallel/test-child-process-exec-timeout-not-expired.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-timeout-not-expired.js) +- [parallel/test-child-process-execFile-promisified-abortController.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-execFile-promisified-abortController.js) +- [parallel/test-child-process-execfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-execfile.js) +- [parallel/test-child-process-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exit-code.js) +- [parallel/test-child-process-fork-abort-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-abort-signal.js) +- [parallel/test-child-process-fork-and-spawn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-and-spawn.js) +- [parallel/test-child-process-fork-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-args.js) +- [parallel/test-child-process-fork-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-close.js) +- [parallel/test-child-process-fork-closed-channel-segfault.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-closed-channel-segfault.js) +- [parallel/test-child-process-fork-detached.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-detached.js) +- [parallel/test-child-process-fork-dgram.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-dgram.js) +- [parallel/test-child-process-fork-exec-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-exec-argv.js) +- [parallel/test-child-process-fork-exec-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-exec-path.js) +- [parallel/test-child-process-fork-getconnections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-getconnections.js) +- [parallel/test-child-process-fork-net-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-net-server.js) +- [parallel/test-child-process-fork-net-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-net-socket.js) +- [parallel/test-child-process-fork-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-net.js) +- [parallel/test-child-process-fork-no-shell.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-no-shell.js) +- [parallel/test-child-process-fork-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-ref.js) +- [parallel/test-child-process-fork-ref2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-ref2.js) +- [parallel/test-child-process-fork-stdio-string-variant.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-stdio-string-variant.js) +- [parallel/test-child-process-fork-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-stdio.js) +- [parallel/test-child-process-fork-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-timeout-kill-signal.js) +- [parallel/test-child-process-fork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork.js) +- [parallel/test-child-process-fork3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork3.js) +- [parallel/test-child-process-http-socket-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-http-socket-leak.js) +- [parallel/test-child-process-internal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-internal.js) +- [parallel/test-child-process-ipc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-ipc.js) +- [parallel/test-child-process-no-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-no-deprecation.js) +- [parallel/test-child-process-pipe-dataflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-pipe-dataflow.js) +- [parallel/test-child-process-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-promisified.js) +- [parallel/test-child-process-recv-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-recv-handle.js) +- [parallel/test-child-process-reject-null-bytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-reject-null-bytes.js) +- [parallel/test-child-process-send-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-after-close.js) +- [parallel/test-child-process-send-cb.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-cb.js) +- [parallel/test-child-process-send-keep-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-keep-open.js) +- [parallel/test-child-process-send-returns-boolean.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-returns-boolean.js) +- [parallel/test-child-process-send-type-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-type-error.js) +- [parallel/test-child-process-send-utf8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-utf8.js) +- [parallel/test-child-process-server-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-server-close.js) +- [parallel/test-child-process-silent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-silent.js) +- [parallel/test-child-process-spawn-argv0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-argv0.js) +- [parallel/test-child-process-spawn-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-controller.js) +- [parallel/test-child-process-spawn-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-error.js) +- [parallel/test-child-process-spawn-shell.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-shell.js) +- [parallel/test-child-process-spawn-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-timeout-kill-signal.js) +- [parallel/test-child-process-spawn-typeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-typeerror.js) +- [parallel/test-child-process-spawnsync-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-env.js) +- [parallel/test-child-process-spawnsync-input.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-input.js) +- [parallel/test-child-process-spawnsync-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-kill-signal.js) +- [parallel/test-child-process-spawnsync-shell.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-shell.js) +- [parallel/test-child-process-spawnsync-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-timeout.js) +- [parallel/test-child-process-stdin-ipc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdin-ipc.js) +- [parallel/test-child-process-stdin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdin.js) +- [parallel/test-child-process-stdio-big-write-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-big-write-end.js) +- [parallel/test-child-process-stdio-inherit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-inherit.js) +- [parallel/test-child-process-stdio-merge-stdouts-into-cat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-merge-stdouts-into-cat.js) +- [parallel/test-child-process-stdio-overlapped.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-overlapped.js) +- [parallel/test-child-process-stdio-reuse-readable-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-reuse-readable-stdio.js) +- [parallel/test-child-process-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio.js) +- [parallel/test-child-process-stdout-flush-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdout-flush-exit.js) +- [parallel/test-child-process-stdout-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdout-flush.js) +- [parallel/test-child-process-stdout-ipc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdout-ipc.js) +- [parallel/test-child-process-uid-gid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-uid-gid.js) +- [parallel/test-child-process-validate-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-validate-stdio.js) +- [parallel/test-child-process-windows-hide.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-windows-hide.js) +- [parallel/test-cli-bad-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-bad-options.js) +- [parallel/test-cli-eval-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-eval-event.js) +- [parallel/test-cli-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-eval.js) +- [parallel/test-cli-node-options-disallowed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-node-options-disallowed.js) +- [parallel/test-cli-node-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-node-options.js) +- [parallel/test-cli-node-print-help.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-node-print-help.js) +- [parallel/test-cli-options-negation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-options-negation.js) +- [parallel/test-cli-options-precedence.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-options-precedence.js) +- [parallel/test-cli-permission-deny-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-permission-deny-fs.js) +- [parallel/test-cli-permission-multiple-allow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-permission-multiple-allow.js) +- [parallel/test-cli-syntax-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-syntax-eval.js) +- [parallel/test-cli-syntax-piped-bad.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-syntax-piped-bad.js) +- [parallel/test-cli-syntax-piped-good.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-syntax-piped-good.js) +- [parallel/test-client-request-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-client-request-destroy.js) +- [parallel/test-cluster-accept-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-accept-fail.js) +- [parallel/test-cluster-advanced-serialization.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-advanced-serialization.js) +- [parallel/test-cluster-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-basic.js) +- [parallel/test-cluster-bind-privileged-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-bind-privileged-port.js) +- [parallel/test-cluster-bind-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-bind-twice.js) +- [parallel/test-cluster-call-and-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-call-and-destroy.js) +- [parallel/test-cluster-child-index-dgram.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-child-index-dgram.js) +- [parallel/test-cluster-child-index-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-child-index-net.js) +- [parallel/test-cluster-concurrent-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-concurrent-disconnect.js) +- [parallel/test-cluster-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-cwd.js) +- [parallel/test-cluster-dgram-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-1.js) +- [parallel/test-cluster-dgram-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-2.js) +- [parallel/test-cluster-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-bind-fd.js) +- [parallel/test-cluster-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-ipv6only.js) +- [parallel/test-cluster-dgram-reuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-reuse.js) +- [parallel/test-cluster-disconnect-before-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-before-exit.js) +- [parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js) +- [parallel/test-cluster-disconnect-idle-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-idle-worker.js) +- [parallel/test-cluster-disconnect-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-leak.js) +- [parallel/test-cluster-disconnect-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-race.js) +- [parallel/test-cluster-disconnect-unshared-tcp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-unshared-tcp.js) +- [parallel/test-cluster-disconnect-unshared-udp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-unshared-udp.js) +- [parallel/test-cluster-disconnect-with-no-workers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-with-no-workers.js) +- [parallel/test-cluster-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect.js) +- [parallel/test-cluster-eaccess.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-eaccess.js) +- [parallel/test-cluster-eaddrinuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-eaddrinuse.js) +- [parallel/test-cluster-fork-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-fork-env.js) +- [parallel/test-cluster-fork-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-fork-stdio.js) +- [parallel/test-cluster-fork-windowsHide.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-fork-windowsHide.js) +- [parallel/test-cluster-http-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-http-pipe.js) +- [parallel/test-cluster-invalid-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-invalid-message.js) +- [parallel/test-cluster-ipc-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-ipc-throw.js) +- [parallel/test-cluster-kill-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-kill-disconnect.js) +- [parallel/test-cluster-kill-infinite-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-kill-infinite-loop.js) +- [parallel/test-cluster-listen-pipe-readable-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-listen-pipe-readable-writable.js) +- [parallel/test-cluster-listening-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-listening-port.js) +- [parallel/test-cluster-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-message.js) +- [parallel/test-cluster-net-listen-backlog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen-backlog.js) +- [parallel/test-cluster-net-listen-ipv6only-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen-ipv6only-false.js) +- [parallel/test-cluster-net-listen-relative-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen-relative-path.js) +- [parallel/test-cluster-net-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen.js) +- [parallel/test-cluster-net-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-send.js) +- [parallel/test-cluster-net-server-drop-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-server-drop-connection.js) +- [parallel/test-cluster-primary-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-primary-error.js) +- [parallel/test-cluster-primary-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-primary-kill.js) +- [parallel/test-cluster-process-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-process-disconnect.js) +- [parallel/test-cluster-rr-domain-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-domain-listen.js) +- [parallel/test-cluster-rr-handle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-handle-close.js) +- [parallel/test-cluster-rr-handle-keep-loop-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-handle-keep-loop-alive.js) +- [parallel/test-cluster-rr-handle-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-handle-ref-unref.js) +- [parallel/test-cluster-rr-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-ref.js) +- [parallel/test-cluster-send-deadlock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-send-deadlock.js) +- [parallel/test-cluster-send-handle-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-send-handle-twice.js) +- [parallel/test-cluster-send-socket-to-worker-http-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-send-socket-to-worker-http-server.js) +- [parallel/test-cluster-server-restart-none.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-server-restart-none.js) +- [parallel/test-cluster-server-restart-rr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-server-restart-rr.js) +- [parallel/test-cluster-setup-primary-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-argv.js) +- [parallel/test-cluster-setup-primary-cumulative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-cumulative.js) +- [parallel/test-cluster-setup-primary-emit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-emit.js) +- [parallel/test-cluster-setup-primary-multiple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-multiple.js) +- [parallel/test-cluster-setup-primary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary.js) +- [parallel/test-cluster-shared-handle-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-shared-handle-bind-error.js) +- [parallel/test-cluster-shared-handle-bind-privileged-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-shared-handle-bind-privileged-port.js) +- [parallel/test-cluster-shared-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-shared-leak.js) +- [parallel/test-cluster-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-uncaught-exception.js) +- [parallel/test-cluster-worker-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-constructor.js) +- [parallel/test-cluster-worker-death.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-death.js) +- [parallel/test-cluster-worker-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-destroy.js) +- [parallel/test-cluster-worker-disconnect-on-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-disconnect-on-error.js) +- [parallel/test-cluster-worker-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-disconnect.js) +- [parallel/test-cluster-worker-events.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-events.js) +- [parallel/test-cluster-worker-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-exit.js) +- [parallel/test-cluster-worker-forced-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-forced-exit.js) +- [parallel/test-cluster-worker-handle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-handle-close.js) +- [parallel/test-cluster-worker-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-init.js) +- [parallel/test-cluster-worker-isconnected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-isconnected.js) +- [parallel/test-cluster-worker-isdead.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-isdead.js) +- [parallel/test-cluster-worker-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-kill-signal.js) +- [parallel/test-cluster-worker-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-kill.js) +- [parallel/test-cluster-worker-no-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-no-exit.js) +- [parallel/test-cluster-worker-wait-server-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-wait-server-close.js) +- [parallel/test-code-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-code-cache.js) +- [parallel/test-common-countdown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-countdown.js) +- [parallel/test-common-expect-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-expect-warning.js) +- [parallel/test-common-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-gc.js) +- [parallel/test-common-must-not-call.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-must-not-call.js) +- [parallel/test-common.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common.js) +- [parallel/test-console-assign-undefined.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-assign-undefined.js) +- [parallel/test-console-clear.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-clear.js) +- [parallel/test-console-count.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-count.js) +- [parallel/test-console-formatTime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-formatTime.js) +- [parallel/test-console-instance.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-instance.js) +- [parallel/test-console-issue-43095.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-issue-43095.js) +- [parallel/test-console-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-methods.js) +- [parallel/test-console-not-call-toString.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-not-call-toString.js) +- [parallel/test-console-self-assign.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-self-assign.js) +- [parallel/test-console-stdio-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-stdio-setters.js) +- [parallel/test-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console.js) +- [parallel/test-constants.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-constants.js) +- [parallel/test-corepack-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-corepack-version.js) +- [parallel/test-coverage-with-inspector-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-coverage-with-inspector-disabled.js) +- [parallel/test-crypto-aes-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-aes-wrap.js) +- [parallel/test-crypto-async-sign-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-async-sign-verify.js) +- [parallel/test-crypto-authenticated-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-authenticated-stream.js) +- [parallel/test-crypto-authenticated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-authenticated.js) +- [parallel/test-crypto-certificate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-certificate.js) +- [parallel/test-crypto-cipher-decipher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-cipher-decipher.js) +- [parallel/test-crypto-cipheriv-decipheriv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-cipheriv-decipheriv.js) +- [parallel/test-crypto-classes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-classes.js) +- [parallel/test-crypto-des3-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-des3-wrap.js) +- [parallel/test-crypto-dh-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-constructor.js) +- [parallel/test-crypto-dh-curves.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-curves.js) +- [parallel/test-crypto-dh-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-errors.js) +- [parallel/test-crypto-dh-generate-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-generate-keys.js) +- [parallel/test-crypto-dh-group-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-group-setters.js) +- [parallel/test-crypto-dh-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-leak.js) +- [parallel/test-crypto-dh-modp2-views.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-modp2-views.js) +- [parallel/test-crypto-dh-modp2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-modp2.js) +- [parallel/test-crypto-dh-odd-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-odd-key.js) +- [parallel/test-crypto-dh-padding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-padding.js) +- [parallel/test-crypto-dh-stateless.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-stateless.js) +- [parallel/test-crypto-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-domain.js) +- [parallel/test-crypto-domains.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-domains.js) +- [parallel/test-crypto-ecb.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-ecb.js) +- [parallel/test-crypto-ecdh-convert-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-ecdh-convert-key.js) +- [parallel/test-crypto-encoding-validation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-encoding-validation-error.js) +- [parallel/test-crypto-fips.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-fips.js) +- [parallel/test-crypto-from-binary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-from-binary.js) +- [parallel/test-crypto-getcipherinfo.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-getcipherinfo.js) +- [parallel/test-crypto-hash-stream-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-hash-stream-pipe.js) +- [parallel/test-crypto-key-objects-messageport.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-key-objects-messageport.js) +- [parallel/test-crypto-key-objects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-key-objects.js) +- [parallel/test-crypto-keygen-async-dsa-key-object.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-dsa-key-object.js) +- [parallel/test-crypto-keygen-async-dsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-dsa.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk.js) +- [parallel/test-crypto-keygen-async-encrypted-private-key-der.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-encrypted-private-key-der.js) +- [parallel/test-crypto-keygen-async-encrypted-private-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-encrypted-private-key.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve.js) +- [parallel/test-crypto-keygen-async-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-rsa.js) +- [parallel/test-crypto-keygen-bit-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-bit-length.js) +- [parallel/test-crypto-keygen-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-deprecation.js) +- [parallel/test-crypto-keygen-dh-classic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-dh-classic.js) +- [parallel/test-crypto-keygen-duplicate-deprecated-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js) +- [parallel/test-crypto-keygen-eddsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-eddsa.js) +- [parallel/test-crypto-keygen-empty-passphrase-no-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js) +- [parallel/test-crypto-keygen-empty-passphrase-no-prompt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-empty-passphrase-no-prompt.js) +- [parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js) +- [parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js) +- [parallel/test-crypto-keygen-key-object-without-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-key-object-without-encoding.js) +- [parallel/test-crypto-keygen-key-objects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-key-objects.js) +- [parallel/test-crypto-keygen-missing-oid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-missing-oid.js) +- [parallel/test-crypto-keygen-no-rsassa-pss-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-no-rsassa-pss-params.js) +- [parallel/test-crypto-keygen-non-standard-public-exponent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-non-standard-public-exponent.js) +- [parallel/test-crypto-keygen-promisify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-promisify.js) +- [parallel/test-crypto-keygen-rfc8017-9-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-rfc8017-9-1.js) +- [parallel/test-crypto-keygen-rfc8017-a-2-3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js) +- [parallel/test-crypto-keygen-rsa-pss.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-rsa-pss.js) +- [parallel/test-crypto-keygen-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-sync.js) +- [parallel/test-crypto-keygen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen.js) +- [parallel/test-crypto-lazy-transform-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-lazy-transform-writable.js) +- [parallel/test-crypto-no-algorithm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-no-algorithm.js) +- [parallel/test-crypto-op-during-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-op-during-process-exit.js) +- [parallel/test-crypto-padding-aes256.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-padding-aes256.js) +- [parallel/test-crypto-padding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-padding.js) +- [parallel/test-crypto-private-decrypt-gh32240.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-private-decrypt-gh32240.js) +- [parallel/test-crypto-psychic-signatures.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-psychic-signatures.js) +- [parallel/test-crypto-publicDecrypt-fails-first-time.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-publicDecrypt-fails-first-time.js) +- [parallel/test-crypto-random.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-random.js) +- [parallel/test-crypto-randomfillsync-regression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-randomfillsync-regression.js) +- [parallel/test-crypto-randomuuid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-randomuuid.js) +- [parallel/test-crypto-rsa-dsa-revert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-rsa-dsa-revert.js) +- [parallel/test-crypto-rsa-dsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-rsa-dsa.js) +- [parallel/test-crypto-scrypt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-scrypt.js) +- [parallel/test-crypto-secure-heap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-secure-heap.js) +- [parallel/test-crypto-sign-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-sign-verify.js) +- [parallel/test-crypto-subtle-zero-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-subtle-zero-length.js) +- [parallel/test-crypto-verify-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-verify-failure.js) +- [parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js) +- [parallel/test-crypto-worker-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-worker-thread.js) +- [parallel/test-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto.js) +- [parallel/test-cwd-enoent-preload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cwd-enoent-preload.js) +- [parallel/test-cwd-enoent-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cwd-enoent-repl.js) +- [parallel/test-cwd-enoent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cwd-enoent.js) +- [parallel/test-datetime-change-notify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-datetime-change-notify.js) +- [parallel/test-debugger-backtrace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-backtrace.js) +- [parallel/test-debugger-break.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-break.js) +- [parallel/test-debugger-breakpoint-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-breakpoint-exists.js) +- [parallel/test-debugger-clear-breakpoints.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-clear-breakpoints.js) +- [parallel/test-debugger-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-exceptions.js) +- [parallel/test-debugger-exec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-exec.js) +- [parallel/test-debugger-heap-profiler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-heap-profiler.js) +- [parallel/test-debugger-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-list.js) +- [parallel/test-debugger-low-level.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-low-level.js) +- [parallel/test-debugger-object-type-remote-object.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-object-type-remote-object.js) +- [parallel/test-debugger-pid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-pid.js) +- [parallel/test-debugger-preserve-breaks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-preserve-breaks.js) +- [parallel/test-debugger-profile-command.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-profile-command.js) +- [parallel/test-debugger-profile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-profile.js) +- [parallel/test-debugger-random-port-with-inspect-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-random-port-with-inspect-port.js) +- [parallel/test-debugger-random-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-random-port.js) +- [parallel/test-debugger-repeat-last.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-repeat-last.js) +- [parallel/test-debugger-restart-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-restart-message.js) +- [parallel/test-debugger-run-after-quit-restart.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-run-after-quit-restart.js) +- [parallel/test-debugger-sb-before-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-sb-before-load.js) +- [parallel/test-debugger-scripts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-scripts.js) +- [parallel/test-debugger-unavailable-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-unavailable-port.js) +- [parallel/test-debugger-use-strict.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-use-strict.js) +- [parallel/test-debugger-watch-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-watch-validation.js) +- [parallel/test-debugger-websocket-secret-mismatch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-websocket-secret-mismatch.js) +- [parallel/test-delayed-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-delayed-require.js) +- [parallel/test-dgram-abort-closed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-abort-closed.js) +- [parallel/test-dgram-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-address.js) +- [parallel/test-dgram-bind-default-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind-default-address.js) +- [parallel/test-dgram-bind-error-repeat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind-error-repeat.js) +- [parallel/test-dgram-bind-fd-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind-fd-error.js) +- [parallel/test-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind-fd.js) +- [parallel/test-dgram-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind.js) +- [parallel/test-dgram-bytes-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bytes-length.js) +- [parallel/test-dgram-close-in-listening.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-close-in-listening.js) +- [parallel/test-dgram-close-is-not-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-close-is-not-callback.js) +- [parallel/test-dgram-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-close.js) +- [parallel/test-dgram-cluster-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-bind-error.js) +- [parallel/test-dgram-cluster-close-during-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-close-during-bind.js) +- [parallel/test-dgram-cluster-close-in-listening.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-close-in-listening.js) +- [parallel/test-dgram-connect-send-callback-buffer-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-callback-buffer-length.js) +- [parallel/test-dgram-connect-send-callback-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-callback-buffer.js) +- [parallel/test-dgram-connect-send-callback-multi-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-callback-multi-buffer.js) +- [parallel/test-dgram-connect-send-default-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-default-host.js) +- [parallel/test-dgram-connect-send-empty-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-empty-array.js) +- [parallel/test-dgram-connect-send-empty-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-empty-buffer.js) +- [parallel/test-dgram-connect-send-empty-packet.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-empty-packet.js) +- [parallel/test-dgram-connect-send-multi-buffer-copy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-multi-buffer-copy.js) +- [parallel/test-dgram-connect-send-multi-string-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-multi-string-array.js) +- [parallel/test-dgram-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect.js) +- [parallel/test-dgram-create-socket-handle-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-create-socket-handle-fd.js) +- [parallel/test-dgram-create-socket-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-create-socket-handle.js) +- [parallel/test-dgram-createSocket-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-createSocket-type.js) +- [parallel/test-dgram-custom-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-custom-lookup.js) +- [parallel/test-dgram-deprecation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-deprecation-error.js) +- [parallel/test-dgram-error-message-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-error-message-address.js) +- [parallel/test-dgram-exclusive-implicit-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-exclusive-implicit-bind.js) +- [parallel/test-dgram-implicit-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-implicit-bind.js) +- [parallel/test-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-ipv6only.js) +- [parallel/test-dgram-listen-after-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-listen-after-bind.js) +- [parallel/test-dgram-membership.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-membership.js) +- [parallel/test-dgram-msgsize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-msgsize.js) +- [parallel/test-dgram-multicast-loopback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-loopback.js) +- [parallel/test-dgram-multicast-set-interface.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-set-interface.js) +- [parallel/test-dgram-multicast-setTTL.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-setTTL.js) +- [parallel/test-dgram-oob-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-oob-buffer.js) +- [parallel/test-dgram-recv-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-recv-error.js) +- [parallel/test-dgram-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-ref.js) +- [parallel/test-dgram-send-address-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-address-types.js) +- [parallel/test-dgram-send-bad-arguments.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-bad-arguments.js) +- [parallel/test-dgram-send-callback-buffer-empty-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-buffer-empty-address.js) +- [parallel/test-dgram-send-callback-buffer-length-empty-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js) +- [parallel/test-dgram-send-callback-buffer-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-buffer-length.js) +- [parallel/test-dgram-send-callback-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-buffer.js) +- [parallel/test-dgram-send-callback-multi-buffer-empty-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-multi-buffer-empty-address.js) +- [parallel/test-dgram-send-callback-multi-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-multi-buffer.js) +- [parallel/test-dgram-send-callback-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-callback-recursive.js) +- [parallel/test-dgram-send-cb-quelches-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-cb-quelches-error.js) +- [parallel/test-dgram-send-default-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-default-host.js) +- [parallel/test-dgram-send-empty-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-empty-array.js) +- [parallel/test-dgram-send-empty-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-empty-buffer.js) +- [parallel/test-dgram-send-empty-packet.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-empty-packet.js) +- [parallel/test-dgram-send-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-error.js) +- [parallel/test-dgram-send-invalid-msg-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-invalid-msg-type.js) +- [parallel/test-dgram-send-multi-buffer-copy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-multi-buffer-copy.js) +- [parallel/test-dgram-send-multi-string-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-multi-string-array.js) +- [parallel/test-dgram-send-queue-info.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-queue-info.js) +- [parallel/test-dgram-sendto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-sendto.js) +- [parallel/test-dgram-setBroadcast.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-setBroadcast.js) +- [parallel/test-dgram-setTTL.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-setTTL.js) +- [parallel/test-dgram-socket-buffer-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-socket-buffer-size.js) +- [parallel/test-dgram-udp4.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-udp4.js) +- [parallel/test-dgram-udp6-link-local-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-udp6-link-local-address.js) +- [parallel/test-dgram-udp6-send-default-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-udp6-send-default-host.js) +- [parallel/test-dgram-unref-in-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-unref-in-cluster.js) +- [parallel/test-dgram-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-unref.js) +- [parallel/test-diagnostics-channel-bind-store.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-bind-store.js) +- [parallel/test-diagnostics-channel-http-server-start.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-http-server-start.js) +- [parallel/test-diagnostics-channel-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-http.js) +- [parallel/test-diagnostics-channel-memory-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-memory-leak.js) +- [parallel/test-diagnostics-channel-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-process.js) +- [parallel/test-diagnostics-channel-safe-subscriber-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js) +- [parallel/test-diagnostics-channel-tracing-channel-async-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js) +- [parallel/test-diagnostics-channel-tracing-channel-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-tracing-channel-async.js) +- [parallel/test-diagnostics-channel-tracing-channel-run-stores.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js) +- [parallel/test-diagnostics-channel-worker-threads.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-worker-threads.js) +- [parallel/test-directory-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-directory-import.js) +- [parallel/test-disable-proto-delete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-disable-proto-delete.js) +- [parallel/test-disable-proto-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-disable-proto-throw.js) +- [parallel/test-dns-cancel-reverse-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-cancel-reverse-lookup.js) +- [parallel/test-dns-channel-cancel-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-channel-cancel-promise.js) +- [parallel/test-dns-channel-cancel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-channel-cancel.js) +- [parallel/test-dns-channel-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-channel-timeout.js) +- [parallel/test-dns-default-verbatim-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-default-verbatim-false.js) +- [parallel/test-dns-default-verbatim-true.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-default-verbatim-true.js) +- [parallel/test-dns-get-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-get-server.js) +- [parallel/test-dns-lookup-promises-options-deprecated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookup-promises-options-deprecated.js) +- [parallel/test-dns-lookup-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookup-promises.js) +- [parallel/test-dns-lookupService-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookupService-promises.js) +- [parallel/test-dns-lookupService.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookupService.js) +- [parallel/test-dns-multi-channel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-multi-channel.js) +- [parallel/test-dns-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-perf_hooks.js) +- [parallel/test-dns-resolve-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-resolve-promises.js) +- [parallel/test-dns-resolveany-bad-ancount.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-resolveany-bad-ancount.js) +- [parallel/test-dns-resolveany.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-resolveany.js) +- [parallel/test-dns-set-default-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-set-default-order.js) +- [parallel/test-dns-setlocaladdress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-setlocaladdress.js) +- [parallel/test-dns-setserver-when-querying.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-setserver-when-querying.js) +- [parallel/test-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns.js) +- [parallel/test-domain-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-abort-on-uncaught.js) +- [parallel/test-domain-add-remove.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-add-remove.js) +- [parallel/test-domain-async-id-map-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-async-id-map-leak.js) +- [parallel/test-domain-bind-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-bind-timeout.js) +- [parallel/test-domain-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-crypto.js) +- [parallel/test-domain-dep0097.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-dep0097.js) +- [parallel/test-domain-ee-error-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-ee-error-listener.js) +- [parallel/test-domain-ee-implicit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-ee-implicit.js) +- [parallel/test-domain-ee.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-ee.js) +- [parallel/test-domain-emit-error-handler-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-emit-error-handler-stack.js) +- [parallel/test-domain-enter-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-enter-exit.js) +- [parallel/test-domain-error-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-error-types.js) +- [parallel/test-domain-from-timer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-from-timer.js) +- [parallel/test-domain-fs-enoent-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-fs-enoent-stream.js) +- [parallel/test-domain-http-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-http-server.js) +- [parallel/test-domain-implicit-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-implicit-binding.js) +- [parallel/test-domain-implicit-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-implicit-fs.js) +- [parallel/test-domain-intercept.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-intercept.js) +- [parallel/test-domain-load-after-set-uncaught-exception-capture.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-load-after-set-uncaught-exception-capture.js) +- [parallel/test-domain-multi.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-multi.js) +- [parallel/test-domain-multiple-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-multiple-errors.js) +- [parallel/test-domain-nested-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-nested-throw.js) +- [parallel/test-domain-nested.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-nested.js) +- [parallel/test-domain-nexttick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-nexttick.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-0.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-1.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-2.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-3.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-4.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-4.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-5.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-5.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-6.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-6.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-7.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-7.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-8.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-9.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js) +- [parallel/test-domain-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-promise.js) +- [parallel/test-domain-run.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-run.js) +- [parallel/test-domain-safe-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-safe-exit.js) +- [parallel/test-domain-set-uncaught-exception-capture-after-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-set-uncaught-exception-capture-after-load.js) +- [parallel/test-domain-stack-empty-in-process-uncaughtexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-stack-empty-in-process-uncaughtexception.js) +- [parallel/test-domain-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-stack.js) +- [parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js) +- [parallel/test-domain-thrown-error-handler-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-thrown-error-handler-stack.js) +- [parallel/test-domain-timer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-timer.js) +- [parallel/test-domain-timers-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-timers-uncaught-exception.js) +- [parallel/test-domain-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-timers.js) +- [parallel/test-domain-top-level-error-handler-clears-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-top-level-error-handler-clears-stack.js) +- [parallel/test-domain-top-level-error-handler-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-top-level-error-handler-throw.js) +- [parallel/test-domain-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-uncaught-exception.js) +- [parallel/test-domain-vm-promise-isolation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-vm-promise-isolation.js) +- [parallel/test-domain-with-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-with-abort-on-uncaught-exception.js) +- [parallel/test-domexception-cause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domexception-cause.js) +- [parallel/test-dotenv-edge-cases.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dotenv-edge-cases.js) +- [parallel/test-dotenv-node-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dotenv-node-options.js) +- [parallel/test-dotenv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dotenv.js) +- [parallel/test-double-tls-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-double-tls-client.js) +- [parallel/test-double-tls-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-double-tls-server.js) +- [parallel/test-dsa-fips-invalid-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dsa-fips-invalid-key.js) +- [parallel/test-dummy-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dummy-stdio.js) +- [parallel/test-emit-after-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-emit-after-uncaught-exception.js) +- [parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js) +- [parallel/test-env-var-no-warnings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-env-var-no-warnings.js) +- [parallel/test-err-name-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-err-name-deprecation.js) +- [parallel/test-error-aggregateTwoErrors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-aggregateTwoErrors.js) +- [parallel/test-error-format-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-format-list.js) +- [parallel/test-error-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-prepare-stack-trace.js) +- [parallel/test-error-reporting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-reporting.js) +- [parallel/test-error-serdes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-serdes.js) +- [parallel/test-errors-aborterror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-aborterror.js) +- [parallel/test-errors-systemerror-frozen-intrinsics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-frozen-intrinsics.js) +- [parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js) +- [parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js) +- [parallel/test-errors-systemerror-stackTraceLimit-deleted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted.js) +- [parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js) +- [parallel/test-errors-systemerror-stackTraceLimit-not-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-not-writable.js) +- [parallel/test-errors-systemerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror.js) +- [parallel/test-eslint-alphabetize-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-alphabetize-errors.js) +- [parallel/test-eslint-async-iife-no-unused-result.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-async-iife-no-unused-result.js) +- [parallel/test-eslint-avoid-prototype-pollution.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-avoid-prototype-pollution.js) +- [parallel/test-eslint-crypto-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-crypto-check.js) +- [parallel/test-eslint-documented-deprecation-codes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-documented-deprecation-codes.js) +- [parallel/test-eslint-documented-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-documented-errors.js) +- [parallel/test-eslint-duplicate-requires.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-duplicate-requires.js) +- [parallel/test-eslint-eslint-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-eslint-check.js) +- [parallel/test-eslint-inspector-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-inspector-check.js) +- [parallel/test-eslint-lowercase-name-for-primitive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-lowercase-name-for-primitive.js) +- [parallel/test-eslint-no-array-destructuring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-no-array-destructuring.js) +- [parallel/test-eslint-no-unescaped-regexp-dot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-no-unescaped-regexp-dot.js) +- [parallel/test-eslint-non-ascii-character.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-non-ascii-character.js) +- [parallel/test-eslint-prefer-assert-iferror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-assert-iferror.js) +- [parallel/test-eslint-prefer-assert-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-assert-methods.js) +- [parallel/test-eslint-prefer-common-mustnotcall.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-common-mustnotcall.js) +- [parallel/test-eslint-prefer-common-mustsucceed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-common-mustsucceed.js) +- [parallel/test-eslint-prefer-primordials.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-primordials.js) +- [parallel/test-eslint-prefer-proto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-proto.js) +- [parallel/test-eslint-prefer-util-format-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-util-format-errors.js) +- [parallel/test-eslint-require-common-first.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-require-common-first.js) +- [parallel/test-eslint-required-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-required-modules.js) +- [parallel/test-eval-disallow-code-generation-from-strings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eval-disallow-code-generation-from-strings.js) +- [parallel/test-event-capture-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-capture-rejections.js) +- [parallel/test-event-emitter-check-listener-leaks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-emitter-check-listener-leaks.js) +- [parallel/test-event-emitter-max-listeners-warning-for-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-emitter-max-listeners-warning-for-null.js) +- [parallel/test-event-emitter-max-listeners-warning-for-symbol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js) +- [parallel/test-event-emitter-max-listeners-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-emitter-max-listeners-warning.js) +- [parallel/test-event-target.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-target.js) +- [parallel/test-eventemitter-asyncresource.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventemitter-asyncresource.js) +- [parallel/test-events-customevent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-customevent.js) +- [parallel/test-events-getmaxlisteners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-getmaxlisteners.js) +- [parallel/test-events-listener-count-with-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-listener-count-with-listener.js) +- [parallel/test-events-static-geteventlisteners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-static-geteventlisteners.js) +- [parallel/test-eventtarget-memoryleakwarning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventtarget-memoryleakwarning.js) +- [parallel/test-eventtarget-once-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventtarget-once-twice.js) +- [parallel/test-eventtarget.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventtarget.js) +- [parallel/test-experimental-shared-value-conveyor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-experimental-shared-value-conveyor.js) +- [parallel/test-file-validate-mode-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-file-validate-mode-flag.js) +- [parallel/test-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-file.js) +- [parallel/test-filehandle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-filehandle-close.js) +- [parallel/test-filehandle-readablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-filehandle-readablestream.js) +- [parallel/test-fixed-queue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fixed-queue.js) +- [parallel/test-force-repl-with-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-force-repl-with-eval.js) +- [parallel/test-force-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-force-repl.js) +- [parallel/test-freelist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-freelist.js) +- [parallel/test-freeze-intrinsics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-freeze-intrinsics.js) +- [parallel/test-fs-append-file-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-append-file-flush.js) +- [parallel/test-fs-assert-encoding-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-assert-encoding-error.js) +- [parallel/test-fs-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-buffer.js) +- [parallel/test-fs-buffertype-writesync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-buffertype-writesync.js) +- [parallel/test-fs-close-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-close-errors.js) +- [parallel/test-fs-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-close.js) +- [parallel/test-fs-constants.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-constants.js) +- [parallel/test-fs-copyfile-respect-permissions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-copyfile-respect-permissions.js) +- [parallel/test-fs-error-messages.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-error-messages.js) +- [parallel/test-fs-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-exists.js) +- [parallel/test-fs-existssync-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-existssync-false.js) +- [parallel/test-fs-fchmod.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fchmod.js) +- [parallel/test-fs-fchown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fchown.js) +- [parallel/test-fs-filehandle-use-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-filehandle-use-after-close.js) +- [parallel/test-fs-filehandle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-filehandle.js) +- [parallel/test-fs-fmap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fmap.js) +- [parallel/test-fs-fsync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fsync.js) +- [parallel/test-fs-lchmod.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-lchmod.js) +- [parallel/test-fs-link.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-link.js) +- [parallel/test-fs-long-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-long-path.js) +- [parallel/test-fs-make-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-make-callback.js) +- [parallel/test-fs-makeStatsCallback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-makeStatsCallback.js) +- [parallel/test-fs-mkdir-mode-mask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdir-mode-mask.js) +- [parallel/test-fs-mkdir-recursive-eaccess.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdir-recursive-eaccess.js) +- [parallel/test-fs-mkdir-rmdir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdir-rmdir.js) +- [parallel/test-fs-mkdtemp-prefix-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdtemp-prefix-check.js) +- [parallel/test-fs-mkdtemp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdtemp.js) +- [parallel/test-fs-non-number-arguments-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-non-number-arguments-throw.js) +- [parallel/test-fs-null-bytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-null-bytes.js) +- [parallel/test-fs-options-immutable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-options-immutable.js) +- [parallel/test-fs-promises-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-exists.js) +- [parallel/test-fs-promises-file-handle-aggregate-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-aggregate-errors.js) +- [parallel/test-fs-promises-file-handle-append-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-append-file.js) +- [parallel/test-fs-promises-file-handle-chmod.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-chmod.js) +- [parallel/test-fs-promises-file-handle-close-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-close-errors.js) +- [parallel/test-fs-promises-file-handle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-close.js) +- [parallel/test-fs-promises-file-handle-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-dispose.js) +- [parallel/test-fs-promises-file-handle-op-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-op-errors.js) +- [parallel/test-fs-promises-file-handle-read-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read-worker.js) +- [parallel/test-fs-promises-file-handle-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read.js) +- [parallel/test-fs-promises-file-handle-readFile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-readFile.js) +- [parallel/test-fs-promises-file-handle-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stat.js) +- [parallel/test-fs-promises-file-handle-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stream.js) +- [parallel/test-fs-promises-file-handle-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-sync.js) +- [parallel/test-fs-promises-file-handle-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-truncate.js) +- [parallel/test-fs-promises-file-handle-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-write.js) +- [parallel/test-fs-promises-file-handle-writeFile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-writeFile.js) +- [parallel/test-fs-promises-readfile-empty.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-readfile-empty.js) +- [parallel/test-fs-promises-readfile-with-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-readfile-with-fd.js) +- [parallel/test-fs-promises-readfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-readfile.js) +- [parallel/test-fs-promises-watch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-watch.js) +- [parallel/test-fs-promises-write-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-write-optional-params.js) +- [parallel/test-fs-promises-writefile-typedarray.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-writefile-typedarray.js) +- [parallel/test-fs-promises-writefile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-writefile.js) +- [parallel/test-fs-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises.js) +- [parallel/test-fs-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promisified.js) +- [parallel/test-fs-read-empty-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-empty-buffer.js) +- [parallel/test-fs-read-file-assert-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-file-assert-encoding.js) +- [parallel/test-fs-read-file-sync-hostname.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-file-sync-hostname.js) +- [parallel/test-fs-read-file-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-file-sync.js) +- [parallel/test-fs-read-offset-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-offset-null.js) +- [parallel/test-fs-read-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-optional-params.js) +- [parallel/test-fs-read-promises-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-promises-optional-params.js) +- [parallel/test-fs-read-stream-err.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-stream-err.js) +- [parallel/test-fs-read-stream-fd-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-stream-fd-leak.js) +- [parallel/test-fs-read-stream-file-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-stream-file-handle.js) +- [parallel/test-fs-read-stream-pos.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-stream-pos.js) +- [parallel/test-fs-readSync-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readSync-optional-params.js) +- [parallel/test-fs-readdir-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readdir-buffer.js) +- [parallel/test-fs-readdir-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readdir-types.js) +- [parallel/test-fs-readdir-ucs2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readdir-ucs2.js) +- [parallel/test-fs-readfile-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-error.js) +- [parallel/test-fs-readfile-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-fd.js) +- [parallel/test-fs-readfile-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-flags.js) +- [parallel/test-fs-readfile-pipe-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-pipe-large.js) +- [parallel/test-fs-readfile-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-pipe.js) +- [parallel/test-fs-readfile-unlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-unlink.js) +- [parallel/test-fs-readfile-zero-byte-liar.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-zero-byte-liar.js) +- [parallel/test-fs-readfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile.js) +- [parallel/test-fs-readfilesync-enoent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfilesync-enoent.js) +- [parallel/test-fs-readfilesync-pipe-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfilesync-pipe-large.js) +- [parallel/test-fs-readlink-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readlink-type-check.js) +- [parallel/test-fs-readv-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readv-promises.js) +- [parallel/test-fs-readv-promisify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readv-promisify.js) +- [parallel/test-fs-ready-event-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-ready-event-stream.js) +- [parallel/test-fs-realpath-buffer-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath-buffer-encoding.js) +- [parallel/test-fs-realpath-on-substed-drive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath-on-substed-drive.js) +- [parallel/test-fs-realpath-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath-pipe.js) +- [parallel/test-fs-realpath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath.js) +- [parallel/test-fs-rename-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-rename-type-check.js) +- [parallel/test-fs-rm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-rm.js) +- [parallel/test-fs-sir-writes-alot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-sir-writes-alot.js) +- [parallel/test-fs-stat-bigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stat-bigint.js) +- [parallel/test-fs-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stat.js) +- [parallel/test-fs-statfs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-statfs.js) +- [parallel/test-fs-stream-construct-compat-error-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-construct-compat-error-read.js) +- [parallel/test-fs-stream-construct-compat-error-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-construct-compat-error-write.js) +- [parallel/test-fs-stream-construct-compat-graceful-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-construct-compat-graceful-fs.js) +- [parallel/test-fs-stream-construct-compat-old-node.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-construct-compat-old-node.js) +- [parallel/test-fs-stream-destroy-emit-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-destroy-emit-error.js) +- [parallel/test-fs-stream-double-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-double-close.js) +- [parallel/test-fs-stream-fs-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-fs-options.js) +- [parallel/test-fs-stream-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-options.js) +- [parallel/test-fs-symlink-buffer-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-buffer-path.js) +- [parallel/test-fs-symlink-dir-junction-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-dir-junction-relative.js) +- [parallel/test-fs-symlink-dir-junction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-dir-junction.js) +- [parallel/test-fs-symlink-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-dir.js) +- [parallel/test-fs-symlink-longpath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-longpath.js) +- [parallel/test-fs-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink.js) +- [parallel/test-fs-sync-fd-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-sync-fd-leak.js) +- [parallel/test-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-syncwritestream.js) +- [parallel/test-fs-timestamp-parsing-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-timestamp-parsing-error.js) +- [parallel/test-fs-truncate-clear-file-zero.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate-clear-file-zero.js) +- [parallel/test-fs-truncate-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate-fd.js) +- [parallel/test-fs-truncate-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate-sync.js) +- [parallel/test-fs-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate.js) +- [parallel/test-fs-unlink-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-unlink-type-check.js) +- [parallel/test-fs-util-validateoffsetlength.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-util-validateoffsetlength.js) +- [parallel/test-fs-utils-get-dirents.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-utils-get-dirents.js) +- [parallel/test-fs-utimes-y2K38.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-utimes-y2K38.js) +- [parallel/test-fs-watch-abort-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-abort-signal.js) +- [parallel/test-fs-watch-close-when-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-close-when-destroyed.js) +- [parallel/test-fs-watch-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-encoding.js) +- [parallel/test-fs-watch-enoent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-enoent.js) +- [parallel/test-fs-watch-file-enoent-after-deletion.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-file-enoent-after-deletion.js) +- [parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js) +- [parallel/test-fs-watch-recursive-add-file-to-new-folder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js) +- [parallel/test-fs-watch-recursive-add-file-with-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-file-with-url.js) +- [parallel/test-fs-watch-recursive-add-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-file.js) +- [parallel/test-fs-watch-recursive-add-folder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-folder.js) +- [parallel/test-fs-watch-recursive-assert-leaks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-assert-leaks.js) +- [parallel/test-fs-watch-recursive-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-promise.js) +- [parallel/test-fs-watch-recursive-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-symlink.js) +- [parallel/test-fs-watch-recursive-update-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-update-file.js) +- [parallel/test-fs-watch-recursive-validate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-validate.js) +- [parallel/test-fs-watch-recursive-watch-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-watch-file.js) +- [parallel/test-fs-watch-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-ref-unref.js) +- [parallel/test-fs-watch-stop-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-stop-async.js) +- [parallel/test-fs-watch-stop-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-stop-sync.js) +- [parallel/test-fs-watch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch.js) +- [parallel/test-fs-watchfile-bigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watchfile-bigint.js) +- [parallel/test-fs-watchfile-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watchfile-ref-unref.js) +- [parallel/test-fs-whatwg-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-whatwg-url.js) +- [parallel/test-fs-write-buffer-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-buffer-large.js) +- [parallel/test-fs-write-file-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-file-flush.js) +- [parallel/test-fs-write-file-typedarrays.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-file-typedarrays.js) +- [parallel/test-fs-write-negativeoffset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-negativeoffset.js) +- [parallel/test-fs-write-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-optional-params.js) +- [parallel/test-fs-write-reuse-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-reuse-callback.js) +- [parallel/test-fs-write-sigxfsz.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-sigxfsz.js) +- [parallel/test-fs-write-stream-change-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-change-open.js) +- [parallel/test-fs-write-stream-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-encoding.js) +- [parallel/test-fs-write-stream-err.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-err.js) +- [parallel/test-fs-write-stream-file-handle-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-file-handle-2.js) +- [parallel/test-fs-write-stream-file-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-file-handle.js) +- [parallel/test-fs-write-stream-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-flush.js) +- [parallel/test-fs-write-stream-patch-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-patch-open.js) +- [parallel/test-fs-write-sync-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-sync-optional-params.js) +- [parallel/test-fs-writefile-with-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-writefile-with-fd.js) +- [parallel/test-fs-writev-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-writev-promises.js) +- [parallel/test-fs-writev.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-writev.js) +- [parallel/test-gc-http-client-connaborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-gc-http-client-connaborted.js) +- [parallel/test-gc-net-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-gc-net-timeout.js) +- [parallel/test-gc-tls-external-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-gc-tls-external-memory.js) +- [parallel/test-global-console-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-console-exists.js) +- [parallel/test-global-customevent-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-customevent-disabled.js) +- [parallel/test-global-customevent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-customevent.js) +- [parallel/test-global-domexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-domexception.js) +- [parallel/test-global-encoder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-encoder.js) +- [parallel/test-global-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-setters.js) +- [parallel/test-global-webcrypto-classes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-webcrypto-classes.js) +- [parallel/test-global-webcrypto-disbled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-webcrypto-disbled.js) +- [parallel/test-global-webcrypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-webcrypto.js) +- [parallel/test-global-webstreams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-webstreams.js) +- [parallel/test-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global.js) +- [parallel/test-h2-large-header-cause-client-to-hangup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-h2-large-header-cause-client-to-hangup.js) +- [parallel/test-handle-wrap-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-handle-wrap-hasref.js) +- [parallel/test-heap-prof-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-basic.js) +- [parallel/test-heap-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-dir-absolute.js) +- [parallel/test-heap-prof-dir-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-dir-name.js) +- [parallel/test-heap-prof-dir-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-dir-relative.js) +- [parallel/test-heap-prof-exec-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-exec-argv.js) +- [parallel/test-heap-prof-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-exit.js) +- [parallel/test-heap-prof-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-interval.js) +- [parallel/test-heap-prof-invalid-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-invalid-args.js) +- [parallel/test-heap-prof-loop-drained.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-loop-drained.js) +- [parallel/test-heap-prof-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-name.js) +- [parallel/test-heap-prof-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-sigint.js) +- [parallel/test-heapdump-async-hooks-init-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heapdump-async-hooks-init-promise.js) +- [parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js) +- [parallel/test-heapsnapshot-near-heap-limit-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heapsnapshot-near-heap-limit-worker.js) +- [parallel/test-http-1.0-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-1.0-keep-alive.js) +- [parallel/test-http-1.0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-1.0.js) +- [parallel/test-http-abort-before-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-before-end.js) +- [parallel/test-http-abort-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-client.js) +- [parallel/test-http-abort-queued.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-queued.js) +- [parallel/test-http-abort-stream-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-stream-end.js) +- [parallel/test-http-aborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-aborted.js) +- [parallel/test-http-addrequest-localaddress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-addrequest-localaddress.js) +- [parallel/test-http-after-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-after-connect.js) +- [parallel/test-http-agent-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-abort-controller.js) +- [parallel/test-http-agent-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-close.js) +- [parallel/test-http-agent-destroyed-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-destroyed-socket.js) +- [parallel/test-http-agent-domain-reused-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-domain-reused-gc.js) +- [parallel/test-http-agent-error-on-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-error-on-idle.js) +- [parallel/test-http-agent-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-false.js) +- [parallel/test-http-agent-keepalive-delay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-keepalive-delay.js) +- [parallel/test-http-agent-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-keepalive.js) +- [parallel/test-http-agent-maxsockets-respected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-maxsockets-respected.js) +- [parallel/test-http-agent-maxsockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-maxsockets.js) +- [parallel/test-http-agent-maxtotalsockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-maxtotalsockets.js) +- [parallel/test-http-agent-no-protocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-no-protocol.js) +- [parallel/test-http-agent-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-null.js) +- [parallel/test-http-agent-remove.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-remove.js) +- [parallel/test-http-agent-reuse-drained-socket-only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-reuse-drained-socket-only.js) +- [parallel/test-http-agent-scheduling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-scheduling.js) +- [parallel/test-http-agent-timeout-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-timeout-option.js) +- [parallel/test-http-agent-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-timeout.js) +- [parallel/test-http-agent-uninitialized-with-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-uninitialized-with-handle.js) +- [parallel/test-http-agent-uninitialized.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-uninitialized.js) +- [parallel/test-http-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent.js) +- [parallel/test-http-allow-content-length-304.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-allow-content-length-304.js) +- [parallel/test-http-allow-req-after-204-res.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-allow-req-after-204-res.js) +- [parallel/test-http-automatic-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-automatic-headers.js) +- [parallel/test-http-autoselectfamily.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-autoselectfamily.js) +- [parallel/test-http-bind-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-bind-twice.js) +- [parallel/test-http-blank-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-blank-header.js) +- [parallel/test-http-buffer-sanity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-buffer-sanity.js) +- [parallel/test-http-byteswritten.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-byteswritten.js) +- [parallel/test-http-catch-uncaughtexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-catch-uncaughtexception.js) +- [parallel/test-http-chunk-extensions-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunk-extensions-limit.js) +- [parallel/test-http-chunk-problem.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunk-problem.js) +- [parallel/test-http-chunked-304.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunked-304.js) +- [parallel/test-http-chunked-smuggling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunked-smuggling.js) +- [parallel/test-http-chunked.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunked.js) +- [parallel/test-http-client-abort-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-destroy.js) +- [parallel/test-http-client-abort-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-event.js) +- [parallel/test-http-client-abort-keep-alive-destroy-res.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-keep-alive-destroy-res.js) +- [parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js) +- [parallel/test-http-client-abort-keep-alive-queued-unix-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-keep-alive-queued-unix-socket.js) +- [parallel/test-http-client-abort-no-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-no-agent.js) +- [parallel/test-http-client-abort-response-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-response-event.js) +- [parallel/test-http-client-abort-unix-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-unix-socket.js) +- [parallel/test-http-client-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort.js) +- [parallel/test-http-client-abort2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort2.js) +- [parallel/test-http-client-abort3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort3.js) +- [parallel/test-http-client-aborted-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-aborted-event.js) +- [parallel/test-http-client-agent-abort-close-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-agent-abort-close-event.js) +- [parallel/test-http-client-agent-end-close-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-agent-end-close-event.js) +- [parallel/test-http-client-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-agent.js) +- [parallel/test-http-client-check-http-token.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-check-http-token.js) +- [parallel/test-http-client-close-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-close-event.js) +- [parallel/test-http-client-close-with-default-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-close-with-default-agent.js) +- [parallel/test-http-client-default-headers-exist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-default-headers-exist.js) +- [parallel/test-http-client-defaults.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-defaults.js) +- [parallel/test-http-client-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-encoding.js) +- [parallel/test-http-client-error-rawbytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-error-rawbytes.js) +- [parallel/test-http-client-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-finished.js) +- [parallel/test-http-client-headers-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-headers-array.js) +- [parallel/test-http-client-headers-host-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-headers-host-array.js) +- [parallel/test-http-client-immediate-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-immediate-error.js) +- [parallel/test-http-client-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-incomingmessage-destroy.js) +- [parallel/test-http-client-invalid-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-invalid-path.js) +- [parallel/test-http-client-keep-alive-hint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-keep-alive-hint.js) +- [parallel/test-http-client-keep-alive-release-before-finish.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-keep-alive-release-before-finish.js) +- [parallel/test-http-client-override-global-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-override-global-agent.js) +- [parallel/test-http-client-parse-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-parse-error.js) +- [parallel/test-http-client-pipe-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-pipe-end.js) +- [parallel/test-http-client-race-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-race-2.js) +- [parallel/test-http-client-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-race.js) +- [parallel/test-http-client-readable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-readable.js) +- [parallel/test-http-client-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-reject-chunked-with-content-length.js) +- [parallel/test-http-client-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-reject-cr-no-lf.js) +- [parallel/test-http-client-reject-unexpected-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-reject-unexpected-agent.js) +- [parallel/test-http-client-req-error-dont-double-fire.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-req-error-dont-double-fire.js) +- [parallel/test-http-client-request-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-request-options.js) +- [parallel/test-http-client-res-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-res-destroyed.js) +- [parallel/test-http-client-response-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-response-domain.js) +- [parallel/test-http-client-response-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-response-timeout.js) +- [parallel/test-http-client-set-timeout-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-set-timeout-after-end.js) +- [parallel/test-http-client-set-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-set-timeout.js) +- [parallel/test-http-client-spurious-aborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-spurious-aborted.js) +- [parallel/test-http-client-timeout-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-agent.js) +- [parallel/test-http-client-timeout-connect-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-connect-listener.js) +- [parallel/test-http-client-timeout-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-event.js) +- [parallel/test-http-client-timeout-on-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-on-connect.js) +- [parallel/test-http-client-timeout-option-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-option-listeners.js) +- [parallel/test-http-client-timeout-option-with-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-option-with-agent.js) +- [parallel/test-http-client-timeout-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-option.js) +- [parallel/test-http-client-timeout-with-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-with-data.js) +- [parallel/test-http-client-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout.js) +- [parallel/test-http-client-unescaped-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-unescaped-path.js) +- [parallel/test-http-client-upload-buf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-upload-buf.js) +- [parallel/test-http-client-upload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-upload.js) +- [parallel/test-http-common.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-common.js) +- [parallel/test-http-conn-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-conn-reset.js) +- [parallel/test-http-connect-req-res.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-connect-req-res.js) +- [parallel/test-http-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-connect.js) +- [parallel/test-http-content-length-mismatch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-content-length-mismatch.js) +- [parallel/test-http-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-content-length.js) +- [parallel/test-http-contentLength0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-contentLength0.js) +- [parallel/test-http-correct-hostname.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-correct-hostname.js) +- [parallel/test-http-createConnection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-createConnection.js) +- [parallel/test-http-date-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-date-header.js) +- [parallel/test-http-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-debug.js) +- [parallel/test-http-decoded-auth.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-decoded-auth.js) +- [parallel/test-http-default-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-default-encoding.js) +- [parallel/test-http-default-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-default-port.js) +- [parallel/test-http-destroyed-socket-write2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-destroyed-socket-write2.js) +- [parallel/test-http-dns-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-dns-error.js) +- [parallel/test-http-double-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-double-content-length.js) +- [parallel/test-http-dump-req-when-res-ends.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-dump-req-when-res-ends.js) +- [parallel/test-http-early-hints-invalid-argument.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-early-hints-invalid-argument.js) +- [parallel/test-http-early-hints.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-early-hints.js) +- [parallel/test-http-end-throw-socket-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-end-throw-socket-handling.js) +- [parallel/test-http-eof-on-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-eof-on-connect.js) +- [parallel/test-http-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-exceptions.js) +- [parallel/test-http-expect-continue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-expect-continue.js) +- [parallel/test-http-expect-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-expect-handling.js) +- [parallel/test-http-extra-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-extra-response.js) +- [parallel/test-http-flush-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-flush-headers.js) +- [parallel/test-http-flush-response-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-flush-response-headers.js) +- [parallel/test-http-full-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-full-response.js) +- [parallel/test-http-generic-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-generic-streams.js) +- [parallel/test-http-get-pipeline-problem.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-get-pipeline-problem.js) +- [parallel/test-http-head-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-head-request.js) +- [parallel/test-http-head-response-has-no-body-end-implicit-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-head-response-has-no-body-end-implicit-headers.js) +- [parallel/test-http-head-response-has-no-body-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-head-response-has-no-body-end.js) +- [parallel/test-http-head-response-has-no-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-head-response-has-no-body.js) +- [parallel/test-http-head-throw-on-response-body-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-head-throw-on-response-body-write.js) +- [parallel/test-http-header-badrequest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-badrequest.js) +- [parallel/test-http-header-obstext.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-obstext.js) +- [parallel/test-http-header-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-overflow.js) +- [parallel/test-http-header-owstext.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-owstext.js) +- [parallel/test-http-header-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-read.js) +- [parallel/test-http-hex-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-hex-write.js) +- [parallel/test-http-highwatermark.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-highwatermark.js) +- [parallel/test-http-host-header-ipv6-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-host-header-ipv6-fail.js) +- [parallel/test-http-host-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-host-headers.js) +- [parallel/test-http-hostname-typechecking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-hostname-typechecking.js) +- [parallel/test-http-incoming-matchKnownFields.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-matchKnownFields.js) +- [parallel/test-http-incoming-message-connection-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-message-connection-setter.js) +- [parallel/test-http-incoming-message-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-message-destroy.js) +- [parallel/test-http-incoming-message-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-message-options.js) +- [parallel/test-http-incoming-pipelined-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-pipelined-socket-destroy.js) +- [parallel/test-http-information-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-information-headers.js) +- [parallel/test-http-information-processing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-information-processing.js) +- [parallel/test-http-insecure-parser-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-insecure-parser-per-stream.js) +- [parallel/test-http-insecure-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-insecure-parser.js) +- [parallel/test-http-invalid-path-chars.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalid-path-chars.js) +- [parallel/test-http-invalid-te.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalid-te.js) +- [parallel/test-http-invalid-urls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalid-urls.js) +- [parallel/test-http-invalidheaderfield.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalidheaderfield.js) +- [parallel/test-http-invalidheaderfield2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalidheaderfield2.js) +- [parallel/test-http-keep-alive-close-on-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-close-on-header.js) +- [parallel/test-http-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-drop-requests.js) +- [parallel/test-http-keep-alive-max-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-max-requests.js) +- [parallel/test-http-keep-alive-pipeline-max-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-pipeline-max-requests.js) +- [parallel/test-http-keep-alive-timeout-custom.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-timeout-custom.js) +- [parallel/test-http-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-timeout.js) +- [parallel/test-http-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive.js) +- [parallel/test-http-keepalive-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-client.js) +- [parallel/test-http-keepalive-free.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-free.js) +- [parallel/test-http-keepalive-override.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-override.js) +- [parallel/test-http-keepalive-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-request.js) +- [parallel/test-http-listening.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-listening.js) +- [parallel/test-http-localaddress-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-localaddress-bind-error.js) +- [parallel/test-http-malformed-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-malformed-request.js) +- [parallel/test-http-many-ended-pipelines.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-many-ended-pipelines.js) +- [parallel/test-http-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-header-size-per-stream.js) +- [parallel/test-http-max-header-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-header-size.js) +- [parallel/test-http-max-headers-count.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-headers-count.js) +- [parallel/test-http-max-http-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-http-headers.js) +- [parallel/test-http-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-methods.js) +- [parallel/test-http-missing-header-separator-cr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-missing-header-separator-cr.js) +- [parallel/test-http-missing-header-separator-lf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-missing-header-separator-lf.js) +- [parallel/test-http-multi-line-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-multi-line-headers.js) +- [parallel/test-http-multiple-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-multiple-headers.js) +- [parallel/test-http-mutable-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-mutable-headers.js) +- [parallel/test-http-no-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-no-content-length.js) +- [parallel/test-http-no-read-no-dump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-no-read-no-dump.js) +- [parallel/test-http-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-nodelay.js) +- [parallel/test-http-outgoing-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-buffer.js) +- [parallel/test-http-outgoing-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-destroy.js) +- [parallel/test-http-outgoing-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-destroyed.js) +- [parallel/test-http-outgoing-end-cork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-end-cork.js) +- [parallel/test-http-outgoing-end-multiple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-end-multiple.js) +- [parallel/test-http-outgoing-end-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-end-types.js) +- [parallel/test-http-outgoing-finish-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-finish-writable.js) +- [parallel/test-http-outgoing-finish.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-finish.js) +- [parallel/test-http-outgoing-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-finished.js) +- [parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js) +- [parallel/test-http-outgoing-message-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-message-capture-rejection.js) +- [parallel/test-http-outgoing-message-inheritance.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-message-inheritance.js) +- [parallel/test-http-outgoing-message-write-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-message-write-callback.js) +- [parallel/test-http-outgoing-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-properties.js) +- [parallel/test-http-outgoing-proto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-proto.js) +- [parallel/test-http-outgoing-writableFinished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-writableFinished.js) +- [parallel/test-http-outgoing-write-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-write-types.js) +- [parallel/test-http-parser-bad-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-bad-ref.js) +- [parallel/test-http-parser-finish-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-finish-error.js) +- [parallel/test-http-parser-free.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-free.js) +- [parallel/test-http-parser-freed-before-upgrade.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-freed-before-upgrade.js) +- [parallel/test-http-parser-lazy-loaded.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-lazy-loaded.js) +- [parallel/test-http-parser-memory-retention.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-memory-retention.js) +- [parallel/test-http-parser-multiple-execute.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-multiple-execute.js) +- [parallel/test-http-parser-timeout-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-timeout-reset.js) +- [parallel/test-http-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser.js) +- [parallel/test-http-pause-no-dump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pause-no-dump.js) +- [parallel/test-http-pause-resume-one-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pause-resume-one-end.js) +- [parallel/test-http-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pause.js) +- [parallel/test-http-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-perf_hooks.js) +- [parallel/test-http-pipe-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipe-fs.js) +- [parallel/test-http-pipeline-assertionerror-finish.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-assertionerror-finish.js) +- [parallel/test-http-pipeline-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-flood.js) +- [parallel/test-http-pipeline-requests-connection-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-requests-connection-leak.js) +- [parallel/test-http-pipeline-socket-parser-typeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-socket-parser-typeerror.js) +- [parallel/test-http-proxy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-proxy.js) +- [parallel/test-http-raw-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-raw-headers.js) +- [parallel/test-http-readable-data-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-readable-data-event.js) +- [parallel/test-http-remove-connection-header-persists-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-remove-connection-header-persists-connection.js) +- [parallel/test-http-remove-header-stays-removed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-remove-header-stays-removed.js) +- [parallel/test-http-req-close-robust-from-tampering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-req-close-robust-from-tampering.js) +- [parallel/test-http-req-res-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-req-res-close.js) +- [parallel/test-http-request-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-agent.js) +- [parallel/test-http-request-arguments.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-arguments.js) +- [parallel/test-http-request-dont-override-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-dont-override-options.js) +- [parallel/test-http-request-end-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-end-twice.js) +- [parallel/test-http-request-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-end.js) +- [parallel/test-http-request-host-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-host-header.js) +- [parallel/test-http-request-invalid-method-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-invalid-method-error.js) +- [parallel/test-http-request-join-authorization-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-join-authorization-headers.js) +- [parallel/test-http-request-large-payload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-large-payload.js) +- [parallel/test-http-request-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-methods.js) +- [parallel/test-http-request-smuggling-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-smuggling-content-length.js) +- [parallel/test-http-res-write-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-res-write-after-end.js) +- [parallel/test-http-res-write-end-dont-take-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-res-write-end-dont-take-array.js) +- [parallel/test-http-response-add-header-after-sent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-add-header-after-sent.js) +- [parallel/test-http-response-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-close.js) +- [parallel/test-http-response-cork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-cork.js) +- [parallel/test-http-response-multi-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-multi-content-length.js) +- [parallel/test-http-response-multiheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-multiheaders.js) +- [parallel/test-http-response-no-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-no-headers.js) +- [parallel/test-http-response-readable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-readable.js) +- [parallel/test-http-response-remove-header-after-sent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-remove-header-after-sent.js) +- [parallel/test-http-response-setheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-setheaders.js) +- [parallel/test-http-response-splitting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-splitting.js) +- [parallel/test-http-response-status-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-status-message.js) +- [parallel/test-http-response-statuscode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-statuscode.js) +- [parallel/test-http-response-writehead-returns-this.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-writehead-returns-this.js) +- [parallel/test-http-same-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-same-map.js) +- [parallel/test-http-server-async-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-async-dispose.js) +- [parallel/test-http-server-capture-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-capture-rejections.js) +- [parallel/test-http-server-client-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-client-error.js) +- [parallel/test-http-server-close-all.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-all.js) +- [parallel/test-http-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-destroy-timeout.js) +- [parallel/test-http-server-close-idle-wait-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-idle-wait-response.js) +- [parallel/test-http-server-close-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-idle.js) +- [parallel/test-http-server-connection-list-when-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-connection-list-when-close.js) +- [parallel/test-http-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-connections-checking-leak.js) +- [parallel/test-http-server-consumed-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-consumed-timeout.js) +- [parallel/test-http-server-de-chunked-trailer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-de-chunked-trailer.js) +- [parallel/test-http-server-delete-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-delete-parser.js) +- [parallel/test-http-server-destroy-socket-on-client-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-destroy-socket-on-client-error.js) +- [parallel/test-http-server-headers-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-delayed-headers.js) +- [parallel/test-http-server-headers-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-interrupted-headers.js) +- [parallel/test-http-server-headers-timeout-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-keepalive.js) +- [parallel/test-http-server-headers-timeout-pipelining.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-pipelining.js) +- [parallel/test-http-server-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-incomingmessage-destroy.js) +- [parallel/test-http-server-keep-alive-defaults.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keep-alive-defaults.js) +- [parallel/test-http-server-keep-alive-max-requests-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keep-alive-max-requests-null.js) +- [parallel/test-http-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keep-alive-timeout.js) +- [parallel/test-http-server-keepalive-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keepalive-end.js) +- [parallel/test-http-server-keepalive-req-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keepalive-req-gc.js) +- [parallel/test-http-server-multiheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-multiheaders.js) +- [parallel/test-http-server-multiheaders2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-multiheaders2.js) +- [parallel/test-http-server-non-utf8-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-non-utf8-header.js) +- [parallel/test-http-server-options-highwatermark.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-options-highwatermark.js) +- [parallel/test-http-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-options-incoming-message.js) +- [parallel/test-http-server-options-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-options-server-response.js) +- [parallel/test-http-server-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-reject-chunked-with-content-length.js) +- [parallel/test-http-server-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-reject-cr-no-lf.js) +- [parallel/test-http-server-request-timeout-delayed-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-delayed-body.js) +- [parallel/test-http-server-request-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-delayed-headers.js) +- [parallel/test-http-server-request-timeout-interrupted-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-interrupted-body.js) +- [parallel/test-http-server-request-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-interrupted-headers.js) +- [parallel/test-http-server-request-timeout-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-keepalive.js) +- [parallel/test-http-server-request-timeout-pipelining.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-pipelining.js) +- [parallel/test-http-server-request-timeout-upgrade.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-upgrade.js) +- [parallel/test-http-server-request-timeouts-mixed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeouts-mixed.js) +- [parallel/test-http-server-response-standalone.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-response-standalone.js) +- [parallel/test-http-server-stale-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-stale-close.js) +- [parallel/test-http-server-timeouts-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-timeouts-validation.js) +- [parallel/test-http-server-unconsume-consume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-unconsume-consume.js) +- [parallel/test-http-server-unconsume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-unconsume.js) +- [parallel/test-http-server-write-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-write-after-end.js) +- [parallel/test-http-server-write-end-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-write-end-after-end.js) +- [parallel/test-http-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server.js) +- [parallel/test-http-set-cookies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-cookies.js) +- [parallel/test-http-set-header-chain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-header-chain.js) +- [parallel/test-http-set-max-idle-http-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-max-idle-http-parser.js) +- [parallel/test-http-set-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-timeout-server.js) +- [parallel/test-http-set-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-timeout.js) +- [parallel/test-http-set-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-trailers.js) +- [parallel/test-http-should-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-should-keep-alive.js) +- [parallel/test-http-socket-encoding-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-socket-encoding-error.js) +- [parallel/test-http-socket-error-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-socket-error-listeners.js) +- [parallel/test-http-status-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-status-code.js) +- [parallel/test-http-status-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-status-message.js) +- [parallel/test-http-status-reason-invalid-chars.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-status-reason-invalid-chars.js) +- [parallel/test-http-sync-write-error-during-continue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-sync-write-error-during-continue.js) +- [parallel/test-http-timeout-client-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-timeout-client-warning.js) +- [parallel/test-http-timeout-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-timeout-overflow.js) +- [parallel/test-http-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-timeout.js) +- [parallel/test-http-transfer-encoding-repeated-chunked.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-transfer-encoding-repeated-chunked.js) +- [parallel/test-http-transfer-encoding-smuggling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-transfer-encoding-smuggling.js) +- [parallel/test-http-uncaught-from-request-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-uncaught-from-request-callback.js) +- [parallel/test-http-unix-socket-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-unix-socket-keep-alive.js) +- [parallel/test-http-unix-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-unix-socket.js) +- [parallel/test-http-upgrade-advertise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-advertise.js) +- [parallel/test-http-upgrade-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-agent.js) +- [parallel/test-http-upgrade-binary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-binary.js) +- [parallel/test-http-upgrade-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-client.js) +- [parallel/test-http-upgrade-client2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-client2.js) +- [parallel/test-http-upgrade-reconsume-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-reconsume-stream.js) +- [parallel/test-http-upgrade-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-server.js) +- [parallel/test-http-upgrade-server2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-server2.js) +- [parallel/test-http-url.parse-auth-with-header-in-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-auth-with-header-in-request.js) +- [parallel/test-http-url.parse-auth.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-auth.js) +- [parallel/test-http-url.parse-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-basic.js) +- [parallel/test-http-url.parse-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-path.js) +- [parallel/test-http-url.parse-post.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-post.js) +- [parallel/test-http-url.parse-search.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-search.js) +- [parallel/test-http-wget.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-wget.js) +- [parallel/test-http-writable-true-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-writable-true-after-close.js) +- [parallel/test-http-write-callbacks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-callbacks.js) +- [parallel/test-http-write-empty-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-empty-string.js) +- [parallel/test-http-write-head-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-head-2.js) +- [parallel/test-http-write-head.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-head.js) +- [parallel/test-http-zero-length-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-zero-length-write.js) +- [parallel/test-http-zerolengthbuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-zerolengthbuffer.js) +- [parallel/test-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http.js) +- [parallel/test-http2-altsvc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-altsvc.js) +- [parallel/test-http2-autoselect-protocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-autoselect-protocol.js) +- [parallel/test-http2-backpressure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-backpressure.js) +- [parallel/test-http2-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-binding.js) +- [parallel/test-http2-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-buffersize.js) +- [parallel/test-http2-byteswritten-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-byteswritten-server.js) +- [parallel/test-http2-cancel-while-client-reading.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-cancel-while-client-reading.js) +- [parallel/test-http2-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-capture-rejection.js) +- [parallel/test-http2-clean-output.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-clean-output.js) +- [parallel/test-http2-client-connection-tunnelling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-connection-tunnelling.js) +- [parallel/test-http2-client-data-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-data-end.js) +- [parallel/test-http2-client-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-destroy.js) +- [parallel/test-http2-client-http1-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-http1-server.js) +- [parallel/test-http2-client-jsstream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-jsstream-destroy.js) +- [parallel/test-http2-client-onconnect-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-onconnect-errors.js) +- [parallel/test-http2-client-port-80.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-port-80.js) +- [parallel/test-http2-client-priority-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-priority-before-connect.js) +- [parallel/test-http2-client-promisify-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-promisify-connect.js) +- [parallel/test-http2-client-request-listeners-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-request-listeners-warning.js) +- [parallel/test-http2-client-request-options-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-request-options-errors.js) +- [parallel/test-http2-client-rststream-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-rststream-before-connect.js) +- [parallel/test-http2-client-set-priority.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-set-priority.js) +- [parallel/test-http2-client-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-setLocalWindowSize.js) +- [parallel/test-http2-client-setNextStreamID-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-setNextStreamID-errors.js) +- [parallel/test-http2-client-settings-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-settings-before-connect.js) +- [parallel/test-http2-client-shutdown-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-shutdown-before-connect.js) +- [parallel/test-http2-client-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-socket-destroy.js) +- [parallel/test-http2-client-stream-destroy-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-stream-destroy-before-connect.js) +- [parallel/test-http2-client-unescaped-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-unescaped-path.js) +- [parallel/test-http2-client-upload-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-upload-reject.js) +- [parallel/test-http2-client-upload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-upload.js) +- [parallel/test-http2-client-write-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-write-before-connect.js) +- [parallel/test-http2-client-write-empty-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-write-empty-string.js) +- [parallel/test-http2-close-while-writing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-close-while-writing.js) +- [parallel/test-http2-compat-aborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-aborted.js) +- [parallel/test-http2-compat-client-upload-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-client-upload-reject.js) +- [parallel/test-http2-compat-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-errors.js) +- [parallel/test-http2-compat-expect-continue-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-expect-continue-check.js) +- [parallel/test-http2-compat-expect-continue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-expect-continue.js) +- [parallel/test-http2-compat-expect-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-expect-handling.js) +- [parallel/test-http2-compat-method-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-method-connect.js) +- [parallel/test-http2-compat-serverrequest-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-end.js) +- [parallel/test-http2-compat-serverrequest-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-headers.js) +- [parallel/test-http2-compat-serverrequest-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-host.js) +- [parallel/test-http2-compat-serverrequest-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-pause.js) +- [parallel/test-http2-compat-serverrequest-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-pipe.js) +- [parallel/test-http2-compat-serverrequest-settimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-settimeout.js) +- [parallel/test-http2-compat-serverrequest-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-trailers.js) +- [parallel/test-http2-compat-serverrequest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest.js) +- [parallel/test-http2-compat-serverresponse-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-close.js) +- [parallel/test-http2-compat-serverresponse-createpushresponse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-createpushresponse.js) +- [parallel/test-http2-compat-serverresponse-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-destroy.js) +- [parallel/test-http2-compat-serverresponse-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-drain.js) +- [parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js) +- [parallel/test-http2-compat-serverresponse-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-end.js) +- [parallel/test-http2-compat-serverresponse-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-finished.js) +- [parallel/test-http2-compat-serverresponse-flushheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-flushheaders.js) +- [parallel/test-http2-compat-serverresponse-headers-after-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js) +- [parallel/test-http2-compat-serverresponse-headers-send-date.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-headers-send-date.js) +- [parallel/test-http2-compat-serverresponse-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-headers.js) +- [parallel/test-http2-compat-serverresponse-settimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-settimeout.js) +- [parallel/test-http2-compat-serverresponse-statuscode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statuscode.js) +- [parallel/test-http2-compat-serverresponse-statusmessage-property-set.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property-set.js) +- [parallel/test-http2-compat-serverresponse-statusmessage-property.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property.js) +- [parallel/test-http2-compat-serverresponse-statusmessage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statusmessage.js) +- [parallel/test-http2-compat-serverresponse-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-trailers.js) +- [parallel/test-http2-compat-serverresponse-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-write.js) +- [parallel/test-http2-compat-serverresponse-writehead-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-writehead-array.js) +- [parallel/test-http2-compat-serverresponse-writehead.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-writehead.js) +- [parallel/test-http2-compat-serverresponse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse.js) +- [parallel/test-http2-compat-short-stream-client-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-short-stream-client-server.js) +- [parallel/test-http2-compat-socket-destroy-delayed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-socket-destroy-delayed.js) +- [parallel/test-http2-compat-socket-set.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-socket-set.js) +- [parallel/test-http2-compat-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-socket.js) +- [parallel/test-http2-compat-write-early-hints-invalid-argument-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-type.js) +- [parallel/test-http2-compat-write-early-hints-invalid-argument-value.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-value.js) +- [parallel/test-http2-compat-write-early-hints.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-early-hints.js) +- [parallel/test-http2-compat-write-head-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-head-destroyed.js) +- [parallel/test-http2-connect-method-extended-cant-turn-off.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-method-extended-cant-turn-off.js) +- [parallel/test-http2-connect-method-extended.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-method-extended.js) +- [parallel/test-http2-connect-method.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-method.js) +- [parallel/test-http2-connect-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-options.js) +- [parallel/test-http2-connect-tls-with-delay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-tls-with-delay.js) +- [parallel/test-http2-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect.js) +- [parallel/test-http2-cookies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-cookies.js) +- [parallel/test-http2-create-client-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-create-client-connect.js) +- [parallel/test-http2-create-client-secure-session.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-create-client-secure-session.js) +- [parallel/test-http2-create-client-session.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-create-client-session.js) +- [parallel/test-http2-createsecureserver-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-createsecureserver-options.js) +- [parallel/test-http2-createserver-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-createserver-options.js) +- [parallel/test-http2-createwritereq.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-createwritereq.js) +- [parallel/test-http2-date-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-date-header.js) +- [parallel/test-http2-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-debug.js) +- [parallel/test-http2-destroy-after-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-destroy-after-write.js) +- [parallel/test-http2-dont-lose-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-dont-lose-data.js) +- [parallel/test-http2-dont-override.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-dont-override.js) +- [parallel/test-http2-empty-frame-without-eof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-empty-frame-without-eof.js) +- [parallel/test-http2-endafterheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-endafterheaders.js) +- [parallel/test-http2-error-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-error-order.js) +- [parallel/test-http2-exceeds-server-trailer-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-exceeds-server-trailer-size.js) +- [parallel/test-http2-forget-closed-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-forget-closed-streams.js) +- [parallel/test-http2-generic-streams-sendfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-generic-streams-sendfile.js) +- [parallel/test-http2-generic-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-generic-streams.js) +- [parallel/test-http2-getpackedsettings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-getpackedsettings.js) +- [parallel/test-http2-goaway-delayed-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-goaway-delayed-request.js) +- [parallel/test-http2-goaway-opaquedata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-goaway-opaquedata.js) +- [parallel/test-http2-head-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-head-request.js) +- [parallel/test-http2-https-fallback-http-server-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-https-fallback-http-server-options.js) +- [parallel/test-http2-https-fallback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-https-fallback.js) +- [parallel/test-http2-info-headers-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-info-headers-errors.js) +- [parallel/test-http2-info-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-info-headers.js) +- [parallel/test-http2-invalidargtypes-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-invalidargtypes-errors.js) +- [parallel/test-http2-invalidheaderfield.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-invalidheaderfield.js) +- [parallel/test-http2-invalidheaderfields-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-invalidheaderfields-client.js) +- [parallel/test-http2-large-write-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-write-close.js) +- [parallel/test-http2-large-write-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-write-destroy.js) +- [parallel/test-http2-large-write-multiple-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-write-multiple-requests.js) +- [parallel/test-http2-large-writes-session-memory-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-writes-session-memory-leak.js) +- [parallel/test-http2-malformed-altsvc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-malformed-altsvc.js) +- [parallel/test-http2-many-writes-and-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-many-writes-and-destroy.js) +- [parallel/test-http2-max-concurrent-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-concurrent-streams.js) +- [parallel/test-http2-max-invalid-frames.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-invalid-frames.js) +- [parallel/test-http2-max-session-memory-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-session-memory-leak.js) +- [parallel/test-http2-max-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-settings.js) +- [parallel/test-http2-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-methods.js) +- [parallel/test-http2-misbehaving-flow-control-paused.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misbehaving-flow-control-paused.js) +- [parallel/test-http2-misbehaving-flow-control.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misbehaving-flow-control.js) +- [parallel/test-http2-misbehaving-multiplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misbehaving-multiplex.js) +- [parallel/test-http2-misc-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misc-util.js) +- [parallel/test-http2-misused-pseudoheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misused-pseudoheaders.js) +- [parallel/test-http2-multi-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multi-content-length.js) +- [parallel/test-http2-multiheaders-raw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multiheaders-raw.js) +- [parallel/test-http2-multiheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multiheaders.js) +- [parallel/test-http2-multiplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multiplex.js) +- [parallel/test-http2-multistream-destroy-on-read-tls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multistream-destroy-on-read-tls.js) +- [parallel/test-http2-no-more-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-no-more-streams.js) +- [parallel/test-http2-no-wanttrailers-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-no-wanttrailers-listener.js) +- [parallel/test-http2-onping.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-onping.js) +- [parallel/test-http2-options-max-headers-block-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-max-headers-block-length.js) +- [parallel/test-http2-options-max-headers-exceeds-nghttp2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-max-headers-exceeds-nghttp2.js) +- [parallel/test-http2-options-max-reserved-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-max-reserved-streams.js) +- [parallel/test-http2-options-server-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-server-request.js) +- [parallel/test-http2-options-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-server-response.js) +- [parallel/test-http2-origin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-origin.js) +- [parallel/test-http2-pack-end-stream-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-pack-end-stream-flag.js) +- [parallel/test-http2-padding-aligned.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-padding-aligned.js) +- [parallel/test-http2-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-perf_hooks.js) +- [parallel/test-http2-ping-settings-heapdump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-ping-settings-heapdump.js) +- [parallel/test-http2-ping-unsolicited-ack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-ping-unsolicited-ack.js) +- [parallel/test-http2-ping.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-ping.js) +- [parallel/test-http2-pipe-named-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-pipe-named-pipe.js) +- [parallel/test-http2-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-pipe.js) +- [parallel/test-http2-priority-cycle-.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-priority-cycle-.js) +- [parallel/test-http2-priority-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-priority-event.js) +- [parallel/test-http2-propagate-session-destroy-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-propagate-session-destroy-code.js) +- [parallel/test-http2-removed-header-stays-removed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-removed-header-stays-removed.js) +- [parallel/test-http2-request-remove-connect-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-request-remove-connect-listener.js) +- [parallel/test-http2-request-response-proto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-request-response-proto.js) +- [parallel/test-http2-res-corked.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-res-corked.js) +- [parallel/test-http2-res-writable-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-res-writable-properties.js) +- [parallel/test-http2-reset-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-reset-flood.js) +- [parallel/test-http2-respond-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-errors.js) +- [parallel/test-http2-respond-file-204.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-204.js) +- [parallel/test-http2-respond-file-304.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-304.js) +- [parallel/test-http2-respond-file-404.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-404.js) +- [parallel/test-http2-respond-file-compat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-compat.js) +- [parallel/test-http2-respond-file-error-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-error-dir.js) +- [parallel/test-http2-respond-file-error-pipe-offset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-error-pipe-offset.js) +- [parallel/test-http2-respond-file-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-errors.js) +- [parallel/test-http2-respond-file-fd-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd-errors.js) +- [parallel/test-http2-respond-file-fd-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd-invalid.js) +- [parallel/test-http2-respond-file-fd-range.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd-range.js) +- [parallel/test-http2-respond-file-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd.js) +- [parallel/test-http2-respond-file-filehandle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-filehandle.js) +- [parallel/test-http2-respond-file-push.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-push.js) +- [parallel/test-http2-respond-file-range.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-range.js) +- [parallel/test-http2-respond-file-with-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-with-pipe.js) +- [parallel/test-http2-respond-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file.js) +- [parallel/test-http2-respond-nghttperrors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-nghttperrors.js) +- [parallel/test-http2-respond-no-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-no-data.js) +- [parallel/test-http2-respond-with-fd-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-with-fd-errors.js) +- [parallel/test-http2-respond-with-file-connection-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-with-file-connection-abort.js) +- [parallel/test-http2-response-splitting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-response-splitting.js) +- [parallel/test-http2-sensitive-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-sensitive-headers.js) +- [parallel/test-http2-sent-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-sent-headers.js) +- [parallel/test-http2-serve-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-serve-file.js) +- [parallel/test-http2-server-async-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-async-dispose.js) +- [parallel/test-http2-server-close-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-close-callback.js) +- [parallel/test-http2-server-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-errors.js) +- [parallel/test-http2-server-http1-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-http1-client.js) +- [parallel/test-http2-server-push-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-disabled.js) +- [parallel/test-http2-server-push-stream-errors-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream-errors-args.js) +- [parallel/test-http2-server-push-stream-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream-errors.js) +- [parallel/test-http2-server-push-stream-head.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream-head.js) +- [parallel/test-http2-server-push-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream.js) +- [parallel/test-http2-server-rst-before-respond.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-rst-before-respond.js) +- [parallel/test-http2-server-rst-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-rst-stream.js) +- [parallel/test-http2-server-session-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-session-destroy.js) +- [parallel/test-http2-server-sessionerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-sessionerror.js) +- [parallel/test-http2-server-set-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-set-header.js) +- [parallel/test-http2-server-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-setLocalWindowSize.js) +- [parallel/test-http2-server-settimeout-no-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-settimeout-no-callback.js) +- [parallel/test-http2-server-shutdown-before-respond.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-shutdown-before-respond.js) +- [parallel/test-http2-server-shutdown-options-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-shutdown-options-errors.js) +- [parallel/test-http2-server-shutdown-redundant.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-shutdown-redundant.js) +- [parallel/test-http2-server-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-socket-destroy.js) +- [parallel/test-http2-server-startup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-startup.js) +- [parallel/test-http2-server-stream-session-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-stream-session-destroy.js) +- [parallel/test-http2-server-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-timeout.js) +- [parallel/test-http2-server-unknown-protocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-unknown-protocol.js) +- [parallel/test-http2-session-gc-while-write-scheduled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-gc-while-write-scheduled.js) +- [parallel/test-http2-session-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-settings.js) +- [parallel/test-http2-session-stream-state.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-stream-state.js) +- [parallel/test-http2-session-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-timeout.js) +- [parallel/test-http2-session-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-unref.js) +- [parallel/test-http2-settings-unsolicited-ack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-settings-unsolicited-ack.js) +- [parallel/test-http2-short-stream-client-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-short-stream-client-server.js) +- [parallel/test-http2-single-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-single-headers.js) +- [parallel/test-http2-socket-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-socket-close.js) +- [parallel/test-http2-socket-proxy-handler-for-has.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-socket-proxy-handler-for-has.js) +- [parallel/test-http2-socket-proxy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-socket-proxy.js) +- [parallel/test-http2-status-code-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-status-code-invalid.js) +- [parallel/test-http2-status-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-status-code.js) +- [parallel/test-http2-stream-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-stream-client.js) +- [parallel/test-http2-stream-destroy-event-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-stream-destroy-event-order.js) +- [parallel/test-http2-stream-removelisteners-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-stream-removelisteners-after-close.js) +- [parallel/test-http2-timeouts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-timeouts.js) +- [parallel/test-http2-tls-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-tls-disconnect.js) +- [parallel/test-http2-too-large-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-large-headers.js) +- [parallel/test-http2-too-many-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-many-headers.js) +- [parallel/test-http2-too-many-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-many-settings.js) +- [parallel/test-http2-too-many-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-many-streams.js) +- [parallel/test-http2-trailers-after-session-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-trailers-after-session-close.js) +- [parallel/test-http2-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-trailers.js) +- [parallel/test-http2-unbound-socket-proxy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-unbound-socket-proxy.js) +- [parallel/test-http2-update-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-update-settings.js) +- [parallel/test-http2-util-assert-valid-pseudoheader.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-assert-valid-pseudoheader.js) +- [parallel/test-http2-util-asserts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-asserts.js) +- [parallel/test-http2-util-headers-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-headers-list.js) +- [parallel/test-http2-util-nghttp2error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-nghttp2error.js) +- [parallel/test-http2-util-update-options-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-update-options-buffer.js) +- [parallel/test-http2-window-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-window-size.js) +- [parallel/test-http2-write-callbacks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-write-callbacks.js) +- [parallel/test-http2-write-empty-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-write-empty-string.js) +- [parallel/test-http2-write-finishes-after-stream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-write-finishes-after-stream-destroy.js) +- [parallel/test-http2-zero-length-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-zero-length-header.js) +- [parallel/test-http2-zero-length-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-zero-length-write.js) +- [parallel/test-https-abortcontroller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-abortcontroller.js) +- [parallel/test-https-agent-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-abort-controller.js) +- [parallel/test-https-agent-additional-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-additional-options.js) +- [parallel/test-https-agent-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-constructor.js) +- [parallel/test-https-agent-create-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-create-connection.js) +- [parallel/test-https-agent-disable-session-reuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-disable-session-reuse.js) +- [parallel/test-https-agent-getname.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-getname.js) +- [parallel/test-https-agent-keylog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-keylog.js) +- [parallel/test-https-agent-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-servername.js) +- [parallel/test-https-agent-session-eviction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-session-eviction.js) +- [parallel/test-https-agent-session-injection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-session-injection.js) +- [parallel/test-https-agent-session-reuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-session-reuse.js) +- [parallel/test-https-agent-sni.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-sni.js) +- [parallel/test-https-agent-sockets-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-sockets-leak.js) +- [parallel/test-https-agent-unref-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-unref-socket.js) +- [parallel/test-https-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent.js) +- [parallel/test-https-argument-of-creating.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-argument-of-creating.js) +- [parallel/test-https-autoselectfamily.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-autoselectfamily.js) +- [parallel/test-https-byteswritten.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-byteswritten.js) +- [parallel/test-https-client-checkServerIdentity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-checkServerIdentity.js) +- [parallel/test-https-client-get-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-get-url.js) +- [parallel/test-https-client-override-global-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-override-global-agent.js) +- [parallel/test-https-client-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-reject.js) +- [parallel/test-https-client-renegotiation-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-renegotiation-limit.js) +- [parallel/test-https-client-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-resume.js) +- [parallel/test-https-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-close.js) +- [parallel/test-https-connect-address-family.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-connect-address-family.js) +- [parallel/test-https-connecting-to-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-connecting-to-http.js) +- [parallel/test-https-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-drain.js) +- [parallel/test-https-eof-for-eom.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-eof-for-eom.js) +- [parallel/test-https-foafssl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-foafssl.js) +- [parallel/test-https-host-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-host-headers.js) +- [parallel/test-https-hwm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-hwm.js) +- [parallel/test-https-insecure-parse-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-insecure-parse-per-stream.js) +- [parallel/test-https-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-keep-alive-drop-requests.js) +- [parallel/test-https-localaddress-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-localaddress-bind-error.js) +- [parallel/test-https-localaddress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-localaddress.js) +- [parallel/test-https-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-max-header-size-per-stream.js) +- [parallel/test-https-max-headers-count.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-max-headers-count.js) +- [parallel/test-https-options-boolean-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-options-boolean-check.js) +- [parallel/test-https-pfx.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-pfx.js) +- [parallel/test-https-request-arguments.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-request-arguments.js) +- [parallel/test-https-resume-after-renew.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-resume-after-renew.js) +- [parallel/test-https-selfsigned-no-keycertsign-no-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-selfsigned-no-keycertsign-no-crash.js) +- [parallel/test-https-server-async-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-async-dispose.js) +- [parallel/test-https-server-close-all.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-close-all.js) +- [parallel/test-https-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-close-destroy-timeout.js) +- [parallel/test-https-server-close-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-close-idle.js) +- [parallel/test-https-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-connections-checking-leak.js) +- [parallel/test-https-server-headers-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-headers-timeout.js) +- [parallel/test-https-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-options-incoming-message.js) +- [parallel/test-https-server-options-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-options-server-response.js) +- [parallel/test-https-server-request-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-request-timeout.js) +- [parallel/test-https-set-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-set-timeout-server.js) +- [parallel/test-https-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-simple.js) +- [parallel/test-https-socket-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-socket-options.js) +- [parallel/test-https-strict.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-strict.js) +- [parallel/test-https-timeout-server-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-timeout-server-2.js) +- [parallel/test-https-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-timeout-server.js) +- [parallel/test-https-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-timeout.js) +- [parallel/test-https-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-truncate.js) +- [parallel/test-https-unix-socket-self-signed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-unix-socket-self-signed.js) +- [parallel/test-icu-data-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-data-dir.js) +- [parallel/test-icu-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-env.js) +- [parallel/test-icu-minimum-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-minimum-version.js) +- [parallel/test-icu-punycode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-punycode.js) +- [parallel/test-icu-stringwidth.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-stringwidth.js) +- [parallel/test-inspect-address-in-use.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-address-in-use.js) +- [parallel/test-inspect-async-hook-setup-at-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-async-hook-setup-at-inspect.js) +- [parallel/test-inspect-publish-uid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-publish-uid.js) +- [parallel/test-inspect-support-for-node_options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-support-for-node_options.js) +- [parallel/test-inspector-already-activated-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-already-activated-cli.js) +- [parallel/test-inspector-async-call-stack-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-call-stack-abort.js) +- [parallel/test-inspector-async-call-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-call-stack.js) +- [parallel/test-inspector-async-hook-after-done.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-hook-after-done.js) +- [parallel/test-inspector-async-hook-setup-at-inspect-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js) +- [parallel/test-inspector-async-hook-setup-at-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-hook-setup-at-signal.js) +- [parallel/test-inspector-async-stack-traces-promise-then.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-stack-traces-promise-then.js) +- [parallel/test-inspector-async-stack-traces-set-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-stack-traces-set-interval.js) +- [parallel/test-inspector-bindings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-bindings.js) +- [parallel/test-inspector-break-e.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-break-e.js) +- [parallel/test-inspector-break-when-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-break-when-eval.js) +- [parallel/test-inspector-close-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-close-worker.js) +- [parallel/test-inspector-connect-main-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-connect-main-thread.js) +- [parallel/test-inspector-connect-to-main-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-connect-to-main-thread.js) +- [parallel/test-inspector-console-top-frame.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-console-top-frame.js) +- [parallel/test-inspector-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-console.js) +- [parallel/test-inspector-contexts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-contexts.js) +- [parallel/test-inspector-debug-brk-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-debug-brk-flag.js) +- [parallel/test-inspector-debug-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-debug-end.js) +- [parallel/test-inspector-enabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-enabled.js) +- [parallel/test-inspector-esm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-esm.js) +- [parallel/test-inspector-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-exception.js) +- [parallel/test-inspector-has-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-has-idle.js) +- [parallel/test-inspector-has-inspector-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-has-inspector-false.js) +- [parallel/test-inspector-heap-allocation-tracker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-heap-allocation-tracker.js) +- [parallel/test-inspector-heapdump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-heapdump.js) +- [parallel/test-inspector-inspect-brk-node.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-inspect-brk-node.js) +- [parallel/test-inspector-invalid-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-invalid-args.js) +- [parallel/test-inspector-ip-detection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-ip-detection.js) +- [parallel/test-inspector-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-module.js) +- [parallel/test-inspector-multisession-js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-multisession-js.js) +- [parallel/test-inspector-multisession-ws.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-multisession-ws.js) +- [parallel/test-inspector-not-blocked-on-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-not-blocked-on-idle.js) +- [parallel/test-inspector-open-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-open-coverage.js) +- [parallel/test-inspector-open-port-integer-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-open-port-integer-overflow.js) +- [parallel/test-inspector-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-open.js) +- [parallel/test-inspector-overwrite-config.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-overwrite-config.js) +- [parallel/test-inspector-port-zero-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-port-zero-cluster.js) +- [parallel/test-inspector-port-zero.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-port-zero.js) +- [parallel/test-inspector-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-promises.js) +- [parallel/test-inspector-reported-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-reported-host.js) +- [parallel/test-inspector-resource-name-to-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-resource-name-to-url.js) +- [parallel/test-inspector-runtime-evaluate-with-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-runtime-evaluate-with-timeout.js) +- [parallel/test-inspector-scriptparsed-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-scriptparsed-context.js) +- [parallel/test-inspector-stop-profile-after-done.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-stop-profile-after-done.js) +- [parallel/test-inspector-stops-no-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-stops-no-file.js) +- [parallel/test-inspector-stress-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-stress-http.js) +- [parallel/test-inspector-tracing-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-tracing-domain.js) +- [parallel/test-inspector-vm-global-accessors-getter-sideeffect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-vm-global-accessors-getter-sideeffect.js) +- [parallel/test-inspector-vm-global-accessors-sideeffects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-vm-global-accessors-sideeffects.js) +- [parallel/test-inspector-wait-for-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-wait-for-connection.js) +- [parallel/test-inspector-waiting-for-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-waiting-for-disconnect.js) +- [parallel/test-inspector-workers-flat-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-workers-flat-list.js) +- [parallel/test-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector.js) +- [parallel/test-instanceof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-instanceof.js) +- [parallel/test-internal-assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-assert.js) +- [parallel/test-internal-error-original-names.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-error-original-names.js) +- [parallel/test-internal-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-errors.js) +- [parallel/test-internal-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-fs-syncwritestream.js) +- [parallel/test-internal-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-fs.js) +- [parallel/test-internal-iterable-weak-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-iterable-weak-map.js) +- [parallel/test-internal-module-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-module-require.js) +- [parallel/test-internal-module-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-module-wrap.js) +- [parallel/test-internal-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-modules.js) +- [parallel/test-internal-process-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-process-binding.js) +- [parallel/test-internal-socket-list-receive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-socket-list-receive.js) +- [parallel/test-internal-socket-list-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-socket-list-send.js) +- [parallel/test-internal-util-assertCrypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-assertCrypto.js) +- [parallel/test-internal-util-classwrapper.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-classwrapper.js) +- [parallel/test-internal-util-decorate-error-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-decorate-error-stack.js) +- [parallel/test-internal-util-helpers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-helpers.js) +- [parallel/test-internal-util-normalizeencoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-normalizeencoding.js) +- [parallel/test-internal-util-objects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-objects.js) +- [parallel/test-internal-util-weakreference.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-weakreference.js) +- [parallel/test-internal-validators-validateoneof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-validators-validateoneof.js) +- [parallel/test-internal-validators-validateport.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-validators-validateport.js) +- [parallel/test-internal-webidl-converttoint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-webidl-converttoint.js) +- [parallel/test-intl-v8BreakIterator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-intl-v8BreakIterator.js) +- [parallel/test-intl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-intl.js) +- [parallel/test-js-stream-call-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-js-stream-call-properties.js) +- [parallel/test-kill-segfault-freebsd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-kill-segfault-freebsd.js) +- [parallel/test-listen-fd-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-cluster.js) +- [parallel/test-listen-fd-detached-inherit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-detached-inherit.js) +- [parallel/test-listen-fd-detached.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-detached.js) +- [parallel/test-listen-fd-ebadf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-ebadf.js) +- [parallel/test-listen-fd-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-server.js) +- [parallel/test-macos-app-sandbox.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-macos-app-sandbox.js) +- [parallel/test-math-random.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-math-random.js) +- [parallel/test-memory-usage-emfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-memory-usage-emfile.js) +- [parallel/test-memory-usage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-memory-usage.js) +- [parallel/test-messagechannel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messagechannel.js) +- [parallel/test-messageevent-brandcheck.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messageevent-brandcheck.js) +- [parallel/test-messageport-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messageport-hasref.js) +- [parallel/test-messaging-maketransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messaging-maketransferable.js) +- [parallel/test-microtask-queue-integration.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-microtask-queue-integration.js) +- [parallel/test-microtask-queue-run-immediate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-microtask-queue-run-immediate.js) +- [parallel/test-microtask-queue-run.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-microtask-queue-run.js) +- [parallel/test-mime-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-mime-api.js) +- [parallel/test-mime-whatwg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-mime-whatwg.js) +- [parallel/test-module-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-binding.js) +- [parallel/test-module-builtin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-builtin.js) +- [parallel/test-module-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-cache.js) +- [parallel/test-module-children.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-children.js) +- [parallel/test-module-circular-dependency-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-circular-dependency-warning.js) +- [parallel/test-module-circular-symlinks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-circular-symlinks.js) +- [parallel/test-module-create-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-create-require.js) +- [parallel/test-module-globalpaths-nodepath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-globalpaths-nodepath.js) +- [parallel/test-module-isBuiltin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-isBuiltin.js) +- [parallel/test-module-loading-deprecated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-loading-deprecated.js) +- [parallel/test-module-loading-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-loading-error.js) +- [parallel/test-module-loading-globalpaths.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-loading-globalpaths.js) +- [parallel/test-module-main-extension-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-main-extension-lookup.js) +- [parallel/test-module-main-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-main-fail.js) +- [parallel/test-module-main-preserve-symlinks-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-main-preserve-symlinks-fail.js) +- [parallel/test-module-multi-extensions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-multi-extensions.js) +- [parallel/test-module-nodemodulepaths.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-nodemodulepaths.js) +- [parallel/test-module-parent-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-parent-deprecation.js) +- [parallel/test-module-parent-setter-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-parent-setter-deprecation.js) +- [parallel/test-module-prototype-mutation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-prototype-mutation.js) +- [parallel/test-module-readonly.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-readonly.js) +- [parallel/test-module-relative-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-relative-lookup.js) +- [parallel/test-module-run-main-monkey-patch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-run-main-monkey-patch.js) +- [parallel/test-module-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-stat.js) +- [parallel/test-module-symlinked-peer-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-symlinked-peer-modules.js) +- [parallel/test-module-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-version.js) +- [parallel/test-module-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-wrap.js) +- [parallel/test-module-wrapper.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-wrapper.js) +- [parallel/test-net-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-after-close.js) +- [parallel/test-net-allow-half-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-allow-half-open.js) +- [parallel/test-net-autoselectfamily-commandline-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-autoselectfamily-commandline-option.js) +- [parallel/test-net-autoselectfamily-default.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-autoselectfamily-default.js) +- [parallel/test-net-autoselectfamily-ipv4first.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-autoselectfamily-ipv4first.js) +- [parallel/test-net-better-error-messages-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-better-error-messages-listen.js) +- [parallel/test-net-binary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-binary.js) +- [parallel/test-net-bind-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-bind-twice.js) +- [parallel/test-net-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-buffersize.js) +- [parallel/test-net-bytes-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-bytes-read.js) +- [parallel/test-net-bytes-stats.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-bytes-stats.js) +- [parallel/test-net-bytes-written-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-bytes-written-large.js) +- [parallel/test-net-can-reset-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-can-reset-timeout.js) +- [parallel/test-net-child-process-connect-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-child-process-connect-reset.js) +- [parallel/test-net-client-bind-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-client-bind-twice.js) +- [parallel/test-net-connect-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-abort-controller.js) +- [parallel/test-net-connect-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-buffer.js) +- [parallel/test-net-connect-buffer2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-buffer2.js) +- [parallel/test-net-connect-call-socket-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-call-socket-connect.js) +- [parallel/test-net-connect-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-keepalive.js) +- [parallel/test-net-connect-memleak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-memleak.js) +- [parallel/test-net-connect-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-nodelay.js) +- [parallel/test-net-connect-options-allowhalfopen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-allowhalfopen.js) +- [parallel/test-net-connect-options-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-fd.js) +- [parallel/test-net-connect-options-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-invalid.js) +- [parallel/test-net-connect-options-ipv6.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-ipv6.js) +- [parallel/test-net-connect-options-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-path.js) +- [parallel/test-net-connect-options-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-port.js) +- [parallel/test-net-connect-paused-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-paused-connection.js) +- [parallel/test-net-connect-reset-after-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset-after-destroy.js) +- [parallel/test-net-connect-reset-before-connected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset-before-connected.js) +- [parallel/test-net-connect-reset-until-connected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset-until-connected.js) +- [parallel/test-net-connect-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset.js) +- [parallel/test-net-deprecated-setsimultaneousaccepts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-deprecated-setsimultaneousaccepts.js) +- [parallel/test-net-dns-custom-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-dns-custom-lookup.js) +- [parallel/test-net-dns-lookup-skip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-dns-lookup-skip.js) +- [parallel/test-net-dns-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-dns-lookup.js) +- [parallel/test-net-eaddrinuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-eaddrinuse.js) +- [parallel/test-net-end-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-end-destroyed.js) +- [parallel/test-net-error-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-error-twice.js) +- [parallel/test-net-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-keepalive.js) +- [parallel/test-net-large-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-large-string.js) +- [parallel/test-net-listen-after-destroying-stdin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-after-destroying-stdin.js) +- [parallel/test-net-listen-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-error.js) +- [parallel/test-net-listen-exclusive-random-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-exclusive-random-ports.js) +- [parallel/test-net-listen-fd0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-fd0.js) +- [parallel/test-net-listen-ipv6only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-ipv6only.js) +- [parallel/test-net-local-address-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-local-address-port.js) +- [parallel/test-net-normalize-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-normalize-args.js) +- [parallel/test-net-onread-static-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-onread-static-buffer.js) +- [parallel/test-net-pause-resume-connecting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-pause-resume-connecting.js) +- [parallel/test-net-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-perf_hooks.js) +- [parallel/test-net-persistent-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-persistent-keepalive.js) +- [parallel/test-net-persistent-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-persistent-nodelay.js) +- [parallel/test-net-persistent-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-persistent-ref-unref.js) +- [parallel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-pingpong.js) +- [parallel/test-net-reconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-reconnect.js) +- [parallel/test-net-remote-address-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-remote-address-port.js) +- [parallel/test-net-remote-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-remote-address.js) +- [parallel/test-net-server-call-listen-multiple-times.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-call-listen-multiple-times.js) +- [parallel/test-net-server-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-capture-rejection.js) +- [parallel/test-net-server-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-close.js) +- [parallel/test-net-server-drop-connections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-drop-connections.js) +- [parallel/test-net-server-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-keepalive.js) +- [parallel/test-net-server-listen-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-listen-handle.js) +- [parallel/test-net-server-max-connections-close-makes-more-available.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-max-connections-close-makes-more-available.js) +- [parallel/test-net-server-max-connections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-max-connections.js) +- [parallel/test-net-server-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-nodelay.js) +- [parallel/test-net-server-pause-on-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-pause-on-connect.js) +- [parallel/test-net-server-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-reset.js) +- [parallel/test-net-server-simultaneous-accepts-produce-warning-once.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-simultaneous-accepts-produce-warning-once.js) +- [parallel/test-net-server-try-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-try-ports.js) +- [parallel/test-net-settimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-settimeout.js) +- [parallel/test-net-socket-byteswritten.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-byteswritten.js) +- [parallel/test-net-socket-close-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-close-after-end.js) +- [parallel/test-net-socket-connect-invalid-autoselectfamily.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js) +- [parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js) +- [parallel/test-net-socket-connect-without-cb.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-connect-without-cb.js) +- [parallel/test-net-socket-connecting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-connecting.js) +- [parallel/test-net-socket-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-constructor.js) +- [parallel/test-net-socket-destroy-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-destroy-send.js) +- [parallel/test-net-socket-end-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-end-before-connect.js) +- [parallel/test-net-socket-end-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-end-callback.js) +- [parallel/test-net-socket-local-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-local-address.js) +- [parallel/test-net-socket-ready-without-cb.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-ready-without-cb.js) +- [parallel/test-net-socket-reset-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-reset-send.js) +- [parallel/test-net-socket-reset-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-reset-twice.js) +- [parallel/test-net-socket-timeout-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-timeout-unref.js) +- [parallel/test-net-socket-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-timeout.js) +- [parallel/test-net-socket-write-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-write-after-close.js) +- [parallel/test-net-socket-write-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-write-error.js) +- [parallel/test-net-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-stream.js) +- [parallel/test-net-sync-cork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-sync-cork.js) +- [parallel/test-net-throttle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-throttle.js) +- [parallel/test-net-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-writable.js) +- [parallel/test-net-write-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-after-close.js) +- [parallel/test-net-write-after-end-nt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-after-end-nt.js) +- [parallel/test-net-write-cb-on-destroy-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-cb-on-destroy-before-connect.js) +- [parallel/test-net-write-connect-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-connect-write.js) +- [parallel/test-net-write-fully-async-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-fully-async-buffer.js) +- [parallel/test-net-write-fully-async-hex-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-fully-async-hex-string.js) +- [parallel/test-net-write-slow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-slow.js) +- [parallel/test-next-tick-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-next-tick-domain.js) +- [parallel/test-next-tick-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-next-tick-errors.js) +- [parallel/test-no-addons-resolution-condition.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-no-addons-resolution-condition.js) +- [parallel/test-no-node-snapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-no-node-snapshot.js) +- [parallel/test-npm-install.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-npm-install.js) +- [parallel/test-npm-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-npm-version.js) +- [parallel/test-openssl-ca-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-openssl-ca-options.js) +- [parallel/test-options-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-options-binding.js) +- [parallel/test-os-checked-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-checked-function.js) +- [parallel/test-os-eol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-eol.js) +- [parallel/test-os-homedir-no-envvar.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-homedir-no-envvar.js) +- [parallel/test-os-process-priority.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-process-priority.js) +- [parallel/test-os-userinfo-handles-getter-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-userinfo-handles-getter-errors.js) +- [parallel/test-path-posix-relative-on-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-path-posix-relative-on-windows.js) +- [parallel/test-pending-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pending-deprecation.js) +- [parallel/test-perf-gc-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-gc-crash.js) +- [parallel/test-perf-hooks-histogram.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-histogram.js) +- [parallel/test-perf-hooks-resourcetiming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-resourcetiming.js) +- [parallel/test-perf-hooks-usertiming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-usertiming.js) +- [parallel/test-perf-hooks-worker-timeorigin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-worker-timeorigin.js) +- [parallel/test-performance-eventlooputil.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-eventlooputil.js) +- [parallel/test-performance-function-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-function-async.js) +- [parallel/test-performance-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-function.js) +- [parallel/test-performance-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-gc.js) +- [parallel/test-performance-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-global.js) +- [parallel/test-performance-measure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-measure.js) +- [parallel/test-performance-nodetiming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-nodetiming.js) +- [parallel/test-performance-resourcetimingbufferfull.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-resourcetimingbufferfull.js) +- [parallel/test-performance-resourcetimingbuffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-resourcetimingbuffersize.js) +- [parallel/test-performanceobserver-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performanceobserver-gc.js) +- [parallel/test-performanceobserver.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performanceobserver.js) +- [parallel/test-permission-allow-child-process-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-allow-child-process-cli.js) +- [parallel/test-permission-allow-worker-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-allow-worker-cli.js) +- [parallel/test-permission-child-process-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-child-process-cli.js) +- [parallel/test-permission-experimental.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-experimental.js) +- [parallel/test-permission-fs-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-read.js) +- [parallel/test-permission-fs-relative-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-relative-path.js) +- [parallel/test-permission-fs-supported.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-supported.js) +- [parallel/test-permission-fs-symlink-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-symlink-relative.js) +- [parallel/test-permission-fs-symlink-target-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-symlink-target-write.js) +- [parallel/test-permission-fs-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-symlink.js) +- [parallel/test-permission-fs-traversal-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-traversal-path.js) +- [parallel/test-permission-fs-wildcard.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-wildcard.js) +- [parallel/test-permission-fs-windows-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-windows-path.js) +- [parallel/test-permission-fs-write-report.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-write-report.js) +- [parallel/test-permission-fs-write-v8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-write-v8.js) +- [parallel/test-permission-fs-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-write.js) +- [parallel/test-permission-has.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-has.js) +- [parallel/test-permission-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-inspector.js) +- [parallel/test-permission-processbinding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-processbinding.js) +- [parallel/test-permission-warning-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-warning-flags.js) +- [parallel/test-permission-worker-threads-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-worker-threads-cli.js) +- [parallel/test-pipe-abstract-socket-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-abstract-socket-http.js) +- [parallel/test-pipe-abstract-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-abstract-socket.js) +- [parallel/test-pipe-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-address.js) +- [parallel/test-pipe-file-to-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-file-to-http.js) +- [parallel/test-pipe-head.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-head.js) +- [parallel/test-pipe-outgoing-message-data-emitted-after-ended.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-outgoing-message-data-emitted-after-ended.js) +- [parallel/test-pipe-return-val.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-return-val.js) +- [parallel/test-pipe-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-stream.js) +- [parallel/test-pipe-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-unref.js) +- [parallel/test-pipe-writev.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-writev.js) +- [parallel/test-policy-crypto-default-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-crypto-default-encoding.js) +- [parallel/test-policy-crypto-hash-tampering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-crypto-hash-tampering.js) +- [parallel/test-policy-dependencies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-dependencies.js) +- [parallel/test-policy-dependency-conditions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-dependency-conditions.js) +- [parallel/test-policy-integrity-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-integrity-flag.js) +- [parallel/test-policy-manifest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-manifest.js) +- [parallel/test-policy-parse-integrity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-parse-integrity.js) +- [parallel/test-policy-process-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-process-binding.js) +- [parallel/test-policy-scopes-dependencies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-scopes-dependencies.js) +- [parallel/test-policy-scopes-integrity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-scopes-integrity.js) +- [parallel/test-policy-scopes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-scopes.js) +- [parallel/test-preload-print-process-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload-print-process-argv.js) +- [parallel/test-preload-self-referential.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload-self-referential.js) +- [parallel/test-preload-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload-worker.js) +- [parallel/test-preload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload.js) +- [parallel/test-primordials-apply.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-primordials-apply.js) +- [parallel/test-primordials-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-primordials-promise.js) +- [parallel/test-primordials-regexp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-primordials-regexp.js) +- [parallel/test-priority-queue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-priority-queue.js) +- [parallel/test-process-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-abort.js) +- [parallel/test-process-argv-0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-argv-0.js) +- [parallel/test-process-assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-assert.js) +- [parallel/test-process-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-beforeexit-throw-exit.js) +- [parallel/test-process-binding-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-binding-util.js) +- [parallel/test-process-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-binding.js) +- [parallel/test-process-chdir-errormessage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-chdir-errormessage.js) +- [parallel/test-process-chdir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-chdir.js) +- [parallel/test-process-config.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-config.js) +- [parallel/test-process-constants-noatime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-constants-noatime.js) +- [parallel/test-process-constrained-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-constrained-memory.js) +- [parallel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-cpuUsage.js) +- [parallel/test-process-dlopen-error-message-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-dlopen-error-message-crash.js) +- [parallel/test-process-dlopen-undefined-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-dlopen-undefined-exports.js) +- [parallel/test-process-domain-segfault.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-domain-segfault.js) +- [parallel/test-process-emit-warning-from-native.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-emit-warning-from-native.js) +- [parallel/test-process-emit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-emit.js) +- [parallel/test-process-emitwarning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-emitwarning.js) +- [parallel/test-process-env-allowed-flags-are-documented.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-allowed-flags-are-documented.js) +- [parallel/test-process-env-delete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-delete.js) +- [parallel/test-process-env-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-deprecation.js) +- [parallel/test-process-env-ignore-getter-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-ignore-getter-setter.js) +- [parallel/test-process-env-sideeffects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-sideeffects.js) +- [parallel/test-process-env-symbols.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-symbols.js) +- [parallel/test-process-env-tz.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-tz.js) +- [parallel/test-process-env-windows-error-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-windows-error-reset.js) +- [parallel/test-process-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env.js) +- [parallel/test-process-euid-egid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-euid-egid.js) +- [parallel/test-process-exception-capture-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture-errors.js) +- [parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js) +- [parallel/test-process-exception-capture-should-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught.js) +- [parallel/test-process-exception-capture.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture.js) +- [parallel/test-process-exec-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exec-argv.js) +- [parallel/test-process-execpath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-execpath.js) +- [parallel/test-process-exit-code-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exit-code-validation.js) +- [parallel/test-process-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exit-code.js) +- [parallel/test-process-external-stdio-close-spawn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-external-stdio-close-spawn.js) +- [parallel/test-process-external-stdio-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-external-stdio-close.js) +- [parallel/test-process-features.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-features.js) +- [parallel/test-process-getactivehandles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactivehandles.js) +- [parallel/test-process-getactiverequests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiverequests.js) +- [parallel/test-process-getactiveresources-track-active-handles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-active-handles.js) +- [parallel/test-process-getactiveresources-track-active-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-active-requests.js) +- [parallel/test-process-getactiveresources-track-interval-lifetime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-interval-lifetime.js) +- [parallel/test-process-getactiveresources-track-multiple-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-multiple-timers.js) +- [parallel/test-process-getactiveresources-track-timer-lifetime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-timer-lifetime.js) +- [parallel/test-process-getactiveresources.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources.js) +- [parallel/test-process-getgroups.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getgroups.js) +- [parallel/test-process-hrtime-bigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-hrtime-bigint.js) +- [parallel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-hrtime.js) +- [parallel/test-process-initgroups.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-initgroups.js) +- [parallel/test-process-kill-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-kill-null.js) +- [parallel/test-process-next-tick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-next-tick.js) +- [parallel/test-process-no-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-no-deprecation.js) +- [parallel/test-process-ppid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-ppid.js) +- [parallel/test-process-prototype.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-prototype.js) +- [parallel/test-process-raw-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-raw-debug.js) +- [parallel/test-process-really-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-really-exit.js) +- [parallel/test-process-redirect-warnings-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-redirect-warnings-env.js) +- [parallel/test-process-redirect-warnings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-redirect-warnings.js) +- [parallel/test-process-release.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-release.js) +- [parallel/test-process-remove-all-signal-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-remove-all-signal-listeners.js) +- [parallel/test-process-setgroups.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-setgroups.js) +- [parallel/test-process-setsourcemapsenabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-setsourcemapsenabled.js) +- [parallel/test-process-setuid-io-uring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-setuid-io-uring.js) +- [parallel/test-process-title-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-title-cli.js) +- [parallel/test-process-uid-gid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-uid-gid.js) +- [parallel/test-process-umask-mask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-umask-mask.js) +- [parallel/test-process-umask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-umask.js) +- [parallel/test-process-uncaught-exception-monitor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-uncaught-exception-monitor.js) +- [parallel/test-process-versions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-versions.js) +- [parallel/test-process-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-warning.js) +- [parallel/test-promise-handled-rejection-no-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-handled-rejection-no-warning.js) +- [parallel/test-promise-hook-create-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-create-hook.js) +- [parallel/test-promise-hook-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-exceptions.js) +- [parallel/test-promise-hook-on-after.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-after.js) +- [parallel/test-promise-hook-on-before.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-before.js) +- [parallel/test-promise-hook-on-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-init.js) +- [parallel/test-promise-hook-on-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-resolve.js) +- [parallel/test-promise-reject-callback-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-reject-callback-exception.js) +- [parallel/test-promise-swallowed-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-swallowed-event.js) +- [parallel/test-promise-unhandled-default.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-default.js) +- [parallel/test-promise-unhandled-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-error.js) +- [parallel/test-promise-unhandled-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-flag.js) +- [parallel/test-promise-unhandled-silent-no-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-silent-no-hook.js) +- [parallel/test-promise-unhandled-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-throw.js) +- [parallel/test-promise-unhandled-warn-no-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-warn-no-hook.js) +- [parallel/test-promise-unhandled-warn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-warn.js) +- [parallel/test-promises-unhandled-proxy-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-unhandled-proxy-rejections.js) +- [parallel/test-promises-unhandled-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-unhandled-rejections.js) +- [parallel/test-promises-unhandled-symbol-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-unhandled-symbol-rejections.js) +- [parallel/test-promises-warning-on-unhandled-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-warning-on-unhandled-rejection.js) +- [parallel/test-queue-microtask-uncaught-asynchooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-queue-microtask-uncaught-asynchooks.js) +- [parallel/test-queue-microtask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-queue-microtask.js) +- [parallel/test-readable-from-iterator-closing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readable-from-iterator-closing.js) +- [parallel/test-readable-from-web-enqueue-then-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readable-from-web-enqueue-then-close.js) +- [parallel/test-readable-from.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readable-from.js) +- [parallel/test-readable-large-hwm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readable-large-hwm.js) +- [parallel/test-readable-single-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readable-single-end.js) +- [parallel/test-readline-async-iterators-backpressure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-async-iterators-backpressure.js) +- [parallel/test-readline-async-iterators-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-async-iterators-destroy.js) +- [parallel/test-readline-async-iterators.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-async-iterators.js) +- [parallel/test-readline-carriage-return-between-chunks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-carriage-return-between-chunks.js) +- [parallel/test-readline-csi.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-csi.js) +- [parallel/test-readline-input-onerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-input-onerror.js) +- [parallel/test-readline-interface-no-trailing-newline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-interface-no-trailing-newline.js) +- [parallel/test-readline-interface-recursive-writes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-interface-recursive-writes.js) +- [parallel/test-readline-interface.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-interface.js) +- [parallel/test-readline-promises-interface.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-promises-interface.js) +- [parallel/test-readline-promises-tab-complete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-promises-tab-complete.js) +- [parallel/test-readline-tab-complete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-tab-complete.js) +- [parallel/test-ref-unref-return.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-ref-unref-return.js) +- [parallel/test-regression-object-prototype.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-regression-object-prototype.js) +- [parallel/test-release-changelog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-release-changelog.js) +- [parallel/test-release-npm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-release-npm.js) +- [parallel/test-repl-array-prototype-tempering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-array-prototype-tempering.js) +- [parallel/test-repl-autocomplete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-autocomplete.js) +- [parallel/test-repl-autolibs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-autolibs.js) +- [parallel/test-repl-clear-immediate-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-clear-immediate-crash.js) +- [parallel/test-repl-cli-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-cli-eval.js) +- [parallel/test-repl-colors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-colors.js) +- [parallel/test-repl-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-context.js) +- [parallel/test-repl-definecommand.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-definecommand.js) +- [parallel/test-repl-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-domain.js) +- [parallel/test-repl-dynamic-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-dynamic-import.js) +- [parallel/test-repl-editor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-editor.js) +- [parallel/test-repl-empty.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-empty.js) +- [parallel/test-repl-end-emits-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-end-emits-exit.js) +- [parallel/test-repl-envvars.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-envvars.js) +- [parallel/test-repl-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-eval.js) +- [parallel/test-repl-function-definition-edge-case.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-function-definition-edge-case.js) +- [parallel/test-repl-harmony.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-harmony.js) +- [parallel/test-repl-history-navigation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-history-navigation.js) +- [parallel/test-repl-history-perm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-history-perm.js) +- [parallel/test-repl-import-referrer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-import-referrer.js) +- [parallel/test-repl-inspect-defaults.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-inspect-defaults.js) +- [parallel/test-repl-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-inspector.js) +- [parallel/test-repl-let-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-let-process.js) +- [parallel/test-repl-load-multiline-no-trailing-newline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-load-multiline-no-trailing-newline.js) +- [parallel/test-repl-load-multiline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-load-multiline.js) +- [parallel/test-repl-mode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-mode.js) +- [parallel/test-repl-multiline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-multiline.js) +- [parallel/test-repl-no-terminal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-no-terminal.js) +- [parallel/test-repl-null-thrown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-null-thrown.js) +- [parallel/test-repl-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-null.js) +- [parallel/test-repl-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-options.js) +- [parallel/test-repl-permission-model.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-permission-model.js) +- [parallel/test-repl-persistent-history.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-persistent-history.js) +- [parallel/test-repl-preprocess-top-level-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-preprocess-top-level-await.js) +- [parallel/test-repl-pretty-custom-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-pretty-custom-stack.js) +- [parallel/test-repl-pretty-stack-custom-writer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-pretty-stack-custom-writer.js) +- [parallel/test-repl-pretty-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-pretty-stack.js) +- [parallel/test-repl-preview.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-preview.js) +- [parallel/test-repl-programmatic-history.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-programmatic-history.js) +- [parallel/test-repl-recoverable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-recoverable.js) +- [parallel/test-repl-require-after-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-after-write.js) +- [parallel/test-repl-require-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-cache.js) +- [parallel/test-repl-require-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-context.js) +- [parallel/test-repl-require-self-referential.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-self-referential.js) +- [parallel/test-repl-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require.js) +- [parallel/test-repl-reset-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-reset-event.js) +- [parallel/test-repl-reverse-search.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-reverse-search.js) +- [parallel/test-repl-save-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-save-load.js) +- [parallel/test-repl-setprompt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-setprompt.js) +- [parallel/test-repl-sigint-nested-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-sigint-nested-eval.js) +- [parallel/test-repl-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-sigint.js) +- [parallel/test-repl-stdin-push-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-stdin-push-null.js) +- [parallel/test-repl-strict-mode-previews.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-strict-mode-previews.js) +- [parallel/test-repl-syntax-error-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-syntax-error-handling.js) +- [parallel/test-repl-syntax-error-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-syntax-error-stack.js) +- [parallel/test-repl-tab-complete-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-crash.js) +- [parallel/test-repl-tab-complete-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-import.js) +- [parallel/test-repl-tab-complete-nested-repls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-nested-repls.js) +- [parallel/test-repl-tab-complete-no-warn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-no-warn.js) +- [parallel/test-repl-tab-complete-on-editor-mode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-on-editor-mode.js) +- [parallel/test-repl-tab-complete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete.js) +- [parallel/test-repl-tab.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab.js) +- [parallel/test-repl-throw-null-or-undefined.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-throw-null-or-undefined.js) +- [parallel/test-repl-top-level-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-top-level-await.js) +- [parallel/test-repl-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception-async.js) +- [parallel/test-repl-uncaught-exception-evalcallback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception-evalcallback.js) +- [parallel/test-repl-uncaught-exception-standalone.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception-standalone.js) +- [parallel/test-repl-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception.js) +- [parallel/test-repl-underscore.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-underscore.js) +- [parallel/test-repl-unexpected-token-recoverable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-unexpected-token-recoverable.js) +- [parallel/test-repl-unsafe-array-iteration.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-unsafe-array-iteration.js) +- [parallel/test-repl-unsupported-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-unsupported-option.js) +- [parallel/test-repl-use-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-use-global.js) +- [parallel/test-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl.js) +- [parallel/test-require-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-cache.js) +- [parallel/test-require-delete-array-iterator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-delete-array-iterator.js) +- [parallel/test-require-dot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-dot.js) +- [parallel/test-require-empty-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-empty-main.js) +- [parallel/test-require-enoent-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-enoent-dir.js) +- [parallel/test-require-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-exceptions.js) +- [parallel/test-require-extension-over-directory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extension-over-directory.js) +- [parallel/test-require-extensions-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extensions-main.js) +- [parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js) +- [parallel/test-require-extensions-same-filename-as-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extensions-same-filename-as-dir.js) +- [parallel/test-require-invalid-main-no-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-invalid-main-no-exports.js) +- [parallel/test-require-invalid-package.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-invalid-package.js) +- [parallel/test-require-json.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-json.js) +- [parallel/test-require-long-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-long-path.js) +- [parallel/test-require-mjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-mjs.js) +- [parallel/test-require-node-prefix.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-node-prefix.js) +- [parallel/test-require-nul.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-nul.js) +- [parallel/test-require-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-process.js) +- [parallel/test-require-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-resolve.js) +- [parallel/test-require-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-symlink.js) +- [parallel/test-require-unicode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-unicode.js) +- [parallel/test-resource-usage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-resource-usage.js) +- [parallel/test-runner-cli-concurrency.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-cli-concurrency.js) +- [parallel/test-runner-cli-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-cli-timeout.js) +- [parallel/test-runner-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-cli.js) +- [parallel/test-runner-concurrency.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-concurrency.js) +- [parallel/test-runner-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-coverage.js) +- [parallel/test-runner-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-exit-code.js) +- [parallel/test-runner-extraneous-async-activity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-extraneous-async-activity.js) +- [parallel/test-runner-filetest-location.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-filetest-location.js) +- [parallel/test-runner-import-no-scheme.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-import-no-scheme.js) +- [parallel/test-runner-misc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-misc.js) +- [parallel/test-runner-mock-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-mock-timers.js) +- [parallel/test-runner-mocking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-mocking.js) +- [parallel/test-runner-option-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-option-validation.js) +- [parallel/test-runner-reporters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-reporters.js) +- [parallel/test-runner-root-after-with-refed-handles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-root-after-with-refed-handles.js) +- [parallel/test-runner-string-to-regexp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-string-to-regexp.js) +- [parallel/test-runner-test-filter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-test-filter.js) +- [parallel/test-runner-typechecking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-typechecking.js) +- [parallel/test-safe-get-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-safe-get-env.js) +- [parallel/test-security-revert-unknown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-security-revert-unknown.js) +- [parallel/test-set-http-max-http-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-set-http-max-http-headers.js) +- [parallel/test-set-incoming-message-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-set-incoming-message-header.js) +- [parallel/test-set-process-debug-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-set-process-debug-port.js) +- [parallel/test-setproctitle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-setproctitle.js) +- [parallel/test-shadow-realm-allowed-builtin-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-allowed-builtin-modules.js) +- [parallel/test-shadow-realm-custom-loaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-custom-loaders.js) +- [parallel/test-shadow-realm-gc-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-gc-module.js) +- [parallel/test-shadow-realm-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-gc.js) +- [parallel/test-shadow-realm-globals.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-globals.js) +- [parallel/test-shadow-realm-import-value-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-import-value-resolve.js) +- [parallel/test-shadow-realm-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-module.js) +- [parallel/test-shadow-realm-preload-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-preload-module.js) +- [parallel/test-shadow-realm-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-prepare-stack-trace.js) +- [parallel/test-shadow-realm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm.js) +- [parallel/test-sigint-infinite-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-sigint-infinite-loop.js) +- [parallel/test-signal-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-args.js) +- [parallel/test-signal-handler-remove-on-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-handler-remove-on-exit.js) +- [parallel/test-signal-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-handler.js) +- [parallel/test-signal-safety.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-safety.js) +- [parallel/test-signal-unregister.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-unregister.js) +- [parallel/test-single-executable-blob-config-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-single-executable-blob-config-errors.js) +- [parallel/test-single-executable-blob-config.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-single-executable-blob-config.js) +- [parallel/test-snapshot-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-api.js) +- [parallel/test-snapshot-argv1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-argv1.js) +- [parallel/test-snapshot-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-basic.js) +- [parallel/test-snapshot-cjs-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-cjs-main.js) +- [parallel/test-snapshot-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-console.js) +- [parallel/test-snapshot-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-cwd.js) +- [parallel/test-snapshot-dns-lookup-localhost-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-lookup-localhost-promise.js) +- [parallel/test-snapshot-dns-lookup-localhost.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-lookup-localhost.js) +- [parallel/test-snapshot-dns-resolve-localhost-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-resolve-localhost-promise.js) +- [parallel/test-snapshot-dns-resolve-localhost.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-resolve-localhost.js) +- [parallel/test-snapshot-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-error.js) +- [parallel/test-snapshot-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-eval.js) +- [parallel/test-snapshot-gzip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-gzip.js) +- [parallel/test-snapshot-incompatible.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-incompatible.js) +- [parallel/test-snapshot-namespaced-builtin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-namespaced-builtin.js) +- [parallel/test-snapshot-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-net.js) +- [parallel/test-snapshot-typescript.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-typescript.js) +- [parallel/test-snapshot-umd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-umd.js) +- [parallel/test-snapshot-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-warning.js) +- [parallel/test-snapshot-weak-reference.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-weak-reference.js) +- [parallel/test-snapshot-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-worker.js) +- [parallel/test-socket-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-address.js) +- [parallel/test-socket-options-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-options-invalid.js) +- [parallel/test-socket-write-after-fin-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-write-after-fin-error.js) +- [parallel/test-socket-write-after-fin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-write-after-fin.js) +- [parallel/test-socket-writes-before-passed-to-tls-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-writes-before-passed-to-tls-socket.js) +- [parallel/test-socketaddress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socketaddress.js) +- [parallel/test-source-map-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-source-map-api.js) +- [parallel/test-source-map-enable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-source-map-enable.js) +- [parallel/test-spawn-cmd-named-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-spawn-cmd-named-pipe.js) +- [parallel/test-stack-size-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stack-size-limit.js) +- [parallel/test-startup-empty-regexp-statics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-startup-empty-regexp-statics.js) +- [parallel/test-startup-large-pages.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-startup-large-pages.js) +- [parallel/test-stdin-child-proc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-child-proc.js) +- [parallel/test-stdin-from-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-from-file.js) +- [parallel/test-stdin-hang.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-hang.js) +- [parallel/test-stdin-pause-resume-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-pause-resume-sync.js) +- [parallel/test-stdin-pause-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-pause-resume.js) +- [parallel/test-stdin-pipe-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-pipe-large.js) +- [parallel/test-stdin-pipe-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-pipe-resume.js) +- [parallel/test-stdin-resume-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-resume-pause.js) +- [parallel/test-stdin-script-child-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-script-child-option.js) +- [parallel/test-stdin-script-child.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-script-child.js) +- [parallel/test-stdio-closed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdio-closed.js) +- [parallel/test-stdio-pipe-access.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdio-pipe-access.js) +- [parallel/test-stdio-pipe-redirect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdio-pipe-redirect.js) +- [parallel/test-stdio-pipe-stderr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdio-pipe-stderr.js) +- [parallel/test-stdio-undestroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdio-undestroy.js) +- [parallel/test-stdout-cannot-be-closed-child-process-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js) +- [parallel/test-stdout-close-catch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-close-catch.js) +- [parallel/test-stdout-close-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-close-unref.js) +- [parallel/test-stdout-pipeline-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-pipeline-destroy.js) +- [parallel/test-stdout-stderr-reading.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-stderr-reading.js) +- [parallel/test-stdout-stderr-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-stderr-write.js) +- [parallel/test-stdout-to-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-to-file.js) +- [parallel/test-strace-openat-openssl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-strace-openat-openssl.js) +- [parallel/test-stream-base-prototype-accessors-enumerability.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-base-prototype-accessors-enumerability.js) +- [parallel/test-stream-base-typechecking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-base-typechecking.js) +- [parallel/test-stream-catch-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-catch-rejections.js) +- [parallel/test-stream-compose-operator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-compose-operator.js) +- [parallel/test-stream-compose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-compose.js) +- [parallel/test-stream-consumers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-consumers.js) +- [parallel/test-stream-decoder-objectmode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-decoder-objectmode.js) +- [parallel/test-stream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-destroy.js) +- [parallel/test-stream-drop-take.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-drop-take.js) +- [parallel/test-stream-duplex-readable-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-duplex-readable-writable.js) +- [parallel/test-stream-end-of-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-end-of-streams.js) +- [parallel/test-stream-filter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-filter.js) +- [parallel/test-stream-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-finished.js) +- [parallel/test-stream-flatMap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-flatMap.js) +- [parallel/test-stream-forEach.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-forEach.js) +- [parallel/test-stream-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-map.js) +- [parallel/test-stream-passthrough-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-passthrough-drain.js) +- [parallel/test-stream-pipe-deadlock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipe-deadlock.js) +- [parallel/test-stream-pipe-error-unhandled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipe-error-unhandled.js) +- [parallel/test-stream-pipeline-duplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-duplex.js) +- [parallel/test-stream-pipeline-http2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-http2.js) +- [parallel/test-stream-pipeline-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-listeners.js) +- [parallel/test-stream-pipeline-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-process.js) +- [parallel/test-stream-pipeline-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-uncaught.js) +- [parallel/test-stream-pipeline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline.js) +- [parallel/test-stream-preprocess.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-preprocess.js) +- [parallel/test-stream-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-promises.js) +- [parallel/test-stream-push-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-push-order.js) +- [parallel/test-stream-readable-async-iterators.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-async-iterators.js) +- [parallel/test-stream-readable-default-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-default-encoding.js) +- [parallel/test-stream-readable-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-dispose.js) +- [parallel/test-stream-readable-strategy-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-strategy-option.js) +- [parallel/test-stream-readable-unpipe-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-unpipe-resume.js) +- [parallel/test-stream-reduce.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-reduce.js) +- [parallel/test-stream-set-default-hwm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-set-default-hwm.js) +- [parallel/test-stream-toArray.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-toArray.js) +- [parallel/test-stream-toWeb-allows-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-toWeb-allows-server-response.js) +- [parallel/test-stream-transform-hwm0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-transform-hwm0.js) +- [parallel/test-stream-wrap-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-wrap-drain.js) +- [parallel/test-stream-wrap-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-wrap-encoding.js) +- [parallel/test-stream-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-wrap.js) +- [parallel/test-stream-writable-end-cb-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-writable-end-cb-uncaught.js) +- [parallel/test-stream-writable-samecb-singletick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-writable-samecb-singletick.js) +- [parallel/test-stream2-finish-pipe-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream2-finish-pipe-error.js) +- [parallel/test-stream2-httpclient-response-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream2-httpclient-response-end.js) +- [parallel/test-stream3-pipeline-async-iterator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream3-pipeline-async-iterator.js) +- [parallel/test-string-decoder-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-string-decoder-end.js) +- [parallel/test-string-decoder-fuzz.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-string-decoder-fuzz.js) +- [parallel/test-stringbytes-external.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stringbytes-external.js) +- [parallel/test-structuredClone-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-structuredClone-global.js) +- [parallel/test-sync-fileread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-sync-fileread.js) +- [parallel/test-sync-io-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-sync-io-option.js) +- [parallel/test-sys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-sys.js) +- [parallel/test-tcp-wrap-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tcp-wrap-connect.js) +- [parallel/test-tcp-wrap-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tcp-wrap-listen.js) +- [parallel/test-tcp-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tcp-wrap.js) +- [parallel/test-tick-processor-arguments.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tick-processor-arguments.js) +- [parallel/test-tick-processor-version-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tick-processor-version-check.js) +- [parallel/test-timer-immediate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timer-immediate.js) +- [parallel/test-timers-active.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-active.js) +- [parallel/test-timers-clearImmediate-als.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-clearImmediate-als.js) +- [parallel/test-timers-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-destroyed.js) +- [parallel/test-timers-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-dispose.js) +- [parallel/test-timers-enroll-invalid-msecs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-enroll-invalid-msecs.js) +- [parallel/test-timers-enroll-second-time.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-enroll-second-time.js) +- [parallel/test-timers-immediate-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-promisified.js) +- [parallel/test-timers-immediate-queue-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-queue-throw.js) +- [parallel/test-timers-immediate-queue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-queue.js) +- [parallel/test-timers-immediate-unref-nested-once.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-unref-nested-once.js) +- [parallel/test-timers-immediate-unref-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-unref-simple.js) +- [parallel/test-timers-immediate-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-unref.js) +- [parallel/test-timers-immediate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate.js) +- [parallel/test-timers-interval-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-interval-promisified.js) +- [parallel/test-timers-linked-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-linked-list.js) +- [parallel/test-timers-max-duration-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-max-duration-warning.js) +- [parallel/test-timers-nested.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-nested.js) +- [parallel/test-timers-next-tick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-next-tick.js) +- [parallel/test-timers-now.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-now.js) +- [parallel/test-timers-ordering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-ordering.js) +- [parallel/test-timers-promises-scheduler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-promises-scheduler.js) +- [parallel/test-timers-refresh-in-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-refresh-in-callback.js) +- [parallel/test-timers-reset-process-domain-on-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-reset-process-domain-on-throw.js) +- [parallel/test-timers-setimmediate-infinite-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-setimmediate-infinite-loop.js) +- [parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js) +- [parallel/test-timers-this.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-this.js) +- [parallel/test-timers-throw-when-cb-not-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-throw-when-cb-not-function.js) +- [parallel/test-timers-timeout-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-timeout-promisified.js) +- [parallel/test-timers-timeout-to-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-timeout-to-interval.js) +- [parallel/test-timers-to-primitive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-to-primitive.js) +- [parallel/test-timers-unenroll-unref-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unenroll-unref-interval.js) +- [parallel/test-timers-unref-active.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref-active.js) +- [parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js) +- [parallel/test-timers-unref-remove-other-unref-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref-remove-other-unref-timers.js) +- [parallel/test-timers-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref.js) +- [parallel/test-timers-unrefd-interval-still-fires.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unrefd-interval-still-fires.js) +- [parallel/test-timers-unrefed-in-beforeexit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unrefed-in-beforeexit.js) +- [parallel/test-timers-unrefed-in-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unrefed-in-callback.js) +- [parallel/test-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers.js) +- [parallel/test-tls-0-dns-altname.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-0-dns-altname.js) +- [parallel/test-tls-add-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-add-context.js) +- [parallel/test-tls-addca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-addca.js) +- [parallel/test-tls-alert-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-alert-handling.js) +- [parallel/test-tls-alert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-alert.js) +- [parallel/test-tls-alpn-server-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-alpn-server-client.js) +- [parallel/test-tls-async-cb-after-socket-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-async-cb-after-socket-end.js) +- [parallel/test-tls-basic-validations.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-basic-validations.js) +- [parallel/test-tls-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-buffersize.js) +- [parallel/test-tls-ca-concat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ca-concat.js) +- [parallel/test-tls-canonical-ip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-canonical-ip.js) +- [parallel/test-tls-cert-chains-concat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-chains-concat.js) +- [parallel/test-tls-cert-chains-in-ca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-chains-in-ca.js) +- [parallel/test-tls-cert-ext-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-ext-encoding.js) +- [parallel/test-tls-cert-regression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-regression.js) +- [parallel/test-tls-check-server-identity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-check-server-identity.js) +- [parallel/test-tls-cipher-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cipher-list.js) +- [parallel/test-tls-cli-max-version-1.2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-max-version-1.2.js) +- [parallel/test-tls-cli-max-version-1.3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-max-version-1.3.js) +- [parallel/test-tls-cli-min-max-conflict.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-max-conflict.js) +- [parallel/test-tls-cli-min-version-1.0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.0.js) +- [parallel/test-tls-cli-min-version-1.1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.1.js) +- [parallel/test-tls-cli-min-version-1.2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.2.js) +- [parallel/test-tls-cli-min-version-1.3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.3.js) +- [parallel/test-tls-client-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-abort.js) +- [parallel/test-tls-client-abort2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-abort2.js) +- [parallel/test-tls-client-auth.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-auth.js) +- [parallel/test-tls-client-default-ciphers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-default-ciphers.js) +- [parallel/test-tls-client-destroy-soon.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-destroy-soon.js) +- [parallel/test-tls-client-getephemeralkeyinfo.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-getephemeralkeyinfo.js) +- [parallel/test-tls-client-mindhsize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-mindhsize.js) +- [parallel/test-tls-client-reject-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-reject-12.js) +- [parallel/test-tls-client-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-reject.js) +- [parallel/test-tls-client-renegotiation-13.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-renegotiation-13.js) +- [parallel/test-tls-client-renegotiation-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-renegotiation-limit.js) +- [parallel/test-tls-client-resume-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-resume-12.js) +- [parallel/test-tls-client-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-resume.js) +- [parallel/test-tls-client-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-verify.js) +- [parallel/test-tls-clientcertengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-clientcertengine-invalid-arg-type.js) +- [parallel/test-tls-clientcertengine-unsupported.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-clientcertengine-unsupported.js) +- [parallel/test-tls-close-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-close-error.js) +- [parallel/test-tls-close-event-after-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-close-event-after-write.js) +- [parallel/test-tls-close-notify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-close-notify.js) +- [parallel/test-tls-cnnic-whitelist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cnnic-whitelist.js) +- [parallel/test-tls-connect-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-abort-controller.js) +- [parallel/test-tls-connect-address-family.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-address-family.js) +- [parallel/test-tls-connect-allow-half-open-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-allow-half-open-option.js) +- [parallel/test-tls-connect-given-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-given-socket.js) +- [parallel/test-tls-connect-hints-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-hints-option.js) +- [parallel/test-tls-connect-hwm-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-hwm-option.js) +- [parallel/test-tls-connect-memleak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-memleak.js) +- [parallel/test-tls-connect-no-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-no-host.js) +- [parallel/test-tls-connect-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-pipe.js) +- [parallel/test-tls-connect-secure-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-secure-context.js) +- [parallel/test-tls-connect-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-simple.js) +- [parallel/test-tls-connect-stream-writes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-stream-writes.js) +- [parallel/test-tls-connect-timeout-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-timeout-option.js) +- [parallel/test-tls-delayed-attach-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-delayed-attach-error.js) +- [parallel/test-tls-delayed-attach.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-delayed-attach.js) +- [parallel/test-tls-destroy-stream-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-destroy-stream-12.js) +- [parallel/test-tls-destroy-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-destroy-stream.js) +- [parallel/test-tls-destroy-whilst-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-destroy-whilst-write.js) +- [parallel/test-tls-dhe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-dhe.js) +- [parallel/test-tls-disable-renegotiation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-disable-renegotiation.js) +- [parallel/test-tls-ecdh-auto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ecdh-auto.js) +- [parallel/test-tls-ecdh-multiple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ecdh-multiple.js) +- [parallel/test-tls-ecdh.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ecdh.js) +- [parallel/test-tls-econnreset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-econnreset.js) +- [parallel/test-tls-empty-sni-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-empty-sni-context.js) +- [parallel/test-tls-enable-keylog-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-enable-keylog-cli.js) +- [parallel/test-tls-enable-trace-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-enable-trace-cli.js) +- [parallel/test-tls-enable-trace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-enable-trace.js) +- [parallel/test-tls-env-bad-extra-ca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-bad-extra-ca.js) +- [parallel/test-tls-env-extra-ca-file-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-extra-ca-file-load.js) +- [parallel/test-tls-env-extra-ca-no-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-extra-ca-no-crypto.js) +- [parallel/test-tls-env-extra-ca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-extra-ca.js) +- [parallel/test-tls-error-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-error-servername.js) +- [parallel/test-tls-exportkeyingmaterial.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-exportkeyingmaterial.js) +- [parallel/test-tls-external-accessor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-external-accessor.js) +- [parallel/test-tls-fast-writing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-fast-writing.js) +- [parallel/test-tls-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-finished.js) +- [parallel/test-tls-friendly-error-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-friendly-error-message.js) +- [parallel/test-tls-generic-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-generic-stream.js) +- [parallel/test-tls-getcertificate-x509.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-getcertificate-x509.js) +- [parallel/test-tls-getcipher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-getcipher.js) +- [parallel/test-tls-getprotocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-getprotocol.js) +- [parallel/test-tls-handshake-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-handshake-error.js) +- [parallel/test-tls-handshake-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-handshake-exception.js) +- [parallel/test-tls-handshake-nohang.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-handshake-nohang.js) +- [parallel/test-tls-hello-parser-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-hello-parser-failure.js) +- [parallel/test-tls-honorcipherorder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-honorcipherorder.js) +- [parallel/test-tls-inception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-inception.js) +- [parallel/test-tls-interleave.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-interleave.js) +- [parallel/test-tls-invalid-pfx.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-invalid-pfx.js) +- [parallel/test-tls-invoke-queued.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-invoke-queued.js) +- [parallel/test-tls-ip-servername-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ip-servername-deprecation.js) +- [parallel/test-tls-js-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-js-stream.js) +- [parallel/test-tls-junk-closes-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-junk-closes-server.js) +- [parallel/test-tls-junk-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-junk-server.js) +- [parallel/test-tls-key-mismatch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-key-mismatch.js) +- [parallel/test-tls-keyengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-keyengine-invalid-arg-type.js) +- [parallel/test-tls-keyengine-unsupported.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-keyengine-unsupported.js) +- [parallel/test-tls-keylog-tlsv13.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-keylog-tlsv13.js) +- [parallel/test-tls-legacy-deprecated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-legacy-deprecated.js) +- [parallel/test-tls-max-send-fragment.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-max-send-fragment.js) +- [parallel/test-tls-min-max-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-min-max-version.js) +- [parallel/test-tls-multi-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-multi-key.js) +- [parallel/test-tls-multi-pfx.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-multi-pfx.js) +- [parallel/test-tls-multiple-cas-as-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-multiple-cas-as-string.js) +- [parallel/test-tls-net-connect-prefer-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-net-connect-prefer-path.js) +- [parallel/test-tls-net-socket-keepalive-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-net-socket-keepalive-12.js) +- [parallel/test-tls-net-socket-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-net-socket-keepalive.js) +- [parallel/test-tls-no-cert-required.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-cert-required.js) +- [parallel/test-tls-no-rsa-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-rsa-key.js) +- [parallel/test-tls-no-sslv23.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-sslv23.js) +- [parallel/test-tls-no-sslv3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-sslv3.js) +- [parallel/test-tls-ocsp-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ocsp-callback.js) +- [parallel/test-tls-on-empty-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-on-empty-socket.js) +- [parallel/test-tls-onread-static-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-onread-static-buffer.js) +- [parallel/test-tls-options-boolean-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-options-boolean-check.js) +- [parallel/test-tls-over-http-tunnel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-over-http-tunnel.js) +- [parallel/test-tls-passphrase.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-passphrase.js) +- [parallel/test-tls-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-pause.js) +- [parallel/test-tls-peer-certificate-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-peer-certificate-encoding.js) +- [parallel/test-tls-peer-certificate-multi-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-peer-certificate-multi-keys.js) +- [parallel/test-tls-peer-certificate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-peer-certificate.js) +- [parallel/test-tls-pfx-authorizationerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-pfx-authorizationerror.js) +- [parallel/test-tls-psk-circuit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-psk-circuit.js) +- [parallel/test-tls-psk-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-psk-errors.js) +- [parallel/test-tls-psk-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-psk-server.js) +- [parallel/test-tls-reduced-SECLEVEL-in-cipher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js) +- [parallel/test-tls-reinitialize-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-reinitialize-listeners.js) +- [parallel/test-tls-request-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-request-timeout.js) +- [parallel/test-tls-retain-handle-no-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-retain-handle-no-abort.js) +- [parallel/test-tls-reuse-host-from-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-reuse-host-from-socket.js) +- [parallel/test-tls-root-certificates.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-root-certificates.js) +- [parallel/test-tls-secure-context-usage-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-secure-context-usage-order.js) +- [parallel/test-tls-secure-session.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-secure-session.js) +- [parallel/test-tls-securepair-fiftharg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-securepair-fiftharg.js) +- [parallel/test-tls-securepair-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-securepair-leak.js) +- [parallel/test-tls-securepair-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-securepair-server.js) +- [parallel/test-tls-server-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-capture-rejection.js) +- [parallel/test-tls-server-connection-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-connection-server.js) +- [parallel/test-tls-server-failed-handshake-emits-clienterror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js) +- [parallel/test-tls-server-parent-constructor-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-parent-constructor-options.js) +- [parallel/test-tls-server-setoptions-clientcertengine.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-setoptions-clientcertengine.js) +- [parallel/test-tls-server-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-verify.js) +- [parallel/test-tls-session-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-session-cache.js) +- [parallel/test-tls-set-ciphers-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-ciphers-error.js) +- [parallel/test-tls-set-ciphers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-ciphers.js) +- [parallel/test-tls-set-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-encoding.js) +- [parallel/test-tls-set-secure-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-secure-context.js) +- [parallel/test-tls-set-sigalgs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-sigalgs.js) +- [parallel/test-tls-sni-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-sni-option.js) +- [parallel/test-tls-sni-server-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-sni-server-client.js) +- [parallel/test-tls-sni-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-sni-servername.js) +- [parallel/test-tls-snicallback-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-snicallback-error.js) +- [parallel/test-tls-socket-allow-half-open-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-allow-half-open-option.js) +- [parallel/test-tls-socket-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-close.js) +- [parallel/test-tls-socket-constructor-alpn-options-parsing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-constructor-alpn-options-parsing.js) +- [parallel/test-tls-socket-default-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-default-options.js) +- [parallel/test-tls-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-destroy.js) +- [parallel/test-tls-socket-failed-handshake-emits-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-failed-handshake-emits-error.js) +- [parallel/test-tls-socket-snicallback-without-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-snicallback-without-server.js) +- [parallel/test-tls-startcom-wosign-whitelist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-startcom-wosign-whitelist.js) +- [parallel/test-tls-starttls-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-starttls-server.js) +- [parallel/test-tls-streamwrap-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-streamwrap-buffersize.js) +- [parallel/test-tls-ticket-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket-12.js) +- [parallel/test-tls-ticket-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket-cluster.js) +- [parallel/test-tls-ticket-invalid-arg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket-invalid-arg.js) +- [parallel/test-tls-ticket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket.js) +- [parallel/test-tls-timeout-server-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-timeout-server-2.js) +- [parallel/test-tls-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-timeout-server.js) +- [parallel/test-tls-tlswrap-segfault-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-tlswrap-segfault-2.js) +- [parallel/test-tls-tlswrap-segfault.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-tlswrap-segfault.js) +- [parallel/test-tls-translate-peer-certificate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-translate-peer-certificate.js) +- [parallel/test-tls-transport-destroy-after-own-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-transport-destroy-after-own-gc.js) +- [parallel/test-tls-use-after-free-regression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-use-after-free-regression.js) +- [parallel/test-tls-wrap-econnreset-localaddress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset-localaddress.js) +- [parallel/test-tls-wrap-econnreset-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset-pipe.js) +- [parallel/test-tls-wrap-econnreset-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset-socket.js) +- [parallel/test-tls-wrap-econnreset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset.js) +- [parallel/test-tls-wrap-event-emmiter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-event-emmiter.js) +- [parallel/test-tls-wrap-no-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-no-abort.js) +- [parallel/test-tls-wrap-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-timeout.js) +- [parallel/test-tls-write-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-write-error.js) +- [parallel/test-tls-writewrap-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-writewrap-leak.js) +- [parallel/test-tls-zero-clear-in.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-zero-clear-in.js) +- [parallel/test-tojson-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tojson-perf_hooks.js) +- [parallel/test-trace-atomics-wait.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-atomics-wait.js) +- [parallel/test-trace-events-all.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-all.js) +- [parallel/test-trace-events-api-worker-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-api-worker-disabled.js) +- [parallel/test-trace-events-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-api.js) +- [parallel/test-trace-events-async-hooks-dynamic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-async-hooks-dynamic.js) +- [parallel/test-trace-events-async-hooks-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-async-hooks-worker.js) +- [parallel/test-trace-events-async-hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-async-hooks.js) +- [parallel/test-trace-events-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-binding.js) +- [parallel/test-trace-events-bootstrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-bootstrap.js) +- [parallel/test-trace-events-category-used.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-category-used.js) +- [parallel/test-trace-events-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-console.js) +- [parallel/test-trace-events-dynamic-enable-workers-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-dynamic-enable-workers-disabled.js) +- [parallel/test-trace-events-dynamic-enable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-dynamic-enable.js) +- [parallel/test-trace-events-environment.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-environment.js) +- [parallel/test-trace-events-file-pattern.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-file-pattern.js) +- [parallel/test-trace-events-fs-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-fs-async.js) +- [parallel/test-trace-events-fs-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-fs-sync.js) +- [parallel/test-trace-events-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-http.js) +- [parallel/test-trace-events-metadata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-metadata.js) +- [parallel/test-trace-events-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-net.js) +- [parallel/test-trace-events-none.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-none.js) +- [parallel/test-trace-events-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-process-exit.js) +- [parallel/test-trace-events-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-promises.js) +- [parallel/test-trace-events-threadpool.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-threadpool.js) +- [parallel/test-trace-events-v8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-v8.js) +- [parallel/test-trace-events-vm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-vm.js) +- [parallel/test-trace-events-worker-metadata-with-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-worker-metadata-with-name.js) +- [parallel/test-trace-events-worker-metadata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-worker-metadata.js) +- [parallel/test-trace-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-exit.js) +- [parallel/test-tracing-no-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tracing-no-crash.js) +- [parallel/test-tty-backwards-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tty-backwards-api.js) +- [parallel/test-tty-stdin-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tty-stdin-pipe.js) +- [parallel/test-ttywrap-invalid-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-ttywrap-invalid-fd.js) +- [parallel/test-ttywrap-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-ttywrap-stack.js) +- [parallel/test-tz-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tz-version.js) +- [parallel/test-unhandled-exception-rethrow-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-unhandled-exception-rethrow-error.js) +- [parallel/test-unhandled-exception-with-worker-inuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-unhandled-exception-with-worker-inuse.js) +- [parallel/test-unicode-node-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-unicode-node-options.js) +- [parallel/test-url-canParse-whatwg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-canParse-whatwg.js) +- [parallel/test-url-is-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-is-url.js) +- [parallel/test-url-null-char.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-null-char.js) +- [parallel/test-url-parse-format.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-parse-format.js) +- [parallel/test-utf8-scripts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-utf8-scripts.js) +- [parallel/test-util-callbackify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-callbackify.js) +- [parallel/test-util-emit-experimental-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-emit-experimental-warning.js) +- [parallel/test-util-inspect-getters-accessing-this.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-inspect-getters-accessing-this.js) +- [parallel/test-util-internal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-internal.js) +- [parallel/test-util-log.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-log.js) +- [parallel/test-util-primordial-monkeypatching.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-primordial-monkeypatching.js) +- [parallel/test-util-sigint-watchdog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-sigint-watchdog.js) +- [parallel/test-util-sleep.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-sleep.js) +- [parallel/test-uv-binding-constant.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-uv-binding-constant.js) +- [parallel/test-uv-errmap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-uv-errmap.js) +- [parallel/test-uv-errno.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-uv-errno.js) +- [parallel/test-uv-unmapped-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-uv-unmapped-exception.js) +- [parallel/test-v8-collect-gc-profile-exit-before-stop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-collect-gc-profile-exit-before-stop.js) +- [parallel/test-v8-collect-gc-profile-in-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-collect-gc-profile-in-worker.js) +- [parallel/test-v8-collect-gc-profile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-collect-gc-profile.js) +- [parallel/test-v8-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-coverage.js) +- [parallel/test-v8-deserialize-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-deserialize-buffer.js) +- [parallel/test-v8-flag-pool-size-0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-flag-pool-size-0.js) +- [parallel/test-v8-flag-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-flag-type-check.js) +- [parallel/test-v8-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-flags.js) +- [parallel/test-v8-getheapsnapshot-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-getheapsnapshot-twice.js) +- [parallel/test-v8-global-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-global-setter.js) +- [parallel/test-v8-serdes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-serdes.js) +- [parallel/test-v8-serialize-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-serialize-leak.js) +- [parallel/test-v8-startup-snapshot-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-startup-snapshot-api.js) +- [parallel/test-v8-stats.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-stats.js) +- [parallel/test-v8-stop-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-stop-coverage.js) +- [parallel/test-v8-take-coverage-noop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-take-coverage-noop.js) +- [parallel/test-v8-take-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-take-coverage.js) +- [parallel/test-v8-version-tag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-version-tag.js) +- [parallel/test-validators.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-validators.js) +- [parallel/test-vfs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vfs.js) +- [parallel/test-vm-api-handles-getter-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-api-handles-getter-errors.js) +- [parallel/test-vm-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-basic.js) +- [parallel/test-vm-cached-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-cached-data.js) +- [parallel/test-vm-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-context.js) +- [parallel/test-vm-dynamic-import-callback-missing-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-dynamic-import-callback-missing-flag.js) +- [parallel/test-vm-global-get-own.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-global-get-own.js) +- [parallel/test-vm-global-non-writable-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-global-non-writable-properties.js) +- [parallel/test-vm-global-property-interceptors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-global-property-interceptors.js) +- [parallel/test-vm-measure-memory-lazy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-measure-memory-lazy.js) +- [parallel/test-vm-measure-memory-multi-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-measure-memory-multi-context.js) +- [parallel/test-vm-measure-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-measure-memory.js) +- [parallel/test-vm-module-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-basic.js) +- [parallel/test-vm-module-cached-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-cached-data.js) +- [parallel/test-vm-module-dynamic-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-dynamic-import.js) +- [parallel/test-vm-module-dynamic-namespace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-dynamic-namespace.js) +- [parallel/test-vm-module-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-errors.js) +- [parallel/test-vm-module-import-meta.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-import-meta.js) +- [parallel/test-vm-module-link.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-link.js) +- [parallel/test-vm-module-reevaluate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-reevaluate.js) +- [parallel/test-vm-module-synthetic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-synthetic.js) +- [parallel/test-vm-no-dynamic-import-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-no-dynamic-import-callback.js) +- [parallel/test-vm-run-in-new-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-run-in-new-context.js) +- [parallel/test-vm-sigint-existing-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-sigint-existing-handler.js) +- [parallel/test-vm-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-sigint.js) +- [parallel/test-vm-strict-assign.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-strict-assign.js) +- [parallel/test-vm-syntax-error-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-syntax-error-message.js) +- [parallel/test-vm-syntax-error-stderr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-syntax-error-stderr.js) +- [parallel/test-vm-timeout-escape-promise-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-timeout-escape-promise-module.js) +- [parallel/test-warn-sigprof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-warn-sigprof.js) +- [parallel/test-warn-stream-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-warn-stream-wrap.js) +- [parallel/test-weakref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-weakref.js) +- [parallel/test-webcrypto-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-constructors.js) +- [parallel/test-webcrypto-cryptokey-workers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-cryptokey-workers.js) +- [parallel/test-webcrypto-derivebits-cfrg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits-cfrg.js) +- [parallel/test-webcrypto-derivebits-ecdh.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits-ecdh.js) +- [parallel/test-webcrypto-derivebits-hkdf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits-hkdf.js) +- [parallel/test-webcrypto-derivebits.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits.js) +- [parallel/test-webcrypto-derivekey-cfrg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivekey-cfrg.js) +- [parallel/test-webcrypto-derivekey-ecdh.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivekey-ecdh.js) +- [parallel/test-webcrypto-derivekey.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivekey.js) +- [parallel/test-webcrypto-digest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-digest.js) +- [parallel/test-webcrypto-encrypt-decrypt-aes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-encrypt-decrypt-aes.js) +- [parallel/test-webcrypto-encrypt-decrypt-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js) +- [parallel/test-webcrypto-encrypt-decrypt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-encrypt-decrypt.js) +- [parallel/test-webcrypto-export-import-cfrg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import-cfrg.js) +- [parallel/test-webcrypto-export-import-ec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import-ec.js) +- [parallel/test-webcrypto-export-import-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import-rsa.js) +- [parallel/test-webcrypto-export-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import.js) +- [parallel/test-webcrypto-getRandomValues.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-getRandomValues.js) +- [parallel/test-webcrypto-keygen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-keygen.js) +- [parallel/test-webcrypto-random.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-random.js) +- [parallel/test-webcrypto-sign-verify-ecdsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-ecdsa.js) +- [parallel/test-webcrypto-sign-verify-eddsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-eddsa.js) +- [parallel/test-webcrypto-sign-verify-hmac.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-hmac.js) +- [parallel/test-webcrypto-sign-verify-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-rsa.js) +- [parallel/test-webcrypto-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-util.js) +- [parallel/test-webcrypto-webidl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-webidl.js) +- [parallel/test-webcrypto-wrap-unwrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-wrap-unwrap.js) +- [parallel/test-websocket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-websocket.js) +- [parallel/test-webstream-encoding-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstream-encoding-inspect.js) +- [parallel/test-webstream-readablestream-pipeto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstream-readablestream-pipeto.js) +- [parallel/test-webstream-string-tag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstream-string-tag.js) +- [parallel/test-webstreams-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-abort-controller.js) +- [parallel/test-webstreams-compose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-compose.js) +- [parallel/test-webstreams-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-finished.js) +- [parallel/test-webstreams-pipeline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-pipeline.js) +- [parallel/test-whatwg-encoding-custom-fatal-streaming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js) +- [parallel/test-whatwg-encoding-custom-internals.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-internals.js) +- [parallel/test-whatwg-encoding-custom-interop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-interop.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-fatal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-fatal.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js) +- [parallel/test-whatwg-encoding-custom-textdecoder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder.js) +- [parallel/test-whatwg-events-event-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-events-event-constructors.js) +- [parallel/test-whatwg-events-eventtarget-this-of-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-events-eventtarget-this-of-listener.js) +- [parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js) +- [parallel/test-whatwg-readablebytestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablebytestream.js) +- [parallel/test-whatwg-readablebytestreambyob.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablebytestreambyob.js) +- [parallel/test-whatwg-readablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablestream.js) +- [parallel/test-whatwg-transformstream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-transformstream.js) +- [parallel/test-whatwg-url-canparse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-canparse.js) +- [parallel/test-whatwg-url-custom-domainto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-domainto.js) +- [parallel/test-whatwg-url-custom-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-inspect.js) +- [parallel/test-whatwg-url-custom-parsing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-parsing.js) +- [parallel/test-whatwg-url-custom-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-properties.js) +- [parallel/test-whatwg-url-custom-searchparams-append.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-append.js) +- [parallel/test-whatwg-url-custom-searchparams-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-constructor.js) +- [parallel/test-whatwg-url-custom-searchparams-delete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-delete.js) +- [parallel/test-whatwg-url-custom-searchparams-entries.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-entries.js) +- [parallel/test-whatwg-url-custom-searchparams-foreach.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-foreach.js) +- [parallel/test-whatwg-url-custom-searchparams-get.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-get.js) +- [parallel/test-whatwg-url-custom-searchparams-getall.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-getall.js) +- [parallel/test-whatwg-url-custom-searchparams-has.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-has.js) +- [parallel/test-whatwg-url-custom-searchparams-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-inspect.js) +- [parallel/test-whatwg-url-custom-searchparams-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-keys.js) +- [parallel/test-whatwg-url-custom-searchparams-set.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-set.js) +- [parallel/test-whatwg-url-custom-searchparams-sort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-sort.js) +- [parallel/test-whatwg-url-custom-searchparams-stringifier.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-stringifier.js) +- [parallel/test-whatwg-url-custom-searchparams-values.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-values.js) +- [parallel/test-whatwg-url-custom-searchparams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams.js) +- [parallel/test-whatwg-url-custom-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-setters.js) +- [parallel/test-whatwg-url-invalidthis.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-invalidthis.js) +- [parallel/test-whatwg-url-toascii.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-toascii.js) +- [parallel/test-whatwg-webstreams-adapters-streambase.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-streambase.js) +- [parallel/test-whatwg-webstreams-adapters-to-readablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-readablestream.js) +- [parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js) +- [parallel/test-whatwg-webstreams-adapters-to-streamduplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js) +- [parallel/test-whatwg-webstreams-adapters-to-streamreadable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-streamreadable.js) +- [parallel/test-whatwg-webstreams-adapters-to-streamwritable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-streamwritable.js) +- [parallel/test-whatwg-webstreams-adapters-to-writablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-writablestream.js) +- [parallel/test-whatwg-webstreams-compression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-compression.js) +- [parallel/test-whatwg-webstreams-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-coverage.js) +- [parallel/test-whatwg-webstreams-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-encoding.js) +- [parallel/test-whatwg-webstreams-transfer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-transfer.js) +- [parallel/test-whatwg-writablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-writablestream.js) +- [parallel/test-windows-abort-exitcode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-windows-abort-exitcode.js) +- [parallel/test-windows-failed-heap-allocation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-windows-failed-heap-allocation.js) +- [parallel/test-worker-abort-on-uncaught-exception-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-abort-on-uncaught-exception-terminate.js) +- [parallel/test-worker-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-abort-on-uncaught-exception.js) +- [parallel/test-worker-arraybuffer-zerofill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-arraybuffer-zerofill.js) +- [parallel/test-worker-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-beforeexit-throw-exit.js) +- [parallel/test-worker-broadcastchannel-wpt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-broadcastchannel-wpt.js) +- [parallel/test-worker-broadcastchannel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-broadcastchannel.js) +- [parallel/test-worker-cjs-workerdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cjs-workerdata.js) +- [parallel/test-worker-cleanexit-with-js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cleanexit-with-js.js) +- [parallel/test-worker-cleanexit-with-moduleload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cleanexit-with-moduleload.js) +- [parallel/test-worker-cleanup-handles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cleanup-handles.js) +- [parallel/test-worker-console-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-console-listeners.js) +- [parallel/test-worker-crypto-sign-transfer-result.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-crypto-sign-transfer-result.js) +- [parallel/test-worker-data-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-data-url.js) +- [parallel/test-worker-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-debug.js) +- [parallel/test-worker-dns-terminate-during-query.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-dns-terminate-during-query.js) +- [parallel/test-worker-dns-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-dns-terminate.js) +- [parallel/test-worker-environmentdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-environmentdata.js) +- [parallel/test-worker-error-stack-getter-throws.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-error-stack-getter-throws.js) +- [parallel/test-worker-esm-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-esm-exit.js) +- [parallel/test-worker-esm-missing-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-esm-missing-main.js) +- [parallel/test-worker-esmodule.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-esmodule.js) +- [parallel/test-worker-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-event.js) +- [parallel/test-worker-execargv-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-execargv-invalid.js) +- [parallel/test-worker-execargv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-execargv.js) +- [parallel/test-worker-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-code.js) +- [parallel/test-worker-exit-event-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-event-error.js) +- [parallel/test-worker-exit-from-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-from-uncaught-exception.js) +- [parallel/test-worker-exit-heapsnapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-heapsnapshot.js) +- [parallel/test-worker-fs-stat-watcher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-fs-stat-watcher.js) +- [parallel/test-worker-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-hasref.js) +- [parallel/test-worker-heap-snapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-heap-snapshot.js) +- [parallel/test-worker-heapdump-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-heapdump-failure.js) +- [parallel/test-worker-http2-generic-streams-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-http2-generic-streams-terminate.js) +- [parallel/test-worker-http2-stream-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-http2-stream-terminate.js) +- [parallel/test-worker-init-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-init-failure.js) +- [parallel/test-worker-invalid-workerdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-invalid-workerdata.js) +- [parallel/test-worker-load-file-with-extension-other-than-js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-load-file-with-extension-other-than-js.js) +- [parallel/test-worker-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-memory.js) +- [parallel/test-worker-message-channel-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-channel-sharedarraybuffer.js) +- [parallel/test-worker-message-channel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-channel.js) +- [parallel/test-worker-message-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-event.js) +- [parallel/test-worker-message-not-serializable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-not-serializable.js) +- [parallel/test-worker-message-port-arraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-arraybuffer.js) +- [parallel/test-worker-message-port-close-while-receiving.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-close-while-receiving.js) +- [parallel/test-worker-message-port-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-close.js) +- [parallel/test-worker-message-port-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-constructor.js) +- [parallel/test-worker-message-port-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-drain.js) +- [parallel/test-worker-message-port-inspect-during-init-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-inspect-during-init-hook.js) +- [parallel/test-worker-message-port-jstransferable-nested-untransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-jstransferable-nested-untransferable.js) +- [parallel/test-worker-message-port-message-before-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-message-before-close.js) +- [parallel/test-worker-message-port-message-port-transferring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-message-port-transferring.js) +- [parallel/test-worker-message-port-move.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-move.js) +- [parallel/test-worker-message-port-terminate-transfer-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-terminate-transfer-list.js) +- [parallel/test-worker-message-port-transfer-closed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-closed.js) +- [parallel/test-worker-message-port-transfer-duplicate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-duplicate.js) +- [parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js) +- [parallel/test-worker-message-port-transfer-fake-js-transferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js) +- [parallel/test-worker-message-port-transfer-filehandle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-filehandle.js) +- [parallel/test-worker-message-port-transfer-native.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-native.js) +- [parallel/test-worker-message-port-transfer-self.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-self.js) +- [parallel/test-worker-message-port-transfer-target.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-target.js) +- [parallel/test-worker-message-port-transfer-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-terminate.js) +- [parallel/test-worker-message-port-wasm-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-wasm-module.js) +- [parallel/test-worker-message-port-wasm-threads.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-wasm-threads.js) +- [parallel/test-worker-message-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port.js) +- [parallel/test-worker-message-transfer-port-mark-as-untransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-transfer-port-mark-as-untransferable.js) +- [parallel/test-worker-message-type-unknown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-type-unknown.js) +- [parallel/test-worker-messageport-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-messageport-hasref.js) +- [parallel/test-worker-mjs-workerdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-mjs-workerdata.js) +- [parallel/test-worker-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-name.js) +- [parallel/test-worker-nearheaplimit-deadlock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nearheaplimit-deadlock.js) +- [parallel/test-worker-nested-on-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nested-on-process-exit.js) +- [parallel/test-worker-nested-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nested-uncaught.js) +- [parallel/test-worker-nexttick-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nexttick-terminate.js) +- [parallel/test-worker-no-atomics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-no-atomics.js) +- [parallel/test-worker-no-sab.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-no-sab.js) +- [parallel/test-worker-no-stdin-stdout-interaction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-no-stdin-stdout-interaction.js) +- [parallel/test-worker-non-fatal-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-non-fatal-uncaught-exception.js) +- [parallel/test-worker-on-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-on-process-exit.js) +- [parallel/test-worker-onmessage-not-a-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-onmessage-not-a-function.js) +- [parallel/test-worker-onmessage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-onmessage.js) +- [parallel/test-worker-parent-port-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-parent-port-ref.js) +- [parallel/test-worker-process-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-argv.js) +- [parallel/test-worker-process-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-cwd.js) +- [parallel/test-worker-process-env-shared.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-env-shared.js) +- [parallel/test-worker-process-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-env.js) +- [parallel/test-worker-process-exit-async-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-exit-async-module.js) +- [parallel/test-worker-ref-onexit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-ref-onexit.js) +- [parallel/test-worker-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-ref.js) +- [parallel/test-worker-relative-path-double-dot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-relative-path-double-dot.js) +- [parallel/test-worker-relative-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-relative-path.js) +- [parallel/test-worker-resource-limits.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-resource-limits.js) +- [parallel/test-worker-safe-getters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-safe-getters.js) +- [parallel/test-worker-sharedarraybuffer-from-worker-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js) +- [parallel/test-worker-stack-overflow-stack-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stack-overflow-stack-size.js) +- [parallel/test-worker-stack-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stack-overflow.js) +- [parallel/test-worker-stdio-from-preload-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stdio-from-preload-module.js) +- [parallel/test-worker-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stdio.js) +- [parallel/test-worker-syntax-error-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-syntax-error-file.js) +- [parallel/test-worker-syntax-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-syntax-error.js) +- [parallel/test-worker-terminate-http2-respond-with-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-http2-respond-with-file.js) +- [parallel/test-worker-terminate-microtask-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-microtask-loop.js) +- [parallel/test-worker-terminate-nested.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-nested.js) +- [parallel/test-worker-terminate-null-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-null-handler.js) +- [parallel/test-worker-terminate-ref-public-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-ref-public-port.js) +- [parallel/test-worker-terminate-source-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-source-map.js) +- [parallel/test-worker-terminate-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-timers.js) +- [parallel/test-worker-terminate-unrefed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-unrefed.js) +- [parallel/test-worker-track-unmanaged-fds.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-track-unmanaged-fds.js) +- [parallel/test-worker-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-type-check.js) +- [parallel/test-worker-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-uncaught-exception-async.js) +- [parallel/test-worker-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-uncaught-exception.js) +- [parallel/test-worker-unref-from-message-during-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-unref-from-message-during-exit.js) +- [parallel/test-worker-unsupported-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-unsupported-path.js) +- [parallel/test-worker-unsupported-things.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-unsupported-things.js) +- [parallel/test-worker-vm-context-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-vm-context-terminate.js) +- [parallel/test-worker-voluntarily-exit-followed-by-addition.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-voluntarily-exit-followed-by-addition.js) +- [parallel/test-worker-voluntarily-exit-followed-by-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-voluntarily-exit-followed-by-throw.js) +- [parallel/test-worker-workerdata-messageport.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-workerdata-messageport.js) +- [parallel/test-worker-workerdata-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-workerdata-sharedarraybuffer.js) +- [parallel/test-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker.js) +- [parallel/test-wrap-js-stream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-destroy.js) +- [parallel/test-wrap-js-stream-duplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-duplex.js) +- [parallel/test-wrap-js-stream-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-exceptions.js) +- [parallel/test-wrap-js-stream-read-stop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-read-stop.js) +- [parallel/test-x509-escaping.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-x509-escaping.js) +- [parallel/test-zlib-brotli-16GB.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-16GB.js) +- [parallel/test-zlib-brotli-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-flush.js) +- [parallel/test-zlib-brotli-from-brotli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-from-brotli.js) +- [parallel/test-zlib-brotli-from-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-from-string.js) +- [parallel/test-zlib-brotli-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-kmaxlength-rangeerror.js) +- [parallel/test-zlib-brotli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli.js) +- [parallel/test-zlib-bytes-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-bytes-read.js) +- [parallel/test-zlib-close-in-ondata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-close-in-ondata.js) +- [parallel/test-zlib-const.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-const.js) +- [parallel/test-zlib-create-raw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-create-raw.js) +- [parallel/test-zlib-deflate-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-deflate-constructors.js) +- [parallel/test-zlib-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-destroy.js) +- [parallel/test-zlib-dictionary-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-dictionary-fail.js) +- [parallel/test-zlib-dictionary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-dictionary.js) +- [parallel/test-zlib-failed-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-failed-init.js) +- [parallel/test-zlib-flush-drain-longblock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-drain-longblock.js) +- [parallel/test-zlib-flush-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-drain.js) +- [parallel/test-zlib-flush-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-flags.js) +- [parallel/test-zlib-flush-write-sync-interleaved.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-write-sync-interleaved.js) +- [parallel/test-zlib-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush.js) +- [parallel/test-zlib-from-concatenated-gzip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-from-concatenated-gzip.js) +- [parallel/test-zlib-from-gzip-with-trailing-garbage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js) +- [parallel/test-zlib-from-gzip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-from-gzip.js) +- [parallel/test-zlib-invalid-arg-value-brotli-compress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js) +- [parallel/test-zlib-invalid-input-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-invalid-input-memory.js) +- [parallel/test-zlib-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-kmaxlength-rangeerror.js) +- [parallel/test-zlib-maxOutputLength.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-maxOutputLength.js) +- [parallel/test-zlib-not-string-or-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-not-string-or-buffer.js) +- [parallel/test-zlib-object-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-object-write.js) +- [parallel/test-zlib-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-params.js) +- [parallel/test-zlib-premature-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-premature-end.js) +- [parallel/test-zlib-reset-before-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-reset-before-write.js) +- [parallel/test-zlib-unused-weak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-unused-weak.js) +- [parallel/test-zlib-write-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-write-after-close.js) +- [parallel/test-zlib.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib.js) +- [pseudo-tty/readline-dumb-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/readline-dumb-tty.js) +- [pseudo-tty/ref_keeps_node_running.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/ref_keeps_node_running.js) +- [pseudo-tty/repl-dumb-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/repl-dumb-tty.js) +- [pseudo-tty/stdin-setrawmode.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/stdin-setrawmode.js) +- [pseudo-tty/test-assert-colors.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-assert-colors.js) +- [pseudo-tty/test-assert-no-color.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-assert-no-color.js) +- [pseudo-tty/test-assert-position-indicator.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-assert-position-indicator.js) +- [pseudo-tty/test-async-wrap-getasyncid-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-async-wrap-getasyncid-tty.js) +- [pseudo-tty/test-fatal-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-fatal-error.js) +- [pseudo-tty/test-handle-wrap-hasref-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-handle-wrap-hasref-tty.js) +- [pseudo-tty/test-readable-tty-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-readable-tty-keepalive.js) +- [pseudo-tty/test-repl-external-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-repl-external-module.js) +- [pseudo-tty/test-set-raw-mode-reset-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js) +- [pseudo-tty/test-set-raw-mode-reset-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-set-raw-mode-reset-signal.js) +- [pseudo-tty/test-set-raw-mode-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-set-raw-mode-reset.js) +- [pseudo-tty/test-stderr-stdout-handle-sigwinch.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js) +- [pseudo-tty/test-stdin-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-stdin-write.js) +- [pseudo-tty/test-stdout-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-stdout-read.js) +- [pseudo-tty/test-trace-sigint-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-trace-sigint-disabled.js) +- [pseudo-tty/test-trace-sigint-on-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-trace-sigint-on-idle.js) +- [pseudo-tty/test-trace-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-trace-sigint.js) +- [pseudo-tty/test-tty-color-support.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-color-support.js) +- [pseudo-tty/test-tty-isatty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-isatty.js) +- [pseudo-tty/test-tty-stdin-call-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-stdin-call-end.js) +- [pseudo-tty/test-tty-stdout-resize.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-stdout-resize.js) +- [pseudo-tty/test-tty-stream-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-stream-constructors.js) +- [pseudo-tty/test-tty-window-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-window-size.js) +- [pseudo-tty/test-tty-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-wrap.js) +- [pummel/test-child-process-spawn-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-child-process-spawn-loop.js) +- [pummel/test-crypto-dh-hash.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-crypto-dh-hash.js) +- [pummel/test-crypto-dh-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-crypto-dh-keys.js) +- [pummel/test-crypto-timing-safe-equal-benchmarks.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-crypto-timing-safe-equal-benchmarks.js) +- [pummel/test-dh-regr.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-dh-regr.js) +- [pummel/test-fs-largefile.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-largefile.js) +- [pummel/test-fs-readfile-tostring-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-readfile-tostring-fail.js) +- [pummel/test-fs-watch-file-slow.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-file-slow.js) +- [pummel/test-fs-watch-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-file.js) +- [pummel/test-fs-watch-non-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-non-recursive.js) +- [pummel/test-fs-watch-system-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-system-limit.js) +- [pummel/test-hash-seed.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-hash-seed.js) +- [pummel/test-heapdump-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-dns.js) +- [pummel/test-heapdump-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-env.js) +- [pummel/test-heapdump-fs-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-fs-promise.js) +- [pummel/test-heapdump-http2.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-http2.js) +- [pummel/test-heapdump-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-inspector.js) +- [pummel/test-heapdump-shadow-realm.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-shadow-realm.js) +- [pummel/test-heapdump-tls.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-tls.js) +- [pummel/test-heapdump-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-worker.js) +- [pummel/test-heapdump-zlib.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-zlib.js) +- [pummel/test-heapsnapshot-near-heap-limit-big.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit-big.js) +- [pummel/test-heapsnapshot-near-heap-limit-bounded.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit-bounded.js) +- [pummel/test-heapsnapshot-near-heap-limit-by-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit-by-api.js) +- [pummel/test-heapsnapshot-near-heap-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit.js) +- [pummel/test-http-many-keep-alive-connections.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-http-many-keep-alive-connections.js) +- [pummel/test-http-upload-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-http-upload-timeout.js) +- [pummel/test-https-large-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-https-large-response.js) +- [pummel/test-https-no-reader.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-https-no-reader.js) +- [pummel/test-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-keep-alive.js) +- [pummel/test-net-many-clients.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-many-clients.js) +- [pummel/test-net-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-pause.js) +- [pummel/test-net-pingpong-delay.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-pingpong-delay.js) +- [pummel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-pingpong.js) +- [pummel/test-net-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-timeout.js) +- [pummel/test-net-timeout2.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-timeout2.js) +- [pummel/test-net-write-callbacks.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-write-callbacks.js) +- [pummel/test-next-tick-infinite-calls.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-next-tick-infinite-calls.js) +- [pummel/test-policy-integrity-dep.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-dep.js) +- [pummel/test-policy-integrity-parent-commonjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-parent-commonjs.js) +- [pummel/test-policy-integrity-parent-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-parent-module.js) +- [pummel/test-policy-integrity-parent-no-package-json.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-parent-no-package-json.js) +- [pummel/test-policy-integrity-worker-commonjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-worker-commonjs.js) +- [pummel/test-policy-integrity-worker-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-worker-module.js) +- [pummel/test-policy-integrity-worker-no-package-json.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-worker-no-package-json.js) +- [pummel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-process-cpuUsage.js) +- [pummel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-process-hrtime.js) +- [pummel/test-regress-GH-892.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-regress-GH-892.js) +- [pummel/test-stream-pipe-multi.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-stream-pipe-multi.js) +- [pummel/test-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-timers.js) +- [pummel/test-tls-server-large-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-tls-server-large-request.js) +- [pummel/test-tls-throttle.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-tls-throttle.js) +- [pummel/test-vm-memleak.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-vm-memleak.js) +- [pummel/test-vm-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-vm-race.js) +- [pummel/test-watch-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-watch-file.js) +- [pummel/test-webcrypto-derivebits-pbkdf2.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-webcrypto-derivebits-pbkdf2.js) +- [pummel/test-worker-take-heapsnapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-worker-take-heapsnapshot.js) +- [sequential/test-async-wrap-getasyncid.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-async-wrap-getasyncid.js) +- [sequential/test-buffer-creation-regression.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-buffer-creation-regression.js) +- [sequential/test-child-process-emfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-child-process-emfile.js) +- [sequential/test-child-process-execsync.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-child-process-execsync.js) +- [sequential/test-child-process-pass-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-child-process-pass-fd.js) +- [sequential/test-cli-syntax-bad.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-bad.js) +- [sequential/test-cli-syntax-file-not-found.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-file-not-found.js) +- [sequential/test-cli-syntax-good.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-good.js) +- [sequential/test-cli-syntax-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-require.js) +- [sequential/test-cluster-inspect-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-inspect-brk.js) +- [sequential/test-cluster-net-listen-ipv6only-none.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-net-listen-ipv6only-none.js) +- [sequential/test-cluster-net-listen-ipv6only-rr.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-net-listen-ipv6only-rr.js) +- [sequential/test-cluster-send-handle-large-payload.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-send-handle-large-payload.js) +- [sequential/test-cpu-prof-default.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-default.js) +- [sequential/test-cpu-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-absolute.js) +- [sequential/test-cpu-prof-dir-and-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-and-name.js) +- [sequential/test-cpu-prof-dir-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-relative.js) +- [sequential/test-cpu-prof-dir-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-worker.js) +- [sequential/test-cpu-prof-drained.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-drained.js) +- [sequential/test-cpu-prof-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-exit.js) +- [sequential/test-cpu-prof-invalid-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-invalid-options.js) +- [sequential/test-cpu-prof-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-kill.js) +- [sequential/test-cpu-prof-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-name.js) +- [sequential/test-cpu-prof-worker-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-worker-argv.js) +- [sequential/test-crypto-timing-safe-equal.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-crypto-timing-safe-equal.js) +- [sequential/test-debug-prompt.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debug-prompt.js) +- [sequential/test-debugger-custom-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-custom-port.js) +- [sequential/test-debugger-debug-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-debug-brk.js) +- [sequential/test-debugger-invalid-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-invalid-args.js) +- [sequential/test-debugger-pid.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-pid.js) +- [sequential/test-deprecation-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-deprecation-flags.js) +- [sequential/test-dgram-bind-shared-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-dgram-bind-shared-ports.js) +- [sequential/test-dgram-implicit-bind-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-dgram-implicit-bind-failure.js) +- [sequential/test-dgram-pingpong.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-dgram-pingpong.js) +- [sequential/test-diagnostic-dir-cpu-prof.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-diagnostic-dir-cpu-prof.js) +- [sequential/test-diagnostic-dir-heap-prof.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-diagnostic-dir-heap-prof.js) +- [sequential/test-fs-opendir-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-opendir-recursive.js) +- [sequential/test-fs-readdir-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-readdir-recursive.js) +- [sequential/test-fs-stat-sync-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-stat-sync-overflow.js) +- [sequential/test-fs-watch.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-watch.js) +- [sequential/test-gc-http-client-onerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-gc-http-client-onerror.js) +- [sequential/test-gc-http-client-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-gc-http-client-timeout.js) +- [sequential/test-gc-http-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-gc-http-client.js) +- [sequential/test-get-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-get-heapsnapshot-options.js) +- [sequential/test-heapdump-flag-custom-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-heapdump-flag-custom-dir.js) +- [sequential/test-heapdump-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-heapdump-flag.js) +- [sequential/test-heapdump.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-heapdump.js) +- [sequential/test-http-econnrefused.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-econnrefused.js) +- [sequential/test-http-keep-alive-large-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-keep-alive-large-write.js) +- [sequential/test-http-keepalive-maxsockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-keepalive-maxsockets.js) +- [sequential/test-http-max-sockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-max-sockets.js) +- [sequential/test-http-regr-gh-2928.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-regr-gh-2928.js) +- [sequential/test-http-server-keep-alive-timeout-slow-client-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-server-keep-alive-timeout-slow-client-headers.js) +- [sequential/test-http-server-keep-alive-timeout-slow-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-server-keep-alive-timeout-slow-server.js) +- [sequential/test-http2-large-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-large-file.js) +- [sequential/test-http2-max-session-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-max-session-memory.js) +- [sequential/test-http2-ping-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-ping-flood.js) +- [sequential/test-http2-settings-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-settings-flood.js) +- [sequential/test-http2-timeout-large-write-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-timeout-large-write-file.js) +- [sequential/test-http2-timeout-large-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-timeout-large-write.js) +- [sequential/test-https-connect-localport.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-https-connect-localport.js) +- [sequential/test-https-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-https-server-keep-alive-timeout.js) +- [sequential/test-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-init.js) +- [sequential/test-inspector-port-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-inspector-port-cluster.js) +- [sequential/test-module-loading.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-module-loading.js) +- [sequential/test-net-GH-5504.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-GH-5504.js) +- [sequential/test-net-better-error-messages-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-better-error-messages-port.js) +- [sequential/test-net-connect-econnrefused.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-connect-econnrefused.js) +- [sequential/test-net-connect-handle-econnrefused.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-connect-handle-econnrefused.js) +- [sequential/test-net-connect-local-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-connect-local-error.js) +- [sequential/test-net-listen-shared-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-listen-shared-ports.js) +- [sequential/test-net-localport.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-localport.js) +- [sequential/test-net-reconnect-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-reconnect-error.js) +- [sequential/test-net-response-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-response-size.js) +- [sequential/test-net-server-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-server-address.js) +- [sequential/test-net-server-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-server-bind.js) +- [sequential/test-next-tick-error-spin.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-next-tick-error-spin.js) +- [sequential/test-perf-hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-perf-hooks.js) +- [sequential/test-performance-eventloopdelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-performance-eventloopdelay.js) +- [sequential/test-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-pipe.js) +- [sequential/test-process-title.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-process-title.js) +- [sequential/test-process-warnings.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-process-warnings.js) +- [sequential/test-repl-timeout-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-repl-timeout-throw.js) +- [sequential/test-require-cache-without-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-require-cache-without-stat.js) +- [sequential/test-resolution-inspect-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-resolution-inspect-brk.js) +- [sequential/test-single-executable-application-disable-experimental-sea-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js) +- [sequential/test-single-executable-application-empty.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-empty.js) +- [sequential/test-single-executable-application-snapshot-and-code-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-snapshot-and-code-cache.js) +- [sequential/test-single-executable-application-snapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-snapshot.js) +- [sequential/test-single-executable-application-use-code-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-use-code-cache.js) +- [sequential/test-single-executable-application.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application.js) +- [sequential/test-stream2-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-stream2-fs.js) +- [sequential/test-stream2-stderr-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-stream2-stderr-sync.js) +- [sequential/test-timers-block-eventloop.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-timers-block-eventloop.js) +- [sequential/test-timers-set-interval-excludes-callback-duration.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-timers-set-interval-excludes-callback-duration.js) +- [sequential/test-tls-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-tls-connect.js) +- [sequential/test-tls-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-tls-lookup.js) +- [sequential/test-tls-psk-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-tls-psk-client.js) +- [sequential/test-tls-securepair-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-tls-securepair-client.js) +- [sequential/test-tls-session-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-tls-session-timeout.js) +- [sequential/test-util-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-util-debug.js) +- [sequential/test-vm-break-on-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-vm-break-on-sigint.js) +- [sequential/test-vm-timeout-escape-promise-module-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-vm-timeout-escape-promise-module-2.js) +- [sequential/test-vm-timeout-rethrow.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-vm-timeout-rethrow.js) +- [sequential/test-worker-eventlooputil.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-eventlooputil.js) +- [sequential/test-worker-fshandles-error-on-termination.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-fshandles-error-on-termination.js) +- [sequential/test-worker-fshandles-open-close-on-termination.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-fshandles-open-close-on-termination.js) +- [sequential/test-worker-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-heapsnapshot-options.js) +- [sequential/test-worker-prof.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-prof.js) +- [sequential/test-write-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-write-heapsnapshot-options.js) diff --git a/tests/node_compat/runner/setup.ts b/tests/node_compat/runner/setup.ts index 37f1aba9b25934..5daa42df76caf7 100755 --- a/tests/node_compat/runner/setup.ts +++ b/tests/node_compat/runner/setup.ts @@ -11,12 +11,13 @@ import { ensureFile } from "@std/fs/ensure-file"; import { writeAll } from "@std/io/write-all"; import { withoutAll } from "@std/collections/without-all"; import { relative } from "@std/path/posix/relative"; +import { version } from "./suite/node_version.ts"; import { config, ignoreList } from "../common.ts"; const encoder = new TextEncoder(); -const NODE_VERSION = config.nodeVersion; +const NODE_VERSION = version; const NODE_IGNORED_TEST_DIRS = [ "addons", diff --git a/tests/node_compat/runner/suite b/tests/node_compat/runner/suite index d12a68fc493006..1c9511e584eb9d 160000 --- a/tests/node_compat/runner/suite +++ b/tests/node_compat/runner/suite @@ -1 +1 @@ -Subproject commit d12a68fc4930062c0bed26447a6b5245697e77c1 +Subproject commit 1c9511e584eb9d465bcd4b1e6c05ecedf7f15549 diff --git a/tests/node_compat/test/common/child_process.js b/tests/node_compat/test/common/child_process.js index e30ec0c0008e60..fd6676f570191e 100644 --- a/tests/node_compat/test/common/child_process.js +++ b/tests/node_compat/test/common/child_process.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/countdown.js b/tests/node_compat/test/common/countdown.js index 67742db188ddfc..1e3512e54089b3 100644 --- a/tests/node_compat/test/common/countdown.js +++ b/tests/node_compat/test/common/countdown.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/dns.js b/tests/node_compat/test/common/dns.js index e8301344c12def..b3b92a18e0740a 100644 --- a/tests/node_compat/test/common/dns.js +++ b/tests/node_compat/test/common/dns.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/duplexpair.js b/tests/node_compat/test/common/duplexpair.js index fdd77f9dd641af..782c4673952c18 100644 --- a/tests/node_compat/test/common/duplexpair.js +++ b/tests/node_compat/test/common/duplexpair.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/fixtures.js b/tests/node_compat/test/common/fixtures.js index 08c8fd20cc60a8..6f68d8a0aab4d6 100644 --- a/tests/node_compat/test/common/fixtures.js +++ b/tests/node_compat/test/common/fixtures.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/hijackstdio.js b/tests/node_compat/test/common/hijackstdio.js index db35fda5650d47..cb4be687f192d7 100644 --- a/tests/node_compat/test/common/hijackstdio.js +++ b/tests/node_compat/test/common/hijackstdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/index.mjs b/tests/node_compat/test/common/index.mjs index d9992e67d766d0..1ede6073156e33 100644 --- a/tests/node_compat/test/common/index.mjs +++ b/tests/node_compat/test/common/index.mjs @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. import { createRequire } from 'module'; diff --git a/tests/node_compat/test/common/tmpdir.js b/tests/node_compat/test/common/tmpdir.js index 9315b874711cfe..c8951a1992fb73 100644 --- a/tests/node_compat/test/common/tmpdir.js +++ b/tests/node_compat/test/common/tmpdir.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/fixtures/GH-1899-output.js b/tests/node_compat/test/fixtures/GH-1899-output.js index ffb0515cbc00e8..736ce3681e5333 100644 --- a/tests/node_compat/test/fixtures/GH-1899-output.js +++ b/tests/node_compat/test/fixtures/GH-1899-output.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/fixtures/a.js b/tests/node_compat/test/fixtures/a.js index b63484fe5c7e46..18504e4781d003 100644 --- a/tests/node_compat/test/fixtures/a.js +++ b/tests/node_compat/test/fixtures/a.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/fixtures/child-process-persistent.js b/tests/node_compat/test/fixtures/child-process-persistent.js index 520c4bebc14f87..9ca3f6b6a2c2f7 100644 --- a/tests/node_compat/test/fixtures/child-process-persistent.js +++ b/tests/node_compat/test/fixtures/child-process-persistent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. setInterval(function() {}, 9999); diff --git a/tests/node_compat/test/fixtures/child_process_should_emit_error.js b/tests/node_compat/test/fixtures/child_process_should_emit_error.js index e2bbad2dda7215..e1c42d1d6d3d07 100644 --- a/tests/node_compat/test/fixtures/child_process_should_emit_error.js +++ b/tests/node_compat/test/fixtures/child_process_should_emit_error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/fixtures/loop.js b/tests/node_compat/test/fixtures/loop.js index aad83d0f67ecce..e815aaabd9e3d8 100644 --- a/tests/node_compat/test/fixtures/loop.js +++ b/tests/node_compat/test/fixtures/loop.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. var t = 1; diff --git a/tests/node_compat/test/internet/test-dns-idna2008.js b/tests/node_compat/test/internet/test-dns-idna2008.js index 9527ec22fd3c74..21072829370f0f 100644 --- a/tests/node_compat/test/internet/test-dns-idna2008.js +++ b/tests/node_compat/test/internet/test-dns-idna2008.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns-lookup.js b/tests/node_compat/test/internet/test-dns-lookup.js index ff9c31544cf317..2f8405d36475fb 100644 --- a/tests/node_compat/test/internet/test-dns-lookup.js +++ b/tests/node_compat/test/internet/test-dns-lookup.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns-promises-resolve.js b/tests/node_compat/test/internet/test-dns-promises-resolve.js index 130c7342291b4b..aa4e1daa0b281e 100644 --- a/tests/node_compat/test/internet/test-dns-promises-resolve.js +++ b/tests/node_compat/test/internet/test-dns-promises-resolve.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns-regress-6244.js b/tests/node_compat/test/internet/test-dns-regress-6244.js index 9d37d6c729c1ba..76617f685b3ce8 100644 --- a/tests/node_compat/test/internet/test-dns-regress-6244.js +++ b/tests/node_compat/test/internet/test-dns-regress-6244.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js b/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js index e2ecc8786815e0..ab2eac8fe1c7f9 100644 --- a/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js +++ b/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-http-https-default-ports.js b/tests/node_compat/test/internet/test-http-https-default-ports.js index 90e0f299a8b04a..92ddbf36567f2f 100644 --- a/tests/node_compat/test/internet/test-http-https-default-ports.js +++ b/tests/node_compat/test/internet/test-http-https-default-ports.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-assert-async.js b/tests/node_compat/test/parallel/test-assert-async.js index db6bfabdcde722..111cf44c6774ca 100644 --- a/tests/node_compat/test/parallel/test-assert-async.js +++ b/tests/node_compat/test/parallel/test-assert-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-assert-fail.js b/tests/node_compat/test/parallel/test-assert-fail.js index 7c7ceef5153823..8718a9ea465001 100644 --- a/tests/node_compat/test/parallel/test-assert-fail.js +++ b/tests/node_compat/test/parallel/test-assert-fail.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-assert-strict-exists.js b/tests/node_compat/test/parallel/test-assert-strict-exists.js index 7a9c96a9415cf9..806cff31f288d3 100644 --- a/tests/node_compat/test/parallel/test-assert-strict-exists.js +++ b/tests/node_compat/test/parallel/test-assert-strict-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-bad-unicode.js b/tests/node_compat/test/parallel/test-bad-unicode.js index fea7e3cd7ab0b4..5b72fd25e54df5 100644 --- a/tests/node_compat/test/parallel/test-bad-unicode.js +++ b/tests/node_compat/test/parallel/test-bad-unicode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-btoa-atob.js b/tests/node_compat/test/parallel/test-btoa-atob.js index 22a9affecd45fa..60c5d58c0f8fc3 100644 --- a/tests/node_compat/test/parallel/test-btoa-atob.js +++ b/tests/node_compat/test/parallel/test-btoa-atob.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-ascii.js b/tests/node_compat/test/parallel/test-buffer-ascii.js index 5695a275aa032c..f47a841e78530c 100644 --- a/tests/node_compat/test/parallel/test-buffer-ascii.js +++ b/tests/node_compat/test/parallel/test-buffer-ascii.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-buffer-badhex.js b/tests/node_compat/test/parallel/test-buffer-badhex.js index 7f1f57a76a7502..ee227f578ef5f3 100644 --- a/tests/node_compat/test/parallel/test-buffer-badhex.js +++ b/tests/node_compat/test/parallel/test-buffer-badhex.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-bigint64.js b/tests/node_compat/test/parallel/test-buffer-bigint64.js index 2ba709bfe706fc..10fdb761b46d67 100644 --- a/tests/node_compat/test/parallel/test-buffer-bigint64.js +++ b/tests/node_compat/test/parallel/test-buffer-bigint64.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-bytelength.js b/tests/node_compat/test/parallel/test-buffer-bytelength.js index 858c72f671998b..781c08a1a1ba71 100644 --- a/tests/node_compat/test/parallel/test-buffer-bytelength.js +++ b/tests/node_compat/test/parallel/test-buffer-bytelength.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-compare-offset.js b/tests/node_compat/test/parallel/test-buffer-compare-offset.js index 9583ded36bfcbd..7e8f6d405a2760 100644 --- a/tests/node_compat/test/parallel/test-buffer-compare-offset.js +++ b/tests/node_compat/test/parallel/test-buffer-compare-offset.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-concat.js b/tests/node_compat/test/parallel/test-buffer-concat.js index cd63be4e4e782d..ba84bbd6d4ea88 100644 --- a/tests/node_compat/test/parallel/test-buffer-concat.js +++ b/tests/node_compat/test/parallel/test-buffer-concat.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-buffer-constants.js b/tests/node_compat/test/parallel/test-buffer-constants.js index 026ac41d8ac775..bbe3f579b762cf 100644 --- a/tests/node_compat/test/parallel/test-buffer-constants.js +++ b/tests/node_compat/test/parallel/test-buffer-constants.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-copy.js b/tests/node_compat/test/parallel/test-buffer-copy.js index 38f32e52fec377..8526070c24f8cc 100644 --- a/tests/node_compat/test/parallel/test-buffer-copy.js +++ b/tests/node_compat/test/parallel/test-buffer-copy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-equals.js b/tests/node_compat/test/parallel/test-buffer-equals.js index c7768da1aa6e85..b74b86f6520288 100644 --- a/tests/node_compat/test/parallel/test-buffer-equals.js +++ b/tests/node_compat/test/parallel/test-buffer-equals.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js b/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js index 89bf7806558b3d..6055da4ab7b76d 100644 --- a/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js +++ b/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-fakes.js b/tests/node_compat/test/parallel/test-buffer-fakes.js index bcd97042a0bcaf..e9db549cb228be 100644 --- a/tests/node_compat/test/parallel/test-buffer-fakes.js +++ b/tests/node_compat/test/parallel/test-buffer-fakes.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-inheritance.js b/tests/node_compat/test/parallel/test-buffer-inheritance.js index 5c3d5925fa5c4c..7c5564ade0c358 100644 --- a/tests/node_compat/test/parallel/test-buffer-inheritance.js +++ b/tests/node_compat/test/parallel/test-buffer-inheritance.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-isascii.js b/tests/node_compat/test/parallel/test-buffer-isascii.js index 59612bb9d9952a..6c4abfb71d9ddb 100644 --- a/tests/node_compat/test/parallel/test-buffer-isascii.js +++ b/tests/node_compat/test/parallel/test-buffer-isascii.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-isencoding.js b/tests/node_compat/test/parallel/test-buffer-isencoding.js index 8f9089a02fae33..68bb94d60d28a0 100644 --- a/tests/node_compat/test/parallel/test-buffer-isencoding.js +++ b/tests/node_compat/test/parallel/test-buffer-isencoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-isutf8.js b/tests/node_compat/test/parallel/test-buffer-isutf8.js index 02f142db893b57..3c4d31da4b554d 100644 --- a/tests/node_compat/test/parallel/test-buffer-isutf8.js +++ b/tests/node_compat/test/parallel/test-buffer-isutf8.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-iterator.js b/tests/node_compat/test/parallel/test-buffer-iterator.js index 279f75ac851d46..76d5df5e63a0c5 100644 --- a/tests/node_compat/test/parallel/test-buffer-iterator.js +++ b/tests/node_compat/test/parallel/test-buffer-iterator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-new.js b/tests/node_compat/test/parallel/test-buffer-new.js index aaa08f39a64d20..110de4f3fe16b5 100644 --- a/tests/node_compat/test/parallel/test-buffer-new.js +++ b/tests/node_compat/test/parallel/test-buffer-new.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js b/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js index a679f26bb057ee..2ad0642f7fce42 100644 --- a/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js +++ b/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js b/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js index 54f272c7e09871..c94ac5db40ed44 100644 --- a/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js +++ b/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --no-warnings --pending-deprecation diff --git a/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js b/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js index 84e0a476df9bb7..661201d2ff7516 100644 --- a/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js +++ b/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-over-max-length.js b/tests/node_compat/test/parallel/test-buffer-over-max-length.js index c53a9d6110b7f4..56107e88313e02 100644 --- a/tests/node_compat/test/parallel/test-buffer-over-max-length.js +++ b/tests/node_compat/test/parallel/test-buffer-over-max-length.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-parent-property.js b/tests/node_compat/test/parallel/test-buffer-parent-property.js index 7c5f4acce57971..44c4e83fea3b84 100644 --- a/tests/node_compat/test/parallel/test-buffer-parent-property.js +++ b/tests/node_compat/test/parallel/test-buffer-parent-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-read.js b/tests/node_compat/test/parallel/test-buffer-read.js index 0b6db96b11ea52..751572e54fd45c 100644 --- a/tests/node_compat/test/parallel/test-buffer-read.js +++ b/tests/node_compat/test/parallel/test-buffer-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readdouble.js b/tests/node_compat/test/parallel/test-buffer-readdouble.js index 7fe5a48417eb1c..ba159661a58c9f 100644 --- a/tests/node_compat/test/parallel/test-buffer-readdouble.js +++ b/tests/node_compat/test/parallel/test-buffer-readdouble.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readfloat.js b/tests/node_compat/test/parallel/test-buffer-readfloat.js index de7bd6c9b4a148..56ad624cca1f1c 100644 --- a/tests/node_compat/test/parallel/test-buffer-readfloat.js +++ b/tests/node_compat/test/parallel/test-buffer-readfloat.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readint.js b/tests/node_compat/test/parallel/test-buffer-readint.js index edcba393b0d727..ccf8e3616de65f 100644 --- a/tests/node_compat/test/parallel/test-buffer-readint.js +++ b/tests/node_compat/test/parallel/test-buffer-readint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readuint.js b/tests/node_compat/test/parallel/test-buffer-readuint.js index 7e1ed1442df97f..948dc21962e61d 100644 --- a/tests/node_compat/test/parallel/test-buffer-readuint.js +++ b/tests/node_compat/test/parallel/test-buffer-readuint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js b/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js index 5f810d2e20e98b..f3ca64c5f19f75 100644 --- a/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js +++ b/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-slice.js b/tests/node_compat/test/parallel/test-buffer-slice.js index bd3e8bbb445193..f67e59a6935fba 100644 --- a/tests/node_compat/test/parallel/test-buffer-slice.js +++ b/tests/node_compat/test/parallel/test-buffer-slice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-buffer-slow.js b/tests/node_compat/test/parallel/test-buffer-slow.js index 577a92a9f6142e..16ead49c8a4230 100644 --- a/tests/node_compat/test/parallel/test-buffer-slow.js +++ b/tests/node_compat/test/parallel/test-buffer-slow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-swap.js b/tests/node_compat/test/parallel/test-buffer-swap.js index 3885672b5bc9d4..7afdaf1db8e3f0 100644 --- a/tests/node_compat/test/parallel/test-buffer-swap.js +++ b/tests/node_compat/test/parallel/test-buffer-swap.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tojson.js b/tests/node_compat/test/parallel/test-buffer-tojson.js index 353eb4746f32db..b135e655ab900a 100644 --- a/tests/node_compat/test/parallel/test-buffer-tojson.js +++ b/tests/node_compat/test/parallel/test-buffer-tojson.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tostring-range.js b/tests/node_compat/test/parallel/test-buffer-tostring-range.js index f4555d5a95641c..d5ead53b83532d 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring-range.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring-range.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js b/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js index 9ec11056c5c833..dc0f3afc5682ac 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tostring.js b/tests/node_compat/test/parallel/test-buffer-tostring.js index 4a71ce651ed31b..ce018a1b69ac1c 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writedouble.js b/tests/node_compat/test/parallel/test-buffer-writedouble.js index aaa41fb21692cb..a41a433a0fc134 100644 --- a/tests/node_compat/test/parallel/test-buffer-writedouble.js +++ b/tests/node_compat/test/parallel/test-buffer-writedouble.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writefloat.js b/tests/node_compat/test/parallel/test-buffer-writefloat.js index d971fccc3d17ec..56b9a4ebc89584 100644 --- a/tests/node_compat/test/parallel/test-buffer-writefloat.js +++ b/tests/node_compat/test/parallel/test-buffer-writefloat.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writeint.js b/tests/node_compat/test/parallel/test-buffer-writeint.js index 227663b85789c2..df36f6a7779e10 100644 --- a/tests/node_compat/test/parallel/test-buffer-writeint.js +++ b/tests/node_compat/test/parallel/test-buffer-writeint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writeuint.js b/tests/node_compat/test/parallel/test-buffer-writeuint.js index 50ab0888de63c7..831c27f602d279 100644 --- a/tests/node_compat/test/parallel/test-buffer-writeuint.js +++ b/tests/node_compat/test/parallel/test-buffer-writeuint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js b/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js index e886f7baa38dae..8edddbe418d8b5 100644 --- a/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js +++ b/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js b/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js index b1dca54ac1c2de..86236f2c332aa7 100644 --- a/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js +++ b/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-zero-fill.js b/tests/node_compat/test/parallel/test-buffer-zero-fill.js index a891343c6a6f02..9291887523765f 100644 --- a/tests/node_compat/test/parallel/test-buffer-zero-fill.js +++ b/tests/node_compat/test/parallel/test-buffer-zero-fill.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-default-options.js b/tests/node_compat/test/parallel/test-child-process-default-options.js index 2dafeb493862da..29bbf49a633e17 100644 --- a/tests/node_compat/test/parallel/test-child-process-default-options.js +++ b/tests/node_compat/test/parallel/test-child-process-default-options.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-double-pipe.js b/tests/node_compat/test/parallel/test-child-process-double-pipe.js index 5703c9bcdf9458..ac75915564f0af 100644 --- a/tests/node_compat/test/parallel/test-child-process-double-pipe.js +++ b/tests/node_compat/test/parallel/test-child-process-double-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-cwd.js b/tests/node_compat/test/parallel/test-child-process-exec-cwd.js index 34a31615dd1602..09e06b20a732b5 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-cwd.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-cwd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-env.js b/tests/node_compat/test/parallel/test-child-process-exec-env.js index ce3ef261349089..5e144074b04f10 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-env.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-env.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-error.js b/tests/node_compat/test/parallel/test-child-process-exec-error.js index 8af3bbefa994ce..ab16bdf7d5de81 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-error.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js b/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js index 07a13c888c1ee4..7d15e05696e64b 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js b/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js index ef69cf2d019733..a30c8b55efdc4c 100644 --- a/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js +++ b/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js b/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js index 4c1d50e2a97db3..b44160ffcd82c8 100644 --- a/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js +++ b/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-flush-stdio.js b/tests/node_compat/test/parallel/test-child-process-flush-stdio.js index bb9b10e6dd7dad..3909eca4a76fa0 100644 --- a/tests/node_compat/test/parallel/test-child-process-flush-stdio.js +++ b/tests/node_compat/test/parallel/test-child-process-flush-stdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js b/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js index f511d2500449a1..cf37a1c5dedbea 100644 --- a/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js +++ b/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-kill.js b/tests/node_compat/test/parallel/test-child-process-kill.js index 319fba5df94038..a776bff50ff2f9 100644 --- a/tests/node_compat/test/parallel/test-child-process-kill.js +++ b/tests/node_compat/test/parallel/test-child-process-kill.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-set-blocking.js b/tests/node_compat/test/parallel/test-child-process-set-blocking.js index d3d03d7b557291..6d3b6120337891 100644 --- a/tests/node_compat/test/parallel/test-child-process-set-blocking.js +++ b/tests/node_compat/test/parallel/test-child-process-set-blocking.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-spawn-args.js b/tests/node_compat/test/parallel/test-child-process-spawn-args.js index 1b21fe61634df0..55f9dbcad871f7 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawn-args.js +++ b/tests/node_compat/test/parallel/test-child-process-spawn-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawn-event.js b/tests/node_compat/test/parallel/test-child-process-spawn-event.js index bf1f26ff0d1299..0b044a8013803c 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawn-event.js +++ b/tests/node_compat/test/parallel/test-child-process-spawn-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js b/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js index 8a531007a3b84e..7909eddeffdb47 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js b/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js index 12102182529e63..df7b4a3058ce5c 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js b/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js index 09a306c136e854..5e6ffda9d58b58 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync.js b/tests/node_compat/test/parallel/test-child-process-spawnsync.js index 5fbd994cc2b54b..e6e667a22720ab 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-console-async-write-error.js b/tests/node_compat/test/parallel/test-console-async-write-error.js index 1e079292d4ee99..812848f6e5e61a 100644 --- a/tests/node_compat/test/parallel/test-console-async-write-error.js +++ b/tests/node_compat/test/parallel/test-console-async-write-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-group.js b/tests/node_compat/test/parallel/test-console-group.js index 3224ddb1bfd88e..272981e4672cfe 100644 --- a/tests/node_compat/test/parallel/test-console-group.js +++ b/tests/node_compat/test/parallel/test-console-group.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js b/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js index 153dd9e542adc9..cbbcd9d92b776e 100644 --- a/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js +++ b/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-log-throw-primitive.js b/tests/node_compat/test/parallel/test-console-log-throw-primitive.js index 6e1a8c7a7b9405..3d397598456e73 100644 --- a/tests/node_compat/test/parallel/test-console-log-throw-primitive.js +++ b/tests/node_compat/test/parallel/test-console-log-throw-primitive.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js b/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js index 8dcd68d33d5d43..d7fc0269b5cea6 100644 --- a/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js +++ b/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-sync-write-error.js b/tests/node_compat/test/parallel/test-console-sync-write-error.js index 9a9766645b629a..58fca44ba05531 100644 --- a/tests/node_compat/test/parallel/test-console-sync-write-error.js +++ b/tests/node_compat/test/parallel/test-console-sync-write-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-table.js b/tests/node_compat/test/parallel/test-console-table.js index 991521e8e350b4..6a3de08f21b85e 100644 --- a/tests/node_compat/test/parallel/test-console-table.js +++ b/tests/node_compat/test/parallel/test-console-table.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-tty-colors.js b/tests/node_compat/test/parallel/test-console-tty-colors.js index 5d2a994bb4f43d..236ed613f98edb 100644 --- a/tests/node_compat/test/parallel/test-console-tty-colors.js +++ b/tests/node_compat/test/parallel/test-console-tty-colors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-dh-shared.js b/tests/node_compat/test/parallel/test-crypto-dh-shared.js index c087e15d87ddf6..d2afeaf38c00a7 100644 --- a/tests/node_compat/test/parallel/test-crypto-dh-shared.js +++ b/tests/node_compat/test/parallel/test-crypto-dh-shared.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-hash.js b/tests/node_compat/test/parallel/test-crypto-hash.js index 18c57dab74949c..c24531138c416e 100644 --- a/tests/node_compat/test/parallel/test-crypto-hash.js +++ b/tests/node_compat/test/parallel/test-crypto-hash.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-secret-keygen.js b/tests/node_compat/test/parallel/test-crypto-secret-keygen.js index 9e9205e3f249ac..5f70109f10710b 100644 --- a/tests/node_compat/test/parallel/test-crypto-secret-keygen.js +++ b/tests/node_compat/test/parallel/test-crypto-secret-keygen.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-update-encoding.js b/tests/node_compat/test/parallel/test-crypto-update-encoding.js index 8694ca1717b1ab..75064d8d148adc 100644 --- a/tests/node_compat/test/parallel/test-crypto-update-encoding.js +++ b/tests/node_compat/test/parallel/test-crypto-update-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dgram-close-during-bind.js b/tests/node_compat/test/parallel/test-dgram-close-during-bind.js index 2a89c4567025e4..0333da5b9e1bb8 100644 --- a/tests/node_compat/test/parallel/test-dgram-close-during-bind.js +++ b/tests/node_compat/test/parallel/test-dgram-close-during-bind.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-dgram-close-signal.js b/tests/node_compat/test/parallel/test-dgram-close-signal.js index 108cfd9be3e64f..788018e77c5d89 100644 --- a/tests/node_compat/test/parallel/test-dgram-close-signal.js +++ b/tests/node_compat/test/parallel/test-dgram-close-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js b/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js index 18132783a7b6db..a86dc23675f4bf 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-net.js b/tests/node_compat/test/parallel/test-diagnostics-channel-net.js index 504c3e5dc82ab0..147030ee62b384 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-net.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-net.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js b/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js index efea42371df9e0..2466b67b1f4d40 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js b/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js index ef2486f5afb937..cc21955ca0920f 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js b/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js index 34af2679884520..6c7fd4cfbb2353 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js b/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js index 767382476bb200..72b43972b5550b 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js index 885c9d76b5645d..af5d08d790be4a 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js index 1160e6464a9df2..6f91c361d0393a 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js index 3f015e192b61b4..0a713e64a076c4 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js index 09fc103293746c..0f5d276ac58854 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js index 036bcce3b84b1f..b8c642a9aaf4ae 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js b/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js index a6ea753c963f12..6843d0f30e83e6 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dns-memory-error.js b/tests/node_compat/test/parallel/test-dns-memory-error.js index 74aafa52ff2740..1131c7f9b7658e 100644 --- a/tests/node_compat/test/parallel/test-dns-memory-error.js +++ b/tests/node_compat/test/parallel/test-dns-memory-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-dns-promises-exists.js b/tests/node_compat/test/parallel/test-dns-promises-exists.js index 897c922048837c..3368abc194cd9c 100644 --- a/tests/node_compat/test/parallel/test-dns-promises-exists.js +++ b/tests/node_compat/test/parallel/test-dns-promises-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js b/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js index 925537c6004657..b271ae34cebde8 100644 --- a/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js +++ b/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-dns-setservers-type-check.js b/tests/node_compat/test/parallel/test-dns-setservers-type-check.js index 597241604a580c..6218a1bdfd384f 100644 --- a/tests/node_compat/test/parallel/test-dns-setservers-type-check.js +++ b/tests/node_compat/test/parallel/test-dns-setservers-type-check.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js b/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js index 628d03a6f3a43b..2c9943bbe8a6fa 100644 --- a/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js +++ b/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. /* eslint-disable strict */ diff --git a/tests/node_compat/test/parallel/test-eval.js b/tests/node_compat/test/parallel/test-eval.js index 8b3046af79f862..a6fb713b0b819c 100644 --- a/tests/node_compat/test/parallel/test-eval.js +++ b/tests/node_compat/test/parallel/test-eval.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js index 08f5870bd05fc1..ec1a171230b7ff 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-emit-context.js b/tests/node_compat/test/parallel/test-event-emitter-emit-context.js index 76c22aa9a02368..03614bab76ad3a 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-emit-context.js +++ b/tests/node_compat/test/parallel/test-event-emitter-emit-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js b/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js index e5df20e601927d..39ba06f365c1ec 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js +++ b/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-errors.js b/tests/node_compat/test/parallel/test-event-emitter-errors.js index e8bbbb4781b971..da8b27b39b3216 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-errors.js +++ b/tests/node_compat/test/parallel/test-event-emitter-errors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js index 15f04f266b400b..111bb6b7304cb0 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js b/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js index cb92dc5b2df98c..5053f399c750d4 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js +++ b/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-listener-count.js b/tests/node_compat/test/parallel/test-event-emitter-listener-count.js index cb084166f17db4..bfe8bcced05872 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-listener-count.js +++ b/tests/node_compat/test/parallel/test-event-emitter-listener-count.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js b/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js index 51c28c35bf40a5..c52acd2dde07df 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js +++ b/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-listeners.js index cbfb9471eb0890..b62aac9f9108cf 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-method-names.js b/tests/node_compat/test/parallel/test-event-emitter-method-names.js index 558fb83dfa51f2..f3890b839a8783 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-method-names.js +++ b/tests/node_compat/test/parallel/test-event-emitter-method-names.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js b/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js index c08c0c31c753e5..564f16246cfd43 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js +++ b/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-num-args.js b/tests/node_compat/test/parallel/test-event-emitter-num-args.js index b1ef4bc0afd3e5..6e2cdf42f17e4f 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-num-args.js +++ b/tests/node_compat/test/parallel/test-event-emitter-num-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-once.js b/tests/node_compat/test/parallel/test-event-emitter-once.js index eff0861f57e655..a93a5a43b648a4 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-once.js +++ b/tests/node_compat/test/parallel/test-event-emitter-once.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js index a2bac54c3960cd..cfc76fc2fa3585 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js index 966bc46e22b3b2..983da177a5c1bd 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js b/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js index 2923a3ec77ad2c..bc50b32cdacf6f 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js +++ b/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js b/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js index b8bc4d7e61eb19..21455a24288d9a 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js +++ b/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-subclass.js b/tests/node_compat/test/parallel/test-event-emitter-subclass.js index 7ef141e93f49f9..46d08041df7e17 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-subclass.js +++ b/tests/node_compat/test/parallel/test-event-emitter-subclass.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-symbols.js b/tests/node_compat/test/parallel/test-event-emitter-symbols.js index 0b8c133b0c7f73..74f43f229a4163 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-symbols.js +++ b/tests/node_compat/test/parallel/test-event-emitter-symbols.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-events-list.js b/tests/node_compat/test/parallel/test-events-list.js index 0e83894bee7b0c..f0b553812f9102 100644 --- a/tests/node_compat/test/parallel/test-events-list.js +++ b/tests/node_compat/test/parallel/test-events-list.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-events-on-async-iterator.js b/tests/node_compat/test/parallel/test-events-on-async-iterator.js index a0ab2a5b466bed..2516f1e1d71689 100644 --- a/tests/node_compat/test/parallel/test-events-on-async-iterator.js +++ b/tests/node_compat/test/parallel/test-events-on-async-iterator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals --no-warnings diff --git a/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js b/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js index 58919ef14e7c7e..72a4067b39a6a2 100644 --- a/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js +++ b/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js b/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js index 9084bad3c58a9e..de5592b169153d 100644 --- a/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js +++ b/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-exception-handler.js b/tests/node_compat/test/parallel/test-exception-handler.js index f3ea6e506974c9..18557fbf81fa6d 100644 --- a/tests/node_compat/test/parallel/test-exception-handler.js +++ b/tests/node_compat/test/parallel/test-exception-handler.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-exception-handler2.js b/tests/node_compat/test/parallel/test-exception-handler2.js index bf9efd85af6759..2dce592830a0e9 100644 --- a/tests/node_compat/test/parallel/test-exception-handler2.js +++ b/tests/node_compat/test/parallel/test-exception-handler2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-read-noexist.js b/tests/node_compat/test/parallel/test-file-read-noexist.js index 2224315e934e98..3865ccfdd2677b 100644 --- a/tests/node_compat/test/parallel/test-file-read-noexist.js +++ b/tests/node_compat/test/parallel/test-file-read-noexist.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream.js b/tests/node_compat/test/parallel/test-file-write-stream.js index 22ebadd1cbefdc..bb247d1fb9bf67 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream.js +++ b/tests/node_compat/test/parallel/test-file-write-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream2.js b/tests/node_compat/test/parallel/test-file-write-stream2.js index 8b23683a75845c..39d595f3d52513 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream2.js +++ b/tests/node_compat/test/parallel/test-file-write-stream2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream3.js b/tests/node_compat/test/parallel/test-file-write-stream3.js index 2dd5444a659c82..94775e0ef6751a 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream3.js +++ b/tests/node_compat/test/parallel/test-file-write-stream3.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream4.js b/tests/node_compat/test/parallel/test-file-write-stream4.js index 9d5cd7d32fc6e4..82bd96b4698166 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream4.js +++ b/tests/node_compat/test/parallel/test-file-write-stream4.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-access.js b/tests/node_compat/test/parallel/test-fs-access.js index 8add7d553edd0a..a9c627b9bfdd18 100644 --- a/tests/node_compat/test/parallel/test-fs-access.js +++ b/tests/node_compat/test/parallel/test-fs-access.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-fs-append-file-sync.js b/tests/node_compat/test/parallel/test-fs-append-file-sync.js index fa79ddb55f1673..44f62f9a08b188 100644 --- a/tests/node_compat/test/parallel/test-fs-append-file-sync.js +++ b/tests/node_compat/test/parallel/test-fs-append-file-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-chown-type-check.js b/tests/node_compat/test/parallel/test-fs-chown-type-check.js index 2a0e8409906791..3431e0a4c427b9 100644 --- a/tests/node_compat/test/parallel/test-fs-chown-type-check.js +++ b/tests/node_compat/test/parallel/test-fs-chown-type-check.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-copyfile.js b/tests/node_compat/test/parallel/test-fs-copyfile.js index d00a076f314a64..4135b90678ece6 100644 --- a/tests/node_compat/test/parallel/test-fs-copyfile.js +++ b/tests/node_compat/test/parallel/test-fs-copyfile.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-fs-empty-readStream.js b/tests/node_compat/test/parallel/test-fs-empty-readStream.js index d3c7faf54c13f8..618eca5fbfe4c4 100644 --- a/tests/node_compat/test/parallel/test-fs-empty-readStream.js +++ b/tests/node_compat/test/parallel/test-fs-empty-readStream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-lchown.js b/tests/node_compat/test/parallel/test-fs-lchown.js index ce3333745b869a..cdb4c7cb148b96 100644 --- a/tests/node_compat/test/parallel/test-fs-lchown.js +++ b/tests/node_compat/test/parallel/test-fs-lchown.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-open-flags.js b/tests/node_compat/test/parallel/test-fs-open-flags.js index 89f6bdcb62a065..64967252a7db98 100644 --- a/tests/node_compat/test/parallel/test-fs-open-flags.js +++ b/tests/node_compat/test/parallel/test-fs-open-flags.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-open-mode-mask.js b/tests/node_compat/test/parallel/test-fs-open-mode-mask.js index 30a2cd354d1eeb..a39b1e4bfb8c69 100644 --- a/tests/node_compat/test/parallel/test-fs-open-mode-mask.js +++ b/tests/node_compat/test/parallel/test-fs-open-mode-mask.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-open-no-close.js b/tests/node_compat/test/parallel/test-fs-open-no-close.js index 27e23a18245738..4ba8890d9fb787 100644 --- a/tests/node_compat/test/parallel/test-fs-open-no-close.js +++ b/tests/node_compat/test/parallel/test-fs-open-no-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js b/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js index 025eff60d2a13c..d658e329f0956b 100644 --- a/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js +++ b/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js b/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js index f750c28be787eb..7812a4a87920d7 100644 --- a/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js +++ b/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js b/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js index 2ab7b69e33317f..0719a62c94edd7 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js b/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js index df8cead2abc9fe..89325bd322deb8 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js b/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js index 30129532bb94b0..3b17d45ffb2ea0 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js b/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js index f3632dfed6e88e..2b3fe85b0d9c1c 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-fd.js b/tests/node_compat/test/parallel/test-fs-read-stream-fd.js index ba7c06419a38a3..03a4dd4bf57c35 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-fd.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-fd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js b/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js index 2f8c139e8c3d02..e5ad24fc6c5d63 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js b/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js index c05a4818a1d3b8..e662bf29597d20 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-resume.js b/tests/node_compat/test/parallel/test-fs-read-stream-resume.js index 2ab23dc7907279..df89ba23a877b2 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-resume.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js b/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js index 798627e04d3065..efc2c796d0ece9 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-type.js b/tests/node_compat/test/parallel/test-fs-read-type.js index 73653bdaeedbe8..d127554b8ea963 100644 --- a/tests/node_compat/test/parallel/test-fs-read-type.js +++ b/tests/node_compat/test/parallel/test-fs-read-type.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-zero-length.js b/tests/node_compat/test/parallel/test-fs-read-zero-length.js index 59eaf2e5a83ded..062f290a54198b 100644 --- a/tests/node_compat/test/parallel/test-fs-read-zero-length.js +++ b/tests/node_compat/test/parallel/test-fs-read-zero-length.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read.js b/tests/node_compat/test/parallel/test-fs-read.js index e8318df1ec4bd6..0681e42dce3c67 100644 --- a/tests/node_compat/test/parallel/test-fs-read.js +++ b/tests/node_compat/test/parallel/test-fs-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js b/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js index e3724c56dced2d..a466e7e0109b59 100644 --- a/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js +++ b/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-readdir.js b/tests/node_compat/test/parallel/test-fs-readdir.js index 319020c933f7dc..31e8221ef5e70b 100644 --- a/tests/node_compat/test/parallel/test-fs-readdir.js +++ b/tests/node_compat/test/parallel/test-fs-readdir.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-readfile-empty.js b/tests/node_compat/test/parallel/test-fs-readfile-empty.js index c076223fb32796..3f3f9e83e95f93 100644 --- a/tests/node_compat/test/parallel/test-fs-readfile-empty.js +++ b/tests/node_compat/test/parallel/test-fs-readfile-empty.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-readv-sync.js b/tests/node_compat/test/parallel/test-fs-readv-sync.js index fd0fc8cdaf6193..2829dbb2c8d967 100644 --- a/tests/node_compat/test/parallel/test-fs-readv-sync.js +++ b/tests/node_compat/test/parallel/test-fs-readv-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-readv.js b/tests/node_compat/test/parallel/test-fs-readv.js index 42581cfe8bafd8..834d1da63edead 100644 --- a/tests/node_compat/test/parallel/test-fs-readv.js +++ b/tests/node_compat/test/parallel/test-fs-readv.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-realpath-native.js b/tests/node_compat/test/parallel/test-fs-realpath-native.js index f4cc649a042704..753dfc1613af07 100644 --- a/tests/node_compat/test/parallel/test-fs-realpath-native.js +++ b/tests/node_compat/test/parallel/test-fs-realpath-native.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js index 121a66e0944517..e20f5e622b64f0 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js index b3f4d1fab0211d..0691083103bb0e 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js index 931308aadb916d..f337af1db284d8 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js index 6a48678bc6eac0..123ca9775569b8 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js index 2eae8b1e307e2b..f99f413b169721 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js index 89250b048fecae..f1ed786977fb3a 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js b/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js index df1d7a84f6af7d..335824b2658d52 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-utimes.js b/tests/node_compat/test/parallel/test-fs-utimes.js index f24e27f36796f0..afc57776078521 100644 --- a/tests/node_compat/test/parallel/test-fs-utimes.js +++ b/tests/node_compat/test/parallel/test-fs-utimes.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-watchfile.js b/tests/node_compat/test/parallel/test-fs-watchfile.js index ccbaabe06fa0a7..b46e2e5efef344 100644 --- a/tests/node_compat/test/parallel/test-fs-watchfile.js +++ b/tests/node_compat/test/parallel/test-fs-watchfile.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-buffer.js b/tests/node_compat/test/parallel/test-fs-write-buffer.js index 13ee5f068cbdd7..4971a101d5db2e 100644 --- a/tests/node_compat/test/parallel/test-fs-write-buffer.js +++ b/tests/node_compat/test/parallel/test-fs-write-buffer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-file-buffer.js b/tests/node_compat/test/parallel/test-fs-write-file-buffer.js index d0bfd32aa99819..155047de8a358f 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-buffer.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-buffer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js index 063f3e4915d392..93459235825a55 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-file-sync.js b/tests/node_compat/test/parallel/test-fs-write-file-sync.js index e7da8526063e49..01d14b8fd04f21 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-sync.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-no-fd.js b/tests/node_compat/test/parallel/test-fs-write-no-fd.js index 5723e17128a9f6..a6fdbf8eebd162 100644 --- a/tests/node_compat/test/parallel/test-fs-write-no-fd.js +++ b/tests/node_compat/test/parallel/test-fs-write-no-fd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js b/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js index 480f7dcdb36fb4..a38de9119e3db8 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js b/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js index ad685be77f20a5..10ab6ca769cdc2 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js b/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js index 0f57333081d984..901a77cea9ef1d 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-end.js b/tests/node_compat/test/parallel/test-fs-write-stream-end.js index 3221a558e8b409..d162e9644c8766 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-end.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-fs.js b/tests/node_compat/test/parallel/test-fs-write-stream-fs.js index 253f5e425240db..95fcdde26bb605 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-fs.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-fs.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js b/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js index 988512aa3bdf08..d53ec243bc9148 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream.js b/tests/node_compat/test/parallel/test-fs-write-stream.js index 107f22af04dfef..589308135a7a1f 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-sync.js b/tests/node_compat/test/parallel/test-fs-write-sync.js index e65923102e6b1b..c846989f3b4e14 100644 --- a/tests/node_compat/test/parallel/test-fs-write-sync.js +++ b/tests/node_compat/test/parallel/test-fs-write-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write.js b/tests/node_compat/test/parallel/test-fs-write.js index e10db287fb238a..c8d0c2b53f3ab0 100644 --- a/tests/node_compat/test/parallel/test-fs-write.js +++ b/tests/node_compat/test/parallel/test-fs-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-writev-sync.js b/tests/node_compat/test/parallel/test-fs-writev-sync.js index 35db3675fdbcfe..eb4eee6bc12a30 100644 --- a/tests/node_compat/test/parallel/test-fs-writev-sync.js +++ b/tests/node_compat/test/parallel/test-fs-writev-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js b/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js index 92ad796a7524be..c4cd5a42bc127d 100644 --- a/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js +++ b/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-agent-getname.js b/tests/node_compat/test/parallel/test-http-agent-getname.js index 530cc1378d97e3..2a41d3813dd561 100644 --- a/tests/node_compat/test/parallel/test-http-agent-getname.js +++ b/tests/node_compat/test/parallel/test-http-agent-getname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-client-get-url.js b/tests/node_compat/test/parallel/test-http-client-get-url.js index 2aeb0e9024b73a..073bcbe1dc758c 100644 --- a/tests/node_compat/test/parallel/test-http-client-get-url.js +++ b/tests/node_compat/test/parallel/test-http-client-get-url.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-client-read-in-error.js b/tests/node_compat/test/parallel/test-http-client-read-in-error.js index 7f28c076814bae..0f54b721e42534 100644 --- a/tests/node_compat/test/parallel/test-http-client-read-in-error.js +++ b/tests/node_compat/test/parallel/test-http-client-read-in-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-header-validators.js b/tests/node_compat/test/parallel/test-http-header-validators.js index 40f1d8b1594774..9d896110d77c95 100644 --- a/tests/node_compat/test/parallel/test-http-header-validators.js +++ b/tests/node_compat/test/parallel/test-http-header-validators.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-localaddress.js b/tests/node_compat/test/parallel/test-http-localaddress.js index e4f6c4aefe305a..149257d43a9ce0 100644 --- a/tests/node_compat/test/parallel/test-http-localaddress.js +++ b/tests/node_compat/test/parallel/test-http-localaddress.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js index 490d814b9987f7..dbd7f850a64861 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js index a36b74ed5c0981..8ecfbc7c3ef1b4 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js index ac07a197ab0eb1..05d6aa64a9343d 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js b/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js index 23c61e61d8a502..c39d62c331ed45 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js b/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js index 6e1a51a17cdf33..70373d7c05e917 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index 98b222f391e1cf..6e2a25be7909f5 100644 --- a/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-icu-transcode.js b/tests/node_compat/test/parallel/test-icu-transcode.js index 1f5aeb53551b54..f34626892d0803 100644 --- a/tests/node_compat/test/parallel/test-icu-transcode.js +++ b/tests/node_compat/test/parallel/test-icu-transcode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-access-byteswritten.js b/tests/node_compat/test/parallel/test-net-access-byteswritten.js index 54221f8551d16b..79c005a71a7c36 100644 --- a/tests/node_compat/test/parallel/test-net-access-byteswritten.js +++ b/tests/node_compat/test/parallel/test-net-access-byteswritten.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js b/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js index 73c793b1e26a91..c2541199265fee 100644 --- a/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js +++ b/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js b/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js index e1ae0986e8bc99..92720a6101d200 100644 --- a/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js +++ b/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-after-destroy.js b/tests/node_compat/test/parallel/test-net-connect-after-destroy.js index 1473877caf7960..76015e7dad81cf 100644 --- a/tests/node_compat/test/parallel/test-net-connect-after-destroy.js +++ b/tests/node_compat/test/parallel/test-net-connect-after-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-destroy.js b/tests/node_compat/test/parallel/test-net-connect-destroy.js index 5618765e7e41a0..02126aeb48bc47 100644 --- a/tests/node_compat/test/parallel/test-net-connect-destroy.js +++ b/tests/node_compat/test/parallel/test-net-connect-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js b/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js index 004cb86676ab88..8dcc9262b22ec3 100644 --- a/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js +++ b/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js b/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js index ef4f3d763aea64..c7ba46098dfffc 100644 --- a/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js +++ b/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-connect-no-arg.js b/tests/node_compat/test/parallel/test-net-connect-no-arg.js index ad12f7abac7431..2211cd4f693aa1 100644 --- a/tests/node_compat/test/parallel/test-net-connect-no-arg.js +++ b/tests/node_compat/test/parallel/test-net-connect-no-arg.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-dns-error.js b/tests/node_compat/test/parallel/test-net-dns-error.js index 0b91b0f227776f..4a78055ccffdd5 100644 --- a/tests/node_compat/test/parallel/test-net-dns-error.js +++ b/tests/node_compat/test/parallel/test-net-dns-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-during-close.js b/tests/node_compat/test/parallel/test-net-during-close.js index d2ea486094ce47..0c4f51cd3de45c 100644 --- a/tests/node_compat/test/parallel/test-net-during-close.js +++ b/tests/node_compat/test/parallel/test-net-during-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-end-without-connect.js b/tests/node_compat/test/parallel/test-net-end-without-connect.js index 44885b81bd7c0b..644b10de2be355 100644 --- a/tests/node_compat/test/parallel/test-net-end-without-connect.js +++ b/tests/node_compat/test/parallel/test-net-end-without-connect.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-isip.js b/tests/node_compat/test/parallel/test-net-isip.js index 5ca25fdb9b0d3e..a4eaa70ce190c9 100644 --- a/tests/node_compat/test/parallel/test-net-isip.js +++ b/tests/node_compat/test/parallel/test-net-isip.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-isipv4.js b/tests/node_compat/test/parallel/test-net-isipv4.js index cdc9f22aceaa4e..05ccc57258d2a4 100644 --- a/tests/node_compat/test/parallel/test-net-isipv4.js +++ b/tests/node_compat/test/parallel/test-net-isipv4.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-isipv6.js b/tests/node_compat/test/parallel/test-net-isipv6.js index 752aa5aad7387b..5791c9fa13f33a 100644 --- a/tests/node_compat/test/parallel/test-net-isipv6.js +++ b/tests/node_compat/test/parallel/test-net-isipv6.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js b/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js index 960fe6600c8d2b..94ab88407d2537 100644 --- a/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js +++ b/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-listen-close-server.js b/tests/node_compat/test/parallel/test-net-listen-close-server.js index 18c4d111c80a41..df000b2dbec05f 100644 --- a/tests/node_compat/test/parallel/test-net-listen-close-server.js +++ b/tests/node_compat/test/parallel/test-net-listen-close-server.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-listening.js b/tests/node_compat/test/parallel/test-net-listening.js index b11cfa59f64475..30d832ec0a7ac0 100644 --- a/tests/node_compat/test/parallel/test-net-listening.js +++ b/tests/node_compat/test/parallel/test-net-listening.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-localerror.js b/tests/node_compat/test/parallel/test-net-localerror.js index 30287a55c01db0..63276fe2bbdc34 100644 --- a/tests/node_compat/test/parallel/test-net-localerror.js +++ b/tests/node_compat/test/parallel/test-net-localerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-options-lookup.js b/tests/node_compat/test/parallel/test-net-options-lookup.js index e5b0a4c4c80dee..d285ae6e4a217f 100644 --- a/tests/node_compat/test/parallel/test-net-options-lookup.js +++ b/tests/node_compat/test/parallel/test-net-options-lookup.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js b/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js index 1e3681744a7714..c1e68f5b70a8bf 100644 --- a/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js +++ b/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js b/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js index 080dd933c48bcc..b6e93f37ba4540 100644 --- a/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js +++ b/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-listen-options.js b/tests/node_compat/test/parallel/test-net-server-listen-options.js index 0220a78cbbced3..982373e871b657 100644 --- a/tests/node_compat/test/parallel/test-net-server-listen-options.js +++ b/tests/node_compat/test/parallel/test-net-server-listen-options.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js b/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js index bc9fff8523c2b3..9f48ce4f2e0f20 100644 --- a/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js +++ b/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-server-options.js b/tests/node_compat/test/parallel/test-net-server-options.js index c8403771cd3988..3e4c557ddb5d14 100644 --- a/tests/node_compat/test/parallel/test-net-server-options.js +++ b/tests/node_compat/test/parallel/test-net-server-options.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-unref-persistent.js b/tests/node_compat/test/parallel/test-net-server-unref-persistent.js index efbf38386fc0f5..8cff4eb211090a 100644 --- a/tests/node_compat/test/parallel/test-net-server-unref-persistent.js +++ b/tests/node_compat/test/parallel/test-net-server-unref-persistent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-unref.js b/tests/node_compat/test/parallel/test-net-server-unref.js index 91e3bfdc40620d..30f870585ca919 100644 --- a/tests/node_compat/test/parallel/test-net-server-unref.js +++ b/tests/node_compat/test/parallel/test-net-server-unref.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js b/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js index 9aad4f0d25bb0c..597180bf4ebd64 100644 --- a/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js +++ b/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js b/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js index 1a2e6f63e49d92..a9c8ef8e80310f 100644 --- a/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js +++ b/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-socket-setnodelay.js b/tests/node_compat/test/parallel/test-net-socket-setnodelay.js index 3d11b845280625..ab389c58f7f7d9 100644 --- a/tests/node_compat/test/parallel/test-net-socket-setnodelay.js +++ b/tests/node_compat/test/parallel/test-net-socket-setnodelay.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-timeout-no-handle.js b/tests/node_compat/test/parallel/test-net-timeout-no-handle.js index eea460239769d8..7b4e74ff194233 100644 --- a/tests/node_compat/test/parallel/test-net-timeout-no-handle.js +++ b/tests/node_compat/test/parallel/test-net-timeout-no-handle.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js b/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js index a08c9180633021..916e815bc53a16 100644 --- a/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js +++ b/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js b/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js index d1b2bd56b6f6ef..9129fbbe422557 100644 --- a/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js +++ b/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js b/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js index 3b286b6bdaa679..16623fb6ca567f 100644 --- a/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js +++ b/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-ordering.js b/tests/node_compat/test/parallel/test-next-tick-ordering.js index 3dd4dc2ea2bd27..78f7b3b1204271 100644 --- a/tests/node_compat/test/parallel/test-next-tick-ordering.js +++ b/tests/node_compat/test/parallel/test-next-tick-ordering.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-ordering2.js b/tests/node_compat/test/parallel/test-next-tick-ordering2.js index 90239fb219e05d..6ea41c9079e7f1 100644 --- a/tests/node_compat/test/parallel/test-next-tick-ordering2.js +++ b/tests/node_compat/test/parallel/test-next-tick-ordering2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-when-exiting.js b/tests/node_compat/test/parallel/test-next-tick-when-exiting.js index 0ba2a2db3b8ffa..c2e9ecdbc39e93 100644 --- a/tests/node_compat/test/parallel/test-next-tick-when-exiting.js +++ b/tests/node_compat/test/parallel/test-next-tick-when-exiting.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-next-tick.js b/tests/node_compat/test/parallel/test-next-tick.js index 6e4e7bfe79a0c9..1e6ceab70c6b99 100644 --- a/tests/node_compat/test/parallel/test-next-tick.js +++ b/tests/node_compat/test/parallel/test-next-tick.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-nodeeventtarget.js b/tests/node_compat/test/parallel/test-nodeeventtarget.js index d78a6628793786..aa325f601422a8 100644 --- a/tests/node_compat/test/parallel/test-nodeeventtarget.js +++ b/tests/node_compat/test/parallel/test-nodeeventtarget.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals --no-warnings diff --git a/tests/node_compat/test/parallel/test-os.js b/tests/node_compat/test/parallel/test-os.js index f7c24342adac9d..f3036c2c62ca97 100644 --- a/tests/node_compat/test/parallel/test-os.js +++ b/tests/node_compat/test/parallel/test-os.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-outgoing-message-destroy.js b/tests/node_compat/test/parallel/test-outgoing-message-destroy.js index 1ad4ce2ebff758..1e720ab5bcd03e 100644 --- a/tests/node_compat/test/parallel/test-outgoing-message-destroy.js +++ b/tests/node_compat/test/parallel/test-outgoing-message-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-outgoing-message-pipe.js b/tests/node_compat/test/parallel/test-outgoing-message-pipe.js index d20df11e92e483..a0f28ae8e6f05b 100644 --- a/tests/node_compat/test/parallel/test-outgoing-message-pipe.js +++ b/tests/node_compat/test/parallel/test-outgoing-message-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-parse-args.mjs b/tests/node_compat/test/parallel/test-parse-args.mjs index 0d5aa72f6302e7..c03c270e0ddfbd 100644 --- a/tests/node_compat/test/parallel/test-parse-args.mjs +++ b/tests/node_compat/test/parallel/test-parse-args.mjs @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. import '../common/index.mjs'; diff --git a/tests/node_compat/test/parallel/test-path-basename.js b/tests/node_compat/test/parallel/test-path-basename.js index 5a5da668e14334..8c186bc5cdc586 100644 --- a/tests/node_compat/test/parallel/test-path-basename.js +++ b/tests/node_compat/test/parallel/test-path-basename.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-dirname.js b/tests/node_compat/test/parallel/test-path-dirname.js index b6a59d9991224b..dffb0e11d176f5 100644 --- a/tests/node_compat/test/parallel/test-path-dirname.js +++ b/tests/node_compat/test/parallel/test-path-dirname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-extname.js b/tests/node_compat/test/parallel/test-path-extname.js index 8cba90b073a5c9..96edd9c6acc60f 100644 --- a/tests/node_compat/test/parallel/test-path-extname.js +++ b/tests/node_compat/test/parallel/test-path-extname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-isabsolute.js b/tests/node_compat/test/parallel/test-path-isabsolute.js index 8ad2f93f5cc483..e1820f07189318 100644 --- a/tests/node_compat/test/parallel/test-path-isabsolute.js +++ b/tests/node_compat/test/parallel/test-path-isabsolute.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-join.js b/tests/node_compat/test/parallel/test-path-join.js index 05e3d86f780435..ef794619d6ab0f 100644 --- a/tests/node_compat/test/parallel/test-path-join.js +++ b/tests/node_compat/test/parallel/test-path-join.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-makelong.js b/tests/node_compat/test/parallel/test-path-makelong.js index a9dbce2a037d94..afd113538b1502 100644 --- a/tests/node_compat/test/parallel/test-path-makelong.js +++ b/tests/node_compat/test/parallel/test-path-makelong.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-path-normalize.js b/tests/node_compat/test/parallel/test-path-normalize.js index 2773a6088f5e3f..f8c9b47622285f 100644 --- a/tests/node_compat/test/parallel/test-path-normalize.js +++ b/tests/node_compat/test/parallel/test-path-normalize.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-parse-format.js b/tests/node_compat/test/parallel/test-path-parse-format.js index 7f4682899ef0ac..b2aeb1fb8346b3 100644 --- a/tests/node_compat/test/parallel/test-path-parse-format.js +++ b/tests/node_compat/test/parallel/test-path-parse-format.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-path-posix-exists.js b/tests/node_compat/test/parallel/test-path-posix-exists.js index 97cb68f0a89e52..b3c65726445e9c 100644 --- a/tests/node_compat/test/parallel/test-path-posix-exists.js +++ b/tests/node_compat/test/parallel/test-path-posix-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-relative.js b/tests/node_compat/test/parallel/test-path-relative.js index bb0ba2ba11a90a..45d7d092318ff7 100644 --- a/tests/node_compat/test/parallel/test-path-relative.js +++ b/tests/node_compat/test/parallel/test-path-relative.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-win32-exists.js b/tests/node_compat/test/parallel/test-path-win32-exists.js index 559142bc221cd5..96ef69191c73cc 100644 --- a/tests/node_compat/test/parallel/test-path-win32-exists.js +++ b/tests/node_compat/test/parallel/test-path-win32-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-zero-length-strings.js b/tests/node_compat/test/parallel/test-path-zero-length-strings.js index 8b26e9ffeb738e..8c68bfff1fcef7 100644 --- a/tests/node_compat/test/parallel/test-path-zero-length-strings.js +++ b/tests/node_compat/test/parallel/test-path-zero-length-strings.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path.js b/tests/node_compat/test/parallel/test-path.js index 2d0a9287236893..4396246b1b96c4 100644 --- a/tests/node_compat/test/parallel/test-path.js +++ b/tests/node_compat/test/parallel/test-path.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-beforeexit.js b/tests/node_compat/test/parallel/test-process-beforeexit.js index 036b88c9f2e51b..27bbe677629e9f 100644 --- a/tests/node_compat/test/parallel/test-process-beforeexit.js +++ b/tests/node_compat/test/parallel/test-process-beforeexit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js b/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js index 52abd847a1af14..2747e9374397a4 100644 --- a/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js +++ b/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --no-warnings diff --git a/tests/node_compat/test/parallel/test-process-env-allowed-flags.js b/tests/node_compat/test/parallel/test-process-env-allowed-flags.js index 621f2710f376ec..cdd847e9fe15a3 100644 --- a/tests/node_compat/test/parallel/test-process-env-allowed-flags.js +++ b/tests/node_compat/test/parallel/test-process-env-allowed-flags.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js b/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js index 000a7691f5e34e..49705c1f32aef2 100644 --- a/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js +++ b/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-exit-handler.js b/tests/node_compat/test/parallel/test-process-exit-handler.js index c79fb7ceee47f3..c8de3a91e5f81a 100644 --- a/tests/node_compat/test/parallel/test-process-exit-handler.js +++ b/tests/node_compat/test/parallel/test-process-exit-handler.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-process-exit-recursive.js b/tests/node_compat/test/parallel/test-process-exit-recursive.js index 77a34f4f2686c0..979347c8a04e44 100644 --- a/tests/node_compat/test/parallel/test-process-exit-recursive.js +++ b/tests/node_compat/test/parallel/test-process-exit-recursive.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-exit.js b/tests/node_compat/test/parallel/test-process-exit.js index 8e5e4b806bbbcb..2ff5fc6dc43f3e 100644 --- a/tests/node_compat/test/parallel/test-process-exit.js +++ b/tests/node_compat/test/parallel/test-process-exit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-kill-pid.js b/tests/node_compat/test/parallel/test-process-kill-pid.js index 12fb72421a2943..45036151122ef9 100644 --- a/tests/node_compat/test/parallel/test-process-kill-pid.js +++ b/tests/node_compat/test/parallel/test-process-kill-pid.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-uptime.js b/tests/node_compat/test/parallel/test-process-uptime.js index 31cbcf26c99800..f93ad3d914d450 100644 --- a/tests/node_compat/test/parallel/test-process-uptime.js +++ b/tests/node_compat/test/parallel/test-process-uptime.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-promise-unhandled-silent.js b/tests/node_compat/test/parallel/test-promise-unhandled-silent.js index 2e265db368dd06..fc953ba33b86bd 100644 --- a/tests/node_compat/test/parallel/test-promise-unhandled-silent.js +++ b/tests/node_compat/test/parallel/test-promise-unhandled-silent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --unhandled-rejections=none diff --git a/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js b/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js index 3f039f93f173a7..b64e5f669bd1e6 100644 --- a/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js +++ b/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --unhandled-rejections=throw diff --git a/tests/node_compat/test/parallel/test-punycode.js b/tests/node_compat/test/parallel/test-punycode.js index d08a6f1497c911..10aabaa2761589 100644 --- a/tests/node_compat/test/parallel/test-punycode.js +++ b/tests/node_compat/test/parallel/test-punycode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --pending-deprecation diff --git a/tests/node_compat/test/parallel/test-querystring-escape.js b/tests/node_compat/test/parallel/test-querystring-escape.js index 206290b476fb3b..bd23596e3d961a 100644 --- a/tests/node_compat/test/parallel/test-querystring-escape.js +++ b/tests/node_compat/test/parallel/test-querystring-escape.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js b/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js index 3fb0815be37000..b58be5d340614d 100644 --- a/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js +++ b/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-querystring-multichar-separator.js b/tests/node_compat/test/parallel/test-querystring-multichar-separator.js index 79ea8dce6b915a..0626803e19be36 100644 --- a/tests/node_compat/test/parallel/test-querystring-multichar-separator.js +++ b/tests/node_compat/test/parallel/test-querystring-multichar-separator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js b/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js index 8f346be18dea49..ccb10af70d1f02 100644 --- a/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js +++ b/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js b/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js index 284913b374ab53..69a9ded7c3b234 100644 --- a/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js +++ b/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-keys.js b/tests/node_compat/test/parallel/test-readline-keys.js index 4487e8d711ae03..fc7feb735f00b1 100644 --- a/tests/node_compat/test/parallel/test-readline-keys.js +++ b/tests/node_compat/test/parallel/test-readline-keys.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-position.js b/tests/node_compat/test/parallel/test-readline-position.js index acc5cf92023a0c..e43851997df309 100644 --- a/tests/node_compat/test/parallel/test-readline-position.js +++ b/tests/node_compat/test/parallel/test-readline-position.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-readline-reopen.js b/tests/node_compat/test/parallel/test-readline-reopen.js index b8a9afe859e9da..a193c1eb811764 100644 --- a/tests/node_compat/test/parallel/test-readline-reopen.js +++ b/tests/node_compat/test/parallel/test-readline-reopen.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-set-raw-mode.js b/tests/node_compat/test/parallel/test-readline-set-raw-mode.js index 5cf7c68f24fb32..7d31896e26c644 100644 --- a/tests/node_compat/test/parallel/test-readline-set-raw-mode.js +++ b/tests/node_compat/test/parallel/test-readline-set-raw-mode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-readline-undefined-columns.js b/tests/node_compat/test/parallel/test-readline-undefined-columns.js index 5946bf7cbe7936..8de1ce3388e8ac 100644 --- a/tests/node_compat/test/parallel/test-readline-undefined-columns.js +++ b/tests/node_compat/test/parallel/test-readline-undefined-columns.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline.js b/tests/node_compat/test/parallel/test-readline.js index 91be36bc615147..fb2388247a38b3 100644 --- a/tests/node_compat/test/parallel/test-readline.js +++ b/tests/node_compat/test/parallel/test-readline.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-add-abort-signal.js b/tests/node_compat/test/parallel/test-stream-add-abort-signal.js index 684ccff205daa5..1db215a43db4ce 100644 --- a/tests/node_compat/test/parallel/test-stream-add-abort-signal.js +++ b/tests/node_compat/test/parallel/test-stream-add-abort-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-stream-aliases-legacy.js b/tests/node_compat/test/parallel/test-stream-aliases-legacy.js index a62f1f9de6ed77..af966a80c67e0a 100644 --- a/tests/node_compat/test/parallel/test-stream-aliases-legacy.js +++ b/tests/node_compat/test/parallel/test-stream-aliases-legacy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-auto-destroy.js b/tests/node_compat/test/parallel/test-stream-auto-destroy.js index 651c7e2e5d1f92..f036a6e419acff 100644 --- a/tests/node_compat/test/parallel/test-stream-auto-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-auto-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js b/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js index 597cca87857dfe..1d00048c0ec086 100644 --- a/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js +++ b/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-backpressure.js b/tests/node_compat/test/parallel/test-stream-backpressure.js index 6bf0c33612d15a..c88c5228caa2e4 100644 --- a/tests/node_compat/test/parallel/test-stream-backpressure.js +++ b/tests/node_compat/test/parallel/test-stream-backpressure.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-big-packet.js b/tests/node_compat/test/parallel/test-stream-big-packet.js index 2708d99f286305..0db08f7e0cdbda 100644 --- a/tests/node_compat/test/parallel/test-stream-big-packet.js +++ b/tests/node_compat/test/parallel/test-stream-big-packet.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-big-push.js b/tests/node_compat/test/parallel/test-stream-big-push.js index 2f6e646cc3d74b..0ccdbc32d53fd1 100644 --- a/tests/node_compat/test/parallel/test-stream-big-push.js +++ b/tests/node_compat/test/parallel/test-stream-big-push.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-construct.js b/tests/node_compat/test/parallel/test-stream-construct.js index be0f605cd511f1..33a14966626fb8 100644 --- a/tests/node_compat/test/parallel/test-stream-construct.js +++ b/tests/node_compat/test/parallel/test-stream-construct.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-destroy-event-order.js b/tests/node_compat/test/parallel/test-stream-destroy-event-order.js index e974cebc7449ee..83963a9add5493 100644 --- a/tests/node_compat/test/parallel/test-stream-destroy-event-order.js +++ b/tests/node_compat/test/parallel/test-stream-destroy-event-order.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-destroy.js b/tests/node_compat/test/parallel/test-stream-duplex-destroy.js index fbc9b6b0e5de47..9116dfb412b87f 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-end.js b/tests/node_compat/test/parallel/test-stream-duplex-end.js index cf5523c51b77cc..c661b9cbd20aaa 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-end.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-props.js b/tests/node_compat/test/parallel/test-stream-duplex-props.js index d12f8fc8276a2c..402c9bfd1f1421 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-props.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-props.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js b/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js index 08d831d7f243d2..b091571788f06c 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js b/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js index dc542a47bd28d9..49b1e7c05256ed 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex.js b/tests/node_compat/test/parallel/test-stream-duplex.js index 18013ec3a0e37d..a83ddf50409d0e 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex.js +++ b/tests/node_compat/test/parallel/test-stream-duplex.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-end-paused.js b/tests/node_compat/test/parallel/test-stream-end-paused.js index dd71ee4762fdbf..7e316bff64a8e8 100644 --- a/tests/node_compat/test/parallel/test-stream-end-paused.js +++ b/tests/node_compat/test/parallel/test-stream-end-paused.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-error-once.js b/tests/node_compat/test/parallel/test-stream-error-once.js index fd36e573fc92c2..60a5cdd4e44aef 100644 --- a/tests/node_compat/test/parallel/test-stream-error-once.js +++ b/tests/node_compat/test/parallel/test-stream-error-once.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-events-prepend.js b/tests/node_compat/test/parallel/test-stream-events-prepend.js index 1ed5563bed5b8a..81de84a26be174 100644 --- a/tests/node_compat/test/parallel/test-stream-events-prepend.js +++ b/tests/node_compat/test/parallel/test-stream-events-prepend.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-inheritance.js b/tests/node_compat/test/parallel/test-stream-inheritance.js index ca5d9cbe1b773e..f055bb70f2469f 100644 --- a/tests/node_compat/test/parallel/test-stream-inheritance.js +++ b/tests/node_compat/test/parallel/test-stream-inheritance.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-ispaused.js b/tests/node_compat/test/parallel/test-stream-ispaused.js index 796b0d2a82252e..852cd87535a459 100644 --- a/tests/node_compat/test/parallel/test-stream-ispaused.js +++ b/tests/node_compat/test/parallel/test-stream-ispaused.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js b/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js index 6cc8cbb7003ea5..6d11c60553e3e8 100644 --- a/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js +++ b/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js b/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js index e36c77aad0689d..a02a9eb059c9b6 100644 --- a/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js +++ b/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-after-end.js b/tests/node_compat/test/parallel/test-stream-pipe-after-end.js index 680c1d0f9784be..6e71ac79924380 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-after-end.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-after-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js index 9c9b188fb0ccb4..d6fe4d534a7020 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js index 32af6c517104b9..00337d32ff31d0 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js b/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js index 75a92e91ca650b..d54955829b0f0f 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js b/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js index a69b3e5be781c4..ce750bd01dcca5 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js b/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js index 908045305b8757..986871125bc318 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js b/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js index 0ef417e875fb46..448cfed936b2f8 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-event.js b/tests/node_compat/test/parallel/test-stream-pipe-event.js index 9b90d89efa43e0..f49a6b0ab0a3f8 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-event.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js b/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js index 9115e79756bcf5..f3cf7b7e83ca71 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-flow.js b/tests/node_compat/test/parallel/test-stream-pipe-flow.js index d7f516bf855d63..6d5ddc44a51bf8 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-flow.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-flow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js b/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js index 8ea889f1fe2f23..13cf6bc9c71520 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js b/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js index 7796eaef141bd5..d9c8a239dc5595 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js b/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js index 9e943844427f41..506b4c727ff681 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js b/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js index 251ae2bbbe482d..f6cf12c952816e 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js b/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js index a69b5877e90579..caba6406963075 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js b/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js index 40cc094394acce..94bccd59f5b4ac 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js b/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js index 963bc07685111f..751c003b661c64 100644 --- a/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js +++ b/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js b/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js index 7060d7da9030d8..305c9f008b08e5 100644 --- a/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js b/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js index a85e12a7f29987..d372c4ffa2a865 100644 --- a/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js +++ b/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-push-strings.js b/tests/node_compat/test/parallel/test-stream-push-strings.js index 2720b6b9ef08a7..d98daadbd852ef 100644 --- a/tests/node_compat/test/parallel/test-stream-push-strings.js +++ b/tests/node_compat/test/parallel/test-stream-push-strings.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-readable-aborted.js b/tests/node_compat/test/parallel/test-stream-readable-aborted.js index e7664df4d53a64..3f43426c613ab1 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-aborted.js +++ b/tests/node_compat/test/parallel/test-stream-readable-aborted.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js b/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js index 9358f33b75754c..5ae8f204692167 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js +++ b/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js b/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js index 3c4e229e52483a..89bff31ce4dec5 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js +++ b/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-data.js b/tests/node_compat/test/parallel/test-stream-readable-data.js index aadf7efd68225e..391ded40d8615c 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-data.js +++ b/tests/node_compat/test/parallel/test-stream-readable-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-destroy.js b/tests/node_compat/test/parallel/test-stream-readable-destroy.js index 75cec92dc3f9c3..ed0de9f85533dc 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-readable-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-didRead.js b/tests/node_compat/test/parallel/test-stream-readable-didRead.js index ca2a09275affc5..17a6c683fbfc05 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-didRead.js +++ b/tests/node_compat/test/parallel/test-stream-readable-didRead.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js b/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js index a0612cacf8abd7..4cb363fe8f3639 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js +++ b/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js b/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js index 24a6d96a42d1fe..5df4ceb8b47a38 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js b/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js index 655fd145b6ba44..900f457c0cfbc9 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js +++ b/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-ended.js b/tests/node_compat/test/parallel/test-stream-readable-ended.js index aaf06aacc8e3ff..26c113d1e1bd8d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-ended.js +++ b/tests/node_compat/test/parallel/test-stream-readable-ended.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-error-end.js b/tests/node_compat/test/parallel/test-stream-readable-error-end.js index 282b4e90083243..2a56a35af4882a 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-error-end.js +++ b/tests/node_compat/test/parallel/test-stream-readable-error-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-event.js b/tests/node_compat/test/parallel/test-stream-readable-event.js index 394a42ffb8eb15..11ff7e51f01bcb 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-event.js +++ b/tests/node_compat/test/parallel/test-stream-readable-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js b/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js index 34806a2e3b5d56..cebc1af3abfe5b 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js +++ b/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js index 21f7cdb26fa675..641ed53e0c0535 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js +++ b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js index 05ac0c71ec1a06..1e4d48cd059844 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js +++ b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js b/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js index 94a0657ead9ff3..c16ce1e95d9f1d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js +++ b/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js b/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js index 7e235e0589d97e..2fab34f49aeb07 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js +++ b/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js b/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js index e9a9042fb15597..225587e8c1d12d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js +++ b/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-needReadable.js b/tests/node_compat/test/parallel/test-stream-readable-needReadable.js index 404eb95cd68ab6..1d82a50520be9d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-needReadable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-needReadable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js b/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js index be2edd9d6087a3..da026d98921864 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js +++ b/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js b/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js index 863bfff30a86d8..f6f7ef292efe45 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js b/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js index ce153c82294c2e..ba4d932946d8b9 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js +++ b/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js b/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js index 9be474f4eec368..1e6cf4410e2a84 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js +++ b/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js b/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js index 9fea6d2f60ab12..3626f31bdd66fd 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js +++ b/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-readable.js b/tests/node_compat/test/parallel/test-stream-readable-readable.js index ffa722ba256446..6e052754317fb2 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-readable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-readable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js b/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js index 6d12519bfc2853..cf8afaf327129b 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js +++ b/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js b/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js index ed4aca0d99b199..20735923620f11 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js +++ b/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js b/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js index 0163becb8b8c77..2615b662c20f36 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js +++ b/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js index 79b087dc32095e..2e936cf8baa580 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js +++ b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js index f4877aa4becbea..590714c8cb974a 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js +++ b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-unshift.js b/tests/node_compat/test/parallel/test-stream-readable-unshift.js index 6904c1a581c24c..e7678eea4a7eae 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-unshift.js +++ b/tests/node_compat/test/parallel/test-stream-readable-unshift.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js b/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js index df45129d0d1078..24ae96af8e6989 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js +++ b/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readableListening-state.js b/tests/node_compat/test/parallel/test-stream-readableListening-state.js index f53fdee488d0ac..9554387c43e524 100644 --- a/tests/node_compat/test/parallel/test-stream-readableListening-state.js +++ b/tests/node_compat/test/parallel/test-stream-readableListening-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js b/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js index 57702ef77f2189..47a48c8322b894 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js +++ b/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js b/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js index c0e4f27dc6b261..6c47b2445295c0 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js +++ b/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-destroy.js b/tests/node_compat/test/parallel/test-stream-transform-destroy.js index a489da81e872a9..0d29b98ce2421f 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-transform-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-final-sync.js b/tests/node_compat/test/parallel/test-stream-transform-final-sync.js index 09294b362dcc9f..5ff0e2177c118a 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-final-sync.js +++ b/tests/node_compat/test/parallel/test-stream-transform-final-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-final.js b/tests/node_compat/test/parallel/test-stream-transform-final.js index 2140363d842162..e2f01188fd22ae 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-final.js +++ b/tests/node_compat/test/parallel/test-stream-transform-final.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-flush-data.js b/tests/node_compat/test/parallel/test-stream-transform-flush-data.js index 5eecaf645dc3e5..33c77475472d2c 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-flush-data.js +++ b/tests/node_compat/test/parallel/test-stream-transform-flush-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js b/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js index 5481f70e99df6f..571fa74d18e996 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js +++ b/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js b/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js index dddae4aa2916ce..a4117cc9139a07 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js +++ b/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js b/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js index f3400488a1aef4..66d302371d53b4 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js +++ b/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-uint8array.js b/tests/node_compat/test/parallel/test-stream-uint8array.js index aa8dbd3d821be7..8820b4f79c885f 100644 --- a/tests/node_compat/test/parallel/test-stream-uint8array.js +++ b/tests/node_compat/test/parallel/test-stream-uint8array.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-unpipe-event.js b/tests/node_compat/test/parallel/test-stream-unpipe-event.js index 0f7bcdb69d6e94..31cedc514cf3f4 100644 --- a/tests/node_compat/test/parallel/test-stream-unpipe-event.js +++ b/tests/node_compat/test/parallel/test-stream-unpipe-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js b/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js index 0e8337f4c3828e..e9d8ab81a6c904 100644 --- a/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js +++ b/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-unshift-read-race.js b/tests/node_compat/test/parallel/test-stream-unshift-read-race.js index 6f400a321ae657..771e3f98acbd80 100644 --- a/tests/node_compat/test/parallel/test-stream-unshift-read-race.js +++ b/tests/node_compat/test/parallel/test-stream-unshift-read-race.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-writable-aborted.js b/tests/node_compat/test/parallel/test-stream-writable-aborted.js index 89dbcc4ee2fb2d..55daa9f213db17 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-aborted.js +++ b/tests/node_compat/test/parallel/test-stream-writable-aborted.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js b/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js index 355cb4d6d90aec..555e1924dcff47 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js +++ b/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js b/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js index 58e0ae5dff8eee..3d80c8723463e8 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js +++ b/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js b/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js index ca9e1a1d293c38..c1dda3adc5fd9e 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js +++ b/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js b/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js index d6c77c9a7002cb..d488408262ac94 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js +++ b/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-writable-destroy.js b/tests/node_compat/test/parallel/test-stream-writable-destroy.js index ac47bb5bc7157a..6684a581ac0faf 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-writable-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js b/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js index ecb597f159998b..3d15d8700d4dc1 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js b/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js index edce899e3afba5..999f1402daea05 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js +++ b/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-ended-state.js b/tests/node_compat/test/parallel/test-stream-writable-ended-state.js index 57c578037c779d..369fb9b16d8e03 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-ended-state.js +++ b/tests/node_compat/test/parallel/test-stream-writable-ended-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-final-async.js b/tests/node_compat/test/parallel/test-stream-writable-final-async.js index c8fe2057b591d1..139471f980402e 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-final-async.js +++ b/tests/node_compat/test/parallel/test-stream-writable-final-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js b/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js index 958a36bfdf64ea..30868200f104e4 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-final-throw.js b/tests/node_compat/test/parallel/test-stream-writable-final-throw.js index ba7f87b238d17f..f0ec090b779087 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-final-throw.js +++ b/tests/node_compat/test/parallel/test-stream-writable-final-throw.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js b/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js index 1f5617a34f388a..8ce5d29a9cff08 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js +++ b/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-finished-state.js b/tests/node_compat/test/parallel/test-stream-writable-finished-state.js index 23f84187b91e56..b46b760e8b0e20 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-finished-state.js +++ b/tests/node_compat/test/parallel/test-stream-writable-finished-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-finished.js b/tests/node_compat/test/parallel/test-stream-writable-finished.js index 61c363b7e61f2a..07b54233b82868 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-finished.js +++ b/tests/node_compat/test/parallel/test-stream-writable-finished.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js b/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js index 68760d2c761f4c..b9e90c33784c2c 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js +++ b/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js b/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js index 31c3ba79e7f5ae..b456de29531d2f 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js +++ b/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-null.js b/tests/node_compat/test/parallel/test-stream-writable-null.js index 467efc005c6aab..57f2188c1e7255 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-null.js +++ b/tests/node_compat/test/parallel/test-stream-writable-null.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-properties.js b/tests/node_compat/test/parallel/test-stream-writable-properties.js index 28a7c2f71d44b0..b7283383a1b2fd 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-properties.js +++ b/tests/node_compat/test/parallel/test-stream-writable-properties.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-writable.js b/tests/node_compat/test/parallel/test-stream-writable-writable.js index 0729e6a381a6b1..274e6872a04937 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-writable.js +++ b/tests/node_compat/test/parallel/test-stream-writable-writable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js b/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js index cb68a6ee33de34..c4efbd2ddbd385 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js b/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js index 696532c2ff85e4..f862ecf0eacbe2 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-error.js b/tests/node_compat/test/parallel/test-stream-writable-write-error.js index a98d9ff8afb660..2013a68fab84d1 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js b/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js index 3370040e5ec7e4..d32dfae6ed5b85 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writableState-ending.js b/tests/node_compat/test/parallel/test-stream-writableState-ending.js index 6533f0b83112c7..ebb1146ce2d60d 100644 --- a/tests/node_compat/test/parallel/test-stream-writableState-ending.js +++ b/tests/node_compat/test/parallel/test-stream-writableState-ending.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js b/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js index fe505ccf78df86..f0a246ac134922 100644 --- a/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js +++ b/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-write-destroy.js b/tests/node_compat/test/parallel/test-stream-write-destroy.js index 6cd1fb49d5ec1c..ee03edb483d68e 100644 --- a/tests/node_compat/test/parallel/test-stream-write-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-write-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-write-drain.js b/tests/node_compat/test/parallel/test-stream-write-drain.js index ae1494fa17ba97..c23f33e188221e 100644 --- a/tests/node_compat/test/parallel/test-stream-write-drain.js +++ b/tests/node_compat/test/parallel/test-stream-write-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-write-final.js b/tests/node_compat/test/parallel/test-stream-write-final.js index b5b1b7a222ec97..2466da0f9943c9 100644 --- a/tests/node_compat/test/parallel/test-stream-write-final.js +++ b/tests/node_compat/test/parallel/test-stream-write-final.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writev.js b/tests/node_compat/test/parallel/test-stream-writev.js index f012515c8c26bb..db6031897b368c 100644 --- a/tests/node_compat/test/parallel/test-stream-writev.js +++ b/tests/node_compat/test/parallel/test-stream-writev.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js b/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js index 8c9f17600a6624..d59d56ec2a9268 100644 --- a/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-basic.js b/tests/node_compat/test/parallel/test-stream2-basic.js index 04eecd18eb8020..07942ca300d043 100644 --- a/tests/node_compat/test/parallel/test-stream2-basic.js +++ b/tests/node_compat/test/parallel/test-stream2-basic.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-compatibility.js b/tests/node_compat/test/parallel/test-stream2-compatibility.js index 3f5293a808565b..4b3eb67e79c94b 100644 --- a/tests/node_compat/test/parallel/test-stream2-compatibility.js +++ b/tests/node_compat/test/parallel/test-stream2-compatibility.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-decode-partial.js b/tests/node_compat/test/parallel/test-stream2-decode-partial.js index 8566e8cce67421..9143ea73c3fc71 100644 --- a/tests/node_compat/test/parallel/test-stream2-decode-partial.js +++ b/tests/node_compat/test/parallel/test-stream2-decode-partial.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream2-finish-pipe.js b/tests/node_compat/test/parallel/test-stream2-finish-pipe.js index 2cd70c62e1958c..22f17a43558dc9 100644 --- a/tests/node_compat/test/parallel/test-stream2-finish-pipe.js +++ b/tests/node_compat/test/parallel/test-stream2-finish-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-large-read-stall.js b/tests/node_compat/test/parallel/test-stream2-large-read-stall.js index 37f2f68ec79f25..aeefcf21a292fe 100644 --- a/tests/node_compat/test/parallel/test-stream2-large-read-stall.js +++ b/tests/node_compat/test/parallel/test-stream2-large-read-stall.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-objects.js b/tests/node_compat/test/parallel/test-stream2-objects.js index f6bc8b829546a1..68340e0e54ed4c 100644 --- a/tests/node_compat/test/parallel/test-stream2-objects.js +++ b/tests/node_compat/test/parallel/test-stream2-objects.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js b/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js index 18e9864c0b3e90..1591f6f4e900bd 100644 --- a/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js +++ b/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js b/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js index 62fafc5b97023f..b9d67cd75ec1fa 100644 --- a/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js +++ b/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-push.js b/tests/node_compat/test/parallel/test-stream2-push.js index 4d49d62776beea..4cb54a01fd0715 100644 --- a/tests/node_compat/test/parallel/test-stream2-push.js +++ b/tests/node_compat/test/parallel/test-stream2-push.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js b/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js index a5d6eb82cabdcd..0aa654c70d7f55 100644 --- a/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js +++ b/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 772f525555d607..806f958d8e01d5 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js b/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js index 43a1b6616e4dc4..8c3de539880ec1 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js b/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js index 0446be665c6094..be14a8983a3d95 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js index 08973898d63a08..6c24765e0d764f 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js index 6bf52923c07f76..eeb2d79ac42102 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js index ad11369f08e57c..56d80b54a6b020 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap.js index 65851afb6cde7d..07e4569eb54c54 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-set-encoding.js b/tests/node_compat/test/parallel/test-stream2-set-encoding.js index 9f07d52e6d810e..3304f0ec47ecd5 100644 --- a/tests/node_compat/test/parallel/test-stream2-set-encoding.js +++ b/tests/node_compat/test/parallel/test-stream2-set-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-transform.js b/tests/node_compat/test/parallel/test-stream2-transform.js index 4547f9c8f29122..ebca5d33f31ace 100644 --- a/tests/node_compat/test/parallel/test-stream2-transform.js +++ b/tests/node_compat/test/parallel/test-stream2-transform.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js b/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js index be3023efb3df64..2e7eb2713fd573 100644 --- a/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js +++ b/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js b/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js index a6742f999d3d8e..d9b42ad9a86026 100644 --- a/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js +++ b/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-writable.js b/tests/node_compat/test/parallel/test-stream2-writable.js index 4f5ba53fce5f3d..0145257a33de24 100644 --- a/tests/node_compat/test/parallel/test-stream2-writable.js +++ b/tests/node_compat/test/parallel/test-stream2-writable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream3-cork-end.js b/tests/node_compat/test/parallel/test-stream3-cork-end.js index 0ae661953ace91..5453a56169e4ac 100644 --- a/tests/node_compat/test/parallel/test-stream3-cork-end.js +++ b/tests/node_compat/test/parallel/test-stream3-cork-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream3-cork-uncork.js b/tests/node_compat/test/parallel/test-stream3-cork-uncork.js index fbb50d6aa2978c..4b0ae805354a37 100644 --- a/tests/node_compat/test/parallel/test-stream3-cork-uncork.js +++ b/tests/node_compat/test/parallel/test-stream3-cork-uncork.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream3-pause-then-read.js b/tests/node_compat/test/parallel/test-stream3-pause-then-read.js index 0c22e81f8e5626..2a3bdf4bf0d76e 100644 --- a/tests/node_compat/test/parallel/test-stream3-pause-then-read.js +++ b/tests/node_compat/test/parallel/test-stream3-pause-then-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-streams-highwatermark.js b/tests/node_compat/test/parallel/test-streams-highwatermark.js index 3498e4296b7fed..451311c2c53475 100644 --- a/tests/node_compat/test/parallel/test-streams-highwatermark.js +++ b/tests/node_compat/test/parallel/test-streams-highwatermark.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-string-decoder.js b/tests/node_compat/test/parallel/test-string-decoder.js index 779e5fc1e1e679..ee7b40d855065c 100644 --- a/tests/node_compat/test/parallel/test-string-decoder.js +++ b/tests/node_compat/test/parallel/test-string-decoder.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-timers-api-refs.js b/tests/node_compat/test/parallel/test-timers-api-refs.js index ac5bad9bdf0d69..ccbe58eafa216f 100644 --- a/tests/node_compat/test/parallel/test-timers-api-refs.js +++ b/tests/node_compat/test/parallel/test-timers-api-refs.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-args.js b/tests/node_compat/test/parallel/test-timers-args.js index a7f25609bbf706..c987830e22fe85 100644 --- a/tests/node_compat/test/parallel/test-timers-args.js +++ b/tests/node_compat/test/parallel/test-timers-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js b/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js index 01ef84df38eecb..102f04a1e6e238 100644 --- a/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js +++ b/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js b/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js index 73cd918f16ce48..89a3cc696e2fb3 100644 --- a/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js +++ b/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js b/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js index c4d1e3fd8337a3..4de5b8a2187c68 100644 --- a/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js +++ b/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clearImmediate.js b/tests/node_compat/test/parallel/test-timers-clearImmediate.js index 8460d73c9dde37..60dfeba4b93d5c 100644 --- a/tests/node_compat/test/parallel/test-timers-clearImmediate.js +++ b/tests/node_compat/test/parallel/test-timers-clearImmediate.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-interval-throw.js b/tests/node_compat/test/parallel/test-timers-interval-throw.js index 5ad1156773b60d..1411e10155f578 100644 --- a/tests/node_compat/test/parallel/test-timers-interval-throw.js +++ b/tests/node_compat/test/parallel/test-timers-interval-throw.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-non-integer-delay.js b/tests/node_compat/test/parallel/test-timers-non-integer-delay.js index b9371d81b860ba..8cc292a98d26d7 100644 --- a/tests/node_compat/test/parallel/test-timers-non-integer-delay.js +++ b/tests/node_compat/test/parallel/test-timers-non-integer-delay.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-timers-refresh.js b/tests/node_compat/test/parallel/test-timers-refresh.js index 80e78b56a5517a..8a5d95a4e6be3b 100644 --- a/tests/node_compat/test/parallel/test-timers-refresh.js +++ b/tests/node_compat/test/parallel/test-timers-refresh.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js b/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js index c8b0021e3ce5e2..358f4a38f829d7 100644 --- a/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js +++ b/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js b/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js index 585b750b3a073f..3bce7f9d213625 100644 --- a/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js +++ b/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-uncaught-exception.js b/tests/node_compat/test/parallel/test-timers-uncaught-exception.js index 954d776d073b6e..9b3567ab71c092 100644 --- a/tests/node_compat/test/parallel/test-timers-uncaught-exception.js +++ b/tests/node_compat/test/parallel/test-timers-uncaught-exception.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js b/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js index 4b593a9d433c1a..2c98a13eb1bef6 100644 --- a/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js +++ b/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-user-call.js b/tests/node_compat/test/parallel/test-timers-user-call.js index 673a0c6f2c2228..f8d70d7e368592 100644 --- a/tests/node_compat/test/parallel/test-timers-user-call.js +++ b/tests/node_compat/test/parallel/test-timers-user-call.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Make sure `setTimeout()` and friends don't throw if the user-supplied diff --git a/tests/node_compat/test/parallel/test-timers-zero-timeout.js b/tests/node_compat/test/parallel/test-timers-zero-timeout.js index aeaf476ec4c0e5..9eadfb78bdfd40 100644 --- a/tests/node_compat/test/parallel/test-timers-zero-timeout.js +++ b/tests/node_compat/test/parallel/test-timers-zero-timeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-tty-stdin-end.js b/tests/node_compat/test/parallel/test-tty-stdin-end.js index 05054d052f6f2d..6ac9b8cb9889d7 100644 --- a/tests/node_compat/test/parallel/test-tty-stdin-end.js +++ b/tests/node_compat/test/parallel/test-tty-stdin-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js b/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js index 39f3a0b4360e70..5bb1761683e9bb 100644 --- a/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js +++ b/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-fileurltopath.js b/tests/node_compat/test/parallel/test-url-fileurltopath.js index ddebca69216a28..a590fb349b84a5 100644 --- a/tests/node_compat/test/parallel/test-url-fileurltopath.js +++ b/tests/node_compat/test/parallel/test-url-fileurltopath.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-format-invalid-input.js b/tests/node_compat/test/parallel/test-url-format-invalid-input.js index 4ea48d0a817472..2a4db69c7ded5a 100644 --- a/tests/node_compat/test/parallel/test-url-format-invalid-input.js +++ b/tests/node_compat/test/parallel/test-url-format-invalid-input.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-format-whatwg.js b/tests/node_compat/test/parallel/test-url-format-whatwg.js index ff8f1201cffe64..77101ed96b9d47 100644 --- a/tests/node_compat/test/parallel/test-url-format-whatwg.js +++ b/tests/node_compat/test/parallel/test-url-format-whatwg.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-format.js b/tests/node_compat/test/parallel/test-url-format.js index 3162213b8ae11f..fb495328dba1eb 100644 --- a/tests/node_compat/test/parallel/test-url-format.js +++ b/tests/node_compat/test/parallel/test-url-format.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-parse-query.js b/tests/node_compat/test/parallel/test-url-parse-query.js index 6f6c425bb6bf1e..da37e9c4e2eab8 100644 --- a/tests/node_compat/test/parallel/test-url-parse-query.js +++ b/tests/node_compat/test/parallel/test-url-parse-query.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-pathtofileurl.js b/tests/node_compat/test/parallel/test-url-pathtofileurl.js index d0f2f4b97e301b..e862c0c9df96f4 100644 --- a/tests/node_compat/test/parallel/test-url-pathtofileurl.js +++ b/tests/node_compat/test/parallel/test-url-pathtofileurl.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-relative.js b/tests/node_compat/test/parallel/test-url-relative.js index 3b8524c2d08375..15228095444bf4 100644 --- a/tests/node_compat/test/parallel/test-url-relative.js +++ b/tests/node_compat/test/parallel/test-url-relative.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js b/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js index 96d9425c53fa7c..9bf5d197e94fff 100644 --- a/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js +++ b/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-deprecate.js b/tests/node_compat/test/parallel/test-util-deprecate.js index 0a0edd86e47b35..e69fc3364c2b5e 100644 --- a/tests/node_compat/test/parallel/test-util-deprecate.js +++ b/tests/node_compat/test/parallel/test-util-deprecate.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-inherits.js b/tests/node_compat/test/parallel/test-util-inherits.js index 3e948619bbd928..7a2a96982d27fb 100644 --- a/tests/node_compat/test/parallel/test-util-inherits.js +++ b/tests/node_compat/test/parallel/test-util-inherits.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-inspect-long-running.js b/tests/node_compat/test/parallel/test-util-inspect-long-running.js index 2ddc5dc7ab9dd6..645aaada73f018 100644 --- a/tests/node_compat/test/parallel/test-util-inspect-long-running.js +++ b/tests/node_compat/test/parallel/test-util-inspect-long-running.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-types-exists.js b/tests/node_compat/test/parallel/test-util-types-exists.js index 77e7e7b37e8cfe..a58baf725e25ca 100644 --- a/tests/node_compat/test/parallel/test-util-types-exists.js +++ b/tests/node_compat/test/parallel/test-util-types-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-access-process-env.js b/tests/node_compat/test/parallel/test-vm-access-process-env.js index 95f555dac3e31a..d2589b3aa575c5 100644 --- a/tests/node_compat/test/parallel/test-vm-access-process-env.js +++ b/tests/node_compat/test/parallel/test-vm-access-process-env.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js b/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js index 940fd4e7fe4d65..ef2d21eb42edab 100644 --- a/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js +++ b/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-codegen.js b/tests/node_compat/test/parallel/test-vm-codegen.js index fff9c287f4b0ef..7d6fec813d1716 100644 --- a/tests/node_compat/test/parallel/test-vm-codegen.js +++ b/tests/node_compat/test/parallel/test-vm-codegen.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-context-async-script.js b/tests/node_compat/test/parallel/test-vm-context-async-script.js index 271567ccf1740f..9ba46ed890ad1d 100644 --- a/tests/node_compat/test/parallel/test-vm-context-async-script.js +++ b/tests/node_compat/test/parallel/test-vm-context-async-script.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js b/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js index f5073777182140..1ac2b029eb99cd 100644 --- a/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js +++ b/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js b/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js index 0674c0b7b8185f..21fdc0c676be8d 100644 --- a/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js +++ b/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-context-accessors.js b/tests/node_compat/test/parallel/test-vm-create-context-accessors.js index 4b683d687b0a60..bd79ec12dbf5b7 100644 --- a/tests/node_compat/test/parallel/test-vm-create-context-accessors.js +++ b/tests/node_compat/test/parallel/test-vm-create-context-accessors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-context-arg.js b/tests/node_compat/test/parallel/test-vm-create-context-arg.js index 6eb0f7cf9150c6..513584a1959101 100644 --- a/tests/node_compat/test/parallel/test-vm-create-context-arg.js +++ b/tests/node_compat/test/parallel/test-vm-create-context-arg.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js b/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js index 95056a3d96d8d6..501c728a77d089 100644 --- a/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js +++ b/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-createcacheddata.js b/tests/node_compat/test/parallel/test-vm-createcacheddata.js index 0e786364d3e715..77f5385977c70a 100644 --- a/tests/node_compat/test/parallel/test-vm-createcacheddata.js +++ b/tests/node_compat/test/parallel/test-vm-createcacheddata.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-cross-context.js b/tests/node_compat/test/parallel/test-vm-cross-context.js index 3a1f1678ec5f9e..3107be6a6174eb 100644 --- a/tests/node_compat/test/parallel/test-vm-cross-context.js +++ b/tests/node_compat/test/parallel/test-vm-cross-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-data-property-writable.js b/tests/node_compat/test/parallel/test-vm-data-property-writable.js index 1ce76480183af1..f18f1f65969239 100644 --- a/tests/node_compat/test/parallel/test-vm-data-property-writable.js +++ b/tests/node_compat/test/parallel/test-vm-data-property-writable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-deleting-property.js b/tests/node_compat/test/parallel/test-vm-deleting-property.js index df5ac859a74ceb..b01a7b05e1b3ab 100644 --- a/tests/node_compat/test/parallel/test-vm-deleting-property.js +++ b/tests/node_compat/test/parallel/test-vm-deleting-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-function-declaration.js b/tests/node_compat/test/parallel/test-vm-function-declaration.js index 209720c757e736..0bbe7589c57cad 100644 --- a/tests/node_compat/test/parallel/test-vm-function-declaration.js +++ b/tests/node_compat/test/parallel/test-vm-function-declaration.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-function-redefinition.js b/tests/node_compat/test/parallel/test-vm-function-redefinition.js index 7bc62ac0ede364..44ba8da11e6f55 100644 --- a/tests/node_compat/test/parallel/test-vm-function-redefinition.js +++ b/tests/node_compat/test/parallel/test-vm-function-redefinition.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-getters.js b/tests/node_compat/test/parallel/test-vm-getters.js index b9c28014ad494c..8a88abc9ae8910 100644 --- a/tests/node_compat/test/parallel/test-vm-getters.js +++ b/tests/node_compat/test/parallel/test-vm-getters.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-global-assignment.js b/tests/node_compat/test/parallel/test-vm-global-assignment.js index c8fc516d6591e2..1160dca1d78967 100644 --- a/tests/node_compat/test/parallel/test-vm-global-assignment.js +++ b/tests/node_compat/test/parallel/test-vm-global-assignment.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-global-define-property.js b/tests/node_compat/test/parallel/test-vm-global-define-property.js index 28f5070c27c19b..76ad6742e58770 100644 --- a/tests/node_compat/test/parallel/test-vm-global-define-property.js +++ b/tests/node_compat/test/parallel/test-vm-global-define-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-global-identity.js b/tests/node_compat/test/parallel/test-vm-global-identity.js index 5413ca94a2fd71..68780ca544250a 100644 --- a/tests/node_compat/test/parallel/test-vm-global-identity.js +++ b/tests/node_compat/test/parallel/test-vm-global-identity.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-global-setter.js b/tests/node_compat/test/parallel/test-vm-global-setter.js index 8f1f862f360cf5..4908ce82caf869 100644 --- a/tests/node_compat/test/parallel/test-vm-global-setter.js +++ b/tests/node_compat/test/parallel/test-vm-global-setter.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-harmony-symbols.js b/tests/node_compat/test/parallel/test-vm-harmony-symbols.js index d4713a2e2424c4..c597b1b49c7995 100644 --- a/tests/node_compat/test/parallel/test-vm-harmony-symbols.js +++ b/tests/node_compat/test/parallel/test-vm-harmony-symbols.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-indexed-properties.js b/tests/node_compat/test/parallel/test-vm-indexed-properties.js index 332905ff74ee3f..dda0aa90321e62 100644 --- a/tests/node_compat/test/parallel/test-vm-indexed-properties.js +++ b/tests/node_compat/test/parallel/test-vm-indexed-properties.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-inherited_properties.js b/tests/node_compat/test/parallel/test-vm-inherited_properties.js index 4994a8ceab2944..a2366bfef6303a 100644 --- a/tests/node_compat/test/parallel/test-vm-inherited_properties.js +++ b/tests/node_compat/test/parallel/test-vm-inherited_properties.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-is-context.js b/tests/node_compat/test/parallel/test-vm-is-context.js index fdbaa36d66b927..95217bc59762f2 100644 --- a/tests/node_compat/test/parallel/test-vm-is-context.js +++ b/tests/node_compat/test/parallel/test-vm-is-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-low-stack-space.js b/tests/node_compat/test/parallel/test-vm-low-stack-space.js index d1013772463e19..860bececc46358 100644 --- a/tests/node_compat/test/parallel/test-vm-low-stack-space.js +++ b/tests/node_compat/test/parallel/test-vm-low-stack-space.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-new-script-new-context.js b/tests/node_compat/test/parallel/test-vm-new-script-new-context.js index aada1626297204..b46f99b8f1b518 100644 --- a/tests/node_compat/test/parallel/test-vm-new-script-new-context.js +++ b/tests/node_compat/test/parallel/test-vm-new-script-new-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-new-script-this-context.js b/tests/node_compat/test/parallel/test-vm-new-script-this-context.js index 8774711f4be7ef..6f8247233ff8ee 100644 --- a/tests/node_compat/test/parallel/test-vm-new-script-this-context.js +++ b/tests/node_compat/test/parallel/test-vm-new-script-this-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-not-strict.js b/tests/node_compat/test/parallel/test-vm-not-strict.js index c5dee3a2c65084..725e00a9a6e2d5 100644 --- a/tests/node_compat/test/parallel/test-vm-not-strict.js +++ b/tests/node_compat/test/parallel/test-vm-not-strict.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. /* eslint-disable strict, no-var, no-delete-var, no-undef, node-core/required-modules, node-core/require-common-first */ diff --git a/tests/node_compat/test/parallel/test-vm-options-validation.js b/tests/node_compat/test/parallel/test-vm-options-validation.js index d1b215ed7024c2..430414379ecbd8 100644 --- a/tests/node_compat/test/parallel/test-vm-options-validation.js +++ b/tests/node_compat/test/parallel/test-vm-options-validation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js b/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js index e8cae690af6551..16a55508897d69 100644 --- a/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js +++ b/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --abort-on-uncaught-exception diff --git a/tests/node_compat/test/parallel/test-vm-preserves-property.js b/tests/node_compat/test/parallel/test-vm-preserves-property.js index 28f662a1a21f18..f415aa37d44423 100644 --- a/tests/node_compat/test/parallel/test-vm-preserves-property.js +++ b/tests/node_compat/test/parallel/test-vm-preserves-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js b/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js index 360a5dabf81375..8fe3a25843cfdc 100644 --- a/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js +++ b/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-proxies.js b/tests/node_compat/test/parallel/test-vm-proxies.js index c485e0a62aedeb..a7e86400511b26 100644 --- a/tests/node_compat/test/parallel/test-vm-proxies.js +++ b/tests/node_compat/test/parallel/test-vm-proxies.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js b/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js index 2f503bd312c039..850696f7a49132 100644 --- a/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js +++ b/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js b/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js index c1357308643d92..e64777c2928ed4 100644 --- a/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js +++ b/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-set-property-proxy.js b/tests/node_compat/test/parallel/test-vm-set-property-proxy.js index 61f80902c9ffdf..b1b0909a41c86e 100644 --- a/tests/node_compat/test/parallel/test-vm-set-property-proxy.js +++ b/tests/node_compat/test/parallel/test-vm-set-property-proxy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js b/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js index 77986466800d30..9b320678909c5a 100644 --- a/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js +++ b/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-source-map-url.js b/tests/node_compat/test/parallel/test-vm-source-map-url.js index fb91ff1fc5cf34..f8aafaf3e94ea0 100644 --- a/tests/node_compat/test/parallel/test-vm-source-map-url.js +++ b/tests/node_compat/test/parallel/test-vm-source-map-url.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-static-this.js b/tests/node_compat/test/parallel/test-vm-static-this.js index 58388ba94ea3ca..e99c6438cbbb55 100644 --- a/tests/node_compat/test/parallel/test-vm-static-this.js +++ b/tests/node_compat/test/parallel/test-vm-static-this.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-strict-mode.js b/tests/node_compat/test/parallel/test-vm-strict-mode.js index e759bd2c470cac..9d018216a6e72c 100644 --- a/tests/node_compat/test/parallel/test-vm-strict-mode.js +++ b/tests/node_compat/test/parallel/test-vm-strict-mode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-symbols.js b/tests/node_compat/test/parallel/test-vm-symbols.js index fbaff6a829b850..a4317f24a94523 100644 --- a/tests/node_compat/test/parallel/test-vm-symbols.js +++ b/tests/node_compat/test/parallel/test-vm-symbols.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js index 19ba0a68217c66..176284eee3824d 100644 --- a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js +++ b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js index c2393a852abb1c..0bf90936d960ca 100644 --- a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js +++ b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-timeout.js b/tests/node_compat/test/parallel/test-vm-timeout.js index d345206404e8df..d080dc8eedd7bc 100644 --- a/tests/node_compat/test/parallel/test-vm-timeout.js +++ b/tests/node_compat/test/parallel/test-vm-timeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js index f1ca3b0bf8a4b1..0e743648f7ce7a 100644 --- a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js +++ b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js index 39c3a6f9d4f0ca..0391378eda2b81 100644 --- a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js +++ b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js index 05a8988feca583..152d084c5a42a3 100644 --- a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js +++ b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js index 98a3c6c49d641d..f6a9eddf33fe58 100644 --- a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js +++ b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js index 74055b00e69cc5..93a332ab43abb1 100644 --- a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js +++ b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-events-customevent.js b/tests/node_compat/test/parallel/test-whatwg-events-customevent.js index 1b8584d9c95cdf..44c68a72a491cd 100644 --- a/tests/node_compat/test/parallel/test-whatwg-events-customevent.js +++ b/tests/node_compat/test/parallel/test-whatwg-events-customevent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js index 26fb76421d51db..2980f554af3eb7 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js index 265b0da9e6d13d..39d3cc002db2d8 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js index b23df5bf133c27..e2fbbca398c67c 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js index d8464ad2f92647..404d6d8bcf5003 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js b/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js index 79ce9002f76337..96a7dfe727c7ed 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js b/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js index 784f72b9bda5a1..f2a4a3242eb969 100644 --- a/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js +++ b/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js b/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js index 38f0d0d4fac398..986e7f1fb65c11 100644 --- a/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js +++ b/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-close-after-error.js b/tests/node_compat/test/parallel/test-zlib-close-after-error.js index e0a9e3822b33cc..845a34b39bc044 100644 --- a/tests/node_compat/test/parallel/test-zlib-close-after-error.js +++ b/tests/node_compat/test/parallel/test-zlib-close-after-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-close-after-write.js b/tests/node_compat/test/parallel/test-zlib-close-after-write.js index 82e08d0f918577..76abf5ac68520d 100644 --- a/tests/node_compat/test/parallel/test-zlib-close-after-write.js +++ b/tests/node_compat/test/parallel/test-zlib-close-after-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js b/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js index 87081f2757c6ad..6c884bb0010791 100644 --- a/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js +++ b/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js b/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js index 16c97e7d942b05..3877b887762abd 100644 --- a/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js +++ b/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-from-string.js b/tests/node_compat/test/parallel/test-zlib-from-string.js index f7dc413ed9f49e..42ccd0f0952dd6 100644 --- a/tests/node_compat/test/parallel/test-zlib-from-string.js +++ b/tests/node_compat/test/parallel/test-zlib-from-string.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-zlib-no-stream.js b/tests/node_compat/test/parallel/test-zlib-no-stream.js index aceaca5166e539..f26cd4b2408572 100644 --- a/tests/node_compat/test/parallel/test-zlib-no-stream.js +++ b/tests/node_compat/test/parallel/test-zlib-no-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. /* eslint-disable node-core/required-modules */ diff --git a/tests/node_compat/test/parallel/test-zlib-sync-no-event.js b/tests/node_compat/test/parallel/test-zlib-sync-no-event.js index dfd450a4080ce9..f0b7c998ceecf0 100644 --- a/tests/node_compat/test/parallel/test-zlib-sync-no-event.js +++ b/tests/node_compat/test/parallel/test-zlib-sync-no-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-truncated.js b/tests/node_compat/test/parallel/test-zlib-truncated.js index 184d9ddc5d7154..f73cfd187e0f69 100644 --- a/tests/node_compat/test/parallel/test-zlib-truncated.js +++ b/tests/node_compat/test/parallel/test-zlib-truncated.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js b/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js index e5fd62d03825c7..4b295537a25ef4 100644 --- a/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js +++ b/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-write-after-end.js b/tests/node_compat/test/parallel/test-zlib-write-after-end.js index c8c302c22042b4..452fa99c324191 100644 --- a/tests/node_compat/test/parallel/test-zlib-write-after-end.js +++ b/tests/node_compat/test/parallel/test-zlib-write-after-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/console-dumb-tty.js b/tests/node_compat/test/pseudo-tty/console-dumb-tty.js index a9ea5181123643..9039851e626623 100644 --- a/tests/node_compat/test/pseudo-tty/console-dumb-tty.js +++ b/tests/node_compat/test/pseudo-tty/console-dumb-tty.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/console_colors.js b/tests/node_compat/test/pseudo-tty/console_colors.js index 5680a7ef2f0139..c5a6d61ede7d31 100644 --- a/tests/node_compat/test/pseudo-tty/console_colors.js +++ b/tests/node_compat/test/pseudo-tty/console_colors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js b/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js index b852083d706732..c8ee979aa69cc7 100644 --- a/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js +++ b/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // https://github.com/nodejs/node/issues/6456#issuecomment-219320599 diff --git a/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js b/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js index 1a573c769715e2..4dd80de3dce499 100644 --- a/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js +++ b/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // https://github.com/nodejs/node/issues/6456#issuecomment-219320599 diff --git a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js index bcb2ba80b85554..f90fc6b4a17a3b 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js index 3e4f06d054d772..cccaa2b6a9e7e4 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js b/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js index 05054d052f6f2d..6ac9b8cb9889d7 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js b/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js index 7adba81be28737..9b3db4eab63d8c 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; From 4365f8d9990fa6c6d8b7d8e5499e352e30e42c26 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 25 Nov 2024 09:37:48 -0500 Subject: [PATCH 397/436] fix(compile): handle TypeScript file included as asset (#27032) Closes #27024 --- cli/standalone/binary.rs | 6 +- cli/standalone/file_system.rs | 4 +- cli/standalone/mod.rs | 17 ++- cli/standalone/virtual_fs.rs | 121 +++++++++++++++--- .../specs/compile/include/self/__test__.jsonc | 24 ++++ tests/specs/compile/include/self/main.ts | 6 + tests/specs/compile/include/self/output.out | 7 + 7 files changed, 158 insertions(+), 27 deletions(-) create mode 100644 tests/specs/compile/include/self/__test__.jsonc create mode 100644 tests/specs/compile/include/self/main.ts create mode 100644 tests/specs/compile/include/self/output.out diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index e35119e0aa7dfa..791f5052c0ab80 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -87,6 +87,7 @@ use super::serialization::RemoteModulesStore; use super::serialization::RemoteModulesStoreBuilder; use super::virtual_fs::FileBackedVfs; use super::virtual_fs::VfsBuilder; +use super::virtual_fs::VfsFileSubDataKind; use super::virtual_fs::VfsRoot; use super::virtual_fs::VirtualDirectory; @@ -275,7 +276,9 @@ impl StandaloneModules { if specifier.scheme() == "file" { let path = deno_path_util::url_to_file_path(specifier)?; let bytes = match self.vfs.file_entry(&path) { - Ok(entry) => self.vfs.read_file_all(entry)?, + Ok(entry) => self + .vfs + .read_file_all(entry, VfsFileSubDataKind::ModuleGraph)?, Err(err) if err.kind() == ErrorKind::NotFound => { let bytes = match RealFs.read_file_sync(&path, None) { Ok(bytes) => bytes, @@ -691,6 +694,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { Some(source) => source, None => RealFs.read_file_sync(&file_path, None)?, }, + VfsFileSubDataKind::ModuleGraph, ) .with_context(|| { format!("Failed adding '{}'", file_path.display()) diff --git a/cli/standalone/file_system.rs b/cli/standalone/file_system.rs index 712c6ee91878e3..48dc907570babd 100644 --- a/cli/standalone/file_system.rs +++ b/cli/standalone/file_system.rs @@ -17,6 +17,7 @@ use deno_runtime::deno_io::fs::FsResult; use deno_runtime::deno_io::fs::FsStat; use super::virtual_fs::FileBackedVfs; +use super::virtual_fs::VfsFileSubDataKind; #[derive(Debug, Clone)] pub struct DenoCompileFileSystem(Arc); @@ -36,7 +37,8 @@ impl DenoCompileFileSystem { fn copy_to_real_path(&self, oldpath: &Path, newpath: &Path) -> FsResult<()> { let old_file = self.0.file_entry(oldpath)?; - let old_file_bytes = self.0.read_file_all(old_file)?; + let old_file_bytes = + self.0.read_file_all(old_file, VfsFileSubDataKind::Raw)?; RealFs.write_file_sync( newpath, OpenOptions { diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index b9f0b1d5be0825..27b03fec634383 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -56,6 +56,8 @@ use serialization::DenoCompileModuleSource; use std::borrow::Cow; use std::rc::Rc; use std::sync::Arc; +use virtual_fs::FileBackedVfs; +use virtual_fs::VfsFileSubDataKind; use crate::args::create_default_npmrc; use crate::args::get_root_cert_store; @@ -111,6 +113,7 @@ use self::file_system::DenoCompileFileSystem; struct SharedModuleLoaderState { cjs_tracker: Arc, + code_cache: Option>, fs: Arc, modules: StandaloneModules, node_code_translator: Arc, @@ -118,8 +121,8 @@ struct SharedModuleLoaderState { npm_module_loader: Arc, npm_req_resolver: Arc, npm_resolver: Arc, + vfs: Arc, workspace_resolver: WorkspaceResolver, - code_cache: Option>, } impl SharedModuleLoaderState { @@ -514,7 +517,12 @@ impl NodeRequireLoader for EmbeddedModuleLoader { &self, path: &std::path::Path, ) -> Result { - Ok(self.shared.fs.read_text_file_lossy_sync(path, None)?) + let file_entry = self.shared.vfs.file_entry(path)?; + let file_bytes = self + .shared + .vfs + .read_file_all(file_entry, VfsFileSubDataKind::ModuleGraph)?; + Ok(String::from_utf8(file_bytes.into_owned())?) } fn is_maybe_cjs( @@ -817,6 +825,7 @@ pub async fn run(data: StandaloneData) -> Result { let module_loader_factory = StandaloneModuleLoaderFactory { shared: Arc::new(SharedModuleLoaderState { cjs_tracker: cjs_tracker.clone(), + code_cache: code_cache.clone(), fs: fs.clone(), modules, node_code_translator: node_code_translator.clone(), @@ -826,10 +835,10 @@ pub async fn run(data: StandaloneData) -> Result { fs.clone(), node_code_translator, )), - code_cache: code_cache.clone(), npm_resolver: npm_resolver.clone(), - workspace_resolver, npm_req_resolver, + vfs, + workspace_resolver, }), }; diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index be7e937ee1e5b4..5b8076549d1700 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -32,6 +32,15 @@ use thiserror::Error; use crate::util; use crate::util::fs::canonicalize_path; +#[derive(Debug, Copy, Clone)] +pub enum VfsFileSubDataKind { + /// Raw bytes of the file. + Raw, + /// Bytes to use for module loading. For example, for TypeScript + /// files this will be the transpiled JavaScript source. + ModuleGraph, +} + #[derive(Error, Debug)] #[error( "Failed to strip prefix '{}' from '{}'", root_path.display(), target.display() @@ -141,7 +150,11 @@ impl VfsBuilder { // inline the symlink and make the target file let file_bytes = std::fs::read(&target) .with_context(|| format!("Reading {}", path.display()))?; - self.add_file_with_data_inner(&path, file_bytes)?; + self.add_file_with_data_inner( + &path, + file_bytes, + VfsFileSubDataKind::Raw, + )?; } else { log::warn!( "{} Symlink target is outside '{}'. Excluding symlink at '{}' with target '{}'.", @@ -219,25 +232,27 @@ impl VfsBuilder { ) -> Result<(), AnyError> { let file_bytes = std::fs::read(path) .with_context(|| format!("Reading {}", path.display()))?; - self.add_file_with_data_inner(path, file_bytes) + self.add_file_with_data_inner(path, file_bytes, VfsFileSubDataKind::Raw) } pub fn add_file_with_data( &mut self, path: &Path, data: Vec, + sub_data_kind: VfsFileSubDataKind, ) -> Result<(), AnyError> { let target_path = canonicalize_path(path)?; if target_path != path { self.add_symlink(path, &target_path)?; } - self.add_file_with_data_inner(&target_path, data) + self.add_file_with_data_inner(&target_path, data, sub_data_kind) } fn add_file_with_data_inner( &mut self, path: &Path, data: Vec, + sub_data_kind: VfsFileSubDataKind, ) -> Result<(), AnyError> { log::debug!("Adding file '{}'", path.display()); let checksum = util::checksum::gen(&[&data]); @@ -253,8 +268,19 @@ impl VfsBuilder { let name = path.file_name().unwrap().to_string_lossy(); let data_len = data.len(); match dir.entries.binary_search_by(|e| e.name().cmp(&name)) { - Ok(_) => { - // already added, just ignore + Ok(index) => { + let entry = &mut dir.entries[index]; + match entry { + VfsEntry::File(virtual_file) => match sub_data_kind { + VfsFileSubDataKind::Raw => { + virtual_file.offset = offset; + } + VfsFileSubDataKind::ModuleGraph => { + virtual_file.module_graph_offset = offset; + } + }, + VfsEntry::Dir(_) | VfsEntry::Symlink(_) => unreachable!(), + } } Err(insert_index) => { dir.entries.insert( @@ -262,6 +288,7 @@ impl VfsBuilder { VfsEntry::File(VirtualFile { name: name.to_string(), offset, + module_graph_offset: offset, len: data.len() as u64, }), ); @@ -454,6 +481,12 @@ pub struct VirtualDirectory { pub struct VirtualFile { pub name: String, pub offset: u64, + /// Offset file to use for module loading when it differs from the + /// raw file. Often this will be the same offset as above for data + /// such as JavaScript files, but for TypeScript files the `offset` + /// will be the original raw bytes when included as an asset and this + /// offset will be to the transpiled JavaScript source. + pub module_graph_offset: u64, pub len: u64, } @@ -647,7 +680,7 @@ impl FileBackedVfsFile { .map_err(|err| err.into()) } - fn read_to_end(&self) -> FsResult> { + fn read_to_end(&self) -> FsResult> { let read_pos = { let mut pos = self.pos.lock(); let read_pos = *pos; @@ -659,12 +692,20 @@ impl FileBackedVfsFile { read_pos }; if read_pos > self.file.len { - return Ok(Vec::new()); + return Ok(Cow::Borrowed(&[])); + } + if read_pos == 0 { + Ok( + self + .vfs + .read_file_all(&self.file, VfsFileSubDataKind::Raw)?, + ) + } else { + let size = (self.file.len - read_pos) as usize; + let mut buf = vec![0; size]; + self.vfs.read_file(&self.file, read_pos, &mut buf)?; + Ok(Cow::Owned(buf)) } - let size = (self.file.len - read_pos) as usize; - let mut buf = vec![0; size]; - self.vfs.read_file(&self.file, read_pos, &mut buf)?; - Ok(buf) } } @@ -703,11 +744,14 @@ impl deno_io::fs::File for FileBackedVfsFile { } fn read_all_sync(self: Rc) -> FsResult> { - self.read_to_end() + self.read_to_end().map(|bytes| bytes.into_owned()) } async fn read_all_async(self: Rc) -> FsResult> { let inner = (*self).clone(); - tokio::task::spawn_blocking(move || inner.read_to_end()).await? + tokio::task::spawn_blocking(move || { + inner.read_to_end().map(|bytes| bytes.into_owned()) + }) + .await? } fn chmod_sync(self: Rc, _pathmode: u32) -> FsResult<()> { @@ -878,8 +922,9 @@ impl FileBackedVfs { pub fn read_file_all( &self, file: &VirtualFile, + sub_data_kind: VfsFileSubDataKind, ) -> std::io::Result> { - let read_range = self.get_read_range(file, 0, file.len)?; + let read_range = self.get_read_range(file, sub_data_kind, 0, file.len)?; match &self.vfs_data { Cow::Borrowed(data) => Ok(Cow::Borrowed(&data[read_range])), Cow::Owned(data) => Ok(Cow::Owned(data[read_range].to_vec())), @@ -892,7 +937,12 @@ impl FileBackedVfs { pos: u64, buf: &mut [u8], ) -> std::io::Result { - let read_range = self.get_read_range(file, pos, buf.len() as u64)?; + let read_range = self.get_read_range( + file, + VfsFileSubDataKind::Raw, + pos, + buf.len() as u64, + )?; let read_len = read_range.len(); buf[..read_len].copy_from_slice(&self.vfs_data[read_range]); Ok(read_len) @@ -901,6 +951,7 @@ impl FileBackedVfs { fn get_read_range( &self, file: &VirtualFile, + sub_data_kind: VfsFileSubDataKind, pos: u64, len: u64, ) -> std::io::Result> { @@ -910,7 +961,11 @@ impl FileBackedVfs { "unexpected EOF", )); } - let file_offset = self.fs_root.start_file_offset + file.offset; + let offset = match sub_data_kind { + VfsFileSubDataKind::Raw => file.offset, + VfsFileSubDataKind::ModuleGraph => file.module_graph_offset, + }; + let file_offset = self.fs_root.start_file_offset + offset; let start = file_offset + pos; let end = file_offset + std::cmp::min(pos + len, file.len); Ok(start as usize..end as usize) @@ -951,7 +1006,13 @@ mod test { #[track_caller] fn read_file(vfs: &FileBackedVfs, path: &Path) -> String { let file = vfs.file_entry(path).unwrap(); - String::from_utf8(vfs.read_file_all(file).unwrap().into_owned()).unwrap() + String::from_utf8( + vfs + .read_file_all(file, VfsFileSubDataKind::Raw) + .unwrap() + .into_owned(), + ) + .unwrap() } #[test] @@ -964,23 +1025,40 @@ mod test { let src_path = src_path.to_path_buf(); let mut builder = VfsBuilder::new(src_path.clone()).unwrap(); builder - .add_file_with_data_inner(&src_path.join("a.txt"), "data".into()) + .add_file_with_data_inner( + &src_path.join("a.txt"), + "data".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); builder - .add_file_with_data_inner(&src_path.join("b.txt"), "data".into()) + .add_file_with_data_inner( + &src_path.join("b.txt"), + "data".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); assert_eq!(builder.files.len(), 1); // because duplicate data builder - .add_file_with_data_inner(&src_path.join("c.txt"), "c".into()) + .add_file_with_data_inner( + &src_path.join("c.txt"), + "c".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); builder .add_file_with_data_inner( &src_path.join("sub_dir").join("d.txt"), "d".into(), + VfsFileSubDataKind::Raw, ) .unwrap(); builder - .add_file_with_data_inner(&src_path.join("e.txt"), "e".into()) + .add_file_with_data_inner( + &src_path.join("e.txt"), + "e".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); builder .add_symlink( @@ -1151,6 +1229,7 @@ mod test { .add_file_with_data_inner( temp_path.join("a.txt").as_path(), "0123456789".to_string().into_bytes(), + VfsFileSubDataKind::Raw, ) .unwrap(); let (dest_path, virtual_fs) = into_virtual_fs(builder, &temp_dir); diff --git a/tests/specs/compile/include/self/__test__.jsonc b/tests/specs/compile/include/self/__test__.jsonc new file mode 100644 index 00000000000000..5fb74534aa6cc3 --- /dev/null +++ b/tests/specs/compile/include/self/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --allow-read=. --include . --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=. --include . --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/self/main.ts b/tests/specs/compile/include/self/main.ts new file mode 100644 index 00000000000000..d86580e3d825e3 --- /dev/null +++ b/tests/specs/compile/include/self/main.ts @@ -0,0 +1,6 @@ +function add(a: number, b: number) { + return a + b; +} + +console.log(add(1, 2)); +console.log(Deno.readTextFileSync(import.meta.filename!).trim()); diff --git a/tests/specs/compile/include/self/output.out b/tests/specs/compile/include/self/output.out new file mode 100644 index 00000000000000..10c297caba155a --- /dev/null +++ b/tests/specs/compile/include/self/output.out @@ -0,0 +1,7 @@ +3 +function add(a: number, b: number) { + return a + b; +} + +console.log(add(1, 2)); +console.log(Deno.readTextFileSync(import.meta.filename!).trim()); From 15f14630ff1e44752c6aecc66032b12e5b732da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 25 Nov 2024 14:42:34 +0000 Subject: [PATCH 398/436] fix(init): always force managed node modules (#27047) Closes https://github.com/denoland/deno/issues/27045 --- cli/tools/init/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs index 8f486dad53184c..25b86cb957270f 100644 --- a/cli/tools/init/mod.rs +++ b/cli/tools/init/mod.rs @@ -9,6 +9,7 @@ use crate::args::RunFlags; use crate::colors; use color_print::cformat; use color_print::cstr; +use deno_config::deno_json::NodeModulesDirMode; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::serde_json::json; @@ -288,6 +289,7 @@ async fn init_npm(name: &str, args: Vec) -> Result { }, allow_scripts: PackagesAllowedScripts::All, argv: args, + node_modules_dir: Some(NodeModulesDirMode::Auto), subcommand: DenoSubcommand::Run(RunFlags { script: script_name, ..Default::default() From 08a56763d454738361d275910e652c8b0ea1c671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 25 Nov 2024 15:18:39 +0000 Subject: [PATCH 399/436] chore: upgrade sqlformat-rs to non-forked version (#27063) --- Cargo.lock | 26 +++++++++++++------------- cli/Cargo.toml | 3 +-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e929168f5313a..e7229dcceb2240 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1232,7 +1232,6 @@ dependencies = [ "deno_resolver", "deno_runtime", "deno_semver", - "deno_sqlformat", "deno_task_shell", "deno_terminal 0.2.0", "deno_tower_lsp", @@ -1292,6 +1291,7 @@ dependencies = [ "sha2", "shell-escape", "spki", + "sqlformat", "strsim", "tar", "tempfile", @@ -2147,18 +2147,6 @@ dependencies = [ "url", ] -[[package]] -name = "deno_sqlformat" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e196799ec0cc240fac1fb5c5bf813ef92a9602740a059cfcbb20593b2deee52" -dependencies = [ - "nom 7.1.3", - "once_cell", - "regex", - "unicode_categories", -] - [[package]] name = "deno_task_shell" version = "0.18.1" @@ -6944,6 +6932,18 @@ dependencies = [ "der", ] +[[package]] +name = "sqlformat" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c38684453189293372e6fffa3bed1015d20488ce4cc09a23de050fd7411e46" +dependencies = [ + "nom 7.1.3", + "once_cell", + "regex", + "unicode_categories", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 6a1fc51bc45d8d..ce9dbe9230a528 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -151,8 +151,7 @@ serde_repr.workspace = true sha2.workspace = true shell-escape = "=0.1.5" spki = { version = "0.7", features = ["pem"] } -# NOTE(bartlomieju): using temporary fork for now, revert back to `sqlformat-rs` later -sqlformat = { package = "deno_sqlformat", version = "0.3.2" } +sqlformat = "=0.3.2" strsim = "0.11.1" tar.workspace = true tempfile.workspace = true From d59bd5e8c9eac0dcf4dadce21a8e30542e80b876 Mon Sep 17 00:00:00 2001 From: snek Date: Mon, 25 Nov 2024 16:38:07 +0100 Subject: [PATCH 400/436] feat(unstable): Instrument fetch (#27057) Add basic tracing to `fetch`. Also fix span kinds so that we can differentiate fetch and serve. --- ext/fetch/26_fetch.js | 218 +++++++++++++++++---------- ext/fetch/lib.rs | 7 + ext/http/00_serve.ts | 4 +- runtime/js/telemetry.ts | 14 +- tests/specs/cli/otel_basic/basic.out | 70 ++++++++- 5 files changed, 223 insertions(+), 90 deletions(-) diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index 8ac364a931c90f..01be983a374284 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -10,9 +10,10 @@ /// /// -import { core, primordials } from "ext:core/mod.js"; +import { core, internals, primordials } from "ext:core/mod.js"; import { op_fetch, + op_fetch_promise_is_settled, op_fetch_send, op_wasm_streaming_feed, op_wasm_streaming_set_url, @@ -28,7 +29,9 @@ const { PromisePrototypeThen, PromisePrototypeCatch, SafeArrayIterator, + SafePromisePrototypeFinally, String, + StringPrototypeSlice, StringPrototypeStartsWith, StringPrototypeToLowerCase, TypeError, @@ -307,93 +310,150 @@ function httpRedirectFetch(request, response, terminator) { * @param {RequestInit} init */ function fetch(input, init = { __proto__: null }) { - // There is an async dispatch later that causes a stack trace disconnect. - // We reconnect it by assigning the result of that dispatch to `opPromise`, - // awaiting `opPromise` in an inner function also named `fetch()` and - // returning the result from that. - let opPromise = undefined; - // 1. - const result = new Promise((resolve, reject) => { - const prefix = "Failed to execute 'fetch'"; - webidl.requiredArguments(arguments.length, 1, prefix); - // 2. - const requestObject = new Request(input, init); - // 3. - const request = toInnerRequest(requestObject); - // 4. - if (requestObject.signal.aborted) { - reject(abortFetch(request, null, requestObject.signal.reason)); - return; + let span; + try { + if (internals.telemetry?.tracingEnabled) { + span = new internals.telemetry.Span("fetch", { kind: 2 }); + internals.telemetry.enterSpan(span); } - // 7. - let responseObject = null; - // 9. - let locallyAborted = false; - // 10. - function onabort() { - locallyAborted = true; - reject( - abortFetch(request, responseObject, requestObject.signal.reason), - ); - } - requestObject.signal[abortSignal.add](onabort); + // There is an async dispatch later that causes a stack trace disconnect. + // We reconnect it by assigning the result of that dispatch to `opPromise`, + // awaiting `opPromise` in an inner function also named `fetch()` and + // returning the result from that. + let opPromise = undefined; + // 1. + const result = new Promise((resolve, reject) => { + const prefix = "Failed to execute 'fetch'"; + webidl.requiredArguments(arguments.length, 1, prefix); + // 2. + const requestObject = new Request(input, init); + + if (span) { + span.updateName(requestObject.method); + span.setAttribute("http.request.method", requestObject.method); + const url = new URL(requestObject.url); + span.setAttribute("url.full", requestObject.url); + span.setAttribute( + "url.scheme", + StringPrototypeSlice(url.protocol, 0, -1), + ); + span.setAttribute("url.path", url.pathname); + span.setAttribute("url.query", StringPrototypeSlice(url.search, 1)); + } - if (!requestObject.headers.has("Accept")) { - ArrayPrototypePush(request.headerList, ["Accept", "*/*"]); - } + // 3. + const request = toInnerRequest(requestObject); + // 4. + if (requestObject.signal.aborted) { + reject(abortFetch(request, null, requestObject.signal.reason)); + return; + } + // 7. + let responseObject = null; + // 9. + let locallyAborted = false; + // 10. + function onabort() { + locallyAborted = true; + reject( + abortFetch(request, responseObject, requestObject.signal.reason), + ); + } + requestObject.signal[abortSignal.add](onabort); - if (!requestObject.headers.has("Accept-Language")) { - ArrayPrototypePush(request.headerList, ["Accept-Language", "*"]); - } + if (!requestObject.headers.has("Accept")) { + ArrayPrototypePush(request.headerList, ["Accept", "*/*"]); + } - // 12. - opPromise = PromisePrototypeCatch( - PromisePrototypeThen( - mainFetch(request, false, requestObject.signal), - (response) => { - // 12.1. - if (locallyAborted) return; - // 12.2. - if (response.aborted) { - reject( - abortFetch( - request, - responseObject, - requestObject.signal.reason, - ), - ); - requestObject.signal[abortSignal.remove](onabort); - return; - } - // 12.3. - if (response.type === "error") { - const err = new TypeError( - "Fetch failed: " + (response.error ?? "unknown error"), - ); - reject(err); + if (!requestObject.headers.has("Accept-Language")) { + ArrayPrototypePush(request.headerList, ["Accept-Language", "*"]); + } + + // 12. + opPromise = PromisePrototypeCatch( + PromisePrototypeThen( + mainFetch(request, false, requestObject.signal), + (response) => { + // 12.1. + if (locallyAborted) return; + // 12.2. + if (response.aborted) { + reject( + abortFetch( + request, + responseObject, + requestObject.signal.reason, + ), + ); + requestObject.signal[abortSignal.remove](onabort); + return; + } + // 12.3. + if (response.type === "error") { + const err = new TypeError( + "Fetch failed: " + (response.error ?? "unknown error"), + ); + reject(err); + requestObject.signal[abortSignal.remove](onabort); + return; + } + responseObject = fromInnerResponse(response, "immutable"); + + if (span) { + span.setAttribute( + "http.response.status_code", + String(responseObject.status), + ); + } + + resolve(responseObject); requestObject.signal[abortSignal.remove](onabort); - return; - } - responseObject = fromInnerResponse(response, "immutable"); - resolve(responseObject); + }, + ), + (err) => { + reject(err); requestObject.signal[abortSignal.remove](onabort); }, - ), - (err) => { - reject(err); - requestObject.signal[abortSignal.remove](onabort); - }, - ); - }); - if (opPromise) { - PromisePrototypeCatch(result, () => {}); - return (async function fetch() { - await opPromise; - return result; - })(); + ); + }); + + if (opPromise) { + PromisePrototypeCatch(result, () => {}); + return (async function fetch() { + try { + await opPromise; + return result; + } finally { + if (span) { + internals.telemetry.endSpan(span); + } + } + })(); + } + // We need to end the span when the promise settles. + // WPT has a test that aborted fetch is settled in the same tick. + // This means we cannot wrap the promise if it is already settled. + // But this is OK, because we can just immediately end the span + // in that case. + if (span) { + // XXX: This should always be true, otherwise `opPromise` would be present. + if (op_fetch_promise_is_settled(result)) { + // It's already settled. + internals.telemetry.endSpan(span); + } else { + // Not settled yet, we can return a new wrapper promise. + return SafePromisePrototypeFinally(result, () => { + internals.telemetry.endSpan(span); + }); + } + } + return result; + } finally { + if (span) { + internals.telemetry.exitSpan(span); + } } - return result; } function abortFetch(request, responseObject, error) { diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index 303c9556223776..7a525053b3e0de 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -27,6 +27,7 @@ use deno_core::futures::TryFutureExt; use deno_core::op2; use deno_core::url; use deno_core::url::Url; +use deno_core::v8; use deno_core::AsyncRefCell; use deno_core::AsyncResult; use deno_core::BufView; @@ -141,6 +142,7 @@ deno_core::extension!(deno_fetch, op_fetch_send, op_utf8_to_byte_string, op_fetch_custom_client, + op_fetch_promise_is_settled, ], esm = [ "20_headers.js", @@ -1206,3 +1208,8 @@ pub fn extract_authority(url: &mut Url) -> Option<(String, Option)> { None } + +#[op2(fast)] +fn op_fetch_promise_is_settled(promise: v8::Local) -> bool { + promise.state() != v8::PromiseState::Pending +} diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index 766a6d2739a3e8..027c2710b2cc11 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -617,13 +617,13 @@ function mapToCallback(context, callback, onError) { fastSyncResponseOrStream(req, inner.body, status, innerRequest); }; - if (internals.telemetry.tracingEnabled) { + if (internals.telemetry?.tracingEnabled) { const { Span, enterSpan, endSpan } = internals.telemetry; const origMapped = mapped; mapped = function (req, _span) { const oldCtx = getAsyncContext(); setAsyncContext(context.asyncContext); - const span = new Span("deno.serve"); + const span = new Span("deno.serve", { kind: 1 }); try { enterSpan(span); return SafePromisePrototypeFinally( diff --git a/runtime/js/telemetry.ts b/runtime/js/telemetry.ts index 96c1c9369f2d67..a98e5b0a19bcb5 100644 --- a/runtime/js/telemetry.ts +++ b/runtime/js/telemetry.ts @@ -41,6 +41,8 @@ const { AsyncVariable, setAsyncContext } = core; let TRACING_ENABLED = false; let DETERMINISTIC = false; +// Note: These start at 0 in the JS library, +// but start at 1 when serialized with JSON. enum SpanKind { INTERNAL = 0, SERVER = 1, @@ -91,6 +93,11 @@ interface Attributes { type SpanAttributes = Attributes; +interface SpanOptions { + attributes?: Attributes; + kind?: SpanKind; +} + interface Link { context: SpanContext; attributes?: SpanAttributes; @@ -354,7 +361,7 @@ export class Span { #recording = TRACING_ENABLED; - #kind: number = 0; + #kind: number = SpanKind.INTERNAL; #name: string; #startTime: number; #status: { code: number; message?: string } | null = null; @@ -429,7 +436,7 @@ export class Span { constructor( name: string, - attributes?: Attributes, + options?: SpanOptions, ) { if (!this.isRecording) { this.#name = ""; @@ -442,7 +449,8 @@ export class Span { this.#name = name; this.#startTime = now(); - this.#attributes = attributes ?? { __proto__: null } as never; + this.#attributes = options?.attributes ?? { __proto__: null } as never; + this.#kind = options?.kind ?? SpanKind.INTERNAL; const currentSpan: Span | { spanContext(): { traceId: string; spanId: string }; diff --git a/tests/specs/cli/otel_basic/basic.out b/tests/specs/cli/otel_basic/basic.out index 1883866a1d1349..88296a7c04a57a 100644 --- a/tests/specs/cli/otel_basic/basic.out +++ b/tests/specs/cli/otel_basic/basic.out @@ -7,7 +7,7 @@ "parentSpanId": "", "flags": 1, "name": "GET", - "kind": 1, + "kind": 3, "startTimeUnixNano": "[WILDCARD]", "endTimeUnixNano": "[WILDCARD]", "attributes": [ @@ -59,10 +59,68 @@ } }, { - "traceId": "00000000000000000000000000000001", + "traceId": "00000000000000000000000000000003", + "spanId": "0000000000000004", + "traceState": "", + "parentSpanId": "", + "flags": 1, + "name": "GET", + "kind": 2, + "startTimeUnixNano": "[WILDCARD]", + "endTimeUnixNano": "[WILDCARD]", + "attributes": [ + { + "key": "http.request.method", + "value": { + "stringValue": "GET" + } + }, + { + "key": "url.full", + "value": { + "stringValue": "http://localhost:[WILDCARD]/" + } + }, + { + "key": "url.scheme", + "value": { + "stringValue": "http" + } + }, + { + "key": "url.path", + "value": { + "stringValue": "/" + } + }, + { + "key": "url.query", + "value": { + "stringValue": "" + } + }, + { + "key": "http.response.status_code", + "value": { + "stringValue": "200" + } + } + ], + "droppedAttributesCount": 0, + "events": [], + "droppedEventsCount": 0, + "links": [], + "droppedLinksCount": 0, + "status": { + "message": "", + "code": 0 + } + }, + { + "traceId": "00000000000000000000000000000003", "spanId": "1000000000000001", "traceState": "", - "parentSpanId": "0000000000000002", + "parentSpanId": "0000000000000004", "flags": 1, "name": "outer span", "kind": 1, @@ -80,7 +138,7 @@ } }, { - "traceId": "00000000000000000000000000000001", + "traceId": "00000000000000000000000000000003", "spanId": "1000000000000002", "traceState": "", "parentSpanId": "1000000000000001", @@ -113,7 +171,7 @@ "attributes": [], "droppedAttributesCount": 0, "flags": 1, - "traceId": "00000000000000000000000000000001", + "traceId": "00000000000000000000000000000003", "spanId": "1000000000000002" }, { @@ -127,7 +185,7 @@ "attributes": [], "droppedAttributesCount": 0, "flags": 1, - "traceId": "00000000000000000000000000000001", + "traceId": "00000000000000000000000000000003", "spanId": "1000000000000002" } ] From 38b618ce351b0e6432b5912e97e16df259dc36b5 Mon Sep 17 00:00:00 2001 From: ctrl+d <52456860+DanieleAurilio@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:38:52 +0100 Subject: [PATCH 401/436] fix(runtime/ops): Fix watchfs remove event (#27041) Fix related to #26906. Currently, if a file is removed, no event is emitted because the file path no longer exists. As a result, [this check](https://github.com/denoland/deno/blob/12b377247be2b74155ded3a678ff2996ef3d7c9f/runtime/ops/fs_events.rs#L149) returns false. With this PR, an additional check is introduced to verify if the file exists. If the file does not exist, a custom "remove" event is emitted. This change is necessary because, based on tests conducted on macOS and Linux (Ubuntu 24.04.1 LTS), Linux emits a "rename" event instead of a "remove" event when a file is deleted. Introducing a dedicated "remove" event ensures consistent and clearer behavior across platforms. --- runtime/ops/fs_events.rs | 15 +++++++++++++++ tests/unit/fs_events_test.ts | 30 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index a91722f91a1ad0..f6e5ceff5c8488 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -109,6 +109,14 @@ fn starts_with_canonicalized(path: &Path, prefix: &str) -> bool { } } +fn is_file_removed(event_path: &PathBuf) -> bool { + let exists_path = std::fs::exists(event_path); + match exists_path { + Ok(res) => !res, + Err(_) => false, + } +} + #[derive(Debug, thiserror::Error)] pub enum FsEventsError { #[error(transparent)] @@ -150,6 +158,13 @@ fn start_watcher( }) }) { let _ = sender.try_send(Ok(event.clone())); + } else if event.paths.iter().any(is_file_removed) { + let remove_event = FsEvent { + kind: "remove", + paths: event.paths.clone(), + flag: None, + }; + let _ = sender.try_send(Ok(remove_event)); } } } diff --git a/tests/unit/fs_events_test.ts b/tests/unit/fs_events_test.ts index cc2f2cd5711242..7489626b9f68bc 100644 --- a/tests/unit/fs_events_test.ts +++ b/tests/unit/fs_events_test.ts @@ -45,6 +45,14 @@ async function makeTempDir(): Promise { return testDir; } +async function makeTempFile(): Promise { + const testFile = await Deno.makeTempFile(); + // The watcher sometimes witnesses the creation of it's own root + // directory. Delay a bit. + await delay(100); + return testFile; +} + Deno.test( { permissions: { read: true, write: true } }, async function watchFsBasic() { @@ -155,3 +163,25 @@ Deno.test( assert(done); }, ); + +Deno.test( + { permissions: { read: true, write: true } }, + async function watchFsRemove() { + const testFile = await makeTempFile(); + using watcher = Deno.watchFs(testFile); + async function waitForRemove() { + for await (const event of watcher) { + if (event.kind === "remove") { + return event; + } + } + } + const eventPromise = waitForRemove(); + + await Deno.remove(testFile); + + // Expect zero events. + const event = await eventPromise; + assertEquals(event!.kind, "remove"); + }, +); From 7456255cd10286d71363fc024e51b2662790448a Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Mon, 25 Nov 2024 10:07:00 -0800 Subject: [PATCH 402/436] Merge commit from fork MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: drop auth headers, cookies on redirect to different origin * refactor: destructure StringPrototypeEndsWith --------- Co-authored-by: Bartek IwaƄczuk --- ext/fetch/26_fetch.js | 46 ++++++++++++++++++++++++++++++++++- tests/unit/fetch_test.ts | 52 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index 01be983a374284..3a77f6075e28bd 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -31,6 +31,7 @@ const { SafeArrayIterator, SafePromisePrototypeFinally, String, + StringPrototypeEndsWith, StringPrototypeSlice, StringPrototypeStartsWith, StringPrototypeToLowerCase, @@ -66,6 +67,12 @@ const REQUEST_BODY_HEADER_NAMES = [ "content-type", ]; +const REDIRECT_SENSITIVE_HEADER_NAMES = [ + "authorization", + "proxy-authorization", + "cookie", +]; + /** * @param {number} rid * @returns {Promise<{ status: number, statusText: string, headers: [string, string][], url: string, responseRid: number, error: [string, string]? }>} @@ -253,12 +260,14 @@ function httpRedirectFetch(request, response, terminator) { if (locationHeaders.length === 0) { return response; } + + const currentURL = new URL(request.currentUrl()); const locationURL = new URL( locationHeaders[0][1], response.url() ?? undefined, ); if (locationURL.hash === "") { - locationURL.hash = request.currentUrl().hash; + locationURL.hash = currentURL.hash; } if (locationURL.protocol !== "https:" && locationURL.protocol !== "http:") { return networkError("Can not redirect to a non HTTP(s) url"); @@ -297,6 +306,28 @@ function httpRedirectFetch(request, response, terminator) { } } } + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if ( + locationURL.protocol !== currentURL.protocol && + locationURL.protocol !== "https:" || + locationURL.host !== currentURL.host && + !isSubdomain(locationURL.host, currentURL.host) + ) { + for (let i = 0; i < request.headerList.length; i++) { + if ( + ArrayPrototypeIncludes( + REDIRECT_SENSITIVE_HEADER_NAMES, + byteLowerCase(request.headerList[i][0]), + ) + ) { + ArrayPrototypeSplice(request.headerList, i, 1); + i--; + } + } + } + if (request.body !== null) { const res = extractBody(request.body.source); request.body = res.body; @@ -470,6 +501,19 @@ function abortFetch(request, responseObject, error) { return error; } +/** + * Checks if the given string is a subdomain of the given domain. + * + * @param {String} subdomain + * @param {String} domain + * @returns {Boolean} + */ +function isSubdomain(subdomain, domain) { + const dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && + StringPrototypeEndsWith(subdomain, domain); +} + /** * Handle the Response argument to the WebAssembly streaming APIs, after * resolving if it was passed as a promise. This function should be registered diff --git a/tests/unit/fetch_test.ts b/tests/unit/fetch_test.ts index 6d3fd8cc1d538d..298a266903394f 100644 --- a/tests/unit/fetch_test.ts +++ b/tests/unit/fetch_test.ts @@ -439,6 +439,58 @@ Deno.test( }, ); +Deno.test( + { + permissions: { net: true }, + }, + async function fetchWithAuthorizationHeaderRedirection() { + const response = await fetch("http://localhost:4546/echo_server", { + headers: { authorization: "Bearer foo" }, + }); + assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); + assertEquals(response.url, "http://localhost:4545/echo_server"); + assertEquals(response.headers.get("authorization"), null); + assertEquals(await response.text(), ""); + }, +); + +Deno.test( + { + permissions: { net: true }, + }, + async function fetchWithCookieHeaderRedirection() { + const response = await fetch("http://localhost:4546/echo_server", { + headers: { Cookie: "sessionToken=verySecret" }, + }); + assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); + assertEquals(response.url, "http://localhost:4545/echo_server"); + assertEquals(response.headers.get("cookie"), null); + assertEquals(await response.text(), ""); + }, +); + +Deno.test( + { + permissions: { net: true }, + }, + async function fetchWithProxyAuthorizationHeaderRedirection() { + const response = await fetch("http://localhost:4546/echo_server", { + headers: { + "proxy-authorization": "Basic ZXNwZW46a29rb3M=", + "accept": "application/json", + }, + }); + assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); + assertEquals(response.url, "http://localhost:4545/echo_server"); + assertEquals(response.headers.get("proxy-authorization"), null); + assertEquals(response.headers.get("accept"), "application/json"); + assertEquals(await response.text(), ""); + }, +); + Deno.test( { permissions: { net: true } }, async function fetchInitStringBody() { From 02b480b171847a736cca9d396481c4693c3cfe4a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 25 Nov 2024 17:08:06 -0500 Subject: [PATCH 403/436] fix(compile): do not error embedding same symlink via multiple methods (#27015) Closes https://github.com/denoland/deno/issues/27012 --- cli/standalone/virtual_fs.rs | 4 +-- .../include/symlink_twice/__test__.jsonc | 27 +++++++++++++++++++ .../compile/include/symlink_twice/setup.js | 3 +++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 tests/specs/compile/include/symlink_twice/__test__.jsonc create mode 100644 tests/specs/compile/include/symlink_twice/setup.js diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index 5b8076549d1700..b630f629c5a8f0 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -329,7 +329,7 @@ impl VfsBuilder { let dir = self.add_dir(path.parent().unwrap())?; let name = path.file_name().unwrap().to_string_lossy(); match dir.entries.binary_search_by(|e| e.name().cmp(&name)) { - Ok(_) => unreachable!(), + Ok(_) => Ok(()), // previously inserted Err(insert_index) => { dir.entries.insert( insert_index, @@ -341,9 +341,9 @@ impl VfsBuilder { .collect::>(), }), ); + Ok(()) } } - Ok(()) } pub fn into_dir_and_files(self) -> (VirtualDirectory, Vec>) { diff --git a/tests/specs/compile/include/symlink_twice/__test__.jsonc b/tests/specs/compile/include/symlink_twice/__test__.jsonc new file mode 100644 index 00000000000000..ebdf824f43cf84 --- /dev/null +++ b/tests/specs/compile/include/symlink_twice/__test__.jsonc @@ -0,0 +1,27 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A setup.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --allow-read=data --include . --output main link.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "1\n", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include . --output main.exe link.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "1\n", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/symlink_twice/setup.js b/tests/specs/compile/include/symlink_twice/setup.js new file mode 100644 index 00000000000000..3e713dd63e918a --- /dev/null +++ b/tests/specs/compile/include/symlink_twice/setup.js @@ -0,0 +1,3 @@ +Deno.mkdirSync("data"); +Deno.writeTextFileSync("index.js", "console.log(1);"); +Deno.symlinkSync("index.js", "link.js"); From 2b2644458494ce661fdb6ad0a6f753e04c742fac Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 25 Nov 2024 18:57:05 -0500 Subject: [PATCH 404/436] fix(check): support jsdoc `@import` tag (#26991) * https://github.com/denoland/deno_graph/pull/544 Closes https://github.com/denoland/deno/issues/25516 --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- tests/specs/check/jsdoc_import_decl/__test__.jsonc | 5 +++++ tests/specs/check/jsdoc_import_decl/check.out | 6 ++++++ tests/specs/check/jsdoc_import_decl/main.js | 12 ++++++++++++ 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 tests/specs/check/jsdoc_import_decl/__test__.jsonc create mode 100644 tests/specs/check/jsdoc_import_decl/check.out create mode 100644 tests/specs/check/jsdoc_import_decl/main.js diff --git a/Cargo.lock b/Cargo.lock index e7229dcceb2240..98792c58b450d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1664,9 +1664,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.85.0" +version = "0.85.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d097305aba3f119781fe82b4d5a85a1ad10c586a388ee4d754e5bf82901cc5c" +checksum = "4c11027d9b4e9ff4f8bcb8316a1a5dd5241dc267380507e177457bc491696189" dependencies = [ "anyhow", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ce9dbe9230a528..d1ac3e160e089a 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -73,7 +73,7 @@ deno_cache_dir.workspace = true deno_config.workspace = true deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_doc = { version = "0.160.0", features = ["rust", "comrak"] } -deno_graph = { version = "=0.85.0" } +deno_graph = { version = "=0.85.1" } deno_lint = { version = "=0.68.0", features = ["docs"] } deno_lockfile.workspace = true deno_npm.workspace = true diff --git a/tests/specs/check/jsdoc_import_decl/__test__.jsonc b/tests/specs/check/jsdoc_import_decl/__test__.jsonc new file mode 100644 index 00000000000000..fdbb52ab351157 --- /dev/null +++ b/tests/specs/check/jsdoc_import_decl/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --allow-import main.js", + "output": "check.out", + "exitCode": 1 +} diff --git a/tests/specs/check/jsdoc_import_decl/check.out b/tests/specs/check/jsdoc_import_decl/check.out new file mode 100644 index 00000000000000..657569bcd4f1bf --- /dev/null +++ b/tests/specs/check/jsdoc_import_decl/check.out @@ -0,0 +1,6 @@ +Download http://localhost:4545/add.ts +Check file:///[WILDLINE]main.js +error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type '(a: number, b: number) => number'. +addHere(""); + ~~ + at file:///[WILDLINE]main.js:12:9 diff --git a/tests/specs/check/jsdoc_import_decl/main.js b/tests/specs/check/jsdoc_import_decl/main.js new file mode 100644 index 00000000000000..accfdb177a3283 --- /dev/null +++ b/tests/specs/check/jsdoc_import_decl/main.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @import { add } from "http://localhost:4545/add.ts" */ + +/** + * @param {typeof add} myValue + */ +export function addHere(myValue) { + return myValue(1, 2); +} + +addHere(""); From d4fe3311a6acf06113f1b8e86182fa4edfae9212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 26 Nov 2024 03:02:39 +0000 Subject: [PATCH 405/436] fix(task): handle multiline descriptions properly (#27069) Closes https://github.com/denoland/deno/issues/27049 --- cli/tools/task.rs | 8 +++----- tests/specs/task/description/deno.json | 4 ++++ tests/specs/task/description/main.out | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 478853f4e64f61..65b78f9c9b9826 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -721,11 +721,9 @@ fn print_available_tasks( )?; if let Some(description) = &desc.task.description { let slash_slash = colors::italic_gray("//"); - writeln!( - writer, - " {slash_slash} {}", - colors::italic_gray(description) - )?; + for line in description.split('\n') { + writeln!(writer, " {slash_slash} {}", colors::italic_gray(line))?; + } } writeln!(writer, " {}", desc.task.command)?; if !desc.task.dependencies.is_empty() { diff --git a/tests/specs/task/description/deno.json b/tests/specs/task/description/deno.json index a86b7a5dcb3bda..c8a79c00eefe43 100644 --- a/tests/specs/task/description/deno.json +++ b/tests/specs/task/description/deno.json @@ -3,6 +3,10 @@ "echo_emoji": { "description": "This is some task", "command": "echo 1" + }, + "multiline_description": { + "description": "This is a multiline\ndescription", + "command": "echo 2" } } } diff --git a/tests/specs/task/description/main.out b/tests/specs/task/description/main.out index ed28506567d03e..91cce4adf83905 100644 --- a/tests/specs/task/description/main.out +++ b/tests/specs/task/description/main.out @@ -2,3 +2,7 @@ Available tasks: - echo_emoji // This is some task echo 1 +- multiline_description + // This is a multiline + // description + echo 2 From 114fe9bf3eb1734d3774d603b7ede66433c4ce5a Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 26 Nov 2024 05:57:51 +0000 Subject: [PATCH 406/436] fix(lsp): support task object notation for tasks request (#27076) --- cli/lsp/language_server.rs | 9 +++------ cli/lsp/lsp_custom.rs | 2 -- cli/lsp/mod.rs | 3 --- tests/integration/lsp_tests.rs | 31 ++++++++++++++++++------------- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index cbe194e14e6950..9a9531eded6f6e 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -3781,14 +3781,11 @@ impl Inner { fn task_definitions(&self) -> LspResult> { let mut result = vec![]; for config_file in self.config.tree.config_files() { - if let Some(tasks) = json!(&config_file.json.tasks).as_object() { - for (name, value) in tasks { - let Some(command) = value.as_str() else { - continue; - }; + if let Some(tasks) = config_file.to_tasks_config().ok().flatten() { + for (name, def) in tasks { result.push(TaskDefinition { name: name.clone(), - command: command.to_string(), + command: def.command.clone(), source_uri: url_to_uri(&config_file.specifier) .map_err(|_| LspError::internal_error())?, }); diff --git a/cli/lsp/lsp_custom.rs b/cli/lsp/lsp_custom.rs index b570b6d0e2f854..74c6aca88b5b5a 100644 --- a/cli/lsp/lsp_custom.rs +++ b/cli/lsp/lsp_custom.rs @@ -14,8 +14,6 @@ pub const LATEST_DIAGNOSTIC_BATCH_INDEX: &str = #[serde(rename_all = "camelCase")] pub struct TaskDefinition { pub name: String, - // TODO(nayeemrmn): Rename this to `command` in vscode_deno. - #[serde(rename = "detail")] pub command: String, pub source_uri: lsp::Uri, } diff --git a/cli/lsp/mod.rs b/cli/lsp/mod.rs index 79aa4d8f074d14..afb949f68d0efa 100644 --- a/cli/lsp/mod.rs +++ b/cli/lsp/mod.rs @@ -56,9 +56,6 @@ pub async fn start() -> Result<(), AnyError> { LanguageServer::performance_request, ) .custom_method(lsp_custom::TASK_REQUEST, LanguageServer::task_definitions) - // TODO(nayeemrmn): Rename this to `deno/taskDefinitions` in vscode_deno and - // remove this alias. - .custom_method("deno/task", LanguageServer::task_definitions) .custom_method(testing::TEST_RUN_REQUEST, LanguageServer::test_run_request) .custom_method( testing::TEST_RUN_CANCEL_REQUEST, diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index b716aa921e3b25..9ccd33c99574de 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -1360,26 +1360,31 @@ fn lsp_deno_task() { let temp_dir = context.temp_dir(); temp_dir.write( "deno.jsonc", - r#"{ - "tasks": { - "build": "deno test" - } - }"#, + json!({ + "tasks": { + "build": "deno test", + "serve": { + "description": "Start the dev server", + "command": "deno run -RN server.ts", + }, + }, + }) + .to_string(), ); - let mut client = context.new_lsp_command().build(); - client.initialize(|builder| { - builder.set_config("./deno.jsonc"); - }); - - let res = client.write_request("deno/task", json!(null)); - + client.initialize_default(); + let res = client.write_request("deno/taskDefinitions", json!(null)); assert_eq!( res, json!([ { "name": "build", - "detail": "deno test", + "command": "deno test", + "sourceUri": temp_dir.url().join("deno.jsonc").unwrap(), + }, + { + "name": "serve", + "command": "deno run -RN server.ts", "sourceUri": temp_dir.url().join("deno.jsonc").unwrap(), } ]) From e61cf8d7d6fd157b3d9f166d788626457ff329ba Mon Sep 17 00:00:00 2001 From: snek Date: Tue, 26 Nov 2024 12:22:18 +0100 Subject: [PATCH 407/436] refactor(unstable): move telemetry to own ext (#27067) Move telemetry to its own ext to clean up some code and resolve circular deps. --- Cargo.lock | 30 ++++++++++---- Cargo.toml | 2 + cli/Cargo.toml | 1 + cli/args/flags.rs | 6 +-- cli/args/mod.rs | 2 +- cli/main.rs | 2 +- cli/mainrt.rs | 2 +- cli/standalone/binary.rs | 2 +- cli/util/logger.rs | 2 +- cli/worker.rs | 2 +- ext/fetch/26_fetch.js | 44 ++++++++++----------- ext/http/00_serve.ts | 31 ++++++--------- ext/telemetry/Cargo.toml | 31 +++++++++++++++ ext/telemetry/README.md | 3 ++ runtime/ops/otel.rs => ext/telemetry/lib.rs | 25 ++++++++++-- {runtime/js => ext/telemetry}/telemetry.ts | 13 +----- ext/telemetry/util.ts | 27 +++++++++++++ runtime/Cargo.toml | 8 +--- runtime/js/90_deno_ns.js | 2 +- runtime/js/99_main.js | 2 +- runtime/lib.rs | 2 +- runtime/ops/mod.rs | 1 - runtime/shared.rs | 1 - runtime/snapshot.rs | 2 +- runtime/web_worker.rs | 2 +- runtime/worker.rs | 2 +- runtime/worker_bootstrap.rs | 2 +- tools/core_import_map.json | 3 +- 28 files changed, 164 insertions(+), 88 deletions(-) create mode 100644 ext/telemetry/Cargo.toml create mode 100644 ext/telemetry/README.md rename runtime/ops/otel.rs => ext/telemetry/lib.rs (96%) rename {runtime/js => ext/telemetry}/telemetry.ts (98%) create mode 100644 ext/telemetry/util.ts diff --git a/Cargo.lock b/Cargo.lock index 98792c58b450d2..00b4da07cd64bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1233,6 +1233,7 @@ dependencies = [ "deno_runtime", "deno_semver", "deno_task_shell", + "deno_telemetry", "deno_terminal 0.2.0", "deno_tower_lsp", "dhat", @@ -2063,7 +2064,6 @@ dependencies = [ name = "deno_runtime" version = "0.188.0" dependencies = [ - "async-trait", "color-print", "deno_ast", "deno_broadcast_channel", @@ -2084,6 +2084,7 @@ dependencies = [ "deno_node", "deno_path_util", "deno_permissions", + "deno_telemetry", "deno_terminal 0.2.0", "deno_tls", "deno_url", @@ -2109,13 +2110,7 @@ dependencies = [ "notify", "ntapi", "once_cell", - "opentelemetry", - "opentelemetry-http", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk", "percent-encoding", - "pin-project", "regex", "rustyline", "same-file", @@ -2164,6 +2159,27 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "deno_telemetry" +version = "0.1.0" +dependencies = [ + "async-trait", + "deno_core", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "log", + "once_cell", + "opentelemetry", + "opentelemetry-http", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", + "pin-project", + "serde", + "tokio", +] + [[package]] name = "deno_terminal" version = "0.1.1" diff --git a/Cargo.toml b/Cargo.toml index f72d3c80d3f06a..3fa7a2164a1ab9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ members = [ "ext/napi/sym", "ext/net", "ext/node", + "ext/telemetry", "ext/url", "ext/web", "ext/webgpu", @@ -82,6 +83,7 @@ deno_kv = { version = "0.87.0", path = "./ext/kv" } deno_napi = { version = "0.110.0", path = "./ext/napi" } deno_net = { version = "0.171.0", path = "./ext/net" } deno_node = { version = "0.116.0", path = "./ext/node" } +deno_telemetry = { version = "0.1.0", path = "./ext/telemetry" } deno_tls = { version = "0.166.0", path = "./ext/tls" } deno_url = { version = "0.179.0", path = "./ext/url" } deno_web = { version = "0.210.0", path = "./ext/web" } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d1ac3e160e089a..96bb206d0f092c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -83,6 +83,7 @@ deno_resolver.workspace = true deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_semver.workspace = true deno_task_shell = "=0.18.1" +deno_telemetry.workspace = true deno_terminal.workspace = true libsui = "0.5.0" node_resolver.workspace = true diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 5e89f88a91af52..dde4a8ab77e79d 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -36,7 +36,7 @@ use deno_path_util::normalize_path; use deno_path_util::url_to_file_path; use deno_runtime::deno_permissions::PermissionsOptions; use deno_runtime::deno_permissions::SysDescriptor; -use deno_runtime::ops::otel::OtelConfig; +use deno_telemetry::OtelConfig; use log::debug; use log::Level; use serde::Deserialize; @@ -2662,7 +2662,7 @@ By default, outdated dependencies are only displayed. Display outdated dependencies: deno outdated deno outdated --compatible - + Update dependencies: deno outdated --update deno outdated --update --latest @@ -3047,7 +3047,7 @@ fn task_subcommand() -> Command { List all available tasks: deno task - + Evaluate a task from string deno task --eval \"echo $(pwd)\"" ), diff --git a/cli/args/mod.rs b/cli/args/mod.rs index a1a9c49cbe4421..09149994110748 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -28,8 +28,8 @@ use deno_npm::npm_rc::ResolvedNpmRc; use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmSystemInfo; use deno_path_util::normalize_path; -use deno_runtime::ops::otel::OtelConfig; use deno_semver::npm::NpmPackageReqReference; +use deno_telemetry::OtelConfig; use import_map::resolve_import_map_value_from_specifier; pub use deno_config::deno_json::BenchConfig; diff --git a/cli/main.rs b/cli/main.rs index c49c8a83a6d54e..d47f1e363c4ba4 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -448,7 +448,7 @@ fn resolve_flags_and_init( }; if let Some(otel_config) = flags.otel_config() { - deno_runtime::ops::otel::init(otel_config)?; + deno_telemetry::init(otel_config)?; } util::logger::init(flags.log_level); diff --git a/cli/mainrt.rs b/cli/mainrt.rs index 2951aa711a46d0..7ad3b3744b075b 100644 --- a/cli/mainrt.rs +++ b/cli/mainrt.rs @@ -88,7 +88,7 @@ fn main() { match standalone { Ok(Some(data)) => { if let Some(otel_config) = data.metadata.otel_config.clone() { - deno_runtime::ops::otel::init(otel_config)?; + deno_telemetry::init(otel_config)?; } util::logger::init(data.metadata.log_level); load_env_vars(&data.metadata.env_vars_from_env_file); diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 791f5052c0ab80..b07b8e0823147f 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -47,11 +47,11 @@ use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_fs::RealFs; use deno_runtime::deno_io::fs::FsError; use deno_runtime::deno_node::PackageJson; -use deno_runtime::ops::otel::OtelConfig; use deno_semver::npm::NpmVersionReqParseError; use deno_semver::package::PackageReq; use deno_semver::Version; use deno_semver::VersionReqSpecifierParseError; +use deno_telemetry::OtelConfig; use indexmap::IndexMap; use log::Level; use serde::Deserialize; diff --git a/cli/util/logger.rs b/cli/util/logger.rs index f76663df2ce606..2b8987c3e7e2cc 100644 --- a/cli/util/logger.rs +++ b/cli/util/logger.rs @@ -29,7 +29,7 @@ impl log::Log for CliLogger { // thread's state DrawThread::hide(); self.0.log(record); - deno_runtime::ops::otel::handle_log(record); + deno_telemetry::handle_log(record); DrawThread::show(); } } diff --git a/cli/worker.rs b/cli/worker.rs index 5761571c5c0e56..e79ed614228bb5 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -30,7 +30,6 @@ use deno_runtime::deno_tls::RootCertStoreProvider; use deno_runtime::deno_web::BlobStore; use deno_runtime::fmt_errors::format_js_error; use deno_runtime::inspector_server::InspectorServer; -use deno_runtime::ops::otel::OtelConfig; use deno_runtime::ops::process::NpmProcessStateProviderRc; use deno_runtime::ops::worker_host::CreateWebWorkerCb; use deno_runtime::web_worker::WebWorker; @@ -43,6 +42,7 @@ use deno_runtime::BootstrapOptions; use deno_runtime::WorkerExecutionMode; use deno_runtime::WorkerLogLevel; use deno_semver::npm::NpmPackageReqReference; +use deno_telemetry::OtelConfig; use deno_terminal::colors; use node_resolver::NodeModuleKind; use node_resolver::NodeResolutionMode; diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index 3a77f6075e28bd..12b9c4582b7a1f 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -10,7 +10,7 @@ /// /// -import { core, internals, primordials } from "ext:core/mod.js"; +import { core, primordials } from "ext:core/mod.js"; import { op_fetch, op_fetch_promise_is_settled, @@ -32,7 +32,6 @@ const { SafePromisePrototypeFinally, String, StringPrototypeEndsWith, - StringPrototypeSlice, StringPrototypeStartsWith, StringPrototypeToLowerCase, TypeError, @@ -59,6 +58,17 @@ import { toInnerResponse, } from "ext:deno_fetch/23_response.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; +import { + endSpan, + enterSpan, + exitSpan, + Span, + TRACING_ENABLED, +} from "ext:deno_telemetry/telemetry.ts"; +import { + updateSpanFromRequest, + updateSpanFromResponse, +} from "ext:deno_telemetry/util.ts"; const REQUEST_BODY_HEADER_NAMES = [ "content-encoding", @@ -343,9 +353,9 @@ function httpRedirectFetch(request, response, terminator) { function fetch(input, init = { __proto__: null }) { let span; try { - if (internals.telemetry?.tracingEnabled) { - span = new internals.telemetry.Span("fetch", { kind: 2 }); - internals.telemetry.enterSpan(span); + if (TRACING_ENABLED) { + span = new Span("fetch", { kind: 2 }); + enterSpan(span); } // There is an async dispatch later that causes a stack trace disconnect. @@ -361,16 +371,7 @@ function fetch(input, init = { __proto__: null }) { const requestObject = new Request(input, init); if (span) { - span.updateName(requestObject.method); - span.setAttribute("http.request.method", requestObject.method); - const url = new URL(requestObject.url); - span.setAttribute("url.full", requestObject.url); - span.setAttribute( - "url.scheme", - StringPrototypeSlice(url.protocol, 0, -1), - ); - span.setAttribute("url.path", url.pathname); - span.setAttribute("url.query", StringPrototypeSlice(url.search, 1)); + updateSpanFromRequest(span, requestObject); } // 3. @@ -432,10 +433,7 @@ function fetch(input, init = { __proto__: null }) { responseObject = fromInnerResponse(response, "immutable"); if (span) { - span.setAttribute( - "http.response.status_code", - String(responseObject.status), - ); + updateSpanFromResponse(span, responseObject); } resolve(responseObject); @@ -457,7 +455,7 @@ function fetch(input, init = { __proto__: null }) { return result; } finally { if (span) { - internals.telemetry.endSpan(span); + endSpan(span); } } })(); @@ -471,18 +469,18 @@ function fetch(input, init = { __proto__: null }) { // XXX: This should always be true, otherwise `opPromise` would be present. if (op_fetch_promise_is_settled(result)) { // It's already settled. - internals.telemetry.endSpan(span); + endSpan(span); } else { // Not settled yet, we can return a new wrapper promise. return SafePromisePrototypeFinally(result, () => { - internals.telemetry.endSpan(span); + endSpan(span); }); } } return result; } finally { if (span) { - internals.telemetry.exitSpan(span); + exitSpan(span); } } } diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index 027c2710b2cc11..446533e91043f9 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -36,9 +36,7 @@ const { PromisePrototypeCatch, SafePromisePrototypeFinally, PromisePrototypeThen, - String, StringPrototypeIncludes, - StringPrototypeSlice, Symbol, TypeError, TypedArrayPrototypeGetSymbolToStringTag, @@ -91,6 +89,16 @@ import { } from "ext:deno_net/01_net.js"; import { hasTlsKeyPairOptions, listenTls } from "ext:deno_net/02_tls.js"; import { SymbolAsyncDispose } from "ext:deno_web/00_infra.js"; +import { + endSpan, + enterSpan, + Span, + TRACING_ENABLED, +} from "ext:deno_telemetry/telemetry.ts"; +import { + updateSpanFromRequest, + updateSpanFromResponse, +} from "ext:deno_telemetry/util.ts"; const _upgraded = Symbol("_upgraded"); @@ -527,16 +535,7 @@ function mapToCallback(context, callback, onError) { innerRequest.request = request; if (span) { - span.updateName(request.method); - span.setAttribute("http.request.method", request.method); - const url = new URL(request.url); - span.setAttribute("url.full", request.url); - span.setAttribute( - "url.scheme", - StringPrototypeSlice(url.protocol, 0, -1), - ); - span.setAttribute("url.path", url.pathname); - span.setAttribute("url.query", StringPrototypeSlice(url.search, 1)); + updateSpanFromRequest(span, request); } response = await callback( @@ -578,10 +577,7 @@ function mapToCallback(context, callback, onError) { } if (span) { - span.setAttribute( - "http.response.status_code", - String(response.status), - ); + updateSpanFromResponse(span, response); } const inner = toInnerResponse(response); @@ -617,8 +613,7 @@ function mapToCallback(context, callback, onError) { fastSyncResponseOrStream(req, inner.body, status, innerRequest); }; - if (internals.telemetry?.tracingEnabled) { - const { Span, enterSpan, endSpan } = internals.telemetry; + if (TRACING_ENABLED) { const origMapped = mapped; mapped = function (req, _span) { const oldCtx = getAsyncContext(); diff --git a/ext/telemetry/Cargo.toml b/ext/telemetry/Cargo.toml new file mode 100644 index 00000000000000..6e0c40e873c812 --- /dev/null +++ b/ext/telemetry/Cargo.toml @@ -0,0 +1,31 @@ +# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +[package] +name = "deno_telemetry" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +description = "Telemetry for Deno" + +[lib] +path = "lib.rs" + +[dependencies] +async-trait.workspace = true +deno_core.workspace = true +http-body-util.workspace = true +hyper.workspace = true +hyper-util.workspace = true +log.workspace = true +once_cell.workspace = true +opentelemetry.workspace = true +opentelemetry-http.workspace = true +opentelemetry-otlp.workspace = true +opentelemetry-semantic-conventions.workspace = true +opentelemetry_sdk.workspace = true +pin-project.workspace = true +serde.workspace = true +tokio.workspace = true diff --git a/ext/telemetry/README.md b/ext/telemetry/README.md new file mode 100644 index 00000000000000..6931a3b8964dc3 --- /dev/null +++ b/ext/telemetry/README.md @@ -0,0 +1,3 @@ +# `deno_telemetry` + +This crate implements telemetry for Deno using OpenTelemetry. diff --git a/runtime/ops/otel.rs b/ext/telemetry/lib.rs similarity index 96% rename from runtime/ops/otel.rs rename to ext/telemetry/lib.rs index 19f09d9f6d99de..1ce8ac1dcc77f5 100644 --- a/runtime/ops/otel.rs +++ b/ext/telemetry/lib.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::tokio_util::create_basic_runtime; use deno_core::anyhow; use deno_core::anyhow::anyhow; use deno_core::futures::channel::mpsc; @@ -59,7 +58,7 @@ type SpanProcessor = BatchSpanProcessor; type LogProcessor = BatchLogProcessor; deno_core::extension!( - deno_otel, + deno_telemetry, ops = [ op_otel_log, op_otel_instrumentation_scope_create_and_enter, @@ -73,6 +72,7 @@ deno_core::extension!( op_otel_span_set_dropped, op_otel_span_flush, ], + esm = ["telemetry.ts", "util.ts"], ); #[derive(Debug, Clone, Serialize, Deserialize)] @@ -111,7 +111,26 @@ fn otel_create_shared_runtime() -> UnboundedSender> { mpsc::unbounded::>(); thread::spawn(move || { - let rt = create_basic_runtime(); + let rt = tokio::runtime::Builder::new_current_thread() + .enable_io() + .enable_time() + // This limits the number of threads for blocking operations (like for + // synchronous fs ops) or CPU bound tasks like when we run dprint in + // parallel for deno fmt. + // The default value is 512, which is an unhelpfully large thread pool. We + // don't ever want to have more than a couple dozen threads. + .max_blocking_threads(if cfg!(windows) { + // on windows, tokio uses blocking tasks for child process IO, make sure + // we have enough available threads for other tasks to run + 4 * std::thread::available_parallelism() + .map(|n| n.get()) + .unwrap_or(8) + } else { + 32 + }) + .build() + .unwrap(); + rt.block_on(async move { while let Some(task) = spawn_task_rx.next().await { tokio::spawn(task); diff --git a/runtime/js/telemetry.ts b/ext/telemetry/telemetry.ts similarity index 98% rename from runtime/js/telemetry.ts rename to ext/telemetry/telemetry.ts index a98e5b0a19bcb5..03fbd83e2f6599 100644 --- a/runtime/js/telemetry.ts +++ b/ext/telemetry/telemetry.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { core, internals, primordials } from "ext:core/mod.js"; +import { core, primordials } from "ext:core/mod.js"; import { op_crypto_get_random_values, op_otel_instrumentation_scope_create_and_enter, @@ -38,7 +38,7 @@ const { } = primordials; const { AsyncVariable, setAsyncContext } = core; -let TRACING_ENABLED = false; +export let TRACING_ENABLED = false; let DETERMINISTIC = false; // Note: These start at 0 in the JS library, @@ -709,12 +709,3 @@ export const telemetry = { SpanExporter, ContextManager, }; -internals.telemetry = { - Span, - enterSpan, - exitSpan, - endSpan, - get tracingEnabled() { - return TRACING_ENABLED; - }, -}; diff --git a/ext/telemetry/util.ts b/ext/telemetry/util.ts new file mode 100644 index 00000000000000..7e30d5d859acc9 --- /dev/null +++ b/ext/telemetry/util.ts @@ -0,0 +1,27 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +import { primordials } from "ext:core/mod.js"; +import type { Span } from "ext:deno_telemetry/telemetry.ts"; + +const { String, StringPrototypeSlice } = primordials; + +export function updateSpanFromRequest(span: Span, request: Request) { + span.updateName(request.method); + + span.setAttribute("http.request.method", request.method); + const url = new URL(request.url); + span.setAttribute("url.full", request.url); + span.setAttribute( + "url.scheme", + StringPrototypeSlice(url.protocol, 0, -1), + ); + span.setAttribute("url.path", url.pathname); + span.setAttribute("url.query", StringPrototypeSlice(url.search, 1)); +} + +export function updateSpanFromResponse(span: Span, response: Response) { + span.setAttribute( + "http.response.status_code", + String(response.status), + ); +} diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 94fe4ce02bd2ac..1b960c2bdb93d6 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -90,6 +90,7 @@ deno_net.workspace = true deno_node.workspace = true deno_path_util.workspace = true deno_permissions.workspace = true +deno_telemetry.workspace = true deno_terminal.workspace = true deno_tls.workspace = true deno_url.workspace = true @@ -100,7 +101,6 @@ deno_websocket.workspace = true deno_webstorage.workspace = true node_resolver = { workspace = true, features = ["sync"] } -async-trait.workspace = true color-print.workspace = true dlopen2.workspace = true encoding_rs.workspace = true @@ -115,13 +115,7 @@ log.workspace = true netif = "0.1.6" notify.workspace = true once_cell.workspace = true -opentelemetry.workspace = true -opentelemetry-http.workspace = true -opentelemetry-otlp.workspace = true -opentelemetry-semantic-conventions.workspace = true -opentelemetry_sdk.workspace = true percent-encoding.workspace = true -pin-project.workspace = true regex.workspace = true rustyline = { workspace = true, features = ["custom-bindings"] } same-file = "1.0.6" diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 6300f599d90e16..a510ee33c4b5d0 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -29,7 +29,7 @@ import * as tty from "ext:runtime/40_tty.js"; import * as kv from "ext:deno_kv/01_db.ts"; import * as cron from "ext:deno_cron/01_cron.ts"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; -import * as telemetry from "ext:runtime/telemetry.ts"; +import * as telemetry from "ext:deno_telemetry/telemetry.ts"; const denoNs = { Process: process.Process, diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index eedca3396ec3be..e3b14fdafa8719 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -86,7 +86,7 @@ import { workerRuntimeGlobalProperties, } from "ext:runtime/98_global_scope_worker.js"; import { SymbolDispose, SymbolMetadata } from "ext:deno_web/00_infra.js"; -import { bootstrap as bootstrapOtel } from "ext:runtime/telemetry.ts"; +import { bootstrap as bootstrapOtel } from "ext:deno_telemetry/telemetry.ts"; // deno-lint-ignore prefer-primordials if (Symbol.metadata) { diff --git a/runtime/lib.rs b/runtime/lib.rs index a6e60ced186cf4..53d4f265e0d488 100644 --- a/runtime/lib.rs +++ b/runtime/lib.rs @@ -148,7 +148,7 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[ ]; pub fn exit(code: i32) -> ! { - crate::ops::otel::flush(); + deno_telemetry::flush(); #[allow(clippy::disallowed_methods)] std::process::exit(code); } diff --git a/runtime/ops/mod.rs b/runtime/ops/mod.rs index c2e402f33c967f..67065b901b8504 100644 --- a/runtime/ops/mod.rs +++ b/runtime/ops/mod.rs @@ -4,7 +4,6 @@ pub mod bootstrap; pub mod fs_events; pub mod http; pub mod os; -pub mod otel; pub mod permissions; pub mod process; pub mod runtime; diff --git a/runtime/shared.rs b/runtime/shared.rs index b1f383b03d4d6c..f7d76f67a760da 100644 --- a/runtime/shared.rs +++ b/runtime/shared.rs @@ -47,7 +47,6 @@ extension!(runtime, "40_signals.js", "40_tty.js", "41_prompt.js", - "telemetry.ts", "90_deno_ns.js", "98_global_scope_shared.js", "98_global_scope_window.js", diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs index 3bf515131f6f32..48c500ef7490f7 100644 --- a/runtime/snapshot.rs +++ b/runtime/snapshot.rs @@ -268,6 +268,7 @@ pub fn create_runtime_snapshot( // `runtime/worker.rs`, `runtime/web_worker.rs` and `runtime/snapshot.rs`! let fs = std::sync::Arc::new(deno_fs::RealFs); let mut extensions: Vec = vec![ + deno_telemetry::deno_telemetry::init_ops_and_esm(), deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), deno_url::deno_url::init_ops_and_esm(), @@ -314,7 +315,6 @@ pub fn create_runtime_snapshot( ), ops::fs_events::deno_fs_events::init_ops(), ops::os::deno_os::init_ops(Default::default()), - ops::otel::deno_otel::init_ops(), ops::permissions::deno_permissions::init_ops(), ops::process::deno_process::init_ops(None), ops::signal::deno_signal::init_ops(), diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 214ae59c80b7b6..e3a69b39c05b8f 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -440,6 +440,7 @@ impl WebWorker { // `runtime/worker.rs` and `runtime/snapshot.rs`! let mut extensions = vec![ + deno_telemetry::deno_telemetry::init_ops_and_esm(), // Web APIs deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), @@ -517,7 +518,6 @@ impl WebWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os_worker::init_ops_and_esm(), - ops::otel::deno_otel::init_ops_and_esm(), ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, diff --git a/runtime/worker.rs b/runtime/worker.rs index 65fc99c766ba95..46fbd7b43f5c1e 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -348,6 +348,7 @@ impl MainWorker { // NOTE(bartlomieju): ordering is important here, keep it in sync with // `runtime/web_worker.rs` and `runtime/snapshot.rs`! let mut extensions = vec![ + deno_telemetry::deno_telemetry::init_ops_and_esm(), // Web APIs deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), @@ -428,7 +429,6 @@ impl MainWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os::init_ops_and_esm(exit_code.clone()), - ops::otel::deno_otel::init_ops_and_esm(), ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs index 3f5c245a0faacd..4a8c5dba86f91f 100644 --- a/runtime/worker_bootstrap.rs +++ b/runtime/worker_bootstrap.rs @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::ops::otel::OtelConfig; use deno_core::v8; use deno_core::ModuleSpecifier; +use deno_telemetry::OtelConfig; use serde::Serialize; use std::cell::RefCell; use std::thread; diff --git a/tools/core_import_map.json b/tools/core_import_map.json index 38ffe55858d932..bc0674277e8017 100644 --- a/tools/core_import_map.json +++ b/tools/core_import_map.json @@ -247,8 +247,9 @@ "ext:runtime/41_prompt.js": "../runtime/js/41_prompt.js", "ext:runtime/90_deno_ns.js": "../runtime/js/90_deno_ns.js", "ext:runtime/98_global_scope.js": "../runtime/js/98_global_scope.js", - "ext:runtime/telemetry.ts": "../runtime/js/telemetry.ts", "ext:deno_node/_util/std_fmt_colors.ts": "../ext/node/polyfills/_util/std_fmt_colors.ts", + "ext:deno_telemetry/telemetry.ts": "../ext/deno_telemetry/telemetry.ts", + "ext:deno_telemetry/util.ts": "../ext/deno_telemetry/util.ts", "@std/archive": "../tests/util/std/archive/mod.ts", "@std/archive/tar": "../tests/util/std/archive/tar.ts", "@std/archive/untar": "../tests/util/std/archive/untar.ts", From 584631d28135cdc82e2781cbf56d12683181fce5 Mon Sep 17 00:00:00 2001 From: hongmengning Date: Tue, 26 Nov 2024 20:07:40 +0800 Subject: [PATCH 408/436] docs(cli): remove redundant word in comment (#27055) --- cli/util/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/util/fs.rs b/cli/util/fs.rs index d36c02242cec47..ba84a0e8f33d06 100644 --- a/cli/util/fs.rs +++ b/cli/util/fs.rs @@ -659,7 +659,7 @@ impl LaxSingleProcessFsFlag { // // This uses a blocking task because we use a single threaded // runtime and this is time sensitive so we don't want it to update - // at the whims of of whatever is occurring on the runtime thread. + // at the whims of whatever is occurring on the runtime thread. spawn_blocking({ let token = token.clone(); let last_updated_path = last_updated_path.clone(); From 4f776a7d491e3d933f78c01fd9c596d6bf90397e Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 26 Nov 2024 22:51:57 +0900 Subject: [PATCH 409/436] chore: update node_compat setup script, show remaining percentage (#27053) --- tests/node_compat/runner/TODO.md | 2 ++ tests/node_compat/runner/setup.ts | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 135d45dd8fcd10..ef1f36840aff18 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1,6 +1,8 @@ # Remaining Node Tests +594 tests out of 3681 have been ported from Node 20.11.1 (16.14% ported, 83.97% remaining). + NOTE: This file should not be manually edited. Please edit `tests/node_compat/config.json` and run `deno task setup` in `tests/node_compat/runner` dir instead. - [abort/test-abort-backtrace.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-backtrace.js) diff --git a/tests/node_compat/runner/setup.ts b/tests/node_compat/runner/setup.ts index 5daa42df76caf7..32c0e2a63aee40 100755 --- a/tests/node_compat/runner/setup.ts +++ b/tests/node_compat/runner/setup.ts @@ -74,15 +74,24 @@ async function updateToDo() { truncate: true, }); - const missingTests = withoutAll(await getNodeTests(), await getDenoTests()); + const nodeTests = await getNodeTests(); + const portedTests = getDenoTests(); + const remainingTests = withoutAll(nodeTests, portedTests); + const numPorted = portedTests.length; + const numMissing = remainingTests.length; + const numTotal = nodeTests.length; + const portedPercentage = (numPorted / numTotal * 100).toFixed(2); + const remainingPercentage = (numMissing / numTotal * 100).toFixed(2); await file.write(encoder.encode(` # Remaining Node Tests +${numPorted} tests out of ${numTotal} have been ported from Node ${NODE_VERSION} (${portedPercentage}% ported, ${remainingPercentage}% remaining). + NOTE: This file should not be manually edited. Please edit \`tests/node_compat/config.json\` and run \`deno task setup\` in \`tests/node_compat/runner\` dir instead. `)); - for (const test of missingTests) { + for (const test of remainingTests) { await file.write( encoder.encode( `- [${test}](https://github.com/nodejs/node/tree/v${NODE_VERSION}/test/${test})\n`, From 4c567677bf4d7ec4b97c14590fd76f2dc9fcd04b Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 26 Nov 2024 09:19:13 -0500 Subject: [PATCH 410/436] chore(node/tests): increase tolerance of timers test on CI (#27077) Increases the tolerance of the interval test on the CI. --- tests/unit_node/timers_test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit_node/timers_test.ts b/tests/unit_node/timers_test.ts index ddc6dc0d85dd45..10c42e892c2a5c 100644 --- a/tests/unit_node/timers_test.ts +++ b/tests/unit_node/timers_test.ts @@ -118,7 +118,7 @@ Deno.test({ expectedValue: 42, intervalMs: 100, iterations: 3, - tolerancePercent: 50, + tolerancePercent: Deno.env.get("CI") != null ? 75 : 50, }; const { setInterval } = timersPromises; @@ -200,6 +200,7 @@ Deno.test({ const INTERVAL_MS = 500; const TOTAL_DURATION_MS = 3000; const TOLERANCE_MS = 500; + const DELTA_TOLERANCE_MS = Deno.env.get("CI") != null ? 100 : 50; const abortController = new AbortController(); const { setInterval } = timersPromises; @@ -247,14 +248,14 @@ Deno.test({ ); intervalDeltas.forEach((delta, i) => { - const isIntervalValid = delta >= (INTERVAL_MS - 50) && - delta <= (INTERVAL_MS + 50); + const isIntervalValid = delta >= (INTERVAL_MS - DELTA_TOLERANCE_MS) && + delta <= (INTERVAL_MS + DELTA_TOLERANCE_MS); assertEquals( isIntervalValid, true, `Interval ${ i + 1 - } duration (${delta}ms) should be within ±50ms of ${INTERVAL_MS}ms`, + } duration (${delta}ms) should be within ±${DELTA_TOLERANCE_MS}ms of ${INTERVAL_MS}ms`, ); }); }, From 3a55b6781510d496c6da24e166f6e3c38b91138b Mon Sep 17 00:00:00 2001 From: Ian Bull Date: Tue, 26 Nov 2024 06:23:09 -0800 Subject: [PATCH 411/436] chore(compile): prefer denort binary in target/ directory when available (#27052) Enhances the deno compile workflow for denort development by automatically checking for a denort binary in the same directory as the deno binary, provided both are located within a target/ directory. If found, this denort binary will be used. Key points: - The DENORT_BIN environment variable remains supported for explicitly specifying a custom denort binary path. - Includes additional logic to verify if the deno binary is a symlink pointing to an executable in the target/ directory. --------- Signed-off-by: Ian Bull --- cli/standalone/binary.rs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index b07b8e0823147f..6f85266b05d5ae 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -4,6 +4,7 @@ use std::borrow::Cow; use std::collections::BTreeMap; use std::collections::HashMap; use std::collections::VecDeque; +use std::env; use std::env::current_exe; use std::ffi::OsString; use std::fs; @@ -15,6 +16,7 @@ use std::io::Seek; use std::io::SeekFrom; use std::io::Write; use std::ops::Range; +use std::path::Component; use std::path::Path; use std::path::PathBuf; use std::process::Command; @@ -457,7 +459,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { // // Phase 2 of the 'min sized' deno compile RFC talks // about adding this as a flag. - if let Some(path) = std::env::var_os("DENORT_BIN") { + if let Some(path) = get_dev_binary_path() { return std::fs::read(&path).with_context(|| { format!("Could not find denort at '{}'", path.to_string_lossy()) }); @@ -908,6 +910,31 @@ impl<'a> DenoCompileBinaryWriter<'a> { } } +fn get_denort_path(deno_exe: PathBuf) -> Option { + let mut denort = deno_exe; + denort.set_file_name(if cfg!(windows) { + "denort.exe" + } else { + "denort" + }); + denort.exists().then(|| denort.into_os_string()) +} + +fn get_dev_binary_path() -> Option { + env::var_os("DENORT_BIN").or_else(|| { + env::current_exe().ok().and_then(|exec_path| { + if exec_path + .components() + .any(|component| component == Component::Normal("target".as_ref())) + { + get_denort_path(exec_path) + } else { + None + } + }) + }) +} + /// This function returns the environment variables specified /// in the passed environment file. fn get_file_env_vars( From 93bbbe418446ded1a0f1f98c18053f60c33a7941 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 26 Nov 2024 08:08:46 -0800 Subject: [PATCH 412/436] fix(ext/fetch): don't throw when `bodyUsed` inspect after upgrade (#27088) Fixes https://github.com/denoland/deno/issues/27083 --- ext/fetch/22_body.js | 9 +++++-- tests/unit/serve_test.ts | 52 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js index c7e977c0b434c6..a34758d19a532c 100644 --- a/ext/fetch/22_body.js +++ b/ext/fetch/22_body.js @@ -286,8 +286,13 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { */ get() { webidl.assertBranded(this, prototype); - if (this[bodySymbol] !== null) { - return this[bodySymbol].consumed(); + try { + if (this[bodySymbol] !== null) { + return this[bodySymbol].consumed(); + } + } catch (_) { + // Request is closed. + return true; } return false; }, diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts index 7d8c6ca06d1d37..f5896bc64b26c1 100644 --- a/tests/unit/serve_test.ts +++ b/tests/unit/serve_test.ts @@ -4327,3 +4327,55 @@ Deno.test({ await server.shutdown(); }); + +// https://github.com/denoland/deno/issues/27083 +Deno.test( + { permissions: { net: true } }, + async function httpServerWebSocketInspectRequest() { + const ac = new AbortController(); + const listeningDeferred = Promise.withResolvers(); + const doneDeferred = Promise.withResolvers(); + const server = Deno.serve({ + handler: (request) => { + const { + response, + socket, + } = Deno.upgradeWebSocket(request); + + socket.onopen = () => { + Deno.inspect(request); // should not throw + }; + socket.onerror = (e) => { + console.error(e); + fail(); + }; + socket.onmessage = (m) => { + socket.send(m.data); + socket.close(1001); + }; + socket.onclose = () => doneDeferred.resolve(); + return response; + }, + port: servePort, + signal: ac.signal, + onListen: onListen(listeningDeferred.resolve), + onError: createOnErrorCb(ac), + }); + + await listeningDeferred.promise; + const def = Promise.withResolvers(); + const ws = new WebSocket(`ws://localhost:${servePort}`); + ws.onmessage = (m) => assertEquals(m.data, "foo"); + ws.onerror = (e) => { + console.error(e); + fail(); + }; + ws.onclose = () => def.resolve(); + ws.onopen = () => ws.send("foo"); + + await def.promise; + await doneDeferred.promise; + ac.abort(); + await server.finished; + }, +); From c443ac5d14aec113dde5024e3163fae719439d7f Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Tue, 26 Nov 2024 10:45:18 -0800 Subject: [PATCH 413/436] fix(ext/webgpu): normalize limits to number (#27072) Fixes #22029 --- ext/webgpu/01_webgpu.js | 82 +++++++++++++++++++++++++-------------- tests/unit/webgpu_test.ts | 51 ++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 30 deletions(-) diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index cab5cbbdbc9c5c..e9dd6c203e161b 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -98,6 +98,11 @@ const { ArrayPrototypePush, DataViewPrototypeGetBuffer, Error, + Number, + NumberPOSITIVE_INFINITY, + NumberMAX_SAFE_INTEGER, + NumberNEGATIVE_INFINITY, + NumberMIN_SAFE_INTEGER, MathMax, ObjectDefineProperty, ObjectHasOwn, @@ -614,6 +619,19 @@ function createGPUSupportedLimits(limits) { return adapterFeatures; } +function normalizeLimit(limit) { + if (typeof num === "bigint") { + limit = Number(limit); + if (limit === NumberPOSITIVE_INFINITY) { + limit = NumberMAX_SAFE_INTEGER; + } else if (limit === NumberNEGATIVE_INFINITY) { + limit = NumberMIN_SAFE_INTEGER; + } + } + + return limit; +} + /** * @typedef InnerAdapterLimits * @property {number} maxTextureDimension1D @@ -653,123 +671,127 @@ class GPUSupportedLimits { get maxTextureDimension1D() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureDimension1D; + return normalizeLimit(this[_limits].maxTextureDimension1D); } get maxTextureDimension2D() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureDimension2D; + return normalizeLimit(this[_limits].maxTextureDimension2D); } get maxTextureDimension3D() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureDimension3D; + return normalizeLimit(this[_limits].maxTextureDimension3D); } get maxTextureArrayLayers() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureArrayLayers; + return normalizeLimit(this[_limits].maxTextureArrayLayers); } get maxBindGroups() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxBindGroups; + return normalizeLimit(this[_limits].maxBindGroups); } get maxBindingsPerBindGroup() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxBindingsPerBindGroup; + return normalizeLimit(this[_limits].maxBindingsPerBindGroup); } get maxBufferSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxBufferSize; + return normalizeLimit(this[_limits].maxBufferSize); } get maxDynamicUniformBuffersPerPipelineLayout() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxDynamicUniformBuffersPerPipelineLayout; + return normalizeLimit( + this[_limits].maxDynamicUniformBuffersPerPipelineLayout, + ); } get maxDynamicStorageBuffersPerPipelineLayout() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxDynamicStorageBuffersPerPipelineLayout; + return normalizeLimit( + this[_limits].maxDynamicStorageBuffersPerPipelineLayout, + ); } get maxSampledTexturesPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxSampledTexturesPerShaderStage; + return normalizeLimit(this[_limits].maxSampledTexturesPerShaderStage); } get maxSamplersPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxSamplersPerShaderStage; + return normalizeLimit(this[_limits].maxSamplersPerShaderStage); } get maxStorageBuffersPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxStorageBuffersPerShaderStage; + return normalizeLimit(this[_limits].maxStorageBuffersPerShaderStage); } get maxStorageTexturesPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxStorageTexturesPerShaderStage; + return normalizeLimit(this[_limits].maxStorageTexturesPerShaderStage); } get maxUniformBuffersPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxUniformBuffersPerShaderStage; + return normalizeLimit(this[_limits].maxUniformBuffersPerShaderStage); } get maxUniformBufferBindingSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxUniformBufferBindingSize; + return normalizeLimit(this[_limits].maxUniformBufferBindingSize); } get maxStorageBufferBindingSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxStorageBufferBindingSize; + return normalizeLimit(this[_limits].maxStorageBufferBindingSize); } get minUniformBufferOffsetAlignment() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].minUniformBufferOffsetAlignment; + return normalizeLimit(this[_limits].minUniformBufferOffsetAlignment); } get minStorageBufferOffsetAlignment() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].minStorageBufferOffsetAlignment; + return normalizeLimit(this[_limits].minStorageBufferOffsetAlignment); } get maxVertexBuffers() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxVertexBuffers; + return normalizeLimit(this[_limits].maxVertexBuffers); } get maxVertexAttributes() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxVertexAttributes; + return normalizeLimit(this[_limits].maxVertexAttributes); } get maxVertexBufferArrayStride() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxVertexBufferArrayStride; + return normalizeLimit(this[_limits].maxVertexBufferArrayStride); } get maxInterStageShaderComponents() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxInterStageShaderComponents; + return normalizeLimit(this[_limits].maxInterStageShaderComponents); } get maxColorAttachments() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxColorAttachments; + return normalizeLimit(this[_limits].maxColorAttachments); } get maxColorAttachmentBytesPerSample() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxColorAttachmentBytesPerSample; + return normalizeLimit(this[_limits].maxColorAttachmentBytesPerSample); } get maxComputeWorkgroupStorageSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupStorageSize; + return normalizeLimit(this[_limits].maxComputeWorkgroupStorageSize); } get maxComputeInvocationsPerWorkgroup() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeInvocationsPerWorkgroup; + return normalizeLimit(this[_limits].maxComputeInvocationsPerWorkgroup); } get maxComputeWorkgroupSizeX() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupSizeX; + return normalizeLimit(this[_limits].maxComputeWorkgroupSizeX); } get maxComputeWorkgroupSizeY() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupSizeY; + return normalizeLimit(this[_limits].maxComputeWorkgroupSizeY); } get maxComputeWorkgroupSizeZ() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupSizeZ; + return normalizeLimit(this[_limits].maxComputeWorkgroupSizeZ); } get maxComputeWorkgroupsPerDimension() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupsPerDimension; + return normalizeLimit(this[_limits].maxComputeWorkgroupsPerDimension); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { diff --git a/tests/unit/webgpu_test.ts b/tests/unit/webgpu_test.ts index 6c91abe4ade1b5..aac75d34206d76 100644 --- a/tests/unit/webgpu_test.ts +++ b/tests/unit/webgpu_test.ts @@ -553,6 +553,57 @@ Deno.test({ device.destroy(); }); +Deno.test({ + ignore: isWsl || isCIWithoutGPU, +}, async function adapterLimitsAreNumbers() { + const limitNames = [ + "maxTextureDimension1D", + "maxTextureDimension2D", + "maxTextureDimension3D", + "maxTextureArrayLayers", + "maxBindGroups", + "maxDynamicUniformBuffersPerPipelineLayout", + "maxDynamicStorageBuffersPerPipelineLayout", + "maxSampledTexturesPerShaderStage", + "maxSamplersPerShaderStage", + "maxStorageBuffersPerShaderStage", + "maxStorageTexturesPerShaderStage", + "maxUniformBuffersPerShaderStage", + "maxUniformBufferBindingSize", + "maxStorageBufferBindingSize", + "minUniformBufferOffsetAlignment", + "minStorageBufferOffsetAlignment", + "maxVertexBuffers", + "maxVertexAttributes", + "maxVertexBufferArrayStride", + "maxInterStageShaderComponents", + "maxComputeWorkgroupStorageSize", + "maxComputeInvocationsPerWorkgroup", + "maxComputeWorkgroupSizeX", + "maxComputeWorkgroupSizeY", + "maxComputeWorkgroupSizeZ", + "maxComputeWorkgroupsPerDimension", + ]; + + const adapter = await navigator.gpu.requestAdapter(); + assert(adapter); + + for (const limitName of limitNames) { + // deno-lint-ignore ban-ts-comment + // @ts-ignore + assertEquals(typeof adapter.limits[limitName], "number"); + } + + const device = await adapter.requestDevice({ + // deno-lint-ignore ban-ts-comment + // @ts-ignore + requiredLimits: adapter.limits, + }); + assert(device); + + device.destroy(); +}); + async function checkIsWsl() { return Deno.build.os === "linux" && await hasMicrosoftProcVersion(); From 115a3066565c96500ad740a8c6a3b4ef99af7fb0 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 26 Nov 2024 14:38:24 -0500 Subject: [PATCH 414/436] fix(node): correct resolution of dynamic import of esm from cjs (#27071) Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution. Also adds fixes (adds) support for `"resolution-mode"` in TypeScript. --- Cargo.lock | 153 +-------- cli/Cargo.toml | 4 +- cli/cache/module_info.rs | 24 +- cli/graph_util.rs | 64 ++-- cli/lsp/analysis.rs | 63 ++-- cli/lsp/completions.rs | 52 ++- cli/lsp/diagnostics.rs | 6 +- cli/lsp/documents.rs | 76 +++-- cli/lsp/language_server.rs | 26 +- cli/lsp/resolver.rs | 64 ++-- cli/lsp/tsc.rs | 30 +- cli/module_loader.rs | 27 +- cli/resolver.rs | 40 +-- cli/standalone/mod.rs | 20 +- cli/tools/doc.rs | 28 +- cli/tools/info.rs | 35 +- cli/tools/lint/rules/no_sloppy_imports.rs | 22 +- cli/tools/registry/diagnostics.rs | 14 +- cli/tools/registry/unfurl.rs | 14 +- cli/tools/repl/session.rs | 16 +- cli/tsc/99_main_compiler.js | 73 +++-- cli/tsc/mod.rs | 63 ++-- cli/worker.rs | 8 +- ext/node/ops/require.rs | 16 +- resolvers/deno/cjs.rs | 92 +++--- resolvers/deno/lib.rs | 42 +-- resolvers/deno/npm/mod.rs | 34 +- resolvers/deno/sloppy_imports.rs | 36 ++- resolvers/node/analyze.rs | 20 +- resolvers/node/errors.rs | 32 +- resolvers/node/lib.rs | 4 +- resolvers/node/resolution.rs | 303 ++++++++++-------- .../__test__.jsonc | 44 +++ .../dynamic_import_and_require_dual/check.out | 5 + .../dynamic_import_and_require_dual/index.cts | 8 + .../dynamic_import_and_require_dual/index.mjs | 11 + .../jsdoc_import_decl.js | 12 + .../jsdoc_import_decl.out | 5 + .../node_modules/package/mod.d.mts | 1 + .../node_modules/package/mod.mjs | 1 + .../node_modules/package/package.json | 11 + .../node_modules/package/require.cjs | 1 + .../node_modules/package/require.d.cts | 1 + .../package.json | 6 + .../resolution_mode_import.mts | 6 + .../resolution_mode_import.out | 5 + .../resolution_mode_require.mts | 6 + .../resolution_mode_require.out | 5 + .../resolution_mode_require_import_type.out | 0 .../resolution_mode_require_import_type.ts | 5 + .../resolution_mode_require_jsdoc.js | 12 + .../resolution_mode_require_jsdoc.out | 5 + .../run_cjs.out | 2 + .../run_mts.out | 3 + .../npm/info_chalk_display/__test__.jsonc | 4 +- .../info_chalk_display/cjs_with_deps/main.out | 33 -- .../cjs_with_deps/main_info_json.out | 148 --------- .../cjs_with_deps/main_node_modules.out | 47 --- .../{cjs_with_deps => }/main.js | 0 .../main_info.out | 2 +- .../__test__.jsonc | 4 +- .../cjs_with_deps/main.out | 33 -- .../cjs_with_deps/main_info.out | 22 -- .../cjs_with_deps/main_info_json.out | 148 --------- .../cjs_with_deps/main_node_modules.out | 47 --- .../{cjs_with_deps => }/main.js | 0 .../main_info.out | 2 +- .../specs/npm/info_chalk_json/__test__.jsonc | 4 +- .../info_chalk_json/cjs_with_deps/main.out | 33 -- .../cjs_with_deps/main_node_modules.out | 47 --- .../{cjs_with_deps => }/main.js | 0 .../{cjs_with_deps => }/main_info_json.out | 0 .../__test__.jsonc | 4 +- .../cjs_with_deps/main.out | 33 -- .../cjs_with_deps/main_info.out | 22 -- .../cjs_with_deps/main_node_modules.out | 47 --- .../{cjs_with_deps => }/main.js | 0 .../{cjs_with_deps => }/main_info_json.out | 0 tests/specs/npm/info_peer_deps/__test__.jsonc | 4 +- .../main.ts | 0 .../main_info.out | 2 +- .../peer_deps_with_copied_folders/main.out | 14 - .../main_info_json.out | 97 ------ .../main_node_modules.out | 9 - .../main_node_modules_reload.out | 19 -- .../npm/info_peer_deps_json/__test__.jsonc | 4 +- .../main.ts | 0 .../main_info_json.out | 0 .../peer_deps_with_copied_folders/main.out | 14 - .../main_info.out | 14 - .../main_node_modules.out | 9 - .../main_node_modules_reload.out | 19 -- 92 files changed, 868 insertions(+), 1673 deletions(-) create mode 100644 tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc create mode 100644 tests/specs/node/dynamic_import_and_require_dual/check.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/index.cts create mode 100644 tests/specs/node/dynamic_import_and_require_dual/index.mjs create mode 100644 tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js create mode 100644 tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts create mode 100644 tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs create mode 100644 tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json create mode 100644 tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs create mode 100644 tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts create mode 100644 tests/specs/node/dynamic_import_and_require_dual/package.json create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js create mode 100644 tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/run_cjs.out create mode 100644 tests/specs/node/dynamic_import_and_require_dual/run_mts.out delete mode 100644 tests/specs/npm/info_chalk_display/cjs_with_deps/main.out delete mode 100644 tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out delete mode 100644 tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out rename tests/specs/npm/info_chalk_display/{cjs_with_deps => }/main.js (100%) rename tests/specs/npm/{info_chalk_json/cjs_with_deps => info_chalk_display}/main_info.out (94%) delete mode 100644 tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out delete mode 100644 tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out delete mode 100644 tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out delete mode 100644 tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out rename tests/specs/npm/info_chalk_display_node_modules_dir/{cjs_with_deps => }/main.js (100%) rename tests/specs/npm/{info_chalk_display/cjs_with_deps => info_chalk_display_node_modules_dir}/main_info.out (94%) delete mode 100644 tests/specs/npm/info_chalk_json/cjs_with_deps/main.out delete mode 100644 tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out rename tests/specs/npm/info_chalk_json/{cjs_with_deps => }/main.js (100%) rename tests/specs/npm/info_chalk_json/{cjs_with_deps => }/main_info_json.out (100%) delete mode 100644 tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out delete mode 100644 tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out delete mode 100644 tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out rename tests/specs/npm/info_chalk_json_node_modules_dir/{cjs_with_deps => }/main.js (100%) rename tests/specs/npm/info_chalk_json_node_modules_dir/{cjs_with_deps => }/main_info_json.out (100%) rename tests/specs/npm/info_peer_deps/{peer_deps_with_copied_folders => }/main.ts (100%) rename tests/specs/npm/info_peer_deps/{peer_deps_with_copied_folders => }/main_info.out (91%) delete mode 100644 tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out delete mode 100644 tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out delete mode 100644 tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out delete mode 100644 tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out rename tests/specs/npm/info_peer_deps_json/{peer_deps_with_copied_folders => }/main.ts (100%) rename tests/specs/npm/info_peer_deps_json/{peer_deps_with_copied_folders => }/main_info_json.out (100%) delete mode 100644 tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out delete mode 100644 tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out delete mode 100644 tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out delete mode 100644 tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out diff --git a/Cargo.lock b/Cargo.lock index 00b4da07cd64bd..5f59c936e88b8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,19 +128,6 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[package]] -name = "ammonia" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab99eae5ee58501ab236beb6f20f6ca39be615267b014899c89b2f0bc18a459" -dependencies = [ - "html5ever", - "maplit", - "once_cell", - "tendril", - "url", -] - [[package]] name = "android_system_properties" version = "0.1.5" @@ -1557,18 +1544,16 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.160.0" +version = "0.161.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2baa33e5d1ed235209c2990f5fe9644bac6b9e7bcb789dd92894f907b09ad7" +checksum = "32d994915f85e873865fc341e592080a487b0a987d06177016b2d93fd62162f8" dependencies = [ - "ammonia", "anyhow", "cfg-if", "comrak", "deno_ast", "deno_graph", "deno_path_util", - "futures", "handlebars", "html-escape", "import_map", @@ -1665,9 +1650,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.85.1" +version = "0.86.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c11027d9b4e9ff4f8bcb8316a1a5dd5241dc267380507e177457bc491696189" +checksum = "4c3f4be49dad28e794ff4eeb2daaf7956c97f8557097ef6f9c3ff1292e0a5c28" dependencies = [ "anyhow", "async-trait", @@ -3265,16 +3250,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - [[package]] name = "futures" version = "0.3.30" @@ -3802,20 +3777,6 @@ dependencies = [ "utf8-width", ] -[[package]] -name = "html5ever" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn 2.0.87", -] - [[package]] name = "http" version = "0.2.12" @@ -4663,12 +4624,6 @@ dependencies = [ "serde_repr", ] -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - [[package]] name = "malloc_buf" version = "0.0.6" @@ -4691,26 +4646,6 @@ dependencies = [ "tiny_pretty", ] -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "markup5ever" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" -dependencies = [ - "log", - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - [[package]] name = "markup_fmt" version = "0.16.0" @@ -5468,27 +5403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_codegen" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" -dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand", + "phf_shared", ] [[package]] @@ -5497,7 +5412,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared 0.11.2", + "phf_shared", "rand", ] @@ -5507,22 +5422,13 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", + "phf_generator", + "phf_shared", "proc-macro2", "quote", "syn 2.0.87", ] -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - [[package]] name = "phf_shared" version = "0.11.2" @@ -5645,12 +5551,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "pretty_assertions" version = "1.4.0" @@ -6985,32 +6885,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - [[package]] name = "string_enum" version = "0.4.4" @@ -7598,17 +7472,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - [[package]] name = "termcolor" version = "1.4.1" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 96bb206d0f092c..fd28b315d41e55 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -72,8 +72,8 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa deno_cache_dir.workspace = true deno_config.workspace = true deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } -deno_doc = { version = "0.160.0", features = ["rust", "comrak"] } -deno_graph = { version = "=0.85.1" } +deno_doc = { version = "=0.161.1", features = ["rust", "comrak"] } +deno_graph = { version = "=0.86.2" } deno_lint = { version = "=0.68.0", features = ["docs"] } deno_lockfile.workspace = true deno_npm.workspace = true diff --git a/cli/cache/module_info.rs b/cli/cache/module_info.rs index 060a6f4f0c94c4..469e2fafac3732 100644 --- a/cli/cache/module_info.rs +++ b/cli/cache/module_info.rs @@ -284,6 +284,7 @@ fn serialize_media_type(media_type: MediaType) -> i64 { #[cfg(test)] mod test { + use deno_graph::JsDocImportInfo; use deno_graph::PositionRange; use deno_graph::SpecifierWithRange; @@ -308,18 +309,21 @@ mod test { ); let mut module_info = ModuleInfo::default(); - module_info.jsdoc_imports.push(SpecifierWithRange { - range: PositionRange { - start: deno_graph::Position { - line: 0, - character: 3, - }, - end: deno_graph::Position { - line: 1, - character: 2, + module_info.jsdoc_imports.push(JsDocImportInfo { + specifier: SpecifierWithRange { + range: PositionRange { + start: deno_graph::Position { + line: 0, + character: 3, + }, + end: deno_graph::Position { + line: 1, + character: 2, + }, }, + text: "test".to_string(), }, - text: "test".to_string(), + resolution_mode: None, }); cache .set_module_info( diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 6ed0506dd70b30..360021d22d62c9 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -25,7 +25,7 @@ use deno_config::deno_json::JsxImportSourceConfig; use deno_config::workspace::JsrPackageConfig; use deno_core::anyhow::bail; use deno_graph::source::LoaderChecksum; -use deno_graph::source::ResolutionMode; +use deno_graph::source::ResolutionKind; use deno_graph::FillFromLockfileOptions; use deno_graph::JsrLoadError; use deno_graph::ModuleLoadError; @@ -44,7 +44,7 @@ use deno_graph::ModuleGraphError; use deno_graph::ResolutionError; use deno_graph::SpecifierError; use deno_path_util::url_to_file_path; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node; use deno_runtime::deno_permissions::PermissionsContainer; @@ -795,7 +795,7 @@ fn enhanced_sloppy_imports_error_message( ModuleError::LoadingErr(specifier, _, ModuleLoadError::Loader(_)) // ex. "Is a directory" error | ModuleError::Missing(specifier, _) => { let additional_message = CliSloppyImportsResolver::new(SloppyImportsCachedFs::new(fs.clone())) - .resolve(specifier, SloppyImportsResolutionMode::Execution)? + .resolve(specifier, SloppyImportsResolutionKind::Execution)? .as_suggestion_message(); Some(format!( "{} {} or run with --unstable-sloppy-imports", @@ -1100,12 +1100,12 @@ impl<'a> deno_graph::source::FileSystem for DenoGraphFsAdapter<'a> { } } -pub fn format_range_with_colors(range: &deno_graph::Range) -> String { +pub fn format_range_with_colors(referrer: &deno_graph::Range) -> String { format!( "{}:{}:{}", - colors::cyan(range.specifier.as_str()), - colors::yellow(&(range.start.line + 1).to_string()), - colors::yellow(&(range.start.character + 1).to_string()) + colors::cyan(referrer.specifier.as_str()), + colors::yellow(&(referrer.range.start.line + 1).to_string()), + colors::yellow(&(referrer.range.start.character + 1).to_string()) ) } @@ -1195,26 +1195,54 @@ impl<'a> deno_graph::source::Resolver for CliGraphResolver<'a> { &self, raw_specifier: &str, referrer_range: &deno_graph::Range, - mode: ResolutionMode, + resolution_kind: ResolutionKind, ) -> Result { self.resolver.resolve( raw_specifier, - referrer_range, - self - .cjs_tracker - .get_referrer_kind(&referrer_range.specifier), - mode, + &referrer_range.specifier, + referrer_range.range.start, + referrer_range + .resolution_mode + .map(to_node_resolution_mode) + .unwrap_or_else(|| { + self + .cjs_tracker + .get_referrer_kind(&referrer_range.specifier) + }), + to_node_resolution_kind(resolution_kind), ) } } +pub fn to_node_resolution_kind( + kind: ResolutionKind, +) -> node_resolver::NodeResolutionKind { + match kind { + ResolutionKind::Execution => node_resolver::NodeResolutionKind::Execution, + ResolutionKind::Types => node_resolver::NodeResolutionKind::Types, + } +} + +pub fn to_node_resolution_mode( + mode: deno_graph::source::ResolutionMode, +) -> node_resolver::ResolutionMode { + match mode { + deno_graph::source::ResolutionMode::Import => { + node_resolver::ResolutionMode::Import + } + deno_graph::source::ResolutionMode::Require => { + node_resolver::ResolutionMode::Require + } + } +} + #[cfg(test)] mod test { use std::sync::Arc; use deno_ast::ModuleSpecifier; use deno_graph::source::ResolveError; - use deno_graph::Position; + use deno_graph::PositionRange; use deno_graph::Range; use deno_graph::ResolutionError; use deno_graph::SpecifierError; @@ -1235,8 +1263,8 @@ mod test { specifier: input.to_string(), range: Range { specifier, - start: Position::zeroed(), - end: Position::zeroed(), + resolution_mode: None, + range: PositionRange::zeroed(), }, }; assert_eq!(get_resolution_error_bare_node_specifier(&err), output); @@ -1251,8 +1279,8 @@ mod test { let err = ResolutionError::InvalidSpecifier { range: Range { specifier, - start: Position::zeroed(), - end: Position::zeroed(), + resolution_mode: None, + range: PositionRange::zeroed(), }, error: SpecifierError::ImportPrefixMissing { specifier: input.to_string(), diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index 044b1573b9bb9d..eca1f15ed067c5 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -15,7 +15,6 @@ use crate::lsp::search::PackageSearchApi; use crate::tools::lint::CliLinter; use crate::util::path::relative_specifier; use deno_config::workspace::MappedResolution; -use deno_graph::source::ResolutionMode; use deno_lint::diagnostic::LintDiagnosticRange; use deno_ast::SourceRange; @@ -39,7 +38,8 @@ use deno_semver::package::PackageReq; use deno_semver::package::PackageReqReference; use deno_semver::Version; use import_map::ImportMap; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Regex; use std::borrow::Cow; @@ -467,7 +467,7 @@ impl<'a> TsResponseImportMapper<'a> { &self, specifier: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> Option { let specifier_stem = specifier.strip_suffix(".js").unwrap_or(specifier); let specifiers = std::iter::once(Cow::Borrowed(specifier)).chain( @@ -481,13 +481,10 @@ impl<'a> TsResponseImportMapper<'a> { .as_cli_resolver(Some(&self.file_referrer)) .resolve( &specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - ResolutionMode::Types, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Types, ) .ok() .and_then(|s| self.tsc_specifier_map.normalize(s.as_str()).ok()) @@ -509,20 +506,17 @@ impl<'a> TsResponseImportMapper<'a> { &self, specifier_text: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> bool { self .resolver .as_cli_resolver(Some(&self.file_referrer)) .resolve( specifier_text, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - deno_graph::source::ResolutionMode::Types, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Types, ) .is_ok() } @@ -590,7 +584,7 @@ fn try_reverse_map_package_json_exports( /// like an import and rewrite the import specifier to include the extension pub fn fix_ts_import_changes( referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, changes: &[tsc::FileTextChanges], language_server: &language_server::Inner, ) -> Result, AnyError> { @@ -608,7 +602,7 @@ pub fn fix_ts_import_changes( let specifier = captures.iter().skip(1).find_map(|s| s).unwrap().as_str(); if let Some(new_specifier) = import_mapper - .check_unresolved_specifier(specifier, referrer, referrer_kind) + .check_unresolved_specifier(specifier, referrer, resolution_mode) { line.replace(specifier, &new_specifier) } else { @@ -638,7 +632,7 @@ pub fn fix_ts_import_changes( /// resolution by Deno (includes the extension). fn fix_ts_import_action<'a>( referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, action: &'a tsc::CodeFixAction, language_server: &language_server::Inner, ) -> Option> { @@ -657,9 +651,11 @@ fn fix_ts_import_action<'a>( return Some(Cow::Borrowed(action)); }; let import_mapper = language_server.get_ts_response_import_mapper(referrer); - if let Some(new_specifier) = - import_mapper.check_unresolved_specifier(specifier, referrer, referrer_kind) - { + if let Some(new_specifier) = import_mapper.check_unresolved_specifier( + specifier, + referrer, + resolution_mode, + ) { let description = action.description.replace(specifier, &new_specifier); let changes = action .changes @@ -689,7 +685,8 @@ fn fix_ts_import_action<'a>( fix_id: None, fix_all_description: None, })) - } else if !import_mapper.is_valid_import(specifier, referrer, referrer_kind) { + } else if !import_mapper.is_valid_import(specifier, referrer, resolution_mode) + { None } else { Some(Cow::Borrowed(action)) @@ -1023,7 +1020,7 @@ impl CodeActionCollection { pub fn add_ts_fix_action( &mut self, specifier: &ModuleSpecifier, - specifier_kind: NodeModuleKind, + resolution_mode: ResolutionMode, action: &tsc::CodeFixAction, diagnostic: &lsp::Diagnostic, language_server: &language_server::Inner, @@ -1042,7 +1039,7 @@ impl CodeActionCollection { )); } let Some(action) = - fix_ts_import_action(specifier, specifier_kind, action, language_server) + fix_ts_import_action(specifier, resolution_mode, action, language_server) else { return Ok(()); }; @@ -1237,12 +1234,12 @@ impl CodeActionCollection { let text_info = parsed_source.text_info_lazy(); let specifier_range = SourceRange::new( text_info.loc_to_source_pos(LineAndColumnIndex { - line_index: import.specifier_range.start.line, - column_index: import.specifier_range.start.character, + line_index: import.specifier_range.range.start.line, + column_index: import.specifier_range.range.start.character, }), text_info.loc_to_source_pos(LineAndColumnIndex { - line_index: import.specifier_range.end.line, - column_index: import.specifier_range.end.character, + line_index: import.specifier_range.range.end.line, + column_index: import.specifier_range.range.end.character, }), ); @@ -1277,7 +1274,7 @@ impl CodeActionCollection { if json!(i.kind) != json!("es") && json!(i.kind) != json!("tsType") { return None; } - if !i.specifier_range.includes(&position) { + if !i.specifier_range.includes(position) { return None; } @@ -1286,7 +1283,7 @@ impl CodeActionCollection { let referrer = document.specifier(); let referrer_kind = language_server .is_cjs_resolver - .get_doc_module_kind(document); + .get_doc_resolution_mode(document); let file_referrer = document.file_referrer(); let config_data = language_server .config diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs index 3ee8ae93e410f6..a77f3506fd10ef 100644 --- a/cli/lsp/completions.rs +++ b/cli/lsp/completions.rs @@ -14,11 +14,10 @@ use super::resolver::LspResolver; use super::search::PackageSearchApi; use super::tsc; +use crate::graph_util::to_node_resolution_mode; use crate::jsr::JsrFetchResolver; use crate::util::path::is_importable_ext; use crate::util::path::relative_specifier; -use deno_graph::source::ResolutionMode; -use deno_graph::Range; use deno_runtime::deno_node::SUPPORTED_BUILTIN_NODE_MODULES; use deno_ast::LineAndColumnIndex; @@ -36,7 +35,8 @@ use deno_semver::package::PackageNv; use import_map::ImportMap; use indexmap::IndexSet; use lsp_types::CompletionList; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Regex; use tower_lsp::lsp_types as lsp; @@ -113,7 +113,7 @@ async fn check_auto_config_registry( /// which we want to ignore when replacing text. fn to_narrow_lsp_range( text_info: &SourceTextInfo, - range: &deno_graph::Range, + range: deno_graph::PositionRange, ) -> lsp::Range { let end_byte_index = text_info .loc_to_source_pos(LineAndColumnIndex { @@ -166,21 +166,21 @@ pub async fn get_import_completions( maybe_import_map: Option<&ImportMap>, ) -> Option { let document = documents.get(specifier)?; - let specifier_kind = is_cjs_resolver.get_doc_module_kind(&document); let file_referrer = document.file_referrer(); - let (text, _, range) = document.get_maybe_dependency(position)?; - let range = to_narrow_lsp_range(document.text_info(), &range); + let (text, _, graph_range) = document.get_maybe_dependency(position)?; + let resolution_mode = graph_range + .resolution_mode + .map(to_node_resolution_mode) + .unwrap_or_else(|| is_cjs_resolver.get_doc_resolution_mode(&document)); + let range = to_narrow_lsp_range(document.text_info(), graph_range.range); let resolved = resolver .as_cli_resolver(file_referrer) .resolve( &text, - &Range { - specifier: specifier.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - specifier_kind, - ResolutionMode::Execution, + specifier, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Execution, ) .ok(); if let Some(completion_list) = get_jsr_completions( @@ -206,7 +206,7 @@ pub async fn get_import_completions( // completions for import map specifiers Some(lsp::CompletionResponse::List(completion_list)) } else if let Some(completion_list) = - get_local_completions(specifier, specifier_kind, &text, &range, resolver) + get_local_completions(specifier, resolution_mode, &text, &range, resolver) { // completions for local relative modules Some(lsp::CompletionResponse::List(completion_list)) @@ -361,7 +361,7 @@ fn get_import_map_completions( /// Return local completions that are relative to the base specifier. fn get_local_completions( referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, text: &str, range: &lsp::Range, resolver: &LspResolver, @@ -374,13 +374,10 @@ fn get_local_completions( .as_cli_resolver(Some(referrer)) .resolve( parent, - &Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - ResolutionMode::Execution, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Execution, ) .ok()?; let resolved_parent_path = url_to_file_path(&resolved_parent).ok()?; @@ -831,7 +828,6 @@ mod tests { use crate::lsp::documents::LanguageId; use crate::lsp::search::tests::TestPackageSearchApi; use deno_core::resolve_url; - use deno_graph::Range; use pretty_assertions::assert_eq; use std::collections::HashMap; use test_util::TempDir; @@ -912,7 +908,7 @@ mod tests { ModuleSpecifier::from_file_path(file_c).expect("could not create"); let actual = get_local_completions( &specifier, - NodeModuleKind::Esm, + ResolutionMode::Import, "./", &lsp::Range { start: lsp::Position { @@ -1608,8 +1604,7 @@ mod tests { let text_info = SourceTextInfo::from_string(r#""te""#.to_string()); let range = to_narrow_lsp_range( &text_info, - &Range { - specifier: ModuleSpecifier::parse("https://deno.land").unwrap(), + deno_graph::PositionRange { start: deno_graph::Position { line: 0, character: 0, @@ -1632,8 +1627,7 @@ mod tests { let text_info = SourceTextInfo::from_string(r#""te"#.to_string()); let range = to_narrow_lsp_range( &text_info, - &Range { - specifier: ModuleSpecifier::parse("https://deno.land").unwrap(), + deno_graph::PositionRange { start: deno_graph::Position { line: 0, character: 0, diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index e4fb82e58d5122..1967cdd7c9f850 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -45,7 +45,7 @@ use deno_graph::Resolution; use deno_graph::ResolutionError; use deno_graph::SpecifierError; use deno_resolver::sloppy_imports::SloppyImportsResolution; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use deno_runtime::deno_fs; use deno_runtime::deno_node; use deno_runtime::tokio_util::create_basic_runtime; @@ -1266,7 +1266,7 @@ impl DenoDiagnostic { Self::NoLocal(specifier) => { let maybe_sloppy_resolution = CliSloppyImportsResolver::new( SloppyImportsCachedFs::new(Arc::new(deno_fs::RealFs)) - ).resolve(specifier, SloppyImportsResolutionMode::Execution); + ).resolve(specifier, SloppyImportsResolutionKind::Execution); let data = maybe_sloppy_resolution.as_ref().map(|res| { json!({ "specifier": specifier, @@ -1531,7 +1531,7 @@ fn diagnose_dependency( && !dependency.imports.iter().any(|i| { dependency .maybe_type - .includes(&i.specifier_range.start) + .includes(i.specifier_range.range.start) .is_some() }); diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index cdc25f3ac32656..96332b43880f31 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -27,7 +27,6 @@ use deno_core::futures::future::Shared; use deno_core::futures::FutureExt; use deno_core::parking_lot::Mutex; use deno_core::ModuleSpecifier; -use deno_graph::source::ResolutionMode; use deno_graph::Resolution; use deno_path_util::url_to_file_path; use deno_runtime::deno_node; @@ -36,7 +35,8 @@ use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageReq; use indexmap::IndexMap; use indexmap::IndexSet; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use std::borrow::Cow; use std::collections::BTreeMap; use std::collections::HashMap; @@ -442,8 +442,8 @@ impl Document { config_data.and_then(|d| d.maybe_jsx_import_source_config()); let resolver = SingleReferrerGraphResolver { valid_referrer: &self.specifier, - referrer_kind: is_cjs_resolver - .get_lsp_referrer_kind(&self.specifier, self.is_script), + module_resolution_mode: is_cjs_resolver + .get_lsp_resolution_mode(&self.specifier, self.is_script), cli_resolver, jsx_import_source_config: jsx_import_source_config.as_ref(), }; @@ -768,7 +768,7 @@ impl Document { }; self.dependencies().iter().find_map(|(s, dep)| { dep - .includes(&position) + .includes(position) .map(|r| (s.clone(), dep.clone(), r.clone())) }) } @@ -809,15 +809,15 @@ fn resolve_media_type( MediaType::from_specifier(specifier) } -pub fn to_lsp_range(range: &deno_graph::Range) -> lsp::Range { +pub fn to_lsp_range(referrer: &deno_graph::Range) -> lsp::Range { lsp::Range { start: lsp::Position { - line: range.start.line as u32, - character: range.start.character as u32, + line: referrer.range.start.line as u32, + character: referrer.range.start.character as u32, }, end: lsp::Position { - line: range.end.line as u32, - character: range.end.character as u32, + line: referrer.range.end.line as u32, + character: referrer.range.end.character as u32, }, } } @@ -1271,7 +1271,8 @@ impl Documents { /// tsc when type checking. pub fn resolve( &self, - raw_specifiers: &[String], + // (is_cjs: bool, raw_specifier: String) + raw_specifiers: &[(bool, String)], referrer: &ModuleSpecifier, file_referrer: Option<&ModuleSpecifier>, ) -> Vec> { @@ -1281,11 +1282,12 @@ impl Documents { .and_then(|d| d.file_referrer()) .or(file_referrer); let dependencies = referrer_doc.as_ref().map(|d| d.dependencies()); - let referrer_kind = self - .is_cjs_resolver - .get_maybe_doc_module_kind(referrer, referrer_doc.as_deref()); let mut results = Vec::new(); - for raw_specifier in raw_specifiers { + for (is_cjs, raw_specifier) in raw_specifiers { + let resolution_mode = match is_cjs { + true => ResolutionMode::Require, + false => ResolutionMode::Import, + }; if raw_specifier.starts_with("asset:") { if let Ok(specifier) = ModuleSpecifier::parse(raw_specifier) { let media_type = MediaType::from_specifier(&specifier); @@ -1300,14 +1302,14 @@ impl Documents { results.push(self.resolve_dependency( specifier, referrer, - referrer_kind, + resolution_mode, file_referrer, )); } else if let Some(specifier) = dep.maybe_code.maybe_specifier() { results.push(self.resolve_dependency( specifier, referrer, - referrer_kind, + resolution_mode, file_referrer, )); } else { @@ -1316,19 +1318,16 @@ impl Documents { } else if let Ok(specifier) = self.resolver.as_cli_resolver(file_referrer).resolve( raw_specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - ResolutionMode::Types, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Types, ) { results.push(self.resolve_dependency( &specifier, referrer, - referrer_kind, + resolution_mode, file_referrer, )); } else { @@ -1477,27 +1476,24 @@ impl Documents { let type_specifier = jsx_config.default_types_specifier.as_ref()?; let code_specifier = jsx_config.default_specifier.as_ref()?; let cli_resolver = self.resolver.as_cli_resolver(Some(scope)); - let range = deno_graph::Range { - specifier: jsx_config.base_url.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }; let type_specifier = cli_resolver .resolve( type_specifier, - &range, + &jsx_config.base_url, + deno_graph::Position::zeroed(), // todo(dsherret): this is wrong because it doesn't consider CJS referrers - deno_package_json::NodeModuleKind::Esm, - ResolutionMode::Types, + ResolutionMode::Import, + NodeResolutionKind::Types, ) .ok()?; let code_specifier = cli_resolver .resolve( code_specifier, - &range, + &jsx_config.base_url, + deno_graph::Position::zeroed(), // todo(dsherret): this is wrong because it doesn't consider CJS referrers - deno_package_json::NodeModuleKind::Esm, - ResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .ok()?; dep_info @@ -1542,7 +1538,7 @@ impl Documents { &self, specifier: &ModuleSpecifier, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, file_referrer: Option<&ModuleSpecifier>, ) -> Option<(ModuleSpecifier, MediaType)> { if let Some(module_name) = specifier.as_str().strip_prefix("node:") { @@ -1559,7 +1555,7 @@ impl Documents { let (s, mt) = self.resolver.npm_to_file_url( &npm_ref, referrer, - referrer_kind, + resolution_mode, file_referrer, )?; specifier = s; @@ -1571,7 +1567,7 @@ impl Documents { return Some((specifier, media_type)); }; if let Some(types) = doc.maybe_types_dependency().maybe_specifier() { - let specifier_kind = self.is_cjs_resolver.get_doc_module_kind(&doc); + let specifier_kind = self.is_cjs_resolver.get_doc_resolution_mode(&doc); self.resolve_dependency(types, &specifier, specifier_kind, file_referrer) } else { Some((doc.specifier().clone(), doc.media_type())) @@ -1688,7 +1684,7 @@ fn analyze_module( config_data.and_then(|d| d.maybe_jsx_import_source_config()); let resolver = SingleReferrerGraphResolver { valid_referrer: &valid_referrer, - referrer_kind: is_cjs_resolver.get_lsp_referrer_kind( + module_resolution_mode: is_cjs_resolver.get_lsp_resolution_mode( &specifier, Some(parsed_source.compute_is_script()), ), diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 9a9531eded6f6e..8fccfd0411d62c 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -22,7 +22,8 @@ use deno_semver::jsr::JsrPackageReqReference; use indexmap::Equivalent; use indexmap::IndexSet; use log::error; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use serde::Deserialize; use serde_json::from_value; use std::collections::BTreeMap; @@ -993,13 +994,10 @@ impl Inner { let resolver = inner.resolver.as_cli_resolver(Some(&referrer)); let Ok(specifier) = resolver.resolve( &specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - NodeModuleKind::Esm, - deno_graph::source::ResolutionMode::Types, + &referrer, + deno_graph::Position::zeroed(), + ResolutionMode::Import, + NodeResolutionKind::Types, ) else { return; }; @@ -1640,8 +1638,8 @@ impl Inner { .get_ts_diagnostics(&specifier, asset_or_doc.document_lsp_version()); let specifier_kind = asset_or_doc .document() - .map(|d| self.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm); + .map(|d| self.is_cjs_resolver.get_doc_resolution_mode(d)) + .unwrap_or(ResolutionMode::Import); let mut includes_no_cache = false; for diagnostic in &fixable_diagnostics { match diagnostic.source.as_deref() { @@ -1864,8 +1862,8 @@ impl Inner { maybe_asset_or_doc .as_ref() .and_then(|d| d.document()) - .map(|d| self.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm), + .map(|d| self.is_cjs_resolver.get_doc_resolution_mode(d)) + .unwrap_or(ResolutionMode::Import), &combined_code_actions.changes, self, ) @@ -1921,8 +1919,8 @@ impl Inner { &action_data.specifier, asset_or_doc .document() - .map(|d| self.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm), + .map(|d| self.is_cjs_resolver.get_doc_resolution_mode(d)) + .unwrap_or(ResolutionMode::Import), &refactor_edit_info.edits, self, ) diff --git a/cli/lsp/resolver.rs b/cli/lsp/resolver.rs index 4ede799227204f..49203c5bfd959b 100644 --- a/cli/lsp/resolver.rs +++ b/cli/lsp/resolver.rs @@ -9,7 +9,6 @@ use deno_config::workspace::PackageJsonDepResolution; use deno_config::workspace::WorkspaceResolver; use deno_core::parking_lot::Mutex; use deno_core::url::Url; -use deno_graph::source::ResolutionMode; use deno_graph::GraphImport; use deno_graph::ModuleSpecifier; use deno_graph::Range; @@ -30,8 +29,8 @@ use deno_semver::package::PackageReq; use indexmap::IndexMap; use node_resolver::errors::ClosestPkgJsonError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use std::borrow::Cow; use std::collections::BTreeMap; use std::collections::BTreeSet; @@ -48,6 +47,8 @@ use crate::args::CliLockfile; use crate::args::NpmInstallDepsProvider; use crate::cache::DenoCacheEnvFsAdapter; use crate::factory::Deferred; +use crate::graph_util::to_node_resolution_kind; +use crate::graph_util::to_node_resolution_mode; use crate::graph_util::CliJsrUrlProvider; use crate::http_util::HttpClientProvider; use crate::lsp::config::Config; @@ -146,7 +147,7 @@ impl LspScopeResolver { .map(|(referrer, imports)| { let resolver = SingleReferrerGraphResolver { valid_referrer: &referrer, - referrer_kind: NodeModuleKind::Esm, + module_resolution_mode: ResolutionMode::Import, cli_resolver: &cli_resolver, jsx_import_source_config: maybe_jsx_import_source_config .as_ref(), @@ -180,16 +181,16 @@ impl LspScopeResolver { &req_ref, &referrer, // todo(dsherret): this is wrong because it doesn't consider CJS referrers - NodeModuleKind::Esm, - NodeResolutionMode::Types, + ResolutionMode::Import, + NodeResolutionKind::Types, ) .or_else(|_| { npm_pkg_req_resolver.resolve_req_reference( &req_ref, &referrer, // todo(dsherret): this is wrong because it doesn't consider CJS referrers - NodeModuleKind::Esm, - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) }) .ok()?, @@ -424,7 +425,7 @@ impl LspResolver { &self, req_ref: &NpmPackageReqReference, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, file_referrer: Option<&ModuleSpecifier>, ) -> Option<(ModuleSpecifier, MediaType)> { let resolver = self.get_scope_resolver(file_referrer); @@ -434,8 +435,8 @@ impl LspResolver { .resolve_req_reference( req_ref, referrer, - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ) .ok()?, ))) @@ -492,7 +493,7 @@ impl LspResolver { &self, specifier_text: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> bool { let resolver = self.get_scope_resolver(Some(referrer)); let Some(npm_pkg_req_resolver) = resolver.npm_pkg_req_resolver.as_ref() @@ -503,8 +504,8 @@ impl LspResolver { .resolve_if_for_npm_pkg( specifier_text, referrer, - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ) .ok() .flatten() @@ -868,34 +869,23 @@ impl LspIsCjsResolver { } } - pub fn get_maybe_doc_module_kind( - &self, - specifier: &ModuleSpecifier, - maybe_document: Option<&Document>, - ) -> NodeModuleKind { - self.get_lsp_referrer_kind( - specifier, - maybe_document.and_then(|d| d.is_script()), - ) - } - - pub fn get_doc_module_kind(&self, document: &Document) -> NodeModuleKind { - self.get_lsp_referrer_kind(document.specifier(), document.is_script()) + pub fn get_doc_resolution_mode(&self, document: &Document) -> ResolutionMode { + self.get_lsp_resolution_mode(document.specifier(), document.is_script()) } - pub fn get_lsp_referrer_kind( + pub fn get_lsp_resolution_mode( &self, specifier: &ModuleSpecifier, is_script: Option, - ) -> NodeModuleKind { - self.inner.get_lsp_referrer_kind(specifier, is_script) + ) -> ResolutionMode { + self.inner.get_lsp_resolution_mode(specifier, is_script) } } #[derive(Debug)] pub struct SingleReferrerGraphResolver<'a> { pub valid_referrer: &'a ModuleSpecifier, - pub referrer_kind: NodeModuleKind, + pub module_resolution_mode: ResolutionMode, pub cli_resolver: &'a CliResolver, pub jsx_import_source_config: Option<&'a JsxImportSourceConfig>, } @@ -924,16 +914,20 @@ impl<'a> deno_graph::source::Resolver for SingleReferrerGraphResolver<'a> { &self, specifier_text: &str, referrer_range: &Range, - mode: ResolutionMode, + resolution_kind: deno_graph::source::ResolutionKind, ) -> Result { // this resolver assumes it will only be used with a single referrer // with the provided referrer kind debug_assert_eq!(referrer_range.specifier, *self.valid_referrer); self.cli_resolver.resolve( specifier_text, - referrer_range, - self.referrer_kind, - mode, + &referrer_range.specifier, + referrer_range.range.start, + referrer_range + .resolution_mode + .map(to_node_resolution_mode) + .unwrap_or(self.module_resolution_mode), + to_node_resolution_kind(resolution_kind), ) } } diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index ae87a9914f4501..cf0107acfd16ca 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -70,7 +70,7 @@ use indexmap::IndexMap; use indexmap::IndexSet; use lazy_regex::lazy_regex; use log::error; -use node_resolver::NodeModuleKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Captures; use regex::Regex; @@ -4449,9 +4449,14 @@ fn op_load<'s>( version: state.script_version(&specifier), is_cjs: doc .document() - .map(|d| state.state_snapshot.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm) - == NodeModuleKind::Cjs, + .map(|d| { + state + .state_snapshot + .is_cjs_resolver + .get_doc_resolution_mode(d) + }) + .unwrap_or(ResolutionMode::Import) + == ResolutionMode::Require, }) }; let serialized = serde_v8::to_v8(scope, maybe_load_response)?; @@ -4479,17 +4484,9 @@ fn op_release( fn op_resolve( state: &mut OpState, #[string] base: String, - is_base_cjs: bool, - #[serde] specifiers: Vec, + #[serde] specifiers: Vec<(bool, String)>, ) -> Result>, AnyError> { - op_resolve_inner( - state, - ResolveArgs { - base, - is_base_cjs, - specifiers, - }, - ) + op_resolve_inner(state, ResolveArgs { base, specifiers }) } struct TscRequestArray { @@ -4695,7 +4692,7 @@ fn op_script_names(state: &mut OpState) -> ScriptNames { state .state_snapshot .is_cjs_resolver - .get_doc_module_kind(doc), + .get_doc_resolution_mode(doc), doc.file_referrer(), )?; let types_doc = documents.get_or_load(&types, doc.file_referrer())?; @@ -6430,8 +6427,7 @@ mod tests { &mut state, ResolveArgs { base: temp_dir.url().join("a.ts").unwrap().to_string(), - is_base_cjs: false, - specifiers: vec!["./b.ts".to_string()], + specifiers: vec![(false, "./b.ts".to_string())], }, ) .unwrap(); diff --git a/cli/module_loader.rs b/cli/module_loader.rs index 035ae4264b173c..3d2dfb2a666bfa 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -57,9 +57,7 @@ use deno_core::ModuleSourceCode; use deno_core::ModuleSpecifier; use deno_core::ModuleType; use deno_core::RequestedModuleType; -use deno_core::ResolutionKind; use deno_core::SourceCodeCacheInfo; -use deno_graph::source::ResolutionMode; use deno_graph::GraphKind; use deno_graph::JsModule; use deno_graph::JsonModule; @@ -76,7 +74,8 @@ use deno_runtime::deno_permissions::PermissionsContainer; use deno_semver::npm::NpmPackageReqReference; use node_resolver::errors::ClosestPkgJsonError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; pub struct ModuleLoadPreparer { options: Arc, @@ -498,13 +497,11 @@ impl } Resolution::None => Cow::Owned(self.shared.resolver.resolve( raw_specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - self.shared.cjs_tracker.get_referrer_kind(referrer), - ResolutionMode::Execution, + referrer, + deno_graph::Position::zeroed(), + // if we're here, that means it's resolving a dynamic import + ResolutionMode::Import, + NodeResolutionKind::Execution, )?), }; @@ -517,8 +514,8 @@ impl .resolve_req_reference( &reference, referrer, - self.shared.cjs_tracker.get_referrer_kind(referrer), - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .map_err(AnyError::from); } @@ -539,8 +536,8 @@ impl &package_folder, module.nv_reference.sub_path(), Some(referrer), - self.shared.cjs_tracker.get_referrer_kind(referrer), - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .with_context(|| { format!("Could not resolve '{}'.", module.nv_reference) @@ -806,7 +803,7 @@ impl ModuleLoader &self, specifier: &str, referrer: &str, - _kind: ResolutionKind, + _kind: deno_core::ResolutionKind, ) -> Result { fn ensure_not_jsr_non_jsr_remote_import( specifier: &ModuleSpecifier, diff --git a/cli/resolver.rs b/cli/resolver.rs index a2dd47430f67a6..7f6dc0b1ac537c 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -12,7 +12,6 @@ use deno_core::error::AnyError; use deno_core::url::Url; use deno_core::ModuleSourceCode; use deno_core::ModuleSpecifier; -use deno_graph::source::ResolutionMode; use deno_graph::source::ResolveError; use deno_graph::source::UnknownBuiltInNodeModuleError; use deno_graph::NpmLoadError; @@ -25,8 +24,8 @@ use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::is_builtin_node_module; use deno_runtime::deno_node::DenoFsNodeResolverEnv; use deno_semver::package::PackageReq; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; @@ -247,25 +246,14 @@ impl CliResolver { pub fn resolve( &self, raw_specifier: &str, - referrer_range: &deno_graph::Range, - referrer_kind: NodeModuleKind, - mode: ResolutionMode, + referrer: &ModuleSpecifier, + referrer_range_start: deno_graph::Position, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { - fn to_node_mode(mode: ResolutionMode) -> NodeResolutionMode { - match mode { - ResolutionMode::Execution => NodeResolutionMode::Execution, - ResolutionMode::Types => NodeResolutionMode::Types, - } - } - let resolution = self .deno_resolver - .resolve( - raw_specifier, - &referrer_range.specifier, - referrer_kind, - to_node_mode(mode), - ) + .resolve(raw_specifier, referrer, resolution_mode, resolution_kind) .map_err(|err| match err.into_kind() { deno_resolver::DenoResolveErrorKind::MappedResolution( mapped_resolution_error, @@ -291,10 +279,11 @@ impl CliResolver { } => { if self.warned_pkgs.insert(reference.req().clone()) { log::warn!( - "{} {}\n at {}", + "{} {}\n at {}:{}", colors::yellow("Warning"), diagnostic, - referrer_range + referrer, + referrer_range_start, ); } } @@ -335,13 +324,10 @@ impl<'a> deno_graph::source::NpmResolver for WorkerCliNpmGraphResolver<'a> { module_name: &str, range: &deno_graph::Range, ) { - let deno_graph::Range { - start, specifier, .. - } = range; - let line = start.line + 1; - let column = start.character + 1; + let start = range.range.start; + let specifier = &range.specifier; if !*DENO_DISABLE_PEDANTIC_NODE_WARNINGS { - log::warn!("{} Resolving \"{module_name}\" as \"node:{module_name}\" at {specifier}:{line}:{column}. If you want to use a built-in Node module, add a \"node:\" prefix.", colors::yellow("Warning")) + log::warn!("{} Resolving \"{module_name}\" as \"node:{module_name}\" at {specifier}:{start}. If you want to use a built-in Node module, add a \"node:\" prefix.", colors::yellow("Warning")) } } diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 27b03fec634383..16aa4cde2b81ca 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -50,8 +50,8 @@ use deno_semver::npm::NpmPackageReqReference; use import_map::parse_from_json; use node_resolver::analyze::NodeCodeTranslator; use node_resolver::errors::ClosestPkgJsonError; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use serialization::DenoCompileModuleSource; use std::borrow::Cow; use std::rc::Rc; @@ -193,9 +193,9 @@ impl ModuleLoader for EmbeddedModuleLoader { .cjs_tracker .is_maybe_cjs(&referrer, MediaType::from_specifier(&referrer))? { - NodeModuleKind::Cjs + ResolutionMode::Require } else { - NodeModuleKind::Esm + ResolutionMode::Import }; if self.shared.node_resolver.in_npm_package(&referrer) { @@ -207,7 +207,7 @@ impl ModuleLoader for EmbeddedModuleLoader { raw_specifier, &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )? .into_url(), ); @@ -235,7 +235,7 @@ impl ModuleLoader for EmbeddedModuleLoader { sub_path.as_deref(), Some(&referrer), referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?, ), Ok(MappedResolution::PackageJson { @@ -252,7 +252,7 @@ impl ModuleLoader for EmbeddedModuleLoader { sub_path.as_deref(), &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, ) .map_err(AnyError::from), PackageJsonDepValue::Workspace(version_req) => { @@ -272,7 +272,7 @@ impl ModuleLoader for EmbeddedModuleLoader { sub_path.as_deref(), Some(&referrer), referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?, ) } @@ -286,7 +286,7 @@ impl ModuleLoader for EmbeddedModuleLoader { &reference, &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?); } @@ -313,7 +313,7 @@ impl ModuleLoader for EmbeddedModuleLoader { raw_specifier, &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; if let Some(res) = maybe_res { return Ok(res.into_url()); diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 4487d70fd784b9..197596167fecea 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -427,33 +427,7 @@ fn generate_docs_directory( symbol_redirect_map, default_symbol_map, markdown_renderer: deno_doc::html::comrak::create_renderer( - None, - Some(Box::new(|ammonia| { - ammonia.add_allowed_classes( - "code", - &[ - "language-ts", - "language-tsx", - "language-typescript", - "language-js", - "language-jsx", - "language-javascript", - "language-bash", - "language-shell", - "language-md", - "language-markdown", - "language-rs", - "language-rust", - "language-html", - "language-xml", - "language-css", - "language-json", - "language-regex", - "language-svg", - ], - ); - })), - None, + None, None, None, ), markdown_stripper: Rc::new(deno_doc::html::comrak::strip), head_inject: Some(Rc::new(|root| { diff --git a/cli/tools/info.rs b/cli/tools/info.rs index c3c37f02685715..fcc9fdcfa1f6dc 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -235,22 +235,31 @@ fn add_npm_packages_to_json( .get_mut("dependencies") .and_then(|d| d.as_array_mut()); if let Some(dependencies) = dependencies { - for dep in dependencies.iter_mut() { - if let serde_json::Value::Object(dep) = dep { - let specifier = dep.get("specifier").and_then(|s| s.as_str()); - if let Some(specifier) = specifier { - if let Ok(npm_ref) = NpmPackageReqReference::from_str(specifier) { - if let Ok(pkg) = - snapshot.resolve_pkg_from_pkg_req(npm_ref.req()) - { - dep.insert( - "npmPackage".to_string(), - pkg.id.as_serialized().into(), - ); - } + for dep in dependencies.iter_mut().flat_map(|d| d.as_object_mut()) { + if let Some(specifier) = dep.get("specifier").and_then(|s| s.as_str()) + { + if let Ok(npm_ref) = NpmPackageReqReference::from_str(specifier) { + if let Ok(pkg) = snapshot.resolve_pkg_from_pkg_req(npm_ref.req()) + { + dep.insert( + "npmPackage".to_string(), + pkg.id.as_serialized().into(), + ); } } } + + // don't show this in the output unless someone needs it + if let Some(code) = + dep.get_mut("code").and_then(|c| c.as_object_mut()) + { + code.remove("resolutionMode"); + } + if let Some(types) = + dep.get_mut("types").and_then(|c| c.as_object_mut()) + { + types.remove("resolutionMode"); + } } } } diff --git a/cli/tools/lint/rules/no_sloppy_imports.rs b/cli/tools/lint/rules/no_sloppy_imports.rs index 94bf9a7c676685..1bf7eddf6eeb7d 100644 --- a/cli/tools/lint/rules/no_sloppy_imports.rs +++ b/cli/tools/lint/rules/no_sloppy_imports.rs @@ -8,7 +8,7 @@ use std::sync::Arc; use deno_ast::SourceRange; use deno_config::workspace::WorkspaceResolver; use deno_core::anyhow::anyhow; -use deno_graph::source::ResolutionMode; +use deno_graph::source::ResolutionKind; use deno_graph::source::ResolveError; use deno_graph::Range; use deno_lint::diagnostic::LintDiagnosticDetails; @@ -17,7 +17,7 @@ use deno_lint::diagnostic::LintFix; use deno_lint::diagnostic::LintFixChange; use deno_lint::rules::LintRule; use deno_resolver::sloppy_imports::SloppyImportsResolution; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use text_lines::LineAndColumnIndex; use crate::graph_util::CliJsrUrlProvider; @@ -101,16 +101,16 @@ impl LintRule for NoSloppyImportsRule { maybe_npm_resolver: None, }); - for (range, sloppy_import) in resolver.captures.borrow_mut().drain() { + for (referrer, sloppy_import) in resolver.captures.borrow_mut().drain() { let start_range = context.text_info().loc_to_source_pos(LineAndColumnIndex { - line_index: range.start.line, - column_index: range.start.character, + line_index: referrer.range.start.line, + column_index: referrer.range.start.character, }); let end_range = context.text_info().loc_to_source_pos(LineAndColumnIndex { - line_index: range.end.line, - column_index: range.end.character, + line_index: referrer.range.end.line, + column_index: referrer.range.end.character, }); let source_range = SourceRange::new(start_range, end_range); context.add_diagnostic_details( @@ -183,7 +183,7 @@ impl<'a> deno_graph::source::Resolver for SloppyImportCaptureResolver<'a> { &self, specifier_text: &str, referrer_range: &Range, - mode: ResolutionMode, + resolution_kind: ResolutionKind, ) -> Result { let resolution = self .workspace_resolver @@ -198,9 +198,9 @@ impl<'a> deno_graph::source::Resolver for SloppyImportCaptureResolver<'a> { specifier, .. } => match self.sloppy_imports_resolver.resolve( &specifier, - match mode { - ResolutionMode::Execution => SloppyImportsResolutionMode::Execution, - ResolutionMode::Types => SloppyImportsResolutionMode::Types, + match resolution_kind { + ResolutionKind::Execution => SloppyImportsResolutionKind::Execution, + ResolutionKind::Types => SloppyImportsResolutionKind::Types, }, ) { Some(res) => { diff --git a/cli/tools/registry/diagnostics.rs b/cli/tools/registry/diagnostics.rs index 733a78ddacae2f..f2b630d7822f72 100644 --- a/cli/tools/registry/diagnostics.rs +++ b/cli/tools/registry/diagnostics.rs @@ -234,8 +234,8 @@ impl Diagnostic for PublishDiagnostic { specifier: Cow::Borrowed(&referrer.specifier), text_info: Cow::Borrowed(text_info), source_pos: DiagnosticSourcePos::LineAndCol { - line: referrer.start.line, - column: referrer.start.character, + line: referrer.range.start.line, + column: referrer.range.start.character, }, } } @@ -300,7 +300,7 @@ impl Diagnostic for PublishDiagnostic { text_info: &'a SourceTextInfo, referrer: &'a deno_graph::Range, ) -> Option> { - if referrer.start.line == 0 && referrer.start.character == 0 { + if referrer.range.start.line == 0 && referrer.range.start.character == 0 { return None; // no range, probably a jsxImportSource import } @@ -310,12 +310,12 @@ impl Diagnostic for PublishDiagnostic { style: DiagnosticSnippetHighlightStyle::Error, range: DiagnosticSourceRange { start: DiagnosticSourcePos::LineAndCol { - line: referrer.start.line, - column: referrer.start.character, + line: referrer.range.start.line, + column: referrer.range.start.character, }, end: DiagnosticSourcePos::LineAndCol { - line: referrer.end.line, - column: referrer.end.character, + line: referrer.range.end.line, + column: referrer.range.end.character, }, }, description: Some("the specifier".into()), diff --git a/cli/tools/registry/unfurl.rs b/cli/tools/registry/unfurl.rs index 5ec726a6401590..90343ac6568d96 100644 --- a/cli/tools/registry/unfurl.rs +++ b/cli/tools/registry/unfurl.rs @@ -12,7 +12,7 @@ use deno_graph::DynamicTemplatePart; use deno_graph::ParserModuleAnalyzer; use deno_graph::TypeScriptReference; use deno_package_json::PackageJsonDepValue; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use deno_runtime::deno_node::is_builtin_node_module; use crate::resolver::CliSloppyImportsResolver; @@ -180,7 +180,7 @@ impl SpecifierUnfurler { let resolved = if let Some(sloppy_imports_resolver) = &self.sloppy_imports_resolver { sloppy_imports_resolver - .resolve(&resolved, SloppyImportsResolutionMode::Execution) + .resolve(&resolved, SloppyImportsResolutionKind::Execution) .map(|res| res.into_specifier()) .unwrap_or(resolved) } else { @@ -319,8 +319,8 @@ impl SpecifierUnfurler { } for ts_ref in &module_info.ts_references { let specifier_with_range = match ts_ref { - TypeScriptReference::Path(range) => range, - TypeScriptReference::Types(range) => range, + TypeScriptReference::Path(s) => s, + TypeScriptReference::Types { specifier, .. } => specifier, }; analyze_specifier( &specifier_with_range.text, @@ -328,10 +328,10 @@ impl SpecifierUnfurler { &mut text_changes, ); } - for specifier_with_range in &module_info.jsdoc_imports { + for jsdoc in &module_info.jsdoc_imports { analyze_specifier( - &specifier_with_range.text, - &specifier_with_range.range, + &jsdoc.specifier.text, + &jsdoc.specifier.range, &mut text_changes, ); } diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index 8e05c4abbcff89..26e1eeac2f851a 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -43,13 +43,13 @@ use deno_core::unsync::spawn; use deno_core::url::Url; use deno_core::LocalInspectorSession; use deno_core::PollEventLoopOptions; -use deno_graph::source::ResolutionMode; use deno_graph::Position; use deno_graph::PositionRange; use deno_graph::SpecifierWithRange; use deno_runtime::worker::MainWorker; use deno_semver::npm::NpmPackageReqReference; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Match; use regex::Regex; @@ -701,11 +701,6 @@ impl ReplSession { let mut collector = ImportCollector::new(); program.visit_with(&mut collector); - let referrer_range = deno_graph::Range { - specifier: self.referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }; let resolved_imports = collector .imports .iter() @@ -714,9 +709,10 @@ impl ReplSession { .resolver .resolve( i, - &referrer_range, - NodeModuleKind::Esm, - ResolutionMode::Execution, + &self.referrer, + deno_graph::Position::zeroed(), + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .ok() .or_else(|| ModuleSpecifier::parse(i).ok()) diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 93b9e92d899d76..7e8a407cf982a2 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -681,14 +681,18 @@ delete Object.prototype.__proto__; getNewLine() { return "\n"; }, - resolveTypeReferenceDirectives( - typeDirectiveNames, + resolveTypeReferenceDirectiveReferences( + typeDirectiveReferences, containingFilePath, redirectedReference, options, - containingFileMode, + containingSourceFile, + _reusedNames, ) { - return typeDirectiveNames.map((arg) => { + const isCjs = + containingSourceFile?.impliedNodeFormat === ts.ModuleKind.CommonJS; + /** @type {Array} */ + const result = typeDirectiveReferences.map((arg) => { /** @type {ts.FileReference} */ const fileReference = typeof arg === "string" ? { @@ -701,16 +705,28 @@ delete Object.prototype.__proto__; /** @type {[string, ts.Extension] | undefined} */ const resolved = ops.op_resolve( containingFilePath, - containingFileMode === ts.ModuleKind.CommonJS, - [fileReference.fileName], + [ + [ + fileReference.resolutionMode == null + ? isCjs + : fileReference.resolutionMode === ts.ModuleKind.CommonJS, + fileReference.fileName, + ], + ], )?.[0]; if (resolved) { return { - primary: true, - resolvedFileName: resolved[0], + resolvedTypeReferenceDirective: { + primary: true, + resolvedFileName: resolved[0], + // todo(dsherret): we should probably be setting this + isExternalLibraryImport: undefined, + }, }; } else { - return undefined; + return { + resolvedTypeReferenceDirective: undefined, + }; } } else { return ts.resolveTypeReferenceDirective( @@ -720,41 +736,56 @@ delete Object.prototype.__proto__; host, redirectedReference, undefined, - containingFileMode ?? fileReference.resolutionMode, - ).resolvedTypeReferenceDirective; + containingSourceFile?.impliedNodeFormat ?? + fileReference.resolutionMode, + ); } }); + return result; }, - resolveModuleNames( - specifiers, + resolveModuleNameLiterals( + moduleLiterals, base, - _reusedNames, _redirectedReference, - _options, + compilerOptions, containingSourceFile, + _reusedNames, ) { + const specifiers = moduleLiterals.map((literal) => [ + ts.getModeForUsageLocation( + containingSourceFile, + literal, + compilerOptions, + ) === ts.ModuleKind.CommonJS, + literal.text, + ]); if (logDebug) { debug(`host.resolveModuleNames()`); debug(` base: ${base}`); - debug(` specifiers: ${specifiers.join(", ")}`); + debug(` specifiers: ${specifiers.map((s) => s[1]).join(", ")}`); } /** @type {Array<[string, ts.Extension] | undefined>} */ const resolved = ops.op_resolve( base, - containingSourceFile?.impliedNodeFormat === ts.ModuleKind.CommonJS, specifiers, ); if (resolved) { + /** @type {Array} */ const result = resolved.map((item) => { if (item) { const [resolvedFileName, extension] = item; return { - resolvedFileName, - extension, - isExternalLibraryImport: false, + resolvedModule: { + resolvedFileName, + extension, + // todo(dsherret): we should probably be setting this + isExternalLibraryImport: false, + }, }; } - return undefined; + return { + resolvedModule: undefined, + }; }); result.length = specifiers.length; return result; diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 976d407c150b4e..50127b093d128f 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -41,8 +41,8 @@ use deno_semver::npm::NpmPackageReqReference; use node_resolver::errors::NodeJsErrorCode; use node_resolver::errors::NodeJsErrorCoded; use node_resolver::errors::PackageSubpathResolveError; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use std::borrow::Cow; use std::collections::HashMap; @@ -703,10 +703,9 @@ pub struct ResolveArgs { /// The base specifier that the supplied specifier strings should be resolved /// relative to. pub base: String, - /// If the base is cjs. - pub is_base_cjs: bool, /// A list of specifiers that should be resolved. - pub specifiers: Vec, + /// (is_cjs: bool, raw_specifier: String) + pub specifiers: Vec<(bool, String)>, } #[op2] @@ -714,17 +713,9 @@ pub struct ResolveArgs { fn op_resolve( state: &mut OpState, #[string] base: String, - is_base_cjs: bool, - #[serde] specifiers: Vec, + #[serde] specifiers: Vec<(bool, String)>, ) -> Result, AnyError> { - op_resolve_inner( - state, - ResolveArgs { - base, - is_base_cjs, - specifiers, - }, - ) + op_resolve_inner(state, ResolveArgs { base, specifiers }) } #[inline] @@ -735,11 +726,6 @@ fn op_resolve_inner( let state = state.borrow_mut::(); let mut resolved: Vec<(String, &'static str)> = Vec::with_capacity(args.specifiers.len()); - let referrer_kind = if args.is_base_cjs { - NodeModuleKind::Cjs - } else { - NodeModuleKind::Esm - }; let referrer = if let Some(remapped_specifier) = state.remapped_specifiers.get(&args.base) { @@ -752,7 +738,7 @@ fn op_resolve_inner( )? }; let referrer_module = state.graph.get(&referrer); - for specifier in args.specifiers { + for (is_cjs, specifier) in args.specifiers { if specifier.starts_with("node:") { resolved.push(( MISSING_DEPENDENCY_SPECIFIER.to_string(), @@ -771,13 +757,20 @@ fn op_resolve_inner( .and_then(|m| m.js()) .and_then(|m| m.dependencies_prefer_fast_check().get(&specifier)) .and_then(|d| d.maybe_type.ok().or_else(|| d.maybe_code.ok())); + let resolution_mode = if is_cjs { + ResolutionMode::Require + } else { + ResolutionMode::Import + }; let maybe_result = match resolved_dep { Some(ResolutionResolved { specifier, .. }) => { resolve_graph_specifier_types( specifier, &referrer, - referrer_kind, + // we could get this from the resolved dep, but for now assume + // the value resolved in TypeScript is better + resolution_mode, state, )? } @@ -785,7 +778,7 @@ fn op_resolve_inner( match resolve_non_graph_specifier_types( &specifier, &referrer, - referrer_kind, + resolution_mode, state, ) { Ok(maybe_result) => maybe_result, @@ -852,7 +845,7 @@ fn op_resolve_inner( fn resolve_graph_specifier_types( specifier: &ModuleSpecifier, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, state: &State, ) -> Result, AnyError> { let graph = &state.graph; @@ -908,8 +901,8 @@ fn resolve_graph_specifier_types( &package_folder, module.nv_reference.sub_path(), Some(referrer), - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ); let maybe_url = match res_result { Ok(url) => Some(url), @@ -949,7 +942,7 @@ enum ResolveNonGraphSpecifierTypesError { fn resolve_non_graph_specifier_types( raw_specifier: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, state: &State, ) -> Result< Option<(ModuleSpecifier, MediaType)>, @@ -967,8 +960,8 @@ fn resolve_non_graph_specifier_types( .resolve( raw_specifier, referrer, - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ) .ok() .map(|res| res.into_url()), @@ -976,7 +969,7 @@ fn resolve_non_graph_specifier_types( } else if let Ok(npm_req_ref) = NpmPackageReqReference::from_str(raw_specifier) { - debug_assert_eq!(referrer_kind, NodeModuleKind::Esm); + debug_assert_eq!(resolution_mode, ResolutionMode::Import); // todo(dsherret): add support for injecting this in the graph so // we don't need this special code here. // This could occur when resolving npm:@types/node when it is @@ -988,8 +981,8 @@ fn resolve_non_graph_specifier_types( &package_folder, npm_req_ref.sub_path(), Some(referrer), - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ); let maybe_url = match res_result { Ok(url) => Some(url), @@ -1388,8 +1381,7 @@ mod tests { &mut state, ResolveArgs { base: "https://deno.land/x/a.ts".to_string(), - is_base_cjs: false, - specifiers: vec!["./b.ts".to_string()], + specifiers: vec![(false, "./b.ts".to_string())], }, ) .expect("should have invoked op"); @@ -1408,8 +1400,7 @@ mod tests { &mut state, ResolveArgs { base: "https://deno.land/x/a.ts".to_string(), - is_base_cjs: false, - specifiers: vec!["./bad.ts".to_string()], + specifiers: vec![(false, "./bad.ts".to_string())], }, ) .expect("should have not errored"); diff --git a/cli/worker.rs b/cli/worker.rs index e79ed614228bb5..161d8bcc211e4d 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -44,8 +44,8 @@ use deno_runtime::WorkerLogLevel; use deno_semver::npm::NpmPackageReqReference; use deno_telemetry::OtelConfig; use deno_terminal::colors; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use tokio::select; use crate::args::CliLockfile; @@ -698,8 +698,8 @@ impl CliMainWorkerFactory { package_folder, sub_path, /* referrer */ None, - NodeModuleKind::Esm, - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, )?; if specifier .to_file_path() diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index f8de07a3be2c62..64dc4423ae918a 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -8,13 +8,13 @@ use deno_core::v8; use deno_core::JsRuntimeInspector; use deno_core::OpState; use deno_fs::FileSystemRc; -use deno_package_json::NodeModuleKind; use deno_package_json::PackageJsonRc; use deno_path_util::normalize_path; use deno_path_util::url_from_file_path; use deno_path_util::url_to_file_path; use node_resolver::errors::ClosestPkgJsonError; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use node_resolver::REQUIRE_CONDITIONS; use std::borrow::Cow; use std::cell::RefCell; @@ -462,9 +462,9 @@ where &expansion, exports, Some(&referrer), - NodeModuleKind::Cjs, + ResolutionMode::Require, REQUIRE_CONDITIONS, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; Ok(Some(if r.scheme() == "file" { url_to_file_path_string(&r)? @@ -559,9 +559,9 @@ where &format!(".{expansion}"), exports, referrer.as_ref(), - NodeModuleKind::Cjs, + ResolutionMode::Require, REQUIRE_CONDITIONS, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; Ok(Some(if r.scheme() == "file" { url_to_file_path_string(&r)? @@ -630,10 +630,10 @@ where let url = node_resolver.package_imports_resolve( &request, Some(&referrer_url), - NodeModuleKind::Cjs, + ResolutionMode::Require, Some(&pkg), REQUIRE_CONDITIONS, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; Ok(Some(url_to_file_path_string(&url)?)) } else { diff --git a/resolvers/deno/cjs.rs b/resolvers/deno/cjs.rs index dbcbd8b6bf64ee..e322036dfe01dc 100644 --- a/resolvers/deno/cjs.rs +++ b/resolvers/deno/cjs.rs @@ -7,8 +7,8 @@ use deno_media_type::MediaType; use node_resolver::env::NodeResolverEnv; use node_resolver::errors::ClosestPkgJsonError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; use node_resolver::PackageJsonResolver; +use node_resolver::ResolutionMode; use url::Url; /// Keeps track of what module specifiers were resolved as CJS. @@ -19,7 +19,7 @@ use url::Url; #[derive(Debug)] pub struct CjsTracker { is_cjs_resolver: IsCjsResolver, - known: DashMap, + known: DashMap, } impl CjsTracker { @@ -70,42 +70,42 @@ impl CjsTracker { is_script: Option, ) -> Result { let kind = match self - .get_known_kind_with_is_script(specifier, media_type, is_script) + .get_known_mode_with_is_script(specifier, media_type, is_script) { Some(kind) => kind, None => self.is_cjs_resolver.check_based_on_pkg_json(specifier)?, }; - Ok(kind == NodeModuleKind::Cjs) + Ok(kind == ResolutionMode::Require) } /// Gets the referrer for the specified module specifier. /// /// Generally the referrer should already be tracked by calling /// `is_cjs_with_known_is_script` before calling this method. - pub fn get_referrer_kind(&self, specifier: &Url) -> NodeModuleKind { + pub fn get_referrer_kind(&self, specifier: &Url) -> ResolutionMode { if specifier.scheme() != "file" { - return NodeModuleKind::Esm; + return ResolutionMode::Import; } self - .get_known_kind(specifier, MediaType::from_specifier(specifier)) - .unwrap_or(NodeModuleKind::Esm) + .get_known_mode(specifier, MediaType::from_specifier(specifier)) + .unwrap_or(ResolutionMode::Import) } - fn get_known_kind( + fn get_known_mode( &self, specifier: &Url, media_type: MediaType, - ) -> Option { - self.get_known_kind_with_is_script(specifier, media_type, None) + ) -> Option { + self.get_known_mode_with_is_script(specifier, media_type, None) } - fn get_known_kind_with_is_script( + fn get_known_mode_with_is_script( &self, specifier: &Url, media_type: MediaType, is_script: Option, - ) -> Option { - self.is_cjs_resolver.get_known_kind_with_is_script( + ) -> Option { + self.is_cjs_resolver.get_known_mode_with_is_script( specifier, media_type, is_script, @@ -141,25 +141,25 @@ impl IsCjsResolver { } } - /// Gets the referrer kind for a script in the LSP. - pub fn get_lsp_referrer_kind( + /// Gets the resolution mode for a module in the LSP. + pub fn get_lsp_resolution_mode( &self, specifier: &Url, is_script: Option, - ) -> NodeModuleKind { + ) -> ResolutionMode { if specifier.scheme() != "file" { - return NodeModuleKind::Esm; + return ResolutionMode::Import; } match MediaType::from_specifier(specifier) { - MediaType::Mts | MediaType::Mjs | MediaType::Dmts => NodeModuleKind::Esm, - MediaType::Cjs | MediaType::Cts | MediaType::Dcts => NodeModuleKind::Cjs, + MediaType::Mts | MediaType::Mjs | MediaType::Dmts => ResolutionMode::Import, + MediaType::Cjs | MediaType::Cts | MediaType::Dcts => ResolutionMode::Require, MediaType::Dts => { // dts files are always determined based on the package.json because // they contain imports/exports even when considered CJS - self.check_based_on_pkg_json(specifier).unwrap_or(NodeModuleKind::Esm) + self.check_based_on_pkg_json(specifier).unwrap_or(ResolutionMode::Import) } MediaType::Wasm | - MediaType::Json => NodeModuleKind::Esm, + MediaType::Json => ResolutionMode::Import, MediaType::JavaScript | MediaType::Jsx | MediaType::TypeScript @@ -169,27 +169,27 @@ impl IsCjsResolver { | MediaType::SourceMap | MediaType::Unknown => { match is_script { - Some(true) => self.check_based_on_pkg_json(specifier).unwrap_or(NodeModuleKind::Esm), - Some(false) | None => NodeModuleKind::Esm, + Some(true) => self.check_based_on_pkg_json(specifier).unwrap_or(ResolutionMode::Import), + Some(false) | None => ResolutionMode::Import, } } } } - fn get_known_kind_with_is_script( + fn get_known_mode_with_is_script( &self, specifier: &Url, media_type: MediaType, is_script: Option, - known_cache: &DashMap, - ) -> Option { + known_cache: &DashMap, + ) -> Option { if specifier.scheme() != "file" { - return Some(NodeModuleKind::Esm); + return Some(ResolutionMode::Import); } match media_type { - MediaType::Mts | MediaType::Mjs | MediaType::Dmts => Some(NodeModuleKind::Esm), - MediaType::Cjs | MediaType::Cts | MediaType::Dcts => Some(NodeModuleKind::Cjs), + MediaType::Mts | MediaType::Mjs | MediaType::Dmts => Some(ResolutionMode::Import), + MediaType::Cjs | MediaType::Cts | MediaType::Dcts => Some(ResolutionMode::Require), MediaType::Dts => { // dts files are always determined based on the package.json because // they contain imports/exports even when considered CJS @@ -200,11 +200,11 @@ impl IsCjsResolver { if let Some(value) = value { known_cache.insert(specifier.clone(), value); } - Some(value.unwrap_or(NodeModuleKind::Esm)) + Some(value.unwrap_or(ResolutionMode::Import)) } } MediaType::Wasm | - MediaType::Json => Some(NodeModuleKind::Esm), + MediaType::Json => Some(ResolutionMode::Import), MediaType::JavaScript | MediaType::Jsx | MediaType::TypeScript @@ -214,17 +214,17 @@ impl IsCjsResolver { | MediaType::SourceMap | MediaType::Unknown => { if let Some(value) = known_cache.get(specifier).map(|v| *v) { - if value == NodeModuleKind::Cjs && is_script == Some(false) { + if value == ResolutionMode::Require && is_script == Some(false) { // we now know this is actually esm - known_cache.insert(specifier.clone(), NodeModuleKind::Esm); - Some(NodeModuleKind::Esm) + known_cache.insert(specifier.clone(), ResolutionMode::Import); + Some(ResolutionMode::Import) } else { Some(value) } } else if is_script == Some(false) { // we know this is esm - known_cache.insert(specifier.clone(), NodeModuleKind::Esm); - Some(NodeModuleKind::Esm) + known_cache.insert(specifier.clone(), ResolutionMode::Import); + Some(ResolutionMode::Import) } else { None } @@ -235,19 +235,19 @@ impl IsCjsResolver { fn check_based_on_pkg_json( &self, specifier: &Url, - ) -> Result { + ) -> Result { if self.in_npm_pkg_checker.in_npm_package(specifier) { if let Some(pkg_json) = self.pkg_json_resolver.get_closest_package_json(specifier)? { let is_file_location_cjs = pkg_json.typ != "module"; Ok(if is_file_location_cjs { - NodeModuleKind::Cjs + ResolutionMode::Require } else { - NodeModuleKind::Esm + ResolutionMode::Import }) } else { - Ok(NodeModuleKind::Cjs) + Ok(ResolutionMode::Require) } } else if self.options.detect_cjs || self.options.is_node_main { if let Some(pkg_json) = @@ -256,17 +256,17 @@ impl IsCjsResolver { let is_cjs_type = pkg_json.typ == "commonjs" || self.options.is_node_main && pkg_json.typ == "none"; Ok(if is_cjs_type { - NodeModuleKind::Cjs + ResolutionMode::Require } else { - NodeModuleKind::Esm + ResolutionMode::Import }) } else if self.options.is_node_main { - Ok(NodeModuleKind::Cjs) + Ok(ResolutionMode::Require) } else { - Ok(NodeModuleKind::Esm) + Ok(ResolutionMode::Import) } } else { - Ok(NodeModuleKind::Esm) + Ok(ResolutionMode::Import) } } } diff --git a/resolvers/deno/lib.rs b/resolvers/deno/lib.rs index 303a8271026816..661caf836df436 100644 --- a/resolvers/deno/lib.rs +++ b/resolvers/deno/lib.rs @@ -20,10 +20,10 @@ use node_resolver::env::NodeResolverEnv; use node_resolver::errors::NodeResolveError; use node_resolver::errors::PackageSubpathResolveError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; use node_resolver::NodeResolution; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; use node_resolver::NodeResolver; +use node_resolver::ResolutionMode; use npm::MissingPackageNodeModulesFolderError; use npm::NodeModulesOutOfDateError; use npm::NpmReqResolver; @@ -31,7 +31,7 @@ use npm::ResolveIfForNpmPackageErrorKind; use npm::ResolvePkgFolderFromDenoReqError; use npm::ResolveReqWithSubPathErrorKind; use sloppy_imports::SloppyImportResolverFs; -use sloppy_imports::SloppyImportsResolutionMode; +use sloppy_imports::SloppyImportsResolutionKind; use sloppy_imports::SloppyImportsResolver; use thiserror::Error; use url::Url; @@ -145,8 +145,8 @@ impl< &self, raw_specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let mut found_package_json_dep = false; let mut maybe_diagnostic = None; @@ -157,7 +157,7 @@ impl< && self.in_npm_pkg_checker.in_npm_package(referrer) { return node_resolver - .resolve(raw_specifier, referrer, referrer_kind, mode) + .resolve(raw_specifier, referrer, resolution_mode, resolution_kind) .map(|res| DenoResolution { url: res.into_url(), found_package_json_dep, @@ -189,12 +189,12 @@ impl< sloppy_imports_resolver .resolve( &specifier, - match mode { - NodeResolutionMode::Execution => { - SloppyImportsResolutionMode::Execution + match resolution_kind { + NodeResolutionKind::Execution => { + SloppyImportsResolutionKind::Execution } - NodeResolutionMode::Types => { - SloppyImportsResolutionMode::Types + NodeResolutionKind::Types => { + SloppyImportsResolutionKind::Types } }, ) @@ -221,8 +221,8 @@ impl< pkg_json.dir_path(), sub_path.as_deref(), Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|e| e.into()), MappedResolution::PackageJson { @@ -272,8 +272,8 @@ impl< pkg_folder, sub_path.as_deref(), Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|e| { DenoResolveErrorKind::PackageSubpathResolve(e).into_box() @@ -328,8 +328,8 @@ impl< pkg_folder, npm_req_ref.sub_path(), Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map(|url| DenoResolution { url, @@ -345,8 +345,8 @@ impl< .resolve_req_reference( &npm_req_ref, referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map(|url| DenoResolution { url, @@ -384,8 +384,8 @@ impl< .resolve_if_for_npm_pkg( raw_specifier, referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|e| match e.into_kind() { ResolveIfForNpmPackageErrorKind::NodeResolve(e) => { diff --git a/resolvers/deno/npm/mod.rs b/resolvers/deno/npm/mod.rs index 09e35b15c352cc..83db04480a5d37 100644 --- a/resolvers/deno/npm/mod.rs +++ b/resolvers/deno/npm/mod.rs @@ -16,10 +16,10 @@ use node_resolver::errors::PackageNotFoundError; use node_resolver::errors::PackageResolveErrorKind; use node_resolver::errors::PackageSubpathResolveError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; use node_resolver::NodeResolution; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; use node_resolver::NodeResolver; +use node_resolver::ResolutionMode; use thiserror::Error; use url::Url; @@ -132,15 +132,15 @@ impl &self, req_ref: &NpmPackageReqReference, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { self.resolve_req_with_sub_path( req_ref.req(), req_ref.sub_path(), referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) } @@ -149,8 +149,8 @@ impl req: &PackageReq, sub_path: Option<&str>, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_folder = self .npm_resolver @@ -160,8 +160,8 @@ impl &package_folder, sub_path, Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ); match resolution_result { Ok(url) => Ok(url), @@ -183,13 +183,15 @@ impl &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, ResolveIfForNpmPackageError> { - let resolution_result = - self - .node_resolver - .resolve(specifier, referrer, referrer_kind, mode); + let resolution_result = self.node_resolver.resolve( + specifier, + referrer, + resolution_mode, + resolution_kind, + ); match resolution_result { Ok(res) => Ok(Some(res)), Err(err) => { diff --git a/resolvers/deno/sloppy_imports.rs b/resolvers/deno/sloppy_imports.rs index 7aba5b771a5ef9..ccaa5474355eb2 100644 --- a/resolvers/deno/sloppy_imports.rs +++ b/resolvers/deno/sloppy_imports.rs @@ -80,16 +80,16 @@ impl SloppyImportsResolution { /// The kind of resolution currently being done. #[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum SloppyImportsResolutionMode { +pub enum SloppyImportsResolutionKind { /// Resolving for code that will be executed. Execution, /// Resolving for code that will be used for type information. Types, } -impl SloppyImportsResolutionMode { +impl SloppyImportsResolutionKind { pub fn is_types(&self) -> bool { - *self == SloppyImportsResolutionMode::Types + *self == SloppyImportsResolutionKind::Types } } @@ -114,7 +114,7 @@ impl SloppyImportsResolver { pub fn resolve( &self, specifier: &Url, - mode: SloppyImportsResolutionMode, + resolution_kind: SloppyImportsResolutionKind, ) -> Option { fn path_without_ext( path: &Path, @@ -167,7 +167,7 @@ impl SloppyImportsResolver { let probe_paths: Vec<(PathBuf, SloppyImportsResolutionReason)> = match self.fs.stat_sync(&path) { Some(SloppyImportsFsEntry::File) => { - if mode.is_types() { + if resolution_kind.is_types() { let media_type = MediaType::from_specifier(specifier); // attempt to resolve the .d.ts file before the .js file let probe_media_type_types = match media_type { @@ -197,7 +197,7 @@ impl SloppyImportsResolver { let media_type = MediaType::from_specifier(specifier); let probe_media_type_types = match media_type { MediaType::JavaScript => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![MediaType::TypeScript, MediaType::Tsx, MediaType::Dts] } else { vec![MediaType::TypeScript, MediaType::Tsx] @@ -208,7 +208,7 @@ impl SloppyImportsResolver { (vec![MediaType::Tsx], SloppyImportsResolutionReason::JsToTs) } MediaType::Mjs => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![MediaType::Mts, MediaType::Dmts, MediaType::Dts] } else { vec![MediaType::Mts] @@ -216,7 +216,7 @@ impl SloppyImportsResolver { SloppyImportsResolutionReason::JsToTs, ), MediaType::Cjs => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![MediaType::Cts, MediaType::Dcts, MediaType::Dts] } else { vec![MediaType::Cts] @@ -237,7 +237,7 @@ impl SloppyImportsResolver { return None; } MediaType::Unknown => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![ MediaType::TypeScript, MediaType::Tsx, @@ -274,7 +274,7 @@ impl SloppyImportsResolver { if matches!(entry, Some(SloppyImportsFsEntry::Dir)) { // try to resolve at the index file - if mode.is_types() { + if resolution_kind.is_types() { probe_paths.push(( path.join("index.ts"), SloppyImportsResolutionReason::Directory, @@ -373,16 +373,22 @@ mod test { #[test] fn test_unstable_sloppy_imports() { fn resolve(specifier: &Url) -> Option { - resolve_with_mode(specifier, SloppyImportsResolutionMode::Execution) + resolve_with_resolution_kind( + specifier, + SloppyImportsResolutionKind::Execution, + ) } fn resolve_types(specifier: &Url) -> Option { - resolve_with_mode(specifier, SloppyImportsResolutionMode::Types) + resolve_with_resolution_kind( + specifier, + SloppyImportsResolutionKind::Types, + ) } - fn resolve_with_mode( + fn resolve_with_resolution_kind( specifier: &Url, - mode: SloppyImportsResolutionMode, + resolution_kind: SloppyImportsResolutionKind, ) -> Option { struct RealSloppyImportsResolverFs; impl SloppyImportResolverFs for RealSloppyImportsResolverFs { @@ -400,7 +406,7 @@ mod test { } SloppyImportsResolver::new(RealSloppyImportsResolverFs) - .resolve(specifier, mode) + .resolve(specifier, resolution_kind) } let context = TestContext::default(); diff --git a/resolvers/node/analyze.rs b/resolvers/node/analyze.rs index 9126890805d41c..a444f4d923d0eb 100644 --- a/resolvers/node/analyze.rs +++ b/resolvers/node/analyze.rs @@ -21,11 +21,11 @@ use url::Url; use crate::env::NodeResolverEnv; use crate::npm::InNpmPackageCheckerRc; use crate::resolution::NodeResolverRc; -use crate::NodeModuleKind; -use crate::NodeResolutionMode; +use crate::NodeResolutionKind; use crate::NpmPackageFolderResolverRc; use crate::PackageJsonResolverRc; use crate::PathClean; +use crate::ResolutionMode; #[derive(Debug, Clone)] pub enum CjsAnalysis<'a> { @@ -209,7 +209,7 @@ impl // FIXME(bartlomieju): check if these conditions are okay, probably // should be `deno-require`, because `deno` is already used in `esm_resolver.rs` &["deno", "node", "require", "default"], - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, ); let reexport_specifier = match result { Ok(Some(specifier)) => specifier, @@ -303,7 +303,7 @@ impl specifier: &str, referrer: &Url, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, AnyError> { if specifier.starts_with('/') { todo!(); @@ -354,9 +354,9 @@ impl &package_subpath, exports, Some(referrer), - NodeModuleKind::Esm, + ResolutionMode::Import, conditions, - mode, + resolution_kind, ) .map_err(AnyError::from), ) @@ -373,7 +373,9 @@ impl .pkg_json_resolver .load_package_json(&package_json_path)?; if let Some(package_json) = maybe_package_json { - if let Some(main) = package_json.main(NodeModuleKind::Cjs) { + if let Some(main) = + package_json.main(deno_package_json::NodeModuleKind::Cjs) + { return Ok(Some(url_from_file_path(&d.join(main).clean())?)); } } @@ -384,7 +386,9 @@ impl .file_extension_probe(d, &referrer_path) .and_then(|p| url_from_file_path(&p).map_err(AnyError::from)) .map(Some); - } else if let Some(main) = package_json.main(NodeModuleKind::Cjs) { + } else if let Some(main) = + package_json.main(deno_package_json::NodeModuleKind::Cjs) + { return Ok(Some(url_from_file_path(&module_dir.join(main).clean())?)); } else { return Ok(Some(url_from_file_path( diff --git a/resolvers/node/errors.rs b/resolvers/node/errors.rs index 0f332d2c931685..600a365a8f5c20 100644 --- a/resolvers/node/errors.rs +++ b/resolvers/node/errors.rs @@ -8,8 +8,8 @@ use boxed_error::Boxed; use thiserror::Error; use url::Url; -use crate::NodeModuleKind; -use crate::NodeResolutionMode; +use crate::NodeResolutionKind; +use crate::ResolutionMode; #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[allow(non_camel_case_types)] @@ -203,24 +203,24 @@ pub enum PackageSubpathResolveErrorKind { maybe_referrer.as_ref().map(|r| format!( " from{} referrer {}", - match referrer_kind { - NodeModuleKind::Esm => "", - NodeModuleKind::Cjs => " cjs", + match resolution_mode { + ResolutionMode::Import => "", + ResolutionMode::Require => " cjs", }, r ) ).unwrap_or_default(), - match mode { - NodeResolutionMode::Execution => "", - NodeResolutionMode::Types => " for types", + match resolution_kind { + NodeResolutionKind::Execution => "", + NodeResolutionKind::Types => " for types", } )] pub struct PackageTargetNotFoundError { pub pkg_json_path: PathBuf, pub target: String, pub maybe_referrer: Option, - pub referrer_kind: NodeModuleKind, - pub mode: NodeResolutionMode, + pub resolution_mode: ResolutionMode, + pub resolution_kind: NodeResolutionKind, } impl NodeJsErrorCoded for PackageTargetNotFoundError { @@ -586,7 +586,7 @@ pub struct PackagePathNotExportedError { pub pkg_json_path: PathBuf, pub subpath: String, pub maybe_referrer: Option, - pub mode: NodeResolutionMode, + pub resolution_kind: NodeResolutionKind, } impl NodeJsErrorCoded for PackagePathNotExportedError { @@ -603,9 +603,9 @@ impl std::fmt::Display for PackagePathNotExportedError { f.write_str(self.code().as_str())?; f.write_char(']')?; - let types_msg = match self.mode { - NodeResolutionMode::Execution => String::new(), - NodeResolutionMode::Types => " for types".to_string(), + let types_msg = match self.resolution_kind { + NodeResolutionKind::Execution => String::new(), + NodeResolutionKind::Types => " for types".to_string(), }; if self.subpath == "." { write!( @@ -678,7 +678,7 @@ mod test { pkg_json_path: PathBuf::from("test_path").join("package.json"), subpath: "./jsx-runtime".to_string(), maybe_referrer: None, - mode: NodeResolutionMode::Types + resolution_kind: NodeResolutionKind::Types }.to_string(), format!("[ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './jsx-runtime' is not defined for types by \"exports\" in 'test_path{separator_char}package.json'") ); @@ -687,7 +687,7 @@ mod test { pkg_json_path: PathBuf::from("test_path").join("package.json"), subpath: ".".to_string(), maybe_referrer: None, - mode: NodeResolutionMode::Types + resolution_kind: NodeResolutionKind::Types }.to_string(), format!("[ERR_PACKAGE_PATH_NOT_EXPORTED] No \"exports\" main defined for types in 'test_path{separator_char}package.json'") ); diff --git a/resolvers/node/lib.rs b/resolvers/node/lib.rs index 87bd6299466b84..8da20c421e8e66 100644 --- a/resolvers/node/lib.rs +++ b/resolvers/node/lib.rs @@ -23,9 +23,9 @@ pub use package_json::PackageJsonThreadLocalCache; pub use path::PathClean; pub use resolution::parse_npm_pkg_name; pub use resolution::resolve_specifier_into_node_modules; -pub use resolution::NodeModuleKind; pub use resolution::NodeResolution; -pub use resolution::NodeResolutionMode; +pub use resolution::NodeResolutionKind; pub use resolution::NodeResolver; +pub use resolution::ResolutionMode; pub use resolution::DEFAULT_CONDITIONS; pub use resolution::REQUIRE_CONDITIONS; diff --git a/resolvers/node/resolution.rs b/resolvers/node/resolution.rs index c2ec25aca4968f..5f87698cd6eeaf 100644 --- a/resolvers/node/resolution.rs +++ b/resolvers/node/resolution.rs @@ -50,26 +50,30 @@ pub static DEFAULT_CONDITIONS: &[&str] = &["deno", "node", "import"]; pub static REQUIRE_CONDITIONS: &[&str] = &["require", "node"]; static TYPES_ONLY_CONDITIONS: &[&str] = &["types"]; -fn conditions_from_module_kind( - kind: NodeModuleKind, +fn conditions_from_resolution_mode( + resolution_mode: ResolutionMode, ) -> &'static [&'static str] { - match kind { - NodeModuleKind::Esm => DEFAULT_CONDITIONS, - NodeModuleKind::Cjs => REQUIRE_CONDITIONS, + match resolution_mode { + ResolutionMode::Import => DEFAULT_CONDITIONS, + ResolutionMode::Require => REQUIRE_CONDITIONS, } } -pub type NodeModuleKind = deno_package_json::NodeModuleKind; +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum ResolutionMode { + Import, + Require, +} -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum NodeResolutionMode { +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum NodeResolutionKind { Execution, Types, } -impl NodeResolutionMode { +impl NodeResolutionKind { pub fn is_types(&self) -> bool { - matches!(self, NodeResolutionMode::Types) + matches!(self, NodeResolutionKind::Types) } } @@ -130,8 +134,8 @@ impl NodeResolver { &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { // Note: if we are here, then the referrer is an esm module // TODO(bartlomieju): skipped "policy" part as we don't plan to support it @@ -174,14 +178,18 @@ impl NodeResolver { let url = self.module_resolve( specifier, referrer, - referrer_kind, - conditions_from_module_kind(referrer_kind), - mode, + resolution_mode, + conditions_from_resolution_mode(resolution_mode), + resolution_kind, )?; - let url = if mode.is_types() { + let url = if resolution_kind.is_types() { let file_path = to_file_path(&url); - self.path_to_declaration_url(&file_path, Some(referrer), referrer_kind)? + self.path_to_declaration_url( + &file_path, + Some(referrer), + resolution_mode, + )? } else { url }; @@ -197,9 +205,9 @@ impl NodeResolver { &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if should_be_treated_as_relative_or_absolute_path(specifier) { Ok(node_join_url(referrer, specifier).map_err(|err| { @@ -218,10 +226,10 @@ impl NodeResolver { Ok(self.package_imports_resolve( specifier, Some(referrer), - referrer_kind, + resolution_mode, pkg_config.as_deref(), conditions, - mode, + resolution_kind, )?) } else if let Ok(resolved) = Url::parse(specifier) { Ok(resolved) @@ -229,9 +237,9 @@ impl NodeResolver { Ok(self.package_resolve( specifier, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, )?) } } @@ -307,8 +315,8 @@ impl NodeResolver { package_dir: &Path, package_subpath: Option<&str>, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_subpath = package_subpath .map(|s| format!("./{s}")) @@ -317,9 +325,9 @@ impl NodeResolver { package_dir, &package_subpath, maybe_referrer, - referrer_kind, - conditions_from_module_kind(referrer_kind), - mode, + resolution_mode, + conditions_from_resolution_mode(resolution_mode), + resolution_kind, )?; // TODO(bartlomieju): skipped checking errors for commonJS resolution and // "preserveSymlinksMain"/"preserveSymlinks" options. @@ -385,13 +393,13 @@ impl NodeResolver { &self, path: &Path, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> Result { fn probe_extensions( fs: &TEnv, path: &Path, lowercase_path: &str, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> Option { let mut searched_for_d_mts = false; let mut searched_for_d_cts = false; @@ -414,11 +422,11 @@ impl NodeResolver { return Some(dts_path); } - let specific_dts_path = match referrer_kind { - NodeModuleKind::Cjs if !searched_for_d_cts => { + let specific_dts_path = match resolution_mode { + ResolutionMode::Require if !searched_for_d_cts => { Some(with_known_extension(path, "d.cts")) } - NodeModuleKind::Esm if !searched_for_d_mts => { + ResolutionMode::Import if !searched_for_d_mts => { Some(with_known_extension(path, "d.mts")) } _ => None, // already searched above @@ -439,7 +447,7 @@ impl NodeResolver { return Ok(url_from_file_path(path).unwrap()); } if let Some(path) = - probe_extensions(&self.env, path, &lowercase_path, referrer_kind) + probe_extensions(&self.env, path, &lowercase_path, resolution_mode) { return Ok(url_from_file_path(&path).unwrap()); } @@ -448,9 +456,9 @@ impl NodeResolver { path, /* sub path */ ".", maybe_referrer, - referrer_kind, - conditions_from_module_kind(referrer_kind), - NodeResolutionMode::Types, + resolution_mode, + conditions_from_resolution_mode(resolution_mode), + NodeResolutionKind::Types, ); if let Ok(resolution) = resolution_result { return Ok(resolution); @@ -460,7 +468,7 @@ impl NodeResolver { &self.env, &index_path, &index_path.to_string_lossy().to_lowercase(), - referrer_kind, + resolution_mode, ) { return Ok(url_from_file_path(&path).unwrap()); } @@ -480,10 +488,10 @@ impl NodeResolver { &self, name: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, referrer_pkg_json: Option<&PackageJson>, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if name == "#" || name.starts_with("#/") || name.ends_with('/') { let reason = "is not a valid internal imports specifier name"; @@ -509,11 +517,11 @@ impl NodeResolver { "", name, maybe_referrer, - referrer_kind, + resolution_mode, false, true, conditions, - mode, + resolution_kind, )?; if let Some(resolved) = maybe_resolved { return Ok(resolved); @@ -549,11 +557,11 @@ impl NodeResolver { best_match_subpath.unwrap(), best_match, maybe_referrer, - referrer_kind, + resolution_mode, true, true, conditions, - mode, + resolution_kind, )?; if let Some(resolved) = maybe_resolved { return Ok(resolved); @@ -581,11 +589,11 @@ impl NodeResolver { match_: &str, package_json_path: &Path, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, pattern: bool, internal: bool, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if !subpath.is_empty() && !pattern && !target.ends_with('/') { return Err( @@ -626,9 +634,9 @@ impl NodeResolver { let result = match self.package_resolve( &export_target, &package_json_url, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) { Ok(url) => Ok(url), Err(err) => match err.code() { @@ -649,8 +657,8 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), target: export_target.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - referrer_kind, - mode, + resolution_mode, + resolution_kind, }, ) .into(), @@ -746,11 +754,11 @@ impl NodeResolver { subpath: &str, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, pattern: bool, internal: bool, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, PackageTargetResolveError> { let result = self.resolve_package_target_inner( package_json_path, @@ -758,16 +766,16 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, ); match result { Ok(maybe_resolved) => Ok(maybe_resolved), Err(err) => { - if mode.is_types() + if resolution_kind.is_types() && err.code() == NodeJsErrorCode::ERR_TYPES_NOT_FOUND && conditions != TYPES_ONLY_CONDITIONS { @@ -779,11 +787,11 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, TYPES_ONLY_CONDITIONS, - mode, + resolution_kind, ) { return Ok(Some(resolved)); } @@ -802,11 +810,11 @@ impl NodeResolver { subpath: &str, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, pattern: bool, internal: bool, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, PackageTargetResolveError> { if let Some(target) = target.as_str() { let url = self.resolve_package_target_string( @@ -815,18 +823,18 @@ impl NodeResolver { package_subpath, package_json_path, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, )?; - if mode.is_types() && url.scheme() == "file" { + if resolution_kind.is_types() && url.scheme() == "file" { let path = deno_path_util::url_to_file_path(&url).unwrap(); return Ok(Some(self.path_to_declaration_url( &path, maybe_referrer, - referrer_kind, + resolution_mode, )?)); } else { return Ok(Some(url)); @@ -844,11 +852,11 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, ); match resolved_result { @@ -882,7 +890,7 @@ impl NodeResolver { if key == "default" || conditions.contains(&key.as_str()) - || mode.is_types() && key.as_str() == "types" + || resolution_kind.is_types() && key.as_str() == "types" { let condition_target = target_obj.get(key).unwrap(); @@ -892,11 +900,11 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, )?; match resolved { Some(resolved) => return Ok(Some(resolved)), @@ -929,9 +937,9 @@ impl NodeResolver { package_subpath: &str, package_exports: &Map, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if package_exports.contains_key(package_subpath) && package_subpath.find('*').is_none() @@ -944,11 +952,11 @@ impl NodeResolver { "", package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, false, false, conditions, - mode, + resolution_kind, )?; return match resolved { Some(resolved) => Ok(resolved), @@ -957,7 +965,7 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), subpath: package_subpath.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - mode, + resolution_kind, } .into(), ), @@ -1006,11 +1014,11 @@ impl NodeResolver { &best_match_subpath.unwrap(), best_match, maybe_referrer, - referrer_kind, + resolution_mode, true, false, conditions, - mode, + resolution_kind, )?; if let Some(resolved) = maybe_resolved { return Ok(resolved); @@ -1020,7 +1028,7 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), subpath: package_subpath.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - mode, + resolution_kind, } .into(), ); @@ -1032,7 +1040,7 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), subpath: package_subpath.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - mode, + resolution_kind, } .into(), ) @@ -1042,9 +1050,9 @@ impl NodeResolver { &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let (package_name, package_subpath, _is_scoped) = parse_npm_pkg_name(specifier, referrer)?; @@ -1061,9 +1069,9 @@ impl NodeResolver { &package_subpath, exports, Some(referrer), - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) .map_err(|err| err.into()); } @@ -1074,9 +1082,9 @@ impl NodeResolver { &package_name, &package_subpath, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) } @@ -1086,28 +1094,28 @@ impl NodeResolver { package_name: &str, package_subpath: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let result = self.resolve_package_subpath_for_package_inner( package_name, package_subpath, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ); - if mode.is_types() && !matches!(result, Ok(Url { .. })) { + if resolution_kind.is_types() && !matches!(result, Ok(Url { .. })) { // try to resolve with the @types package let package_name = types_package_name(package_name); if let Ok(result) = self.resolve_package_subpath_for_package_inner( &package_name, package_subpath, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) { return Ok(result); } @@ -1121,9 +1129,9 @@ impl NodeResolver { package_name: &str, package_subpath: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_dir_path = self .npm_pkg_folder_resolver @@ -1148,9 +1156,9 @@ impl NodeResolver { &package_dir_path, package_subpath, Some(referrer), - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) .map_err(|err| err.into()) } @@ -1161,9 +1169,9 @@ impl NodeResolver { package_dir_path: &Path, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_json_path = package_dir_path.join("package.json"); match self @@ -1174,17 +1182,17 @@ impl NodeResolver { &pkg_json, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ), None => self .resolve_package_subpath_no_pkg_json( package_dir_path, package_subpath, maybe_referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err).into() @@ -1198,9 +1206,9 @@ impl NodeResolver { package_json: &PackageJson, package_subpath: &str, referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if let Some(exports) = &package_json.exports { let result = self.package_exports_resolve( @@ -1208,16 +1216,21 @@ impl NodeResolver { package_subpath, exports, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ); match result { Ok(found) => return Ok(found), Err(exports_err) => { - if mode.is_types() && package_subpath == "." { + if resolution_kind.is_types() && package_subpath == "." { return self - .legacy_main_resolve(package_json, referrer, referrer_kind, mode) + .legacy_main_resolve( + package_json, + referrer, + resolution_mode, + resolution_kind, + ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err).into() }); @@ -1231,7 +1244,12 @@ impl NodeResolver { if package_subpath == "." { return self - .legacy_main_resolve(package_json, referrer, referrer_kind, mode) + .legacy_main_resolve( + package_json, + referrer, + resolution_mode, + resolution_kind, + ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err).into() }); @@ -1242,8 +1260,8 @@ impl NodeResolver { package_json.path.parent().unwrap(), package_subpath, referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err.into()).into() @@ -1255,13 +1273,13 @@ impl NodeResolver { directory: &Path, package_subpath: &str, referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { assert_ne!(package_subpath, "."); let file_path = directory.join(package_subpath); - if mode.is_types() { - Ok(self.path_to_declaration_url(&file_path, referrer, referrer_kind)?) + if resolution_kind.is_types() { + Ok(self.path_to_declaration_url(&file_path, referrer, resolution_mode)?) } else { Ok(url_from_file_path(&file_path).unwrap()) } @@ -1272,19 +1290,24 @@ impl NodeResolver { directory: &Path, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if package_subpath == "." { - self.legacy_index_resolve(directory, maybe_referrer, referrer_kind, mode) + self.legacy_index_resolve( + directory, + maybe_referrer, + resolution_mode, + resolution_kind, + ) } else { self .resolve_subpath_exact( directory, package_subpath, maybe_referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|err| err.into()) } @@ -1294,21 +1317,25 @@ impl NodeResolver { &self, package_json: &PackageJson, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { - let maybe_main = if mode.is_types() { + let pkg_json_kind = match resolution_mode { + ResolutionMode::Require => deno_package_json::NodeModuleKind::Cjs, + ResolutionMode::Import => deno_package_json::NodeModuleKind::Esm, + }; + let maybe_main = if resolution_kind.is_types() { match package_json.types.as_ref() { Some(types) => Some(types.as_str()), None => { // fallback to checking the main entrypoint for // a corresponding declaration file - if let Some(main) = package_json.main(referrer_kind) { + if let Some(main) = package_json.main(pkg_json_kind) { let main = package_json.path.parent().unwrap().join(main).clean(); let decl_url_result = self.path_to_declaration_url( &main, maybe_referrer, - referrer_kind, + resolution_mode, ); // don't surface errors, fallback to checking the index now if let Ok(url) = decl_url_result { @@ -1319,7 +1346,7 @@ impl NodeResolver { } } } else { - package_json.main(referrer_kind) + package_json.main(pkg_json_kind) }; if let Some(main) = maybe_main { @@ -1329,12 +1356,12 @@ impl NodeResolver { } // todo(dsherret): investigate exactly how node and typescript handles this - let endings = if mode.is_types() { - match referrer_kind { - NodeModuleKind::Cjs => { + let endings = if resolution_kind.is_types() { + match resolution_mode { + ResolutionMode::Require => { vec![".d.ts", ".d.cts", "/index.d.ts", "/index.d.cts"] } - NodeModuleKind::Esm => vec![ + ResolutionMode::Import => vec![ ".d.ts", ".d.mts", "/index.d.ts", @@ -1363,8 +1390,8 @@ impl NodeResolver { self.legacy_index_resolve( package_json.path.parent().unwrap(), maybe_referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) } @@ -1372,14 +1399,16 @@ impl NodeResolver { &self, directory: &Path, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { - let index_file_names = if mode.is_types() { + let index_file_names = if resolution_kind.is_types() { // todo(dsherret): investigate exactly how typescript does this - match referrer_kind { - NodeModuleKind::Cjs => vec!["index.d.ts", "index.d.cts"], - NodeModuleKind::Esm => vec!["index.d.ts", "index.d.mts", "index.d.cts"], + match resolution_mode { + ResolutionMode::Require => vec!["index.d.ts", "index.d.cts"], + ResolutionMode::Import => { + vec!["index.d.ts", "index.d.mts", "index.d.cts"] + } } } else { vec!["index.js"] @@ -1392,7 +1421,7 @@ impl NodeResolver { } } - if mode.is_types() { + if resolution_kind.is_types() { Err( TypesNotFoundError(Box::new(TypesNotFoundErrorData { code_specifier: url_from_file_path(&directory.join("index.js")) diff --git a/tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc b/tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc new file mode 100644 index 00000000000000..8e03984f0b341a --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc @@ -0,0 +1,44 @@ +{ + "tests": { + "cjs_check": { + "args": "check index.cts", + "output": "check.out", + "exitCode": 1 + }, + "cjs_run": { + "args": "run index.cts", + "output": "run_cjs.out" + }, + "mjs_run": { + "args": "run index.mjs", + "output": "run_mts.out" + }, + "jsdoc_import_decl": { + "args": "check jsdoc_import_decl.js", + "output": "jsdoc_import_decl.out", + "exitCode": 1 + }, + "resolution_mode_import": { + "args": "check resolution_mode_import.mts", + "output": "resolution_mode_import.out", + "exitCode": 1 + }, + "resolution_mode_require": { + "args": "check resolution_mode_require.mts", + "output": "resolution_mode_require.out", + "exitCode": 1 + }, + "resolution_mode_require_jsdoc": { + "args": "check resolution_mode_require_jsdoc.js", + "output": "resolution_mode_require_jsdoc.out", + "exitCode": 1 + }, + "resolution_mode_require_import_type": { + // waiting on https://github.com/swc-project/swc/issues/9377 + "ignore": true, + "args": "check resolution_mode_require_import_type.ts", + "output": "resolution_mode_require_import_type.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/check.out b/tests/specs/node/dynamic_import_and_require_dual/check.out new file mode 100644 index 00000000000000..bbea340cce6a2c --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/check.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/index.cts +error: TS2322 [ERROR]: Type '"mjs"' is not assignable to type '"value"'. + const value: "value" = mod.kind; + ~~~~~ + at file:///[WILDLINE]/index.cts:3:9 diff --git a/tests/specs/node/dynamic_import_and_require_dual/index.cts b/tests/specs/node/dynamic_import_and_require_dual/index.cts new file mode 100644 index 00000000000000..d3bc653c652539 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/index.cts @@ -0,0 +1,8 @@ +async function main() { + const mod = await import("package"); + const value: "value" = mod.kind; + console.log(value); + console.log(mod); +} + +main(); diff --git a/tests/specs/node/dynamic_import_and_require_dual/index.mjs b/tests/specs/node/dynamic_import_and_require_dual/index.mjs new file mode 100644 index 00000000000000..76f21fec90ff59 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/index.mjs @@ -0,0 +1,11 @@ +import { createRequire } from "node:module"; +{ + const mod = await import("package"); + console.log(mod.kind); + console.log(mod); +} +{ + const require = createRequire(import.meta.url); + const mod = require("package"); + console.log(mod); +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js new file mode 100644 index 00000000000000..153b9fe3a6a092 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @import { kind } from "package" */ + +/** + * @param {typeof kind} myValue + */ +export function log(myValue) { + console.log(myValue); +} + +log("value"); diff --git a/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out new file mode 100644 index 00000000000000..655d47117f3fe5 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/jsdoc_import_decl.js +error: TS2345 [ERROR]: Argument of type '"value"' is not assignable to parameter of type '"mjs"'. +log("value"); + ~~~~~~~ + at file:///[WILDLINE]/jsdoc_import_decl.js:12:5 diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts new file mode 100644 index 00000000000000..bd4baa591949ae --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts @@ -0,0 +1 @@ +export const kind: "mjs"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs new file mode 100644 index 00000000000000..cd2f5f05cb03e5 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs @@ -0,0 +1 @@ +export const kind = "esm"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json new file mode 100644 index 00000000000000..f4adc7925ec0ef --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json @@ -0,0 +1,11 @@ +{ + "name": "package", + "version": "1.0.0", + "type": "module", + "exports": { + ".": { + "import": "./mod.mjs", + "require": "./require.cjs" + } + } +} \ No newline at end of file diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs new file mode 100644 index 00000000000000..2b7ebd9693b702 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs @@ -0,0 +1 @@ +module.exports.kind = "cjs"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts new file mode 100644 index 00000000000000..604f6136b43315 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts @@ -0,0 +1 @@ +export const kind: "cjs"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/package.json b/tests/specs/node/dynamic_import_and_require_dual/package.json new file mode 100644 index 00000000000000..ab1ab85da22618 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/package.json @@ -0,0 +1,6 @@ +{ + "type": "commonjs", + "dependencies": { + "package": "*" + } +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts new file mode 100644 index 00000000000000..86b06fb832705b --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts @@ -0,0 +1,6 @@ +import type { kind } from "package" with { + "resolution-mode": "import", +}; + +const test: typeof kind = "other"; +console.log(test); diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out new file mode 100644 index 00000000000000..735cfe53aca14f --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/resolution_mode_import.mts +error: TS2322 [ERROR]: Type '"other"' is not assignable to type '"mjs"'. +const test: typeof kind = "other"; + ~~~~ + at file:///[WILDLINE]/resolution_mode_import.mts:5:7 diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts new file mode 100644 index 00000000000000..1695f29adef18a --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts @@ -0,0 +1,6 @@ +import type { kind } from "package" with { + "resolution-mode": "require", +}; + +const test: typeof kind = "other"; +console.log(test); diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out new file mode 100644 index 00000000000000..32cdd86f0dd300 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/resolution_mode_require.mts +error: TS2322 [ERROR]: Type '"other"' is not assignable to type '"cjs"'. +const test: typeof kind = "other"; + ~~~~ + at file:///[WILDLINE]/resolution_mode_require.mts:5:7 diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.out new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts new file mode 100644 index 00000000000000..295bab0e9cdb66 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts @@ -0,0 +1,5 @@ +// deno-fmt-ignore-file +type Value = typeof import("package", { with: { 'resolution-mode': 'require' } }).kind; + +const value: Value = "value"; +console.log(value); \ No newline at end of file diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js new file mode 100644 index 00000000000000..0d0040513f36d5 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @import { kind } from "package" with { 'resolution-mode': 'require' } */ + +/** + * @param {typeof kind} myValue + */ +export function log(myValue) { + console.log(myValue); +} + +log("value"); diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out new file mode 100644 index 00000000000000..924681fe8016be --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/resolution_mode_require_jsdoc.js +error: TS2345 [ERROR]: Argument of type '"value"' is not assignable to parameter of type '"cjs"'. +log("value"); + ~~~~~~~ + at file:///[WILDLINE]/resolution_mode_require_jsdoc.js:12:5 diff --git a/tests/specs/node/dynamic_import_and_require_dual/run_cjs.out b/tests/specs/node/dynamic_import_and_require_dual/run_cjs.out new file mode 100644 index 00000000000000..d64c24da5d30c6 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/run_cjs.out @@ -0,0 +1,2 @@ +esm +[Module: null prototype] { kind: "esm" } diff --git a/tests/specs/node/dynamic_import_and_require_dual/run_mts.out b/tests/specs/node/dynamic_import_and_require_dual/run_mts.out new file mode 100644 index 00000000000000..afd3f2e2777243 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/run_mts.out @@ -0,0 +1,3 @@ +esm +[Module: null prototype] { kind: "esm" } +{ kind: "cjs" } diff --git a/tests/specs/npm/info_chalk_display/__test__.jsonc b/tests/specs/npm/info_chalk_display/__test__.jsonc index 54b5b74396f1f4..717f1f9a15570f 100644 --- a/tests/specs/npm/info_chalk_display/__test__.jsonc +++ b/tests/specs/npm/info_chalk_display/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info.out", + "args": "info --quiet main.js", + "output": "main_info.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main.out deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out deleted file mode 100644 index 137b9f8ce56c3d..00000000000000 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1, - "roots": [ - "file://[WILDCARD]/main.js" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:chalk@4", - "code": { - "specifier": "npm:chalk@4", - "span": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 31 - } - } - }, - "npmPackage": "chalk@4.1.2" - }, - { - "specifier": "npm:chai@4.3", - "code": { - "specifier": "npm:chai@4.3", - "span": { - "start": { - "line": 1, - "character": 23 - }, - "end": { - "line": 1, - "character": 37 - } - } - }, - "npmPackage": "chai@4.3.6" - } - ], - "local": "[WILDCARD]main.js", - "size": 325, - "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" - } - ], - "redirects": { - "npm:chai@4.3": "npm:/chai@4.3.6", - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "assertion-error@1.1.0": { - "name": "assertion-error", - "version": "1.1.0", - "dependencies": [] - }, - "chai@4.3.6": { - "name": "chai", - "version": "4.3.6", - "dependencies": [ - "assertion-error@1.1.0", - "check-error@1.0.2", - "deep-eql@3.0.1", - "get-func-name@2.0.0", - "loupe@2.3.4", - "pathval@1.1.1", - "type-detect@4.0.8" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "check-error@1.0.2": { - "name": "check-error", - "version": "1.0.2", - "dependencies": [] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "deep-eql@3.0.1": { - "name": "deep-eql", - "version": "3.0.1", - "dependencies": [ - "type-detect@4.0.8" - ] - }, - "get-func-name@2.0.0": { - "name": "get-func-name", - "version": "2.0.0", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "loupe@2.3.4": { - "name": "loupe", - "version": "2.3.4", - "dependencies": [ - "get-func-name@2.0.0" - ] - }, - "pathval@1.1.1": { - "name": "pathval", - "version": "1.1.1", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - }, - "type-detect@4.0.8": { - "name": "type-detect", - "version": "4.0.8", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_display/main.js similarity index 100% rename from tests/specs/npm/info_chalk_display/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_display/main.js diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_display/main_info.out similarity index 94% rename from tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out rename to tests/specs/npm/info_chalk_display/main_info.out index 8e37c88eb00f0c..f1271ec1f11dfd 100644 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out +++ b/tests/specs/npm/info_chalk_display/main_info.out @@ -3,7 +3,7 @@ type: JavaScript dependencies: 14 unique size: [WILDCARD] -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +file:///[WILDCARD]/main.js ([WILDCARD]) ├─┬ npm:/chalk@4.1.2 ([WILDCARD]) │ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) │ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc b/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc index 4358f64883032c..b5c36dc6c1c22e 100644 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc +++ b/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc @@ -1,6 +1,6 @@ { "tempDir": true, - "args": "info --quiet --node-modules-dir cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info.out", + "args": "info --quiet --node-modules-dir main.js", + "output": "main_info.out", "exitCode": 0 } diff --git a/tests/specs/npm/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 deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/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 deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/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 deleted file mode 100644 index 137b9f8ce56c3d..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1, - "roots": [ - "file://[WILDCARD]/main.js" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:chalk@4", - "code": { - "specifier": "npm:chalk@4", - "span": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 31 - } - } - }, - "npmPackage": "chalk@4.1.2" - }, - { - "specifier": "npm:chai@4.3", - "code": { - "specifier": "npm:chai@4.3", - "span": { - "start": { - "line": 1, - "character": 23 - }, - "end": { - "line": 1, - "character": 37 - } - } - }, - "npmPackage": "chai@4.3.6" - } - ], - "local": "[WILDCARD]main.js", - "size": 325, - "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" - } - ], - "redirects": { - "npm:chai@4.3": "npm:/chai@4.3.6", - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "assertion-error@1.1.0": { - "name": "assertion-error", - "version": "1.1.0", - "dependencies": [] - }, - "chai@4.3.6": { - "name": "chai", - "version": "4.3.6", - "dependencies": [ - "assertion-error@1.1.0", - "check-error@1.0.2", - "deep-eql@3.0.1", - "get-func-name@2.0.0", - "loupe@2.3.4", - "pathval@1.1.1", - "type-detect@4.0.8" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "check-error@1.0.2": { - "name": "check-error", - "version": "1.0.2", - "dependencies": [] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "deep-eql@3.0.1": { - "name": "deep-eql", - "version": "3.0.1", - "dependencies": [ - "type-detect@4.0.8" - ] - }, - "get-func-name@2.0.0": { - "name": "get-func-name", - "version": "2.0.0", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "loupe@2.3.4": { - "name": "loupe", - "version": "2.3.4", - "dependencies": [ - "get-func-name@2.0.0" - ] - }, - "pathval@1.1.1": { - "name": "pathval", - "version": "1.1.1", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - }, - "type-detect@4.0.8": { - "name": "type-detect", - "version": "4.0.8", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_display_node_modules_dir/main.js similarity index 100% rename from tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_display_node_modules_dir/main.js diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_display_node_modules_dir/main_info.out similarity index 94% rename from tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out rename to tests/specs/npm/info_chalk_display_node_modules_dir/main_info.out index 8e37c88eb00f0c..f1271ec1f11dfd 100644 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out +++ b/tests/specs/npm/info_chalk_display_node_modules_dir/main_info.out @@ -3,7 +3,7 @@ type: JavaScript dependencies: 14 unique size: [WILDCARD] -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) +file:///[WILDCARD]/main.js ([WILDCARD]) ├─┬ npm:/chalk@4.1.2 ([WILDCARD]) │ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) │ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_json/__test__.jsonc b/tests/specs/npm/info_chalk_json/__test__.jsonc index c6e65db94b6f5d..c5a4a95bf7324a 100644 --- a/tests/specs/npm/info_chalk_json/__test__.jsonc +++ b/tests/specs/npm/info_chalk_json/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet --json cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info_json.out", + "args": "info --quiet --json main.js", + "output": "main_info_json.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_json/main.js similarity index 100% rename from tests/specs/npm/info_chalk_json/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_json/main.js diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json/main_info_json.out similarity index 100% rename from tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out rename to tests/specs/npm/info_chalk_json/main_info_json.out diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc b/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc index 29c5e8bdff5952..ed9a96606e08f7 100644 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc +++ b/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc @@ -1,6 +1,6 @@ { "tempDir": true, - "args": "info --quiet --node-modules-dir --json cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info_json.out", + "args": "info --quiet --node-modules-dir --json main.js", + "output": "main_info_json.out", "exitCode": 0 } diff --git a/tests/specs/npm/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 deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/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 deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/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 deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_json_node_modules_dir/main.js similarity index 100% rename from tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_json_node_modules_dir/main.js diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json_node_modules_dir/main_info_json.out similarity index 100% rename from tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out rename to tests/specs/npm/info_chalk_json_node_modules_dir/main_info_json.out diff --git a/tests/specs/npm/info_peer_deps/__test__.jsonc b/tests/specs/npm/info_peer_deps/__test__.jsonc index 00dfbc98b79f15..b726c50db1e7e6 100644 --- a/tests/specs/npm/info_peer_deps/__test__.jsonc +++ b/tests/specs/npm/info_peer_deps/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet peer_deps_with_copied_folders/main.ts", - "output": "peer_deps_with_copied_folders/main_info.out", + "args": "info --quiet main.ts", + "output": "main_info.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts b/tests/specs/npm/info_peer_deps/main.ts similarity index 100% rename from tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts rename to tests/specs/npm/info_peer_deps/main.ts diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm/info_peer_deps/main_info.out similarity index 91% rename from tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out rename to tests/specs/npm/info_peer_deps/main_info.out index e8b92399df6c47..1269b1c1db0c76 100644 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out +++ b/tests/specs/npm/info_peer_deps/main_info.out @@ -3,7 +3,7 @@ type: TypeScript dependencies: 6 unique size: [WILDCARD] -file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B) +file:///[WILDCARD]/main.ts (171B) ├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) │ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) │ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out deleted file mode 100644 index b7a5835577b216..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out +++ /dev/null @@ -1,14 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/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 deleted file mode 100644 index 46cc35c650e572..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out +++ /dev/null @@ -1,97 +0,0 @@ -{ - "version": 1, - "roots": [ - "[WILDCARD]/peer_deps_with_copied_folders/main.ts" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:@denotest/peer-dep-test-child@1", - "code": { - "specifier": "npm:@denotest/peer-dep-test-child@1", - "span": { - "start": { - "line": 0, - "character": 21 - }, - "end": { - "line": 0, - "character": 58 - } - } - }, - "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0" - }, - { - "specifier": "npm:@denotest/peer-dep-test-child@2", - "code": { - "specifier": "npm:@denotest/peer-dep-test-child@2", - "span": { - "start": { - "line": 1, - "character": 21 - }, - "end": { - "line": 1, - "character": 58 - } - } - }, - "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0" - } - ], - "local": "[WILDCARD]main.ts", - "size": 171, - "mediaType": "TypeScript", - "specifier": "file://[WILDCARD]/main.ts" - } - ], - "redirects": { - "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", - "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" - }, - "npmPackages": { - "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { - "name": "@denotest/peer-dep-test-child", - "version": "1.0.0", - "dependencies": [ - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0", - "@denotest/peer-dep-test-peer@1.0.0" - ] - }, - "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": { - "name": "@denotest/peer-dep-test-child", - "version": "2.0.0", - "dependencies": [ - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0", - "@denotest/peer-dep-test-peer@2.0.0" - ] - }, - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { - "name": "@denotest/peer-dep-test-grandchild", - "version": "1.0.0", - "dependencies": [ - "@denotest/peer-dep-test-peer@1.0.0" - ] - }, - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": { - "name": "@denotest/peer-dep-test-grandchild", - "version": "1.0.0", - "dependencies": [ - "@denotest/peer-dep-test-peer@2.0.0" - ] - }, - "@denotest/peer-dep-test-peer@1.0.0": { - "name": "@denotest/peer-dep-test-peer", - "version": "1.0.0", - "dependencies": [] - }, - "@denotest/peer-dep-test-peer@2.0.0": { - "name": "@denotest/peer-dep-test-peer", - "version": "2.0.0", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index 02b5cbafd65ee9..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out +++ /dev/null @@ -1,9 +0,0 @@ -[UNORDERED_START] -Initialize @denotest/peer-dep-test-child@1.0.0 -Initialize @denotest/peer-dep-test-child@2.0.0 -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Initialize @denotest/peer-dep-test-peer@1.0.0 -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/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 deleted file mode 100644 index 18d7f7865ba6f0..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out +++ /dev/null @@ -1,19 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Initialize @denotest/peer-dep-test-child@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Initialize @denotest/peer-dep-test-child@2.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Initialize @denotest/peer-dep-test-peer@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/info_peer_deps_json/__test__.jsonc b/tests/specs/npm/info_peer_deps_json/__test__.jsonc index 5dd08c325f398c..6950448398a9bd 100644 --- a/tests/specs/npm/info_peer_deps_json/__test__.jsonc +++ b/tests/specs/npm/info_peer_deps_json/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet --json peer_deps_with_copied_folders/main.ts", - "output": "peer_deps_with_copied_folders/main_info_json.out", + "args": "info --quiet --json main.ts", + "output": "main_info_json.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts b/tests/specs/npm/info_peer_deps_json/main.ts similarity index 100% rename from tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts rename to tests/specs/npm/info_peer_deps_json/main.ts diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm/info_peer_deps_json/main_info_json.out similarity index 100% rename from tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out rename to tests/specs/npm/info_peer_deps_json/main_info_json.out diff --git a/tests/specs/npm/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 deleted file mode 100644 index b7a5835577b216..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out +++ /dev/null @@ -1,14 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/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 deleted file mode 100644 index e8b92399df6c47..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out +++ /dev/null @@ -1,14 +0,0 @@ -local: [WILDCARD]main.ts -type: TypeScript -dependencies: 6 unique -size: [WILDCARD] - -file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B) -├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) -│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) -│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) -│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) -└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD]) - ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD]) - │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) - └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/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 deleted file mode 100644 index 02b5cbafd65ee9..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out +++ /dev/null @@ -1,9 +0,0 @@ -[UNORDERED_START] -Initialize @denotest/peer-dep-test-child@1.0.0 -Initialize @denotest/peer-dep-test-child@2.0.0 -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Initialize @denotest/peer-dep-test-peer@1.0.0 -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/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 deleted file mode 100644 index 18d7f7865ba6f0..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out +++ /dev/null @@ -1,19 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Initialize @denotest/peer-dep-test-child@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Initialize @denotest/peer-dep-test-child@2.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Initialize @denotest/peer-dep-test-peer@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 From 4330ef553f6fb5c478916947654859853221a9b3 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Wed, 27 Nov 2024 04:42:54 +0900 Subject: [PATCH 415/436] fix(streams): reject `string` in `ReadableStream.from` type (#25116) WebIDL `async iterable` type rejects `string` Ref https://github.com/whatwg/webidl/pull/1397, #24623 --- cli/tsc/dts/lib.dom.d.ts | 2 +- ext/web/06_streams.js | 4 ++-- ext/web/06_streams_types.d.ts | 4 ++-- ext/web/lib.deno_web.d.ts | 2 +- .../reject_string_in_readable_stream_from/__test__.jsonc | 5 +++++ .../check/reject_string_in_readable_stream_from/main.out | 5 +++++ .../check/reject_string_in_readable_stream_from/main.ts | 1 + tests/unit/streams_test.ts | 1 + 8 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc create mode 100644 tests/specs/check/reject_string_in_readable_stream_from/main.out create mode 100644 tests/specs/check/reject_string_in_readable_stream_from/main.ts diff --git a/cli/tsc/dts/lib.dom.d.ts b/cli/tsc/dts/lib.dom.d.ts index 0a2f9b9edaa6e0..2684735597a37a 100644 --- a/cli/tsc/dts/lib.dom.d.ts +++ b/cli/tsc/dts/lib.dom.d.ts @@ -18277,7 +18277,7 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; - from(asyncIterable: AsyncIterable | Iterable>): ReadableStream; + from(asyncIterable: AsyncIterable | Iterable> & object): ReadableStream; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */ diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js index f29e5f204009be..57a437e4f5c304 100644 --- a/ext/web/06_streams.js +++ b/ext/web/06_streams.js @@ -2922,7 +2922,7 @@ function readableStreamPipeTo( } /** - * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader + * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader * @param {any} reason * @returns {Promise} */ @@ -2955,7 +2955,7 @@ function readableStreamReaderGenericInitialize(reader, stream) { /** * @template R - * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader + * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader */ function readableStreamReaderGenericRelease(reader) { const stream = reader[_stream]; diff --git a/ext/web/06_streams_types.d.ts b/ext/web/06_streams_types.d.ts index e04f568d26644a..fe05ee6e65b167 100644 --- a/ext/web/06_streams_types.d.ts +++ b/ext/web/06_streams_types.d.ts @@ -60,8 +60,8 @@ interface VoidFunction { (): void; } -interface ReadableStreamGenericReader { - readonly closed: Promise; +interface ReadableStreamGenericReader { + readonly closed: Promise; // deno-lint-ignore no-explicit-any cancel(reason?: any): Promise; } diff --git a/ext/web/lib.deno_web.d.ts b/ext/web/lib.deno_web.d.ts index 2ad97ac7d1eef2..8aafbad535923a 100644 --- a/ext/web/lib.deno_web.d.ts +++ b/ext/web/lib.deno_web.d.ts @@ -882,7 +882,7 @@ declare var ReadableStream: { strategy?: QueuingStrategy, ): ReadableStream; from( - asyncIterable: AsyncIterable | Iterable>, + asyncIterable: AsyncIterable | Iterable> & object, ): ReadableStream; }; diff --git a/tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc b/tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc new file mode 100644 index 00000000000000..634dbac8503ab5 --- /dev/null +++ b/tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check ./main.ts", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/check/reject_string_in_readable_stream_from/main.out b/tests/specs/check/reject_string_in_readable_stream_from/main.out new file mode 100644 index 00000000000000..577c1fb059df7f --- /dev/null +++ b/tests/specs/check/reject_string_in_readable_stream_from/main.out @@ -0,0 +1,5 @@ +Check [WILDCARD]/main.ts +error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'AsyncIterable | (Iterable> & object)'. +ReadableStream.from("string"); + ~~~~~~~~ + at [WILDCARD]/main.ts:1:21 diff --git a/tests/specs/check/reject_string_in_readable_stream_from/main.ts b/tests/specs/check/reject_string_in_readable_stream_from/main.ts new file mode 100644 index 00000000000000..5e7fc9c9563ec5 --- /dev/null +++ b/tests/specs/check/reject_string_in_readable_stream_from/main.ts @@ -0,0 +1 @@ +ReadableStream.from("string"); diff --git a/tests/unit/streams_test.ts b/tests/unit/streams_test.ts index 73f9a60953c84b..53225a1553c6a3 100644 --- a/tests/unit/streams_test.ts +++ b/tests/unit/streams_test.ts @@ -541,6 +541,7 @@ Deno.test(async function decompressionStreamInvalidGzipStillReported() { Deno.test(function readableStreamFromWithStringThrows() { assertThrows( + // @ts-expect-error: primitives are not acceptable () => ReadableStream.from("string"), TypeError, "Failed to execute 'ReadableStream.from': Argument 1 can not be converted to async iterable.", From a750314e0452cb8bd4688f274c95fec14556a91b Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:29:46 -0800 Subject: [PATCH 416/436] fix(install): don't re-set up node_modules if running lifecycle script (#26984) Fixes https://github.com/denoland/deno/issues/26904 If using `nodeModulesDir: "auto"`, it's possible for the lifecycle script subprocess to try to set up the node_modules dir (despite the fact that we're already doing that). If it does that, it hangs trying to acquire the file lock on the node_modules dir. As a fix, don't try to set up node_modules if we're running as part of a lifecycle script. Ideally we'd have better control over when we do and don't set up node_modules automatically (that's the underlying problem behind #25782 as well) --- .../managed/resolvers/common/lifecycle_scripts.rs | 13 +++++++++++++ cli/npm/managed/resolvers/local.rs | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs index 5c5755c8197d98..f8b9e8a7e8573f 100644 --- a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs +++ b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs @@ -182,6 +182,12 @@ impl<'a> LifecycleScripts<'a> { ); let mut env_vars = crate::task_runner::real_env_vars(); + // so the subprocess can detect that it is running as part of a lifecycle script, + // and avoid trying to set up node_modules again + env_vars.insert( + LIFECYCLE_SCRIPTS_RUNNING_ENV_VAR.to_string(), + "1".to_string(), + ); // we want to pass the current state of npm resolution down to the deno subprocess // (that may be running as part of the script). we do this with an inherited temp file // @@ -303,6 +309,13 @@ impl<'a> LifecycleScripts<'a> { } } +const LIFECYCLE_SCRIPTS_RUNNING_ENV_VAR: &str = + "DENO_INTERNAL_IS_LIFECYCLE_SCRIPT"; + +pub fn is_running_lifecycle_script() -> bool { + std::env::var(LIFECYCLE_SCRIPTS_RUNNING_ENV_VAR).is_ok() +} + // take in all (non copy) packages from snapshot, // and resolve the set of available binaries to create // custom commands available to the task runner diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs index 50c5bd2689ce45..ca7867425d6419 100644 --- a/cli/npm/managed/resolvers/local.rs +++ b/cli/npm/managed/resolvers/local.rs @@ -298,6 +298,12 @@ async fn sync_resolution_with_fs( return Ok(()); // don't create the directory } + // don't set up node_modules (and more importantly try to acquire the file lock) + // if we're running as part of a lifecycle script + if super::common::lifecycle_scripts::is_running_lifecycle_script() { + return Ok(()); + } + let deno_local_registry_dir = root_node_modules_dir_path.join(".deno"); let deno_node_modules_dir = deno_local_registry_dir.join("node_modules"); fs::create_dir_all(&deno_node_modules_dir).with_context(|| { From e2f7e031b3155d43f8ba073d0abdb551ce227a29 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 26 Nov 2024 19:32:30 -0500 Subject: [PATCH 417/436] chore: fix flaky `specs::publish::npm_workspace_jsr_pkg_with_npm_dep::dep_and_workspace_dep` (#27098) Closes https://github.com/denoland/deno/issues/27097 --- tests/specs/mod.rs | 18 ++++-------------- .../__test__.jsonc | 1 + .../node_modules/.deno/.deno.lock | 0 .../node_modules/.deno/.deno.lock.poll | 1 - .../node_modules/.deno/.setup-cache.bin | Bin 24 -> 0 bytes .../node_modules/add | 1 - .../node_modules/add-dep | 1 - 7 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock delete mode 100644 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll delete mode 100644 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin delete mode 120000 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add delete mode 120000 tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep diff --git a/tests/specs/mod.rs b/tests/specs/mod.rs index b4c8781d312caf..f5820e4d88eb47 100644 --- a/tests/specs/mod.rs +++ b/tests/specs/mod.rs @@ -17,7 +17,6 @@ use file_test_runner::collection::CollectTestsError; use file_test_runner::collection::CollectedCategoryOrTest; use file_test_runner::collection::CollectedTest; use file_test_runner::collection::CollectedTestCategory; -use file_test_runner::SubTestResult; use file_test_runner::TestResult; use once_cell::sync::Lazy; use serde::Deserialize; @@ -256,19 +255,10 @@ fn run_test(test: &CollectedTest) -> TestResult { if metadata.ignore { TestResult::Ignored } else if let Some(repeat) = metadata.repeat { - TestResult::SubTests( - (0..repeat) - .map(|i| { - let diagnostic_logger = diagnostic_logger.clone(); - SubTestResult { - name: format!("run {}", i + 1), - result: TestResult::from_maybe_panic(AssertUnwindSafe(|| { - run_test_inner(&metadata, &cwd, diagnostic_logger); - })), - } - }) - .collect(), - ) + for _ in 0..repeat { + run_test_inner(&metadata, &cwd, diagnostic_logger.clone()); + } + TestResult::Passed } else { run_test_inner(&metadata, &cwd, diagnostic_logger.clone()); TestResult::Passed diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc index 91408a73020a2e..b0ec62143678e3 100644 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc +++ b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc @@ -1,4 +1,5 @@ { + "tempDir": true, "tests": { "dep_and_workspace_dep": { "steps": [{ diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll deleted file mode 100644 index 56a6051ca2b02b..00000000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin deleted file mode 100644 index 4ac5fc6cf890b46738523c4d4d9d964e312f368f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24 KcmZQzzzzTa7ytnP diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add deleted file mode 120000 index 7b086589dfdbd9..00000000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add +++ /dev/null @@ -1 +0,0 @@ -../add \ No newline at end of file diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep deleted file mode 120000 index 7b086589dfdbd9..00000000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep +++ /dev/null @@ -1 +0,0 @@ -../add \ No newline at end of file From 4700f12ddc5427797333278d2a1d3a8e1195ebfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 27 Nov 2024 01:12:47 +0000 Subject: [PATCH 418/436] fix(task): handle carriage return in task description (#27099) Ref https://github.com/denoland/deno/pull/27069#discussion_r1857702814 --- cli/tools/task.rs | 2 +- tests/specs/task/description/deno.json | 4 ++++ tests/specs/task/description/main.out | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 65b78f9c9b9826..1b83422ba93193 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -721,7 +721,7 @@ fn print_available_tasks( )?; if let Some(description) = &desc.task.description { let slash_slash = colors::italic_gray("//"); - for line in description.split('\n') { + for line in description.lines() { writeln!(writer, " {slash_slash} {}", colors::italic_gray(line))?; } } diff --git a/tests/specs/task/description/deno.json b/tests/specs/task/description/deno.json index c8a79c00eefe43..028ae8621065a2 100644 --- a/tests/specs/task/description/deno.json +++ b/tests/specs/task/description/deno.json @@ -7,6 +7,10 @@ "multiline_description": { "description": "This is a multiline\ndescription", "command": "echo 2" + }, + "multiline_description_carriage_return": { + "description": "This is a multiline\r\ndescription\r\n", + "command": "echo 3" } } } diff --git a/tests/specs/task/description/main.out b/tests/specs/task/description/main.out index 91cce4adf83905..edc7535f2cd97a 100644 --- a/tests/specs/task/description/main.out +++ b/tests/specs/task/description/main.out @@ -6,3 +6,7 @@ Available tasks: // This is a multiline // description echo 2 +- multiline_description_carriage_return + // This is a multiline + // description + echo 3 From 42b71d82db238b0a3e9ccb31cb7ac57f0685e8a6 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Tue, 26 Nov 2024 20:53:20 -0800 Subject: [PATCH 419/436] chore(lint): add .out file reference checker (#27078) Co-authored-by: David Sherret --- .../check/check_exclude_option/__test__.jsonc | 19 +++++ .../deno.exclude_dir.json | 0 .../deno.exclude_glob.json | 0 .../deno.json | 0 .../exclude_option.ts.error.out | 0 .../ignored/index.ts | 0 .../index.ts | 0 .../check_node_builtin_modules/__test__.jsonc | 14 ++++ .../mod.js | 0 .../mod.js.out | 2 +- .../mod.ts | 0 .../mod.ts.out | 4 +- .../__test__.jsonc | 5 -- .../node_builtin_modules/mod.js.out | 5 -- .../__test__.jsonc | 5 -- .../node_builtin_modules/mod.js | 3 - .../node_builtin_modules/mod.ts | 9 --- .../node_builtin_modules/mod.ts.out | 13 ---- .../__test__.jsonc | 5 -- .../__test__.jsonc | 5 -- .../exclude_option/deno.exclude_dir.json | 5 -- .../exclude_option/deno.exclude_glob.json | 5 -- .../exclude_option/deno.json | 3 - .../exclude_option.ts.error.out | 4 - .../exclude_option/ignored/index.ts | 1 - .../exclude_option/index.ts | 5 -- .../__test__.jsonc | 5 -- .../exclude_option/deno.exclude_dir.json | 5 -- .../exclude_option/deno.exclude_glob.json | 5 -- .../exclude_option/deno.json | 3 - .../exclude_option.ts.error.out | 4 - .../exclude_option/ignored/index.ts | 1 - .../exclude_option/index.ts | 5 -- tests/specs/lint/no_slow_types/__test__.jsonc | 39 ++++++---- .../no_slow_types_entrypoint/__test__.jsonc | 5 -- .../specs/lint/no_slow_types_entrypoint/a.ts | 3 - .../specs/lint/no_slow_types_entrypoint/b.ts | 5 -- .../specs/lint/no_slow_types_entrypoint/c.ts | 4 - .../specs/lint/no_slow_types_entrypoint/d.ts | 4 - .../lint/no_slow_types_entrypoint/deno.json | 8 -- .../deno.non-package.json | 2 - .../no_slow_types.out | 35 --------- .../no_slow_types_entrypoint.out | 38 --------- .../config_file_lock_path/lock_check_err2.out | 11 --- tests/specs/npm/byonm/__test__.jsonc | 2 +- tests/specs/npm/check_all/__test__.jsonc | 5 -- .../npm/check_all/check_errors/main_local.out | 7 -- .../specs/npm/check_all_local/__test__.jsonc | 14 ++++ .../check_errors => check_all_local}/main.ts | 0 .../main_all.out | 8 +- .../main_local.out | 4 +- tests/specs/npm/check_local/__test__.jsonc | 5 -- .../npm/check_local/check_errors/main.ts | 3 - .../npm/check_local/check_errors/main_all.out | 19 ----- tests/specs/npm/cjs_with_deps/__test__.jsonc | 36 ++++++++- .../cjs_with_deps/{cjs_with_deps => }/main.js | 0 .../{cjs_with_deps => }/main.out | 0 .../{cjs_with_deps => }/main_info.out | 0 .../cjs_with_deps/main_info_json.out | 54 +++++++++---- .../{cjs_with_deps => }/main_node_modules.out | 0 .../specs/npm/directory_import/__test__.jsonc | 14 ++++ .../directory_import/folder_index_js.out | 0 .../directory_import/folder_index_js.ts | 0 .../directory_import/folder_no_index.out | 0 .../directory_import/folder_no_index.ts | 0 .../__test__.jsonc | 5 -- .../__test__.jsonc | 5 -- .../directory_import/folder_index_js.out | 7 -- .../directory_import/folder_index_js.ts | 2 - .../directory_import/folder_no_index.out | 6 -- .../directory_import/folder_no_index.ts | 2 - .../npm/imports_package_json/__test__.jsonc | 18 ++++- .../import_not_defined.js | 0 .../import_not_defined.out | 0 .../{imports_package_json => }/main.js | 0 .../{imports_package_json => }/main.out | 0 .../{imports_package_json => }/package.json | 0 .../sub_path_import_not_defined.js | 0 .../sub_path_import_not_defined.out | 0 .../__test__.jsonc | 5 -- .../import_not_defined.js | 3 - .../import_not_defined.out | 3 - .../imports_package_json/main.js | 7 -- .../imports_package_json/main.out | 7 -- .../imports_package_json/package.json | 6 -- .../sub_path_import_not_defined.js | 3 - .../sub_path_import_not_defined.out | 3 - .../__test__.jsonc | 5 -- .../import_not_defined.js | 3 - .../import_not_defined.out | 3 - .../imports_package_json/main.js | 7 -- .../imports_package_json/main.out | 7 -- .../imports_package_json/package.json | 6 -- .../sub_path_import_not_defined.js | 3 - .../sub_path_import_not_defined.out | 3 - .../npm/info_cli_chalk_display/__test__.jsonc | 5 -- .../info/chalk_json.out | 57 -------------- .../npm/info_cli_chalk_json/__test__.jsonc | 15 +++- .../info => info_cli_chalk_json}/chalk.out | 0 .../{info => }/chalk_json.out | 0 .../npm/info_cli_chalk_json/info/chalk.out | 9 --- .../future_install_all_lifecycles.out | 3 - .../mixed_case_package_name/__test__.jsonc | 15 ++++ .../mixed_case_package_name/global.out | 0 .../mixed_case_package_name/global.ts | 0 .../mixed_case_package_name/local.out | 0 .../mixed_case_package_name/local.ts | 0 .../__test__.jsonc | 5 -- .../__test__.jsonc | 6 -- .../mixed_case_package_name/global.out | 9 --- .../mixed_case_package_name/global.ts | 2 - .../mixed_case_package_name/local.out | 13 ---- .../mixed_case_package_name/local.ts | 18 ----- .../node_modules_dir_with_deps/__test__.jsonc | 39 +++++++++- .../{cjs_with_deps => }/main.js | 0 .../{cjs_with_deps => }/main.out | 0 .../{cjs_with_deps => }/main_info.out | 2 +- .../main_info_json.out | 52 +++++++++---- .../{cjs_with_deps => }/main_node_modules.out | 0 .../npm/types_ambient_module/__test__.jsonc | 15 +++- .../__test__.jsonc | 5 -- .../types_ambient_module/import_map.json | 5 -- .../types_ambient_module/main.out | 21 ----- .../types_ambient_module/main.ts | 7 -- .../types_ambient_module/main_import_map.out | 9 --- .../types_ambient_module/main_import_map.ts | 4 - .../decorators/experimental/__test__.jsonc | 16 ++++ .../decorators/experimental/deno.json | 0 .../decorators/experimental/no_check/main.out | 0 .../decorators/experimental/no_check/main.ts | 0 .../decorators/experimental/runtime/main.out | 0 .../decorators/experimental/runtime/main.ts | 0 .../decorators/experimental/ts/main.out | 0 .../decorators/experimental/ts/main.ts | 0 .../decorators/tc39_proposal/__test__.jsonc | 4 + .../decorators/tc39_proposal/main.out | 0 .../decorators/tc39_proposal/main.ts | 0 .../decorators_tc39_proposal/__test__.jsonc | 4 - .../import_maps/test_data.ts | 1 - .../import_maps/test_data.ts.out | 1 - .../run/jsx_import_source/__test__.jsonc | 77 +++++++++++++++++++ .../jsx/deno-jsx-error.jsonc | 0 .../jsx/deno-jsx-import-map.jsonc | 0 .../jsx/deno-jsx-precompile-skip.jsonc | 0 .../jsx/deno-jsx-precompile.jsonc | 0 .../jsx/deno-jsx.json | 0 .../jsx/deno-jsx.jsonc | 0 .../jsx/deno-jsxdev-import-map.jsonc | 0 .../jsx/deno-jsxdev.jsonc | 0 .../jsx/deno.lock | 0 .../jsx/import-map-scoped.json | 0 .../jsx/import-map.json | 0 .../jsx/jsx-dev-runtime/index.ts | 0 .../jsx/jsx-precompile/index.ts | 0 .../jsx/jsx-runtime/index.ts | 0 .../jsx_import_source.out | 0 .../jsx_import_source_dev.out | 0 .../jsx_import_source_error.out | 0 .../jsx_import_source_import_map.out | 0 .../jsx_import_source_import_map_dev.out | 0 .../jsx_import_source_no_pragma.tsx | 0 .../jsx_import_source_pragma.tsx | 0 .../jsx_import_source_pragma_import_map.tsx | 0 .../jsx_precompile/no_pragma.out | 0 .../jsx_precompile/no_pragma.tsx | 0 .../jsx_precompile/skip.out | 0 .../jsx_precompile/skip.tsx | 0 .../jsx_import_source_error/__test__.jsonc | 5 -- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_no_pragma.tsx | 7 -- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_no_pragma.tsx | 7 -- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_import_map.out | 2 - .../jsx_import_source_no_pragma.tsx | 7 -- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx_import_source_no_pragma/jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_no_pragma.tsx | 7 -- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_no_pragma.tsx | 7 -- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source.out | 2 - .../jsx_import_source_no_pragma.tsx | 7 -- .../jsx_import_source_pragma/__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx_import_source_pragma/jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source.out | 2 - .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_import_map.out | 2 - .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_import_map_dev.out | 2 - .../jsx_import_source_pragma_import_map.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_import_map.out | 2 - .../jsx_import_source_pragma_import_map.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source.out | 2 - .../jsx_import_source_pragma.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source.out | 2 - .../jsx_import_source_pragma.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source.out | 2 - .../jsx_import_source_pragma.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx/#jsx-runtime_62ac8.js | 11 --- .../jsx/vendor/manifest.json | 9 --- .../jsx_import_source.out | 2 - .../jsx_import_source_pragma.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_import_source_dev.out | 2 - .../jsx_import_source_pragma.tsx | 9 --- .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_precompile/skip.out | 3 - .../__test__.jsonc | 4 - .../jsx/deno-jsx-error.jsonc | 6 -- .../jsx/deno-jsx-import-map.jsonc | 6 -- .../jsx/deno-jsx-precompile-skip.jsonc | 7 -- .../jsx/deno-jsx-precompile.jsonc | 6 -- .../jsx/deno-jsx.json | 6 -- .../jsx/deno-jsx.jsonc | 6 -- .../jsx/deno-jsxdev-import-map.jsonc | 6 -- .../jsx/deno-jsxdev.jsonc | 6 -- .../jsx/deno.lock | 6 -- .../jsx/import-map-scoped.json | 8 -- .../jsx/import-map.json | 7 -- .../jsx/jsx-dev-runtime/index.ts | 12 --- .../jsx/jsx-precompile/index.ts | 23 ------ .../jsx/jsx-runtime/index.ts | 12 --- .../jsx_precompile/no_pragma.out | 3 - .../jsx_precompile/no_pragma.tsx | 3 - .../jsx_precompile/skip.tsx | 9 --- .../run/no_check_decorators/__test__.jsonc | 4 - .../decorators/experimental/deno.json | 5 -- .../decorators/experimental/no_check/main.out | 3 - .../decorators/experimental/no_check/main.ts | 21 ----- .../decorators/experimental/runtime/main.out | 7 -- .../decorators/experimental/runtime/main.ts | 42 ---------- .../decorators/experimental/ts/main.out | 3 - .../decorators/experimental/ts/main.ts | 14 ---- .../decorators/tc39_proposal/main.out | 3 - .../decorators/tc39_proposal/main.ts | 21 ----- .../package_json/invalid_value/__test__.jsonc | 5 ++ .../run/runtime_decorators/__test__.jsonc | 4 - .../decorators/experimental/deno.json | 5 -- .../decorators/experimental/no_check/main.out | 3 - .../decorators/experimental/no_check/main.ts | 21 ----- .../decorators/experimental/runtime/main.out | 7 -- .../decorators/experimental/runtime/main.ts | 42 ---------- .../decorators/experimental/ts/main.out | 3 - .../decorators/experimental/ts/main.ts | 14 ---- .../decorators/tc39_proposal/main.out | 3 - .../decorators/tc39_proposal/main.ts | 21 ----- .../specs/run/top_level_await/__test__.jsonc | 42 +++++++++- .../{top_level_await => }/circular.js | 0 .../{top_level_await => }/circular.out | 0 tests/specs/run/top_level_await/hello.txt | 2 +- .../top_level_await/loop.js | 4 +- .../{top_level_await => }/loop.out | 0 .../{top_level_await => }/nested.out | 0 .../{top_level_await => }/nested/a.js | 0 .../{top_level_await => }/nested/b.js | 0 .../{top_level_await => }/nested/main.js | 0 .../{top_level_await => }/order.js | 0 .../{top_level_await => }/order.out | 0 .../{top_level_await => }/tla/a.js | 0 .../{top_level_await => }/tla/b.js | 0 .../{top_level_await => }/tla/c.js | 0 .../{top_level_await => }/tla/d.js | 0 .../{top_level_await => }/tla/order.js | 0 .../{top_level_await => }/tla/parent.js | 0 .../{top_level_await => }/tla2/a.js | 0 .../{top_level_await => }/tla2/b.js | 0 .../{top_level_await => }/tla3/b.js | 0 .../tla3/timeout_loop.js | 0 .../{top_level_await => }/top_level_await.js | 0 .../{top_level_await => }/top_level_await.out | 3 +- .../top_level_await/top_level_await.ts | 0 .../top_level_await/top_level_await/loop.js | 20 ----- .../top_level_await/top_level_await.ts | 3 - .../top_level_for_await.js | 0 .../top_level_for_await.out | 0 .../top_level_for_await.ts | 0 .../{top_level_await => }/unresolved.js | 0 .../{top_level_await => }/unresolved.out | 0 .../top_level_await_circular/__test__.jsonc | 5 -- .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../run/top_level_await_loop/__test__.jsonc | 4 - .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../run/top_level_await_nested/__test__.jsonc | 4 - .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../run/top_level_await_order/__test__.jsonc | 4 - .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../run/top_level_await_ts/__test__.jsonc | 4 - tests/specs/run/top_level_await_ts/hello.txt | 1 - .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../top_level_await_unresolved/__test__.jsonc | 5 -- .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../run/top_level_for_await/__test__.jsonc | 4 - .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - .../run/top_level_for_await_ts/__test__.jsonc | 4 - .../top_level_await/circular.js | 8 -- .../top_level_await/circular.out | 10 --- .../top_level_await/loop.js | 20 ----- .../top_level_await/loop.out | 5 -- .../top_level_await/nested.out | 5 -- .../top_level_await/nested/a.js | 3 - .../top_level_await/nested/b.js | 1 - .../top_level_await/nested/main.js | 3 - .../top_level_await/order.js | 21 ----- .../top_level_await/order.out | 2 - .../top_level_await/tla/a.js | 3 - .../top_level_await/tla/b.js | 7 -- .../top_level_await/tla/c.js | 3 - .../top_level_await/tla/d.js | 8 -- .../top_level_await/tla/order.js | 1 - .../top_level_await/tla/parent.js | 9 --- .../top_level_await/tla2/a.js | 5 -- .../top_level_await/tla2/b.js | 5 -- .../top_level_await/tla3/b.js | 7 -- .../top_level_await/tla3/timeout_loop.js | 23 ------ .../top_level_await/top_level_await.js | 3 - .../top_level_await/top_level_await.out | 3 - .../top_level_await/top_level_await.ts | 3 - .../top_level_await/top_level_for_await.js | 10 --- .../top_level_await/top_level_for_await.out | 3 - .../top_level_await/top_level_for_await.ts | 10 --- .../top_level_await/unresolved.js | 1 - .../top_level_await/unresolved.out | 4 - tests/specs/run/ts_decorators/__test__.jsonc | 4 - .../decorators/experimental/deno.json | 5 -- .../decorators/experimental/no_check/main.out | 3 - .../decorators/experimental/no_check/main.ts | 21 ----- .../decorators/experimental/runtime/main.out | 7 -- .../decorators/experimental/runtime/main.ts | 42 ---------- .../decorators/experimental/ts/main.out | 3 - .../decorators/experimental/ts/main.ts | 14 ---- .../decorators/tc39_proposal/main.out | 3 - .../decorators/tc39_proposal/main.ts | 21 ----- tests/specs/run/unsafe_proto/__test__.jsonc | 4 +- .../unsafe_proto/{unsafe_proto => }/main.js | 0 .../unsafe_proto/{unsafe_proto => }/main.out | 0 .../unsafe_proto/{unsafe_proto => }/worker.js | 0 .../run/unsafe_proto_flag/__test__.jsonc | 4 +- .../{unsafe_proto => }/main.js | 0 .../main_with_unsafe_proto_flag.out | 0 .../unsafe_proto_flag/unsafe_proto/main.out | 2 - .../main_with_unsafe_proto_flag.out | 2 - .../{unsafe_proto => }/worker.js | 0 .../task/bin_pkg_with_scope_auto/bin_none.out | 12 --- tests/specs/task/filter/deno_multi.out | 0 tests/testdata/cache/037_fetch_multiple.out | 5 -- .../file_extensions/ts_with_extension.out | 1 - ...cted_fmt_check_verbose_formatted_files.out | 1 - .../testdata/fmt/fmt_with_config_default.out | 2 - tools/lint.js | 58 +++++++++++++- tools/util.js | 14 +++- 765 files changed, 517 insertions(+), 4766 deletions(-) create mode 100644 tests/specs/check/check_exclude_option/__test__.jsonc rename tests/specs/check/{check_with_exclude_option_by_dir/exclude_option => check_exclude_option}/deno.exclude_dir.json (100%) rename tests/specs/check/{check_with_exclude_option_by_dir/exclude_option => check_exclude_option}/deno.exclude_glob.json (100%) rename tests/specs/check/{check_with_exclude_option_by_dir/exclude_option => check_exclude_option}/deno.json (100%) rename tests/specs/check/{check_with_exclude_option_by_dir/exclude_option => check_exclude_option}/exclude_option.ts.error.out (100%) rename tests/specs/check/{check_with_exclude_option_by_dir/exclude_option => check_exclude_option}/ignored/index.ts (100%) rename tests/specs/check/{check_with_exclude_option_by_dir/exclude_option => check_exclude_option}/index.ts (100%) create mode 100644 tests/specs/check/check_node_builtin_modules/__test__.jsonc rename tests/specs/check/{check_node_builtin_modules_js/node_builtin_modules => check_node_builtin_modules}/mod.js (100%) rename tests/specs/check/{check_node_builtin_modules_ts/node_builtin_modules => check_node_builtin_modules}/mod.js.out (75%) rename tests/specs/check/{check_node_builtin_modules_js/node_builtin_modules => check_node_builtin_modules}/mod.ts (100%) rename tests/specs/check/{check_node_builtin_modules_js/node_builtin_modules => check_node_builtin_modules}/mod.ts.out (76%) delete mode 100644 tests/specs/check/check_node_builtin_modules_js/__test__.jsonc delete mode 100644 tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out delete mode 100644 tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc delete mode 100644 tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js delete mode 100644 tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts delete mode 100644 tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out delete mode 100644 tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts delete mode 100644 tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts delete mode 100644 tests/specs/check/check_without_exclude_option/__test__.jsonc delete mode 100644 tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json delete mode 100644 tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json delete mode 100644 tests/specs/check/check_without_exclude_option/exclude_option/deno.json delete mode 100644 tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out delete mode 100644 tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts delete mode 100644 tests/specs/check/check_without_exclude_option/exclude_option/index.ts delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/a.ts delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/b.ts delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/c.ts delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/d.ts delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/deno.json delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/deno.non-package.json delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out delete mode 100644 tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out delete mode 100644 tests/specs/lockfile/config_file_lock_path/lock_check_err2.out delete mode 100644 tests/specs/npm/check_all/__test__.jsonc delete mode 100644 tests/specs/npm/check_all/check_errors/main_local.out create mode 100644 tests/specs/npm/check_all_local/__test__.jsonc rename tests/specs/npm/{check_all/check_errors => check_all_local}/main.ts (100%) rename tests/specs/npm/{check_all/check_errors => check_all_local}/main_all.out (74%) rename tests/specs/npm/{check_local/check_errors => check_all_local}/main_local.out (76%) delete mode 100644 tests/specs/npm/check_local/__test__.jsonc delete mode 100644 tests/specs/npm/check_local/check_errors/main.ts delete mode 100644 tests/specs/npm/check_local/check_errors/main_all.out rename tests/specs/npm/cjs_with_deps/{cjs_with_deps => }/main.js (100%) rename tests/specs/npm/cjs_with_deps/{cjs_with_deps => }/main.out (100%) rename tests/specs/npm/cjs_with_deps/{cjs_with_deps => }/main_info.out (100%) rename tests/specs/npm/{node_modules_dir_with_deps => }/cjs_with_deps/main_info_json.out (71%) rename tests/specs/npm/cjs_with_deps/{cjs_with_deps => }/main_node_modules.out (100%) create mode 100644 tests/specs/npm/directory_import/__test__.jsonc rename tests/specs/npm/{directory_import_folder_index_js => }/directory_import/folder_index_js.out (100%) rename tests/specs/npm/{directory_import_folder_index_js => }/directory_import/folder_index_js.ts (100%) rename tests/specs/npm/{directory_import_folder_index_js => }/directory_import/folder_no_index.out (100%) rename tests/specs/npm/{directory_import_folder_index_js => }/directory_import/folder_no_index.ts (100%) delete mode 100644 tests/specs/npm/directory_import_folder_index_js/__test__.jsonc delete mode 100644 tests/specs/npm/directory_import_folder_no_index/__test__.jsonc delete mode 100644 tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out delete mode 100644 tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts delete mode 100644 tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out delete mode 100644 tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts rename tests/specs/npm/imports_package_json/{imports_package_json => }/import_not_defined.js (100%) rename tests/specs/npm/imports_package_json/{imports_package_json => }/import_not_defined.out (100%) rename tests/specs/npm/imports_package_json/{imports_package_json => }/main.js (100%) rename tests/specs/npm/imports_package_json/{imports_package_json => }/main.out (100%) rename tests/specs/npm/imports_package_json/{imports_package_json => }/package.json (100%) rename tests/specs/npm/imports_package_json/{imports_package_json => }/sub_path_import_not_defined.js (100%) rename tests/specs/npm/imports_package_json/{imports_package_json => }/sub_path_import_not_defined.out (100%) delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js delete mode 100644 tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js delete mode 100644 tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out delete mode 100644 tests/specs/npm/info_cli_chalk_display/__test__.jsonc delete mode 100644 tests/specs/npm/info_cli_chalk_display/info/chalk_json.out rename tests/specs/npm/{info_cli_chalk_display/info => info_cli_chalk_json}/chalk.out (100%) rename tests/specs/npm/info_cli_chalk_json/{info => }/chalk_json.out (100%) delete mode 100644 tests/specs/npm/info_cli_chalk_json/info/chalk.out delete mode 100644 tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out create mode 100644 tests/specs/npm/mixed_case_package_name/__test__.jsonc rename tests/specs/npm/{mixed_case_package_name_global_dir => }/mixed_case_package_name/global.out (100%) rename tests/specs/npm/{mixed_case_package_name_global_dir => }/mixed_case_package_name/global.ts (100%) rename tests/specs/npm/{mixed_case_package_name_global_dir => }/mixed_case_package_name/local.out (100%) rename tests/specs/npm/{mixed_case_package_name_global_dir => }/mixed_case_package_name/local.ts (100%) delete mode 100644 tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc delete mode 100644 tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc delete mode 100644 tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out delete mode 100644 tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts delete mode 100644 tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out delete mode 100644 tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts rename tests/specs/npm/node_modules_dir_with_deps/{cjs_with_deps => }/main.js (100%) rename tests/specs/npm/node_modules_dir_with_deps/{cjs_with_deps => }/main.out (100%) rename tests/specs/npm/node_modules_dir_with_deps/{cjs_with_deps => }/main_info.out (92%) rename tests/specs/npm/{cjs_with_deps/cjs_with_deps => node_modules_dir_with_deps}/main_info_json.out (73%) rename tests/specs/npm/node_modules_dir_with_deps/{cjs_with_deps => }/main_node_modules.out (100%) delete mode 100644 tests/specs/npm/types_ambient_module_import_map/__test__.jsonc delete mode 100644 tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json delete mode 100644 tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out delete mode 100644 tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts delete mode 100644 tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out delete mode 100644 tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts create mode 100644 tests/specs/run/decorators/experimental/__test__.jsonc rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/deno.json (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/no_check/main.out (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/no_check/main.ts (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/runtime/main.out (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/runtime/main.ts (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/ts/main.out (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/experimental/ts/main.ts (100%) create mode 100644 tests/specs/run/decorators/tc39_proposal/__test__.jsonc rename tests/specs/run/{decorators_tc39_proposal => }/decorators/tc39_proposal/main.out (100%) rename tests/specs/run/{decorators_tc39_proposal => }/decorators/tc39_proposal/main.ts (100%) delete mode 100644 tests/specs/run/decorators_tc39_proposal/__test__.jsonc delete mode 100644 tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts delete mode 100644 tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out create mode 100644 tests/specs/run/jsx_import_source/__test__.jsonc rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsx-error.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsx-import-map.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsx-precompile-skip.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsx-precompile.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsx.json (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsx.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsxdev-import-map.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno-jsxdev.jsonc (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/deno.lock (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/import-map-scoped.json (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/import-map.json (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/jsx-dev-runtime/index.ts (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/jsx-precompile/index.ts (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx/jsx-runtime/index.ts (100%) rename tests/specs/run/{jsx_import_source_no_pragma => jsx_import_source}/jsx_import_source.out (100%) rename tests/specs/run/{jsx_import_source_no_pragma_dev => jsx_import_source}/jsx_import_source_dev.out (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx_import_source_error.out (100%) rename tests/specs/run/{jsx_import_source_import_map => jsx_import_source}/jsx_import_source_import_map.out (100%) rename tests/specs/run/{jsx_import_source_import_map_dev => jsx_import_source}/jsx_import_source_import_map_dev.out (100%) rename tests/specs/run/{jsx_import_source_error => jsx_import_source}/jsx_import_source_no_pragma.tsx (100%) rename tests/specs/run/{jsx_import_source_pragma => jsx_import_source}/jsx_import_source_pragma.tsx (100%) rename tests/specs/run/{jsx_import_source_pragma_import_map => jsx_import_source}/jsx_import_source_pragma_import_map.tsx (100%) rename tests/specs/run/{jsx_import_source_precompile_import_map => jsx_import_source}/jsx_precompile/no_pragma.out (100%) rename tests/specs/run/{jsx_import_source_precompile_import_map => jsx_import_source}/jsx_precompile/no_pragma.tsx (100%) rename tests/specs/run/{jsx_import_source_precompile_import_map_skip_element => jsx_import_source}/jsx_precompile/skip.out (100%) rename tests/specs/run/{jsx_import_source_precompile_import_map => jsx_import_source}/jsx_precompile/skip.tsx (100%) delete mode 100644 tests/specs/run/jsx_import_source_error/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out delete mode 100644 tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out delete mode 100644 tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma/jsx_import_source.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out delete mode 100644 tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx delete mode 100644 tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx delete mode 100644 tests/specs/run/no_check_decorators/__test__.jsonc delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/deno.json delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out delete mode 100644 tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts delete mode 100644 tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out delete mode 100644 tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts delete mode 100644 tests/specs/run/runtime_decorators/__test__.jsonc delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/deno.json delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out delete mode 100644 tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts delete mode 100644 tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out delete mode 100644 tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts rename tests/specs/run/top_level_await/{top_level_await => }/circular.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/circular.out (100%) rename tests/specs/run/{top_level_await_circular => }/top_level_await/loop.js (74%) rename tests/specs/run/top_level_await/{top_level_await => }/loop.out (100%) rename tests/specs/run/top_level_await/{top_level_await => }/nested.out (100%) rename tests/specs/run/top_level_await/{top_level_await => }/nested/a.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/nested/b.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/nested/main.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/order.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/order.out (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla/a.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla/b.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla/c.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla/d.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla/order.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla/parent.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla2/a.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla2/b.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla3/b.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/tla3/timeout_loop.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/top_level_await.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/top_level_await.out (58%) rename tests/specs/run/{top_level_await_ts => }/top_level_await/top_level_await.ts (100%) delete mode 100644 tests/specs/run/top_level_await/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_await/top_level_await/top_level_await.ts rename tests/specs/run/top_level_await/{top_level_await => }/top_level_for_await.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/top_level_for_await.out (100%) rename tests/specs/run/top_level_await/{top_level_await => }/top_level_for_await.ts (100%) rename tests/specs/run/top_level_await/{top_level_await => }/unresolved.js (100%) rename tests/specs/run/top_level_await/{top_level_await => }/unresolved.out (100%) delete mode 100644 tests/specs/run/top_level_await_circular/__test__.jsonc delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_await_circular/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_await_loop/__test__.jsonc delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_await_loop/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_await_nested/__test__.jsonc delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_await_nested/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_await_order/__test__.jsonc delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_await_order/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_await_ts/__test__.jsonc delete mode 100644 tests/specs/run/top_level_await_ts/hello.txt delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_await_ts/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_await_unresolved/__test__.jsonc delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_for_await/__test__.jsonc delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_for_await/top_level_await/unresolved.out delete mode 100644 tests/specs/run/top_level_for_await_ts/__test__.jsonc delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/circular.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/circular.out delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/loop.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/loop.out delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/nested.out delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/order.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/order.out delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js delete mode 100644 tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out delete mode 100644 tests/specs/run/ts_decorators/__test__.jsonc delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/deno.json delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/ts/main.out delete mode 100644 tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts delete mode 100644 tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out delete mode 100644 tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts rename tests/specs/run/unsafe_proto/{unsafe_proto => }/main.js (100%) rename tests/specs/run/unsafe_proto/{unsafe_proto => }/main.out (100%) rename tests/specs/run/unsafe_proto/{unsafe_proto => }/worker.js (100%) rename tests/specs/run/unsafe_proto_flag/{unsafe_proto => }/main.js (100%) rename tests/specs/run/{unsafe_proto/unsafe_proto => unsafe_proto_flag}/main_with_unsafe_proto_flag.out (100%) delete mode 100644 tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out delete mode 100644 tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out rename tests/specs/run/unsafe_proto_flag/{unsafe_proto => }/worker.js (100%) delete mode 100644 tests/specs/task/bin_pkg_with_scope_auto/bin_none.out delete mode 100644 tests/specs/task/filter/deno_multi.out delete mode 100644 tests/testdata/cache/037_fetch_multiple.out delete mode 100644 tests/testdata/file_extensions/ts_with_extension.out delete mode 100644 tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out delete mode 100644 tests/testdata/fmt/fmt_with_config_default.out diff --git a/tests/specs/check/check_exclude_option/__test__.jsonc b/tests/specs/check/check_exclude_option/__test__.jsonc new file mode 100644 index 00000000000000..d8e41403c21663 --- /dev/null +++ b/tests/specs/check/check_exclude_option/__test__.jsonc @@ -0,0 +1,19 @@ +{ + "tests": { + "by_dir": { + "args": "check --quiet --config deno.exclude_dir.json ignored/index.ts", + "output": "", + "exitCode": 0 + }, + "by_glob": { + "args": "check --quiet --config deno.exclude_glob.json ignored/index.ts", + "output": "", + "exitCode": 0 + }, + "without": { + "args": "check --quiet --config deno.json ignored/index.ts", + "output": "exclude_option.ts.error.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_dir.json b/tests/specs/check/check_exclude_option/deno.exclude_dir.json similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_dir.json rename to tests/specs/check/check_exclude_option/deno.exclude_dir.json diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_glob.json b/tests/specs/check/check_exclude_option/deno.exclude_glob.json similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_glob.json rename to tests/specs/check/check_exclude_option/deno.exclude_glob.json diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.json b/tests/specs/check/check_exclude_option/deno.json similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.json rename to tests/specs/check/check_exclude_option/deno.json diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/exclude_option.ts.error.out b/tests/specs/check/check_exclude_option/exclude_option.ts.error.out similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/exclude_option.ts.error.out rename to tests/specs/check/check_exclude_option/exclude_option.ts.error.out diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/ignored/index.ts b/tests/specs/check/check_exclude_option/ignored/index.ts similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/ignored/index.ts rename to tests/specs/check/check_exclude_option/ignored/index.ts diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/index.ts b/tests/specs/check/check_exclude_option/index.ts similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/index.ts rename to tests/specs/check/check_exclude_option/index.ts diff --git a/tests/specs/check/check_node_builtin_modules/__test__.jsonc b/tests/specs/check/check_node_builtin_modules/__test__.jsonc new file mode 100644 index 00000000000000..eb56845a19701d --- /dev/null +++ b/tests/specs/check/check_node_builtin_modules/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "js": { + "args": "check --quiet mod.js", + "output": "mod.js.out", + "exitCode": 1 + }, + "ts": { + "args": "check --quiet mod.ts", + "output": "mod.ts.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js b/tests/specs/check/check_node_builtin_modules/mod.js similarity index 100% rename from tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js rename to tests/specs/check/check_node_builtin_modules/mod.js diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js.out b/tests/specs/check/check_node_builtin_modules/mod.js.out similarity index 75% rename from tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js.out rename to tests/specs/check/check_node_builtin_modules/mod.js.out index 97786ebaeb2980..646a2e5cc437c7 100644 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js.out +++ b/tests/specs/check/check_node_builtin_modules/mod.js.out @@ -2,4 +2,4 @@ error: TS2769 [ERROR]: No overload matches this call. [WILDCARD] const _data = fs.readFileSync("./node_builtin.js", 123); ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.js:3:52 + at file:///[WILDCARD]/mod.js:3:52 diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts b/tests/specs/check/check_node_builtin_modules/mod.ts similarity index 100% rename from tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts rename to tests/specs/check/check_node_builtin_modules/mod.ts diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts.out b/tests/specs/check/check_node_builtin_modules/mod.ts.out similarity index 76% rename from tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts.out rename to tests/specs/check/check_node_builtin_modules/mod.ts.out index 49b762cff88a4d..38eef5edc73290 100644 --- a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts.out +++ b/tests/specs/check/check_node_builtin_modules/mod.ts.out @@ -2,12 +2,12 @@ error: TS2769 [ERROR]: No overload matches this call. [WILDCARD] const _data = fs.readFileSync("./node_builtin.js", 123); ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:2:52 + at file:///[WILDCARD]/mod.ts:2:52 TS2322 [ERROR]: Type 'string[]' is not assignable to type 'number[]'. Type 'string' is not assignable to type 'number'. const _testString: number[] = builtinModules; ~~~~~~~~~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:9:7 + at file:///[WILDCARD]/mod.ts:9:7 Found 2 errors. diff --git a/tests/specs/check/check_node_builtin_modules_js/__test__.jsonc b/tests/specs/check/check_node_builtin_modules_js/__test__.jsonc deleted file mode 100644 index 8f7a2a65a601d0..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_js/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet node_builtin_modules/mod.js", - "output": "node_builtin_modules/mod.js.out", - "exitCode": 1 -} diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out b/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out deleted file mode 100644 index 97786ebaeb2980..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out +++ /dev/null @@ -1,5 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.js:3:52 diff --git a/tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc b/tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc deleted file mode 100644 index 736885f2ec7d12..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet node_builtin_modules/mod.ts", - "output": "node_builtin_modules/mod.ts.out", - "exitCode": 1 -} diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js deleted file mode 100644 index 196fb9be98c008..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-check -import fs from "node:fs"; -const _data = fs.readFileSync("./node_builtin.js", 123); diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts deleted file mode 100644 index 0e62353fec5237..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import fs from "node:fs"; -const _data = fs.readFileSync("./node_builtin.js", 123); - -// check node:module specifically because for deno check it should -// resolve to the @types/node package, but at runtime it uses a different -// builtin object than deno_std -import { builtinModules } from "node:module"; -// should error about being string[] -const _testString: number[] = builtinModules; diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out deleted file mode 100644 index 49b762cff88a4d..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out +++ /dev/null @@ -1,13 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:2:52 - -TS2322 [ERROR]: Type 'string[]' is not assignable to type 'number[]'. - Type 'string' is not assignable to type 'number'. -const _testString: number[] = builtinModules; - ~~~~~~~~~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:9:7 - -Found 2 errors. diff --git a/tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc b/tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc deleted file mode 100644 index c7fe285da8730d..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --config exclude_option/deno.exclude_dir.json exclude_option/ignored/index.ts", - "output": "", - "exitCode": 0 -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc b/tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc deleted file mode 100644 index 54700ca3d82bf9..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --config exclude_option/deno.exclude_glob.json exclude_option/ignored/index.ts", - "output": "", - "exitCode": 0 -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json deleted file mode 100644 index 2019f8953d3d50..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored" - ] -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json deleted file mode 100644 index 1d203ba089348e..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored/**/*" - ] -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json deleted file mode 100644 index a9eca74ca448a2..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "exclude": [] -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out deleted file mode 100644 index abd1c125861e33..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2304 [ERROR]: Cannot find name 'nothing'. -export { nothing }; - ~~~~~~~ - at [WILDCARD] diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts deleted file mode 100644 index 0419cf073c4b29..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { nothing }; diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts deleted file mode 100644 index 8335ca3a2e25a6..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { nothing } from "./ignored/index.ts"; - -const foo = 1; - -export { foo, nothing }; diff --git a/tests/specs/check/check_without_exclude_option/__test__.jsonc b/tests/specs/check/check_without_exclude_option/__test__.jsonc deleted file mode 100644 index 801786fa3d24f6..00000000000000 --- a/tests/specs/check/check_without_exclude_option/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --config exclude_option/deno.json exclude_option/ignored/index.ts", - "output": "exclude_option/exclude_option.ts.error.out", - "exitCode": 1 -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json b/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json deleted file mode 100644 index 2019f8953d3d50..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored" - ] -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json b/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json deleted file mode 100644 index 1d203ba089348e..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored/**/*" - ] -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/deno.json b/tests/specs/check/check_without_exclude_option/exclude_option/deno.json deleted file mode 100644 index a9eca74ca448a2..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/deno.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "exclude": [] -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out b/tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out deleted file mode 100644 index abd1c125861e33..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2304 [ERROR]: Cannot find name 'nothing'. -export { nothing }; - ~~~~~~~ - at [WILDCARD] diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts b/tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts deleted file mode 100644 index 0419cf073c4b29..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { nothing }; diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/index.ts b/tests/specs/check/check_without_exclude_option/exclude_option/index.ts deleted file mode 100644 index 8335ca3a2e25a6..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { nothing } from "./ignored/index.ts"; - -const foo = 1; - -export { foo, nothing }; diff --git a/tests/specs/lint/no_slow_types/__test__.jsonc b/tests/specs/lint/no_slow_types/__test__.jsonc index 2a5a340328373c..9d0358c8365c84 100644 --- a/tests/specs/lint/no_slow_types/__test__.jsonc +++ b/tests/specs/lint/no_slow_types/__test__.jsonc @@ -1,17 +1,26 @@ { - "steps": [{ - "args": "lint", - "output": "no_slow_types.out", - "exitCode": 1 - }, { - "args": "lint --rules-exclude=no-slow-types", - "output": "Checked 4 files\n" - }, { - "args": "lint --config=deno.non-package.json", - "output": "Checked 4 files\n" - }, { - // non-entrypoint - "args": "lint d.ts", - "output": "Checked 1 file\n" - }] + "tests": { + "no_entrypoint": { + "steps": [{ + "args": "lint", + "output": "no_slow_types.out", + "exitCode": 1 + }, { + "args": "lint --rules-exclude=no-slow-types", + "output": "Checked 4 files\n" + }, { + "args": "lint --config=deno.non-package.json", + "output": "Checked 4 files\n" + }, { + // non-entrypoint + "args": "lint d.ts", + "output": "Checked 1 file\n" + }] + }, + "entrypoint": { + "args": "lint a.ts", + "output": "no_slow_types_entrypoint.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc b/tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc deleted file mode 100644 index 2ba74c03fd6eb2..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "lint a.ts", - "output": "no_slow_types_entrypoint.out", - "exitCode": 1 -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/a.ts b/tests/specs/lint/no_slow_types_entrypoint/a.ts deleted file mode 100644 index 3b399665dc81da..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a: number, b: number) { - return a + b; -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/b.ts b/tests/specs/lint/no_slow_types_entrypoint/b.ts deleted file mode 100644 index b96a794894c109..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/b.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function addB(a: number, b: number) { - return a + b; -} - -export * from "./d.ts"; diff --git a/tests/specs/lint/no_slow_types_entrypoint/c.ts b/tests/specs/lint/no_slow_types_entrypoint/c.ts deleted file mode 100644 index 517aa3d2118283..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/c.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one won't error because it's not an export -export function addC(a: number, b: number) { - return a + b; -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/d.ts b/tests/specs/lint/no_slow_types_entrypoint/d.ts deleted file mode 100644 index babe9d81b538a4..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one is re-exported via b.ts -export function addD(a: number, b: number) { - return a + b; -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/deno.json b/tests/specs/lint/no_slow_types_entrypoint/deno.json deleted file mode 100644 index 2fd0af5f0f03ac..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/deno.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@pkg/pkg", - "version": "1.0.0", - "exports": { - "./a": "./a.ts", - "./b": "./b.ts" - } -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/deno.non-package.json b/tests/specs/lint/no_slow_types_entrypoint/deno.non-package.json deleted file mode 100644 index 2c63c0851048d8..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/deno.non-package.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out b/tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out deleted file mode 100644 index 5828906e76952b..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out +++ /dev/null @@ -1,35 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]a.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 3 problems -Checked 4 files diff --git a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out b/tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out deleted file mode 100644 index 895dcb6cd90a69..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out +++ /dev/null @@ -1,38 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]a.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - | - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - | - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - | - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 3 problems -Checked 1 file diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out deleted file mode 100644 index 3043b102a51fdc..00000000000000 --- a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out +++ /dev/null @@ -1,11 +0,0 @@ -[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file. - - Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js - Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18 - Expected: bad - -This could be caused by: - * the lock file may be corrupt - * the source itself may be corrupt - -Investigate the lockfile; delete it to regenerate the lockfile or --reload to reload the source code from the server. diff --git a/tests/specs/npm/byonm/__test__.jsonc b/tests/specs/npm/byonm/__test__.jsonc index 011b4b6c820729..aa9dcb13517e4c 100644 --- a/tests/specs/npm/byonm/__test__.jsonc +++ b/tests/specs/npm/byonm/__test__.jsonc @@ -14,7 +14,7 @@ "output": "[WILDCARD]" }, { "args": "run -A invalid_sub_path.ts", - "output": "invalid_sub_path.out", + "output": "future_invalid_sub_path.out", "exitCode": 1 }] }, diff --git a/tests/specs/npm/check_all/__test__.jsonc b/tests/specs/npm/check_all/__test__.jsonc deleted file mode 100644 index e78f7e67d878ed..00000000000000 --- a/tests/specs/npm/check_all/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --all check_errors/main.ts", - "output": "check_errors/main_all.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/check_all/check_errors/main_local.out b/tests/specs/npm/check_all/check_errors/main_local.out deleted file mode 100644 index ac58a29c769a4b..00000000000000 --- a/tests/specs/npm/check_all/check_errors/main_local.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fcheck-error -Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts -error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. -console.log(test.Asdf); // should error - ~~~~ - at file:///[WILDCARD]/npm/check_errors/main.ts:3:18 diff --git a/tests/specs/npm/check_all_local/__test__.jsonc b/tests/specs/npm/check_all_local/__test__.jsonc new file mode 100644 index 00000000000000..aaa0939b42655b --- /dev/null +++ b/tests/specs/npm/check_all_local/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "all": { + "args": "check --all main.ts", + "output": "main_all.out", + "exitCode": 1 + }, + "local": { + "args": "check main.ts", + "output": "main_local.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/npm/check_all/check_errors/main.ts b/tests/specs/npm/check_all_local/main.ts similarity index 100% rename from tests/specs/npm/check_all/check_errors/main.ts rename to tests/specs/npm/check_all_local/main.ts diff --git a/tests/specs/npm/check_all/check_errors/main_all.out b/tests/specs/npm/check_all_local/main_all.out similarity index 74% rename from tests/specs/npm/check_all/check_errors/main_all.out rename to tests/specs/npm/check_all_local/main_all.out index c7797e43d2f763..a418396ee5bf2c 100644 --- a/tests/specs/npm/check_all/check_errors/main_all.out +++ b/tests/specs/npm/check_all_local/main_all.out @@ -1,19 +1,19 @@ Download http://localhost:4260/@denotest%2fcheck-error Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts +Check file:///[WILDCARD]/main.ts error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression. export class Class1 extends Class2 { ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:2:14 + at file:///[WILDCARD]/1.0.0/index.d.ts:2:14 TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression. export class Class2 extends Class1 { ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:5:14 + at file:///[WILDCARD]/1.0.0/index.d.ts:5:14 TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. console.log(test.Asdf); // should error ~~~~ - at file:///[WILDCARD]/check_errors/main.ts:3:18 + at file:///[WILDCARD]/main.ts:3:18 Found 3 errors. diff --git a/tests/specs/npm/check_local/check_errors/main_local.out b/tests/specs/npm/check_all_local/main_local.out similarity index 76% rename from tests/specs/npm/check_local/check_errors/main_local.out rename to tests/specs/npm/check_all_local/main_local.out index 1eb8eef9fe7430..24b183b7adfc6c 100644 --- a/tests/specs/npm/check_local/check_errors/main_local.out +++ b/tests/specs/npm/check_all_local/main_local.out @@ -1,7 +1,7 @@ Download http://localhost:4260/@denotest%2fcheck-error Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts +Check file:///[WILDCARD]/main.ts error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. console.log(test.Asdf); // should error ~~~~ - at file:///[WILDCARD]/check_errors/main.ts:3:18 + at file:///[WILDCARD]/main.ts:3:18 diff --git a/tests/specs/npm/check_local/__test__.jsonc b/tests/specs/npm/check_local/__test__.jsonc deleted file mode 100644 index 2cf3ae5ef0881e..00000000000000 --- a/tests/specs/npm/check_local/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check check_errors/main.ts", - "output": "check_errors/main_local.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/check_local/check_errors/main.ts b/tests/specs/npm/check_local/check_errors/main.ts deleted file mode 100644 index 4b868419563494..00000000000000 --- a/tests/specs/npm/check_local/check_errors/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as test from "npm:@denotest/check-error"; - -console.log(test.Asdf); // should error diff --git a/tests/specs/npm/check_local/check_errors/main_all.out b/tests/specs/npm/check_local/check_errors/main_all.out deleted file mode 100644 index c7797e43d2f763..00000000000000 --- a/tests/specs/npm/check_local/check_errors/main_all.out +++ /dev/null @@ -1,19 +0,0 @@ -Download http://localhost:4260/@denotest%2fcheck-error -Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts -error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression. -export class Class1 extends Class2 { - ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:2:14 - -TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression. -export class Class2 extends Class1 { - ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:5:14 - -TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. -console.log(test.Asdf); // should error - ~~~~ - at file:///[WILDCARD]/check_errors/main.ts:3:18 - -Found 3 errors. diff --git a/tests/specs/npm/cjs_with_deps/__test__.jsonc b/tests/specs/npm/cjs_with_deps/__test__.jsonc index e79fda5c77b66d..a09f172053755b 100644 --- a/tests/specs/npm/cjs_with_deps/__test__.jsonc +++ b/tests/specs/npm/cjs_with_deps/__test__.jsonc @@ -1,4 +1,36 @@ { - "args": "run --allow-read --allow-env cjs_with_deps/main.js", - "output": "cjs_with_deps/main.out" + "tests": { + "cjs_with_deps": { + "args": "run --allow-read --allow-env main.js", + "output": "main.out" + }, + "cjs_with_deps_node_modules": { + "args": "run --allow-read --allow-env --node-modules-dir=auto main.js", + "output": "main_node_modules.out" + }, + "cjs_with_deps_info": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info main.js", + "output": "main_info.out" + } + ] + }, + "cjs_with_deps_info_json": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info --json main.js", + "output": "main_info_json.out" + } + ] + } + } } diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js b/tests/specs/npm/cjs_with_deps/main.js similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js rename to tests/specs/npm/cjs_with_deps/main.js diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out b/tests/specs/npm/cjs_with_deps/main.out similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out rename to tests/specs/npm/cjs_with_deps/main.out diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm/cjs_with_deps/main_info.out similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out rename to tests/specs/npm/cjs_with_deps/main_info.out diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm/cjs_with_deps/main_info_json.out similarity index 71% rename from tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out rename to tests/specs/npm/cjs_with_deps/main_info_json.out index 137b9f8ce56c3d..393e4a221a0929 100644 --- a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out +++ b/tests/specs/npm/cjs_with_deps/main_info_json.out @@ -45,7 +45,17 @@ "local": "[WILDCARD]main.js", "size": 325, "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" + "specifier": "file:///[WILDCARD]/main.js" + }, + { + "kind": "npm", + "specifier": "npm:/chai@4.3.6", + "npmPackage": "chai@4.3.6" + }, + { + "kind": "npm", + "specifier": "npm:/chalk@4.1.2", + "npmPackage": "chalk@4.1.2" } ], "redirects": { @@ -58,12 +68,14 @@ "version": "4.3.0", "dependencies": [ "color-convert@2.0.1" - ] + ], + "registryUrl": "http://localhost:4260/" }, "assertion-error@1.1.0": { "name": "assertion-error", "version": "1.1.0", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "chai@4.3.6": { "name": "chai", @@ -76,7 +88,8 @@ "loupe@2.3.4", "pathval@1.1.1", "type-detect@4.0.8" - ] + ], + "registryUrl": "http://localhost:4260/" }, "chalk@4.1.2": { "name": "chalk", @@ -84,65 +97,76 @@ "dependencies": [ "ansi-styles@4.3.0", "supports-color@7.2.0" - ] + ], + "registryUrl": "http://localhost:4260/" }, "check-error@1.0.2": { "name": "check-error", "version": "1.0.2", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "color-convert@2.0.1": { "name": "color-convert", "version": "2.0.1", "dependencies": [ "color-name@1.1.4" - ] + ], + "registryUrl": "http://localhost:4260/" }, "color-name@1.1.4": { "name": "color-name", "version": "1.1.4", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "deep-eql@3.0.1": { "name": "deep-eql", "version": "3.0.1", "dependencies": [ "type-detect@4.0.8" - ] + ], + "registryUrl": "http://localhost:4260/" }, "get-func-name@2.0.0": { "name": "get-func-name", "version": "2.0.0", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "has-flag@4.0.0": { "name": "has-flag", "version": "4.0.0", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "loupe@2.3.4": { "name": "loupe", "version": "2.3.4", "dependencies": [ "get-func-name@2.0.0" - ] + ], + "registryUrl": "http://localhost:4260/" }, "pathval@1.1.1": { "name": "pathval", "version": "1.1.1", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "supports-color@7.2.0": { "name": "supports-color", "version": "7.2.0", "dependencies": [ "has-flag@4.0.0" - ] + ], + "registryUrl": "http://localhost:4260/" }, "type-detect@4.0.8": { "name": "type-detect", "version": "4.0.8", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" } } } diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm/cjs_with_deps/main_node_modules.out similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out rename to tests/specs/npm/cjs_with_deps/main_node_modules.out diff --git a/tests/specs/npm/directory_import/__test__.jsonc b/tests/specs/npm/directory_import/__test__.jsonc new file mode 100644 index 00000000000000..b1aea547ba185d --- /dev/null +++ b/tests/specs/npm/directory_import/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "directory_import": { + "args": "run folder_index_js.ts", + "output": "folder_index_js.out", + "exitCode": 1 + }, + "directory_import_folder_no_index": { + "args": "run folder_no_index.ts", + "output": "folder_no_index.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out b/tests/specs/npm/directory_import/folder_index_js.out similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out rename to tests/specs/npm/directory_import/folder_index_js.out diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts b/tests/specs/npm/directory_import/folder_index_js.ts similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts rename to tests/specs/npm/directory_import/folder_index_js.ts diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out b/tests/specs/npm/directory_import/folder_no_index.out similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out rename to tests/specs/npm/directory_import/folder_no_index.out diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts b/tests/specs/npm/directory_import/folder_no_index.ts similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts rename to tests/specs/npm/directory_import/folder_no_index.ts diff --git a/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc b/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc deleted file mode 100644 index b3f7b64cbd9558..00000000000000 --- a/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run directory_import/folder_index_js.ts", - "output": "directory_import/folder_index_js.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc b/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc deleted file mode 100644 index e0bb868ad81c85..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run directory_import/folder_no_index.ts", - "output": "directory_import/folder_no_index.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index c1eb2a4801acfd..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fsub-folders -Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz -error: Directory import [WILDCARD]folder_index_js is not supported resolving import from file:///[WILDCARD]/directory_import/folder_index_js.ts -Did you mean to import index.js within the directory? - -Caused by: - [WILDCARD] diff --git a/tests/specs/npm/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 deleted file mode 100644 index b0d51fcd97d9dc..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts +++ /dev/null @@ -1,2 +0,0 @@ -import test from "npm:@denotest/sub-folders/folder_index_js"; -console.log(test); diff --git a/tests/specs/npm/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 deleted file mode 100644 index c19c4bcaa4b688..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out +++ /dev/null @@ -1,6 +0,0 @@ -Download http://localhost:4260/@denotest%2fsub-folders -Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz -error: Directory import [WILDCARD]folder_no_index is not supported resolving import from file:///[WILDCARD]/folder_no_index.ts - -Caused by: - [WILDCARD] diff --git a/tests/specs/npm/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 deleted file mode 100644 index 4c5fb7ec09e723..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import test from "npm:@denotest/sub-folders/folder_no_index"; -console.log(test); diff --git a/tests/specs/npm/imports_package_json/__test__.jsonc b/tests/specs/npm/imports_package_json/__test__.jsonc index 35eabd4e153032..068c62d8f59397 100644 --- a/tests/specs/npm/imports_package_json/__test__.jsonc +++ b/tests/specs/npm/imports_package_json/__test__.jsonc @@ -1,4 +1,18 @@ { - "args": "run --no-lock --node-modules-dir=none imports_package_json/main.js", - "output": "imports_package_json/main.out" + "tests": { + "imports_package_json": { + "args": "run --no-lock --node-modules-dir=none main.js", + "output": "main.out" + }, + "imports_package_json_import_not_defined": { + "args": "run --no-lock --node-modules-dir=none import_not_defined.js", + "output": "import_not_defined.out", + "exitCode": 1 + }, + "imports_package_json_sub_path_import_not_defined": { + "args": "run --no-lock --node-modules-dir=none sub_path_import_not_defined.js", + "output": "sub_path_import_not_defined.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json/import_not_defined.js similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js rename to tests/specs/npm/imports_package_json/import_not_defined.js diff --git a/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json/import_not_defined.out similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out rename to tests/specs/npm/imports_package_json/import_not_defined.out diff --git a/tests/specs/npm/imports_package_json/imports_package_json/main.js b/tests/specs/npm/imports_package_json/main.js similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/main.js rename to tests/specs/npm/imports_package_json/main.js diff --git a/tests/specs/npm/imports_package_json/imports_package_json/main.out b/tests/specs/npm/imports_package_json/main.out similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/main.out rename to tests/specs/npm/imports_package_json/main.out diff --git a/tests/specs/npm/imports_package_json/imports_package_json/package.json b/tests/specs/npm/imports_package_json/package.json similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/package.json rename to tests/specs/npm/imports_package_json/package.json diff --git a/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json/sub_path_import_not_defined.js similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js rename to tests/specs/npm/imports_package_json/sub_path_import_not_defined.js diff --git a/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json/sub_path_import_not_defined.out similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out rename to tests/specs/npm/imports_package_json/sub_path_import_not_defined.out diff --git a/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc b/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc deleted file mode 100644 index 983ec312639a2d..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --no-lock --node-modules-dir=none imports_package_json/import_not_defined.js", - "output": "imports_package_json/import_not_defined.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index dc4d2df165e5d7..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/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 deleted file mode 100644 index abfa414030877c..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/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 deleted file mode 100644 index 53090dd948b9af..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js +++ /dev/null @@ -1,7 +0,0 @@ -import data from "@denotest/imports-package-json"; - -console.log(data.hi); -console.log(data.bye); -console.log(typeof data.fs.readFile); -console.log(typeof data.path.join); -console.log(typeof data.fs2.writeFile); diff --git a/tests/specs/npm/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 deleted file mode 100644 index 70d787b251293f..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -hi -bye -function -function -function diff --git a/tests/specs/npm/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 deleted file mode 100644 index cb6a08d1a51c02..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "my-test", - "dependencies": { - "@denotest/imports-package-json": "1.0.0" - } -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index f1097aa0646450..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/sub-path-import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/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 deleted file mode 100644 index 95524202ae2f4a..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc deleted file mode 100644 index cd9b260f48f77a..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --no-lock --node-modules-dir=none imports_package_json/sub_path_import_not_defined.js", - "output": "imports_package_json/sub_path_import_not_defined.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index dc4d2df165e5d7..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/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 deleted file mode 100644 index abfa414030877c..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/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 deleted file mode 100644 index 53090dd948b9af..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js +++ /dev/null @@ -1,7 +0,0 @@ -import data from "@denotest/imports-package-json"; - -console.log(data.hi); -console.log(data.bye); -console.log(typeof data.fs.readFile); -console.log(typeof data.path.join); -console.log(typeof data.fs2.writeFile); diff --git a/tests/specs/npm/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 deleted file mode 100644 index 70d787b251293f..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -hi -bye -function -function -function diff --git a/tests/specs/npm/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 deleted file mode 100644 index cb6a08d1a51c02..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "my-test", - "dependencies": { - "@denotest/imports-package-json": "1.0.0" - } -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index f1097aa0646450..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/sub-path-import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/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 deleted file mode 100644 index 95524202ae2f4a..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/info_cli_chalk_display/__test__.jsonc b/tests/specs/npm/info_cli_chalk_display/__test__.jsonc deleted file mode 100644 index 902bb2dae6211e..00000000000000 --- a/tests/specs/npm/info_cli_chalk_display/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "info --quiet npm:chalk@4", - "output": "info/chalk.out", - "exitCode": 0 -} diff --git a/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out deleted file mode 100644 index 21fc7edf1a1917..00000000000000 --- a/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": 1, - "roots": [ - "npm:chalk@4" - ], - "modules": [ - { - "kind": "npm", - "specifier": "npm:/chalk@4.1.2", - "npmPackage": "chalk@4.1.2" - } - ], - "redirects": { - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - } - } -} diff --git a/tests/specs/npm/info_cli_chalk_json/__test__.jsonc b/tests/specs/npm/info_cli_chalk_json/__test__.jsonc index ee34abae7fbd61..b4b042dbdb7e7f 100644 --- a/tests/specs/npm/info_cli_chalk_json/__test__.jsonc +++ b/tests/specs/npm/info_cli_chalk_json/__test__.jsonc @@ -1,5 +1,14 @@ { - "args": "info --quiet --json npm:chalk@4", - "output": "info/chalk_json.out", - "exitCode": 0 + "tests": { + "info_cli_chalk": { + "args": "info --quiet npm:chalk@4", + "output": "chalk.out", + "exitCode": 0 + }, + "info_cli_chalk_json": { + "args": "info --quiet --json npm:chalk@4", + "output": "chalk_json.out", + "exitCode": 0 + } + } } diff --git a/tests/specs/npm/info_cli_chalk_display/info/chalk.out b/tests/specs/npm/info_cli_chalk_json/chalk.out similarity index 100% rename from tests/specs/npm/info_cli_chalk_display/info/chalk.out rename to tests/specs/npm/info_cli_chalk_json/chalk.out diff --git a/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_json/chalk_json.out similarity index 100% rename from tests/specs/npm/info_cli_chalk_json/info/chalk_json.out rename to tests/specs/npm/info_cli_chalk_json/chalk_json.out diff --git a/tests/specs/npm/info_cli_chalk_json/info/chalk.out b/tests/specs/npm/info_cli_chalk_json/info/chalk.out deleted file mode 100644 index 63fa20da54a509..00000000000000 --- a/tests/specs/npm/info_cli_chalk_json/info/chalk.out +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: 5 unique -size: [WILDCARD] - -npm:/chalk@4.1.2 ([WILDCARD]) -├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ └── npm:/color-name@1.1.4 ([WILDCARD]) -└─┬ npm:/supports-color@7.2.0 ([WILDCARD]) - └── npm:/has-flag@4.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out b/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out deleted file mode 100644 index bdbb2b08eac8f4..00000000000000 --- a/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out +++ /dev/null @@ -1,3 +0,0 @@ -Initialize @denotest/node-lifecycle-scripts@1.0.0: running 'preinstall' script -Initialize @denotest/node-lifecycle-scripts@1.0.0: running 'install' script -Initialize @denotest/node-lifecycle-scripts@1.0.0: running 'postinstall' script diff --git a/tests/specs/npm/mixed_case_package_name/__test__.jsonc b/tests/specs/npm/mixed_case_package_name/__test__.jsonc new file mode 100644 index 00000000000000..ca688f0914138d --- /dev/null +++ b/tests/specs/npm/mixed_case_package_name/__test__.jsonc @@ -0,0 +1,15 @@ +{ + "tempDir": true, + "tests": { + "mixed_case_package_name": { + "args": "run --node-modules-dir=auto -A local.ts", + "output": "local.out", + "exitCode": 0 + }, + "mixed_case_package_name_global_dir": { + "args": "run global.ts", + "output": "global.out", + "exitCode": 0 + } + } +} diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out b/tests/specs/npm/mixed_case_package_name/global.out similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out rename to tests/specs/npm/mixed_case_package_name/global.out diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts b/tests/specs/npm/mixed_case_package_name/global.ts similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts rename to tests/specs/npm/mixed_case_package_name/global.ts diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out b/tests/specs/npm/mixed_case_package_name/local.out similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out rename to tests/specs/npm/mixed_case_package_name/local.out diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts b/tests/specs/npm/mixed_case_package_name/local.ts similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts rename to tests/specs/npm/mixed_case_package_name/local.ts diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc b/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc deleted file mode 100644 index db980472de11d2..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run mixed_case_package_name/global.ts", - "output": "mixed_case_package_name/global.out", - "exitCode": 0 -} diff --git a/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc b/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc deleted file mode 100644 index a214b6f4a39322..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "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/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 deleted file mode 100644 index a1d3a6e2c58ad7..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out +++ /dev/null @@ -1,9 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fMixedCase -Download http://localhost:4260/@denotest%2fCAPITALS -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz -Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz -[UNORDERED_END] -5 diff --git a/tests/specs/npm/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 deleted file mode 100644 index a721b3d7846fee..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts +++ /dev/null @@ -1,2 +0,0 @@ -import value from "npm:@denotest/MixedCase"; -console.log(value); diff --git a/tests/specs/npm/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 deleted file mode 100644 index c8c9ed396c729b..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out +++ /dev/null @@ -1,13 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fMixedCase -Download http://localhost:4260/@denotest%2fCAPITALS -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz -Initialize @denotest/CAPITALS@1.0.0 -Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz -Initialize @denotest/MixedCase@1.0.0 -[UNORDERED_END] -5 -true -true diff --git a/tests/specs/npm/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 deleted file mode 100644 index 6ca6cb581a503e..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts +++ /dev/null @@ -1,18 +0,0 @@ -import value from "npm:@denotest/MixedCase"; -console.log(value); -console.log(pathExists("./node_modules/.deno")); -console.log( - pathExists("./node_modules/.deno/_ibsgk3tporsxg5bpinavaskuifgfg@1.0.0"), -); - -function pathExists(filePath: string) { - try { - Deno.lstatSync(filePath); - return true; - } catch (error) { - if (error instanceof Deno.errors.NotFound) { - return false; - } - throw error; - } -} diff --git a/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc b/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc index 945a3f4d4bbd9c..27809f2d0b3a6b 100644 --- a/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc +++ b/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc @@ -1,5 +1,38 @@ { - "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" + "tests": { + "cjs_with_deps": { + "tempDir": true, + "args": "run --allow-read --allow-env main.js", + "output": "main.out" + }, + "cjs_with_deps_node_modules": { + "tempDir": true, + "args": "run --allow-read --allow-env --node-modules-dir=auto main.js", + "output": "main_node_modules.out" + }, + "cjs_with_deps_info": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info main.js", + "output": "main_info.out" + } + ] + }, + "cjs_with_deps_info_json": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info --json main.js", + "output": "main_info_json.out" + } + ] + } + } } diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js b/tests/specs/npm/node_modules_dir_with_deps/main.js similarity index 100% rename from tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js rename to tests/specs/npm/node_modules_dir_with_deps/main.js diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out b/tests/specs/npm/node_modules_dir_with_deps/main.out similarity index 100% rename from tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out rename to tests/specs/npm/node_modules_dir_with_deps/main.out diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm/node_modules_dir_with_deps/main_info.out similarity index 92% rename from tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out rename to tests/specs/npm/node_modules_dir_with_deps/main_info.out index bcaaf1eecf26fe..dd283c35406d54 100644 --- a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out +++ b/tests/specs/npm/node_modules_dir_with_deps/main_info.out @@ -3,7 +3,7 @@ type: JavaScript dependencies: 14 unique size: [WILDCARD] -file:///[WILDCARD]/npm/cjs_with_deps/main.js ([WILDCARD]) +file:///[WILDCARD]/npm/node_modules_dir_with_deps/main.js ([WILDCARD]) ├─┬ npm:/chalk@4.1.2 ([WILDCARD]) │ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) │ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm/node_modules_dir_with_deps/main_info_json.out similarity index 73% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out rename to tests/specs/npm/node_modules_dir_with_deps/main_info_json.out index 137b9f8ce56c3d..2f7dde2d985599 100644 --- a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out +++ b/tests/specs/npm/node_modules_dir_with_deps/main_info_json.out @@ -46,6 +46,16 @@ "size": 325, "mediaType": "JavaScript", "specifier": "[WILDCARD]/main.js" + }, + { + "kind": "npm", + "specifier": "npm:/chai@4.3.6", + "npmPackage": "chai@4.3.6" + }, + { + "kind": "npm", + "specifier": "npm:/chalk@4.1.2", + "npmPackage": "chalk@4.1.2" } ], "redirects": { @@ -58,12 +68,14 @@ "version": "4.3.0", "dependencies": [ "color-convert@2.0.1" - ] + ], + "registryUrl": "http://localhost:4260/" }, "assertion-error@1.1.0": { "name": "assertion-error", "version": "1.1.0", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "chai@4.3.6": { "name": "chai", @@ -76,7 +88,8 @@ "loupe@2.3.4", "pathval@1.1.1", "type-detect@4.0.8" - ] + ], + "registryUrl": "http://localhost:4260/" }, "chalk@4.1.2": { "name": "chalk", @@ -84,65 +97,76 @@ "dependencies": [ "ansi-styles@4.3.0", "supports-color@7.2.0" - ] + ], + "registryUrl": "http://localhost:4260/" }, "check-error@1.0.2": { "name": "check-error", "version": "1.0.2", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "color-convert@2.0.1": { "name": "color-convert", "version": "2.0.1", "dependencies": [ "color-name@1.1.4" - ] + ], + "registryUrl": "http://localhost:4260/" }, "color-name@1.1.4": { "name": "color-name", "version": "1.1.4", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "deep-eql@3.0.1": { "name": "deep-eql", "version": "3.0.1", "dependencies": [ "type-detect@4.0.8" - ] + ], + "registryUrl": "http://localhost:4260/" }, "get-func-name@2.0.0": { "name": "get-func-name", "version": "2.0.0", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "has-flag@4.0.0": { "name": "has-flag", "version": "4.0.0", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "loupe@2.3.4": { "name": "loupe", "version": "2.3.4", "dependencies": [ "get-func-name@2.0.0" - ] + ], + "registryUrl": "http://localhost:4260/" }, "pathval@1.1.1": { "name": "pathval", "version": "1.1.1", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" }, "supports-color@7.2.0": { "name": "supports-color", "version": "7.2.0", "dependencies": [ "has-flag@4.0.0" - ] + ], + "registryUrl": "http://localhost:4260/" }, "type-detect@4.0.8": { "name": "type-detect", "version": "4.0.8", - "dependencies": [] + "dependencies": [], + "registryUrl": "http://localhost:4260/" } } } diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm/node_modules_dir_with_deps/main_node_modules.out similarity index 100% rename from tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out rename to tests/specs/npm/node_modules_dir_with_deps/main_node_modules.out diff --git a/tests/specs/npm/types_ambient_module/__test__.jsonc b/tests/specs/npm/types_ambient_module/__test__.jsonc index 966d8d8ed4d135..e69c163d5d8a6a 100644 --- a/tests/specs/npm/types_ambient_module/__test__.jsonc +++ b/tests/specs/npm/types_ambient_module/__test__.jsonc @@ -1,5 +1,14 @@ { - "args": "check --quiet types_ambient_module/main.ts", - "output": "types_ambient_module/main.out", - "exitCode": 1 + "tests": { + "types_ambient_module": { + "args": "check --quiet types_ambient_module/main.ts", + "output": "types_ambient_module/main.out", + "exitCode": 1 + }, + "types_ambient_module_import_map": { + "args": "check --quiet --import-map=types_ambient_module/import_map.json types_ambient_module/main_import_map.ts", + "output": "types_ambient_module/main_import_map.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc b/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc deleted file mode 100644 index bbfa93a99b33cf..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --import-map=types_ambient_module/import_map.json types_ambient_module/main_import_map.ts", - "output": "types_ambient_module/main_import_map.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/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 deleted file mode 100644 index f61d99b474f319..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "types-ambient": "npm:@denotest/types-ambient" - } -} diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out deleted file mode 100644 index c84130707ef3b5..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out +++ /dev/null @@ -1,21 +0,0 @@ -error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? -console.log(import1.Test2); // should error - ~~~~~ - at file:///[WILDCARD]/types_ambient_module/main.ts:5:21 - - 'Test' is declared here. - class Test { - ~~~~ - at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 - -TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? -console.log(import2.Test2); // should error - ~~~~~ - at file:///[WILDCARD]/types_ambient_module/main.ts:7:21 - - 'Test' is declared here. - class Test { - ~~~~ - at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 - -Found 2 errors. diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts deleted file mode 100644 index 8f77cabe8e7490..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import * as import1 from "npm:@denotest/types-ambient"; -import * as import2 from "npm:@denotest/types-ambient@1"; - -console.log(import1.Test); -console.log(import1.Test2); // should error -console.log(import2.Test); -console.log(import2.Test2); // should error diff --git a/tests/specs/npm/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 deleted file mode 100644 index 548f9b479cfadb..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out +++ /dev/null @@ -1,9 +0,0 @@ -error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? -console.log(mod.Test2); // should error - ~~~~~ - at file:///[WILDCARD]/main_import_map.ts:4:17 - - 'Test' is declared here. - class Test { - ~~~~ - at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 diff --git a/tests/specs/npm/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 deleted file mode 100644 index 2694c94b7aebaa..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as mod from "npm:@denotest/types-ambient"; - -console.log(mod.Test); -console.log(mod.Test2); // should error diff --git a/tests/specs/run/decorators/experimental/__test__.jsonc b/tests/specs/run/decorators/experimental/__test__.jsonc new file mode 100644 index 00000000000000..c84a16bbaa886e --- /dev/null +++ b/tests/specs/run/decorators/experimental/__test__.jsonc @@ -0,0 +1,16 @@ +{ + "tests": { + "no_check": { + "args": "run --quiet --reload --no-check no_check/main.ts", + "output": "no_check/main.out" + }, + "ts": { + "args": "run --reload --check ts/main.ts", + "output": "ts/main.out" + }, + "runtime": { + "args": "run --quiet --reload --no-check runtime/main.ts", + "output": "runtime/main.out" + } + } +} diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/deno.json b/tests/specs/run/decorators/experimental/deno.json similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/deno.json rename to tests/specs/run/decorators/experimental/deno.json diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.out b/tests/specs/run/decorators/experimental/no_check/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.out rename to tests/specs/run/decorators/experimental/no_check/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.ts b/tests/specs/run/decorators/experimental/no_check/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.ts rename to tests/specs/run/decorators/experimental/no_check/main.ts diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.out b/tests/specs/run/decorators/experimental/runtime/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.out rename to tests/specs/run/decorators/experimental/runtime/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.ts b/tests/specs/run/decorators/experimental/runtime/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.ts rename to tests/specs/run/decorators/experimental/runtime/main.ts diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.out b/tests/specs/run/decorators/experimental/ts/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.out rename to tests/specs/run/decorators/experimental/ts/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.ts b/tests/specs/run/decorators/experimental/ts/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.ts rename to tests/specs/run/decorators/experimental/ts/main.ts diff --git a/tests/specs/run/decorators/tc39_proposal/__test__.jsonc b/tests/specs/run/decorators/tc39_proposal/__test__.jsonc new file mode 100644 index 00000000000000..4ee3c2207a9e95 --- /dev/null +++ b/tests/specs/run/decorators/tc39_proposal/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --quiet --reload --check main.ts", + "output": "main.out" +} diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.out b/tests/specs/run/decorators/tc39_proposal/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.out rename to tests/specs/run/decorators/tc39_proposal/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.ts b/tests/specs/run/decorators/tc39_proposal/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.ts rename to tests/specs/run/decorators/tc39_proposal/main.ts diff --git a/tests/specs/run/decorators_tc39_proposal/__test__.jsonc b/tests/specs/run/decorators_tc39_proposal/__test__.jsonc deleted file mode 100644 index 8e529695d9bda2..00000000000000 --- a/tests/specs/run/decorators_tc39_proposal/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --reload --check decorators/tc39_proposal/main.ts", - "output": "decorators/tc39_proposal/main.out" -} diff --git a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts b/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts deleted file mode 100644 index 5e8efea69b7019..00000000000000 --- a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts +++ /dev/null @@ -1 +0,0 @@ -import "test_server/import_maps/lodash/lodash.ts"; diff --git a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out b/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out deleted file mode 100644 index da996dc0d9ef23..00000000000000 --- a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out +++ /dev/null @@ -1 +0,0 @@ -Hello from remapped lodash! diff --git a/tests/specs/run/jsx_import_source/__test__.jsonc b/tests/specs/run/jsx_import_source/__test__.jsonc new file mode 100644 index 00000000000000..55a895fc8f6c1c --- /dev/null +++ b/tests/specs/run/jsx_import_source/__test__.jsonc @@ -0,0 +1,77 @@ +{ + "tests": { + "jsx_import_source_error": { + "args": "run --config jsx/deno-jsx-error.jsonc --check jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_error.out", + "exitCode": 1 + }, + "jsx_import_source_precompile_import_map": { + "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile.jsonc jsx_precompile/no_pragma.tsx", + "output": "jsx_precompile/no_pragma.out" + }, + "jsx_import_source_precompile_import_map_skip_element": { + "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile-skip.jsonc jsx_precompile/skip.tsx", + "output": "jsx_precompile/skip.out" + }, + "jsx_import_source_pragma_with_dev_config": { + "args": "run --reload --allow-import --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_pragma.tsx", + "output": "jsx_import_source_dev.out" + }, + "jsx_import_source_pragma_with_config_vendor_dir": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --vendor jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_with_config_no_check": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_with_config": { + "args": "run --reload --allow-import --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_no_check": { + "args": "run --allow-import --reload --no-check jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_import_map_no_check": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-check jsx_import_source_pragma_import_map.tsx", + "output": "jsx_import_source_import_map.out" + }, + "jsx_import_source_pragma_import_map_dev": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_pragma_import_map.tsx", + "output": "jsx_import_source_import_map_dev.out" + }, + "jsx_import_source_pragma_import_map": { + "args": "run --allow-import --reload --import-map jsx/import-map.json jsx_import_source_pragma_import_map.tsx", + "output": "jsx_import_source_import_map.out" + }, + "jsx_import_source_pragma": { + "args": "run --reload --allow-import jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_no_pragma_no_check": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_no_pragma_dev": { + "args": "run --allow-import --reload --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_dev.out" + }, + "jsx_import_source_no_pragma": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_import_map_no_check": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc --no-check jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_import_map.out" + }, + "jsx_import_source_import_map_dev": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_import_map_dev.out" + }, + "jsx_import_source_import_map": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_import_map.out" + } + } +} diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-error.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-error.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-error.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-import-map.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-import-map.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-import-map.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile-skip.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile-skip.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile-skip.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source/jsx/deno-jsx.json similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx.json rename to tests/specs/run/jsx_import_source/jsx/deno-jsx.json diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsxdev-import-map.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev-import-map.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsxdev-import-map.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsxdev.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsxdev.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno.lock b/tests/specs/run/jsx_import_source/jsx/deno.lock similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno.lock rename to tests/specs/run/jsx_import_source/jsx/deno.lock diff --git a/tests/specs/run/jsx_import_source_error/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source/jsx/import-map-scoped.json similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/import-map-scoped.json rename to tests/specs/run/jsx_import_source/jsx/import-map-scoped.json diff --git a/tests/specs/run/jsx_import_source_error/jsx/import-map.json b/tests/specs/run/jsx_import_source/jsx/import-map.json similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/import-map.json rename to tests/specs/run/jsx_import_source/jsx/import-map.json diff --git a/tests/specs/run/jsx_import_source_error/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source/jsx/jsx-dev-runtime/index.ts similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/jsx-dev-runtime/index.ts rename to tests/specs/run/jsx_import_source/jsx/jsx-dev-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_error/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source/jsx/jsx-precompile/index.ts similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/jsx-precompile/index.ts rename to tests/specs/run/jsx_import_source/jsx/jsx-precompile/index.ts diff --git a/tests/specs/run/jsx_import_source_error/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source/jsx/jsx-runtime/index.ts similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/jsx-runtime/index.ts rename to tests/specs/run/jsx_import_source/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source.out b/tests/specs/run/jsx_import_source/jsx_import_source.out similarity index 100% rename from tests/specs/run/jsx_import_source_no_pragma/jsx_import_source.out rename to tests/specs/run/jsx_import_source/jsx_import_source.out diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_dev.out b/tests/specs/run/jsx_import_source/jsx_import_source_dev.out similarity index 100% rename from tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_dev.out rename to tests/specs/run/jsx_import_source/jsx_import_source_dev.out diff --git a/tests/specs/run/jsx_import_source_error/jsx_import_source_error.out b/tests/specs/run/jsx_import_source/jsx_import_source_error.out similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx_import_source_error.out rename to tests/specs/run/jsx_import_source/jsx_import_source_error.out diff --git a/tests/specs/run/jsx_import_source_import_map/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source/jsx_import_source_import_map.out similarity index 100% rename from tests/specs/run/jsx_import_source_import_map/jsx_import_source_import_map.out rename to tests/specs/run/jsx_import_source/jsx_import_source_import_map.out diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_import_map_dev.out b/tests/specs/run/jsx_import_source/jsx_import_source_import_map_dev.out similarity index 100% rename from tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_import_map_dev.out rename to tests/specs/run/jsx_import_source/jsx_import_source_import_map_dev.out diff --git a/tests/specs/run/jsx_import_source_error/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source/jsx_import_source_no_pragma.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx_import_source_no_pragma.tsx rename to tests/specs/run/jsx_import_source/jsx_import_source_no_pragma.tsx diff --git a/tests/specs/run/jsx_import_source_pragma/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source/jsx_import_source_pragma.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_pragma/jsx_import_source_pragma.tsx rename to tests/specs/run/jsx_import_source/jsx_import_source_pragma.tsx diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_pragma_import_map.tsx b/tests/specs/run/jsx_import_source/jsx_import_source_pragma_import_map.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_pragma_import_map.tsx rename to tests/specs/run/jsx_import_source/jsx_import_source_pragma_import_map.tsx diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.out b/tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.out similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.out rename to tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.out diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.tsx b/tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.tsx rename to tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.tsx diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.out b/tests/specs/run/jsx_import_source/jsx_precompile/skip.out similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.out rename to tests/specs/run/jsx_import_source/jsx_precompile/skip.out diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.tsx b/tests/specs/run/jsx_import_source/jsx_precompile/skip.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.tsx rename to tests/specs/run/jsx_import_source/jsx_precompile/skip.tsx diff --git a/tests/specs/run/jsx_import_source_error/__test__.jsonc b/tests/specs/run/jsx_import_source_error/__test__.jsonc deleted file mode 100644 index 22b1d29cab11d5..00000000000000 --- a/tests/specs/run/jsx_import_source_error/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --config jsx/deno-jsx-error.jsonc --check jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_error.out", - "exitCode": 1 -} diff --git a/tests/specs/run/jsx_import_source_import_map/__test__.jsonc b/tests/specs/run/jsx_import_source_import_map/__test__.jsonc deleted file mode 100644 index 8a62c5243bf8c4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno.lock b/tests/specs/run/jsx_import_source_import_map/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/import-map.json b/tests/specs/run/jsx_import_source_import_map/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc deleted file mode 100644 index b62e7cb6f36ed8..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_import_map_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json b/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc deleted file mode 100644 index ea426548484603..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc --no-check jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out deleted file mode 100644 index 0d32389677a130..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc b/tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc deleted file mode 100644 index 7678e18f46c8fe..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json b/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc deleted file mode 100644 index 8f9ee81f69b46b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc deleted file mode 100644 index 12cc9b07641fcd..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma/__test__.jsonc deleted file mode 100644 index 9d704c06504c40..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --allow-import jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc deleted file mode 100644 index 9eafe519688224..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json jsx_import_source_pragma_import_map.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out deleted file mode 100644 index 0d32389677a130..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc deleted file mode 100644 index bb271c0eef96fe..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_pragma_import_map.tsx", - "output": "jsx_import_source_import_map_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out deleted file mode 100644 index 56f514d90cefbc..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-dev-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx deleted file mode 100644 index 548365f182a1cd..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc deleted file mode 100644 index dd42b71fda4ea5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-check jsx_import_source_pragma_import_map.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out deleted file mode 100644 index 0d32389677a130..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx deleted file mode 100644 index 548365f182a1cd..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc deleted file mode 100644 index 0956b94a7600b1..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --no-check jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc deleted file mode 100644 index aeaf209c3a2a35..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --allow-import --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc deleted file mode 100644 index 3e8089fd2cd2d8..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc deleted file mode 100644 index 03ed1af1b63ac6..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --vendor jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js deleted file mode 100644 index c8f0a908db2091..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js +++ /dev/null @@ -1,11 +0,0 @@ -export function jsx( - _type, - _props, - _key, - _source, - _self, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json deleted file mode 100644 index a770c3366900ca..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "modules": { - "http://localhost:4545/jsx/jsx-runtime": { - "headers": { - "content-type": "application/javascript" - } - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc deleted file mode 100644 index 56734e4678051c..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --allow-import --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_pragma.tsx", - "output": "jsx_import_source_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out deleted file mode 100644 index 38d7a12f0585e3..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-dev-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc deleted file mode 100644 index c795a9d8e69e36..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile.jsonc jsx_precompile/no_pragma.tsx", - "output": "jsx_precompile/no_pragma.out" -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out b/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out deleted file mode 100644 index a32b616f06f186..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4545/jsx/jsx-precompile/index.ts -Check file:///[WILDCARD]/run/jsx_precompile/skip.tsx -imported http://localhost:4545/jsx/jsx-precompile/index.ts diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc deleted file mode 100644 index 7163c83d00db09..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile-skip.jsonc jsx_precompile/skip.tsx", - "output": "jsx_precompile/skip.out" -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out deleted file mode 100644 index f26984258cdb27..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4545/jsx/jsx-precompile/index.ts -Check file:///[WILDCARD]/jsx_precompile/no_pragma.tsx -imported http://localhost:4545/jsx/jsx-precompile/index.ts diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx deleted file mode 100644 index 7ba21d80d260c4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export function A() { - return

hello

; -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx deleted file mode 100644 index 49bc4e2b7a82da..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export function A() { - return ( -
- foo -

hello

- -
- ); -} diff --git a/tests/specs/run/no_check_decorators/__test__.jsonc b/tests/specs/run/no_check_decorators/__test__.jsonc deleted file mode 100644 index da50d30a054090..00000000000000 --- a/tests/specs/run/no_check_decorators/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --reload --no-check decorators/experimental/no_check/main.ts", - "output": "decorators/experimental/no_check/main.out" -} diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/deno.json b/tests/specs/run/no_check_decorators/decorators/experimental/deno.json deleted file mode 100644 index 504cd646e14906..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out b/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out deleted file mode 100644 index 015f7076e8ba48..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out +++ /dev/null @@ -1,3 +0,0 @@ -a(): evaluated -a(): called -method diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts b/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts deleted file mode 100644 index 9f7ec550d5c354..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("a(): evaluated"); - return ( - _target: any, - _propertyKey: string, - _descriptor: PropertyDescriptor, - ) => { - console.log("a(): called"); - }; -} - -class B { - @a() - method() { - console.log("method"); - } -} - -const b = new B(); -b.method(); diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out b/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out deleted file mode 100644 index 0fc1d4590e0a58..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out +++ /dev/null @@ -1,7 +0,0 @@ -@A evaluated -@B evaluated -@B called -@A called -fn() called from @A -fn() called from @B -C.test() called diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts b/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts deleted file mode 100644 index 40a26bbd4d1948..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts +++ /dev/null @@ -1,42 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("@A evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@A called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @A"); - fn(); - }; - }; -} - -function b() { - console.log("@B evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@B called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @B"); - fn(); - }; - }; -} - -class C { - @a() - @b() - static test() { - console.log("C.test() called"); - } -} - -C.test(); diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out b/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out deleted file mode 100644 index ea64fbaa63ea1b..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out +++ /dev/null @@ -1,3 +0,0 @@ -Warning experimentalDecorators compiler option is deprecated and may be removed at any time -Check [WILDCARD] -SomeClass { someField: "asdf" } diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts b/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts deleted file mode 100644 index 95fba6cd48b224..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -// deno-lint-ignore-file - -function Decorate() { - return function (constructor: any): any { - return class extends constructor { - protected someField: string = "asdf"; - }; - }; -} - -@Decorate() -class SomeClass {} - -console.log(new SomeClass()); diff --git a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out b/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out deleted file mode 100644 index 39394952e88d9c..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out +++ /dev/null @@ -1,3 +0,0 @@ -starting m with arguments 1 -C.m 1 -ending m diff --git a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts b/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts deleted file mode 100644 index 00c8a850256498..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore no-explicit-any -function logged(value: any, { kind, name }: { kind: string; name: string }) { - if (kind === "method") { - return function (...args: unknown[]) { - console.log(`starting ${name} with arguments ${args.join(", ")}`); - // @ts-ignore this has implicit any type - const ret = value.call(this, ...args); - console.log(`ending ${name}`); - return ret; - }; - } -} - -class C { - @logged - m(arg: number) { - console.log("C.m", arg); - } -} - -new C().m(1); diff --git a/tests/specs/run/package_json/invalid_value/__test__.jsonc b/tests/specs/run/package_json/invalid_value/__test__.jsonc index 195734d95f6f3f..9752f32143a907 100644 --- a/tests/specs/run/package_json/invalid_value/__test__.jsonc +++ b/tests/specs/run/package_json/invalid_value/__test__.jsonc @@ -12,6 +12,11 @@ "exitCode": 1, "output": "error_auto.out" }, + "run_error": { + "args": "run error.ts", + "exitCode": 1, + "output": "error.out" + }, "install_error_byonm": { "args": "install", "output": "install.out", diff --git a/tests/specs/run/runtime_decorators/__test__.jsonc b/tests/specs/run/runtime_decorators/__test__.jsonc deleted file mode 100644 index 286fd377d8b24e..00000000000000 --- a/tests/specs/run/runtime_decorators/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --reload --no-check decorators/experimental/runtime/main.ts", - "output": "decorators/experimental/runtime/main.out" -} diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/deno.json b/tests/specs/run/runtime_decorators/decorators/experimental/deno.json deleted file mode 100644 index 504cd646e14906..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out b/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out deleted file mode 100644 index 015f7076e8ba48..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out +++ /dev/null @@ -1,3 +0,0 @@ -a(): evaluated -a(): called -method diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts b/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts deleted file mode 100644 index 9f7ec550d5c354..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("a(): evaluated"); - return ( - _target: any, - _propertyKey: string, - _descriptor: PropertyDescriptor, - ) => { - console.log("a(): called"); - }; -} - -class B { - @a() - method() { - console.log("method"); - } -} - -const b = new B(); -b.method(); diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out b/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out deleted file mode 100644 index 0fc1d4590e0a58..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out +++ /dev/null @@ -1,7 +0,0 @@ -@A evaluated -@B evaluated -@B called -@A called -fn() called from @A -fn() called from @B -C.test() called diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts b/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts deleted file mode 100644 index 40a26bbd4d1948..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts +++ /dev/null @@ -1,42 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("@A evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@A called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @A"); - fn(); - }; - }; -} - -function b() { - console.log("@B evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@B called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @B"); - fn(); - }; - }; -} - -class C { - @a() - @b() - static test() { - console.log("C.test() called"); - } -} - -C.test(); diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out b/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out deleted file mode 100644 index ea64fbaa63ea1b..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out +++ /dev/null @@ -1,3 +0,0 @@ -Warning experimentalDecorators compiler option is deprecated and may be removed at any time -Check [WILDCARD] -SomeClass { someField: "asdf" } diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts b/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts deleted file mode 100644 index 95fba6cd48b224..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -// deno-lint-ignore-file - -function Decorate() { - return function (constructor: any): any { - return class extends constructor { - protected someField: string = "asdf"; - }; - }; -} - -@Decorate() -class SomeClass {} - -console.log(new SomeClass()); diff --git a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out b/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out deleted file mode 100644 index 39394952e88d9c..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out +++ /dev/null @@ -1,3 +0,0 @@ -starting m with arguments 1 -C.m 1 -ending m diff --git a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts b/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts deleted file mode 100644 index 00c8a850256498..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore no-explicit-any -function logged(value: any, { kind, name }: { kind: string; name: string }) { - if (kind === "method") { - return function (...args: unknown[]) { - console.log(`starting ${name} with arguments ${args.join(", ")}`); - // @ts-ignore this has implicit any type - const ret = value.call(this, ...args); - console.log(`ending ${name}`); - return ret; - }; - } -} - -class C { - @logged - m(arg: number) { - console.log("C.m", arg); - } -} - -new C().m(1); diff --git a/tests/specs/run/top_level_await/__test__.jsonc b/tests/specs/run/top_level_await/__test__.jsonc index 25537db5f4b5a0..c05786075ab111 100644 --- a/tests/specs/run/top_level_await/__test__.jsonc +++ b/tests/specs/run/top_level_await/__test__.jsonc @@ -1,4 +1,42 @@ { - "args": "run --allow-read top_level_await/top_level_await.js", - "output": "top_level_await/top_level_await.out" + "tests": { + "top_level_for_await": { + "args": "run --quiet top_level_for_await.js", + "output": "top_level_for_await.out" + }, + "top_level_for_await_ts": { + "args": "run --quiet top_level_for_await.ts", + "output": "top_level_for_await.out" + }, + "top_level_await_unresolved": { + "args": "run unresolved.js", + "output": "unresolved.out", + "exitCode": 1 + }, + "top_level_await": { + "args": "run --allow-read top_level_await.js", + "output": "top_level_await.out" + }, + "top_level_await_ts": { + "args": "run --quiet --allow-read top_level_await.ts", + "output": "top_level_await.out" + }, + "top_level_await_order": { + "args": "run --allow-read order.js", + "output": "order.out" + }, + "top_level_await_nested": { + "args": "run --allow-read nested/main.js", + "output": "nested.out" + }, + "top_level_await_loop": { + "args": "run --allow-read loop.js", + "output": "loop.out" + }, + "top_level_await_circular": { + "args": "run --allow-read circular.js", + "output": "circular.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/run/top_level_await/top_level_await/circular.js b/tests/specs/run/top_level_await/circular.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/circular.js rename to tests/specs/run/top_level_await/circular.js diff --git a/tests/specs/run/top_level_await/top_level_await/circular.out b/tests/specs/run/top_level_await/circular.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/circular.out rename to tests/specs/run/top_level_await/circular.out diff --git a/tests/specs/run/top_level_await/hello.txt b/tests/specs/run/top_level_await/hello.txt index 6769dd60bdf536..cd0875583aabe8 100644 --- a/tests/specs/run/top_level_await/hello.txt +++ b/tests/specs/run/top_level_await/hello.txt @@ -1 +1 @@ -Hello world! \ No newline at end of file +Hello world! diff --git a/tests/specs/run/top_level_await_circular/top_level_await/loop.js b/tests/specs/run/top_level_await/loop.js similarity index 74% rename from tests/specs/run/top_level_await_circular/top_level_await/loop.js rename to tests/specs/run/top_level_await/loop.js index f229e03f61dd0e..401ef0ecd25ffb 100644 --- a/tests/specs/run/top_level_await_circular/top_level_await/loop.js +++ b/tests/specs/run/top_level_await/loop.js @@ -1,11 +1,11 @@ const importsDir = Deno.readDirSync( - Deno.realPathSync("./top_level_await/tla2"), + Deno.realPathSync("./tla2"), ); const resolvedPaths = []; for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./top_level_await/tla2/${name}`); + const filePath = Deno.realPathSync(`./tla2/${name}`); resolvedPaths.push(filePath); } diff --git a/tests/specs/run/top_level_await/top_level_await/loop.out b/tests/specs/run/top_level_await/loop.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/loop.out rename to tests/specs/run/top_level_await/loop.out diff --git a/tests/specs/run/top_level_await/top_level_await/nested.out b/tests/specs/run/top_level_await/nested.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested.out rename to tests/specs/run/top_level_await/nested.out diff --git a/tests/specs/run/top_level_await/top_level_await/nested/a.js b/tests/specs/run/top_level_await/nested/a.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested/a.js rename to tests/specs/run/top_level_await/nested/a.js diff --git a/tests/specs/run/top_level_await/top_level_await/nested/b.js b/tests/specs/run/top_level_await/nested/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested/b.js rename to tests/specs/run/top_level_await/nested/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/nested/main.js b/tests/specs/run/top_level_await/nested/main.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested/main.js rename to tests/specs/run/top_level_await/nested/main.js diff --git a/tests/specs/run/top_level_await/top_level_await/order.js b/tests/specs/run/top_level_await/order.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/order.js rename to tests/specs/run/top_level_await/order.js diff --git a/tests/specs/run/top_level_await/top_level_await/order.out b/tests/specs/run/top_level_await/order.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/order.out rename to tests/specs/run/top_level_await/order.out diff --git a/tests/specs/run/top_level_await/top_level_await/tla/a.js b/tests/specs/run/top_level_await/tla/a.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/a.js rename to tests/specs/run/top_level_await/tla/a.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/b.js b/tests/specs/run/top_level_await/tla/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/b.js rename to tests/specs/run/top_level_await/tla/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/c.js b/tests/specs/run/top_level_await/tla/c.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/c.js rename to tests/specs/run/top_level_await/tla/c.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/d.js b/tests/specs/run/top_level_await/tla/d.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/d.js rename to tests/specs/run/top_level_await/tla/d.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/order.js b/tests/specs/run/top_level_await/tla/order.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/order.js rename to tests/specs/run/top_level_await/tla/order.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/parent.js b/tests/specs/run/top_level_await/tla/parent.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/parent.js rename to tests/specs/run/top_level_await/tla/parent.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla2/a.js b/tests/specs/run/top_level_await/tla2/a.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla2/a.js rename to tests/specs/run/top_level_await/tla2/a.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla2/b.js b/tests/specs/run/top_level_await/tla2/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla2/b.js rename to tests/specs/run/top_level_await/tla2/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla3/b.js b/tests/specs/run/top_level_await/tla3/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla3/b.js rename to tests/specs/run/top_level_await/tla3/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await/tla3/timeout_loop.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla3/timeout_loop.js rename to tests/specs/run/top_level_await/tla3/timeout_loop.js diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_await.js b/tests/specs/run/top_level_await/top_level_await.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_await.js rename to tests/specs/run/top_level_await/top_level_await.js diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_await.out b/tests/specs/run/top_level_await/top_level_await.out similarity index 58% rename from tests/specs/run/top_level_await/top_level_await/top_level_await.out rename to tests/specs/run/top_level_await/top_level_await.out index 4b65d15fe3c0d6..ae1f5594ea9a85 100644 --- a/tests/specs/run/top_level_await/top_level_await/top_level_await.out +++ b/tests/specs/run/top_level_await/top_level_await.out @@ -1,3 +1,4 @@ Hello world! -write 12 + +write 13 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await/top_level_await.ts similarity index 100% rename from tests/specs/run/top_level_await_ts/top_level_await/top_level_await.ts rename to tests/specs/run/top_level_await/top_level_await.ts diff --git a/tests/specs/run/top_level_await/top_level_await/loop.js b/tests/specs/run/top_level_await/top_level_await/loop.js deleted file mode 100644 index f229e03f61dd0e..00000000000000 --- a/tests/specs/run/top_level_await/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await/top_level_for_await.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_for_await.js rename to tests/specs/run/top_level_await/top_level_for_await.js diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await/top_level_for_await.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_for_await.out rename to tests/specs/run/top_level_await/top_level_for_await.out diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await/top_level_for_await.ts similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_for_await.ts rename to tests/specs/run/top_level_await/top_level_for_await.ts diff --git a/tests/specs/run/top_level_await/top_level_await/unresolved.js b/tests/specs/run/top_level_await/unresolved.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/unresolved.js rename to tests/specs/run/top_level_await/unresolved.js diff --git a/tests/specs/run/top_level_await/top_level_await/unresolved.out b/tests/specs/run/top_level_await/unresolved.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/unresolved.out rename to tests/specs/run/top_level_await/unresolved.out diff --git a/tests/specs/run/top_level_await_circular/__test__.jsonc b/tests/specs/run/top_level_await_circular/__test__.jsonc deleted file mode 100644 index 3e236b2107f744..00000000000000 --- a/tests/specs/run/top_level_await_circular/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --allow-read top_level_await/circular.js", - "output": "top_level_await/circular.out", - "exitCode": 1 -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/circular.js b/tests/specs/run/top_level_await_circular/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/circular.out b/tests/specs/run/top_level_await_circular/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_circular/top_level_await/loop.out b/tests/specs/run/top_level_await_circular/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested.out b/tests/specs/run/top_level_await_circular/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested/a.js b/tests/specs/run/top_level_await_circular/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested/b.js b/tests/specs/run/top_level_await_circular/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested/main.js b/tests/specs/run/top_level_await_circular/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/order.js b/tests/specs/run/top_level_await_circular/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/order.out b/tests/specs/run/top_level_await_circular/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/a.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/b.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/c.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/d.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/order.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.js b/tests/specs/run/top_level_await_circular/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.out b/tests/specs/run/top_level_await_circular/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_loop/__test__.jsonc b/tests/specs/run/top_level_await_loop/__test__.jsonc deleted file mode 100644 index b2f5c84c0371bf..00000000000000 --- a/tests/specs/run/top_level_await_loop/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-read top_level_await/loop.js", - "output": "top_level_await/loop.out" -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/circular.js b/tests/specs/run/top_level_await_loop/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/circular.out b/tests/specs/run/top_level_await_loop/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_loop/top_level_await/loop.js b/tests/specs/run/top_level_await_loop/top_level_await/loop.js deleted file mode 100644 index f229e03f61dd0e..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/loop.out b/tests/specs/run/top_level_await_loop/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested.out b/tests/specs/run/top_level_await_loop/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested/a.js b/tests/specs/run/top_level_await_loop/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested/b.js b/tests/specs/run/top_level_await_loop/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested/main.js b/tests/specs/run/top_level_await_loop/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/order.js b/tests/specs/run/top_level_await_loop/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/order.out b/tests/specs/run/top_level_await_loop/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/a.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/b.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/c.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/d.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/order.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.js b/tests/specs/run/top_level_await_loop/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.out b/tests/specs/run/top_level_await_loop/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_nested/__test__.jsonc b/tests/specs/run/top_level_await_nested/__test__.jsonc deleted file mode 100644 index 376180ecdc8ba1..00000000000000 --- a/tests/specs/run/top_level_await_nested/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-read top_level_await/nested/main.js", - "output": "top_level_await/nested.out" -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/circular.js b/tests/specs/run/top_level_await_nested/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/circular.out b/tests/specs/run/top_level_await_nested/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_nested/top_level_await/loop.js b/tests/specs/run/top_level_await_nested/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/loop.out b/tests/specs/run/top_level_await_nested/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested.out b/tests/specs/run/top_level_await_nested/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested/a.js b/tests/specs/run/top_level_await_nested/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested/b.js b/tests/specs/run/top_level_await_nested/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested/main.js b/tests/specs/run/top_level_await_nested/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/order.js b/tests/specs/run/top_level_await_nested/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/order.out b/tests/specs/run/top_level_await_nested/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/a.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/b.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/c.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/d.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/order.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.js b/tests/specs/run/top_level_await_nested/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.out b/tests/specs/run/top_level_await_nested/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_order/__test__.jsonc b/tests/specs/run/top_level_await_order/__test__.jsonc deleted file mode 100644 index 65d00d607d836f..00000000000000 --- a/tests/specs/run/top_level_await_order/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-read top_level_await/order.js", - "output": "top_level_await/order.out" -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/circular.js b/tests/specs/run/top_level_await_order/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_order/top_level_await/circular.out b/tests/specs/run/top_level_await_order/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_order/top_level_await/loop.js b/tests/specs/run/top_level_await_order/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/loop.out b/tests/specs/run/top_level_await_order/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested.out b/tests/specs/run/top_level_await_order/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested/a.js b/tests/specs/run/top_level_await_order/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested/b.js b/tests/specs/run/top_level_await_order/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested/main.js b/tests/specs/run/top_level_await_order/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_order/top_level_await/order.js b/tests/specs/run/top_level_await_order/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/order.out b/tests/specs/run/top_level_await_order/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/a.js b/tests/specs/run/top_level_await_order/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/b.js b/tests/specs/run/top_level_await_order/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/c.js b/tests/specs/run/top_level_await_order/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/d.js b/tests/specs/run/top_level_await_order/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/order.js b/tests/specs/run/top_level_await_order/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_order/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_order/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_order/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_order/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_order/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_order/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/unresolved.js b/tests/specs/run/top_level_await_order/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_order/top_level_await/unresolved.out b/tests/specs/run/top_level_await_order/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_ts/__test__.jsonc b/tests/specs/run/top_level_await_ts/__test__.jsonc deleted file mode 100644 index 15f937df19b363..00000000000000 --- a/tests/specs/run/top_level_await_ts/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --allow-read top_level_await/top_level_await.ts", - "output": "top_level_await/top_level_await.out" -} diff --git a/tests/specs/run/top_level_await_ts/hello.txt b/tests/specs/run/top_level_await_ts/hello.txt deleted file mode 100644 index 6769dd60bdf536..00000000000000 --- a/tests/specs/run/top_level_await_ts/hello.txt +++ /dev/null @@ -1 +0,0 @@ -Hello world! \ No newline at end of file diff --git a/tests/specs/run/top_level_await_ts/top_level_await/circular.js b/tests/specs/run/top_level_await_ts/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/circular.out b/tests/specs/run/top_level_await_ts/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_ts/top_level_await/loop.js b/tests/specs/run/top_level_await_ts/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/loop.out b/tests/specs/run/top_level_await_ts/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested.out b/tests/specs/run/top_level_await_ts/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested/a.js b/tests/specs/run/top_level_await_ts/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested/b.js b/tests/specs/run/top_level_await_ts/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested/main.js b/tests/specs/run/top_level_await_ts/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/order.js b/tests/specs/run/top_level_await_ts/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/order.out b/tests/specs/run/top_level_await_ts/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/a.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/b.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/c.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/d.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/order.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.js b/tests/specs/run/top_level_await_ts/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.out b/tests/specs/run/top_level_await_ts/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_unresolved/__test__.jsonc b/tests/specs/run/top_level_await_unresolved/__test__.jsonc deleted file mode 100644 index a92774c1b8aee2..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run top_level_await/unresolved.js", - "output": "top_level_await/unresolved.out", - "exitCode": 1 -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.js b/tests/specs/run/top_level_await_unresolved/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.out b/tests/specs/run/top_level_await_unresolved/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.js b/tests/specs/run/top_level_await_unresolved/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.out b/tests/specs/run/top_level_await_unresolved/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested.out b/tests/specs/run/top_level_await_unresolved/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js b/tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js b/tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/order.js b/tests/specs/run/top_level_await_unresolved/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/order.out b/tests/specs/run/top_level_await_unresolved/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js b/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out b/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_for_await/__test__.jsonc b/tests/specs/run/top_level_for_await/__test__.jsonc deleted file mode 100644 index 198008560b2d7b..00000000000000 --- a/tests/specs/run/top_level_for_await/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet top_level_await/top_level_for_await.js", - "output": "top_level_await/top_level_for_await.out" -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/circular.js b/tests/specs/run/top_level_for_await/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_for_await/top_level_await/circular.out b/tests/specs/run/top_level_for_await/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_for_await/top_level_await/loop.js b/tests/specs/run/top_level_for_await/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/loop.out b/tests/specs/run/top_level_for_await/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested.out b/tests/specs/run/top_level_for_await/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested/a.js b/tests/specs/run/top_level_for_await/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested/b.js b/tests/specs/run/top_level_for_await/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested/main.js b/tests/specs/run/top_level_for_await/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_for_await/top_level_await/order.js b/tests/specs/run/top_level_for_await/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/order.out b/tests/specs/run/top_level_for_await/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/a.js b/tests/specs/run/top_level_for_await/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/b.js b/tests/specs/run/top_level_for_await/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/c.js b/tests/specs/run/top_level_for_await/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/d.js b/tests/specs/run/top_level_for_await/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/order.js b/tests/specs/run/top_level_for_await/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/parent.js b/tests/specs/run/top_level_for_await/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla2/a.js b/tests/specs/run/top_level_for_await/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla2/b.js b/tests/specs/run/top_level_for_await/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla3/b.js b/tests/specs/run/top_level_for_await/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.js b/tests/specs/run/top_level_for_await/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.out b/tests/specs/run/top_level_for_await/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts b/tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/unresolved.js b/tests/specs/run/top_level_for_await/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_for_await/top_level_await/unresolved.out b/tests/specs/run/top_level_for_await/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_for_await_ts/__test__.jsonc b/tests/specs/run/top_level_for_await_ts/__test__.jsonc deleted file mode 100644 index 22314e8e0d80e9..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet top_level_await/top_level_for_await.ts", - "output": "top_level_await/top_level_for_await.out" -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.js b/tests/specs/run/top_level_for_await_ts/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.out b/tests/specs/run/top_level_for_await_ts/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.js b/tests/specs/run/top_level_for_await_ts/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.out b/tests/specs/run/top_level_for_await_ts/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested.out b/tests/specs/run/top_level_for_await_ts/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js b/tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js b/tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/order.js b/tests/specs/run/top_level_for_await_ts/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/order.out b/tests/specs/run/top_level_for_await_ts/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js b/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out b/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/ts_decorators/__test__.jsonc b/tests/specs/run/ts_decorators/__test__.jsonc deleted file mode 100644 index 96e7cdf308c735..00000000000000 --- a/tests/specs/run/ts_decorators/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --check decorators/experimental/ts/main.ts", - "output": "decorators/experimental/ts/main.out" -} diff --git a/tests/specs/run/ts_decorators/decorators/experimental/deno.json b/tests/specs/run/ts_decorators/decorators/experimental/deno.json deleted file mode 100644 index 504cd646e14906..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out b/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out deleted file mode 100644 index 015f7076e8ba48..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out +++ /dev/null @@ -1,3 +0,0 @@ -a(): evaluated -a(): called -method diff --git a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts b/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts deleted file mode 100644 index 9f7ec550d5c354..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("a(): evaluated"); - return ( - _target: any, - _propertyKey: string, - _descriptor: PropertyDescriptor, - ) => { - console.log("a(): called"); - }; -} - -class B { - @a() - method() { - console.log("method"); - } -} - -const b = new B(); -b.method(); diff --git a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out b/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out deleted file mode 100644 index 0fc1d4590e0a58..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out +++ /dev/null @@ -1,7 +0,0 @@ -@A evaluated -@B evaluated -@B called -@A called -fn() called from @A -fn() called from @B -C.test() called diff --git a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts b/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts deleted file mode 100644 index 40a26bbd4d1948..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts +++ /dev/null @@ -1,42 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("@A evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@A called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @A"); - fn(); - }; - }; -} - -function b() { - console.log("@B evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@B called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @B"); - fn(); - }; - }; -} - -class C { - @a() - @b() - static test() { - console.log("C.test() called"); - } -} - -C.test(); diff --git a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.out b/tests/specs/run/ts_decorators/decorators/experimental/ts/main.out deleted file mode 100644 index ea64fbaa63ea1b..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.out +++ /dev/null @@ -1,3 +0,0 @@ -Warning experimentalDecorators compiler option is deprecated and may be removed at any time -Check [WILDCARD] -SomeClass { someField: "asdf" } diff --git a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts b/tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts deleted file mode 100644 index 95fba6cd48b224..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -// deno-lint-ignore-file - -function Decorate() { - return function (constructor: any): any { - return class extends constructor { - protected someField: string = "asdf"; - }; - }; -} - -@Decorate() -class SomeClass {} - -console.log(new SomeClass()); diff --git a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out b/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out deleted file mode 100644 index 39394952e88d9c..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out +++ /dev/null @@ -1,3 +0,0 @@ -starting m with arguments 1 -C.m 1 -ending m diff --git a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts b/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts deleted file mode 100644 index 00c8a850256498..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore no-explicit-any -function logged(value: any, { kind, name }: { kind: string; name: string }) { - if (kind === "method") { - return function (...args: unknown[]) { - console.log(`starting ${name} with arguments ${args.join(", ")}`); - // @ts-ignore this has implicit any type - const ret = value.call(this, ...args); - console.log(`ending ${name}`); - return ret; - }; - } -} - -class C { - @logged - m(arg: number) { - console.log("C.m", arg); - } -} - -new C().m(1); diff --git a/tests/specs/run/unsafe_proto/__test__.jsonc b/tests/specs/run/unsafe_proto/__test__.jsonc index d1c608b5155551..88d13e76937c54 100644 --- a/tests/specs/run/unsafe_proto/__test__.jsonc +++ b/tests/specs/run/unsafe_proto/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "run -A unsafe_proto/main.js", - "output": "unsafe_proto/main.out", + "args": "run -A main.js", + "output": "main.out", "exitCode": 0 } diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main.js b/tests/specs/run/unsafe_proto/main.js similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/main.js rename to tests/specs/run/unsafe_proto/main.js diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main.out b/tests/specs/run/unsafe_proto/main.out similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/main.out rename to tests/specs/run/unsafe_proto/main.out diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/worker.js b/tests/specs/run/unsafe_proto/worker.js similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/worker.js rename to tests/specs/run/unsafe_proto/worker.js diff --git a/tests/specs/run/unsafe_proto_flag/__test__.jsonc b/tests/specs/run/unsafe_proto_flag/__test__.jsonc index 8bd2b56ffc9611..db2918f1d826fc 100644 --- a/tests/specs/run/unsafe_proto_flag/__test__.jsonc +++ b/tests/specs/run/unsafe_proto_flag/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "run -A --unstable-unsafe-proto unsafe_proto/main.js", - "output": "unsafe_proto/main_with_unsafe_proto_flag.out", + "args": "run -A --unstable-unsafe-proto main.js", + "output": "main_with_unsafe_proto_flag.out", "exitCode": 0 } diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.js b/tests/specs/run/unsafe_proto_flag/main.js similarity index 100% rename from tests/specs/run/unsafe_proto_flag/unsafe_proto/main.js rename to tests/specs/run/unsafe_proto_flag/main.js diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out b/tests/specs/run/unsafe_proto_flag/main_with_unsafe_proto_flag.out similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out rename to tests/specs/run/unsafe_proto_flag/main_with_unsafe_proto_flag.out diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out b/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out deleted file mode 100644 index 4b095fd0ff9ca0..00000000000000 --- a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out +++ /dev/null @@ -1,2 +0,0 @@ -false -false diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out b/tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out deleted file mode 100644 index bb101b641b9bd8..00000000000000 --- a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out +++ /dev/null @@ -1,2 +0,0 @@ -true -true diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/worker.js b/tests/specs/run/unsafe_proto_flag/worker.js similarity index 100% rename from tests/specs/run/unsafe_proto_flag/unsafe_proto/worker.js rename to tests/specs/run/unsafe_proto_flag/worker.js diff --git a/tests/specs/task/bin_pkg_with_scope_auto/bin_none.out b/tests/specs/task/bin_pkg_with_scope_auto/bin_none.out deleted file mode 100644 index f44b234bf3453e..00000000000000 --- a/tests/specs/task/bin_pkg_with_scope_auto/bin_none.out +++ /dev/null @@ -1,12 +0,0 @@ -Download http://localhost:4260/@denotest%2fbin -[UNORDERED_START] -Download http://localhost:4260/@denotest/bin/0.5.0.tgz -Download http://localhost:4260/@denotest/bin/1.0.0.tgz -[UNORDERED_END] -Task bin bin hi && cli-esm testing this out && npx cli-cjs test "extra" -hi -testing -this -out -test -extra diff --git a/tests/specs/task/filter/deno_multi.out b/tests/specs/task/filter/deno_multi.out deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/tests/testdata/cache/037_fetch_multiple.out b/tests/testdata/cache/037_fetch_multiple.out deleted file mode 100644 index f4c0c314bc4aa4..00000000000000 --- a/tests/testdata/cache/037_fetch_multiple.out +++ /dev/null @@ -1,5 +0,0 @@ -Download http://localhost:4545/subdir/mod2.ts -Download http://localhost:4545/subdir/mt_text_typescript.t1.ts -Download http://localhost:4545/subdir/print_hello.ts -Check [WILDCARD]/fetch/test.ts -Check [WILDCARD]/fetch/other.ts diff --git a/tests/testdata/file_extensions/ts_with_extension.out b/tests/testdata/file_extensions/ts_with_extension.out deleted file mode 100644 index 181959ee231dd9..00000000000000 --- a/tests/testdata/file_extensions/ts_with_extension.out +++ /dev/null @@ -1 +0,0 @@ -executing typescript with extension diff --git a/tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out b/tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out deleted file mode 100644 index 158c556c2968ff..00000000000000 --- a/tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out +++ /dev/null @@ -1 +0,0 @@ -Checked 2 files diff --git a/tests/testdata/fmt/fmt_with_config_default.out b/tests/testdata/fmt/fmt_with_config_default.out deleted file mode 100644 index faad9352bbb63b..00000000000000 --- a/tests/testdata/fmt/fmt_with_config_default.out +++ /dev/null @@ -1,2 +0,0 @@ -Config file found at '[WILDCARD]deno.jsonc' -Checked 2 files diff --git a/tools/lint.js b/tools/lint.js index 8e0057fa305002..2312cde272580e 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -3,7 +3,16 @@ // deno-lint-ignore-file no-console -import { buildMode, getPrebuilt, getSources, join, ROOT_PATH } from "./util.js"; +import { + buildMode, + dirname, + getPrebuilt, + getSources, + join, + parseJSONC, + ROOT_PATH, + walk, +} from "./util.js"; import { checkCopyright } from "./copyright_checker.js"; import * as ciFile from "../.github/workflows/ci.generate.ts"; @@ -25,6 +34,7 @@ if (js) { promises.push(dlintPreferPrimordials()); promises.push(ensureCiYmlUpToDate()); promises.push(ensureNoNewITests()); + promises.push(ensureNoUnusedOutFiles()); if (rs) { promises.push(checkCopyright()); @@ -251,3 +261,49 @@ async function ensureNoNewITests() { } } } + +async function ensureNoUnusedOutFiles() { + const specsDir = join(ROOT_PATH, "tests", "specs"); + const outFilePaths = new Set( + (await Array.fromAsync( + walk(specsDir, { exts: [".out"] }), + )).map((entry) => entry.path), + ); + const testFiles = (await Array.fromAsync( + walk(specsDir, { exts: [".jsonc"] }), + )).filter((entry) => { + return entry.path.endsWith("__test__.jsonc"); + }); + + function checkObject(baseDirPath, obj) { + for (const [key, value] of Object.entries(obj)) { + if (typeof value === "object") { + checkObject(baseDirPath, value); + } else if (key === "output" && typeof value === "string") { + const outFilePath = join(baseDirPath, value); + outFilePaths.delete(outFilePath); + } + } + } + + for (const testFile of testFiles) { + try { + const text = await Deno.readTextFile(testFile.path); + const data = parseJSONC(text); + checkObject(dirname(testFile.path), data); + } catch (err) { + throw new Error("Failed reading: " + testFile.path, { + cause: err, + }); + } + } + + const notFoundPaths = Array.from(outFilePaths); + if (notFoundPaths.length > 0) { + notFoundPaths.sort(); // be deterministic + for (const file of notFoundPaths) { + console.error(`Unreferenced .out file: ${file}`); + } + throw new Error(`${notFoundPaths.length} unreferenced .out files`); + } +} diff --git a/tools/util.js b/tools/util.js index 8c7cea15d8e4da..8669337bff7ea7 100644 --- a/tools/util.js +++ b/tools/util.js @@ -2,12 +2,20 @@ // deno-lint-ignore-file no-console -import { dirname, fromFileUrl, join, resolve, toFileUrl } from "@std/path"; +import { + dirname, + extname, + fromFileUrl, + join, + resolve, + toFileUrl, +} from "@std/path"; import { wait } from "https://deno.land/x/wait@0.1.13/mod.ts"; -export { dirname, fromFileUrl, join, resolve, toFileUrl }; -export { existsSync, walk } from "@std/fs"; +export { dirname, extname, fromFileUrl, join, resolve, toFileUrl }; +export { existsSync, expandGlobSync, walk } from "@std/fs"; export { TextLineStream } from "@std/streams/text-line-stream"; export { delay } from "@std/async/delay"; +export { parse as parseJSONC } from "@std/jsonc/parse"; // [toolName] --version output const versions = { From 927352bd4e7f58458daa56921cf148862af05383 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Wed, 27 Nov 2024 08:35:39 +0100 Subject: [PATCH 420/436] fix(node/fs): add missing stat path argument validation (#27086) We didn't validate the `path` argument that's passed to `fs.stat()` and `fs.statSync()` which lead to wrong errors being thrown. The `@rollup/plugin-node-resolve` code calls it with `undefined` quite a lot which lead to `nitro` and `nuxt` failing. Fixes https://github.com/denoland/deno/issues/26700 --------- Co-authored-by: Yoshiya Hinosawa --- ext/node/polyfills/_fs/_fs_stat.ts | 4 +++ tests/unit_node/_fs/_fs_stat_test.ts | 37 +++++++++++++++++++++++++++- tests/unit_node/fs_test.ts | 5 +++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/ext/node/polyfills/_fs/_fs_stat.ts b/ext/node/polyfills/_fs/_fs_stat.ts index 507cb05eaf52f3..f26474668665b9 100644 --- a/ext/node/polyfills/_fs/_fs_stat.ts +++ b/ext/node/polyfills/_fs/_fs_stat.ts @@ -6,6 +6,7 @@ import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; import { primordials } from "ext:core/mod.js"; +import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; const { ObjectCreate, ObjectAssign } = primordials; @@ -379,6 +380,7 @@ export function stat( ? optionsOrCallback : { bigint: false }; + path = getValidatedPath(path).toString(); if (!callback) throw new Error("No callback function supplied"); Deno.stat(path).then( @@ -409,6 +411,8 @@ export function statSync( path: string | URL, options: statOptions = { bigint: false, throwIfNoEntry: true }, ): Stats | BigIntStats | undefined { + path = getValidatedPath(path).toString(); + try { const origin = Deno.statSync(path); return CFISBIS(origin, options.bigint); diff --git a/tests/unit_node/_fs/_fs_stat_test.ts b/tests/unit_node/_fs/_fs_stat_test.ts index e42aa34a9a1145..3cbbe940b02041 100644 --- a/tests/unit_node/_fs/_fs_stat_test.ts +++ b/tests/unit_node/_fs/_fs_stat_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { BigIntStats, stat, Stats, statSync } from "node:fs"; -import { assertEquals, fail } from "@std/assert"; +import { assert, assertEquals, fail } from "@std/assert"; export function assertStats(actual: Stats, expected: Deno.FileInfo) { assertEquals(actual.dev, expected.dev); @@ -152,3 +152,38 @@ Deno.test({ assertEquals(stats.isSocket(), false); }, }); + +Deno.test({ + name: "[node/fs] stat invalid path error", + async fn() { + try { + await new Promise((resolve, reject) => { + stat( + // deno-lint-ignore no-explicit-any + undefined as any, + (err, stats) => err ? reject(err) : resolve(stats), + ); + }); + fail(); + } catch (err) { + assert(err instanceof TypeError); + // deno-lint-ignore no-explicit-any + assertEquals((err as any).code, "ERR_INVALID_ARG_TYPE"); + } + }, +}); + +Deno.test({ + name: "[node/fs] statSync invalid path error", + fn() { + try { + // deno-lint-ignore no-explicit-any + statSync(undefined as any); + fail(); + } catch (err) { + assert(err instanceof TypeError); + // deno-lint-ignore no-explicit-any + assertEquals((err as any).code, "ERR_INVALID_ARG_TYPE"); + } + }, +}); diff --git a/tests/unit_node/fs_test.ts b/tests/unit_node/fs_test.ts index 631608d7ccc5fc..32bea40e75ae74 100644 --- a/tests/unit_node/fs_test.ts +++ b/tests/unit_node/fs_test.ts @@ -3,6 +3,7 @@ /// import { assert, assertEquals, assertRejects, assertThrows } from "@std/assert"; import { join } from "node:path"; +import { fileURLToPath } from "node:url"; import { tmpdir } from "node:os"; import { closeSync, @@ -160,7 +161,9 @@ Deno.test( } catch (error: unknown) { assertEquals( `${error}`, - `Error: ENOENT: no such file or directory, stat '${fileUrl.pathname}'`, + `Error: ENOENT: no such file or directory, stat '${ + fileURLToPath(fileUrl) + }'`, ); } }, From 7400181ecb7c6d235f0b8c47f663f84e68ba162d Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Wed, 27 Nov 2024 02:15:15 -0800 Subject: [PATCH 421/436] fix(tools/doc): HTML resolve main entrypoint from config file (#27103) Fixes #26901 --- cli/tools/doc.rs | 8 +++++- tests/specs/doc/html/__test__.jsonc | 27 ++++++++++++------- ...referenced_private_types_fixed.ts => a.ts} | 0 tests/specs/doc/html/b.ts | 11 ++++++++ tests/specs/doc/html/check_file.ts | 5 ++++ tests/specs/doc/html/deno.json | 5 ++++ 6 files changed, 46 insertions(+), 10 deletions(-) rename tests/specs/doc/html/{referenced_private_types_fixed.ts => a.ts} (100%) create mode 100644 tests/specs/doc/html/b.ts create mode 100644 tests/specs/doc/html/check_file.ts create mode 100644 tests/specs/doc/html/deno.json diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 197596167fecea..9a24e458ac9e9b 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -209,10 +209,14 @@ pub async fn doc( Default::default() }; + let mut main_entrypoint = None; + let rewrite_map = if let Some(config_file) = cli_options.start_dir.maybe_deno_json() { let config = config_file.to_exports_config()?; + main_entrypoint = config.get_resolved(".").ok().flatten(); + let rewrite_map = config .clone() .into_map() @@ -240,6 +244,7 @@ pub async fn doc( html_options, deno_ns, rewrite_map, + main_entrypoint, ) } else { let modules_len = doc_nodes_by_url.len(); @@ -383,6 +388,7 @@ fn generate_docs_directory( html_options: &DocHtmlFlag, deno_ns: std::collections::HashMap, Option>>, rewrite_map: Option>, + main_entrypoint: Option, ) -> Result<(), AnyError> { let cwd = std::env::current_dir().context("Failed to get CWD")?; let output_dir_resolved = cwd.join(&html_options.output); @@ -415,7 +421,7 @@ fn generate_docs_directory( let options = deno_doc::html::GenerateOptions { package_name: html_options.name.clone(), - main_entrypoint: None, + main_entrypoint, rewrite_map, href_resolver: Rc::new(DocResolver { deno_ns, diff --git a/tests/specs/doc/html/__test__.jsonc b/tests/specs/doc/html/__test__.jsonc index 5114127cd61a09..78ced63744e82a 100644 --- a/tests/specs/doc/html/__test__.jsonc +++ b/tests/specs/doc/html/__test__.jsonc @@ -1,12 +1,21 @@ { "tempDir": true, - "args": [ - "doc", - "--html", - "--name=MyLib", - "--output=temp_dir_path_here", - "referenced_private_types_fixed.ts" - ], - "output": "[WILDCARD]", - "exitCode": 0 + "steps": [ + { + "args": [ + "doc", + "--html", + "--name=MyLib", + "a.ts", + "b.ts" + ], + "output": "Written 23 files to \"./docs/\"\n", + "exitCode": 0 + }, + { + "args": "run --allow-read check_file.ts", + "output": "", + "exitCode": 0 + } + ] } diff --git a/tests/specs/doc/html/referenced_private_types_fixed.ts b/tests/specs/doc/html/a.ts similarity index 100% rename from tests/specs/doc/html/referenced_private_types_fixed.ts rename to tests/specs/doc/html/a.ts diff --git a/tests/specs/doc/html/b.ts b/tests/specs/doc/html/b.ts new file mode 100644 index 00000000000000..bb385369923e67 --- /dev/null +++ b/tests/specs/doc/html/b.ts @@ -0,0 +1,11 @@ +/** Doc comment */ +export interface MyInterface2 { + /** Doc comment */ + prop?: string; +} + +/** Doc comment */ +export class MyClass2 { + /** Doc comment */ + prop: MyInterface2 = {}; +} diff --git a/tests/specs/doc/html/check_file.ts b/tests/specs/doc/html/check_file.ts new file mode 100644 index 00000000000000..7d2fdeff5f6256 --- /dev/null +++ b/tests/specs/doc/html/check_file.ts @@ -0,0 +1,5 @@ +const content = Deno.readTextFileSync("./docs/index.html"); + +if (content.includes("..")) { + throw new Error(); +} diff --git a/tests/specs/doc/html/deno.json b/tests/specs/doc/html/deno.json new file mode 100644 index 00000000000000..b466b28003a728 --- /dev/null +++ b/tests/specs/doc/html/deno.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./a.ts" + } +} From 1e51b650bea825ec5b12041bb5db67a39df3b63e Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 27 Nov 2024 02:41:57 -0800 Subject: [PATCH 422/436] perf(ext/webstorage): use object wrap for `Storage` (#26931) ![image](https://github.com/user-attachments/assets/3f86e2fd-9026-4965-8f3b-512423362f1e) Depends on: - https://github.com/denoland/deno_core/pull/970 - https://github.com/denoland/deno_core/pull/976 - https://github.com/denoland/deno_core/pull/980 - https://github.com/denoland/deno_core/pull/981 --------- Signed-off-by: Divy Srivastava --- Cargo.lock | 19 ++- Cargo.toml | 2 +- ext/webstorage/01_webstorage.js | 89 ++------------ ext/webstorage/lib.rs | 194 ++++++++++++++++-------------- tests/wpt/runner/expectation.json | 2 +- 5 files changed, 128 insertions(+), 178 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f59c936e88b8b..fc567b4a380b78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -394,6 +394,12 @@ dependencies = [ "tower-service", ] +[[package]] +name = "az" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" + [[package]] name = "backtrace" version = "0.3.73" @@ -1454,11 +1460,12 @@ dependencies = [ [[package]] name = "deno_core" -version = "0.322.0" +version = "0.323.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f593ef2b8acab8cd3ace9d50052edc65a3654fdbde808070cfa5da5cf7aaae6" +checksum = "a781bcfe1b5211b8497f45bf5b3dba73036b8d5d1533c1f05d26ccf0afb25a78" dependencies = [ "anyhow", + "az", "bincode", "bit-set", "bit-vec", @@ -1969,9 +1976,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.198.0" +version = "0.199.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870826735cd9aa0376d2aadca14365b753e830e3cc16891efb9232845a6982a4" +checksum = "a24a1f3e22029a57d3094b32070b8328eac793920b5a022027d360f085e6b245" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -6570,9 +6577,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.231.0" +version = "0.232.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0c48b8842ebae21c52da1d978fba5c2be5991680bddfdc1a36ee0ccbc60114" +checksum = "5c9feae92f7293fcc1a32a86be1a399859c0637e55dad8991d5258c43f7ff4d2" dependencies = [ "num-bigint", "serde", diff --git a/Cargo.toml b/Cargo.toml index 3fa7a2164a1ab9..652d55e071ab89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "=0.43.3", features = ["transpiling"] } -deno_core = { version = "0.322.0" } +deno_core = { version = "0.323.0" } deno_bench_util = { version = "0.173.0", path = "./bench_util" } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } diff --git a/ext/webstorage/01_webstorage.js b/ext/webstorage/01_webstorage.js index 9e86366563a6a2..12abea8387ca3b 100644 --- a/ext/webstorage/01_webstorage.js +++ b/ext/webstorage/01_webstorage.js @@ -3,91 +3,20 @@ /// import { primordials } from "ext:core/mod.js"; -import { - op_webstorage_clear, - op_webstorage_get, - op_webstorage_iterate_keys, - op_webstorage_key, - op_webstorage_length, - op_webstorage_remove, - op_webstorage_set, -} from "ext:core/ops"; +import { op_webstorage_iterate_keys, Storage } from "ext:core/ops"; const { - Symbol, SymbolFor, ObjectFromEntries, ObjectEntries, ReflectDefineProperty, ReflectDeleteProperty, - ReflectGet, + FunctionPrototypeBind, ReflectHas, Proxy, } = primordials; -import * as webidl from "ext:deno_webidl/00_webidl.js"; - -const _persistent = Symbol("[[persistent]]"); - -class Storage { - [_persistent]; - - constructor() { - webidl.illegalConstructor(); - } - - get length() { - webidl.assertBranded(this, StoragePrototype); - return op_webstorage_length(this[_persistent]); - } - - key(index) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'key' on 'Storage'"; - webidl.requiredArguments(arguments.length, 1, prefix); - index = webidl.converters["unsigned long"](index, prefix, "Argument 1"); - - return op_webstorage_key(index, this[_persistent]); - } - - setItem(key, value) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'setItem' on 'Storage'"; - webidl.requiredArguments(arguments.length, 2, prefix); - key = webidl.converters.DOMString(key, prefix, "Argument 1"); - value = webidl.converters.DOMString(value, prefix, "Argument 2"); - - op_webstorage_set(key, value, this[_persistent]); - } - - getItem(key) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'getItem' on 'Storage'"; - webidl.requiredArguments(arguments.length, 1, prefix); - key = webidl.converters.DOMString(key, prefix, "Argument 1"); - - return op_webstorage_get(key, this[_persistent]); - } - - removeItem(key) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'removeItem' on 'Storage'"; - webidl.requiredArguments(arguments.length, 1, prefix); - key = webidl.converters.DOMString(key, prefix, "Argument 1"); - - op_webstorage_remove(key, this[_persistent]); - } - - clear() { - webidl.assertBranded(this, StoragePrototype); - op_webstorage_clear(this[_persistent]); - } -} - -const StoragePrototype = Storage.prototype; - function createStorage(persistent) { - const storage = webidl.createBranded(Storage); - storage[_persistent] = persistent; + const storage = new Storage(persistent); const proxy = new Proxy(storage, { deleteProperty(target, key) { @@ -106,12 +35,16 @@ function createStorage(persistent) { return true; }, - get(target, key, receiver) { + get(target, key) { if (typeof key === "symbol") { return target[key]; } if (ReflectHas(target, key)) { - return ReflectGet(target, key, receiver); + const value = target[key]; + if (typeof value === "function") { + return FunctionPrototypeBind(value, target); + } + return value; } return target.getItem(key) ?? undefined; }, @@ -136,7 +69,7 @@ function createStorage(persistent) { }, ownKeys() { - return op_webstorage_iterate_keys(persistent); + return op_webstorage_iterate_keys(storage); }, getOwnPropertyDescriptor(target, key) { @@ -163,7 +96,7 @@ function createStorage(persistent) { inspect, inspectOptions, ) { - return `${this.constructor.name} ${ + return `Storage ${ inspect({ ...ObjectFromEntries(ObjectEntries(proxy)), length: this.length, diff --git a/ext/webstorage/lib.rs b/ext/webstorage/lib.rs index 40946f05a7ec81..c3e4c465969ed3 100644 --- a/ext/webstorage/lib.rs +++ b/ext/webstorage/lib.rs @@ -5,6 +5,7 @@ use std::path::PathBuf; use deno_core::op2; +use deno_core::GarbageCollected; use deno_core::OpState; use rusqlite::params; use rusqlite::Connection; @@ -32,17 +33,14 @@ const MAX_STORAGE_BYTES: usize = 10 * 1024 * 1024; deno_core::extension!(deno_webstorage, deps = [ deno_webidl ], ops = [ - op_webstorage_length, - op_webstorage_key, - op_webstorage_set, - op_webstorage_get, - op_webstorage_remove, - op_webstorage_clear, op_webstorage_iterate_keys, ], + objects = [ + Storage + ], esm = [ "01_webstorage.js" ], options = { - origin_storage_dir: Option + origin_storage_dir: Option }, state = |state, options| { if let Some(origin_storage_dir) = options.origin_storage_dir { @@ -110,122 +108,134 @@ fn get_webstorage( Ok(conn) } -#[op2(fast)] -pub fn op_webstorage_length( - state: &mut OpState, - persistent: bool, -) -> Result { - let conn = get_webstorage(state, persistent)?; - - let mut stmt = conn.prepare_cached("SELECT COUNT(*) FROM data")?; - let length: u32 = stmt.query_row(params![], |row| row.get(0))?; +#[inline] +fn size_check(input: usize) -> Result<(), WebStorageError> { + if input >= MAX_STORAGE_BYTES { + return Err(WebStorageError::StorageExceeded); + } - Ok(length) + Ok(()) } -#[op2] -#[string] -pub fn op_webstorage_key( - state: &mut OpState, - #[smi] index: u32, +struct Storage { persistent: bool, -) -> Result, WebStorageError> { - let conn = get_webstorage(state, persistent)?; +} - let mut stmt = - conn.prepare_cached("SELECT key FROM data LIMIT 1 OFFSET ?")?; +impl GarbageCollected for Storage {} - let key: Option = stmt - .query_row(params![index], |row| row.get(0)) - .optional()?; +#[op2] +impl Storage { + #[constructor] + #[cppgc] + fn new(persistent: bool) -> Storage { + Storage { persistent } + } - Ok(key) -} + #[getter] + #[smi] + fn length(&self, state: &mut OpState) -> Result { + let conn = get_webstorage(state, self.persistent)?; -#[inline] -fn size_check(input: usize) -> Result<(), WebStorageError> { - if input >= MAX_STORAGE_BYTES { - return Err(WebStorageError::StorageExceeded); + let mut stmt = conn.prepare_cached("SELECT COUNT(*) FROM data")?; + let length: u32 = stmt.query_row(params![], |row| row.get(0))?; + + Ok(length) } - Ok(()) -} + #[required(1)] + #[string] + fn key( + &self, + state: &mut OpState, + #[smi] index: u32, + ) -> Result, WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; -#[op2(fast)] -pub fn op_webstorage_set( - state: &mut OpState, - #[string] key: &str, - #[string] value: &str, - persistent: bool, -) -> Result<(), WebStorageError> { - let conn = get_webstorage(state, persistent)?; + let mut stmt = + conn.prepare_cached("SELECT key FROM data LIMIT 1 OFFSET ?")?; - size_check(key.len() + value.len())?; + let key: Option = stmt + .query_row(params![index], |row| row.get(0)) + .optional()?; - let mut stmt = conn - .prepare_cached("SELECT SUM(pgsize) FROM dbstat WHERE name = 'data'")?; - let size: u32 = stmt.query_row(params![], |row| row.get(0))?; + Ok(key) + } - size_check(size as usize)?; + #[fast] + #[required(2)] + fn set_item( + &self, + state: &mut OpState, + #[string] key: &str, + #[string] value: &str, + ) -> Result<(), WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; - let mut stmt = conn - .prepare_cached("INSERT OR REPLACE INTO data (key, value) VALUES (?, ?)")?; - stmt.execute(params![key, value])?; + size_check(key.len() + value.len())?; - Ok(()) -} + let mut stmt = conn + .prepare_cached("SELECT SUM(pgsize) FROM dbstat WHERE name = 'data'")?; + let size: u32 = stmt.query_row(params![], |row| row.get(0))?; -#[op2] -#[string] -pub fn op_webstorage_get( - state: &mut OpState, - #[string] key_name: String, - persistent: bool, -) -> Result, WebStorageError> { - let conn = get_webstorage(state, persistent)?; + size_check(size as usize)?; - let mut stmt = conn.prepare_cached("SELECT value FROM data WHERE key = ?")?; - let val = stmt - .query_row(params![key_name], |row| row.get(0)) - .optional()?; + let mut stmt = conn.prepare_cached( + "INSERT OR REPLACE INTO data (key, value) VALUES (?, ?)", + )?; + stmt.execute(params![key, value])?; - Ok(val) -} + Ok(()) + } -#[op2(fast)] -pub fn op_webstorage_remove( - state: &mut OpState, - #[string] key_name: &str, - persistent: bool, -) -> Result<(), WebStorageError> { - let conn = get_webstorage(state, persistent)?; + #[required(1)] + #[string] + fn get_item( + &self, + state: &mut OpState, + #[string] key: &str, + ) -> Result, WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; - let mut stmt = conn.prepare_cached("DELETE FROM data WHERE key = ?")?; - stmt.execute(params![key_name])?; + let mut stmt = + conn.prepare_cached("SELECT value FROM data WHERE key = ?")?; + let val = stmt.query_row(params![key], |row| row.get(0)).optional()?; - Ok(()) -} + Ok(val) + } -#[op2(fast)] -pub fn op_webstorage_clear( - state: &mut OpState, - persistent: bool, -) -> Result<(), WebStorageError> { - let conn = get_webstorage(state, persistent)?; + #[fast] + #[required(1)] + fn remove_item( + &self, + state: &mut OpState, + #[string] key: &str, + ) -> Result<(), WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; - let mut stmt = conn.prepare_cached("DELETE FROM data")?; - stmt.execute(params![])?; + let mut stmt = conn.prepare_cached("DELETE FROM data WHERE key = ?")?; + stmt.execute(params![key])?; - Ok(()) + Ok(()) + } + + #[fast] + fn clear(&self, state: &mut OpState) -> Result<(), WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; + + let mut stmt = conn.prepare_cached("DELETE FROM data")?; + stmt.execute(params![])?; + + Ok(()) + } } #[op2] #[serde] -pub fn op_webstorage_iterate_keys( +fn op_webstorage_iterate_keys( + #[cppgc] storage: &Storage, state: &mut OpState, - persistent: bool, ) -> Result, WebStorageError> { - let conn = get_webstorage(state, persistent)?; + let conn = get_webstorage(state, storage.persistent)?; let mut stmt = conn.prepare_cached("SELECT key FROM data")?; let keys = stmt diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json index 6140f4379d03c2..5776fdb486b212 100644 --- a/tests/wpt/runner/expectation.json +++ b/tests/wpt/runner/expectation.json @@ -9789,7 +9789,7 @@ "event_constructor.window.html": false, "event_initstorageevent.window.html": false, "missing_arguments.window.html": true, - "storage_builtins.window.html": true, + "storage_builtins.window.html": false, "storage_clear.window.html": true, "storage_functions_not_overwritten.window.html": true, "storage_getitem.window.html": true, From 2bbfef137c01d9e06e8f91d78dbdfcd401262f26 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 27 Nov 2024 09:50:38 -0500 Subject: [PATCH 423/436] feat(unstable): repurpose `--unstable-detect-cjs` to attempt loading more modules as cjs (#27094) This resurrects the `--unstable-detect-cjs` flag (which became stable), and repurposes it to attempt loading .js/.jsx/.ts/.tsx files as CJS in the following additional scenarios: 1. There is no package.json 1. There is a package.json without a "type" field Also cleans up the implementation of this in the LSP a lot by hanging `resolution_mode()` off `Document` (didn't think about doing that until now). --- cli/args/flags.rs | 4 +- cli/args/mod.rs | 6 + cli/factory.rs | 11 +- cli/lsp/analysis.rs | 8 +- cli/lsp/completions.rs | 4 +- cli/lsp/diagnostics.rs | 1 - cli/lsp/documents.rs | 161 +++++++++--------- cli/lsp/language_server.rs | 14 +- cli/lsp/resolver.rs | 112 ++++-------- cli/lsp/tsc.rs | 13 +- cli/resolver.rs | 1 - cli/schemas/config-file.v1.json | 1 + cli/standalone/binary.rs | 1 + cli/standalone/mod.rs | 11 +- resolvers/deno/cjs.rs | 29 ++-- runtime/fmt_errors.rs | 3 +- .../no_pkg_json/__test__.jsonc | 4 + .../unstable_detect_cjs/no_pkg_json/add.ts | 3 + .../unstable_detect_cjs/no_pkg_json/deno.json | 3 + .../unstable_detect_cjs/no_pkg_json/main.out | 1 + .../unstable_detect_cjs/no_pkg_json/main.ts | 3 + .../no_type_field/__test__.jsonc | 4 + .../unstable_detect_cjs/no_type_field/add.ts | 3 + .../no_type_field/main.out | 1 + .../unstable_detect_cjs/no_type_field/main.ts | 3 + .../no_type_field/package.json | 2 + .../type_module/__test__.jsonc | 5 + .../unstable_detect_cjs/type_module/add.ts | 3 + .../unstable_detect_cjs/type_module/main.out | 4 + .../unstable_detect_cjs/type_module/main.ts | 3 + .../type_module/package.json | 3 + .../run/import_common_js/exports_error.out | 3 +- .../run/import_common_js/module_error.out | 3 +- .../run/import_common_js/require_error.out | 3 +- .../run/npm_pkg_requires_esm_js/output.out | 3 +- .../commonjs/basic/main_mix.out | 3 +- .../run/package_json_type/none/main_cjs.out | 3 +- 37 files changed, 217 insertions(+), 226 deletions(-) create mode 100644 tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc create mode 100644 tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts create mode 100644 tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json create mode 100644 tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out create mode 100644 tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts create mode 100644 tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc create mode 100644 tests/specs/node/unstable_detect_cjs/no_type_field/add.ts create mode 100644 tests/specs/node/unstable_detect_cjs/no_type_field/main.out create mode 100644 tests/specs/node/unstable_detect_cjs/no_type_field/main.ts create mode 100644 tests/specs/node/unstable_detect_cjs/no_type_field/package.json create mode 100644 tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc create mode 100644 tests/specs/node/unstable_detect_cjs/type_module/add.ts create mode 100644 tests/specs/node/unstable_detect_cjs/type_module/main.out create mode 100644 tests/specs/node/unstable_detect_cjs/type_module/main.ts create mode 100644 tests/specs/node/unstable_detect_cjs/type_module/package.json diff --git a/cli/args/flags.rs b/cli/args/flags.rs index dde4a8ab77e79d..5ea28bfec19377 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -598,6 +598,7 @@ pub struct UnstableConfig { // TODO(bartlomieju): remove in Deno 2.5 pub legacy_flag_enabled: bool, // --unstable pub bare_node_builtins: bool, + pub detect_cjs: bool, pub sloppy_imports: bool, pub features: Vec, // --unstabe-kv --unstable-cron } @@ -4373,7 +4374,7 @@ impl CommandExt for Command { ).arg( Arg::new("unstable-detect-cjs") .long("unstable-detect-cjs") - .help("Reads the package.json type field in a project to treat .js files as .cjs") + .help("Treats ambiguous .js, .jsx, .ts, .tsx files as CommonJS modules in more cases") .value_parser(FalseyValueParser::new()) .action(ArgAction::SetTrue) .hide(true) @@ -5986,6 +5987,7 @@ fn unstable_args_parse( flags.unstable_config.bare_node_builtins = matches.get_flag("unstable-bare-node-builtins"); + flags.unstable_config.detect_cjs = matches.get_flag("unstable-detect-cjs"); flags.unstable_config.sloppy_imports = matches.get_flag("unstable-sloppy-imports"); diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 09149994110748..fb576a8c3e87e6 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1606,6 +1606,11 @@ impl CliOptions { || self.workspace().has_unstable("bare-node-builtins") } + pub fn unstable_detect_cjs(&self) -> bool { + self.flags.unstable_config.detect_cjs + || self.workspace().has_unstable("detect-cjs") + } + pub fn detect_cjs(&self) -> bool { // only enabled when there's a package.json in order to not have a // perf penalty for non-npm Deno projects of searching for the closest @@ -1675,6 +1680,7 @@ impl CliOptions { "sloppy-imports", "byonm", "bare-node-builtins", + "detect-cjs", "fmt-component", "fmt-sql", ]) diff --git a/cli/factory.rs b/cli/factory.rs index 98149982f04edf..5d9a2c0824152e 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -48,7 +48,6 @@ use crate::resolver::CliNpmReqResolver; use crate::resolver::CliResolver; use crate::resolver::CliResolverOptions; use crate::resolver::CliSloppyImportsResolver; -use crate::resolver::IsCjsResolverOptions; use crate::resolver::NpmModuleLoader; use crate::resolver::SloppyImportsCachedFs; use crate::standalone::DenoCompileBinaryWriter; @@ -72,6 +71,7 @@ use deno_core::error::AnyError; use deno_core::futures::FutureExt; use deno_core::FeatureChecker; +use deno_resolver::cjs::IsCjsResolutionMode; use deno_resolver::npm::NpmReqResolverOptions; use deno_resolver::DenoResolverOptions; use deno_resolver::NodeAndNpmReqResolver; @@ -845,9 +845,12 @@ impl CliFactory { Ok(Arc::new(CjsTracker::new( self.in_npm_pkg_checker()?.clone(), self.pkg_json_resolver().clone(), - IsCjsResolverOptions { - detect_cjs: options.detect_cjs(), - is_node_main: options.is_node_main(), + if options.is_node_main() || options.unstable_detect_cjs() { + IsCjsResolutionMode::ImplicitTypeCommonJs + } else if options.detect_cjs() { + IsCjsResolutionMode::ExplicitTypeCommonJs + } else { + IsCjsResolutionMode::Disabled }, ))) }) diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index eca1f15ed067c5..65ce330dfce404 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -1281,9 +1281,7 @@ impl CodeActionCollection { import_start_from_specifier(document, i) })?; let referrer = document.specifier(); - let referrer_kind = language_server - .is_cjs_resolver - .get_doc_resolution_mode(document); + let resolution_mode = document.resolution_mode(); let file_referrer = document.file_referrer(); let config_data = language_server .config @@ -1309,7 +1307,7 @@ impl CodeActionCollection { if !language_server.resolver.is_bare_package_json_dep( &dep_key, referrer, - referrer_kind, + resolution_mode, ) { return None; } @@ -1329,7 +1327,7 @@ impl CodeActionCollection { } if language_server .resolver - .npm_to_file_url(&npm_ref, referrer, referrer_kind, file_referrer) + .npm_to_file_url(&npm_ref, referrer, resolution_mode, file_referrer) .is_some() { // The package import has types. diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs index a77f3506fd10ef..95e5113620302e 100644 --- a/cli/lsp/completions.rs +++ b/cli/lsp/completions.rs @@ -9,7 +9,6 @@ use super::jsr::CliJsrSearchApi; use super::lsp_custom; use super::npm::CliNpmSearchApi; use super::registries::ModuleRegistry; -use super::resolver::LspIsCjsResolver; use super::resolver::LspResolver; use super::search::PackageSearchApi; use super::tsc; @@ -161,7 +160,6 @@ pub async fn get_import_completions( jsr_search_api: &CliJsrSearchApi, npm_search_api: &CliNpmSearchApi, documents: &Documents, - is_cjs_resolver: &LspIsCjsResolver, resolver: &LspResolver, maybe_import_map: Option<&ImportMap>, ) -> Option { @@ -171,7 +169,7 @@ pub async fn get_import_completions( let resolution_mode = graph_range .resolution_mode .map(to_node_resolution_mode) - .unwrap_or_else(|| is_cjs_resolver.get_doc_resolution_mode(&document)); + .unwrap_or_else(|| document.resolution_mode()); let range = to_narrow_lsp_range(document.text_info(), graph_range.range); let resolved = resolver .as_cli_resolver(file_referrer) diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 1967cdd7c9f850..1b72953c1b8fe6 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1707,7 +1707,6 @@ mod tests { documents: Arc::new(documents), assets: Default::default(), config: Arc::new(config), - is_cjs_resolver: Default::default(), resolver, }, ) diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index 96332b43880f31..df51c07a39d11f 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -3,7 +3,6 @@ use super::cache::calculate_fs_version; use super::cache::LspCache; use super::config::Config; -use super::resolver::LspIsCjsResolver; use super::resolver::LspResolver; use super::resolver::ScopeDepInfo; use super::resolver::SingleReferrerGraphResolver; @@ -313,6 +312,7 @@ pub struct Document { media_type: MediaType, /// Present if and only if this is an open document. open_data: Option, + resolution_mode: ResolutionMode, resolver: Arc, specifier: ModuleSpecifier, text: Arc, @@ -328,7 +328,6 @@ impl Document { maybe_lsp_version: Option, maybe_language_id: Option, maybe_headers: Option>, - is_cjs_resolver: &LspIsCjsResolver, resolver: Arc, config: Arc, cache: &Arc, @@ -340,7 +339,7 @@ impl Document { .or(file_referrer); let media_type = resolve_media_type(&specifier, maybe_headers.as_ref(), maybe_language_id); - let (maybe_parsed_source, maybe_module) = + let (maybe_parsed_source, maybe_module, resolution_mode) = if media_type_is_diagnosable(media_type) { parse_and_analyze_module( specifier.clone(), @@ -348,11 +347,10 @@ impl Document { maybe_headers.as_ref(), media_type, file_referrer.as_ref(), - is_cjs_resolver, &resolver, ) } else { - (None, None) + (None, None, ResolutionMode::Import) }; let maybe_module = maybe_module.and_then(Result::ok); let dependencies = maybe_module @@ -387,6 +385,7 @@ impl Document { maybe_parsed_source, maybe_semantic_tokens: Default::default(), }), + resolution_mode, resolver, specifier, text, @@ -396,7 +395,6 @@ impl Document { fn with_new_config( &self, - is_cjs_resolver: &LspIsCjsResolver, resolver: Arc, config: Arc, ) -> Arc { @@ -408,20 +406,20 @@ impl Document { let dependencies; let maybe_types_dependency; let maybe_parsed_source; + let found_resolution_mode; let is_script; let maybe_test_module_fut; if media_type != self.media_type { let parsed_source_result = parse_source(self.specifier.clone(), self.text.clone(), media_type); - let maybe_module = analyze_module( + let (maybe_module_result, resolution_mode) = analyze_module( self.specifier.clone(), &parsed_source_result, self.maybe_headers.as_ref(), self.file_referrer.as_ref(), - is_cjs_resolver, &resolver, - ) - .ok(); + ); + let maybe_module = maybe_module_result.ok(); dependencies = maybe_module .as_ref() .map(|m| Arc::new(m.dependencies.clone())) @@ -433,17 +431,21 @@ impl Document { maybe_parsed_source = Some(parsed_source_result); maybe_test_module_fut = get_maybe_test_module_fut(maybe_parsed_source.as_ref(), &config); + found_resolution_mode = resolution_mode; } else { let cli_resolver = resolver.as_cli_resolver(self.file_referrer.as_ref()); + let is_cjs_resolver = + resolver.as_is_cjs_resolver(self.file_referrer.as_ref()); let npm_resolver = resolver.create_graph_npm_resolver(self.file_referrer.as_ref()); let config_data = resolver.as_config_data(self.file_referrer.as_ref()); let jsx_import_source_config = config_data.and_then(|d| d.maybe_jsx_import_source_config()); + found_resolution_mode = is_cjs_resolver + .get_lsp_resolution_mode(&self.specifier, self.is_script); let resolver = SingleReferrerGraphResolver { valid_referrer: &self.specifier, - module_resolution_mode: is_cjs_resolver - .get_lsp_resolution_mode(&self.specifier, self.is_script), + module_resolution_mode: found_resolution_mode, cli_resolver, jsx_import_source_config: jsx_import_source_config.as_ref(), }; @@ -493,6 +495,7 @@ impl Document { maybe_language_id: self.maybe_language_id, maybe_test_module_fut, media_type, + resolution_mode: found_resolution_mode, open_data: self.open_data.as_ref().map(|d| DocumentOpenData { lsp_version: d.lsp_version, maybe_parsed_source, @@ -508,7 +511,6 @@ impl Document { fn with_change( &self, - is_cjs_resolver: &LspIsCjsResolver, version: i32, changes: Vec, ) -> Result, AnyError> { @@ -530,7 +532,7 @@ impl Document { } let text: Arc = content.into(); let media_type = self.media_type; - let (maybe_parsed_source, maybe_module) = if self + let (maybe_parsed_source, maybe_module, resolution_mode) = if self .maybe_language_id .as_ref() .map(|li| li.is_diagnosable()) @@ -542,11 +544,10 @@ impl Document { self.maybe_headers.as_ref(), media_type, self.file_referrer.as_ref(), - is_cjs_resolver, self.resolver.as_ref(), ) } else { - (None, None) + (None, None, ResolutionMode::Import) }; let maybe_module = maybe_module.and_then(Result::ok); let dependencies = maybe_module @@ -580,6 +581,7 @@ impl Document { maybe_navigation_tree: Mutex::new(None), maybe_test_module_fut, media_type, + resolution_mode, open_data: self.open_data.is_some().then_some(DocumentOpenData { lsp_version: version, maybe_parsed_source, @@ -613,6 +615,7 @@ impl Document { maybe_test_module_fut: self.maybe_test_module_fut.clone(), media_type: self.media_type, open_data: None, + resolution_mode: self.resolution_mode, resolver: self.resolver.clone(), }) } @@ -641,6 +644,7 @@ impl Document { maybe_test_module_fut: self.maybe_test_module_fut.clone(), media_type: self.media_type, open_data: self.open_data.clone(), + resolution_mode: self.resolution_mode, resolver: self.resolver.clone(), }) } @@ -664,6 +668,10 @@ impl Document { &self.text } + pub fn resolution_mode(&self) -> ResolutionMode { + self.resolution_mode + } + pub fn text_info(&self) -> &SourceTextInfo { // try to get the text info from the parsed source and if // not then create one in the cell @@ -677,14 +685,6 @@ impl Document { .get_or_init(|| SourceTextInfo::new(self.text.clone())) }) } - - /// If this is maybe a CJS script and maybe not an ES module. - /// - /// Use `LspIsCjsResolver` to determine for sure. - pub fn is_script(&self) -> Option { - self.is_script - } - pub fn line_index(&self) -> Arc { self.line_index.clone() } @@ -832,7 +832,6 @@ impl FileSystemDocuments { pub fn get( &self, specifier: &ModuleSpecifier, - is_cjs_resolver: &LspIsCjsResolver, resolver: &Arc, config: &Arc, cache: &Arc, @@ -856,14 +855,7 @@ impl FileSystemDocuments { }; if dirty { // attempt to update the file on the file system - self.refresh_document( - specifier, - is_cjs_resolver, - resolver, - config, - cache, - file_referrer, - ) + self.refresh_document(specifier, resolver, config, cache, file_referrer) } else { old_doc } @@ -874,7 +866,6 @@ impl FileSystemDocuments { fn refresh_document( &self, specifier: &ModuleSpecifier, - is_cjs_resolver: &LspIsCjsResolver, resolver: &Arc, config: &Arc, cache: &Arc, @@ -896,7 +887,6 @@ impl FileSystemDocuments { None, None, None, - is_cjs_resolver, resolver.clone(), config.clone(), cache, @@ -913,7 +903,6 @@ impl FileSystemDocuments { None, None, None, - is_cjs_resolver, resolver.clone(), config.clone(), cache, @@ -946,7 +935,6 @@ impl FileSystemDocuments { None, None, Some(cached_file.metadata.headers), - is_cjs_resolver, resolver.clone(), config.clone(), cache, @@ -987,8 +975,6 @@ pub struct Documents { /// The DENO_DIR that the documents looks for non-file based modules. cache: Arc, config: Arc, - /// Resolver for detecting if a document is CJS or ESM. - is_cjs_resolver: Arc, /// A resolver that takes into account currently loaded import map and JSX /// settings. resolver: Arc, @@ -1024,7 +1010,6 @@ impl Documents { // the cache for remote modules here in order to get the // x-typescript-types? None, - &self.is_cjs_resolver, self.resolver.clone(), self.config.clone(), &self.cache, @@ -1059,7 +1044,7 @@ impl Documents { )) })?; self.dirty = true; - let doc = doc.with_change(&self.is_cjs_resolver, version, changes)?; + let doc = doc.with_change(version, changes)?; self.open_docs.insert(doc.specifier().clone(), doc.clone()); Ok(doc) } @@ -1191,7 +1176,6 @@ impl Documents { if let Some(old_doc) = old_doc { self.file_system_docs.get( specifier, - &self.is_cjs_resolver, &self.resolver, &self.config, &self.cache, @@ -1216,7 +1200,6 @@ impl Documents { } else { self.file_system_docs.get( &specifier, - &self.is_cjs_resolver, &self.resolver, &self.config, &self.cache, @@ -1346,7 +1329,6 @@ impl Documents { ) { self.config = Arc::new(config.clone()); self.cache = Arc::new(cache.clone()); - self.is_cjs_resolver = Arc::new(LspIsCjsResolver::new(cache)); self.resolver = resolver.clone(); node_resolver::PackageJsonThreadLocalCache::clear(); @@ -1370,21 +1352,14 @@ impl Documents { if !config.specifier_enabled(doc.specifier()) { continue; } - *doc = doc.with_new_config( - &self.is_cjs_resolver, - self.resolver.clone(), - self.config.clone(), - ); + *doc = doc.with_new_config(self.resolver.clone(), self.config.clone()); } for mut doc in self.file_system_docs.docs.iter_mut() { if !config.specifier_enabled(doc.specifier()) { continue; } - *doc.value_mut() = doc.with_new_config( - &self.is_cjs_resolver, - self.resolver.clone(), - self.config.clone(), - ); + *doc.value_mut() = + doc.with_new_config(self.resolver.clone(), self.config.clone()); } self.open_docs = open_docs; let mut preload_count = 0; @@ -1401,7 +1376,6 @@ impl Documents { { fs_docs.refresh_document( specifier, - &self.is_cjs_resolver, &self.resolver, &self.config, &self.cache, @@ -1567,8 +1541,12 @@ impl Documents { return Some((specifier, media_type)); }; if let Some(types) = doc.maybe_types_dependency().maybe_specifier() { - let specifier_kind = self.is_cjs_resolver.get_doc_resolution_mode(&doc); - self.resolve_dependency(types, &specifier, specifier_kind, file_referrer) + self.resolve_dependency( + types, + &specifier, + doc.resolution_mode(), + file_referrer, + ) } else { Some((doc.specifier().clone(), doc.media_type())) } @@ -1636,19 +1614,25 @@ fn parse_and_analyze_module( maybe_headers: Option<&HashMap>, media_type: MediaType, file_referrer: Option<&ModuleSpecifier>, - is_cjs_resolver: &LspIsCjsResolver, resolver: &LspResolver, -) -> (Option, Option) { +) -> ( + Option, + Option, + ResolutionMode, +) { let parsed_source_result = parse_source(specifier.clone(), text, media_type); - let module_result = analyze_module( + let (module_result, resolution_mode) = analyze_module( specifier, &parsed_source_result, maybe_headers, file_referrer, - is_cjs_resolver, resolver, ); - (Some(parsed_source_result), Some(module_result)) + ( + Some(parsed_source_result), + Some(module_result), + resolution_mode, + ) } fn parse_source( @@ -1671,44 +1655,51 @@ fn analyze_module( parsed_source_result: &ParsedSourceResult, maybe_headers: Option<&HashMap>, file_referrer: Option<&ModuleSpecifier>, - is_cjs_resolver: &LspIsCjsResolver, resolver: &LspResolver, -) -> ModuleResult { +) -> (ModuleResult, ResolutionMode) { match parsed_source_result { Ok(parsed_source) => { let npm_resolver = resolver.create_graph_npm_resolver(file_referrer); let cli_resolver = resolver.as_cli_resolver(file_referrer); + let is_cjs_resolver = resolver.as_is_cjs_resolver(file_referrer); let config_data = resolver.as_config_data(file_referrer); let valid_referrer = specifier.clone(); let jsx_import_source_config = config_data.and_then(|d| d.maybe_jsx_import_source_config()); + let module_resolution_mode = is_cjs_resolver.get_lsp_resolution_mode( + &specifier, + Some(parsed_source.compute_is_script()), + ); let resolver = SingleReferrerGraphResolver { valid_referrer: &valid_referrer, - module_resolution_mode: is_cjs_resolver.get_lsp_resolution_mode( - &specifier, - Some(parsed_source.compute_is_script()), - ), + module_resolution_mode, cli_resolver, jsx_import_source_config: jsx_import_source_config.as_ref(), }; - Ok(deno_graph::parse_module_from_ast( - deno_graph::ParseModuleFromAstOptions { - graph_kind: deno_graph::GraphKind::TypesOnly, - specifier, - maybe_headers, - parsed_source, - // use a null file system because there's no need to bother resolving - // dynamic imports like import(`./dir/${something}`) in the LSP - file_system: &deno_graph::source::NullFileSystem, - jsr_url_provider: &CliJsrUrlProvider, - maybe_resolver: Some(&resolver), - maybe_npm_resolver: Some(&npm_resolver), - }, - )) + ( + Ok(deno_graph::parse_module_from_ast( + deno_graph::ParseModuleFromAstOptions { + graph_kind: deno_graph::GraphKind::TypesOnly, + specifier, + maybe_headers, + parsed_source, + // use a null file system because there's no need to bother resolving + // dynamic imports like import(`./dir/${something}`) in the LSP + file_system: &deno_graph::source::NullFileSystem, + jsr_url_provider: &CliJsrUrlProvider, + maybe_resolver: Some(&resolver), + maybe_npm_resolver: Some(&npm_resolver), + }, + )), + module_resolution_mode, + ) } - Err(err) => Err(deno_graph::ModuleGraphError::ModuleError( - deno_graph::ModuleError::ParseErr(specifier, err.clone()), - )), + Err(err) => ( + Err(deno_graph::ModuleGraphError::ModuleError( + deno_graph::ModuleError::ParseErr(specifier, err.clone()), + )), + ResolutionMode::Import, + ), } } diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 8fccfd0411d62c..0caaa941072bb6 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -79,7 +79,6 @@ use super::parent_process_checker; use super::performance::Performance; use super::refactor; use super::registries::ModuleRegistry; -use super::resolver::LspIsCjsResolver; use super::resolver::LspResolver; use super::testing; use super::text; @@ -147,7 +146,6 @@ pub struct StateSnapshot { pub project_version: usize, pub assets: AssetsSnapshot, pub config: Arc, - pub is_cjs_resolver: Arc, pub documents: Arc, pub resolver: Arc, } @@ -207,7 +205,6 @@ pub struct Inner { pub documents: Documents, http_client_provider: Arc, initial_cwd: PathBuf, - pub is_cjs_resolver: Arc, jsr_search_api: CliJsrSearchApi, /// Handles module registries, which allow discovery of modules module_registry: ModuleRegistry, @@ -485,7 +482,6 @@ impl Inner { let initial_cwd = std::env::current_dir().unwrap_or_else(|_| { panic!("Could not resolve current working directory") }); - let is_cjs_resolver = Arc::new(LspIsCjsResolver::new(&cache)); Self { assets, @@ -497,7 +493,6 @@ impl Inner { documents, http_client_provider, initial_cwd: initial_cwd.clone(), - is_cjs_resolver, jsr_search_api, project_version: 0, task_queue: Default::default(), @@ -608,7 +603,6 @@ impl Inner { project_version: self.project_version, assets: self.assets.snapshot(), config: Arc::new(self.config.clone()), - is_cjs_resolver: self.is_cjs_resolver.clone(), documents: Arc::new(self.documents.clone()), resolver: self.resolver.snapshot(), }) @@ -630,7 +624,6 @@ impl Inner { } }); self.cache = LspCache::new(global_cache_url); - self.is_cjs_resolver = Arc::new(LspIsCjsResolver::new(&self.cache)); let deno_dir = self.cache.deno_dir(); let workspace_settings = self.config.workspace_settings(); let maybe_root_path = self @@ -1638,7 +1631,7 @@ impl Inner { .get_ts_diagnostics(&specifier, asset_or_doc.document_lsp_version()); let specifier_kind = asset_or_doc .document() - .map(|d| self.is_cjs_resolver.get_doc_resolution_mode(d)) + .map(|d| d.resolution_mode()) .unwrap_or(ResolutionMode::Import); let mut includes_no_cache = false; for diagnostic in &fixable_diagnostics { @@ -1862,7 +1855,7 @@ impl Inner { maybe_asset_or_doc .as_ref() .and_then(|d| d.document()) - .map(|d| self.is_cjs_resolver.get_doc_resolution_mode(d)) + .map(|d| d.resolution_mode()) .unwrap_or(ResolutionMode::Import), &combined_code_actions.changes, self, @@ -1919,7 +1912,7 @@ impl Inner { &action_data.specifier, asset_or_doc .document() - .map(|d| self.is_cjs_resolver.get_doc_resolution_mode(d)) + .map(|d| d.resolution_mode()) .unwrap_or(ResolutionMode::Import), &refactor_edit_info.edits, self, @@ -2270,7 +2263,6 @@ impl Inner { &self.jsr_search_api, &self.npm_search_api, &self.documents, - &self.is_cjs_resolver, self.resolver.as_ref(), self .config diff --git a/cli/lsp/resolver.rs b/cli/lsp/resolver.rs index 49203c5bfd959b..c705511f30d260 100644 --- a/cli/lsp/resolver.rs +++ b/cli/lsp/resolver.rs @@ -13,8 +13,8 @@ use deno_graph::GraphImport; use deno_graph::ModuleSpecifier; use deno_graph::Range; use deno_npm::NpmSystemInfo; -use deno_path_util::url_from_directory_path; use deno_path_util::url_to_file_path; +use deno_resolver::cjs::IsCjsResolutionMode; use deno_resolver::npm::NpmReqResolverOptions; use deno_resolver::DenoResolverOptions; use deno_resolver::NodeAndNpmReqResolver; @@ -39,7 +39,6 @@ use std::collections::HashSet; use std::sync::Arc; use super::cache::LspCache; -use super::documents::Document; use super::jsr::JsrCacheResolver; use crate::args::create_default_npmrc; use crate::args::CacheSetting; @@ -71,7 +70,6 @@ use crate::resolver::CliResolverOptions; use crate::resolver::IsCjsResolver; use crate::resolver::WorkerCliNpmGraphResolver; use crate::tsc::into_specifier_and_media_type; -use crate::util::fs::canonicalize_path_maybe_not_exists; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; @@ -79,6 +77,7 @@ use crate::util::progress_bar::ProgressBarStyle; struct LspScopeResolver { resolver: Arc, in_npm_pkg_checker: Arc, + is_cjs_resolver: Arc, jsr_resolver: Option>, npm_resolver: Option>, node_resolver: Option>, @@ -97,6 +96,7 @@ impl Default for LspScopeResolver { Self { resolver: factory.cli_resolver().clone(), in_npm_pkg_checker: factory.in_npm_pkg_checker().clone(), + is_cjs_resolver: factory.is_cjs_resolver().clone(), jsr_resolver: None, npm_resolver: None, node_resolver: None, @@ -206,6 +206,7 @@ impl LspScopeResolver { Self { resolver: cli_resolver, in_npm_pkg_checker, + is_cjs_resolver: factory.is_cjs_resolver().clone(), jsr_resolver, npm_pkg_req_resolver, npm_resolver, @@ -229,6 +230,7 @@ impl LspScopeResolver { Arc::new(Self { resolver: factory.cli_resolver().clone(), in_npm_pkg_checker: factory.in_npm_pkg_checker().clone(), + is_cjs_resolver: factory.is_cjs_resolver().clone(), jsr_resolver: self.jsr_resolver.clone(), npm_pkg_req_resolver: factory.npm_pkg_req_resolver().cloned(), npm_resolver: factory.npm_resolver().cloned(), @@ -346,6 +348,14 @@ impl LspResolver { resolver.resolver.create_graph_npm_resolver() } + pub fn as_is_cjs_resolver( + &self, + file_referrer: Option<&ModuleSpecifier>, + ) -> &IsCjsResolver { + let resolver = self.get_scope_resolver(file_referrer); + resolver.is_cjs_resolver.as_ref() + } + pub fn as_config_data( &self, file_referrer: Option<&ModuleSpecifier>, @@ -582,6 +592,7 @@ pub struct ScopeDepInfo { struct ResolverFactoryServices { cli_resolver: Deferred>, in_npm_pkg_checker: Deferred>, + is_cjs_resolver: Deferred>, node_resolver: Deferred>>, npm_pkg_req_resolver: Deferred>>, npm_resolver: Option>, @@ -745,6 +756,23 @@ impl<'a> ResolverFactory<'a> { }) } + pub fn is_cjs_resolver(&self) -> &Arc { + self.services.is_cjs_resolver.get_or_init(|| { + Arc::new(IsCjsResolver::new( + self.in_npm_pkg_checker().clone(), + self.pkg_json_resolver().clone(), + if self + .config_data + .is_some_and(|d| d.unstable.contains("detect-cjs")) + { + IsCjsResolutionMode::ImplicitTypeCommonJs + } else { + IsCjsResolutionMode::ExplicitTypeCommonJs + }, + )) + }) + } + pub fn node_resolver(&self) -> Option<&Arc> { self .services @@ -804,84 +832,6 @@ impl std::fmt::Debug for RedirectResolver { } } -#[derive(Debug)] -pub struct LspIsCjsResolver { - inner: IsCjsResolver, -} - -impl Default for LspIsCjsResolver { - fn default() -> Self { - LspIsCjsResolver::new(&Default::default()) - } -} - -impl LspIsCjsResolver { - pub fn new(cache: &LspCache) -> Self { - #[derive(Debug)] - struct LspInNpmPackageChecker { - global_cache_dir: ModuleSpecifier, - } - - impl LspInNpmPackageChecker { - pub fn new(cache: &LspCache) -> Self { - let npm_folder_path = cache.deno_dir().npm_folder_path(); - Self { - global_cache_dir: url_from_directory_path( - &canonicalize_path_maybe_not_exists(&npm_folder_path) - .unwrap_or(npm_folder_path), - ) - .unwrap_or_else(|_| { - ModuleSpecifier::parse("file:///invalid/").unwrap() - }), - } - } - } - - impl InNpmPackageChecker for LspInNpmPackageChecker { - fn in_npm_package(&self, specifier: &ModuleSpecifier) -> bool { - if specifier.scheme() != "file" { - return false; - } - if specifier - .as_str() - .starts_with(self.global_cache_dir.as_str()) - { - return true; - } - specifier.as_str().contains("/node_modules/") - } - } - - let fs = Arc::new(deno_fs::RealFs); - let pkg_json_resolver = Arc::new(PackageJsonResolver::new( - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(fs.clone()), - )); - - LspIsCjsResolver { - inner: IsCjsResolver::new( - Arc::new(LspInNpmPackageChecker::new(cache)), - pkg_json_resolver, - crate::resolver::IsCjsResolverOptions { - detect_cjs: true, - is_node_main: false, - }, - ), - } - } - - pub fn get_doc_resolution_mode(&self, document: &Document) -> ResolutionMode { - self.get_lsp_resolution_mode(document.specifier(), document.is_script()) - } - - pub fn get_lsp_resolution_mode( - &self, - specifier: &ModuleSpecifier, - is_script: Option, - ) -> ResolutionMode { - self.inner.get_lsp_resolution_mode(specifier, is_script) - } -} - #[derive(Debug)] pub struct SingleReferrerGraphResolver<'a> { pub valid_referrer: &'a ModuleSpecifier, diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index cf0107acfd16ca..a8e2b91e775224 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4449,12 +4449,7 @@ fn op_load<'s>( version: state.script_version(&specifier), is_cjs: doc .document() - .map(|d| { - state - .state_snapshot - .is_cjs_resolver - .get_doc_resolution_mode(d) - }) + .map(|d| d.resolution_mode()) .unwrap_or(ResolutionMode::Import) == ResolutionMode::Require, }) @@ -4689,10 +4684,7 @@ fn op_script_names(state: &mut OpState) -> ScriptNames { let (types, _) = documents.resolve_dependency( types, specifier, - state - .state_snapshot - .is_cjs_resolver - .get_doc_resolution_mode(doc), + doc.resolution_mode(), doc.file_referrer(), )?; let types_doc = documents.get_or_load(&types, doc.file_referrer())?; @@ -5576,7 +5568,6 @@ mod tests { documents: Arc::new(documents), assets: Default::default(), config: Arc::new(config), - is_cjs_resolver: Default::default(), resolver, }); let performance = Arc::new(Performance::default()); diff --git a/cli/resolver.rs b/cli/resolver.rs index 7f6dc0b1ac537c..6f3351391fa33a 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -42,7 +42,6 @@ use crate::util::text_encoding::from_utf8_lossy_owned; pub type CjsTracker = deno_resolver::cjs::CjsTracker; pub type IsCjsResolver = deno_resolver::cjs::IsCjsResolver; -pub type IsCjsResolverOptions = deno_resolver::cjs::IsCjsResolverOptions; pub type CliSloppyImportsResolver = SloppyImportsResolver; pub type CliDenoResolver = deno_resolver::DenoResolver< diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index ccd773efbfdfd9..a64cb2ff655d42 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -554,6 +554,7 @@ "bare-node-builtins", "byonm", "cron", + "detect-cjs", "ffi", "fs", "fmt-component", diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 6f85266b05d5ae..b0623807ae8998 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -777,6 +777,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { unstable_config: UnstableConfig { legacy_flag_enabled: false, bare_node_builtins: self.cli_options.unstable_bare_node_builtins(), + detect_cjs: self.cli_options.unstable_detect_cjs(), sloppy_imports: self.cli_options.unstable_sloppy_imports(), features: self.cli_options.unstable_features(), }, diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 16aa4cde2b81ca..ed0ed762c9e48c 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -32,6 +32,7 @@ use deno_core::ResolutionKind; use deno_core::SourceCodeCacheInfo; use deno_npm::npm_rc::ResolvedNpmRc; use deno_package_json::PackageJsonDepValue; +use deno_resolver::cjs::IsCjsResolutionMode; use deno_resolver::npm::NpmReqResolverOptions; use deno_runtime::deno_fs; use deno_runtime::deno_node::create_host_defined_options; @@ -87,7 +88,6 @@ use crate::npm::CreateInNpmPkgCheckerOptions; use crate::resolver::CjsTracker; use crate::resolver::CliDenoResolverFs; use crate::resolver::CliNpmReqResolver; -use crate::resolver::IsCjsResolverOptions; use crate::resolver::NpmModuleLoader; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; @@ -731,9 +731,12 @@ pub async fn run(data: StandaloneData) -> Result { let cjs_tracker = Arc::new(CjsTracker::new( in_npm_pkg_checker.clone(), pkg_json_resolver.clone(), - IsCjsResolverOptions { - detect_cjs: !metadata.workspace_resolver.package_jsons.is_empty(), - is_node_main: false, + if metadata.unstable_config.detect_cjs { + IsCjsResolutionMode::ImplicitTypeCommonJs + } else if metadata.workspace_resolver.package_jsons.is_empty() { + IsCjsResolutionMode::Disabled + } else { + IsCjsResolutionMode::ExplicitTypeCommonJs }, )); let cache_db = Caches::new(deno_dir_provider.clone()); diff --git a/resolvers/deno/cjs.rs b/resolvers/deno/cjs.rs index e322036dfe01dc..9ae60b6a154cb8 100644 --- a/resolvers/deno/cjs.rs +++ b/resolvers/deno/cjs.rs @@ -26,13 +26,13 @@ impl CjsTracker { pub fn new( in_npm_pkg_checker: Arc, pkg_json_resolver: Arc>, - options: IsCjsResolverOptions, + mode: IsCjsResolutionMode, ) -> Self { Self { is_cjs_resolver: IsCjsResolver::new( in_npm_pkg_checker, pkg_json_resolver, - options, + mode, ), known: Default::default(), } @@ -114,10 +114,14 @@ impl CjsTracker { } } -#[derive(Debug)] -pub struct IsCjsResolverOptions { - pub detect_cjs: bool, - pub is_node_main: bool, +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum IsCjsResolutionMode { + /// Requires an explicit `"type": "commonjs"` in the package.json. + ExplicitTypeCommonJs, + /// Implicitly uses `"type": "commonjs"` if no `"type"` is specified. + ImplicitTypeCommonJs, + /// Does not respect `"type": "commonjs"` and always treats ambiguous files as ESM. + Disabled, } /// Resolves whether a module is CJS or ESM. @@ -125,19 +129,19 @@ pub struct IsCjsResolverOptions { pub struct IsCjsResolver { in_npm_pkg_checker: Arc, pkg_json_resolver: Arc>, - options: IsCjsResolverOptions, + mode: IsCjsResolutionMode, } impl IsCjsResolver { pub fn new( in_npm_pkg_checker: Arc, pkg_json_resolver: Arc>, - options: IsCjsResolverOptions, + mode: IsCjsResolutionMode, ) -> Self { Self { in_npm_pkg_checker, pkg_json_resolver, - options, + mode, } } @@ -249,18 +253,19 @@ impl IsCjsResolver { } else { Ok(ResolutionMode::Require) } - } else if self.options.detect_cjs || self.options.is_node_main { + } else if self.mode != IsCjsResolutionMode::Disabled { if let Some(pkg_json) = self.pkg_json_resolver.get_closest_package_json(specifier)? { let is_cjs_type = pkg_json.typ == "commonjs" - || self.options.is_node_main && pkg_json.typ == "none"; + || self.mode == IsCjsResolutionMode::ImplicitTypeCommonJs + && pkg_json.typ == "none"; Ok(if is_cjs_type { ResolutionMode::Require } else { ResolutionMode::Import }) - } else if self.options.is_node_main { + } else if self.mode == IsCjsResolutionMode::ImplicitTypeCommonJs { Ok(ResolutionMode::Require) } else { Ok(ResolutionMode::Import) diff --git a/runtime/fmt_errors.rs b/runtime/fmt_errors.rs index 6c05fbc6334fd2..6f120b5d4669bd 100644 --- a/runtime/fmt_errors.rs +++ b/runtime/fmt_errors.rs @@ -316,7 +316,8 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec { FixSuggestion::hint_multiline(&[ "Rewrite this module to ESM,", cstr!("or change the file extension to .cjs,"), - cstr!("or add package.json next to the file with \"type\": \"commonjs\" option."), + cstr!("or add package.json next to the file with \"type\": \"commonjs\" option,"), + cstr!("or pass --unstable-detect-cjs flag to detect CommonJS when loading."), ]), FixSuggestion::docs("https://docs.deno.com/go/commonjs"), ]; diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc b/tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc new file mode 100644 index 00000000000000..dde4f9a2c6b9a5 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --check --quiet --allow-read=. main.ts", + "output": "main.out" +} diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts b/tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts new file mode 100644 index 00000000000000..3b399665dc81da --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number) { + return a + b; +} diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json b/tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json new file mode 100644 index 00000000000000..b786cd6aeb8948 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json @@ -0,0 +1,3 @@ +{ + "unstable": ["detect-cjs"] +} diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out new file mode 100644 index 00000000000000..00750edc07d641 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out @@ -0,0 +1 @@ +3 diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts new file mode 100644 index 00000000000000..23ab21441bf61d --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts @@ -0,0 +1,3 @@ +import mod = require("./add.ts"); + +console.log(mod.add(1, 2)); diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc b/tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc new file mode 100644 index 00000000000000..9162484e8a5e57 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --unstable-detect-cjs --check --quiet --allow-read=. main.ts", + "output": "main.out" +} diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/add.ts b/tests/specs/node/unstable_detect_cjs/no_type_field/add.ts new file mode 100644 index 00000000000000..3b399665dc81da --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/add.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number) { + return a + b; +} diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/main.out b/tests/specs/node/unstable_detect_cjs/no_type_field/main.out new file mode 100644 index 00000000000000..00750edc07d641 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/main.out @@ -0,0 +1 @@ +3 diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/main.ts b/tests/specs/node/unstable_detect_cjs/no_type_field/main.ts new file mode 100644 index 00000000000000..23ab21441bf61d --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/main.ts @@ -0,0 +1,3 @@ +import mod = require("./add.ts"); + +console.log(mod.add(1, 2)); diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/package.json b/tests/specs/node/unstable_detect_cjs/no_type_field/package.json new file mode 100644 index 00000000000000..2c63c0851048d8 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/package.json @@ -0,0 +1,2 @@ +{ +} diff --git a/tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc b/tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc new file mode 100644 index 00000000000000..f95a6fc8ec77d2 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run --unstable-detect-cjs --quiet --allow-read=. main.ts", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/node/unstable_detect_cjs/type_module/add.ts b/tests/specs/node/unstable_detect_cjs/type_module/add.ts new file mode 100644 index 00000000000000..3b399665dc81da --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/add.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number) { + return a + b; +} diff --git a/tests/specs/node/unstable_detect_cjs/type_module/main.out b/tests/specs/node/unstable_detect_cjs/type_module/main.out new file mode 100644 index 00000000000000..6b9bcaa46b993c --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/main.out @@ -0,0 +1,4 @@ +error: Uncaught SyntaxError: Unexpected token '=' +import mod = require("./add.ts"); + ^ + at (file:///[WILDLINE]/main.ts:1:8) diff --git a/tests/specs/node/unstable_detect_cjs/type_module/main.ts b/tests/specs/node/unstable_detect_cjs/type_module/main.ts new file mode 100644 index 00000000000000..23ab21441bf61d --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/main.ts @@ -0,0 +1,3 @@ +import mod = require("./add.ts"); + +console.log(mod.add(1, 2)); diff --git a/tests/specs/node/unstable_detect_cjs/type_module/package.json b/tests/specs/node/unstable_detect_cjs/type_module/package.json new file mode 100644 index 00000000000000..3dbc1ca591c055 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/specs/run/import_common_js/exports_error.out b/tests/specs/run/import_common_js/exports_error.out index baa44682be52f6..b0bb7acebcc037 100644 --- a/tests/specs/run/import_common_js/exports_error.out +++ b/tests/specs/run/import_common_js/exports_error.out @@ -7,5 +7,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/import_common_js/module_error.out b/tests/specs/run/import_common_js/module_error.out index 957b19cb1e6857..c1e9802520b9e7 100644 --- a/tests/specs/run/import_common_js/module_error.out +++ b/tests/specs/run/import_common_js/module_error.out @@ -7,5 +7,6 @@ module.exports = { package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/import_common_js/require_error.out b/tests/specs/run/import_common_js/require_error.out index e13db85e8e85df..f89adf082d1621 100644 --- a/tests/specs/run/import_common_js/require_error.out +++ b/tests/specs/run/import_common_js/require_error.out @@ -7,5 +7,6 @@ const process = require("process"); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/npm_pkg_requires_esm_js/output.out b/tests/specs/run/npm_pkg_requires_esm_js/output.out index 2cae7108b073d8..59b34e5c9e40b6 100644 --- a/tests/specs/run/npm_pkg_requires_esm_js/output.out +++ b/tests/specs/run/npm_pkg_requires_esm_js/output.out @@ -8,5 +8,6 @@ console.log(require); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/package_json_type/commonjs/basic/main_mix.out b/tests/specs/run/package_json_type/commonjs/basic/main_mix.out index 65671fd618a9a2..a3c0cfc4d42bee 100644 --- a/tests/specs/run/package_json_type/commonjs/basic/main_mix.out +++ b/tests/specs/run/package_json_type/commonjs/basic/main_mix.out @@ -8,5 +8,6 @@ console.log(require("./add").add(1, 2)); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/package_json_type/none/main_cjs.out b/tests/specs/run/package_json_type/none/main_cjs.out index afa5028f4f814f..06511fed7396e4 100644 --- a/tests/specs/run/package_json_type/none/main_cjs.out +++ b/tests/specs/run/package_json_type/none/main_cjs.out @@ -7,5 +7,6 @@ const { add } = require("./add"); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs From e943c6a25d59dd3346a51add790db79a7b2230e4 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Wed, 27 Nov 2024 23:51:23 +0900 Subject: [PATCH 424/436] test(ext/node): enable parallel/test-fs-promises-file-handle-stat.js (#27074) --- tests/node_compat/config.jsonc | 1 + tests/node_compat/runner/TODO.md | 1 - .../test-fs-promises-file-handle-stat.js | 30 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index d163765daaf580..5acbd25dc35c91 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -338,6 +338,7 @@ "test-fs-open-numeric-flags.js", "test-fs-open.js", "test-fs-opendir.js", + "test-fs-promises-file-handle-stat.js", "test-fs-promises-writefile-with-fd.js", "test-fs-read-stream-autoClose.js", "test-fs-read-stream-concurrent-reads.js", diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index ef1f36840aff18..acd5ec45c42865 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -822,7 +822,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-fs-promises-file-handle-read-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read-worker.js) - [parallel/test-fs-promises-file-handle-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read.js) - [parallel/test-fs-promises-file-handle-readFile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-readFile.js) -- [parallel/test-fs-promises-file-handle-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stat.js) - [parallel/test-fs-promises-file-handle-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stream.js) - [parallel/test-fs-promises-file-handle-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-sync.js) - [parallel/test-fs-promises-file-handle-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-truncate.js) diff --git a/tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js b/tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js new file mode 100644 index 00000000000000..45315c10b2cf7a --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +// The following tests validate base functionality for the fs.promises +// FileHandle.stat method. + +const { open } = require('fs').promises; +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); + +tmpdir.refresh(); + +async function validateStat() { + const filePath = tmpdir.resolve('tmp-read-file.txt'); + const fileHandle = await open(filePath, 'w+'); + const stats = await fileHandle.stat(); + assert.ok(stats.mtime instanceof Date); + await fileHandle.close(); +} + +validateStat() + .then(common.mustCall()); From 93adf37bdfe43452f9b6dc9b7e5ecc359649cef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 27 Nov 2024 15:54:15 +0000 Subject: [PATCH 425/436] fix(task): strip ansi codes and control chars when printing tasks (#27100) --- cli/tools/task.rs | 35 +++++++++++++++++-- tests/integration/task_tests.rs | 59 +++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 3 deletions(-) diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 1b83422ba93193..4752738c527a8c 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -8,6 +8,7 @@ use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; +use console_static_text::ansi::strip_ansi_codes; use deno_config::workspace::FolderConfigs; use deno_config::workspace::TaskDefinition; use deno_config::workspace::TaskOrScript; @@ -722,19 +723,47 @@ fn print_available_tasks( if let Some(description) = &desc.task.description { let slash_slash = colors::italic_gray("//"); for line in description.lines() { - writeln!(writer, " {slash_slash} {}", colors::italic_gray(line))?; + writeln!( + writer, + " {slash_slash} {}", + colors::italic_gray(strip_ansi_codes_and_escape_control_chars(line)) + )?; } } - writeln!(writer, " {}", desc.task.command)?; + writeln!( + writer, + " {}", + strip_ansi_codes_and_escape_control_chars(&desc.task.command) + )?; if !desc.task.dependencies.is_empty() { + let dependencies = desc + .task + .dependencies + .into_iter() + .map(|d| strip_ansi_codes_and_escape_control_chars(&d)) + .collect::>() + .join(", "); writeln!( writer, " {} {}", colors::gray("depends on:"), - colors::cyan(desc.task.dependencies.join(", ")) + colors::cyan(dependencies) )?; } } Ok(()) } + +fn strip_ansi_codes_and_escape_control_chars(s: &str) -> String { + strip_ansi_codes(s) + .chars() + .map(|c| match c { + '\n' => "\\n".to_string(), + '\r' => "\\r".to_string(), + '\t' => "\\t".to_string(), + c if c.is_control() => format!("\\x{:02x}", c as u8), + c => c.to_string(), + }) + .collect() +} diff --git a/tests/integration/task_tests.rs b/tests/integration/task_tests.rs index 56bab2970d051b..f2e901228abd1c 100644 --- a/tests/integration/task_tests.rs +++ b/tests/integration/task_tests.rs @@ -3,6 +3,9 @@ // Most of the tests for this are in deno_task_shell. // These tests are intended to only test integration. +use test_util as util; +use util::TestContextBuilder; + // use test_util::env_vars_for_npm_tests; // use test_util::itest; // use test_util::TestContext; @@ -28,3 +31,59 @@ // exit_code: 1, // http_server: true, // }); + +#[test] +fn deno_task_ansi_escape_codes() { + let context = TestContextBuilder::default().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + temp_dir.write("deno.json", r#"{ + "tasks": { + "dev": "echo 'BOOO!!!'", + "next": "\u001b[3F\u001b[0G- dev\u001b[1E\u001b[2K echo 'I am your friend.'" + } +} +"#); + + context + .new_command() + .args_vec(["task"]) + .with_pty(|mut console| { + console.expect("Available tasks:"); + console.expect("- dev"); + console.expect(" echo 'BOOO!!!'"); + console.expect("- next"); + console.expect(" - dev echo 'I am your friend.'"); + }); +} + +#[test] +fn deno_task_control_chars() { + let context = TestContextBuilder::default().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + temp_dir.write( + "deno.json", + r#"{ + "tasks": { + "dev": "echo 'BOOO!!!' && \r echo hi there is my command", + "serve": { + "description": "this is a\tm\rangled description", + "command": "echo hello" + } + } +} +"#, + ); + + context + .new_command() + .args_vec(["task"]) + .with_pty(|mut console| { + console.expect("Available tasks:"); + console.expect("- dev"); + console + .expect(" echo 'BOOO!!!' && \\r echo hi there is my command"); + console.expect("- serve"); + console.expect(" // this is a\\tm\\rangled description"); + console.expect(" echo hello"); + }); +} From 9bc36aa79b849ceb2a735a870fa1b977690c821a Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Wed, 27 Nov 2024 17:56:13 +0100 Subject: [PATCH 426/436] fix(node/http): casing ignored in ServerResponse.hasHeader() (#27105) We didn't respect casing when checking if a HTTP header is present in Node's `ServerResponse.hasHeader()`. This lead to us returning incorrect results when the header was present. Koa assumed that the `Content-Type` header wasn't present when it actually was and defaulted to a different `Content-Type` value. Fixes https://github.com/denoland/deno/issues/27101 --- ext/node/polyfills/http.ts | 2 +- tests/unit_node/http_test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index 9a920adeee72a0..948a3527bdc8f0 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -1409,7 +1409,7 @@ ServerResponse.prototype.hasHeader = function ( this: ServerResponse, name: string, ) { - return Object.hasOwn(this._headers, name); + return Object.hasOwn(this._headers, StringPrototypeToLowerCase(name)); }; ServerResponse.prototype.writeHead = function ( diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts index 2b3b8f509f6800..31ac6bee25e88b 100644 --- a/tests/unit_node/http_test.ts +++ b/tests/unit_node/http_test.ts @@ -1151,6 +1151,7 @@ Deno.test("[node/http] ServerResponse header names case insensitive", async () = const { promise, resolve } = Promise.withResolvers(); const server = http.createServer((_req, res) => { res.setHeader("Content-Length", "12345"); + assert(res.hasHeader("Content-Length")); res.removeHeader("content-length"); assertEquals(res.getHeader("Content-Length"), undefined); assert(!res.hasHeader("Content-Length")); From 6fb0e10252746b4eee3b3328a5990d59b81850ac Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 27 Nov 2024 12:20:20 -0500 Subject: [PATCH 427/436] chore: fix lint step due to node compat test changes (#27111) Seems due to merging this: https://github.com/denoland/deno/actions/runs/12052779514/job/33606893423 --- tests/node_compat/runner/TODO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index acd5ec45c42865..116226d8a01acd 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1,7 +1,7 @@ # Remaining Node Tests -594 tests out of 3681 have been ported from Node 20.11.1 (16.14% ported, 83.97% remaining). +595 tests out of 3681 have been ported from Node 20.11.1 (16.16% ported, 83.94% remaining). NOTE: This file should not be manually edited. Please edit `tests/node_compat/config.json` and run `deno task setup` in `tests/node_compat/runner` dir instead. From 16e16690af5323a0c125e98aa25e92f5bb47c2f2 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Wed, 27 Nov 2024 10:31:15 -0800 Subject: [PATCH 428/436] fix(ext/webgpu): use correct variable name (#27108) --- ext/webgpu/01_webgpu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index e9dd6c203e161b..d371f49ea10530 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -620,7 +620,7 @@ function createGPUSupportedLimits(limits) { } function normalizeLimit(limit) { - if (typeof num === "bigint") { + if (typeof limit === "bigint") { limit = Number(limit); if (limit === NumberPOSITIVE_INFINITY) { limit = NumberMAX_SAFE_INTEGER; From 76daa03aa904eac3e61b13d813bda60a1a9da422 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:54:26 -0800 Subject: [PATCH 429/436] fix(info): resolve bare specifier pointing to workspace member (#27020) Fixes https://github.com/denoland/deno/issues/26721 Previously, we were applying only the import map, which would result in `@scope/foo` expanding to (e.g.) `jsr:@scope/foo@1.0.0`. Since that didn't exist it would error and fail to resolve. --- cli/tools/info.rs | 62 ++++++++++++++++--- .../__test__.jsonc | 22 +++++-- .../info_bare.out | 4 ++ .../info/workspace_member/__test__.jsonc | 12 ++++ tests/specs/info/workspace_member/deno.json | 2 +- .../workspace_member/info_bare_specifier.out | 6 ++ .../info_bare_specifier_package_json.out | 6 ++ ...fo_bare_specifier_package_json_subpath.out | 6 ++ .../info/workspace_member/member/deno.json | 2 + .../specs/info/workspace_member/member/mod.ts | 3 + .../info/workspace_member/member2/deno.json | 1 + .../info/workspace_member/member3/bar.ts | 0 .../info/workspace_member/member3/mod.ts | 0 .../workspace_member/member3/package.json | 7 +++ 14 files changed, 120 insertions(+), 13 deletions(-) create mode 100644 tests/specs/info/package_json_basic_auto_install/info_bare.out create mode 100644 tests/specs/info/workspace_member/info_bare_specifier.out create mode 100644 tests/specs/info/workspace_member/info_bare_specifier_package_json.out create mode 100644 tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out create mode 100644 tests/specs/info/workspace_member/member/mod.ts create mode 100644 tests/specs/info/workspace_member/member2/deno.json create mode 100644 tests/specs/info/workspace_member/member3/bar.ts create mode 100644 tests/specs/info/workspace_member/member3/mod.ts create mode 100644 tests/specs/info/workspace_member/member3/package.json diff --git a/cli/tools/info.rs b/cli/tools/info.rs index fcc9fdcfa1f6dc..f0cd37772d0e29 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -49,19 +49,67 @@ pub async fn info( let module_graph_creator = factory.module_graph_creator().await?; let npm_resolver = factory.npm_resolver().await?; let maybe_lockfile = cli_options.maybe_lockfile(); + let resolver = factory.workspace_resolver().await?.clone(); let npmrc = cli_options.npmrc(); - let resolver = factory.workspace_resolver().await?; + let node_resolver = factory.node_resolver().await?; let cwd_url = url::Url::from_directory_path(cli_options.initial_cwd()).unwrap(); - let maybe_import_specifier = if let Some(import_map) = - resolver.maybe_import_map() + let maybe_import_specifier = if let Ok(resolved) = + resolver.resolve(&specifier, &cwd_url) { - if let Ok(imports_specifier) = import_map.resolve(&specifier, &cwd_url) { - Some(imports_specifier) - } else { - None + match resolved { + deno_config::workspace::MappedResolution::Normal { + specifier, .. + } + | deno_config::workspace::MappedResolution::ImportMap { + specifier, + .. + } + | deno_config::workspace::MappedResolution::WorkspaceJsrPackage { + specifier, + .. + } => Some(specifier), + deno_config::workspace::MappedResolution::WorkspaceNpmPackage { + target_pkg_json, + sub_path, + .. + } => Some(node_resolver.resolve_package_subpath_from_deno_module( + target_pkg_json.clone().dir_path(), + sub_path.as_deref(), + Some(&cwd_url), + node_resolver::ResolutionMode::Import, + node_resolver::NodeResolutionKind::Execution, + )?), + deno_config::workspace::MappedResolution::PackageJson { + alias, + sub_path, + dep_result, + .. + } => match dep_result.as_ref().map_err(|e| e.clone())? { + deno_package_json::PackageJsonDepValue::Workspace(version_req) => { + let pkg_folder = resolver + .resolve_workspace_pkg_json_folder_for_pkg_json_dep( + alias, + version_req, + )?; + Some(node_resolver.resolve_package_subpath_from_deno_module( + pkg_folder, + sub_path.as_deref(), + Some(&cwd_url), + node_resolver::ResolutionMode::Import, + node_resolver::NodeResolutionKind::Execution, + )?) + } + deno_package_json::PackageJsonDepValue::Req(req) => { + Some(ModuleSpecifier::parse(&format!( + "npm:{}{}", + req, + sub_path.map(|s| format!("/{}", s)).unwrap_or_default() + ))?) + } + }, } } else { None diff --git a/tests/specs/info/package_json_basic_auto_install/__test__.jsonc b/tests/specs/info/package_json_basic_auto_install/__test__.jsonc index a98f89e91318c7..4b5b9fb1a83bdc 100644 --- a/tests/specs/info/package_json_basic_auto_install/__test__.jsonc +++ b/tests/specs/info/package_json_basic_auto_install/__test__.jsonc @@ -1,9 +1,21 @@ { "tempDir": true, - "steps": [ - { - "args": "info --quiet main.ts", - "output": "info.out" + "tests": { + "resolves_npm_deps": { + "steps": [ + { + "args": "info --quiet main.ts", + "output": "info.out" + } + ] + }, + "bare_specifier": { + "steps": [ + { + "args": "info --quiet @denotest/esm-basic", + "output": "info_bare.out" + } + ] } - ] + } } diff --git a/tests/specs/info/package_json_basic_auto_install/info_bare.out b/tests/specs/info/package_json_basic_auto_install/info_bare.out new file mode 100644 index 00000000000000..4269e054136a68 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/info_bare.out @@ -0,0 +1,4 @@ +dependencies: 0 unique +size: 471B + +npm:/@denotest/esm-basic@1.0.0 (471B) diff --git a/tests/specs/info/workspace_member/__test__.jsonc b/tests/specs/info/workspace_member/__test__.jsonc index d13d3b03e80908..b62b3a3a596ef6 100644 --- a/tests/specs/info/workspace_member/__test__.jsonc +++ b/tests/specs/info/workspace_member/__test__.jsonc @@ -11,6 +11,18 @@ "cwd": "member/sub", "output": "info_workspace_member_sub.out", "exitCode": 0 + }, + "member_bare_specifier": { + "args": "info @denotest/workspace-member", + "output": "info_bare_specifier.out" + }, + "member_package_json_specifier": { + "args": "info @denotest/workspace-member-package-json", + "output": "info_bare_specifier_package_json.out" + }, + "member_package_json_specifier_subpath": { + "args": "info @denotest/workspace-member-package-json/foo", + "output": "info_bare_specifier_package_json_subpath.out" } } } diff --git a/tests/specs/info/workspace_member/deno.json b/tests/specs/info/workspace_member/deno.json index f88028aeab0b71..dc8a3f4ba562cc 100644 --- a/tests/specs/info/workspace_member/deno.json +++ b/tests/specs/info/workspace_member/deno.json @@ -1,3 +1,3 @@ { - "workspace": ["./member"] + "workspace": ["./member", "./member2", "./member3"] } diff --git a/tests/specs/info/workspace_member/info_bare_specifier.out b/tests/specs/info/workspace_member/info_bare_specifier.out new file mode 100644 index 00000000000000..e446407d506ffe --- /dev/null +++ b/tests/specs/info/workspace_member/info_bare_specifier.out @@ -0,0 +1,6 @@ +local: [WILDCARD]mod.ts +type: TypeScript +dependencies: 0 unique +size: [WILDCARD] + +file://[WILDCARD]member/mod.ts ([WILDCARD]) diff --git a/tests/specs/info/workspace_member/info_bare_specifier_package_json.out b/tests/specs/info/workspace_member/info_bare_specifier_package_json.out new file mode 100644 index 00000000000000..846305e4bb1c6b --- /dev/null +++ b/tests/specs/info/workspace_member/info_bare_specifier_package_json.out @@ -0,0 +1,6 @@ +local: [WILDCARD]mod.ts +type: TypeScript +dependencies: 0 unique +size: [WILDCARD] + +file://[WILDCARD]member3/mod.ts ([WILDCARD]) diff --git a/tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out b/tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out new file mode 100644 index 00000000000000..89c1a13b530e60 --- /dev/null +++ b/tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out @@ -0,0 +1,6 @@ +local: [WILDCARD]bar.ts +type: TypeScript +dependencies: 0 unique +size: [WILDCARD] + +file://[WILDCARD]member3/bar.ts ([WILDCARD]) diff --git a/tests/specs/info/workspace_member/member/deno.json b/tests/specs/info/workspace_member/member/deno.json index 66aac290469038..5b8d7202a54870 100644 --- a/tests/specs/info/workspace_member/member/deno.json +++ b/tests/specs/info/workspace_member/member/deno.json @@ -1,4 +1,6 @@ { + "name": "@denotest/workspace-member", + "exports": "./mod.ts", "imports": { "foo": "./sub/file.ts" } diff --git a/tests/specs/info/workspace_member/member/mod.ts b/tests/specs/info/workspace_member/member/mod.ts new file mode 100644 index 00000000000000..e415f2ed64a54d --- /dev/null +++ b/tests/specs/info/workspace_member/member/mod.ts @@ -0,0 +1,3 @@ +export function hi() { + console.log("hi"); +} diff --git a/tests/specs/info/workspace_member/member2/deno.json b/tests/specs/info/workspace_member/member2/deno.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/tests/specs/info/workspace_member/member2/deno.json @@ -0,0 +1 @@ +{} diff --git a/tests/specs/info/workspace_member/member3/bar.ts b/tests/specs/info/workspace_member/member3/bar.ts new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/info/workspace_member/member3/mod.ts b/tests/specs/info/workspace_member/member3/mod.ts new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/info/workspace_member/member3/package.json b/tests/specs/info/workspace_member/member3/package.json new file mode 100644 index 00000000000000..7a4ddf9dd3e43b --- /dev/null +++ b/tests/specs/info/workspace_member/member3/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/workspace-member-package-json", + "exports": { + ".": "./mod.ts", + "./foo": "./bar.ts" + } +} From f161adf19e3ba0436ed18fcdbba81fbb360a6fb1 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 27 Nov 2024 21:28:41 -0500 Subject: [PATCH 430/436] perf(compile): read embedded files as static references when UTF-8 and reading as strings (#27033) --- cli/args/deno_json.rs | 2 ++ cli/cache/mod.rs | 2 ++ cli/module_loader.rs | 26 ++++++++------ cli/node.rs | 2 +- cli/resolver.rs | 16 ++++++--- cli/standalone/binary.rs | 7 ++-- cli/standalone/mod.rs | 5 +-- cli/standalone/virtual_fs.rs | 11 +++--- cli/util/text_encoding.rs | 9 +++++ ext/fs/in_memory_fs.rs | 7 ++-- ext/fs/interface.rs | 21 +++++++---- ext/fs/lib.rs | 1 + ext/fs/ops.rs | 68 +++++++++++++++++++++++++++++++----- ext/fs/std_fs.rs | 9 ++--- ext/io/fs.rs | 4 +-- ext/io/lib.rs | 8 ++--- ext/node/lib.rs | 9 ++++- ext/node/ops/require.rs | 6 ++-- resolvers/deno/fs.rs | 6 +++- 19 files changed, 158 insertions(+), 61 deletions(-) diff --git a/cli/args/deno_json.rs b/cli/args/deno_json.rs index a82289e67d3875..3e6eb617a60885 100644 --- a/cli/args/deno_json.rs +++ b/cli/args/deno_json.rs @@ -22,6 +22,8 @@ impl<'a> deno_config::fs::DenoConfigFs for DenoConfigFsAdapter<'a> { self .0 .read_text_file_lossy_sync(path, None) + // todo(https://github.com/denoland/deno_config/pull/140): avoid clone + .map(|s| s.into_owned()) .map_err(|err| err.into_io_error()) } diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 50fc135ddffcd3..73a3895a10205f 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -116,6 +116,8 @@ impl<'a> deno_cache_dir::DenoCacheEnv for DenoCacheEnvFsAdapter<'a> { self .0 .read_file_sync(path, None) + // todo(https://github.com/denoland/deno_cache_dir/pull/66): avoid clone + .map(|bytes| bytes.into_owned()) .map_err(|err| err.into_io_error()) } diff --git a/cli/module_loader.rs b/cli/module_loader.rs index 3d2dfb2a666bfa..447c85a9ac573f 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -1060,7 +1060,10 @@ impl NodeRequireLoader self.npm_resolver.ensure_read_permission(permissions, path) } - fn load_text_file_lossy(&self, path: &Path) -> Result { + fn load_text_file_lossy( + &self, + path: &Path, + ) -> Result, AnyError> { // todo(dsherret): use the preloaded module from the graph if available? let media_type = MediaType::from_path(path); let text = self.fs.read_text_file_lossy_sync(path, None)?; @@ -1075,15 +1078,18 @@ impl NodeRequireLoader .into(), ); } - self.emitter.emit_parsed_source_sync( - &specifier, - media_type, - // this is probably not super accurate due to require esm, but probably ok. - // If we find this causes a lot of churn in the emit cache then we should - // investigate how we can make this better - ModuleKind::Cjs, - &text.into(), - ) + self + .emitter + .emit_parsed_source_sync( + &specifier, + media_type, + // this is probably not super accurate due to require esm, but probably ok. + // If we find this causes a lot of churn in the emit cache then we should + // investigate how we can make this better + ModuleKind::Cjs, + &text.into(), + ) + .map(Cow::Owned) } else { Ok(text) } diff --git a/cli/node.rs b/cli/node.rs index bc39cdbde9bb53..11959df6b9ba3c 100644 --- a/cli/node.rs +++ b/cli/node.rs @@ -160,7 +160,7 @@ impl CjsCodeAnalyzer for CliCjsCodeAnalyzer { if let Ok(source_from_file) = self.fs.read_text_file_lossy_async(path, None).await { - Cow::Owned(source_from_file) + source_from_file } else { return Ok(ExtNodeCjsAnalysis::Cjs(CjsAnalysisExports { exports: vec![], diff --git a/cli/resolver.rs b/cli/resolver.rs index 6f3351391fa33a..15ca4aa2b6ca21 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -37,7 +37,7 @@ use crate::node::CliNodeCodeTranslator; use crate::npm::CliNpmResolver; use crate::npm::InnerCliNpmResolverRef; use crate::util::sync::AtomicFlag; -use crate::util::text_encoding::from_utf8_lossy_owned; +use crate::util::text_encoding::from_utf8_lossy_cow; pub type CjsTracker = deno_resolver::cjs::CjsTracker; pub type IsCjsResolver = @@ -62,7 +62,10 @@ pub struct ModuleCodeStringSource { pub struct CliDenoResolverFs(pub Arc); impl deno_resolver::fs::DenoResolverFs for CliDenoResolverFs { - fn read_to_string_lossy(&self, path: &Path) -> std::io::Result { + fn read_to_string_lossy( + &self, + path: &Path, + ) -> std::io::Result> { self .0 .read_text_file_lossy_sync(path, None) @@ -182,18 +185,21 @@ impl NpmModuleLoader { let code = if self.cjs_tracker.is_maybe_cjs(specifier, media_type)? { // translate cjs to esm if it's cjs and inject node globals - let code = from_utf8_lossy_owned(code); + let code = from_utf8_lossy_cow(code); ModuleSourceCode::String( self .node_code_translator - .translate_cjs_to_esm(specifier, Some(Cow::Owned(code))) + .translate_cjs_to_esm(specifier, Some(code)) .await? .into_owned() .into(), ) } else { // esm and json code is untouched - ModuleSourceCode::Bytes(code.into_boxed_slice().into()) + ModuleSourceCode::Bytes(match code { + Cow::Owned(bytes) => bytes.into_boxed_slice().into(), + Cow::Borrowed(bytes) => bytes.into(), + }) }; Ok(ModuleCodeStringSource { diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index b0623807ae8998..632f27da6fdfca 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -282,14 +282,13 @@ impl StandaloneModules { .vfs .read_file_all(entry, VfsFileSubDataKind::ModuleGraph)?, Err(err) if err.kind() == ErrorKind::NotFound => { - let bytes = match RealFs.read_file_sync(&path, None) { + match RealFs.read_file_sync(&path, None) { Ok(bytes) => bytes, Err(FsError::Io(err)) if err.kind() == ErrorKind::NotFound => { return Ok(None) } Err(err) => return Err(err.into()), - }; - Cow::Owned(bytes) + } } Err(err) => return Err(err.into()), }; @@ -694,7 +693,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { &file_path, match maybe_source { Some(source) => source, - None => RealFs.read_file_sync(&file_path, None)?, + None => RealFs.read_file_sync(&file_path, None)?.into_owned(), }, VfsFileSubDataKind::ModuleGraph, ) diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index ed0ed762c9e48c..53efab2964da46 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -91,6 +91,7 @@ use crate::resolver::CliNpmReqResolver; use crate::resolver::NpmModuleLoader; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; +use crate::util::text_encoding::from_utf8_lossy_cow; use crate::util::v8::construct_v8_flags; use crate::worker::CliCodeCache; use crate::worker::CliMainWorkerFactory; @@ -516,13 +517,13 @@ impl NodeRequireLoader for EmbeddedModuleLoader { fn load_text_file_lossy( &self, path: &std::path::Path, - ) -> Result { + ) -> Result, AnyError> { let file_entry = self.shared.vfs.file_entry(path)?; let file_bytes = self .shared .vfs .read_file_all(file_entry, VfsFileSubDataKind::ModuleGraph)?; - Ok(String::from_utf8(file_bytes.into_owned())?) + Ok(from_utf8_lossy_cow(file_bytes)) } fn is_maybe_cjs( diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index b630f629c5a8f0..66fc835534436d 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -743,15 +743,12 @@ impl deno_io::fs::File for FileBackedVfsFile { Err(FsError::NotSupported) } - fn read_all_sync(self: Rc) -> FsResult> { - self.read_to_end().map(|bytes| bytes.into_owned()) + fn read_all_sync(self: Rc) -> FsResult> { + self.read_to_end() } - async fn read_all_async(self: Rc) -> FsResult> { + async fn read_all_async(self: Rc) -> FsResult> { let inner = (*self).clone(); - tokio::task::spawn_blocking(move || { - inner.read_to_end().map(|bytes| bytes.into_owned()) - }) - .await? + tokio::task::spawn_blocking(move || inner.read_to_end()).await? } fn chmod_sync(self: Rc, _pathmode: u32) -> FsResult<()> { diff --git a/cli/util/text_encoding.rs b/cli/util/text_encoding.rs index 8524e63ebb32c2..06b311e1501838 100644 --- a/cli/util/text_encoding.rs +++ b/cli/util/text_encoding.rs @@ -11,6 +11,15 @@ use deno_core::ModuleSourceCode; static SOURCE_MAP_PREFIX: &[u8] = b"//# sourceMappingURL=data:application/json;base64,"; +#[inline(always)] +pub fn from_utf8_lossy_cow(bytes: Cow<[u8]>) -> Cow { + match bytes { + Cow::Borrowed(bytes) => String::from_utf8_lossy(bytes), + Cow::Owned(bytes) => Cow::Owned(from_utf8_lossy_owned(bytes)), + } +} + +#[inline(always)] pub fn from_utf8_lossy_owned(bytes: Vec) -> String { match String::from_utf8_lossy(&bytes) { Cow::Owned(code) => code, diff --git a/ext/fs/in_memory_fs.rs b/ext/fs/in_memory_fs.rs index 34b77836d93952..b79b0ae984d47e 100644 --- a/ext/fs/in_memory_fs.rs +++ b/ext/fs/in_memory_fs.rs @@ -3,6 +3,7 @@ // Allow using Arc for this module. #![allow(clippy::disallowed_types)] +use std::borrow::Cow; use std::collections::hash_map::Entry; use std::collections::HashMap; use std::io::Error; @@ -457,11 +458,11 @@ impl FileSystem for InMemoryFs { &self, path: &Path, _access_check: Option, - ) -> FsResult> { + ) -> FsResult> { let entry = self.get_entry(path); match entry { Some(entry) => match &*entry { - PathEntry::File(data) => Ok(data.clone()), + PathEntry::File(data) => Ok(Cow::Owned(data.clone())), PathEntry::Dir => Err(FsError::Io(Error::new( ErrorKind::InvalidInput, "Is a directory", @@ -474,7 +475,7 @@ impl FileSystem for InMemoryFs { &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult> { + ) -> FsResult> { self.read_file_sync(&path, access_check) } } diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs index 73333b0fd19df9..28a49c5d9b887a 100644 --- a/ext/fs/interface.rs +++ b/ext/fs/interface.rs @@ -1,5 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use core::str; use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; @@ -288,7 +289,7 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { &self, path: &Path, access_check: Option, - ) -> FsResult> { + ) -> FsResult> { let options = OpenOptions::read(); let file = self.open_sync(path, options, access_check)?; let buf = file.read_all_sync()?; @@ -298,7 +299,7 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult> { + ) -> FsResult> { let options = OpenOptions::read(); let file = self.open_async(path, options, access_check).await?; let buf = file.read_all_async().await?; @@ -327,17 +328,25 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { &self, path: &Path, access_check: Option, - ) -> FsResult { + ) -> FsResult> { let buf = self.read_file_sync(path, access_check)?; - Ok(string_from_utf8_lossy(buf)) + Ok(string_from_cow_utf8_lossy(buf)) } async fn read_text_file_lossy_async<'a>( &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult { + ) -> FsResult> { let buf = self.read_file_async(path, access_check).await?; - Ok(string_from_utf8_lossy(buf)) + Ok(string_from_cow_utf8_lossy(buf)) + } +} + +#[inline(always)] +fn string_from_cow_utf8_lossy(buf: Cow<'static, [u8]>) -> Cow<'static, str> { + match buf { + Cow::Owned(buf) => Cow::Owned(string_from_utf8_lossy(buf)), + Cow::Borrowed(buf) => String::from_utf8_lossy(buf), } } diff --git a/ext/fs/lib.rs b/ext/fs/lib.rs index aed9a7085fc995..26fac1e79f5b02 100644 --- a/ext/fs/lib.rs +++ b/ext/fs/lib.rs @@ -17,6 +17,7 @@ pub use crate::interface::OpenOptions; pub use crate::ops::FsOpsError; pub use crate::ops::FsOpsErrorKind; pub use crate::ops::OperationError; +pub use crate::ops::V8MaybeStaticStr; pub use crate::std_fs::RealFs; pub use crate::sync::MaybeSend; pub use crate::sync::MaybeSync; diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index 7a9778c485c958..5e64585e0c051e 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -1,5 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use std::borrow::Cow; use std::cell::RefCell; use std::error::Error; use std::fmt::Formatter; @@ -18,12 +19,15 @@ use crate::FsPermissions; use crate::OpenOptions; use boxed_error::Boxed; use deno_core::op2; +use deno_core::v8; use deno_core::CancelFuture; use deno_core::CancelHandle; +use deno_core::FastString; use deno_core::JsBuffer; use deno_core::OpState; use deno_core::ResourceId; use deno_core::ToJsBuffer; +use deno_core::ToV8; use deno_io::fs::FileResource; use deno_io::fs::FsError; use deno_io::fs::FsStat; @@ -1333,7 +1337,8 @@ where .read_file_sync(&path, Some(&mut access_check)) .map_err(|error| map_permission_error("readfile", error, &path))?; - Ok(buf.into()) + // todo(https://github.com/denoland/deno/issues/27107): do not clone here + Ok(buf.into_owned().into_boxed_slice().into()) } #[op2(async, stack_trace)] @@ -1375,15 +1380,61 @@ where .map_err(|error| map_permission_error("readfile", error, &path))? }; - Ok(buf.into()) + // todo(https://github.com/denoland/deno/issues/27107): do not clone here + Ok(buf.into_owned().into_boxed_slice().into()) +} + +// todo(https://github.com/denoland/deno_core/pull/986): remove +// when upgrading deno_core +#[derive(Debug)] +pub struct FastStringV8AllocationError; + +impl std::error::Error for FastStringV8AllocationError {} + +impl std::fmt::Display for FastStringV8AllocationError { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!( + f, + "failed to allocate string; buffer exceeds maximum length" + ) + } +} + +/// Maintains a static reference to the string if possible. +pub struct V8MaybeStaticStr(pub Cow<'static, str>); + +impl<'s> ToV8<'s> for V8MaybeStaticStr { + type Error = FastStringV8AllocationError; + + #[inline] + fn to_v8( + self, + scope: &mut v8::HandleScope<'s>, + ) -> Result, Self::Error> { + // todo(https://github.com/denoland/deno_core/pull/986): remove this check + // when upgrading deno_core + const MAX_V8_STRING_LENGTH: usize = 536870888; + if self.0.len() > MAX_V8_STRING_LENGTH { + return Err(FastStringV8AllocationError); + } + + Ok( + match self.0 { + Cow::Borrowed(text) => FastString::from_static(text), + Cow::Owned(value) => value.into(), + } + .v8_string(scope) + .into(), + ) + } } #[op2(stack_trace)] -#[string] +#[to_v8] pub fn op_fs_read_file_text_sync

( state: &mut OpState, #[string] path: String, -) -> Result +) -> Result where P: FsPermissions + 'static, { @@ -1395,17 +1446,16 @@ where let str = fs .read_text_file_lossy_sync(&path, Some(&mut access_check)) .map_err(|error| map_permission_error("readfile", error, &path))?; - - Ok(str) + Ok(V8MaybeStaticStr(str)) } #[op2(async, stack_trace)] -#[string] +#[to_v8] pub async fn op_fs_read_file_text_async

( state: Rc>, #[string] path: String, #[smi] cancel_rid: Option, -) -> Result +) -> Result where P: FsPermissions + 'static, { @@ -1439,7 +1489,7 @@ where .map_err(|error| map_permission_error("readfile", error, &path))? }; - Ok(str) + Ok(V8MaybeStaticStr(str)) } fn to_seek_from(offset: i64, whence: i32) -> Result { diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index 73439d9bab7897..86ad2131601bab 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -2,6 +2,7 @@ #![allow(clippy::disallowed_methods)] +use std::borrow::Cow; use std::env::current_dir; use std::fs; use std::io; @@ -371,7 +372,7 @@ impl FileSystem for RealFs { &self, path: &Path, access_check: Option, - ) -> FsResult> { + ) -> FsResult> { let mut file = open_with_access_check( OpenOptions { read: true, @@ -382,13 +383,13 @@ impl FileSystem for RealFs { )?; let mut buf = Vec::new(); file.read_to_end(&mut buf)?; - Ok(buf) + Ok(Cow::Owned(buf)) } async fn read_file_async<'a>( &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult> { + ) -> FsResult> { let mut file = open_with_access_check( OpenOptions { read: true, @@ -400,7 +401,7 @@ impl FileSystem for RealFs { spawn_blocking(move || { let mut buf = Vec::new(); file.read_to_end(&mut buf)?; - Ok::<_, FsError>(buf) + Ok::<_, FsError>(Cow::Owned(buf)) }) .await? .map_err(Into::into) diff --git a/ext/io/fs.rs b/ext/io/fs.rs index 7ef02315baa49c..bd5dfd0bb98a64 100644 --- a/ext/io/fs.rs +++ b/ext/io/fs.rs @@ -215,8 +215,8 @@ pub trait File { fn write_all_sync(self: Rc, buf: &[u8]) -> FsResult<()>; async fn write_all(self: Rc, buf: BufView) -> FsResult<()>; - fn read_all_sync(self: Rc) -> FsResult>; - async fn read_all_async(self: Rc) -> FsResult>; + fn read_all_sync(self: Rc) -> FsResult>; + async fn read_all_async(self: Rc) -> FsResult>; fn chmod_sync(self: Rc, pathmode: u32) -> FsResult<()>; async fn chmod_async(self: Rc, mode: u32) -> FsResult<()>; diff --git a/ext/io/lib.rs b/ext/io/lib.rs index 5d183aa464d885..873fccd7b89871 100644 --- a/ext/io/lib.rs +++ b/ext/io/lib.rs @@ -789,26 +789,26 @@ impl crate::fs::File for StdFileResourceInner { } } - fn read_all_sync(self: Rc) -> FsResult> { + fn read_all_sync(self: Rc) -> FsResult> { match self.kind { StdFileResourceKind::File | StdFileResourceKind::Stdin(_) => { let mut buf = Vec::new(); self.with_sync(|file| Ok(file.read_to_end(&mut buf)?))?; - Ok(buf) + Ok(Cow::Owned(buf)) } StdFileResourceKind::Stdout | StdFileResourceKind::Stderr => { Err(FsError::NotSupported) } } } - async fn read_all_async(self: Rc) -> FsResult> { + async fn read_all_async(self: Rc) -> FsResult> { match self.kind { StdFileResourceKind::File | StdFileResourceKind::Stdin(_) => { self .with_inner_blocking_task(|file| { let mut buf = Vec::new(); file.read_to_end(&mut buf)?; - Ok(buf) + Ok(Cow::Owned(buf)) }) .await } diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 63f5794b7d0800..9986b0f607f55e 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -157,7 +157,10 @@ pub trait NodeRequireLoader { path: &'a Path, ) -> Result, AnyError>; - fn load_text_file_lossy(&self, path: &Path) -> Result; + fn load_text_file_lossy( + &self, + path: &Path, + ) -> Result, AnyError>; /// Get if the module kind is maybe CJS and loading should determine /// if its CJS or ESM. @@ -873,6 +876,8 @@ impl deno_package_json::fs::DenoPkgJsonFs for DenoFsNodeResolverEnv { self .fs .read_text_file_lossy_sync(path, None) + // todo(https://github.com/denoland/deno_package_json/pull/9): don't clone + .map(|text| text.into_owned()) .map_err(|err| err.into_io_error()) } } @@ -887,6 +892,8 @@ impl<'a> deno_package_json::fs::DenoPkgJsonFs for DenoPkgJsonFsAdapter<'a> { self .0 .read_text_file_lossy_sync(path, None) + // todo(https://github.com/denoland/deno_package_json/pull/9): don't clone + .map(|text| text.into_owned()) .map_err(|err| err.into_io_error()) } } diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index 64dc4423ae918a..1c204f54e81bd6 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -8,6 +8,7 @@ use deno_core::v8; use deno_core::JsRuntimeInspector; use deno_core::OpState; use deno_fs::FileSystemRc; +use deno_fs::V8MaybeStaticStr; use deno_package_json::PackageJsonRc; use deno_path_util::normalize_path; use deno_path_util::url_from_file_path; @@ -477,11 +478,11 @@ where } #[op2(stack_trace)] -#[string] +#[to_v8] pub fn op_require_read_file

( state: &mut OpState, #[string] file_path: String, -) -> Result +) -> Result where P: NodePermissions + 'static, { @@ -492,6 +493,7 @@ where let loader = state.borrow::(); loader .load_text_file_lossy(&file_path) + .map(V8MaybeStaticStr) .map_err(|e| RequireErrorKind::ReadModule(e).into_box()) } diff --git a/resolvers/deno/fs.rs b/resolvers/deno/fs.rs index 4929f4508e9773..f2021a73a9ca87 100644 --- a/resolvers/deno/fs.rs +++ b/resolvers/deno/fs.rs @@ -1,5 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; @@ -10,7 +11,10 @@ pub struct DirEntry { } pub trait DenoResolverFs { - fn read_to_string_lossy(&self, path: &Path) -> std::io::Result; + fn read_to_string_lossy( + &self, + path: &Path, + ) -> std::io::Result>; fn realpath_sync(&self, path: &Path) -> std::io::Result; fn exists_sync(&self, path: &Path) -> bool; fn is_dir_sync(&self, path: &Path) -> bool; From 1af2d2474e212038d8fee06c897be08145541fa3 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 28 Nov 2024 04:29:20 -0800 Subject: [PATCH 431/436] fix(ext/node): `tls.connect` socket upgrades (#27125) Fixes https://github.com/denoland/deno/issues/27087 Fixes https://github.com/denoland/deno/issues/26685 Fixes https://github.com/denoland/deno/issues/26660 --- ext/node/polyfills/_tls_wrap.ts | 16 +++++++++++++++- ext/node/polyfills/http2.ts | 6 +++--- .../polyfills/internal_binding/stream_wrap.ts | 14 +++++++++++++- tests/unit_node/tls_test.ts | 14 ++++++++++++++ 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/ext/node/polyfills/_tls_wrap.ts b/ext/node/polyfills/_tls_wrap.ts index e36fc637e762e4..4c7424a3287f16 100644 --- a/ext/node/polyfills/_tls_wrap.ts +++ b/ext/node/polyfills/_tls_wrap.ts @@ -148,9 +148,13 @@ export class TLSSocket extends net.Socket { : new TCP(TCPConstants.SOCKET); } + const { promise, resolve } = Promise.withResolvers(); + // Patches `afterConnect` hook to replace TCP conn with TLS conn const afterConnect = handle.afterConnect; handle.afterConnect = async (req: any, status: number) => { + options.hostname ??= undefined; // coerce to undefined if null, startTls expects hostname to be undefined + try { const conn = await Deno.startTls(handle[kStreamBaseField], options); try { @@ -164,15 +168,25 @@ export class TLSSocket extends net.Socket { // Don't interrupt "secure" event to let the first read/write // operation emit the error. } + + // Assign the TLS connection to the handle and resume reading. handle[kStreamBaseField] = conn; + handle.upgrading = false; + if (!handle.pauseOnCreate) { + handle.readStart(); + } + + resolve(); + tlssock.emit("secure"); tlssock.removeListener("end", onConnectEnd); - } catch (_) { + } catch { // TODO(kt3k): Handle this } return afterConnect.call(handle, req, status); }; + handle.upgrading = promise; (handle as any).verifyError = function () { return null; // Never fails, rejectUnauthorized is always true in Deno. }; diff --git a/ext/node/polyfills/http2.ts b/ext/node/polyfills/http2.ts index dc2379aebba694..1b3f74f6f66ffa 100644 --- a/ext/node/polyfills/http2.ts +++ b/ext/node/polyfills/http2.ts @@ -479,13 +479,13 @@ export class ClientHttp2Session extends Http2Session { socket.on("error", socketOnError); socket.on("close", socketOnClose); + + socket[kHandle].pauseOnCreate = true; const connPromise = new Promise((resolve) => { const eventName = url.startsWith("https") ? "secureConnect" : "connect"; socket.once(eventName, () => { const rid = socket[kHandle][kStreamBaseField][internalRidSymbol]; - nextTick(() => { - resolve(rid); - }); + nextTick(() => resolve(rid)); }); }); socket[kSession] = this; diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index 7aea83d6f5899c..19c9357ce8287d 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -320,8 +320,16 @@ export class LibuvStreamWrap extends HandleWrap { /** Internal method for reading from the attached stream. */ async #read() { let buf = this.#buf; + let nread: number | null; const ridBefore = this[kStreamBaseField]![internalRidSymbol]; + + if (this.upgrading) { + // Starting an upgrade, stop reading. Upgrading will resume reading. + this.readStop(); + return; + } + try { nread = await this[kStreamBaseField]!.read(buf); } catch (e) { @@ -382,6 +390,11 @@ export class LibuvStreamWrap extends HandleWrap { const ridBefore = this[kStreamBaseField]![internalRidSymbol]; + if (this.upgrading) { + // There is an upgrade in progress, queue the write request. + await this.upgrading; + } + let nwritten = 0; try { // TODO(crowlKats): duplicate from runtime/js/13_buffer.js @@ -400,7 +413,6 @@ export class LibuvStreamWrap extends HandleWrap { } let status: number; - // TODO(cmorten): map err to status codes if ( e instanceof Deno.errors.BadResource || diff --git a/tests/unit_node/tls_test.ts b/tests/unit_node/tls_test.ts index 43d6205b0bbcc4..627b948cd1d8e3 100644 --- a/tests/unit_node/tls_test.ts +++ b/tests/unit_node/tls_test.ts @@ -257,3 +257,17 @@ Deno.test("TLSSocket.alpnProtocol is set for client", async () => { listener.close(); await new Promise((resolve) => outgoing.on("close", resolve)); }); + +Deno.test("tls connect upgrade tcp", async () => { + const { promise, resolve } = Promise.withResolvers(); + + const socket = new net.Socket(); + socket.connect(443, "google.com"); + socket.on("connect", () => { + const secure = tls.connect({ socket }); + secure.on("secureConnect", () => resolve()); + }); + + await promise; + socket.destroy(); +}); From 32e260d55a364f7b3151b74ff4ba9585a11d11e1 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 28 Nov 2024 14:51:24 +0100 Subject: [PATCH 432/436] fix: support bun specifiers in JSR publish (#24588) Fixes https://github.com/denoland/deno/issues/26989 --------- Co-authored-by: Nathan Whitaker --- cli/graph_util.rs | 23 +++++++++++++++- cli/tools/registry/diagnostics.rs | 2 +- cli/tools/registry/graph.rs | 2 +- cli/tsc/mod.rs | 26 +++++++++++-------- .../publish/bun_specifier/__test__.jsonc | 4 +++ .../publish/bun_specifier/bun_specifier.out | 6 +++++ tests/specs/publish/bun_specifier/deno.json | 8 ++++++ tests/specs/publish/bun_specifier/mod.ts | 1 + .../publish/invalid_import/invalid_import.out | 4 +-- .../invalid_import_esm_sh_suggestion.out | 2 +- .../publish/prefer_fast_check_graph/main.out | 2 +- 11 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 tests/specs/publish/bun_specifier/__test__.jsonc create mode 100644 tests/specs/publish/bun_specifier/bun_specifier.out create mode 100644 tests/specs/publish/bun_specifier/deno.json create mode 100644 tests/specs/publish/bun_specifier/mod.ts diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 360021d22d62c9..63997dc9ce8510 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -6,6 +6,7 @@ use crate::args::CliLockfile; use crate::args::CliOptions; use crate::args::DENO_DISABLE_PEDANTIC_NODE_WARNINGS; use crate::cache; +use crate::cache::FetchCacher; use crate::cache::GlobalHttpCache; use crate::cache::ModuleInfoCache; use crate::cache::ParsedSourceCache; @@ -254,6 +255,23 @@ impl ModuleGraphCreator { package_configs: &[JsrPackageConfig], build_fast_check_graph: bool, ) -> Result { + struct PublishLoader(FetchCacher); + impl Loader for PublishLoader { + fn load( + &self, + specifier: &deno_ast::ModuleSpecifier, + options: deno_graph::source::LoadOptions, + ) -> deno_graph::source::LoadFuture { + if specifier.scheme() == "bun" { + return Box::pin(std::future::ready(Ok(Some( + deno_graph::source::LoadResponse::External { + specifier: specifier.clone(), + }, + )))); + } + self.0.load(specifier, options) + } + } 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 @@ -271,12 +289,15 @@ impl ModuleGraphCreator { for package_config in package_configs { roots.extend(package_config.config_file.resolve_export_value_urls()?); } + + let loader = self.module_graph_builder.create_graph_loader(); + let mut publish_loader = PublishLoader(loader); let mut graph = self .create_graph_with_options(CreateGraphOptions { is_dynamic: false, graph_kind: deno_graph::GraphKind::All, roots, - loader: None, + loader: Some(&mut publish_loader), }) .await?; self.graph_valid(&graph)?; diff --git a/cli/tools/registry/diagnostics.rs b/cli/tools/registry/diagnostics.rs index f2b630d7822f72..ef38affc30051d 100644 --- a/cli/tools/registry/diagnostics.rs +++ b/cli/tools/registry/diagnostics.rs @@ -476,7 +476,7 @@ impl Diagnostic for PublishDiagnostic { InvalidExternalImport { imported, .. } => Cow::Owned(vec![ Cow::Owned(format!("the import was resolved to '{}'", imported)), Cow::Borrowed("this specifier is not allowed to be imported on jsr"), - Cow::Borrowed("jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers"), + Cow::Borrowed("jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers"), ]), UnsupportedJsxTsx { .. } => Cow::Owned(vec![ Cow::Borrowed("follow https://github.com/jsr-io/jsr/issues/24 for updates"), diff --git a/cli/tools/registry/graph.rs b/cli/tools/registry/graph.rs index 184557e5df7797..21962d009e1626 100644 --- a/cli/tools/registry/graph.rs +++ b/cli/tools/registry/graph.rs @@ -47,7 +47,7 @@ impl GraphDiagnosticsCollector { resolution: &ResolutionResolved| { if visited.insert(resolution.specifier.clone()) { match resolution.specifier.scheme() { - "file" | "data" | "node" => {} + "file" | "data" | "node" | "bun" => {} "jsr" => { skip_specifiers.insert(resolution.specifier.clone()); diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 50127b093d128f..a8e8d73b68b002 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -656,17 +656,21 @@ fn op_load_inner( } Module::Npm(_) | Module::Node(_) => None, Module::External(module) => { - // means it's Deno code importing an npm module - let specifier = node::resolve_specifier_into_node_modules( - &module.specifier, - &deno_fs::RealFs, - ); - Some(Cow::Owned(load_from_node_modules( - &specifier, - state.maybe_npm.as_ref(), - &mut media_type, - &mut is_cjs, - )?)) + if module.specifier.scheme() != "file" { + None + } else { + // means it's Deno code importing an npm module + let specifier = node::resolve_specifier_into_node_modules( + &module.specifier, + &deno_fs::RealFs, + ); + Some(Cow::Owned(load_from_node_modules( + &specifier, + state.maybe_npm.as_ref(), + &mut media_type, + &mut is_cjs, + )?)) + } } } } else if let Some(npm) = state diff --git a/tests/specs/publish/bun_specifier/__test__.jsonc b/tests/specs/publish/bun_specifier/__test__.jsonc new file mode 100644 index 00000000000000..4124845ba939a3 --- /dev/null +++ b/tests/specs/publish/bun_specifier/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "bun_specifier.out" +} diff --git a/tests/specs/publish/bun_specifier/bun_specifier.out b/tests/specs/publish/bun_specifier/bun_specifier.out new file mode 100644 index 00000000000000..af45ed598b655f --- /dev/null +++ b/tests/specs/publish/bun_specifier/bun_specifier.out @@ -0,0 +1,6 @@ +Check file:///[WILDCARD]/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/mod.ts +Publishing @foo/bar@1.0.0 ... +Successfully published @foo/bar@1.0.0 +Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/specs/publish/bun_specifier/deno.json b/tests/specs/publish/bun_specifier/deno.json new file mode 100644 index 00000000000000..0657aefdbbdd99 --- /dev/null +++ b/tests/specs/publish/bun_specifier/deno.json @@ -0,0 +1,8 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + }, + "license": "MIT" +} diff --git a/tests/specs/publish/bun_specifier/mod.ts b/tests/specs/publish/bun_specifier/mod.ts new file mode 100644 index 00000000000000..ad7ca6152caf4f --- /dev/null +++ b/tests/specs/publish/bun_specifier/mod.ts @@ -0,0 +1 @@ +import "bun:sqlite"; diff --git a/tests/specs/publish/invalid_import/invalid_import.out b/tests/specs/publish/invalid_import/invalid_import.out index 6914dc51e08768..3b795ba2e9f918 100644 --- a/tests/specs/publish/invalid_import/invalid_import.out +++ b/tests/specs/publish/invalid_import/invalid_import.out @@ -12,7 +12,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier info: the import was resolved to 'http://localhost:4545/welcome.ts' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error[invalid-external-import]: invalid import to a non-JSR 'http' specifier @@ -25,7 +25,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier info: the import was resolved to 'http://localhost:4545/echo.ts' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error: Found 2 problems 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 b0a544df892885..1de23c0baec44c 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 @@ -13,7 +13,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier info: the import was resolved to 'http://esm.sh/react-dom@18.2.0/server' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error: Found 1 problem diff --git a/tests/specs/publish/prefer_fast_check_graph/main.out b/tests/specs/publish/prefer_fast_check_graph/main.out index dd7d052c923a67..3ff4d33a30c416 100644 --- a/tests/specs/publish/prefer_fast_check_graph/main.out +++ b/tests/specs/publish/prefer_fast_check_graph/main.out @@ -13,7 +13,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'https' specifier info: the import was resolved to 'https://deno.land/std/assert/assert.ts' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error: Found 1 problem From 026bbc4a9edf1372779c4ce4d2052710b5ff24fc Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 28 Nov 2024 15:07:32 +0100 Subject: [PATCH 433/436] fix(init): support scoped npm packages (#27128) The naming scheme for create npm packages varies depending on whether they are scoped or not. We only supported unscoped packages prior to this PR. This PR adds support for all the following cases which npm supports: - `foo` -> `create-foo` - `@foo/bar` -> `@foo/create-bar` - `@foo` -> `@foo/create` - `@foo@2.0.0` -> `@foo/create@2.0.0` - `@foo/bar@2.0.0` -> `@foo/create-bar@2.0.0` See https://docs.npmjs.com/cli/v8/commands/npm-init#description Fixes https://github.com/denoland/deno/issues/27127 --- cli/tools/init/mod.rs | 74 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs index 25b86cb957270f..36bdbac2bc6cad 100644 --- a/cli/tools/init/mod.rs +++ b/cli/tools/init/mod.rs @@ -252,8 +252,46 @@ Deno.test(function addTest() { Ok(0) } +fn npm_name_to_create_package(name: &str) -> String { + let mut s = "npm:".to_string(); + + let mut scoped = false; + let mut create = false; + + for (i, ch) in name.char_indices() { + if i == 0 { + if ch == '@' { + scoped = true; + } else { + create = true; + s.push_str("create-"); + } + } else if scoped { + if ch == '/' { + scoped = false; + create = true; + s.push_str("/create-"); + continue; + } else if ch == '@' && !create { + scoped = false; + create = true; + s.push_str("/create@"); + continue; + } + } + + s.push(ch); + } + + if !create { + s.push_str("/create"); + } + + s +} + async fn init_npm(name: &str, args: Vec) -> Result { - let script_name = format!("npm:create-{}", name); + let script_name = npm_name_to_create_package(name); fn print_manual_usage(script_name: &str, args: &[String]) -> i32 { log::info!("{}", cformat!("You can initialize project manually by running deno run {} {} and applying desired permissions.", script_name, args.join(" "))); @@ -336,3 +374,37 @@ fn create_file( Ok(()) } } + +#[cfg(test)] +mod test { + use crate::tools::init::npm_name_to_create_package; + + #[test] + fn npm_name_to_create_package_test() { + // See https://docs.npmjs.com/cli/v8/commands/npm-init#description + assert_eq!( + npm_name_to_create_package("foo"), + "npm:create-foo".to_string() + ); + assert_eq!( + npm_name_to_create_package("foo@1.0.0"), + "npm:create-foo@1.0.0".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo"), + "npm:@foo/create".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo@1.0.0"), + "npm:@foo/create@1.0.0".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo/bar"), + "npm:@foo/create-bar".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo/bar@1.0.0"), + "npm:@foo/create-bar@1.0.0".to_string() + ); + } +} From 39722f190a2a3d52ce3592c2283cd33a614325cc Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 28 Nov 2024 15:11:51 +0100 Subject: [PATCH 434/436] fix(node/timers): error when passing id to clearTimeout/clearInterval (#27130) As pointed out in https://github.com/denoland/deno/issues/27126 we used a variable which could potentially be of type `number` instead of the `Timeout` class instance. Ensure that we're always setting `_destroyed` on the class instead instead. Fixes https://github.com/denoland/deno/issues/27126 --- ext/node/polyfills/timers.ts | 4 ++-- tests/unit_node/timers_test.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ext/node/polyfills/timers.ts b/ext/node/polyfills/timers.ts index e826416ed83d5e..fa5f7a204255be 100644 --- a/ext/node/polyfills/timers.ts +++ b/ext/node/polyfills/timers.ts @@ -54,7 +54,7 @@ export function clearTimeout(timeout?: Timeout | number) { const id = +timeout; const timer = MapPrototypeGet(activeTimers, id); if (timer) { - timeout._destroyed = true; + timer._destroyed = true; MapPrototypeDelete(activeTimers, id); } clearTimeout_(id); @@ -74,7 +74,7 @@ export function clearInterval(timeout?: Timeout | number | string) { const id = +timeout; const timer = MapPrototypeGet(activeTimers, id); if (timer) { - timeout._destroyed = true; + timer._destroyed = true; MapPrototypeDelete(activeTimers, id); } clearInterval_(id); diff --git a/tests/unit_node/timers_test.ts b/tests/unit_node/timers_test.ts index 10c42e892c2a5c..ecff32e763b247 100644 --- a/tests/unit_node/timers_test.ts +++ b/tests/unit_node/timers_test.ts @@ -100,6 +100,16 @@ Deno.test("[node/timers refresh cancelled timer]", () => { p.refresh(); }); +Deno.test("[node/timers] clearTimeout with number", () => { + const timer = +timers.setTimeout(() => fail(), 10); + timers.clearTimeout(timer); +}); + +Deno.test("[node/timers] clearInterval with number", () => { + const timer = +timers.setInterval(() => fail(), 10); + timers.clearInterval(timer); +}); + Deno.test("[node/timers setImmediate returns Immediate object]", () => { const { clearImmediate, setImmediate } = timers; From 12aea2014aafa379b324cda759a95f0bbc579b43 Mon Sep 17 00:00:00 2001 From: denobot <33910674+denobot@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:00:24 +0100 Subject: [PATCH 435/436] chore: forward v2.1.2 release commit to main (#27136) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the release commit being forwarded back to main for 2.1.2 Co-authored-by: bartlomieju Co-authored-by: Bartek IwaƄczuk --- .github/workflows/ci.generate.ts | 2 +- .github/workflows/ci.yml | 8 ++--- Cargo.lock | 60 ++++++++++++++++---------------- Cargo.toml | 58 +++++++++++++++--------------- Releases.md | 44 +++++++++++++++++++++++ bench_util/Cargo.toml | 2 +- cli/Cargo.toml | 2 +- ext/broadcast_channel/Cargo.toml | 2 +- ext/cache/Cargo.toml | 2 +- ext/canvas/Cargo.toml | 2 +- ext/console/Cargo.toml | 2 +- ext/cron/Cargo.toml | 2 +- ext/crypto/Cargo.toml | 2 +- ext/fetch/Cargo.toml | 2 +- ext/ffi/Cargo.toml | 2 +- ext/fs/Cargo.toml | 2 +- ext/http/Cargo.toml | 2 +- ext/io/Cargo.toml | 2 +- ext/kv/Cargo.toml | 2 +- ext/napi/Cargo.toml | 2 +- ext/napi/sym/Cargo.toml | 2 +- ext/net/Cargo.toml | 2 +- ext/node/Cargo.toml | 2 +- ext/telemetry/Cargo.toml | 2 +- ext/tls/Cargo.toml | 2 +- ext/url/Cargo.toml | 2 +- ext/web/Cargo.toml | 2 +- ext/webgpu/Cargo.toml | 2 +- ext/webidl/Cargo.toml | 2 +- ext/websocket/Cargo.toml | 2 +- ext/webstorage/Cargo.toml | 2 +- resolvers/deno/Cargo.toml | 2 +- resolvers/node/Cargo.toml | 2 +- runtime/Cargo.toml | 2 +- runtime/permissions/Cargo.toml | 2 +- 35 files changed, 138 insertions(+), 94 deletions(-) diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 53a0f46e504ab9..9a166e6cf02d99 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify"; // Bump this number when you want to purge the cache. // Note: the tools/release/01_bump_crate_versions.ts script will update this version // automatically via regex, so ensure that this line maintains this format. -const cacheVersion = 27; +const cacheVersion = 28; const ubuntuX86Runner = "ubuntu-24.04"; const ubuntuX86XlRunner = "ubuntu-24.04-xl"; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee8527bcef3019..dd48f1fb0d0077 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -361,8 +361,8 @@ jobs: path: |- ~/.cargo/registry/index ~/.cargo/registry/cache - key: '27-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' - restore-keys: '27-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' + key: '28-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' + restore-keys: '28-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' if: '!(matrix.skip)' - name: Restore cache build output (PR) uses: actions/cache/restore@v4 @@ -375,7 +375,7 @@ jobs: !./target/*/*.zip !./target/*/*.tar.gz key: never_saved - restore-keys: '27-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' + restore-keys: '28-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' - name: Apply and update mtime cache if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' uses: ./.github/mtime_cache @@ -685,7 +685,7 @@ jobs: !./target/*/*.zip !./target/*/*.sha256sum !./target/*/*.tar.gz - key: '27-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' + key: '28-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' publish-canary: name: publish canary runs-on: ubuntu-24.04 diff --git a/Cargo.lock b/Cargo.lock index fc567b4a380b78..5e27d1a8011083 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1194,7 +1194,7 @@ dependencies = [ [[package]] name = "deno" -version = "2.1.1" +version = "2.1.2" dependencies = [ "anstream", "async-trait", @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "deno_bench_util" -version = "0.173.0" +version = "0.174.0" dependencies = [ "bencher", "deno_core", @@ -1374,7 +1374,7 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.173.0" +version = "0.174.0" dependencies = [ "async-trait", "deno_core", @@ -1385,7 +1385,7 @@ dependencies = [ [[package]] name = "deno_cache" -version = "0.111.0" +version = "0.112.0" dependencies = [ "async-trait", "deno_core", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "deno_canvas" -version = "0.48.0" +version = "0.49.0" dependencies = [ "deno_core", "deno_webgpu", @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.179.0" +version = "0.180.0" dependencies = [ "deno_core", ] @@ -1501,7 +1501,7 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_cron" -version = "0.59.0" +version = "0.60.0" dependencies = [ "anyhow", "async-trait", @@ -1514,7 +1514,7 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.193.0" +version = "0.194.0" dependencies = [ "aes", "aes-gcm", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "deno_fetch" -version = "0.203.0" +version = "0.204.0" dependencies = [ "base64 0.21.7", "bytes", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "deno_ffi" -version = "0.166.0" +version = "0.167.0" dependencies = [ "deno_core", "deno_permissions", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "deno_fs" -version = "0.89.0" +version = "0.90.0" dependencies = [ "async-trait", "base32", @@ -1687,7 +1687,7 @@ dependencies = [ [[package]] name = "deno_http" -version = "0.177.0" +version = "0.178.0" dependencies = [ "async-compression", "async-trait", @@ -1726,7 +1726,7 @@ dependencies = [ [[package]] name = "deno_io" -version = "0.89.0" +version = "0.90.0" dependencies = [ "async-trait", "deno_core", @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "deno_kv" -version = "0.87.0" +version = "0.88.0" dependencies = [ "anyhow", "async-trait", @@ -1820,7 +1820,7 @@ dependencies = [ [[package]] name = "deno_napi" -version = "0.110.0" +version = "0.111.0" dependencies = [ "deno_core", "deno_permissions", @@ -1848,7 +1848,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.171.0" +version = "0.172.0" dependencies = [ "deno_core", "deno_permissions", @@ -1865,7 +1865,7 @@ dependencies = [ [[package]] name = "deno_node" -version = "0.116.0" +version = "0.117.0" dependencies = [ "aead-gcm-stream", "aes", @@ -2017,7 +2017,7 @@ dependencies = [ [[package]] name = "deno_permissions" -version = "0.39.0" +version = "0.40.0" dependencies = [ "deno_core", "deno_path_util", @@ -2035,7 +2035,7 @@ dependencies = [ [[package]] name = "deno_resolver" -version = "0.11.0" +version = "0.12.0" dependencies = [ "anyhow", "base32", @@ -2054,7 +2054,7 @@ dependencies = [ [[package]] name = "deno_runtime" -version = "0.188.0" +version = "0.189.0" dependencies = [ "color-print", "deno_ast", @@ -2153,7 +2153,7 @@ dependencies = [ [[package]] name = "deno_telemetry" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-trait", "deno_core", @@ -2194,7 +2194,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.166.0" +version = "0.167.0" dependencies = [ "deno_core", "deno_native_certs", @@ -2243,7 +2243,7 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.179.0" +version = "0.180.0" dependencies = [ "deno_bench_util", "deno_console", @@ -2255,7 +2255,7 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.210.0" +version = "0.211.0" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2277,7 +2277,7 @@ dependencies = [ [[package]] name = "deno_webgpu" -version = "0.146.0" +version = "0.147.0" dependencies = [ "deno_core", "raw-window-handle", @@ -2290,7 +2290,7 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.179.0" +version = "0.180.0" dependencies = [ "deno_bench_util", "deno_core", @@ -2298,7 +2298,7 @@ dependencies = [ [[package]] name = "deno_websocket" -version = "0.184.0" +version = "0.185.0" dependencies = [ "bytes", "deno_core", @@ -2320,7 +2320,7 @@ dependencies = [ [[package]] name = "deno_webstorage" -version = "0.174.0" +version = "0.175.0" dependencies = [ "deno_core", "deno_web", @@ -4833,7 +4833,7 @@ dependencies = [ [[package]] name = "napi_sym" -version = "0.109.0" +version = "0.110.0" dependencies = [ "quote", "serde", @@ -4888,7 +4888,7 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.18.0" +version = "0.19.0" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 652d55e071ab89..1ca9fcb66b7172 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,17 +49,17 @@ repository = "https://github.com/denoland/deno" deno_ast = { version = "=0.43.3", features = ["transpiling"] } deno_core = { version = "0.323.0" } -deno_bench_util = { version = "0.173.0", path = "./bench_util" } +deno_bench_util = { version = "0.174.0", path = "./bench_util" } deno_config = { version = "=0.39.2", features = ["workspace", "sync"] } deno_lockfile = "=0.23.1" deno_media_type = { version = "0.2.0", features = ["module_specifier"] } deno_npm = "=0.25.4" deno_path_util = "=0.2.1" -deno_permissions = { version = "0.39.0", path = "./runtime/permissions" } -deno_runtime = { version = "0.188.0", path = "./runtime" } +deno_permissions = { version = "0.40.0", path = "./runtime/permissions" } +deno_runtime = { version = "0.189.0", path = "./runtime" } deno_semver = "=0.5.16" deno_terminal = "0.2.0" -napi_sym = { version = "0.109.0", path = "./ext/napi/sym" } +napi_sym = { version = "0.110.0", path = "./ext/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } denokv_proto = "0.8.4" @@ -68,33 +68,33 @@ denokv_remote = "0.8.4" denokv_sqlite = { default-features = false, version = "0.8.4" } # exts -deno_broadcast_channel = { version = "0.173.0", path = "./ext/broadcast_channel" } -deno_cache = { version = "0.111.0", path = "./ext/cache" } -deno_canvas = { version = "0.48.0", path = "./ext/canvas" } -deno_console = { version = "0.179.0", path = "./ext/console" } -deno_cron = { version = "0.59.0", path = "./ext/cron" } -deno_crypto = { version = "0.193.0", path = "./ext/crypto" } -deno_fetch = { version = "0.203.0", path = "./ext/fetch" } -deno_ffi = { version = "0.166.0", path = "./ext/ffi" } -deno_fs = { version = "0.89.0", path = "./ext/fs" } -deno_http = { version = "0.177.0", path = "./ext/http" } -deno_io = { version = "0.89.0", path = "./ext/io" } -deno_kv = { version = "0.87.0", path = "./ext/kv" } -deno_napi = { version = "0.110.0", path = "./ext/napi" } -deno_net = { version = "0.171.0", path = "./ext/net" } -deno_node = { version = "0.116.0", path = "./ext/node" } -deno_telemetry = { version = "0.1.0", path = "./ext/telemetry" } -deno_tls = { version = "0.166.0", path = "./ext/tls" } -deno_url = { version = "0.179.0", path = "./ext/url" } -deno_web = { version = "0.210.0", path = "./ext/web" } -deno_webgpu = { version = "0.146.0", path = "./ext/webgpu" } -deno_webidl = { version = "0.179.0", path = "./ext/webidl" } -deno_websocket = { version = "0.184.0", path = "./ext/websocket" } -deno_webstorage = { version = "0.174.0", path = "./ext/webstorage" } +deno_broadcast_channel = { version = "0.174.0", path = "./ext/broadcast_channel" } +deno_cache = { version = "0.112.0", path = "./ext/cache" } +deno_canvas = { version = "0.49.0", path = "./ext/canvas" } +deno_console = { version = "0.180.0", path = "./ext/console" } +deno_cron = { version = "0.60.0", path = "./ext/cron" } +deno_crypto = { version = "0.194.0", path = "./ext/crypto" } +deno_fetch = { version = "0.204.0", path = "./ext/fetch" } +deno_ffi = { version = "0.167.0", path = "./ext/ffi" } +deno_fs = { version = "0.90.0", path = "./ext/fs" } +deno_http = { version = "0.178.0", path = "./ext/http" } +deno_io = { version = "0.90.0", path = "./ext/io" } +deno_kv = { version = "0.88.0", path = "./ext/kv" } +deno_napi = { version = "0.111.0", path = "./ext/napi" } +deno_net = { version = "0.172.0", path = "./ext/net" } +deno_node = { version = "0.117.0", path = "./ext/node" } +deno_telemetry = { version = "0.2.0", path = "./ext/telemetry" } +deno_tls = { version = "0.167.0", path = "./ext/tls" } +deno_url = { version = "0.180.0", path = "./ext/url" } +deno_web = { version = "0.211.0", path = "./ext/web" } +deno_webgpu = { version = "0.147.0", path = "./ext/webgpu" } +deno_webidl = { version = "0.180.0", path = "./ext/webidl" } +deno_websocket = { version = "0.185.0", path = "./ext/websocket" } +deno_webstorage = { version = "0.175.0", path = "./ext/webstorage" } # resolvers -deno_resolver = { version = "0.11.0", path = "./resolvers/deno" } -node_resolver = { version = "0.18.0", path = "./resolvers/node" } +deno_resolver = { version = "0.12.0", path = "./resolvers/deno" } +node_resolver = { version = "0.19.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" diff --git a/Releases.md b/Releases.md index 0e977d0311bc0b..6f9083ffde8c16 100644 --- a/Releases.md +++ b/Releases.md @@ -6,6 +6,50 @@ https://github.com/denoland/deno/releases We also have one-line install commands at: https://github.com/denoland/deno_install +### 2.1.2 / 2024.11.28 + +- feat(unstable): Instrument Deno.serve (#26964) +- feat(unstable): Instrument fetch (#27057) +- feat(unstable): repurpose `--unstable-detect-cjs` to attempt loading more + modules as cjs (#27094) +- fix(check): support jsdoc `@import` tag (#26991) +- fix(compile): correct buffered reading of assets and files (#27008) +- fix(compile): do not error embedding same symlink via multiple methods + (#27015) +- fix(compile): handle TypeScript file included as asset (#27032) +- fix(ext/fetch): don't throw when `bodyUsed` inspect after upgrade (#27088) +- fix(ext/node): `tls.connect` socket upgrades (#27125) +- fix(ext/node): add `fs.promises.fstat` and `FileHandle#stat` (#26719) +- fix(ext/webgpu): normalize limits to number (#27072) +- fix(ext/webgpu): use correct variable name (#27108) +- fix(ext/websocket): don't throw exception when sending to closed socket + (#26932) +- fix(fmt): return `None` if sql fmt result is the same (#27014) +- fix(info): resolve bare specifier pointing to workspace member (#27020) +- fix(init): always force managed node modules (#27047) +- fix(init): support scoped npm packages (#27128) +- fix(install): don't re-set up node_modules if running lifecycle script + (#26984) +- fix(lsp): remove stray debug output (#27010) +- fix(lsp): support task object notation for tasks request (#27076) +- fix(lsp): wasm file import completions (#27018) +- fix(node): correct resolution of dynamic import of esm from cjs (#27071) +- fix(node/fs): add missing stat path argument validation (#27086) +- fix(node/fs): missing uv error context for readFile (#27011) +- fix(node/http): casing ignored in ServerResponse.hasHeader() (#27105) +- fix(node/timers): error when passing id to clearTimeout/clearInterval (#27130) +- fix(runtime/ops): Fix watchfs remove event (#27041) +- fix(streams): reject `string` in `ReadableStream.from` type (#25116) +- fix(task): handle carriage return in task description (#27099) +- fix(task): handle multiline descriptions properly (#27069) +- fix(task): strip ansi codes and control chars when printing tasks (#27100) +- fix(tools/doc): HTML resolve main entrypoint from config file (#27103) +- fix: support bun specifiers in JSR publish (#24588) +- fix: support non-function exports in Wasm modules (#26992) +- perf(compile): read embedded files as static references when UTF-8 and reading + as strings (#27033) +- perf(ext/webstorage): use object wrap for `Storage` (#26931) + ### 2.1.1 / 2024.11.21 - docs(add): clarification to add command (#26968) diff --git a/bench_util/Cargo.toml b/bench_util/Cargo.toml index 4d39ae30e4b61b..4d2284b6d92309 100644 --- a/bench_util/Cargo.toml +++ b/bench_util/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_bench_util" -version = "0.173.0" +version = "0.174.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/cli/Cargo.toml b/cli/Cargo.toml index fd28b315d41e55..dd75f903e4b7bc 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "2.1.1" +version = "2.1.2" authors.workspace = true default-run = "deno" edition.workspace = true diff --git a/ext/broadcast_channel/Cargo.toml b/ext/broadcast_channel/Cargo.toml index e7c3f584b61fbe..a0383592876727 100644 --- a/ext/broadcast_channel/Cargo.toml +++ b/ext/broadcast_channel/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_broadcast_channel" -version = "0.173.0" +version = "0.174.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cache/Cargo.toml b/ext/cache/Cargo.toml index 9005bf5b24418f..edaf443c0572c9 100644 --- a/ext/cache/Cargo.toml +++ b/ext/cache/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cache" -version = "0.111.0" +version = "0.112.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/canvas/Cargo.toml b/ext/canvas/Cargo.toml index 5dca4424376b8b..db624670f38942 100644 --- a/ext/canvas/Cargo.toml +++ b/ext/canvas/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_canvas" -version = "0.48.0" +version = "0.49.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/console/Cargo.toml b/ext/console/Cargo.toml index 1d76390b6e02d4..49ad2434563782 100644 --- a/ext/console/Cargo.toml +++ b/ext/console/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_console" -version = "0.179.0" +version = "0.180.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cron/Cargo.toml b/ext/cron/Cargo.toml index d1809da1354ca0..d8f7f20d0c9f6e 100644 --- a/ext/cron/Cargo.toml +++ b/ext/cron/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_cron" -version = "0.59.0" +version = "0.60.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/crypto/Cargo.toml b/ext/crypto/Cargo.toml index dfb81c62a32604..d8b740e087e185 100644 --- a/ext/crypto/Cargo.toml +++ b/ext/crypto/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_crypto" -version = "0.193.0" +version = "0.194.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fetch/Cargo.toml b/ext/fetch/Cargo.toml index 90b1b152d95778..96d6a45a1ff1bc 100644 --- a/ext/fetch/Cargo.toml +++ b/ext/fetch/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fetch" -version = "0.203.0" +version = "0.204.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml index 2f0813a58b9674..23deb308102b11 100644 --- a/ext/ffi/Cargo.toml +++ b/ext/ffi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_ffi" -version = "0.166.0" +version = "0.167.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fs/Cargo.toml b/ext/fs/Cargo.toml index 1d7d5d3d9aabed..3fbcef44750f52 100644 --- a/ext/fs/Cargo.toml +++ b/ext/fs/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fs" -version = "0.89.0" +version = "0.90.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/http/Cargo.toml b/ext/http/Cargo.toml index 5dc3cd9a7b83c0..5d7eec73531a09 100644 --- a/ext/http/Cargo.toml +++ b/ext/http/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_http" -version = "0.177.0" +version = "0.178.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/io/Cargo.toml b/ext/io/Cargo.toml index caaf67ab0b6b35..b8a14acd6f1f9d 100644 --- a/ext/io/Cargo.toml +++ b/ext/io/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_io" -version = "0.89.0" +version = "0.90.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/kv/Cargo.toml b/ext/kv/Cargo.toml index 972aabfbb7cdb7..3d050d9bbb1232 100644 --- a/ext/kv/Cargo.toml +++ b/ext/kv/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_kv" -version = "0.87.0" +version = "0.88.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/Cargo.toml b/ext/napi/Cargo.toml index f9a1f73007ba5a..0910aacc7f0689 100644 --- a/ext/napi/Cargo.toml +++ b/ext/napi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_napi" -version = "0.110.0" +version = "0.111.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/sym/Cargo.toml b/ext/napi/sym/Cargo.toml index 74d7b450ba67a0..ed69781fc3d38d 100644 --- a/ext/napi/sym/Cargo.toml +++ b/ext/napi/sym/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "napi_sym" -version = "0.109.0" +version = "0.110.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/net/Cargo.toml b/ext/net/Cargo.toml index 8669f650e3f708..401ce08ff42b3a 100644 --- a/ext/net/Cargo.toml +++ b/ext/net/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_net" -version = "0.171.0" +version = "0.172.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 5e47a74e1dc352..89def9b0bc1da5 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_node" -version = "0.116.0" +version = "0.117.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/telemetry/Cargo.toml b/ext/telemetry/Cargo.toml index 6e0c40e873c812..12d7777491ffc0 100644 --- a/ext/telemetry/Cargo.toml +++ b/ext/telemetry/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_telemetry" -version = "0.1.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 6b4bc98909a930..2819dc43441b9d 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_tls" -version = "0.166.0" +version = "0.167.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/url/Cargo.toml b/ext/url/Cargo.toml index e2ea7dae581f8b..42cec915b56546 100644 --- a/ext/url/Cargo.toml +++ b/ext/url/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_url" -version = "0.179.0" +version = "0.180.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml index f56f21b72f6178..43c6d610538509 100644 --- a/ext/web/Cargo.toml +++ b/ext/web/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_web" -version = "0.210.0" +version = "0.211.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml index 93be59b734c31a..f84550553eae3f 100644 --- a/ext/webgpu/Cargo.toml +++ b/ext/webgpu/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webgpu" -version = "0.146.0" +version = "0.147.0" authors = ["the Deno authors"] edition.workspace = true license = "MIT" diff --git a/ext/webidl/Cargo.toml b/ext/webidl/Cargo.toml index 9bf65335c04871..a60374bb8d282a 100644 --- a/ext/webidl/Cargo.toml +++ b/ext/webidl/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webidl" -version = "0.179.0" +version = "0.180.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/websocket/Cargo.toml b/ext/websocket/Cargo.toml index d6177dada0f39a..3807cb8cd5ad1b 100644 --- a/ext/websocket/Cargo.toml +++ b/ext/websocket/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_websocket" -version = "0.184.0" +version = "0.185.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webstorage/Cargo.toml b/ext/webstorage/Cargo.toml index 580eb95e2fe074..ca68d176290c2d 100644 --- a/ext/webstorage/Cargo.toml +++ b/ext/webstorage/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webstorage" -version = "0.174.0" +version = "0.175.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index b2c4bd2384ccb7..f5119478b85795 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_resolver" -version = "0.11.0" +version = "0.12.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/resolvers/node/Cargo.toml b/resolvers/node/Cargo.toml index fb302705730a04..40fd5b87aa0789 100644 --- a/resolvers/node/Cargo.toml +++ b/resolvers/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "node_resolver" -version = "0.18.0" +version = "0.19.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 1b960c2bdb93d6..e4c0e188de406f 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_runtime" -version = "0.188.0" +version = "0.189.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/permissions/Cargo.toml b/runtime/permissions/Cargo.toml index efbc657055f23c..5ecccdf7ec14d8 100644 --- a/runtime/permissions/Cargo.toml +++ b/runtime/permissions/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_permissions" -version = "0.39.0" +version = "0.40.0" authors.workspace = true edition.workspace = true license.workspace = true From 3553aa913249a5940cd2a0828119ae3c89ad2f3d Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 28 Nov 2024 18:11:36 +0100 Subject: [PATCH 436/436] fix(publish): error on missing name field (#27131) This PR improves the error output on publish when the `name` filed is missing: ```json { "exports": "./mod.ts", "version": "0.0.1" } ``` Before: ```sh deno publish --dry-run error: You did not specify an entrypoint in file:///Users/marvinh/dev/test/deno-pkg-timers/deno.json. Add `exports` mapping in the configuration file, eg: { "name": "@scope/name", "version": "0.0.0", "exports": "" } ``` After: ```sh deno publish --dry-run error: Missing 'name' field in 'file:///Users/marvinh/dev/test/deno-pkg-timers/deno.json'. ``` Fixes https://github.com/denoland/deno/issues/27116 --- cli/tools/registry/mod.rs | 7 +++---- tests/specs/publish/missing_name/__test__.jsonc | 5 +++++ tests/specs/publish/missing_name/deno.json | 4 ++++ tests/specs/publish/missing_name/mod.ts | 3 +++ tests/specs/publish/missing_name/publish.out | 1 + 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 tests/specs/publish/missing_name/__test__.jsonc create mode 100644 tests/specs/publish/missing_name/deno.json create mode 100644 tests/specs/publish/missing_name/mod.ts create mode 100644 tests/specs/publish/missing_name/publish.out diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index ba61d352d30712..a866660f366670 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -97,11 +97,10 @@ pub async fn publish( match cli_options.start_dir.maybe_deno_json() { Some(deno_json) => { debug_assert!(!deno_json.is_package()); + if deno_json.json.name.is_none() { + bail!("Missing 'name' field in '{}'.", deno_json.specifier); + } error_missing_exports_field(deno_json)?; - bail!( - "Missing 'name' or 'exports' field in '{}'.", - deno_json.specifier - ); } None => { bail!( diff --git a/tests/specs/publish/missing_name/__test__.jsonc b/tests/specs/publish/missing_name/__test__.jsonc new file mode 100644 index 00000000000000..241bb87e044023 --- /dev/null +++ b/tests/specs/publish/missing_name/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "publish.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/missing_name/deno.json b/tests/specs/publish/missing_name/deno.json new file mode 100644 index 00000000000000..4b0018cf627cca --- /dev/null +++ b/tests/specs/publish/missing_name/deno.json @@ -0,0 +1,4 @@ +{ + "version": "1.0.0", + "exports": "./mod.ts" +} diff --git a/tests/specs/publish/missing_name/mod.ts b/tests/specs/publish/missing_name/mod.ts new file mode 100644 index 00000000000000..8d9b8a22a101a9 --- /dev/null +++ b/tests/specs/publish/missing_name/mod.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/publish/missing_name/publish.out b/tests/specs/publish/missing_name/publish.out new file mode 100644 index 00000000000000..10e0688ef2f415 --- /dev/null +++ b/tests/specs/publish/missing_name/publish.out @@ -0,0 +1 @@ +error: Missing 'name' field in 'file:///[WILDCARD]deno.json'.