Skip to content

Fix accessing outer directories in tsconfig - #1522

Merged
ssalbdivad merged 2 commits into
arktypeio:mainfrom
LukeAbby:tsconfig-relative-paths-fix
Oct 19, 2025
Merged

Fix accessing outer directories in tsconfig#1522
ssalbdivad merged 2 commits into
arktypeio:mainfrom
LukeAbby:tsconfig-relative-paths-fix

Conversation

@LukeAbby

Copy link
Copy Markdown
Contributor

With a tsconfig like this I noticed that arktype was puking:

{
  "extends": "../tsconfig.base.json",
  "compilerOptions": {
    "typeRoots": "../node_modules/@types",
    "types": ["node"] // Doesn't matter what.
  }
}

Specifically when the directory of the config was, say, tests it'd try tests/tsconfig.base.json instead of tsconfig.base.json. This ended up being because arktype gave a relative path and so ./../tsconfig.base.json simplified to ./tsconfig.base.json and . was tests.

@ssalbdivad ssalbdivad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@ssalbdivad
ssalbdivad merged commit 8732d93 into arktypeio:main Oct 19, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from To do to Done (merged or closed) in arktypeio Oct 19, 2025
@LukeAbby
LukeAbby deleted the tsconfig-relative-paths-fix branch October 19, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done (merged or closed)

Development

Successfully merging this pull request may close these issues.

2 participants