Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

  • Fix getLocalVersion() to walk up directory tree instead of assuming a fixed relative path (../../package.json)
  • Now correctly detects version when running from dist/lib/, lib/, or when installed in node_modules

Details

The version checker previously assumed the package.json was always at ../../package.json relative to the module. This broke when the module executed from different locations. The new implementation walks up to 5 directory levels looking for a package.json with the correct package name (@tarquinen/opencode-dcp).

The getLocalVersion() function now walks up the directory tree to find
the correct package.json instead of assuming a fixed relative path.
This fixes version detection when running from dist/lib/, lib/, or
when installed in node_modules.
@Tarquinen Tarquinen merged commit 9759988 into master Dec 9, 2025
1 check passed
@Tarquinen Tarquinen deleted the fix/version-checker-path-resolution branch December 9, 2025 06:07
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.

2 participants