summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/npm/cache.rs12
-rw-r--r--cli/npm/mod.rs1
-rw-r--r--cli/npm/registry.rs15
-rw-r--r--cli/npm/resolvers/common.rs16
-rw-r--r--cli/npm/resolvers/local.rs15
-rw-r--r--cli/resolver.rs25
-rw-r--r--cli/tests/integration/npm_tests.rs20
-rw-r--r--cli/tests/testdata/check/jsx_not_checked/main.out2
-rw-r--r--cli/tests/testdata/npm/cjs_sub_path/main.out4
-rw-r--r--cli/tests/testdata/npm/cjs_with_deps/main.out4
-rw-r--r--cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out4
-rw-r--r--cli/tests/testdata/npm/cjs_yargs/main.out4
-rw-r--r--cli/tests/testdata/npm/compare_globals/main.out4
-rw-r--r--cli/tests/testdata/npm/conditional_exports/main.out4
-rw-r--r--cli/tests/testdata/npm/conditional_exports/main_node_modules.out4
-rw-r--r--cli/tests/testdata/npm/deno_cache.out4
-rw-r--r--cli/tests/testdata/npm/import_map/main.out4
-rw-r--r--cli/tests/testdata/npm/mixed_case_package_name/global.out4
-rw-r--r--cli/tests/testdata/npm/mixed_case_package_name/local.out4
-rw-r--r--cli/tests/testdata/npm/peer_deps_with_copied_folders/main.out4
-rw-r--r--cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out2
-rw-r--r--cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out4
-rw-r--r--cli/tests/testdata/npm/types_no_types_entry/main.out4
-rw-r--r--cli/tests/testdata/task/package_json/bin.out2
-rw-r--r--cli/util/sync.rs1
-rw-r--r--test_util/src/assertions.rs3
26 files changed, 92 insertions, 78 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs
index 587ce6fd0..f76bf6821 100644
--- a/cli/npm/cache.rs
+++ b/cli/npm/cache.rs
@@ -18,7 +18,6 @@ use deno_npm::NpmPackageCacheFolderId;
use deno_runtime::deno_fs;
use deno_semver::package::PackageNv;
use deno_semver::Version;
-use once_cell::sync::Lazy;
use crate::args::CacheSetting;
use crate::http_util::HttpClient;
@@ -29,17 +28,6 @@ use crate::util::progress_bar::ProgressBar;
use super::tarball::verify_and_extract_tarball;
-static SHOULD_SYNC_DOWNLOAD: Lazy<bool> =
- Lazy::new(|| std::env::var("DENO_UNSTABLE_NPM_SYNC_DOWNLOAD").is_ok());
-
-/// For some of the tests, we want downloading of packages
-/// to be deterministic so that the output is always the same
-pub fn should_sync_download() -> bool {
- // this gets called a lot when doing npm resolution and was taking
- // a significant amount of time, so cache it in a lazy
- *SHOULD_SYNC_DOWNLOAD
-}
-
const NPM_PACKAGE_SYNC_LOCK_FILENAME: &str = ".deno_sync_lock";
pub fn with_folder_sync_lock(
diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs
index 0191d8cd7..41eb09a57 100644
--- a/cli/npm/mod.rs
+++ b/cli/npm/mod.rs
@@ -7,7 +7,6 @@ mod resolution;
mod resolvers;
mod tarball;
-pub use cache::should_sync_download;
pub use cache::NpmCache;
pub use cache::NpmCacheDir;
pub use installer::PackageJsonDepsInstaller;
diff --git a/cli/npm/registry.rs b/cli/npm/registry.rs
index ec0647023..e960d926f 100644
--- a/cli/npm/registry.rs
+++ b/cli/npm/registry.rs
@@ -29,9 +29,7 @@ use crate::http_util::HttpClient;
use crate::util::fs::atomic_write_file;
use crate::util::progress_bar::ProgressBar;
use crate::util::sync::AtomicFlag;
-use crate::util::sync::TaskQueue;
-use super::cache::should_sync_download;
use super::cache::NpmCache;
static NPM_REGISTRY_DEFAULT_URL: Lazy<Url> = Lazy::new(|| {
@@ -106,24 +104,13 @@ impl CliNpmRegistryApi {
}
}
-static SYNC_DOWNLOAD_TASK_QUEUE: Lazy<TaskQueue> =
- Lazy::new(TaskQueue::default);
-
#[async_trait]
impl NpmRegistryApi for CliNpmRegistryApi {
async fn package_info(
&self,
name: &str,
) -> Result<Arc<NpmPackageInfo>, NpmRegistryPackageInfoLoadError> {
- let result = if should_sync_download() {
- let inner = self.inner().clone();
- SYNC_DOWNLOAD_TASK_QUEUE
- .run(async move { inner.maybe_package_info(name).await })
- .await
- } else {
- self.inner().maybe_package_info(name).await
- };
- match result {
+ match self.inner().maybe_package_info(name).await {
Ok(Some(info)) => Ok(info),
Ok(None) => Err(NpmRegistryPackageInfoLoadError::PackageNotExists {
package_name: name.to_string(),
diff --git a/cli/npm/resolvers/common.rs b/cli/npm/resolvers/common.rs
index fec96738e..1991b2c72 100644
--- a/cli/npm/resolvers/common.rs
+++ b/cli/npm/resolvers/common.rs
@@ -20,7 +20,6 @@ use deno_runtime::deno_fs::FileSystem;
use deno_runtime::deno_node::NodePermissions;
use deno_runtime::deno_node::NodeResolutionMode;
-use crate::npm::cache::should_sync_download;
use crate::npm::NpmCache;
/// Part of the resolution that interacts with the file system.
@@ -127,17 +126,10 @@ impl RegistryReadPermissionChecker {
/// Caches all the packages in parallel.
pub async fn cache_packages(
- mut packages: Vec<NpmResolutionPackage>,
+ packages: Vec<NpmResolutionPackage>,
cache: &Arc<NpmCache>,
registry_url: &Url,
) -> Result<(), AnyError> {
- let sync_download = should_sync_download();
- if sync_download {
- // we're running the tests not with --quiet
- // and we want the output to be deterministic
- packages.sort_by(|a, b| a.id.cmp(&b.id));
- }
-
let mut handles = Vec::with_capacity(packages.len());
for package in packages {
let cache = cache.clone();
@@ -147,11 +139,7 @@ pub async fn cache_packages(
.ensure_package(&package.id.nv, &package.dist, &registry_url)
.await
});
- if sync_download {
- handle.await??;
- } else {
- handles.push(handle);
- }
+ handles.push(handle);
}
let results = futures::future::join_all(handles).await;
for result in results {
diff --git a/cli/npm/resolvers/local.rs b/cli/npm/resolvers/local.rs
index f8d7c2848..afa95e756 100644
--- a/cli/npm/resolvers/local.rs
+++ b/cli/npm/resolvers/local.rs
@@ -42,7 +42,6 @@ use serde::Deserialize;
use serde::Serialize;
use crate::npm::cache::mixed_case_package_name_encode;
-use crate::npm::cache::should_sync_download;
use crate::npm::resolution::NpmResolution;
use crate::npm::NpmCache;
use crate::util::fs::copy_dir_recursive;
@@ -300,14 +299,8 @@ async fn sync_resolution_with_fs(
//
// Copy (hardlink in future) <global_registry_cache>/<package_id>/ to
// node_modules/.deno/<package_folder_id_folder_name>/node_modules/<package_name>
- let sync_download = should_sync_download();
- let mut package_partitions =
+ let package_partitions =
snapshot.all_system_packages_partitioned(system_info);
- if sync_download {
- // we're running the tests not with --quiet
- // and we want the output to be deterministic
- package_partitions.packages.sort_by(|a, b| a.id.cmp(&b.id));
- }
let mut handles: Vec<JoinHandle<Result<(), AnyError>>> =
Vec::with_capacity(package_partitions.packages.len());
let mut newest_packages_by_name: HashMap<&String, &NpmResolutionPackage> =
@@ -363,11 +356,7 @@ async fn sync_resolution_with_fs(
drop(pb_guard); // explicit for clarity
Ok(())
});
- if sync_download {
- handle.await??;
- } else {
- handles.push(handle);
- }
+ handles.push(handle);
}
}
diff --git a/cli/resolver.rs b/cli/resolver.rs
index a7b2cd01e..6fd48db82 100644
--- a/cli/resolver.rs
+++ b/cli/resolver.rs
@@ -26,7 +26,6 @@ use crate::npm::CliNpmRegistryApi;
use crate::npm::NpmResolution;
use crate::npm::PackageJsonDepsInstaller;
use crate::util::sync::AtomicFlag;
-use crate::util::sync::TaskQueue;
/// Result of checking if a specifier is mapped via
/// an import map or package.json.
@@ -110,7 +109,6 @@ pub struct CliGraphResolver {
npm_resolution: Arc<NpmResolution>,
package_json_deps_installer: Arc<PackageJsonDepsInstaller>,
found_package_json_dep_flag: Arc<AtomicFlag>,
- sync_download_queue: Option<Arc<TaskQueue>>,
}
impl Default for CliGraphResolver {
@@ -136,7 +134,6 @@ impl Default for CliGraphResolver {
npm_resolution,
package_json_deps_installer: Default::default(),
found_package_json_dep_flag: Default::default(),
- sync_download_queue: Self::create_sync_download_queue(),
}
}
}
@@ -176,15 +173,6 @@ impl CliGraphResolver {
npm_resolution,
package_json_deps_installer,
found_package_json_dep_flag: Default::default(),
- sync_download_queue: Self::create_sync_download_queue(),
- }
- }
-
- fn create_sync_download_queue() -> Option<Arc<TaskQueue>> {
- if crate::npm::should_sync_download() {
- Some(Default::default())
- } else {
- None
}
}
@@ -314,21 +302,12 @@ impl NpmResolver for CliGraphResolver {
// this will internally cache the package information
let package_name = package_name.to_string();
let api = self.npm_registry_api.clone();
- let maybe_sync_download_queue = self.sync_download_queue.clone();
async move {
- let permit = if let Some(task_queue) = &maybe_sync_download_queue {
- Some(task_queue.acquire().await)
- } else {
- None
- };
-
- let result = api
+ api
.package_info(&package_name)
.await
.map(|_| ())
- .map_err(|err| err.into());
- drop(permit);
- result
+ .map_err(|err| err.into())
}
.boxed()
}
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index f9746f508..ff600637c 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -1689,8 +1689,10 @@ itest!(non_existent_dep {
http_server: true,
exit_code: 1,
output_str: Some(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/non-existent-dep\n",
"Download http://localhost:4545/npm/registry/@denotest/non-existent\n",
+ "[UNORDERED_END]\n",
"error: npm package '@denotest/non-existent' does not exist.\n"
)),
});
@@ -1701,12 +1703,16 @@ itest!(non_existent_dep_version {
http_server: true,
exit_code: 1,
output_str: Some(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/non-existent-dep-version\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\n",
+ "[UNORDERED_END]\n",
// does two downloads because when failing once it max tries to
// get the latest version a second time
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/non-existent-dep-version\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\n",
+ "[UNORDERED_END]\n",
"error: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n"
)),
});
@@ -1760,12 +1766,14 @@ fn reload_info_not_found_cache_but_exists_remote() {
.args("cache main.ts npm:@denotest/esm-basic@1.0.0")
.run();
output.assert_matches_text(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export/1.0.0.tgz\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default/1.0.0.tgz\n",
+ "[UNORDERED_END]\n",
));
// test in dependency
@@ -1788,8 +1796,10 @@ fn reload_info_not_found_cache_but_exists_remote() {
// now try running without it, it should download the package now
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n",
+ "[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
output.assert_exit_code(0);
@@ -1818,8 +1828,10 @@ fn reload_info_not_found_cache_but_exists_remote() {
// now try running, it should work
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n",
+ "[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
output.assert_exit_code(0);
@@ -1854,10 +1866,14 @@ fn reload_info_not_found_cache_but_exists_remote() {
// now try running, it should work
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n",
+ "[UNORDERED_END]\n",
+ "[UNORDERED_START]\n",
"Initialize @denotest/cjs-default-export@1.0.0\n",
"Initialize @denotest/esm-import-cjs-default@1.0.0\n",
+ "[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
output.assert_exit_code(0);
@@ -1887,9 +1903,11 @@ fn reload_info_not_found_cache_but_exists_remote() {
// now try running, it should work and only initialize the new package
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n",
+ "[UNORDERED_END]\n",
"Initialize @denotest/esm-basic@1.0.0\n",
"Node esm importing node cjs\n[WILDCARD]",
));
@@ -1923,9 +1941,11 @@ fn reload_info_not_found_cache_but_exists_remote() {
// now try running, it should work and only initialize the new package
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
+ "[UNORDERED_START]\n",
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\n",
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n",
+ "[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
output.assert_exit_code(0);
diff --git a/cli/tests/testdata/check/jsx_not_checked/main.out b/cli/tests/testdata/check/jsx_not_checked/main.out
index a4e1c60e4..82c1c2358 100644
--- a/cli/tests/testdata/check/jsx_not_checked/main.out
+++ b/cli/tests/testdata/check/jsx_not_checked/main.out
@@ -1,9 +1,11 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/react
Download http://localhost:4545/npm/registry/loose-envify
Download http://localhost:4545/npm/registry/js-tokens
Download http://localhost:4545/npm/registry/react/react-18.2.0.tgz
Download http://localhost:4545/npm/registry/loose-envify/loose-envify-1.4.0.tgz
Download http://localhost:4545/npm/registry/js-tokens/js-tokens-4.0.0.tgz
+[UNORDERED_END]
Check file:///[WILDCARD]/jsx_not_checked/main.jsx
error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'.
console.log(add("1", "2"));
diff --git a/cli/tests/testdata/npm/cjs_sub_path/main.out b/cli/tests/testdata/npm/cjs_sub_path/main.out
index e6e70f3aa..34ec9d63f 100644
--- a/cli/tests/testdata/npm/cjs_sub_path/main.out
+++ b/cli/tests/testdata/npm/cjs_sub_path/main.out
@@ -1,3 +1,4 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/ajv
Download http://localhost:4545/npm/registry/ajv-formats
Download http://localhost:4545/npm/registry/chai
@@ -13,6 +14,8 @@ Download http://localhost:4545/npm/registry/loupe
Download http://localhost:4545/npm/registry/pathval
Download http://localhost:4545/npm/registry/type-detect
Download http://localhost:4545/npm/registry/punycode
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/ajv/ajv-8.11.0.tgz
Download http://localhost:4545/npm/registry/ajv-formats/ajv-formats-2.1.1.tgz
Download http://localhost:4545/npm/registry/assertion-error/assertion-error-1.1.0.tgz
@@ -28,4 +31,5 @@ Download http://localhost:4545/npm/registry/punycode/punycode-2.1.1.tgz
Download http://localhost:4545/npm/registry/require-from-string/require-from-string-2.0.2.tgz
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
Download http://localhost:4545/npm/registry/uri-js/uri-js-4.4.1.tgz
+[UNORDERED_END]
Fini
diff --git a/cli/tests/testdata/npm/cjs_with_deps/main.out b/cli/tests/testdata/npm/cjs_with_deps/main.out
index 3a16ff467..aac21abba 100644
--- a/cli/tests/testdata/npm/cjs_with_deps/main.out
+++ b/cli/tests/testdata/npm/cjs_with_deps/main.out
@@ -1,3 +1,4 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/chalk
Download http://localhost:4545/npm/registry/chai
Download http://localhost:4545/npm/registry/ansi-styles
@@ -12,6 +13,8 @@ Download http://localhost:4545/npm/registry/type-detect
Download http://localhost:4545/npm/registry/color-convert
Download http://localhost:4545/npm/registry/has-flag
Download http://localhost:4545/npm/registry/color-name
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/ansi-styles/ansi-styles-4.3.0.tgz
Download http://localhost:4545/npm/registry/assertion-error/assertion-error-1.1.0.tgz
Download http://localhost:4545/npm/registry/chai/chai-4.3.6.tgz
@@ -26,4 +29,5 @@ Download http://localhost:4545/npm/registry/loupe/loupe-2.3.4.tgz
Download http://localhost:4545/npm/registry/pathval/pathval-1.1.1.tgz
Download http://localhost:4545/npm/registry/supports-color/supports-color-7.2.0.tgz
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
chalk cjs loads
diff --git a/cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out b/cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out
index 1ae22f510..548f567f1 100644
--- a/cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out
+++ b/cli/tests/testdata/npm/cjs_with_deps/main_node_modules.out
@@ -1,3 +1,4 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/chalk
Download http://localhost:4545/npm/registry/chai
Download http://localhost:4545/npm/registry/ansi-styles
@@ -12,6 +13,8 @@ Download http://localhost:4545/npm/registry/type-detect
Download http://localhost:4545/npm/registry/color-convert
Download http://localhost:4545/npm/registry/has-flag
Download http://localhost:4545/npm/registry/color-name
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/ansi-styles/ansi-styles-4.3.0.tgz
Initialize ansi-styles@4.3.0
Download http://localhost:4545/npm/registry/assertion-error/assertion-error-1.1.0.tgz
@@ -40,4 +43,5 @@ Download http://localhost:4545/npm/registry/supports-color/supports-color-7.2.0.
Initialize supports-color@7.2.0
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
Initialize type-detect@4.0.8
+[UNORDERED_END]
chalk cjs loads
diff --git a/cli/tests/testdata/npm/cjs_yargs/main.out b/cli/tests/testdata/npm/cjs_yargs/main.out
index 6aa34bce8..422cbb134 100644
--- a/cli/tests/testdata/npm/cjs_yargs/main.out
+++ b/cli/tests/testdata/npm/cjs_yargs/main.out
@@ -1,3 +1,4 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/yargs
Download http://localhost:4545/npm/registry/cliui
Download http://localhost:4545/npm/registry/decamelize
@@ -24,6 +25,8 @@ Download http://localhost:4545/npm/registry/color-convert
Download http://localhost:4545/npm/registry/p-limit
Download http://localhost:4545/npm/registry/color-name
Download http://localhost:4545/npm/registry/p-try
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/ansi-regex/ansi-regex-5.0.1.tgz
Initialize ansi-regex@5.0.1
Download http://localhost:4545/npm/registry/ansi-styles/ansi-styles-4.3.0.tgz
@@ -76,5 +79,6 @@ Download http://localhost:4545/npm/registry/yargs/yargs-15.4.1.tgz
Initialize yargs@15.4.1
Download http://localhost:4545/npm/registry/yargs-parser/yargs-parser-18.1.3.tgz
Initialize yargs-parser@18.1.3
+[UNORDERED_END]
start server on :8000
[WILDCARD]
diff --git a/cli/tests/testdata/npm/compare_globals/main.out b/cli/tests/testdata/npm/compare_globals/main.out
index 46900b882..31fcedda3 100644
--- a/cli/tests/testdata/npm/compare_globals/main.out
+++ b/cli/tests/testdata/npm/compare_globals/main.out
@@ -1,7 +1,11 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@types/node
Download http://localhost:4545/npm/registry/@denotest/globals
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/globals/1.0.0.tgz
Download http://localhost:4545/npm/registry/@types/node/node-18.8.2.tgz
+[UNORDERED_END]
Check file:///[WILDCARD]/npm/compare_globals/main.ts
true
true
diff --git a/cli/tests/testdata/npm/conditional_exports/main.out b/cli/tests/testdata/npm/conditional_exports/main.out
index 9f65c1f9a..dbd1b87fe 100644
--- a/cli/tests/testdata/npm/conditional_exports/main.out
+++ b/cli/tests/testdata/npm/conditional_exports/main.out
@@ -1,11 +1,15 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
Download http://localhost:4545/npm/registry/supports-esm
Download http://localhost:4545/npm/registry/has-package-exports
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/conditional-exports/1.0.0.tgz
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz
Download http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
+[UNORDERED_END]
{ hello: "from esm" }
{ hello: "from foo" }
{ hello: "from esm client" }
diff --git a/cli/tests/testdata/npm/conditional_exports/main_node_modules.out b/cli/tests/testdata/npm/conditional_exports/main_node_modules.out
index 94ce95581..460aec0f1 100644
--- a/cli/tests/testdata/npm/conditional_exports/main_node_modules.out
+++ b/cli/tests/testdata/npm/conditional_exports/main_node_modules.out
@@ -1,7 +1,10 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
Download http://localhost:4545/npm/registry/supports-esm
Download http://localhost:4545/npm/registry/has-package-exports
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/conditional-exports/1.0.0.tgz
Initialize @denotest/conditional-exports@1.0.0
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz
@@ -10,6 +13,7 @@ Download http://localhost:4545/npm/registry/has-package-exports/has-package-expo
Initialize has-package-exports@1.3.0
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
Initialize supports-esm@1.0.0
+[UNORDERED_END]
{ hello: "from esm" }
{ hello: "from foo" }
{ hello: "from esm client" }
diff --git a/cli/tests/testdata/npm/deno_cache.out b/cli/tests/testdata/npm/deno_cache.out
index e4f03e2f1..e2e68b7bb 100644
--- a/cli/tests/testdata/npm/deno_cache.out
+++ b/cli/tests/testdata/npm/deno_cache.out
@@ -1,4 +1,8 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/chalk
Download http://localhost:4545/npm/registry/mkdirp
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz
Download http://localhost:4545/npm/registry/mkdirp/mkdirp-1.0.4.tgz
+[UNORDERED_END]
diff --git a/cli/tests/testdata/npm/import_map/main.out b/cli/tests/testdata/npm/import_map/main.out
index 29f0f4283..a3d1d9f3a 100644
--- a/cli/tests/testdata/npm/import_map/main.out
+++ b/cli/tests/testdata/npm/import_map/main.out
@@ -1,6 +1,10 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/chalk
Download http://localhost:4545/npm/registry/@denotest/dual-cjs-esm
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/dual-cjs-esm/1.0.0.tgz
Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz
+[UNORDERED_END]
chalk import map loads
esm
diff --git a/cli/tests/testdata/npm/mixed_case_package_name/global.out b/cli/tests/testdata/npm/mixed_case_package_name/global.out
index 72417dd71..33d09890b 100644
--- a/cli/tests/testdata/npm/mixed_case_package_name/global.out
+++ b/cli/tests/testdata/npm/mixed_case_package_name/global.out
@@ -1,5 +1,9 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/MixedCase
Download http://localhost:4545/npm/registry/@denotest/CAPITALS
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/CAPITALS/1.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
+[UNORDERED_END]
5
diff --git a/cli/tests/testdata/npm/mixed_case_package_name/local.out b/cli/tests/testdata/npm/mixed_case_package_name/local.out
index d21377fd6..782107eb1 100644
--- a/cli/tests/testdata/npm/mixed_case_package_name/local.out
+++ b/cli/tests/testdata/npm/mixed_case_package_name/local.out
@@ -1,9 +1,13 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/MixedCase
Download http://localhost:4545/npm/registry/@denotest/CAPITALS
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/CAPITALS/1.0.0.tgz
Initialize @denotest/CAPITALS@1.0.0
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
Initialize @denotest/MixedCase@1.0.0
+[UNORDERED_END]
5
true
true
diff --git a/cli/tests/testdata/npm/peer_deps_with_copied_folders/main.out b/cli/tests/testdata/npm/peer_deps_with_copied_folders/main.out
index ce0dc6896..32fa3b76f 100644
--- a/cli/tests/testdata/npm/peer_deps_with_copied_folders/main.out
+++ b/cli/tests/testdata/npm/peer_deps_with_copied_folders/main.out
@@ -1,10 +1,14 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child/1.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child/2.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild/1.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/1.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/2.0.0.tgz
+[UNORDERED_END]
1
2
diff --git a/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out b/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out
index 6cbadb8e7..02b5cbafd 100644
--- a/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out
+++ b/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules.out
@@ -1,7 +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/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out b/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out
index 91a59e183..ed73c6cc2 100644
--- a/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out
+++ b/cli/tests/testdata/npm/peer_deps_with_copied_folders/main_node_modules_reload.out
@@ -1,6 +1,9 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child/1.0.0.tgz
Initialize @denotest/peer-dep-test-child@1.0.0
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-child/2.0.0.tgz
@@ -11,5 +14,6 @@ Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/1.0.0.t
Initialize @denotest/peer-dep-test-peer@1.0.0
Download http://localhost:4545/npm/registry/@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/cli/tests/testdata/npm/types_no_types_entry/main.out b/cli/tests/testdata/npm/types_no_types_entry/main.out
index 429940fff..059009d3f 100644
--- a/cli/tests/testdata/npm/types_no_types_entry/main.out
+++ b/cli/tests/testdata/npm/types_no_types_entry/main.out
@@ -1,7 +1,11 @@
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry
Download http://localhost:4545/npm/registry/@denotest/types-entry-value-not-exists
+[UNORDERED_END]
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/types-entry-value-not-exists/1.0.0.tgz
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry/1.0.0.tgz
+[UNORDERED_END]
Check file://[WILDCARD]/types_no_types_entry/main.ts
error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
const result: string = getValue();
diff --git a/cli/tests/testdata/task/package_json/bin.out b/cli/tests/testdata/task/package_json/bin.out
index 6cfa06d43..5e04796eb 100644
--- a/cli/tests/testdata/task/package_json/bin.out
+++ b/cli/tests/testdata/task/package_json/bin.out
@@ -1,8 +1,10 @@
Download http://localhost:4545/npm/registry/@denotest/bin
+[UNORDERED_START]
Download http://localhost:4545/npm/registry/@denotest/bin/0.5.0.tgz
Initialize @denotest/bin@0.5.0
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
Initialize @denotest/bin@1.0.0
+[UNORDERED_END]
Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release.
Task bin @denotest/bin hi && cli-esm testing this out && npx cli-cjs test "extra"
hi
diff --git a/cli/util/sync.rs b/cli/util/sync.rs
index 6eff974a7..e047a31bc 100644
--- a/cli/util/sync.rs
+++ b/cli/util/sync.rs
@@ -57,6 +57,7 @@ impl TaskQueue {
/// Alternate API that acquires a permit internally
/// for the duration of the future.
+ #[allow(unused)]
pub fn run<'a, R>(
&'a self,
future: impl Future<Output = R> + 'a,
diff --git a/test_util/src/assertions.rs b/test_util/src/assertions.rs
index 91ac9dd1c..abe782127 100644
--- a/test_util/src/assertions.rs
+++ b/test_util/src/assertions.rs
@@ -54,7 +54,8 @@ macro_rules! assert_not_contains {
#[track_caller]
pub fn assert_wildcard_match(actual: &str, expected: &str) {
- if !expected.contains("[WILDCARD]") && !expected.contains("[IGNORE_START]") {
+ if !expected.contains("[WILDCARD]") && !expected.contains("[UNORDERED_START]")
+ {
pretty_assertions::assert_eq!(actual, expected);
} else {
match crate::wildcard_match_detailed(expected, actual) {