upd 0.6.4__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ """Python support package for the upd command-line tool."""
2
+
3
+ __version__ = "0.0.1"
@@ -0,0 +1,55 @@
1
+ """
2
+ Command-line interface for upd.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ import os
8
+ import sys
9
+ import subprocess
10
+ from pathlib import Path
11
+
12
+
13
+ def find_native_binary() -> str:
14
+ """Find the native Rust binary."""
15
+ # In development mode, use the target directory binary
16
+ project_root = Path(__file__).resolve().parent.parent.parent
17
+ target_binary = project_root / "target" / "release" / "upd"
18
+ if target_binary.exists() and not target_binary.is_dir():
19
+ return str(target_binary)
20
+
21
+ # For Windows, check for .exe extension
22
+ if sys.platform == "win32":
23
+ target_binary = project_root / "target" / "release" / "upd.exe"
24
+ if target_binary.exists() and not target_binary.is_dir():
25
+ return str(target_binary)
26
+
27
+ # If we can't find the binary, raise an error
28
+ raise FileNotFoundError(
29
+ "Could not find the native upd binary. "
30
+ "Please ensure it was built with 'cargo build --release'."
31
+ )
32
+
33
+
34
+ def main() -> int:
35
+ """Run the upd command line tool."""
36
+ try:
37
+ native_binary = find_native_binary()
38
+ args = [native_binary] + sys.argv[1:]
39
+
40
+ if sys.platform == "win32":
41
+ completed_process = subprocess.run(args)
42
+ return completed_process.returncode
43
+ else:
44
+ os.execv(native_binary, args)
45
+ return 0
46
+ except FileNotFoundError as e:
47
+ print(f"Error: {e}", file=sys.stderr)
48
+ return 1
49
+ except Exception as e:
50
+ print(f"Error: {e}", file=sys.stderr)
51
+ return 1
52
+
53
+
54
+ if __name__ == "__main__":
55
+ sys.exit(main())
File without changes
Binary file
Binary file
@@ -0,0 +1,358 @@
1
+ Metadata-Version: 2.4
2
+ Name: upd
3
+ Version: 0.6.4
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Environment :: Console
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Rust
11
+ Classifier: Topic :: Software Development :: Build Tools
12
+ License-File: LICENSE
13
+ Summary: A fast dependency updater for Python, Node.js, Rust, Go, Ruby, Terraform, GitHub Actions, pre-commit, and Mise projects
14
+ Keywords: dependencies,update,python,nodejs,rust,go,ruby,terraform,github-actions
15
+ Home-Page: https://github.com/rvben/upd
16
+ Author-email: Ruben Jongejan <ruben.jongejan@gmail.com>
17
+ License: MIT
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
+ Project-URL: Documentation, https://github.com/rvben/upd#readme
21
+ Project-URL: Homepage, https://github.com/rvben/upd
22
+ Project-URL: Repository, https://github.com/rvben/upd
23
+
24
+ <p align="center">
25
+ <img src="assets/logo-wide.svg" alt="upd logo" width="400">
26
+ </p>
27
+
28
+ # upd
29
+
30
+ [![crates.io](https://img.shields.io/crates/v/upd.svg)](https://crates.io/crates/upd)
31
+ [![PyPI](https://img.shields.io/pypi/v/upd.svg)](https://pypi.org/project/upd/)
32
+ [![CI](https://github.com/rvben/upd/actions/workflows/ci.yml/badge.svg)](https://github.com/rvben/upd/actions/workflows/ci.yml)
33
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rvben/upd/blob/main/LICENSE)
34
+
35
+ A fast dependency updater for Python, Node.js, Rust, Go, Ruby, .NET, Terraform, GitHub Actions, pre-commit, and Mise projects, written in Rust.
36
+
37
+ ## Quick Start
38
+
39
+ ```bash
40
+ # Preview changes without modifying files (default)
41
+ uvx upd
42
+
43
+ # Apply updates
44
+ uvx upd --apply
45
+
46
+ # Or with pipx
47
+ pipx run upd --apply
48
+ ```
49
+
50
+ ## Features
51
+
52
+ - **Multi-ecosystem**: Python, Node.js, Rust, Go, Ruby, .NET, Terraform, GitHub Actions, pre-commit, Mise/asdf
53
+ - **Dry-run by default**: nothing is written without `--apply`
54
+ - **Fast**: parallel registry requests, with a 24-hour version cache
55
+ - **Constraint-aware**: respects `>=2.0,<3` (Python), `~> 7.1` (Ruby), and `^2.0.0` / `~2.0.0` (npm, Cargo)
56
+ - **Format-preserving**: keeps formatting, comments, and structure
57
+ - **Update filters**: `--only-bump`, `--max-bump`, `--package`, `--lang`, or approve one by one with `-i`
58
+ - **Major warnings**: breaking changes are flagged with `(MAJOR)`
59
+ - **Pre-release aware**: updates pre-releases to newer pre-releases
60
+ - **Cooldown**: hold back releases younger than N days, against supply-chain attacks
61
+ - **Security auditing**: OSV vulnerability scanning with auto-fix and SARIF output
62
+ - **Check mode**: exit 1 if updates are available (for CI and pre-commit)
63
+ - **Gitignore-aware**: honors `.gitignore` and prunes hidden directories, without missing the dotfiles it updates
64
+ - **Private registries**: authentication for PyPI, npm, Cargo, Go, and GitHub
65
+ - **Config file**: ignore or pin packages via `.updrc.toml`
66
+
67
+ ## Installation
68
+
69
+ ### From crates.io
70
+
71
+ ```bash
72
+ cargo install upd
73
+
74
+ # or with cargo-binstall (faster, pre-built binary)
75
+ cargo binstall upd
76
+ ```
77
+
78
+ ### From PyPI
79
+
80
+ ```bash
81
+ pip install upd
82
+ # or with uv
83
+ uv pip install upd
84
+ ```
85
+
86
+ If you installed an earlier release under the old distribution name, migrate
87
+ once with `pip uninstall upd-cli && pip install upd`. The `upd-cli` command
88
+ remains available as a compatibility alias.
89
+
90
+ ### From source
91
+
92
+ ```bash
93
+ git clone https://github.com/rvben/upd
94
+ cd upd
95
+ cargo install --path .
96
+ ```
97
+
98
+ ## Usage
99
+
100
+ ```bash
101
+ # Preview changes without modifying files (default when no --apply)
102
+ upd
103
+
104
+ # Apply updates to files
105
+ upd --apply
106
+
107
+ # Limit to specific files or directories
108
+ upd --apply requirements.txt pyproject.toml
109
+
110
+ # Approve updates one by one
111
+ upd -i
112
+
113
+ # Only the packages you name
114
+ upd --package requests,flask
115
+
116
+ # Cap the bump level (allow patch + minor, skip major). Updates above the
117
+ # ceiling are reported as held back, never as up to date, and do not
118
+ # change the exit code.
119
+ upd --max-bump minor
120
+
121
+ # Restrict to exactly one level (repeatable, comma-separated)
122
+ upd --only-bump major
123
+
124
+ # One ecosystem at a time: python, node, rust, go, ruby, dot-net,
125
+ # terraform, actions, pre-commit, mise, annotated
126
+ upd --lang python
127
+
128
+ # Exit 1 if anything is outdated (for CI and pre-commit)
129
+ upd --check
130
+
131
+ # Regenerate lockfiles after writing
132
+ upd --apply --lock
133
+
134
+ # Print the effective configuration and exit
135
+ upd --show-config
136
+ ```
137
+
138
+ `upd --help` lists every flag; [Stability](https://github.com/rvben/upd/blob/main/docs/stability.md)
139
+ documents the ones that are contractual, and `upd schema` emits the whole
140
+ interface as JSON.
141
+
142
+ > **Dry-run by default**: `upd` without `--apply` only previews changes. Pass `--apply` to
143
+ > write updates. `--check`, `--dry-run`, and `--interactive` do not require `--apply`.
144
+ >
145
+ > **VCS-root scoping**: When no path argument is given, `upd` scans from the nearest `.git`
146
+ > ancestor directory rather than the current working directory. This prevents accidental
147
+ > rewrites when CWD is a subdirectory inside a repository.
148
+
149
+ ### Commands
150
+
151
+ ```bash
152
+ upd --version # Print version
153
+ upd self-update # Check for upd updates
154
+ upd clean-cache # Clear the version cache
155
+ upd align # Align versions across files (--check exits 1 on misalignment)
156
+ upd audit # Scan for known vulnerabilities (exit 6 if found)
157
+ upd schema # Machine-readable interface description
158
+ ```
159
+
160
+ ## Example Output
161
+
162
+ ```text
163
+ .pre-commit-config.yaml:37: Would update pre-commit/pre-commit-hooks v4.6.0 → v6.0.0 (MAJOR)
164
+ .github/workflows/ci.yml:16: Would update actions/checkout v4 → v6 (MAJOR)
165
+ .github/workflows/ci.yml:18: Would update jdx/mise-action v2 → v4 (MAJOR)
166
+ .mise.toml:8: Would update rust 1.91.1 → 1.94.0
167
+ Cargo.toml:33: Would update clap 4.5.53 → 4.6.0
168
+ Cargo.toml:36: Would update tokio 1.48.0 → 1.50.0
169
+
170
+ Would update 6 package(s) (2 major, 3 minor, 1 patch) in 4 file(s), 8 up to date
171
+ ```
172
+
173
+ Output includes clickable `file:line:` locations (recognized by VS Code, iTerm2, and modern terminals).
174
+
175
+ ## Version Constraints
176
+
177
+ `upd` respects version constraints in your dependency files:
178
+
179
+ | Constraint | Behavior |
180
+ |------------|----------|
181
+ | `>=2.0,<3` | Updates within 2.x range only |
182
+ | `^2.0.0` | Updates within 2.x range (npm/Cargo); never crosses the major bound |
183
+ | `~2.0.0` | Updates within 2.0.x range (npm); `~2.0.0` (Cargo) stays within 2.0.x |
184
+ | `~> 7.1` | Updates within 7.x range (Ruby pessimistic) |
185
+ | `>=2.0` | Updates to any version >= 2.0 |
186
+ | `==2.0.0` | Updates the exact pin to the latest version (e.g. `==2.0.0` → `==3.1.5`). To freeze a package, use `[pin]` or `ignore` in `.updrc.toml`. |
187
+
188
+ For npm, comparator ranges such as `">=1.0.0 <2.0.0"` are rewritten with a
189
+ **bump strategy**: the lower bound moves to the highest version satisfying the
190
+ constraint, preserving the upper bound. Hyphen (`"1 - 2"`) and OR
191
+ (`"^1 || ^2"`) ranges are reported as warnings and left untouched rather than
192
+ rewritten wrongly.
193
+
194
+ ## Version Precision
195
+
196
+ By default, `upd` preserves version precision from the original file:
197
+
198
+ ```text
199
+ # Original file has 2-component versions
200
+ flask>=2.0 → flask>=3.1 (not 3.1.5)
201
+ django>=4 → django>=6 (not 6.0.0)
202
+
203
+ # Original file has 3-component versions
204
+ requests>=2.0.0 → requests>=2.32.5
205
+
206
+ # GitHub Actions major-only tags
207
+ actions/checkout@v3 → actions/checkout@v4 (not @v4.2.0)
208
+ ```
209
+
210
+ Use `--full-precision` to always output full semver versions:
211
+
212
+ ```text
213
+ upd --full-precision
214
+ flask>=2.0 → flask>=3.1.5
215
+ django>=4 → django>=6.0.0
216
+ requests>=2.0.0 → requests>=2.32.5
217
+ ```
218
+
219
+ ## Version Alignment
220
+
221
+ In monorepos or projects with multiple dependency files, the same package might
222
+ have different versions:
223
+
224
+ ```text
225
+ # requirements.txt
226
+ requests==2.28.0
227
+
228
+ # requirements-dev.txt
229
+ requests==2.31.0
230
+
231
+ # services/api/requirements.txt
232
+ requests==2.25.0
233
+ ```
234
+
235
+ `upd align` updates every occurrence to the highest version found:
236
+
237
+ ```bash
238
+ upd align # Align all packages to highest version
239
+ upd align --dry-run # Preview changes
240
+ upd align --check # Exit 1 if misalignments (for CI)
241
+ upd align --lang python # Align only Python packages
242
+ ```
243
+
244
+ It only aligns within one ecosystem, skips packages with upper bound
245
+ constraints (e.g. `>=2.0,<3.0`) to avoid breaking them, and ignores
246
+ pre-release versions when finding the highest version.
247
+
248
+ ## Pre-commit Integration
249
+
250
+ Add `upd` to your `.pre-commit-config.yaml`:
251
+
252
+ ```yaml
253
+ repos:
254
+ - repo: https://github.com/rvben/upd-pre-commit
255
+ rev: v0.0.24
256
+ hooks:
257
+ - id: upd-check
258
+ # Optional: only check specific ecosystems
259
+ # args: ['--lang', 'python']
260
+ ```
261
+
262
+ Available hooks:
263
+
264
+ | Hook ID | Description |
265
+ |---------|-------------|
266
+ | `upd-check` | Fail if any dependencies are outdated |
267
+ | `upd-check-major` | Fail only on major (breaking) updates |
268
+
269
+ Both hooks run on `pre-push` by default. Uses `language: python` which installs `upd` from PyPI automatically, so no manual installation is needed.
270
+
271
+ ## Documentation
272
+
273
+ Everything you look up rather than read lives in
274
+ [docs/](https://github.com/rvben/upd/tree/main/docs).
275
+
276
+ ### Releases
277
+
278
+ Vership workflow, publication guarantees, automated integration pins, and safe
279
+ retry procedures.
280
+ → [docs/releases.md](https://github.com/rvben/upd/blob/main/docs/releases.md)
281
+
282
+ ### Supported files
283
+
284
+ Every file `upd` discovers, per ecosystem, plus annotated version pins in files
285
+ it does not otherwise understand.
286
+ → [docs/ecosystems.md](https://github.com/rvben/upd/blob/main/docs/ecosystems.md)
287
+
288
+ ### Security auditing
289
+
290
+ OSV vulnerability scanning, `--fix-audit`, SARIF output, and CI integration.
291
+ → [docs/audit.md](https://github.com/rvben/upd/blob/main/docs/audit.md)
292
+
293
+ ### Configuration file
294
+
295
+ `.updrc.toml` discovery order and every key it accepts.
296
+ → [docs/configuration.md](https://github.com/rvben/upd/blob/main/docs/configuration.md)
297
+
298
+ ### Cooldown (minimum release age)
299
+
300
+ Hold back versions published less than N days ago, per ecosystem.
301
+ → [docs/configuration.md#cooldown-minimum-release-age](https://github.com/rvben/upd/blob/main/docs/configuration.md#cooldown-minimum-release-age)
302
+
303
+ ### Caching
304
+
305
+ Where the 24-hour version cache lives and how to clear or bypass it.
306
+ → [docs/configuration.md#caching](https://github.com/rvben/upd/blob/main/docs/configuration.md#caching)
307
+
308
+ ### Environment variables
309
+
310
+ Every variable `upd` reads, in one table.
311
+ → [docs/configuration.md#environment-variables](https://github.com/rvben/upd/blob/main/docs/configuration.md#environment-variables)
312
+
313
+ ### Private repositories
314
+
315
+ Credential detection for PyPI, npm, Cargo, Go, and GitHub, including private
316
+ indexes declared in `pyproject.toml`.
317
+ → [docs/private-registries.md](https://github.com/rvben/upd/blob/main/docs/private-registries.md)
318
+
319
+ ### GitHub pull requests
320
+
321
+ Run any supported dependency updates as one rolling GitHub PR, with immutable
322
+ Action SHA verification, validation, artifact reporting, and opt-in auto-merge.
323
+ → [docs/github-actions.md](https://github.com/rvben/upd/blob/main/docs/github-actions.md)
324
+
325
+ ### GitLab merge requests
326
+
327
+ Run scheduled dependency updates as one rolling GitLab MR, with validation,
328
+ lease-protected branch updates, and explicitly opt-in GitLab-native auto-merge.
329
+ → [docs/gitlab.md](https://github.com/rvben/upd/blob/main/docs/gitlab.md)
330
+
331
+ ### Stability
332
+
333
+ The stable CLI surface, exit codes, `--lock` commands, and output guarantees.
334
+ → [docs/stability.md](https://github.com/rvben/upd/blob/main/docs/stability.md)
335
+
336
+ ## Development
337
+
338
+ ```bash
339
+ # Build
340
+ make build
341
+
342
+ # Run tests
343
+ make test
344
+
345
+ # Lint
346
+ make lint
347
+
348
+ # Format
349
+ make fmt
350
+
351
+ # All checks
352
+ make check
353
+ ```
354
+
355
+ ## License
356
+
357
+ MIT
358
+
@@ -0,0 +1,10 @@
1
+ python/upd_cli/__init__.py,sha256=hbWx6dKhmUhP6izLpQNQ95_g-tMNHSUjJpHpWf2t-KA,86
2
+ python/upd_cli/__main__.py,sha256=GIUTMdw0noG2pJyrfmAmqwh0DKsqoNi9G7tWk5H2brM,1624
3
+ python/upd_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ upd-0.6.4.data/scripts/upd-cli.exe,sha256=tMGLP4CzEOjpz5V9xE6dQcP0Lljp-RVE_xl-GxLQqzw,215552
5
+ upd-0.6.4.data/scripts/upd.exe,sha256=4w15yL-gneLDVzdxyLLT-FT0MrleNyvk5maO1CgSWYA,8586752
6
+ upd-0.6.4.dist-info/METADATA,sha256=SZvJs35mdaPuLqPmR0gim9ploetv8c6cgqvAHRwrEjM,11928
7
+ upd-0.6.4.dist-info/WHEEL,sha256=2zDlIYIdD4m4N3p5DVEG3iJhGLdhsBQgdH-FqVkAur8,94
8
+ upd-0.6.4.dist-info/licenses/LICENSE,sha256=foGzl0GhKwJmujzawXCXyWVLTLS-3effmwum9tTB5mA,1092
9
+ upd-0.6.4.dist-info/sboms/upd.cyclonedx.json,sha256=aML6nA5Gmy_AdsHrmHqXEMaB-33-K-ZizROMtBc7pv0,228644
10
+ upd-0.6.4.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.14.1)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ruben Jongejan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.