mirror of
https://github.com/denoland/deno.git
synced 2025-01-12 00:54:02 -05:00
refactor: remove DENO_UNSTABLE_NPM_SYNC_DOWNLOAD
and custom sync functionality (#20504)
https://github.com/denoland/deno/pull/20488 enables us to remove this functionality. This is better because our test suite is now not testing a separate code path.
This commit is contained in:
parent
54890ee98b
commit
e66d3c2c2e
26 changed files with 92 additions and 78 deletions
|
@ -18,7 +18,6 @@ use deno_npm::NpmPackageCacheFolderId;
|
||||||
use deno_runtime::deno_fs;
|
use deno_runtime::deno_fs;
|
||||||
use deno_semver::package::PackageNv;
|
use deno_semver::package::PackageNv;
|
||||||
use deno_semver::Version;
|
use deno_semver::Version;
|
||||||
use once_cell::sync::Lazy;
|
|
||||||
|
|
||||||
use crate::args::CacheSetting;
|
use crate::args::CacheSetting;
|
||||||
use crate::http_util::HttpClient;
|
use crate::http_util::HttpClient;
|
||||||
|
@ -29,17 +28,6 @@ use crate::util::progress_bar::ProgressBar;
|
||||||
|
|
||||||
use super::tarball::verify_and_extract_tarball;
|
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";
|
const NPM_PACKAGE_SYNC_LOCK_FILENAME: &str = ".deno_sync_lock";
|
||||||
|
|
||||||
pub fn with_folder_sync_lock(
|
pub fn with_folder_sync_lock(
|
||||||
|
|
|
@ -7,7 +7,6 @@ mod resolution;
|
||||||
mod resolvers;
|
mod resolvers;
|
||||||
mod tarball;
|
mod tarball;
|
||||||
|
|
||||||
pub use cache::should_sync_download;
|
|
||||||
pub use cache::NpmCache;
|
pub use cache::NpmCache;
|
||||||
pub use cache::NpmCacheDir;
|
pub use cache::NpmCacheDir;
|
||||||
pub use installer::PackageJsonDepsInstaller;
|
pub use installer::PackageJsonDepsInstaller;
|
||||||
|
|
|
@ -29,9 +29,7 @@ use crate::http_util::HttpClient;
|
||||||
use crate::util::fs::atomic_write_file;
|
use crate::util::fs::atomic_write_file;
|
||||||
use crate::util::progress_bar::ProgressBar;
|
use crate::util::progress_bar::ProgressBar;
|
||||||
use crate::util::sync::AtomicFlag;
|
use crate::util::sync::AtomicFlag;
|
||||||
use crate::util::sync::TaskQueue;
|
|
||||||
|
|
||||||
use super::cache::should_sync_download;
|
|
||||||
use super::cache::NpmCache;
|
use super::cache::NpmCache;
|
||||||
|
|
||||||
static NPM_REGISTRY_DEFAULT_URL: Lazy<Url> = Lazy::new(|| {
|
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]
|
#[async_trait]
|
||||||
impl NpmRegistryApi for CliNpmRegistryApi {
|
impl NpmRegistryApi for CliNpmRegistryApi {
|
||||||
async fn package_info(
|
async fn package_info(
|
||||||
&self,
|
&self,
|
||||||
name: &str,
|
name: &str,
|
||||||
) -> Result<Arc<NpmPackageInfo>, NpmRegistryPackageInfoLoadError> {
|
) -> Result<Arc<NpmPackageInfo>, NpmRegistryPackageInfoLoadError> {
|
||||||
let result = if should_sync_download() {
|
match self.inner().maybe_package_info(name).await {
|
||||||
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 {
|
|
||||||
Ok(Some(info)) => Ok(info),
|
Ok(Some(info)) => Ok(info),
|
||||||
Ok(None) => Err(NpmRegistryPackageInfoLoadError::PackageNotExists {
|
Ok(None) => Err(NpmRegistryPackageInfoLoadError::PackageNotExists {
|
||||||
package_name: name.to_string(),
|
package_name: name.to_string(),
|
||||||
|
|
|
@ -20,7 +20,6 @@ use deno_runtime::deno_fs::FileSystem;
|
||||||
use deno_runtime::deno_node::NodePermissions;
|
use deno_runtime::deno_node::NodePermissions;
|
||||||
use deno_runtime::deno_node::NodeResolutionMode;
|
use deno_runtime::deno_node::NodeResolutionMode;
|
||||||
|
|
||||||
use crate::npm::cache::should_sync_download;
|
|
||||||
use crate::npm::NpmCache;
|
use crate::npm::NpmCache;
|
||||||
|
|
||||||
/// Part of the resolution that interacts with the file system.
|
/// Part of the resolution that interacts with the file system.
|
||||||
|
@ -127,17 +126,10 @@ impl RegistryReadPermissionChecker {
|
||||||
|
|
||||||
/// Caches all the packages in parallel.
|
/// Caches all the packages in parallel.
|
||||||
pub async fn cache_packages(
|
pub async fn cache_packages(
|
||||||
mut packages: Vec<NpmResolutionPackage>,
|
packages: Vec<NpmResolutionPackage>,
|
||||||
cache: &Arc<NpmCache>,
|
cache: &Arc<NpmCache>,
|
||||||
registry_url: &Url,
|
registry_url: &Url,
|
||||||
) -> Result<(), AnyError> {
|
) -> 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());
|
let mut handles = Vec::with_capacity(packages.len());
|
||||||
for package in packages {
|
for package in packages {
|
||||||
let cache = cache.clone();
|
let cache = cache.clone();
|
||||||
|
@ -147,12 +139,8 @@ pub async fn cache_packages(
|
||||||
.ensure_package(&package.id.nv, &package.dist, ®istry_url)
|
.ensure_package(&package.id.nv, &package.dist, ®istry_url)
|
||||||
.await
|
.await
|
||||||
});
|
});
|
||||||
if sync_download {
|
|
||||||
handle.await??;
|
|
||||||
} else {
|
|
||||||
handles.push(handle);
|
handles.push(handle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
let results = futures::future::join_all(handles).await;
|
let results = futures::future::join_all(handles).await;
|
||||||
for result in results {
|
for result in results {
|
||||||
// surface the first error
|
// surface the first error
|
||||||
|
|
|
@ -42,7 +42,6 @@ use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::npm::cache::mixed_case_package_name_encode;
|
use crate::npm::cache::mixed_case_package_name_encode;
|
||||||
use crate::npm::cache::should_sync_download;
|
|
||||||
use crate::npm::resolution::NpmResolution;
|
use crate::npm::resolution::NpmResolution;
|
||||||
use crate::npm::NpmCache;
|
use crate::npm::NpmCache;
|
||||||
use crate::util::fs::copy_dir_recursive;
|
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
|
// Copy (hardlink in future) <global_registry_cache>/<package_id>/ to
|
||||||
// node_modules/.deno/<package_folder_id_folder_name>/node_modules/<package_name>
|
// node_modules/.deno/<package_folder_id_folder_name>/node_modules/<package_name>
|
||||||
let sync_download = should_sync_download();
|
let package_partitions =
|
||||||
let mut package_partitions =
|
|
||||||
snapshot.all_system_packages_partitioned(system_info);
|
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>>> =
|
let mut handles: Vec<JoinHandle<Result<(), AnyError>>> =
|
||||||
Vec::with_capacity(package_partitions.packages.len());
|
Vec::with_capacity(package_partitions.packages.len());
|
||||||
let mut newest_packages_by_name: HashMap<&String, &NpmResolutionPackage> =
|
let mut newest_packages_by_name: HashMap<&String, &NpmResolutionPackage> =
|
||||||
|
@ -363,13 +356,9 @@ async fn sync_resolution_with_fs(
|
||||||
drop(pb_guard); // explicit for clarity
|
drop(pb_guard); // explicit for clarity
|
||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
if sync_download {
|
|
||||||
handle.await??;
|
|
||||||
} else {
|
|
||||||
handles.push(handle);
|
handles.push(handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let results = futures::future::join_all(handles).await;
|
let results = futures::future::join_all(handles).await;
|
||||||
for result in results {
|
for result in results {
|
||||||
|
|
|
@ -26,7 +26,6 @@ use crate::npm::CliNpmRegistryApi;
|
||||||
use crate::npm::NpmResolution;
|
use crate::npm::NpmResolution;
|
||||||
use crate::npm::PackageJsonDepsInstaller;
|
use crate::npm::PackageJsonDepsInstaller;
|
||||||
use crate::util::sync::AtomicFlag;
|
use crate::util::sync::AtomicFlag;
|
||||||
use crate::util::sync::TaskQueue;
|
|
||||||
|
|
||||||
/// Result of checking if a specifier is mapped via
|
/// Result of checking if a specifier is mapped via
|
||||||
/// an import map or package.json.
|
/// an import map or package.json.
|
||||||
|
@ -110,7 +109,6 @@ pub struct CliGraphResolver {
|
||||||
npm_resolution: Arc<NpmResolution>,
|
npm_resolution: Arc<NpmResolution>,
|
||||||
package_json_deps_installer: Arc<PackageJsonDepsInstaller>,
|
package_json_deps_installer: Arc<PackageJsonDepsInstaller>,
|
||||||
found_package_json_dep_flag: Arc<AtomicFlag>,
|
found_package_json_dep_flag: Arc<AtomicFlag>,
|
||||||
sync_download_queue: Option<Arc<TaskQueue>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for CliGraphResolver {
|
impl Default for CliGraphResolver {
|
||||||
|
@ -136,7 +134,6 @@ impl Default for CliGraphResolver {
|
||||||
npm_resolution,
|
npm_resolution,
|
||||||
package_json_deps_installer: Default::default(),
|
package_json_deps_installer: Default::default(),
|
||||||
found_package_json_dep_flag: 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,
|
npm_resolution,
|
||||||
package_json_deps_installer,
|
package_json_deps_installer,
|
||||||
found_package_json_dep_flag: Default::default(),
|
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
|
// this will internally cache the package information
|
||||||
let package_name = package_name.to_string();
|
let package_name = package_name.to_string();
|
||||||
let api = self.npm_registry_api.clone();
|
let api = self.npm_registry_api.clone();
|
||||||
let maybe_sync_download_queue = self.sync_download_queue.clone();
|
|
||||||
async move {
|
async move {
|
||||||
let permit = if let Some(task_queue) = &maybe_sync_download_queue {
|
api
|
||||||
Some(task_queue.acquire().await)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
|
|
||||||
let result = api
|
|
||||||
.package_info(&package_name)
|
.package_info(&package_name)
|
||||||
.await
|
.await
|
||||||
.map(|_| ())
|
.map(|_| ())
|
||||||
.map_err(|err| err.into());
|
.map_err(|err| err.into())
|
||||||
drop(permit);
|
|
||||||
result
|
|
||||||
}
|
}
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1689,8 +1689,10 @@ itest!(non_existent_dep {
|
||||||
http_server: true,
|
http_server: true,
|
||||||
exit_code: 1,
|
exit_code: 1,
|
||||||
output_str: Some(concat!(
|
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-dep\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/non-existent\n",
|
"Download http://localhost:4545/npm/registry/@denotest/non-existent\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
"error: npm package '@denotest/non-existent' does not exist.\n"
|
"error: npm package '@denotest/non-existent' does not exist.\n"
|
||||||
)),
|
)),
|
||||||
});
|
});
|
||||||
|
@ -1701,12 +1703,16 @@ itest!(non_existent_dep_version {
|
||||||
http_server: true,
|
http_server: true,
|
||||||
exit_code: 1,
|
exit_code: 1,
|
||||||
output_str: Some(concat!(
|
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/non-existent-dep-version\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\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
|
// does two downloads because when failing once it max tries to
|
||||||
// get the latest version a second time
|
// 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/non-existent-dep-version\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\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"
|
"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")
|
.args("cache main.ts npm:@denotest/esm-basic@1.0.0")
|
||||||
.run();
|
.run();
|
||||||
output.assert_matches_text(concat!(
|
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-basic\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\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\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/cjs-default-export/1.0.0.tgz\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-basic/1.0.0.tgz\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default/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
|
// 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
|
// now try running without it, it should download the package now
|
||||||
let output = test_context.new_command().args("run main.ts").run();
|
let output = test_context.new_command().args("run main.ts").run();
|
||||||
output.assert_matches_text(concat!(
|
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/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\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
"Node esm importing node cjs\n[WILDCARD]",
|
"Node esm importing node cjs\n[WILDCARD]",
|
||||||
));
|
));
|
||||||
output.assert_exit_code(0);
|
output.assert_exit_code(0);
|
||||||
|
@ -1818,8 +1828,10 @@ fn reload_info_not_found_cache_but_exists_remote() {
|
||||||
// now try running, it should work
|
// now try running, it should work
|
||||||
let output = test_context.new_command().args("run main.ts").run();
|
let output = test_context.new_command().args("run main.ts").run();
|
||||||
output.assert_matches_text(concat!(
|
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/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\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
"Node esm importing node cjs\n[WILDCARD]",
|
"Node esm importing node cjs\n[WILDCARD]",
|
||||||
));
|
));
|
||||||
output.assert_exit_code(0);
|
output.assert_exit_code(0);
|
||||||
|
@ -1854,10 +1866,14 @@ fn reload_info_not_found_cache_but_exists_remote() {
|
||||||
// now try running, it should work
|
// now try running, it should work
|
||||||
let output = test_context.new_command().args("run main.ts").run();
|
let output = test_context.new_command().args("run main.ts").run();
|
||||||
output.assert_matches_text(concat!(
|
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/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\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
|
"[UNORDERED_START]\n",
|
||||||
"Initialize @denotest/cjs-default-export@1.0.0\n",
|
"Initialize @denotest/cjs-default-export@1.0.0\n",
|
||||||
"Initialize @denotest/esm-import-cjs-default@1.0.0\n",
|
"Initialize @denotest/esm-import-cjs-default@1.0.0\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
"Node esm importing node cjs\n[WILDCARD]",
|
"Node esm importing node cjs\n[WILDCARD]",
|
||||||
));
|
));
|
||||||
output.assert_exit_code(0);
|
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
|
// now try running, it should work and only initialize the new package
|
||||||
let output = test_context.new_command().args("run main.ts").run();
|
let output = test_context.new_command().args("run main.ts").run();
|
||||||
output.assert_matches_text(concat!(
|
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-basic\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\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\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
"Initialize @denotest/esm-basic@1.0.0\n",
|
"Initialize @denotest/esm-basic@1.0.0\n",
|
||||||
"Node esm importing node cjs\n[WILDCARD]",
|
"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
|
// now try running, it should work and only initialize the new package
|
||||||
let output = test_context.new_command().args("run main.ts").run();
|
let output = test_context.new_command().args("run main.ts").run();
|
||||||
output.assert_matches_text(concat!(
|
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/cjs-default-export\n",
|
||||||
"Download http://localhost:4545/npm/registry/@denotest/esm-basic\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/esm-import-cjs-default\n",
|
||||||
|
"[UNORDERED_END]\n",
|
||||||
"Node esm importing node cjs\n[WILDCARD]",
|
"Node esm importing node cjs\n[WILDCARD]",
|
||||||
));
|
));
|
||||||
output.assert_exit_code(0);
|
output.assert_exit_code(0);
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/react
|
Download http://localhost:4545/npm/registry/react
|
||||||
Download http://localhost:4545/npm/registry/loose-envify
|
Download http://localhost:4545/npm/registry/loose-envify
|
||||||
Download http://localhost:4545/npm/registry/js-tokens
|
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/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/loose-envify/loose-envify-1.4.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/js-tokens/js-tokens-4.0.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
|
Check file:///[WILDCARD]/jsx_not_checked/main.jsx
|
||||||
error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'.
|
error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'.
|
||||||
console.log(add("1", "2"));
|
console.log(add("1", "2"));
|
||||||
|
|
4
cli/tests/testdata/npm/cjs_sub_path/main.out
vendored
4
cli/tests/testdata/npm/cjs_sub_path/main.out
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/ajv
|
Download http://localhost:4545/npm/registry/ajv
|
||||||
Download http://localhost:4545/npm/registry/ajv-formats
|
Download http://localhost:4545/npm/registry/ajv-formats
|
||||||
Download http://localhost:4545/npm/registry/chai
|
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/pathval
|
||||||
Download http://localhost:4545/npm/registry/type-detect
|
Download http://localhost:4545/npm/registry/type-detect
|
||||||
Download http://localhost:4545/npm/registry/punycode
|
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/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/ajv-formats/ajv-formats-2.1.1.tgz
|
||||||
Download http://localhost:4545/npm/registry/assertion-error/assertion-error-1.1.0.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/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/type-detect/type-detect-4.0.8.tgz
|
||||||
Download http://localhost:4545/npm/registry/uri-js/uri-js-4.4.1.tgz
|
Download http://localhost:4545/npm/registry/uri-js/uri-js-4.4.1.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
Fini
|
Fini
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/chalk
|
Download http://localhost:4545/npm/registry/chalk
|
||||||
Download http://localhost:4545/npm/registry/chai
|
Download http://localhost:4545/npm/registry/chai
|
||||||
Download http://localhost:4545/npm/registry/ansi-styles
|
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/color-convert
|
||||||
Download http://localhost:4545/npm/registry/has-flag
|
Download http://localhost:4545/npm/registry/has-flag
|
||||||
Download http://localhost:4545/npm/registry/color-name
|
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/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/assertion-error/assertion-error-1.1.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/chai/chai-4.3.6.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/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/supports-color/supports-color-7.2.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
|
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
chalk cjs loads
|
chalk cjs loads
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/chalk
|
Download http://localhost:4545/npm/registry/chalk
|
||||||
Download http://localhost:4545/npm/registry/chai
|
Download http://localhost:4545/npm/registry/chai
|
||||||
Download http://localhost:4545/npm/registry/ansi-styles
|
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/color-convert
|
||||||
Download http://localhost:4545/npm/registry/has-flag
|
Download http://localhost:4545/npm/registry/has-flag
|
||||||
Download http://localhost:4545/npm/registry/color-name
|
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/ansi-styles/ansi-styles-4.3.0.tgz
|
||||||
Initialize ansi-styles@4.3.0
|
Initialize ansi-styles@4.3.0
|
||||||
Download http://localhost:4545/npm/registry/assertion-error/assertion-error-1.1.0.tgz
|
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
|
Initialize supports-color@7.2.0
|
||||||
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
|
Download http://localhost:4545/npm/registry/type-detect/type-detect-4.0.8.tgz
|
||||||
Initialize type-detect@4.0.8
|
Initialize type-detect@4.0.8
|
||||||
|
[UNORDERED_END]
|
||||||
chalk cjs loads
|
chalk cjs loads
|
||||||
|
|
4
cli/tests/testdata/npm/cjs_yargs/main.out
vendored
4
cli/tests/testdata/npm/cjs_yargs/main.out
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/yargs
|
Download http://localhost:4545/npm/registry/yargs
|
||||||
Download http://localhost:4545/npm/registry/cliui
|
Download http://localhost:4545/npm/registry/cliui
|
||||||
Download http://localhost:4545/npm/registry/decamelize
|
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/p-limit
|
||||||
Download http://localhost:4545/npm/registry/color-name
|
Download http://localhost:4545/npm/registry/color-name
|
||||||
Download http://localhost:4545/npm/registry/p-try
|
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
|
Download http://localhost:4545/npm/registry/ansi-regex/ansi-regex-5.0.1.tgz
|
||||||
Initialize ansi-regex@5.0.1
|
Initialize ansi-regex@5.0.1
|
||||||
Download http://localhost:4545/npm/registry/ansi-styles/ansi-styles-4.3.0.tgz
|
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
|
Initialize yargs@15.4.1
|
||||||
Download http://localhost:4545/npm/registry/yargs-parser/yargs-parser-18.1.3.tgz
|
Download http://localhost:4545/npm/registry/yargs-parser/yargs-parser-18.1.3.tgz
|
||||||
Initialize yargs-parser@18.1.3
|
Initialize yargs-parser@18.1.3
|
||||||
|
[UNORDERED_END]
|
||||||
start server on :8000
|
start server on :8000
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/@types/node
|
Download http://localhost:4545/npm/registry/@types/node
|
||||||
Download http://localhost:4545/npm/registry/@denotest/globals
|
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/@denotest/globals/1.0.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/@types/node/node-18.8.2.tgz
|
Download http://localhost:4545/npm/registry/@types/node/node-18.8.2.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
Check file:///[WILDCARD]/npm/compare_globals/main.ts
|
Check file:///[WILDCARD]/npm/compare_globals/main.ts
|
||||||
true
|
true
|
||||||
true
|
true
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
|
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
|
||||||
Download http://localhost:4545/npm/registry/supports-esm
|
Download http://localhost:4545/npm/registry/supports-esm
|
||||||
Download http://localhost:4545/npm/registry/has-package-exports
|
Download http://localhost:4545/npm/registry/has-package-exports
|
||||||
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
|
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/@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/@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/has-package-exports/has-package-exports-1.3.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
|
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
{ hello: "from esm" }
|
{ hello: "from esm" }
|
||||||
{ hello: "from foo" }
|
{ hello: "from foo" }
|
||||||
{ hello: "from esm client" }
|
{ hello: "from esm client" }
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
|
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
|
||||||
Download http://localhost:4545/npm/registry/supports-esm
|
Download http://localhost:4545/npm/registry/supports-esm
|
||||||
Download http://localhost:4545/npm/registry/has-package-exports
|
Download http://localhost:4545/npm/registry/has-package-exports
|
||||||
Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
|
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/@denotest/conditional-exports/1.0.0.tgz
|
||||||
Initialize @denotest/conditional-exports@1.0.0
|
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
|
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
|
Initialize has-package-exports@1.3.0
|
||||||
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
|
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
|
||||||
Initialize supports-esm@1.0.0
|
Initialize supports-esm@1.0.0
|
||||||
|
[UNORDERED_END]
|
||||||
{ hello: "from esm" }
|
{ hello: "from esm" }
|
||||||
{ hello: "from foo" }
|
{ hello: "from foo" }
|
||||||
{ hello: "from esm client" }
|
{ hello: "from esm client" }
|
||||||
|
|
4
cli/tests/testdata/npm/deno_cache.out
vendored
4
cli/tests/testdata/npm/deno_cache.out
vendored
|
@ -1,4 +1,8 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/chalk
|
Download http://localhost:4545/npm/registry/chalk
|
||||||
Download http://localhost:4545/npm/registry/mkdirp
|
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/chalk/chalk-5.0.1.tgz
|
||||||
Download http://localhost:4545/npm/registry/mkdirp/mkdirp-1.0.4.tgz
|
Download http://localhost:4545/npm/registry/mkdirp/mkdirp-1.0.4.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
|
|
4
cli/tests/testdata/npm/import_map/main.out
vendored
4
cli/tests/testdata/npm/import_map/main.out
vendored
|
@ -1,6 +1,10 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/chalk
|
Download http://localhost:4545/npm/registry/chalk
|
||||||
Download http://localhost:4545/npm/registry/@denotest/dual-cjs-esm
|
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/@denotest/dual-cjs-esm/1.0.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz
|
Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
chalk import map loads
|
chalk import map loads
|
||||||
esm
|
esm
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/@denotest/MixedCase
|
Download http://localhost:4545/npm/registry/@denotest/MixedCase
|
||||||
Download http://localhost:4545/npm/registry/@denotest/CAPITALS
|
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/CAPITALS/1.0.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
5
|
5
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/@denotest/MixedCase
|
Download http://localhost:4545/npm/registry/@denotest/MixedCase
|
||||||
Download http://localhost:4545/npm/registry/@denotest/CAPITALS
|
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/CAPITALS/1.0.0.tgz
|
||||||
Initialize @denotest/CAPITALS@1.0.0
|
Initialize @denotest/CAPITALS@1.0.0
|
||||||
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/MixedCase/1.0.0.tgz
|
||||||
Initialize @denotest/MixedCase@1.0.0
|
Initialize @denotest/MixedCase@1.0.0
|
||||||
|
[UNORDERED_END]
|
||||||
5
|
5
|
||||||
true
|
true
|
||||||
true
|
true
|
||||||
|
|
|
@ -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-child
|
||||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
|
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
|
||||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer
|
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/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-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-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/1.0.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/2.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/2.0.0.tgz
|
||||||
|
[UNORDERED_END]
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
[UNORDERED_START]
|
||||||
Initialize @denotest/peer-dep-test-child@1.0.0
|
Initialize @denotest/peer-dep-test-child@1.0.0
|
||||||
Initialize @denotest/peer-dep-test-child@2.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-grandchild@1.0.0
|
||||||
Initialize @denotest/peer-dep-test-peer@1.0.0
|
Initialize @denotest/peer-dep-test-peer@1.0.0
|
||||||
Initialize @denotest/peer-dep-test-peer@2.0.0
|
Initialize @denotest/peer-dep-test-peer@2.0.0
|
||||||
|
[UNORDERED_END]
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
|
|
@ -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-child
|
||||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
|
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-grandchild
|
||||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer
|
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/1.0.0.tgz
|
||||||
Initialize @denotest/peer-dep-test-child@1.0.0
|
Initialize @denotest/peer-dep-test-child@1.0.0
|
||||||
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-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
|
Initialize @denotest/peer-dep-test-peer@1.0.0
|
||||||
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/2.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/peer-dep-test-peer/2.0.0.tgz
|
||||||
Initialize @denotest/peer-dep-test-peer@2.0.0
|
Initialize @denotest/peer-dep-test-peer@2.0.0
|
||||||
|
[UNORDERED_END]
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
|
|
@ -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-no-types-entry
|
||||||
Download http://localhost:4545/npm/registry/@denotest/types-entry-value-not-exists
|
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-entry-value-not-exists/1.0.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/@denotest/types-no-types-entry/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
|
Check file://[WILDCARD]/types_no_types_entry/main.ts
|
||||||
error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
|
error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
|
||||||
const result: string = getValue();
|
const result: string = getValue();
|
||||||
|
|
2
cli/tests/testdata/task/package_json/bin.out
vendored
2
cli/tests/testdata/task/package_json/bin.out
vendored
|
@ -1,8 +1,10 @@
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin
|
Download http://localhost:4545/npm/registry/@denotest/bin
|
||||||
|
[UNORDERED_START]
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin/0.5.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/bin/0.5.0.tgz
|
||||||
Initialize @denotest/bin@0.5.0
|
Initialize @denotest/bin@0.5.0
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
|
||||||
Initialize @denotest/bin@1.0.0
|
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.
|
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"
|
Task bin @denotest/bin hi && cli-esm testing this out && npx cli-cjs test "extra"
|
||||||
hi
|
hi
|
||||||
|
|
|
@ -57,6 +57,7 @@ impl TaskQueue {
|
||||||
|
|
||||||
/// Alternate API that acquires a permit internally
|
/// Alternate API that acquires a permit internally
|
||||||
/// for the duration of the future.
|
/// for the duration of the future.
|
||||||
|
#[allow(unused)]
|
||||||
pub fn run<'a, R>(
|
pub fn run<'a, R>(
|
||||||
&'a self,
|
&'a self,
|
||||||
future: impl Future<Output = R> + 'a,
|
future: impl Future<Output = R> + 'a,
|
||||||
|
|
|
@ -54,7 +54,8 @@ macro_rules! assert_not_contains {
|
||||||
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn assert_wildcard_match(actual: &str, expected: &str) {
|
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);
|
pretty_assertions::assert_eq!(actual, expected);
|
||||||
} else {
|
} else {
|
||||||
match crate::wildcard_match_detailed(expected, actual) {
|
match crate::wildcard_match_detailed(expected, actual) {
|
||||||
|
|
Loading…
Reference in a new issue