mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
feat: suggest deno install --entrypoint
instead of deno cache
(#25228)
Hides `deno cache` from `--help` output. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
a1d0a427e8
commit
5057f58145
15 changed files with 19 additions and 15 deletions
|
@ -1651,7 +1651,8 @@ Future runs of this module will trigger no downloads or compilation unless --rel
|
||||||
|
|
||||||
<y>Read more:</> <c>https://docs.deno.com/go/cache</>"),
|
<y>Read more:</> <c>https://docs.deno.com/go/cache</>"),
|
||||||
UnstableArgsConfig::ResolutionOnly,
|
UnstableArgsConfig::ResolutionOnly,
|
||||||
)
|
)
|
||||||
|
.hide(true)
|
||||||
.defer(|cmd| {
|
.defer(|cmd| {
|
||||||
compile_args(cmd)
|
compile_args(cmd)
|
||||||
.arg(check_arg(false))
|
.arg(check_arg(false))
|
||||||
|
|
|
@ -246,7 +246,7 @@ impl CliLockfile {
|
||||||
// has an extra newline at the end
|
// has an extra newline at the end
|
||||||
let diff = diff.trim_end();
|
let diff = diff.trim_end();
|
||||||
Err(deno_core::anyhow::anyhow!(
|
Err(deno_core::anyhow::anyhow!(
|
||||||
"The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.\nchanges:\n{diff}"
|
"The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.\nchanges:\n{diff}"
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -240,7 +240,7 @@ impl LanguageServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Similar to `deno cache` on the command line, where modules will be cached
|
/// Similar to `deno install --entrypoint` on the command line, where modules will be cached
|
||||||
/// in the Deno cache, including any of their dependencies.
|
/// in the Deno cache, including any of their dependencies.
|
||||||
pub async fn cache(
|
pub async fn cache(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
// deno-lint-ignore-file
|
// deno-lint-ignore-file
|
||||||
// Only for testing types. Invoke with `deno cache`
|
// Only for testing types. Invoke with `deno install --entrypoint`
|
||||||
|
|
||||||
const remote = Deno.dlopen("dummy_lib.so", {
|
const remote = Deno.dlopen("dummy_lib.so", {
|
||||||
method1: { parameters: ["usize", "bool"], result: "void" },
|
method1: { parameters: ["usize", "bool"], result: "void" },
|
||||||
|
|
|
@ -1821,7 +1821,10 @@ fn reload_info_not_found_cache_but_exists_remote() {
|
||||||
{
|
{
|
||||||
// create it
|
// create it
|
||||||
temp_dir.write("deno.json", r#"{}"#);
|
temp_dir.write("deno.json", r#"{}"#);
|
||||||
test_context.new_command().args("cache main.ts").run();
|
test_context
|
||||||
|
.new_command()
|
||||||
|
.args("install --entrypoint main.ts")
|
||||||
|
.run();
|
||||||
assert!(temp_dir.path().join("deno.lock").exists());
|
assert!(temp_dir.path().join("deno.lock").exists());
|
||||||
|
|
||||||
// remove a version found in the lockfile
|
// remove a version found in the lockfile
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "npm:@denotest/add@1": "1.0.0"
|
4 | - "npm:@denotest/add@1": "1.0.0"
|
||||||
4 | + "npm:@denotest/add@1": "1.0.0",
|
4 | + "npm:@denotest/add@1": "1.0.0",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Download http://localhost:4545/welcome.ts
|
Download http://localhost:4545/welcome.ts
|
||||||
error: Uncaught (in promise) TypeError: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: Uncaught (in promise) TypeError: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
10 | - }
|
10 | - }
|
||||||
10 | + },
|
10 | + },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Download http://127.0.0.1:4250/@denotest/add/meta.json
|
Download http://127.0.0.1:4250/@denotest/add/meta.json
|
||||||
Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json
|
Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json
|
||||||
Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts
|
Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts
|
||||||
error: Uncaught (in promise) TypeError: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: Uncaught (in promise) TypeError: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "npm:@denotest/add@1": "1.0.0"
|
4 | - "npm:@denotest/add@1": "1.0.0"
|
||||||
4 | + "jsr:@denotest/add@1": "1.0.0",
|
4 | + "jsr:@denotest/add@1": "1.0.0",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Download http://localhost:4260/@denotest/subtract
|
Download http://localhost:4260/@denotest/subtract
|
||||||
error: Uncaught (in promise) TypeError: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: Uncaught (in promise) TypeError: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "npm:@denotest/add@1": "1.0.0"
|
4 | - "npm:@denotest/add@1": "1.0.0"
|
||||||
4 | + "npm:@denotest/add@1": "1.0.0",
|
4 | + "npm:@denotest/add@1": "1.0.0",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "jsr:@denotest/add@1": "1.0.0"
|
4 | - "jsr:@denotest/add@1": "1.0.0"
|
||||||
5 | - },
|
5 | - },
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Download http://127.0.0.1:4250/@denotest/add/0.2.0_meta.json
|
Download http://127.0.0.1:4250/@denotest/add/0.2.0_meta.json
|
||||||
Download http://127.0.0.1:4250/@denotest/add/0.2.0/mod.ts
|
Download http://127.0.0.1:4250/@denotest/add/0.2.0/mod.ts
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "jsr:@denotest/add@1": "1.0.0"
|
4 | - "jsr:@denotest/add@1": "1.0.0"
|
||||||
5 | - },
|
5 | - },
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Download http://localhost:4260/@denotest/subtract
|
Download http://localhost:4260/@denotest/subtract
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "npm:@denotest/add@1": "1.0.0"
|
4 | - "npm:@denotest/add@1": "1.0.0"
|
||||||
4 | + "npm:@denotest/add@1": "1.0.0",
|
4 | + "npm:@denotest/add@1": "1.0.0",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Download http://localhost:4260/@denotest/bin
|
Download http://localhost:4260/@denotest/bin
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "npm:@denotest/add@1": "1.0.0"
|
4 | - "npm:@denotest/add@1": "1.0.0"
|
||||||
4 | + "npm:@denotest/add@1": "1.0.0",
|
4 | + "npm:@denotest/add@1": "1.0.0",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
4 | - "npm:@denotest/add@1": "1.0.0"
|
4 | - "npm:@denotest/add@1": "1.0.0"
|
||||||
4 | + "npm:@denotest/add@1": "1.0.0",
|
4 | + "npm:@denotest/add@1": "1.0.0",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Download http://localhost:4260/@denotest/add
|
Download http://localhost:4260/@denotest/add
|
||||||
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
changes:
|
changes:
|
||||||
1 | -
|
1 | -
|
||||||
1 | +{
|
1 | +{
|
||||||
|
|
Loading…
Reference in a new issue