Skip to content

Commit 8267728

Browse files
authored
Merge pull request #15 from Tarquinen/fix/version-checker-path
Fix version checker path to package.json
2 parents b9df046 + 8b6e108 commit 8267728

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If you want to ensure a specific version is always used or update your version,
7878
```json
7979
{
8080
"plugin": [
81-
"@tarquinen/[email protected].13"
81+
"@tarquinen/[email protected].14"
8282
]
8383
}
8484
```

lib/version-checker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ const __dirname = dirname(__filename)
1212

1313
/**
1414
* Gets the local package version from package.json
15+
* Note: In compiled output, this file is at dist/lib/version-checker.js
16+
* so we need to go up two levels to reach package.json
1517
*/
1618
export function getLocalVersion(): string {
1719
try {
18-
const pkgPath = join(__dirname, '../package.json')
20+
const pkgPath = join(__dirname, '../../package.json')
1921
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'))
2022
return pkg.version
2123
} catch {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "@tarquinen/opencode-dcp",
4-
"version": "0.3.13",
4+
"version": "0.3.14",
55
"type": "module",
66
"description": "OpenCode plugin that optimizes token usage by pruning obsolete tool outputs from conversation context",
77
"main": "./dist/index.js",

0 commit comments

Comments
 (0)