Skip to content

Commit b3efdf3

Browse files
authored
chore: release v0.3.0 (#30)
- Trait-based ecosystem architecture with unified handlers - Performance optimizations (parallel fetching, O(N log K) cache eviction, parse-once pattern) - Fix npm code action duplicate quotes bug
1 parent d5823be commit b3efdf3

File tree

4 files changed

+61
-23
lines changed

4 files changed

+61
-23
lines changed

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.0] - 2025-12-24
11+
12+
### Added
13+
- **Trait-based ecosystem architecture** — Unified handling for all package ecosystems
14+
- `Ecosystem` trait with parser, registry, and formatter
15+
- `EcosystemRegistry` for dynamic ecosystem lookup by URI
16+
- `LockfileProvider` trait for lock file parsing
17+
- Simplified document lifecycle with generic handlers
18+
19+
### Changed
20+
- **Performance optimizations** — Significant latency improvements
21+
- Parallel registry fetching with `futures::join_all` (97% faster document open)
22+
- O(N log K) cache eviction algorithm with min-heap (90% faster eviction)
23+
- Parse-once pattern for version sorting (50% faster parsing)
24+
- String formatting optimization with `write!()` macro
25+
- Early lock release pattern with `get_document_clone()`
26+
27+
### Fixed
28+
- npm: Remove extra quotes in code action version replacements (#29)
29+
1030
## [0.2.3] - 2025-12-23
1131

1232
### Changed
@@ -106,7 +126,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106126
- TLS enforced via rustls
107127
- cargo-deny configured for vulnerability scanning
108128

109-
[Unreleased]: https://github.com/bug-ops/deps-lsp/compare/v0.2.3...HEAD
129+
[Unreleased]: https://github.com/bug-ops/deps-lsp/compare/v0.3.0...HEAD
130+
[0.3.0]: https://github.com/bug-ops/deps-lsp/compare/v0.2.3...v0.3.0
110131
[0.2.3]: https://github.com/bug-ops/deps-lsp/compare/v0.2.2...v0.2.3
111132
[0.2.2]: https://github.com/bug-ops/deps-lsp/compare/v0.2.1...v0.2.2
112133
[0.2.1]: https://github.com/bug-ops/deps-lsp/compare/v0.2.0...v0.2.1

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude = ["crates/deps-zed"]
44
resolver = "2"
55

66
[workspace.package]
7-
version = "0.2.3"
7+
version = "0.3.0"
88
edition = "2024"
99
rust-version = "1.89"
1010
authors = ["Andrei G"]
@@ -15,11 +15,11 @@ repository = "https://github.com/bug-ops/deps-lsp"
1515
async-trait = "0.1"
1616
criterion = "0.8"
1717
dashmap = "6.1"
18-
deps-core = { version = "0.2.3", path = "crates/deps-core" }
19-
deps-cargo = { version = "0.2.3", path = "crates/deps-cargo" }
20-
deps-npm = { version = "0.2.3", path = "crates/deps-npm" }
21-
deps-pypi = { version = "0.2.3", path = "crates/deps-pypi" }
22-
deps-lsp = { version = "0.2.3", path = "crates/deps-lsp" }
18+
deps-core = { version = "0.3.0", path = "crates/deps-core" }
19+
deps-cargo = { version = "0.3.0", path = "crates/deps-cargo" }
20+
deps-npm = { version = "0.3.0", path = "crates/deps-npm" }
21+
deps-pypi = { version = "0.3.0", path = "crates/deps-pypi" }
22+
deps-lsp = { version = "0.3.0", path = "crates/deps-lsp" }
2323
futures = "0.3"
2424
insta = "1"
2525
mockito = "1"

README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,24 @@ A universal Language Server Protocol (LSP) server for dependency management acro
1818
- **Diagnostics** — Warnings for outdated, unknown, or yanked dependencies
1919
- **Hover Information** — Package descriptions with resolved version from lock file
2020
- **Code Actions** — Quick fixes to update dependencies
21+
- **High Performance** — Parallel fetching, optimized caching, minimal latency
2122

2223
![deps-lsp in action](https://raw.githubusercontent.com/bug-ops/deps-zed/main/assets/img.png)
2324

25+
## Performance
26+
27+
deps-lsp is optimized for responsiveness:
28+
29+
| Operation | Latency | Notes |
30+
|-----------|---------|-------|
31+
| Document open (50 deps) | ~150ms | Parallel registry fetching |
32+
| Inlay hints | <100ms | Cached version lookups |
33+
| Hover | <50ms | Pre-fetched metadata |
34+
| Code actions | <50ms | No network calls |
35+
36+
> [!TIP]
37+
> Lock file support provides instant resolved versions without network requests.
38+
2439
## Supported Ecosystems
2540

2641
| Ecosystem | Manifest File | Status |
@@ -171,19 +186,21 @@ deps-lsp/
171186

172187
### Architecture
173188

174-
The codebase uses a trait-based architecture with the `EcosystemHandler` trait providing a unified interface for all package ecosystems:
189+
The codebase uses a trait-based architecture with the `Ecosystem` trait providing a unified interface for all package ecosystems:
175190

176191
```rust
177-
// Each ecosystem implements EcosystemHandler
178-
impl EcosystemHandler for CargoHandler { ... }
179-
impl EcosystemHandler for NpmHandler { ... }
180-
impl EcosystemHandler for PyPiHandler { ... }
181-
182-
// Generic LSP handlers work with any ecosystem
183-
generate_inlay_hints::<H: EcosystemHandler>(...);
184-
generate_hover_info::<H: EcosystemHandler>(...);
185-
generate_code_actions::<H: EcosystemHandler>(...);
186-
generate_diagnostics::<H: EcosystemHandler>(...);
192+
// Each ecosystem implements the Ecosystem trait
193+
pub trait Ecosystem: Send + Sync {
194+
fn id(&self) -> &'static str;
195+
fn display_name(&self) -> &'static str;
196+
fn matches_uri(&self, uri: &Url) -> bool;
197+
fn registry(&self) -> Arc<dyn Registry>;
198+
fn formatter(&self) -> Arc<dyn EcosystemFormatter>;
199+
async fn parse_manifest(&self, content: &str, uri: &Url) -> Result<ParseResult>;
200+
}
201+
202+
// EcosystemRegistry discovers the right handler for any manifest file
203+
let ecosystem = registry.get_for_uri(&uri);
187204
```
188205

189206
### Benchmarks

0 commit comments

Comments
 (0)