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

feat(unstable): repurpose --unstable-detect-cjs to attempt loading more modules as cjs #27094

Merged
merged 18 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into feat_unstable_detect_cjs
  • Loading branch information
dsherret committed Nov 26, 2024
commit 3683a1a867af8a23bef6e79d09c2ab2af37200ae
9 changes: 6 additions & 3 deletions cli/lsp/language_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3771,11 +3771,14 @@ impl Inner {
fn task_definitions(&self) -> LspResult<Vec<TaskDefinition>> {
let mut result = vec![];
for config_file in self.config.tree.config_files() {
if let Some(tasks) = config_file.to_tasks_config().ok().flatten() {
for (name, def) in tasks {
if let Some(tasks) = json!(&config_file.json.tasks).as_object() {
for (name, value) in tasks {
let Some(command) = value.as_str() else {
continue;
};
result.push(TaskDefinition {
name: name.clone(),
command: def.command.clone(),
command: command.to_string(),
source_uri: url_to_uri(&config_file.specifier)
.map_err(|_| LspError::internal_error())?,
});
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.