-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
get-tsconfig normalizes include
paths
#73
Comments
I'd be happy to accept a PR to update the docs. Curious if there are any cases where the context of the unresolved path (e.g. |
TBH I suspect that this is more of an oversight in TypeScript, because they seem to normalize all other paths. |
Hmm okay, maybe not worth addressing this one then. Will close this out for now, but happy to re-open in the future if it turns out to be an issue. I appreciate you being pedantic! |
I just came across it when I was writing tests for #72 , so I thought that I'd better document it so that I would be able to link to this issue from https://github.com/privatenumber/get-tsconfig/pull/75/files#diff-8a065515830910425965e43cdba6e271a03c1fd3332958f6c50c97fe071b5bb0R246-R255 :) |
Problem
When
include
paths are defined in an extended config that is not in the same directory as sources, get-tsconfig normalizes these paths.E.g.
tsconfig.json
extendsconfigs/tsconfig.base.json
which declares"include": ["../src/*"]
.get-tsconfig produces
include: ["src/*"]
.Expected behavior
Technically, I would expect get-tsconfig to not normalize paths and to produce
include: ["configs/../src/*"]
, as tsc does, since "TypeScript behavior is the source of truth so any behavior that strays away from it is a bug".Minimal reproduction URL
https://stackblitz.com/edit/stackblitz-starters-ngtmsu
Version
v4.7.3
Node.js version
v18.18.0
Package manager
npm
Operating system
Linux
Contributions
I plan to open a pull request adding a test that documents the current behavior, but I'm not sure fixing it is a good idea (not without incrementing the major version), because this can be a breaking change, and the issue is relatively minor and should not be a blocker for anyone.
The text was updated successfully, but these errors were encountered: