mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
fix: remove conditional unstable type-checking from other commands (#21991)
It appears I missed this in https://github.com/denoland/deno/pull/21825.
This commit is contained in:
parent
35fc6f3ab9
commit
568337f3f4
10 changed files with 10 additions and 83 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1126,9 +1126,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deno_config"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0257353ef2a16029e15d8ee47509cac1a29eba8a223caa747996f6c7719c09d4"
|
||||
checksum = "81fec482ce578388108cfd4a7ca900be7b8aea5081e1922ff3c5f87f0767c531"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glob",
|
||||
|
|
|
@ -55,7 +55,7 @@ winres.workspace = true
|
|||
[dependencies]
|
||||
deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] }
|
||||
deno_cache_dir = "=0.6.1"
|
||||
deno_config = "=0.8.0"
|
||||
deno_config = "=0.8.1"
|
||||
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
||||
deno_doc = { version = "=0.93.0", features = ["html"] }
|
||||
deno_emit = "=0.33.0"
|
||||
|
|
|
@ -799,26 +799,11 @@ impl CliOptions {
|
|||
}
|
||||
|
||||
pub fn ts_type_lib_window(&self) -> TsTypeLib {
|
||||
if self.flags.unstable
|
||||
|| !self.flags.unstable_features.is_empty()
|
||||
|| self
|
||||
.maybe_config_file
|
||||
.as_ref()
|
||||
.map(|f| !f.json.unstable.is_empty())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
TsTypeLib::UnstableDenoWindow
|
||||
} else {
|
||||
TsTypeLib::DenoWindow
|
||||
}
|
||||
TsTypeLib::DenoWindow
|
||||
}
|
||||
|
||||
pub fn ts_type_lib_worker(&self) -> TsTypeLib {
|
||||
if self.flags.unstable {
|
||||
TsTypeLib::UnstableDenoWorker
|
||||
} else {
|
||||
TsTypeLib::DenoWorker
|
||||
}
|
||||
TsTypeLib::DenoWorker
|
||||
}
|
||||
|
||||
pub fn cache_setting(&self) -> CacheSetting {
|
||||
|
|
|
@ -99,20 +99,14 @@ itest!(check_node_builtin_modules_js {
|
|||
});
|
||||
|
||||
itest!(check_no_error_truncation {
|
||||
args: "check --quiet check/no_error_truncation/main.ts --config check/no_error_truncation/deno.json",
|
||||
output: "check/no_error_truncation/main.out",
|
||||
envs: vec![("NO_COLOR".to_string(), "1".to_string())],
|
||||
exit_code: 1,
|
||||
});
|
||||
|
||||
itest!(check_broadcast_channel_stable {
|
||||
args: "check --quiet check/broadcast_channel.ts",
|
||||
output: "check/broadcast_channel.ts.error.out",
|
||||
args: "check --quiet check/no_error_truncation/main.ts --config check/no_error_truncation/deno.json",
|
||||
output: "check/no_error_truncation/main.out",
|
||||
envs: vec![("NO_COLOR".to_string(), "1".to_string())],
|
||||
exit_code: 1,
|
||||
});
|
||||
|
||||
itest!(check_broadcast_channel_unstable {
|
||||
args: "check --quiet --unstable check/broadcast_channel.ts",
|
||||
itest!(check_broadcast_channel {
|
||||
args: "check --quiet check/broadcast_channel.ts",
|
||||
exit_code: 0,
|
||||
});
|
||||
|
||||
|
@ -122,17 +116,6 @@ itest!(check_deno_not_found {
|
|||
exit_code: 1,
|
||||
});
|
||||
|
||||
itest!(check_deno_unstable_not_found {
|
||||
args: "check --quiet --no-config check/deno_unstable_not_found/main.ts",
|
||||
output: "check/deno_unstable_not_found/main.out",
|
||||
exit_code: 1,
|
||||
});
|
||||
|
||||
itest!(check_deno_unstable_from_config {
|
||||
args: "check --quiet --config check/deno_unstable_not_found/deno.json check/deno_unstable_not_found/main.ts",
|
||||
output_str: Some(""),
|
||||
});
|
||||
|
||||
itest!(check_with_exclude_option_by_dir {
|
||||
args:
|
||||
"check --quiet --config check/exclude_option/deno.exclude_dir.json check/exclude_option/ignored/index.ts",
|
||||
|
|
|
@ -1566,17 +1566,6 @@ itest!(top_level_for_await_ts {
|
|||
output: "run/top_level_await/top_level_for_await.out",
|
||||
});
|
||||
|
||||
itest!(unstable_disabled {
|
||||
args: "run --reload --check run/unstable.ts",
|
||||
exit_code: 1,
|
||||
output: "run/unstable_disabled.out",
|
||||
});
|
||||
|
||||
itest!(unstable_enabled {
|
||||
args: "run --quiet --reload --unstable run/unstable.ts",
|
||||
output: "run/unstable_enabled.out",
|
||||
});
|
||||
|
||||
itest!(unstable_disabled_js {
|
||||
args: "run --reload run/unstable.js",
|
||||
output: "run/unstable_disabled_js.out",
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
error: TS2304 [ERROR]: Cannot find name 'BroadcastChannel'.
|
||||
const _channel = new BroadcastChannel("foo");
|
||||
~~~~~~~~~~~~~~~~
|
||||
at [WILDCARD]
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"unstable": ["cron", "http", "kv"]
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
error: TS2551 [ERROR]: Property 'openKv' does not exist on type 'typeof Deno'. Did you mean 'open'? 'Deno.openKv' is an unstable API. Did you forget to run with the '--unstable' flag, or did you mean 'open'? If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
|
||||
Deno.openKv;
|
||||
~~~~~~
|
||||
at file:///[WILDCARD]/deno_unstable_not_found/main.ts:1:6
|
||||
|
||||
'open' is declared here.
|
||||
export function open(
|
||||
~~~~
|
||||
at asset:///lib.deno.ns.d.ts:[WILDCARD]:19
|
||||
|
||||
TS2339 [ERROR]: Property 'createHttpClient' does not exist on type 'typeof Deno'. 'Deno.createHttpClient' is an unstable API. Did you forget to run with the '--unstable' flag? If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
|
||||
Deno.createHttpClient;
|
||||
~~~~~~~~~~~~~~~~
|
||||
at file:///[WILDCARD]/deno_unstable_not_found/main.ts:2:6
|
||||
|
||||
Found 2 errors.
|
|
@ -1,2 +0,0 @@
|
|||
Deno.openKv;
|
||||
Deno.createHttpClient;
|
5
cli/tests/testdata/run/unstable_disabled.out
vendored
5
cli/tests/testdata/run/unstable_disabled.out
vendored
|
@ -1,5 +0,0 @@
|
|||
[WILDCARD]
|
||||
error: TS2339 [ERROR]: Property 'umask' does not exist on type 'typeof Deno'. 'Deno.umask' is an unstable API. Did you forget to run with the '--unstable' flag? If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
|
||||
console.log(Deno.umask);
|
||||
~~~~~
|
||||
at [WILDCARD]/unstable.ts:1:18
|
Loading…
Add table
Reference in a new issue