Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Commit fd04a19

Browse files
Fix broken --version in global npm installs
rootDir: "." caused tsc to output to dist/src/index.js, making the relative require("../package.json") resolve to dist/package.json (which doesn't exist). Add tsconfig.build.json with rootDir: "src" so output goes to dist/index.js where the path resolves correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 21a3bb7 commit fd04a19

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ JSON output (`--json`) returns:
194194

195195
## Code Style
196196

197+
- Prefer fixing root causes over patching symptoms. If a workaround is needed, explain why the structural fix isn't feasible.
197198
- TypeScript strict mode, no `any`
198199
- Pure functions where possible, side effects at the edges (CLI entrypoint, file I/O)
199200
- No classes unless genuinely needed — prefer modules with exported functions

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@dynamik-dev/refdocs",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"type": "module",
55
"description": "Local CLI tool that indexes markdown documentation and exposes fast fuzzy search with intelligent chunking",
6-
"main": "dist/src/index.js",
6+
"main": "dist/index.js",
77
"bin": {
8-
"refdocs": "dist/src/index.js"
8+
"refdocs": "dist/index.js"
99
},
1010
"files": [
1111
"dist"

tsconfig.build.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "src"
5+
},
6+
"include": ["src/**/*.ts"],
7+
"exclude": ["node_modules", "dist", "tests"]
8+
}

0 commit comments

Comments
 (0)