Split dev-trunk into ~dev.json for proper SVN revision locking#65
Merged
Split dev-trunk into ~dev.json for proper SVN revision locking#65
Conversation
Composer v2 looks for dev versions in ~dev.json alongside the main package JSON. Tagged versions go to p2/<name>.json with dist + source, dev-trunk goes to p2/<name>~dev.json with source only so Composer checks out via SVN and locks the revision number. This eliminates the need for inline JSON workarounds on trunk-only packages — users can now `composer require wp-plugin/foo:dev-trunk` directly. Updates the detail page accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Trunk-only packages now show "Copy install command" which copies `composer require wp-plugin/<name>:dev-trunk`. Latest-not-tagged packages still show the inline JSON workaround. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Trunk-only packages show dev-trunk as the main install command. Latest-not-tagged packages keep the tagged version as the main command with an expandable "Install latest from trunk" option in the warning. Remove the old JSON workaround from both cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip ~dev.json files in delete detection to avoid emitting invalid package names like wp-plugin/foo~dev. Track changes from either tagged or dev files without double-counting using a pkgChanged flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests verify that deleting a package with both .json and ~dev.json produces a single delete event with the correct name, and that changes to only the dev file are properly detected without duplication. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collect unique package names from both .json and ~dev.json in the previous build, then check if a package is completely absent (neither file exists) in the new build. This fixes missed deletes for trunk-only packages and false deletes for tagged→dev-only transitions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Every active plugin/theme has a trunk in SVN, so the builder now generates a ~dev.json for all packages rather than only those with dev-trunk in versions_json. This means dev-trunk doesn't need to be stored in the DB — the builder synthesizes it from the package name and type. Also allows packages with empty versions_json through the build so trunk-only packages still get a ~dev.json artifact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SVN + Composer doesn't support revision locking — the reference stays as "trunk" in composer.lock regardless. Adding dist back with the unversioned trunk zip URL so users can install dev-trunk packages without needing SVN installed locally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SVN + Composer doesn't support revision locking, so dev-trunk installs are mutable. Update the warnings to reflect this instead of claiming Composer locks to an SVN revision. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…stalls Trunk-only packages now get dev-trunk in both .json and ~dev.json. This prevents breaking existing composer.lock files that reference the main .json file for trunk-only packages like top-level-cats. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 25, 2026
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.
Summary
p2/<name>.json, dev-trunk inp2/<name>~dev.json.jsonand~dev.jsonto avoid breaking existing installs~dev.json— the builder synthesizes dev-trunk from the package name (no DB changes needed)dist(unversioned trunk zip) andsource(SVN)composer require wp-plugin/<name>:dev-trunkas the main install commandContext
Ref #24, ref #15
Composer v2 looks for dev versions in
~dev.jsonalongside the main package JSON. Users can now install any package from trunk viacomposer require wp-plugin/<name>:dev-trunk.First deploy will upload ~60k new
~dev.jsonfiles to R2. Subsequent deploys only sync changed files as usual.🤖 Generated with Claude Code