Repository navigation
Conversation
Import-specifier completions and LSP npm/jsr resolution used empty newest-dependency-date options, so they could offer versions newer than the workspace minimumDependencyAge. Use the same age, exclude, and fallback resolution as the CLI, and rebuild the search APIs when config reloads. Co-authored-by: ump45nose <ump45nose@users.noreply.github.com>
ump45nose
force-pushed
the
cursor/fix-lsp-minimum-dependency-age-31009-bd8c
branch
from
November 6, 2026 13:33
ae7f62c to
a26bb5b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CLI honors
minimumDependencyAge(minutes, ISO 8601 duration, RFC3339 date,false/0, and the object form withexclude) when resolving npm and JSR versions. The language server did not: it built its npm/jsr search APIs and managed npm version resolver with empty newest-dependency-date options, so import-specifier completions and LSP-side matching of the newest version could offer versions newer than the configured cutoff.This change shares the CLI helpers that turn a
MinimumDependencyAgeConfiginto npm and JSR newest-dependency-date options, includingexcludeexact names and wildcard prefixes and the.npmrcmin-release-age/ 24-hour fallbacks when no age is set. Those options are used for import completions, managed npm resolution, and JSR cache resolution. The process-global search APIs are rebuilt after the config tree refreshes, so editingdeno.jsonupdates completions.Closes #31009
Tests
cargo test -p integration_tests --test integration lsp_completions_minimum_dependency_age— passed. Versions newer than2025-03-01are omitted forjsr:@denotest/addandnpm:@denotest/min-release-age-latest.excludeandminimumDependencyAge: falseoffer them again after adeno.jsonreload.cargo test -p integration_tests --test integration lsp_completions— 23 passed, includinglsp_completions_npm,lsp_completions_deno_json_imports,lsp_completions_npm_package_exports, andlsp_completions_registry.cargo test -p deno_resolver -p deno --lib minimum_dependency_age— 5 passed../xis unavailable here (nodenobinary).rustfmtwith the repo config (--check) passed on the changed files. Clippy with the./x lintdeny set reported only pre-existing#[allow]s without a reason incli/lsp/trace.rs.cargo clippy -p integration_tests --testspassed once that pre-existing lint was allowed sodeno_maybe_synccould compile.AI assistance
This change was written with an AI coding agent (Cursor).