Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(unstable/publish): repect --no-check in no-slow-types #22653

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions cli/tools/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ impl TypeChecker {
mut graph: ModuleGraph,
options: CheckOptions,
) -> Result<(Arc<ModuleGraph>, Diagnostics), AnyError> {
debug_assert_ne!(options.type_check_mode, TypeCheckMode::None);
if graph.roots.is_empty() {
if !options.type_check_mode.is_true() || graph.roots.is_empty() {
return Ok((graph.into(), Default::default()));
}

Expand Down
4 changes: 1 addition & 3 deletions cli/tools/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use crate::args::jsr_url;
use crate::args::CliOptions;
use crate::args::Flags;
use crate::args::PublishFlags;
use crate::args::TypeCheckMode;
use crate::cache::LazyGraphSourceParser;
use crate::cache::ParsedSourceCache;
use crate::factory::CliFactory;
Expand Down Expand Up @@ -860,8 +859,7 @@ async fn build_and_check_graph_for_publish(
lib: cli_options.ts_type_lib_window(),
log_ignored_options: false,
reload: cli_options.reload_flag(),
// force type checking this
type_check_mode: TypeCheckMode::Local,
type_check_mode: cli_options.type_check_mode(),
},
)
.await?;
Expand Down
1 change: 0 additions & 1 deletion tests/testdata/publish/successful_no_check.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Checking for slow types in the public API...
Check file:///[WILDCARD]/publish/successful/mod.ts
Publishing @foo/bar@1.0.0 ...
Successfully published @foo/bar@1.0.0
Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details