You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a repository using Yarn workspaces. There's a package @repository/tsconfig containing a file tsconfig.base.json. There's another package @repository/library with a file tsconfig.json that contains "extends": "@repository/tsconfig/tsconfig.base.json".
If I run getTsconfig('.') from within @repository/library (e.g. at the path ./packages/library, get-tsconfig fails with the following error:
Error: File '@repository/tsconfig/tsconfig.base.json' not found.
tsc itself will correctly process this, so I consider this to be a bug with get-tsconfig.
Additional context: this is happening in the context of tsx. However, I was able to isolate the problem to this package, and specifically to the changes introduced in #75.
Expected behavior
I would expect get-tsconfig to correctly resolve the tsconfig.json file in @repository/library.
I think I've narrowed it down to an issue with passing relative paths instead of absolute ones. This is still an issue, as the tsx docs (https://tsx.is/usage) specifically show the usage of a relative path for TSX_TSCONFIG_PATH.
Problem
Consider a repository using Yarn workspaces. There's a package
@repository/tsconfig
containing a filetsconfig.base.json
. There's another package@repository/library
with a filetsconfig.json
that contains"extends": "@repository/tsconfig/tsconfig.base.json"
.If I run
getTsconfig('.')
from within@repository/library
(e.g. at the path./packages/library
,get-tsconfig
fails with the following error:tsc
itself will correctly process this, so I consider this to be a bug withget-tsconfig
.Additional context: this is happening in the context of
tsx
. However, I was able to isolate the problem to this package, and specifically to the changes introduced in #75.Expected behavior
I would expect
get-tsconfig
to correctly resolve thetsconfig.json
file in@repository/library
.Minimal reproduction URL
https://github.com/nwalters512/get-tsconfig-yarn-workspaces-reproduction
Version
4.7.4
Node.js version
v20.13.0
Package manager
yarn
Operating system
macOS
Contributions
The text was updated successfully, but these errors were encountered: