Skip to content

Use pnpm link: for local packages and auto-update local lock files - #446

Merged
joeslice merged 3 commits into
kson-org:mainfrom
joeslice:use-pnpm-link
Sep 28, 2026
Merged

joeslice merged 3 commits into
kson-org:mainfrom
joeslice:use-pnpm-link

Conversation

@joeslice

@joeslice joeslice commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

This change:

  • Uses link: instead of file: protocol for local references to avoid stale file problems (old hardlinks vs new symlinks)
  • regenerates pnpm-lock.yaml during the build (--no-frozen-lockfile). Note this now matches Cargo, uv, pixi lockfile behavior (enforced at CI time).
  • uses "hoisted layout" to avoid reinstallation every time pnpm run was executed.
  • "deprecates" old npmInstall gradle targets and prefers npm_install (to match npm_... convention)
  • updates release and readmes to specify ./gradlew tooling:language-server-protocol:npm_install and ./gradlew tooling:lsp-clients:check when package.json changes and add a couple verification steps.
  • fixes mocha failures caused by lingering outdated *.test.js files

Also this change:

Also:
- adjust documentation to prefer gradle over pnpm
- describe how to generate new lock files
- rename npmInstall to npm_install to match gradle task name convention
- use "hoisted" mode in LSP's nodeLinker (https://pnpm.io/settings/node-modules#nodelinker) to avoid re-installation with each run
- regenerate the demo lockfiles (should have been done in previous commit)
By using the `link:` syntax for references to locally managed packages, we now use symlinks instead of hardlinks (the pnpm behavior for `file:` protocol). symlinks remain current as the local packages are changed where hardlinked files could lead to inconsistent results: added and deleted files were not propagated.
Executing `mocha` runs all the tests using `tsx` (see .mocharc.json). Before this change we were additionally running mocha against the transpiled `*.test.js` files. This was worth removing for two reasons:

1. We were running all the tests twice
2. Leftover .js files of the pattern `out/test/**/*.test.js` were being executed even if they weren't generated from existing typescript files. This happened sometimes when swapping branches without executing a `./gradlew clean`.
@holodorum
holodorum requested review from holodorum and removed request for holodorum September 27, 2026 20:05
@joeslice
joeslice requested a review from dmarcotte September 27, 2026 20:15
@joeslice
joeslice merged commit 80195af into kson-org:main Sep 28, 2026
1 check passed
@joeslice
joeslice deleted the use-pnpm-link branch September 28, 2026 20:55
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