mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
chore: deprecate npm itests (#25804)
This commit is contained in:
parent
8cdb309ffd
commit
c232ecc6af
308 changed files with 3038 additions and 694 deletions
|
@ -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",
|
||||
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,
|
||||
temp_cwd: true,
|
||||
cwd: Some("npm/run_existing_npm_package_with_subpath/"),
|
||||
copy_temp_dir: Some("npm/run_existing_npm_package_with_subpath/"),
|
||||
exit_code: 0,
|
||||
cwd: Some("npm/require_resolve_url/"),
|
||||
copy_temp_dir: Some("npm/require_resolve_url/"),
|
||||
});
|
||||
|
||||
itest!(cjs_pkg_imports {
|
||||
args: "run -A npm/cjs_pkg_imports/main.ts",
|
||||
output: "npm/cjs_pkg_imports/main.out",
|
||||
envs: env_vars_for_npm_tests(),
|
||||
http_server: true,
|
||||
});
|
||||
|
||||
#[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,
|
||||
});
|
||||
// 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!(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"
|
||||
)),
|
||||
});
|
||||
|
||||
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()
|
||||
|
|
|
@ -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/"
|
||||
}
|
||||
}
|
9
tests/specs/npm_tests/cached_only/__test__.jsonc
Normal file
9
tests/specs/npm_tests/cached_only/__test__.jsonc
Normal file
|
@ -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
|
||||
}
|
2
tests/specs/npm_tests/cached_only/cached_only/main.out
Normal file
2
tests/specs/npm_tests/cached_only/cached_only/main.out
Normal file
|
@ -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
|
3
tests/specs/npm_tests/cached_only/cached_only/main.ts
Normal file
3
tests/specs/npm_tests/cached_only/cached_only/main.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import chalk from "npm:chalk@5";
|
||||
|
||||
console.log(chalk);
|
9
tests/specs/npm_tests/check_all/__test__.jsonc
Normal file
9
tests/specs/npm_tests/check_all/__test__.jsonc
Normal file
|
@ -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
|
||||
}
|
9
tests/specs/npm_tests/check_local/__test__.jsonc
Normal file
9
tests/specs/npm_tests/check_local/__test__.jsonc
Normal file
|
@ -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
|
||||
}
|
3
tests/specs/npm_tests/check_local/check_errors/main.ts
Normal file
3
tests/specs/npm_tests/check_local/check_errors/main.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import * as test from "npm:@denotest/check-error";
|
||||
|
||||
console.log(test.Asdf); // should error
|
19
tests/specs/npm_tests/check_local/check_errors/main_all.out
Normal file
19
tests/specs/npm_tests/check_local/check_errors/main_all.out
Normal file
|
@ -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.
|
|
@ -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
|
|
@ -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
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc
Normal file
8
tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/cjs_require_esm/__test__.jsonc
Normal file
8
tests/specs/npm_tests/cjs_require_esm/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc
Normal file
8
tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/cjs_sub_path/__test__.jsonc
Normal file
8
tests/specs/npm_tests/cjs_sub_path/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
9
tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc
Normal file
9
tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc
Normal file
|
@ -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
|
||||
}
|
|
@ -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
|
8
tests/specs/npm_tests/cjs_with_deps/__test__.jsonc
Normal file
8
tests/specs/npm_tests/cjs_with_deps/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
12
tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js
Normal file
12
tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js
Normal file
|
@ -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);
|
33
tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out
Normal file
33
tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out
Normal file
|
@ -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
|
|
@ -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])
|
|
@ -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": []
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
8
tests/specs/npm_tests/compare_globals/__test__.jsonc
Normal file
8
tests/specs/npm_tests/compare_globals/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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
|
||||
[]
|
9
tests/specs/npm_tests/create_require/__test__.jsonc
Normal file
9
tests/specs/npm_tests/create_require/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/deno_cache/__test__.jsonc
Normal file
8
tests/specs/npm_tests/deno_cache/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc
Normal file
8
tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -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/"
|
||||
}
|
||||
}
|
8
tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc
Normal file
8
tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
4
tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out
Normal file
4
tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out
Normal file
|
@ -0,0 +1,4 @@
|
|||
this
|
||||
is
|
||||
a
|
||||
test
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
this
|
||||
is
|
||||
a
|
||||
test
|
8
tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc
Normal file
8
tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
this
|
||||
is
|
||||
a
|
||||
test
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
this
|
||||
is
|
||||
a
|
||||
test
|
8
tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc
Normal file
8
tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
_______
|
||||
< Hello >
|
||||
-------
|
||||
\ ^__^
|
||||
\ (oo)\_______
|
||||
(__)\ )\/\
|
||||
||----w |
|
||||
|| ||
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
_______
|
||||
< Hello >
|
||||
-------
|
||||
\ ^__^
|
||||
\ (oo)\_______
|
||||
(__)\ )\/\
|
||||
||----w |
|
||||
|| ||
|
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
_______
|
||||
< Hello >
|
||||
-------
|
||||
\ ^__^
|
||||
\ (oo)\_______
|
||||
(__)\ )\/\
|
||||
||----w |
|
||||
|| ||
|
8
tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc
Normal file
8
tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc
Normal file
|
@ -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/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
_______
|
||||
( Hello )
|
||||
-------
|
||||
o ^__^
|
||||
o (oo)\_______
|
||||
(__)\ )\/\
|
||||
||----w |
|
||||
|| ||
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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);
|
|
@ -0,0 +1,2 @@
|
|||
1
|
||||
2
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@denotest/different-nested-dep": "1.0.0",
|
||||
"@denotest/different-nested-dep-child": "2.0.0"
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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);
|
|
@ -0,0 +1,2 @@
|
|||
1
|
||||
2
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@denotest/different-nested-dep": "1.0.0",
|
||||
"@denotest/different-nested-dep-child": "2.0.0"
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue