@weezy20/zv 0.3.1 → 0.5.0
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.
- package/CHANGELOG.md +35 -0
- package/README.md +26 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.4.0 → v0.5.0
|
|
4
|
+
## ✨ Features
|
|
5
|
+
- **`zv install`**: Install without setting a zig version as active.
|
|
6
|
+
- Uses same flags as `zv use` i.e. `-f` to force using ziglang.org as a download source.
|
|
7
|
+
- Shorthand: **`zv i <version>`** installs the specified version without setting it as active.
|
|
8
|
+
- Can also install multiple versions which are comma separated list: `zv i 0.11,master,stable,latest`
|
|
9
|
+
- De-duplication for zigversions is handled internally so if you specify `zv i latest,stable` then it only installs one version, provided cached index stable == remote index stable which is true for 99.99% of the time.
|
|
10
|
+
|
|
11
|
+
## v0.3.1 → v0.4.0
|
|
12
|
+
|
|
13
|
+
## ✨ Features
|
|
14
|
+
|
|
15
|
+
- **`zv init`**: Added `build.zig.zon` generation via `-p/--package/--zon` flag (#17)
|
|
16
|
+
- **`zv init`**: Generate `.zigversion` file to specify minimum Zig version for builds
|
|
17
|
+
- **Self-update**: Refactored using `self-replace` dependency with SHA256 verification for downloaded github assets (#21). This also removes a ton of dependencies.
|
|
18
|
+
- **Self-update**: Added `upgrade` as alias for `update` command
|
|
19
|
+
- **Self-update**: Added `--rc` flag to include pre-release versions when checking for updates
|
|
20
|
+
|
|
21
|
+
## Bug Fixes
|
|
22
|
+
|
|
23
|
+
- Fixed phantom active Zig display when no version was set (zv)
|
|
24
|
+
- Fixed toolchain manager fallback for mismatches between version scan and `active.json`
|
|
25
|
+
- Improved auto-switching logic when cleaning/removing installations
|
|
26
|
+
- Fixed ZIP extraction path issues in update mechanism
|
|
27
|
+
|
|
28
|
+
## Others
|
|
29
|
+
|
|
30
|
+
- Deduplicated shim generation logic, Added quiet flag to supress output during automatic shim regeneration
|
|
31
|
+
- Target triple detection now at compile time
|
|
32
|
+
- Better async handling (replaced blocking calls with `await`)
|
|
33
|
+
- Updated documentation and Homebrew tap configuration
|
|
34
|
+
|
|
35
|
+
---
|
package/README.md
CHANGED
|
@@ -34,15 +34,29 @@ Windows (PowerShell):
|
|
|
34
34
|
```powershell
|
|
35
35
|
irm https://github.com/weezy20/zv/releases/latest/download/zv-installer.ps1 | iex
|
|
36
36
|
```
|
|
37
|
+
If you encounter an execution policy error, you can temporarily allow script execution by running:
|
|
38
|
+
```powershell
|
|
39
|
+
powershell -ExecutionPolicy Bypass -Command "irm https://github.com/weezy20/zv/releases/latest/download/zv-installer.ps1 | iex"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
>The following methods use different package managers hence, after running `zv setup` we uninstall the package manager version of `zv` to avoid confusion. Since `zv` can self update for popular OS/Arch combinations, you don't need to rely on package managers for updates.
|
|
37
43
|
|
|
38
44
|
**HomeBrew:**
|
|
39
45
|
```sh
|
|
40
46
|
brew install weezy20/tap/zv
|
|
47
|
+
# Run zv setup to self-install
|
|
48
|
+
zv setup
|
|
49
|
+
# Remove brew installation
|
|
50
|
+
brew uninstall zv
|
|
41
51
|
```
|
|
42
52
|
|
|
43
53
|
**NPM:**
|
|
44
54
|
```sh
|
|
45
55
|
npm install -g @weezy20/zv
|
|
56
|
+
# Run zv setup to self-install
|
|
57
|
+
zv setup
|
|
58
|
+
# Remove npm installation
|
|
59
|
+
npm uninstall -g @weezy20/zv
|
|
46
60
|
```
|
|
47
61
|
|
|
48
62
|
<details>
|
|
@@ -114,7 +128,7 @@ From now on, use the `zv` installed in `ZV_DIR/bin`.
|
|
|
114
128
|
|
|
115
129
|
**Simple update (Recommended):**
|
|
116
130
|
```sh
|
|
117
|
-
zv update
|
|
131
|
+
zv update # Installs latest stable release on supported targets*.
|
|
118
132
|
```
|
|
119
133
|
|
|
120
134
|
This command checks for new releases on GitHub and updates `zv` in place. It works whether you're running from `ZV_DIR/bin/zv` or from an external location (like cargo install).
|
|
@@ -122,6 +136,8 @@ This command checks for new releases on GitHub and updates `zv` in place. It wor
|
|
|
122
136
|
**Options:**
|
|
123
137
|
```sh
|
|
124
138
|
zv update --force # Force reinstall even if already on the latest version
|
|
139
|
+
zv upgrade # Alias for update
|
|
140
|
+
zv update --rc # Update to latest pre-release (release candidate) version
|
|
125
141
|
```
|
|
126
142
|
|
|
127
143
|
|
|
@@ -158,7 +174,12 @@ You can customize this by setting the `ZV_DIR` environment variable.
|
|
|
158
174
|
zv init [project_name] # Create a new Zig project with a name
|
|
159
175
|
zv init # Create a new Zig project in the current working directory
|
|
160
176
|
zv init --zig | -z # Create a new Zig project using the standard template provided by `zig init`
|
|
177
|
+
# Create a zig project with build.zig.zon:
|
|
178
|
+
zv init -p | --zon | --package <?name> # Create a zig project in current directory with build.zig.zon or with name if provided
|
|
179
|
+
# Note: this requires an active zig version >= 0.12.0 where build.zig.zon support was introduced
|
|
180
|
+
|
|
161
181
|
```
|
|
182
|
+
>Note: `zv init` will use the `build.zig` that's present in [templates/build.zig](templates/lean_build.zig) which is checked to work against minimum zig version specified in [templates/.zigversion](templates/.zigversion). If you want to use a different zig version, set it as active zig and use `zv init -z` or `zig init` directly.
|
|
162
183
|
|
|
163
184
|
## Use `zv` as your Zig compiler toolchain manager:
|
|
164
185
|
|
|
@@ -171,6 +192,8 @@ zv use 0.14 -f # Use a version (auto-completes to 0
|
|
|
171
192
|
zv use master # Use master branch build (queries network to find the latest master build)
|
|
172
193
|
zv use stable # Use latest stable release (refers to cached index)
|
|
173
194
|
zv use latest # Use latest stable release (queries network to fetch the latest stable)
|
|
195
|
+
zv install <version,*> [-f ] # Install one or more Zig versions without switching to it. Use -f to download from ziglang.org instead of community mirrors.
|
|
196
|
+
zv i 0.15.1,0.14.0,master # Install multiple versions at once using a comma-separated list
|
|
174
197
|
|
|
175
198
|
# Per-project Zig config
|
|
176
199
|
zig +<version> [...zig args] # Run Zig using a specific <version> (fetches and downloads version if not present locally)
|
|
@@ -187,7 +210,7 @@ zv rm master # Clean up the `master` branch toolchain.
|
|
|
187
210
|
zv rm master --outdated # Clean up any older master versions in the master folder that don't match latest `master`
|
|
188
211
|
zv setup # Set up shell environment for zv with interactive prompts (use --no-interactive for automation)
|
|
189
212
|
zv sync # Resync community mirrors list from [ziglang.org/download/community-mirrors.txt]; also force resync of index to fetch latest nightly builds. Replaces `ZV_DIR/bin/zv` if outdated against current invocation.
|
|
190
|
-
zv update
|
|
213
|
+
zv upgrade | update # Update zv to the latest release only if present in GH Releases: https://github.com/weezy20/zv/releases
|
|
191
214
|
zv help # Detailed instructions for zv. Use `--help` for long help or `-h` for short help with a subcommand.
|
|
192
215
|
```
|
|
193
216
|
|
|
@@ -209,6 +232,7 @@ I hope you enjoy using it! ♥
|
|
|
209
232
|
| **`ZV_DIR`** | Defines the home directory for `zv`. | Default `$HOME/.zv` for linux/macos or unix. For windows it usually will be `%USERPROFILE%/.zv` |
|
|
210
233
|
| **`ZV_INDEX_TTL_DAYS`** | Number of days between automatic [index](https://ziglang.org/download/index.json) syncs. | **21 days** — Using `master` or `latest` in inline mode use a shorter cache duration of just 1 day unlike `use` which will always fetch `master` & `latest` from network, so practically, you never have to worry about setting this variable yourself. |
|
|
211
234
|
| **`ZV_MIRRORS_TTL_DAYS`** | Number of days before refreshing the mirrors list. Broken mirrors degrade automatically. Use `zv sync` to force refresh. | **21 days** — mirrors and index can be resynced immediately with `zv sync`. `master` relies on latest builds & so does `latest` and some community mirrors may not have it available; `zv` will retry other mirrors in that case. |
|
|
235
|
+
| **`ZV_MAX_RETRIES`** | Maximum number of retry attempts for downloads when a download fails. | **3 retries** — If a download fails, `zv` will retry up to this many times before giving up. |
|
|
212
236
|
| **`NO_COLOR`** | If set, disables color output in all zv commands. | No color output; useful for non-TTY environments or scripts. |
|
|
213
237
|
|**`ZV_FETCH_TIMEOUT_SECS`** | Request timeout to use for network operations requiring fetching index/mirrors list from `ziglang.org`. | Default 15 seconds for most operations.
|
|
214
238
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"name": "@weezy20/zv",
|
|
26
|
-
"version": "0.
|
|
26
|
+
"version": "0.5.0"
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@isaacs/balanced-match": {
|
|
29
29
|
"engines": {
|
|
@@ -896,5 +896,5 @@
|
|
|
896
896
|
}
|
|
897
897
|
},
|
|
898
898
|
"requires": true,
|
|
899
|
-
"version": "0.
|
|
899
|
+
"version": "0.5.0"
|
|
900
900
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/weezy20/zv/releases/download/v0.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/weezy20/zv/releases/download/v0.5.0",
|
|
3
3
|
"author": "Abhishek Shah <abhishekshah3@gmail.com>",
|
|
4
4
|
"bin": {
|
|
5
5
|
"zv": "run-zv.js"
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"zipExt": ".tar.gz"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
"version": "0.
|
|
108
|
+
"version": "0.5.0",
|
|
109
109
|
"volta": {
|
|
110
110
|
"node": "18.14.1",
|
|
111
111
|
"npm": "9.5.0"
|