Skip to content

Updating ​

How to update Shiva and its modules safely.

Update the CLI First ​

Always update the CLI before updating the server:

bash
npm update -g @shiva-fw/cli
shiva --version

Check for Updates ​

bash
shiva update --check

This shows which modules have available updates and whether any are breaking changes.

Update All Modules ​

bash
shiva update

This updates all modules to the latest compatible version (respecting semver ranges in your shiva.manifest).

Update a Specific Module ​

bash
shiva update shiva-player
shiva update shiva-economy@2.1.0  # pin to a specific version

Run Migrations After Updating ​

Always run migrations after updating:

bash
shiva migrate

Migrations are additive and non-destructive by default. A migration that drops columns requires an explicit --destructive flag.

Breaking Changes ​

Breaking changes are documented in each module's CHANGELOG.md and flagged with ⚠️ in shiva update --check. Before applying a breaking update:

  1. Read the changelog
  2. Update your module's config if needed
  3. Test in a staging environment
  4. Apply the update and run shiva migrate

Rolling Back ​

To roll back a module to a previous version:

bash
shiva update shiva-player@2.0.1
shiva migrate --rollback  # rolls back the last migration batch

Automated Updates ​

For production servers, consider using shiva update --auto in a scheduled task to stay on the latest patch versions automatically.

Released under the MIT License.