Repository navigation
Feature/cli doctor - #55
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.