Skip to content

feat(cli): expose dependency alignment plans - #2600

Open
afonsojramos wants to merge 4 commits into
voidzero-dev:mainfrom
afonsojramos:feat/sync-versions-plan
Open

feat(cli): expose dependency alignment plans#2600
afonsojramos wants to merge 4 commits into
voidzero-dev:mainfrom
afonsojramos:feat/sync-versions-plan

Conversation

@afonsojramos

@afonsojramos afonsojramos commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Vite+ releases can now tell external automation how to align Vite+, Vite+ core, Vitest, and official Vitest packages without reading or changing the project itself. This provides the release-owned compatibility contract needed to prevent dependency bots from producing mixed toolchains.

This is the first part of a three-repository integration. Containerbase installation and Renovate reconciliation follow after this contract ships in a Vite+ release.

Design

  • vp sync-versions --json accepts bounded manifest snapshots over stdin and returns deterministic before/after replacements.
  • Planning updates only existing managed declarations. It preserves catalog protocols, JSON formatting, and YAML comments, quoting, indentation, and line endings.
  • The command does not load project configuration, run installs or lifecycle scripts, format source, or write to the repository.
  • Both the npm CLI and standalone archive expose the same protocol. Release archives include the self-contained planner, toolchain manifest, and checksums needed for verified installation.

Validation

  • Planner, protocol, package-override, and migration suites: 395 tests passed.
  • Focused sync-version suites: 39 tests passed.
  • Global CLI Rust suite: 486 tests passed, 2 ignored.
  • CLI TypeScript build, optimized Rust build, npm entrypoint smoke test, and standalone archive-layout simulation passed.
  • Scoped formatting, lint, type checks, and git diff --check passed.

Related: #2356

Downstream drafts:

@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 2431e41
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a99dabe55da2600087cf38a
😎 Deploy Preview https://deploy-preview-2600--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread packages/cli/src/sync-versions/bin.ts Outdated
@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Registry bridge build (a70c54d)

Warning

This build is from the fork afonsojramos/vite-plus and has not been reviewed.
Installing it runs that code on your machine. Build log

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.a70c54d67ca9b47dcfcb083ca135fd61c7d04740
@voidzero-dev/vite-plus-core 0.0.0-commit.a70c54d67ca9b47dcfcb083ca135fd61c7d04740

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/afonsojramos/vite-plus/a70c54d67ca9b47dcfcb083ca135fd61c7d04740/packages/cli/install.sh | VP_PR_VERSION=2600 bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2600"; irm https://raw.githubusercontent.com/afonsojramos/vite-plus/a70c54d67ca9b47dcfcb083ca135fd61c7d04740/packages/cli/install.ps1 | iex

Or download the standalone Windows installer built from this commit:

Architecture Installer
x64 vp-setup-x86_64-pc-windows-msvc.exe
Arm64 vp-setup-aarch64-pc-windows-msvc.exe

GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:

.\vp-setup.exe --version "0.0.0-commit.a70c54d67ca9b47dcfcb083ca135fd61c7d04740" --registry "https://registry-bridge.viteplus.dev/"

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.a70c54d67ca9b47dcfcb083ca135fd61c7d04740",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.a70c54d67ca9b47dcfcb083ca135fd61c7d04740"
  }
}

@fengmk2

fengmk2 commented Sep 3, 2026

Copy link
Copy Markdown
Member

@afonsojramos I installed the preview build version, and when I run vp sync-versions --json, it hangs without any response.

image

@afonsojramos

Copy link
Copy Markdown
Author

So, the command expects a JSON request on stdin, but silently waiting on an interactive terminal is definitely a bug. I’ll make it fail immediately, does that sound good @fengmk2?

@fengmk2

fengmk2 commented Sep 3, 2026

Copy link
Copy Markdown
Member

@afonsojramos Yes, I think it would be more appropriate to report an error in interactive mode.

@afonsojramos

Copy link
Copy Markdown
Author

@fengmk2 should be good now 👌

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afonsojramos Thanks so much!
I will perform manual testing and verification before merging.

@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 3, 2026
@afonsojramos

Copy link
Copy Markdown
Author

Awesome, thanks! Feel free to check the other draft PRs to check the plan of joining it all together

}

function alignedSpec(name: string, current: string, toolchain: SyncVersionsToolchain): string {
const target = targetVersion(name, toolchain);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/npmx-dev/npmx.dev/blob/main/pnpm-workspace.yaml#L32

Will the overrides configuration for this dependency alias 'vite': 'npm:@voidzero-dev/vite-plus-core@0.3.0' be automatically upgraded by us?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will now. I added support for managed npm: aliases, including this exact pnpm catalog entry. We also preserve the alias target and only replace its version. So custom aliases remain untouched.

}

const basename = path.posix.basename(manifest.path);
const kindMatchesPath =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about .yarnrc.yml file? I think we should support yarn 4.10+ catalogs in this file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, added. sync-versions now handles both default and named Yarn catalogs in .yarnrc.yml, while preserving formatting and comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants