Skip to content

typeorm wsl+path fixes#11

Merged
veksen merged 4 commits intomasterfrom
veksen/stuttgart-v3
Feb 26, 2026
Merged

typeorm wsl+path fixes#11
veksen merged 4 commits intomasterfrom
veksen/stuttgart-v3

Conversation

@veksen
Copy link
Member

@veksen veksen commented Feb 26, 2026

Summary

  • Add path.ts module to typeorm package with findProjectRoot, resolveFilePath, and applyWslPrefix utilities (mirroring existing mikroorm implementation)
  • Fix traceCaller to resolve source-map paths against the real project root instead of the deployment directory
  • Add WSL path prefix support for clickable file links from Windows-side tooling
  • Bump typeorm version to 0.1.0

Test plan

  • All 14 typeorm path tests pass
  • All 14 mikroorm path tests pass (no regressions from conflict resolution)

veksen and others added 4 commits February 26, 2026 20:44
In deployed environments, process.cwd() may not be the project root
(e.g., when the start script does `cd .amplify-hosting/compute/default/
&& node app.js`). This adds findProjectRoot() which walks up from cwd
looking for tsconfig.json to find the real project root.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When compiled JS is relocated (e.g., postbuild copies dist/ to a
deployment directory), source map relative paths resolve to wrong
absolute paths. This extracts the src/-relative portion from the stack
trace path and reconstructs it using the real project root found via
tsconfig.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Inside WSL, absolute paths like /home/user/project/... can't be
resolved from Windows-side tooling (dashboards, VS Code terminal).
This detects the WSL_DISTRO_NAME env var and prefixes resolved paths
with //wsl.localhost/<distro> to make them accessible from Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@veksen veksen force-pushed the veksen/stuttgart-v3 branch from 63ab960 to e925523 Compare February 26, 2026 16:47
@veksen veksen marked this pull request as ready for review February 26, 2026 16:47
@veksen veksen merged commit 2458ab4 into master Feb 26, 2026
4 checks passed
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.

1 participant