Skip to content

Feature/cli doctor - #55

Merged
mattvb91 merged 2 commits into
devfrom
feature/cli-doctor
Nov 23, 2026
Merged

mattvb91 merged 2 commits into
devfrom
feature/cli-doctor

Conversation

@mattvb91

Copy link
Copy Markdown
Member

No description provided.

mavonengine doctor checks the project without changing it: the Node version,
the @MavonEngine packages in package.json, mavonengine.json, and whether each
plugin is installed, built and made for the project's @mavonengine/core. For a
plugin that doesn't fit, it reads the plugin's published versions from the npm
registry and names the newest one that does. --json, --strict and --offline.

Core gets a small semver checker (Plugins/compat.ts). The game server and the
Vite plugin now warn when they load a plugin whose engine range doesn't cover
the installed core, and still load it.

The doctor e2e test runs the CLI on the template against a fake npm registry.
mavonengine upgrade moves @mavonengine/core to its latest version (or --to),
each plugin to its newest version whose engine range takes that core and the
other @MavonEngine packages to their newest, from the npm registry. A plugin
with no version for the new core stops it unless --force. Then it runs the
migrations of the installed core, shown as diffs first, and doctor on the
result. Asks before installing and writing, refuses uncommitted changes
unless --allow-dirty; --dry-run and --only-migrations.

Migrations live in core (Migrations/), change files through ProjectFiles so
they can be shown before they are written, and are recorded by id in
mavonengine.json. The first two come from the template's history:
0.0.22-dev-script and 0.0.25-app-name-title. Doctor lists pending ones.

The upgrade e2e test turns the template back into a pre-0.0.22 project and
upgrades it against the fake registry, with npm as a recorder.

scripts/check-migrations.mjs, run on pull requests, fails when the template's
project files change without a new migration or [no migration] in the
description. Version bumps alone don't count.
@mattvb91
mattvb91 merged commit 390a213 into dev Nov 23, 2026
23 checks passed
@mattvb91
mattvb91 deleted the feature/cli-doctor branch November 23, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant