gaztec 1.0.1 → 1.0.3

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/README.md CHANGED
@@ -1,30 +1,70 @@
1
1
  # Aztec version manager
2
2
 
3
- Manage your `aztec` versions without hussle. Automatically switch between versions in projects by creating a `.gaztecrc` file.
3
+ Manage your `aztec` versions without hassle. Automatically switch between versions in projects by creating a `.aztecrc` file.
4
4
 
5
- ## Installation
5
+ ## Why gaztec?
6
+
7
+ - **No installation** — just run `npx gaztec` and go. No global install, no `npm i` required
8
+ - **Automatic version switching** — drop a `.aztecrc` in your project and gaztec picks the right version
9
+ - **No `aztec-up` needed** — versions are fetched on demand when you run a command
10
+ - **Simple** — `npx gaztec <command>` replaces `aztec <command>` everywhere
11
+
12
+ ## Quick start
6
13
 
7
14
  ```sh
8
- npm i -g gaztec
15
+ # create a file that defines the version of Aztec for your project
16
+ echo "4.0.0-devnet.2-patch.2" > .aztecrc
17
+
18
+ # use gaztec where you would use aztec (no install needed)
19
+ npx gaztec --version
20
+ #> 4.0.0-devnet.2-patch.2
9
21
  ```
10
22
 
11
- You can also install it locally and use it in your project:
23
+ ## `gaztec nargo`
24
+
25
+ `gaztec nargo` exposes the pinned version of `nargo` that is compatible with the installed version of Aztec. Useful if you don't want to manage the version of `nargo` yourself.
12
26
 
13
27
  ```sh
14
- npm i gaztec -D
28
+ # runs `nargo check` with the pinned version of `nargo`
29
+ npx gaztec nargo check
15
30
  ```
16
31
 
17
- **WARNING**: if you use `pnpm` or `yarn`, you must use `npx gaztec` instead of `pnpm gaztec` or `yarn gaztec`.
32
+ ## Installation (optional)
18
33
 
19
- ## Use in your project
34
+ You can install gaztec globally or as a dev dependency (to pin the version) if you prefer:
20
35
 
21
36
  ```sh
22
- # create a file that defines the version of Aztec for your project
23
- echo "4.0.0-devnet.2-patch.2" > .gaztecrc
37
+ npm i -g gaztec
38
+ # or
39
+ npm i gaztec -D
40
+ ```
24
41
 
25
- # use `gaztec` where you would use `aztec`
26
- gaztec --version
27
- #> 4.0.0-devnet.2-patch.2
42
+ **Note**: with `pnpm` or `yarn`, use `npx gaztec` instead of `pnpm gaztec` or `yarn gaztec`.
43
+
44
+ ## CI
45
+
46
+ Commit a `.aztecrc` file to your repo and use `npx gaztec` in your workflow. No setup step needed:
47
+
48
+ ```yaml
49
+ name: Test
50
+
51
+ on: [push]
52
+
53
+ jobs:
54
+ test:
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ - uses: pnpm/action-setup@v4
59
+ - uses: actions/setup-node@v4
60
+ with:
61
+ node-version: 24
62
+
63
+ - name: Compile Aztec contracts
64
+ run: npx gaztec compile
65
+
66
+ - name: Start Aztec Local Network
67
+ run: npx gaztec start --local-network
28
68
  ```
29
69
 
30
70
  ## Compatibility with `aztec`
package/gaztec CHANGED
@@ -3,4 +3,10 @@ set -euo pipefail
3
3
 
4
4
  source "$(dirname -- "${BASH_SOURCE[0]}")/gaztec-install"
5
5
 
6
- $AZTEC $@
6
+ # if the subcommand is "nargo", run nargo instead
7
+ if [[ "$1" == "nargo" ]]; then
8
+ shift
9
+ $NARGO $@
10
+ else
11
+ $AZTEC $@
12
+ fi
package/gaztec-install CHANGED
@@ -53,5 +53,12 @@ fi
53
53
 
54
54
  # needed due to a bug. Without this line, it tries to use bb from ~/.bb
55
55
  export BB="$AZTEC_PATH/versions/$AZTEC_VERSION/node_modules/.bin/bb"
56
+ # needed due to a bug. Without this line, it tries to use nargo from ~/.nargo
57
+ export NARGO="$AZTEC_PATH/versions/$AZTEC_VERSION/bin/nargo"
58
+
59
+ # bug on CI with nvm
60
+ if [[ -n "${CI:-}" ]] && command -v npm >/dev/null 2>&1; then
61
+ npm config delete prefix
62
+ fi
56
63
 
57
64
  AZTEC="$AZTEC_PATH/versions/$AZTEC_VERSION/node_modules/.bin/aztec"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaztec",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "Aztec version manager",
6
6
  "repository": {