Latest Juno Releases

Juno CLI v0.2.0

A new version of the CLI is out, and it includes a breaking change: the juno backup command has been renamed to snapshot because what I originally called “backup” wasn’t really a backup but snapshot as described and provided on the IC. I still need to document the reasoning behind this change.

This release also improves the CLI’s behavior by displaying the correct follow-up commands after running juno init, based on your package manager—since, yeah, yarn and pnpm have both been supported for a while now.

Additionally, I bumped the required version of ic-wasm to v0.8.5 for those developing serverless functions (still not happy that devs need to install these tools on their sides, but I’m exploring ways to improve DX).

Lastly, I added a comment in the function template to clarify that Satellite modules are initialized with all hooks by default, but for readability, you can select only a subset (as already documented).

// All the available hooks and assertions for your Datastore and Storage are scaffolded by default in this `lib.rs` module.
// However, if you don’t have to implement all of them, for example to improve readability or reduce unnecessary logic,
// you can selectively enable only the features you need.
//
// To do this, disable the default features in your `Cargo.toml` and explicitly specify only the ones you want to use.
//
// For example, if you only need `on_set_doc`, configure your `Cargo.toml` like this:
//
// [dependencies]
// junobuild-satellite = { version = "0.0.22", default-features = false, features = ["on_set_doc"] }
//
// With this setup, only `on_set_doc` must be implemented with custom logic,
// and other hooks and assertions can be removed. They will not be included in your Satellite.

#[on_set_doc]
async fn on_set_doc(_context: OnSetDocContext) -> Result<(), String> {
    Ok(())
}

// etc.
5 Likes