aube add --allow-build does not work with --global
#617
-
PreconditionSetting Steps to reproduce# Set strictDepBuilds to true (default in pnpm, but not aube)
$ aube config set strictDepBuilds true
# Try using --allow-build with --global
$ aube add --global just-bash@3.0.0 --allow-build=@mongodb-js/zstd --allow-build=node-liblzma
Resolving just-bash@3.0.0...
+ just-bash@3.0.0 (specifier: 3.0.0)
Updated package.json
x dependencies with build scripts must be reviewed before install:
| - @mongodb-js/zstd@7.0.0
| - node-liblzma@2.2.0
| help: set them to true or false in `allowBuilds`, or set `strictDepBuilds=false`Similarly it fails when used from mise-en-place via "npm:just-bash" = { version = "latest", aube_args = "--allow-build=@mongodb-js/zstd --allow-build=node-liblzma" }Possible causeBased on `--allow-build=<pkg>` writes `allowBuilds: { <pkg>: true }` into the workspace yaml (or `package.json#aube.allowBuilds`) before the install runs, so the named package's `preinstall` / `install` / `postinstall` scripts execute on this invocationAdditionally
Possible solutionsEnable allowBuilds in global config AND
Option 2 would be good to allow limiting the setting to particular tool install, instead of allowing it globally. On the other hand, it may be harder to implement, and also if we trust the package scripts on one place, we may trust it anywhere. WDYT? WorkaroundI don't know any workaround for allowing global package dependencies scripts atm. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Thanks for the detailed write-up — root cause was exactly what you suspected: PR #620 plumbs After this lands, your repro should work as-is: aube config set strictDepBuilds true
aube add --global just-bash@3.0.0 --allow-build=@mongodb-js/zstd --allow-build=node-liblzmaand the mise This comment was generated by Claude. |
Beta Was this translation helpful? Give feedback.
-
|
Awesome work @jdx 🔥 Thanks! There's also one small side issue,
|
Beta Was this translation helpful? Give feedback.
-
|
✅ Fixed in #620, released in v1.12.0, tested OK Notes:
Tested OK: > aube add --global npm:hyperframes --allow-build=@google/genai --allow-build=esbuild --allow-build=onnxruntime-node --allow-build=protobufjs --allow-build=sharp --allow-build=better-sqlite3
Resolving hyperframes@latest...
+ hyperframes@0.6.4 (specifier: npm:hyperframes@0.6.4)
Updated package.json
aube 1.12.0 by en.dev
██░░░░░░░░░░░░░ 171/204 pkgs · resolving
███████████████ 161/161 pkgs
✓ resolved 161 · reused 160 · downloaded 1 (2.2 MB) in 2.7s
preinstall: no-op
1 transitive package has deprecation warnings. Run `aube deprecations --transitive` to see them.
dependencies:
+ hyperframes@0.6.4
> hyperframes --version
0.6.4 |
Beta Was this translation helpful? Give feedback.
✅ Fixed in #620, released in v1.12.0, tested OK
Notes:
mise up -y --before 0d aube: jdx/mise#9827Tested OK: