Skip to content

Commit 340db68

Browse files
chore: sync version constant and bump deps
Audit fixes for staleness found at v2.0.15: - PLUGIN_VERSION in index.ts was hardcoded "2.0.0" and never tracked package.json, so the startup log and morph_edit tool metadata reported 2.0.0 on every release since 2.0.0. Synced to 2.0.15 and updated release.yml to rewrite the constant during each version bump. Build now runs after the bump (so dist ships the correct value) and the commit includes index.ts; a grep guard fails the release if the sync misses. - Dependencies were far behind: @morphllm/morphsdk 0.2.173 -> 0.2.180, and @opencode-ai/sdk + @opencode-ai/plugin -> ^1.17.7 (were ^1.2.22 and "latest", both frozen at 1.2.22 in the lockfiles). Regenerated bun.lock and package-lock.json. - README compaction note no longer pins a single OpenCode minor (1.14.x -> 1.14+). Typecheck, build, and the full 67-test suite pass on the bumped deps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent aac111a commit 340db68

6 files changed

Lines changed: 3047 additions & 134 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ jobs:
5151
- name: Typecheck
5252
run: bun run typecheck
5353

54-
- name: Build
55-
run: bun run build
56-
57-
- name: Bump version
54+
- name: Bump version & sync plugin constant
5855
id: version
5956
run: |
6057
git config --global user.name "github-actions[bot]"
@@ -67,7 +64,21 @@ jobs:
6764
NEW_VERSION=$(node -p "require('./package.json').version")
6865
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
6966
70-
git add package.json
67+
# Keep the PLUGIN_VERSION constant in index.ts in sync with package.json
68+
# so logs and tool metadata report the real version (was frozen at 2.0.0
69+
# because the bump only touched package.json). Build runs after this.
70+
sed -i -E "s/(const PLUGIN_VERSION = \")[^\"]*(\";)/\1${NEW_VERSION}\2/" index.ts
71+
grep -q "const PLUGIN_VERSION = \"${NEW_VERSION}\";" index.ts || {
72+
echo "::error::Failed to sync PLUGIN_VERSION in index.ts to ${NEW_VERSION}"; exit 1;
73+
}
74+
75+
- name: Build
76+
run: bun run build
77+
78+
- name: Commit, tag & push
79+
run: |
80+
NEW_VERSION="${{ steps.version.outputs.new_version }}"
81+
git add package.json package-lock.json index.ts
7182
git commit -m "chore: bump to $NEW_VERSION [skip ci]"
7283
git tag -f "v$NEW_VERSION"
7384
git push origin main --tags --force

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You should see `morph_edit`, `warpgrep_codebase_search`, and `warpgrep_github_se
6969

7070
## Compaction
7171

72-
Context compression via the Morph Compact API. In current OpenCode 1.14.x releases, only OpenCode native compaction writes the persisted summary message that future turns and the sidebar use. This plugin handles that path by pre-compressing the selected history with Morph before OpenCode's native compaction model writes its summary.
72+
Context compression via the Morph Compact API. In current OpenCode releases (1.14+), only OpenCode native compaction writes the persisted summary message that future turns and the sidebar use. This plugin handles that path by pre-compressing the selected history with Morph before OpenCode's native compaction model writes its summary.
7373

7474
### How it works
7575

0 commit comments

Comments
 (0)