Skip to content

Commit 4cbd309

Browse files
committed
docs: add Swift/SPM ecosystem to CHANGELOG and README
1 parent cc947a3 commit 4cbd309

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Added
11+
- **Swift/SPM ecosystem support** — New `deps-swift` crate with full Package.swift and Package.resolved support
12+
- Regex-based Package.swift parser covering all 9 `.package()` call signatures (from, upToNextMajor, upToNextMinor, exact, half-open range, closed range, branch, revision, path)
13+
- Comment stripping with byte-offset preservation for accurate LSP positions
14+
- Multiline `.package()` call support
15+
- GitHub API registry — version resolution via repository tags, package search via GitHub Search API
16+
- Package identity as `owner/repo` extracted from Git URLs
17+
- Version requirements normalized to semver ranges at parse time
18+
- Package.resolved lockfile support for all 3 schema versions (v1, v2, v3)
19+
- Owner/repo validation to prevent URL injection in GitHub API calls
20+
- Feature-gated registration in deps-lsp (`swift`)
21+
1022
## [0.8.0] - 2026-02-23
1123

1224
### Added

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
[![MSRV](https://img.shields.io/badge/MSRV-1.89-blue)](https://blog.rust-lang.org/)
99
[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
1010

11-
A universal Language Server Protocol (LSP) server for dependency management across Cargo, npm, PyPI, Go, Bundler, Dart, Maven, and Gradle ecosystems.
11+
A universal Language Server Protocol (LSP) server for dependency management across Cargo, npm, PyPI, Go, Bundler, Dart, Maven, Gradle, and Swift ecosystems.
1212

1313
## Features
1414

1515
- **Intelligent autocomplete** — Package names, versions, and feature flags
1616
- **Version hints** — Inlay hints showing latest available versions
1717
- **Loading indicators** — Visual feedback during registry fetches with LSP progress support
18-
- **Lock file support** — Reads resolved versions from Cargo.lock, package-lock.json, poetry.lock, uv.lock, go.sum, Gemfile.lock, pubspec.lock
18+
- **Lock file support** — Reads resolved versions from Cargo.lock, package-lock.json, poetry.lock, uv.lock, go.sum, Gemfile.lock, pubspec.lock, Package.resolved
1919
- **Diagnostics** — Warnings for outdated, unknown, or yanked dependencies
2020
- **Hover information** — Package descriptions with resolved version from lock file
2121
- **Code actions** — Quick fixes to update dependencies
@@ -49,9 +49,17 @@ deps-lsp is optimized for responsiveness:
4949
| Dart | Pub | `pubspec.yaml` | ✅ Supported |
5050
| Java | Maven | `pom.xml` | ✅ Supported |
5151
| Java | Gradle | `libs.versions.toml`, `build.gradle.kts`, `build.gradle`, `settings.gradle` | ✅ Supported |
52+
| Swift | SPM | `Package.swift` | ✅ Supported |
5253

5354
> [!NOTE]
54-
> PyPI support includes PEP 621, PEP 735 (dependency-groups), and Poetry formats. Go support includes require, replace, and exclude directives with pseudo-version handling. Bundler support includes git, path, and GitHub sources plus pessimistic version requirements (`~>`). Dart support includes hosted, git, path, and SDK dependency sources with caret version semantics. Maven support covers `dependencies`, `dependencyManagement`, and `build/plugins` sections with Maven qualifier-aware version comparison. Gradle support covers Version Catalogs (`libs.versions.toml`), Kotlin DSL (`build.gradle.kts`), Groovy DSL (`build.gradle`), and `settings.gradle` plugin declarations with version.ref resolution. Packages are resolved from Maven Central, Google Maven (Android), and Gradle Plugin Portal (fallback).
55+
> **Ecosystem details:**
56+
> - **PyPI** — PEP 621, PEP 735 (dependency-groups), Poetry formats
57+
> - **Go**`require`, `replace`, `exclude` directives, pseudo-version handling
58+
> - **Bundler** — git/path/GitHub sources, pessimistic operator (`~>`)
59+
> - **Dart** — hosted, git, path, SDK sources, caret version semantics
60+
> - **Maven**`dependencies`, `dependencyManagement`, `build/plugins`, qualifier-aware version comparison
61+
> - **Gradle** — Version Catalogs, Kotlin/Groovy DSL, `settings.gradle` plugins; resolves from Maven Central, Google Maven, Gradle Plugin Portal
62+
> - **Swift** — all `.package()` forms (from, upToNextMajor/Minor, exact, range, branch, revision, path); versions via GitHub API tags
5563
5664
## Installation
5765

@@ -117,6 +125,7 @@ cargo install deps-lsp --no-default-features --features "pypi"
117125
| `dart` | Dart | pubspec.yaml ||
118126
| `maven` | Java | pom.xml ||
119127
| `gradle` | Java | libs.versions.toml, build.gradle.kts, build.gradle ||
128+
| `swift` | Swift | Package.swift ||
120129

121130
## Usage
122131

@@ -154,7 +163,7 @@ Enable inlay hints in Zed settings:
154163
```lua
155164
require('lspconfig').deps_lsp.setup({
156165
cmd = { "deps-lsp", "--stdio" },
157-
filetypes = { "toml", "json", "gomod", "ruby", "yaml", "xml" },
166+
filetypes = { "toml", "json", "gomod", "ruby", "yaml", "xml", "swift" },
158167
})
159168

160169
-- Enable inlay hints (Neovim 0.10+)
@@ -297,6 +306,7 @@ deps-lsp/
297306
│ ├── deps-dart/ # pubspec.yaml parser + pub.dev registry
298307
│ ├── deps-maven/ # pom.xml parser + Maven Central registry
299308
│ ├── deps-gradle/ # Gradle parser (Version Catalog, Kotlin/Groovy DSL)
309+
│ ├── deps-swift/ # Package.swift parser + GitHub API registry
300310
│ ├── deps-lsp/ # Main LSP server
301311
│ └── deps-zed/ # Zed extension (WASM)
302312
├── .config/ # nextest configuration

0 commit comments

Comments
 (0)