Problem:
Users observed that the globally installed wt command (installed via pnpm i -g @johnlindquist/worktree) was executing the TypeScript source file (src/index.ts) instead of the compiled JavaScript output (build/index.js).
Investigation Steps:
- Reviewed
package.json (bin, files), tsconfig.json (outDir), .npmignore, and .gitignore. Configuration appeared correct.
- Analyzed the
publish.yml GitHub Actions workflow.
- Examined logs from a successful workflow run (
14380850320) for version 2.7.10.
- Confirmed the build step completed successfully.
- Confirmed the pre-publish tarball inspection (
tar -tvf) showed the correct structure (package/build/index.js) with execute permissions.
- Performed a fresh global install:
pnpm i -g @johnlindquist/worktree@2.7.10.
- Verified the installed binary path using
which wt.
- Inspected the pnpm shim file (
cat $(which wt)), confirming it correctly targets and executes .../node_modules/@johnlindquist/worktree/build/index.js.
Conclusion:
The configuration (package.json, build process, packaging) in the analyzed successful release (2.7.10) is correct. The globally installed binary shim generated by pnpm now correctly executes the intended build/index.js file.
Possible Root Causes:
- Stale Cache/Link: An older, incorrectly packaged version might have been cached or linked by pnpm, and the update didn't fully clear it until the explicit reinstall.
- Local Development Link Interference: A
pnpm link --global from the local development environment might have been active, overriding the globally installed package version and pointing to the source files.
Resolution:
Explicitly reinstalling the globally package (pnpm i -g @johnlindquist/worktree@<version>) ensures the correct version is used and the pnpm shim points to the built artifact (build/index.js).
Action:
Close this issue, as the primary problem seems resolved and the current configuration/workflow produces the correct package. Monitor future releases in case the issue reappears.
Problem:
Users observed that the globally installed
wtcommand (installed viapnpm i -g @johnlindquist/worktree) was executing the TypeScript source file (src/index.ts) instead of the compiled JavaScript output (build/index.js).Investigation Steps:
package.json(bin,files),tsconfig.json(outDir),.npmignore, and.gitignore. Configuration appeared correct.publish.ymlGitHub Actions workflow.14380850320) for version2.7.10.tar -tvf) showed the correct structure (package/build/index.js) with execute permissions.pnpm i -g @johnlindquist/worktree@2.7.10.which wt.cat $(which wt)), confirming it correctly targets and executes.../node_modules/@johnlindquist/worktree/build/index.js.Conclusion:
The configuration (
package.json, build process, packaging) in the analyzed successful release (2.7.10) is correct. The globally installed binary shim generated bypnpmnow correctly executes the intendedbuild/index.jsfile.Possible Root Causes:
pnpm link --globalfrom the local development environment might have been active, overriding the globally installed package version and pointing to the source files.Resolution:
Explicitly reinstalling the globally package (
pnpm i -g @johnlindquist/worktree@<version>) ensures the correct version is used and the pnpm shim points to the built artifact (build/index.js).Action:
Close this issue, as the primary problem seems resolved and the current configuration/workflow produces the correct package. Monitor future releases in case the issue reappears.