upd-cli 0.0.2__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,5 @@
1
+ """
2
+ upd-cli: A fast dependency updater for Python and Node.js projects.
3
+ """
4
+
5
+ __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
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: upd-cli
3
+ Version: 0.0.2
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 and Node.js projects
14
+ Keywords: dependencies,update,python,nodejs,npm
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: Homepage, https://github.com/rvben/upd
21
+ Project-URL: Repository, https://github.com/rvben/upd
22
+ Project-URL: Documentation, https://github.com/rvben/upd#readme
23
+
24
+ # upd
25
+
26
+ A fast dependency updater for Python and Node.js projects, written in Rust.
27
+
28
+ ## Features
29
+
30
+ - **Multi-format support**: Updates `requirements.txt`, `pyproject.toml`, and `package.json`
31
+ - **Constraint-aware**: Respects version constraints (e.g., `>=2.0,<3` won't update to v3.x)
32
+ - **Major version warnings**: Highlights breaking changes with `(MAJOR)` indicator
33
+ - **Format-preserving**: Keeps your file formatting, comments, and structure intact
34
+ - **Pre-release filtering**: Excludes alpha, beta, and release candidate versions
35
+ - **Gitignore-aware**: Respects `.gitignore` patterns when discovering files
36
+ - **Fast**: Async HTTP requests with caching for quick subsequent runs
37
+
38
+ ## Installation
39
+
40
+ ### From PyPI
41
+
42
+ ```bash
43
+ pip install upd
44
+ # or with uv
45
+ uv pip install upd
46
+ ```
47
+
48
+ ### From crates.io
49
+
50
+ ```bash
51
+ cargo install upd
52
+ ```
53
+
54
+ ### From source
55
+
56
+ ```bash
57
+ git clone https://github.com/rvben/upd
58
+ cd upd
59
+ cargo install --path .
60
+ ```
61
+
62
+ ## Usage
63
+
64
+ ```bash
65
+ # Update all dependency files in current directory
66
+ upd
67
+
68
+ # Update specific files or directories
69
+ upd requirements.txt pyproject.toml
70
+
71
+ # Dry-run mode (preview changes without writing)
72
+ upd -n
73
+ upd --dry-run
74
+
75
+ # Verbose output
76
+ upd -v
77
+ upd --verbose
78
+
79
+ # Disable colored output
80
+ upd --no-color
81
+
82
+ # Disable caching
83
+ upd --no-cache
84
+ ```
85
+
86
+ ### Commands
87
+
88
+ ```bash
89
+ # Show version
90
+ upd version
91
+
92
+ # Check for upd updates
93
+ upd self-update
94
+
95
+ # Clear version cache
96
+ upd clean-cache
97
+ ```
98
+
99
+ ## Supported Files
100
+
101
+ ### Python
102
+
103
+ - `requirements.txt`, `requirements-dev.txt`, `requirements-*.txt`
104
+ - `requirements.in`, `requirements-dev.in`, `requirements-*.in`
105
+ - `dev-requirements.txt`, `*-requirements.txt`, `*_requirements.txt`
106
+ - `pyproject.toml` (`[project.dependencies]` and `[project.optional-dependencies]`)
107
+
108
+ ### Node.js
109
+
110
+ - `package.json` (`dependencies` and `devDependencies`)
111
+
112
+ ## Example Output
113
+
114
+ ```
115
+ pyproject.toml
116
+ Would update requests 2.28.0 → 2.31.0
117
+ Would update flask 2.2.0 → 3.0.0 (MAJOR)
118
+
119
+ requirements.txt
120
+ Would update pytest 7.2.0 → 7.4.3
121
+ Would update black 23.1.0 → 23.12.1
122
+
123
+ Would update 4 package(s) (1 major, 2 minor, 1 patch) in 2 file(s), 15 up to date
124
+ ```
125
+
126
+ ## Version Constraints
127
+
128
+ `upd` respects version constraints in your dependency files:
129
+
130
+ | Constraint | Behavior |
131
+ |------------|----------|
132
+ | `>=2.0,<3` | Updates within 2.x range only |
133
+ | `^2.0.0` | Updates within 2.x range (npm) |
134
+ | `~2.0.0` | Updates within 2.0.x range (npm) |
135
+ | `>=2.0` | Updates to any version >= 2.0 |
136
+ | `==2.0.0` | No updates (pinned) |
137
+
138
+ ## Development
139
+
140
+ ```bash
141
+ # Build
142
+ make build
143
+
144
+ # Run tests
145
+ make test
146
+
147
+ # Lint
148
+ make lint
149
+
150
+ # Format
151
+ make fmt
152
+
153
+ # All checks
154
+ make check
155
+ ```
156
+
157
+ ## License
158
+
159
+ MIT
160
+
@@ -0,0 +1,8 @@
1
+ python/upd_cli/__init__.py,sha256=QYVI6JUTpu4bv_7S8VcmfW429Y2aH-OpW54dVYKkdaw,104
2
+ python/upd_cli/__main__.py,sha256=GIUTMdw0noG2pJyrfmAmqwh0DKsqoNi9G7tWk5H2brM,1624
3
+ python/upd_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ upd_cli-0.0.2.data/scripts/upd.exe,sha256=IMmN2a2p-Z8xPFexDDqbiVxJnnhmwrGikO6ovF9SDGk,6136832
5
+ upd_cli-0.0.2.dist-info/METADATA,sha256=ZJfUZyPJ62x_NDCSeE7uTrITf60xODLZjXii8tFRSII,3664
6
+ upd_cli-0.0.2.dist-info/WHEEL,sha256=14-pPWiwFoCAtTgD4hWnxHSfZQqe6Zt0DfwcROvwlzs,94
7
+ upd_cli-0.0.2.dist-info/licenses/LICENSE,sha256=foGzl0GhKwJmujzawXCXyWVLTLS-3effmwum9tTB5mA,1092
8
+ upd_cli-0.0.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.10.2)
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.