Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse does not work with ${configDir} variable of tsconfig.json in node_modules #188

Closed
Zamiell opened this issue Aug 18, 2024 · 6 comments · Fixed by #189
Closed

parse does not work with ${configDir} variable of tsconfig.json in node_modules #188

Zamiell opened this issue Aug 18, 2024 · 6 comments · Fixed by #189
Labels
bug Something isn't working

Comments

@Zamiell
Copy link
Contributor

Zamiell commented Aug 18, 2024

steps to reproduce:

git clone [email protected]:IsaacScript/isaacscript.git
cd isaacscript
git checkout 939662fcb5d5efc37a80b2cf8e5f7f4e23986c9e
yarn
cd packages/eslint-plugin-isaacscript
npm run build
# The build will succeed.
# Now, we change "tsconfck.parseNative" to "tsconfck.parse".
sed --in-place 's/tsconfck\.parseNative/tsconfck.parse/g' ../isaacscript-common-node/src/functions/scriptHelpers.ts
npm run build
# The build fails.
@Zamiell Zamiell changed the title parse does not work with ${configDir" parse does not work with ${configDir} variable Aug 18, 2024
@dominikg
Copy link
Owner

please provide a link to a minimal reproduction, not a huge monorepo.

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 18, 2024

Sorry, I don't currently have the cycles to provide a minimal reproduction. For now, I will use parseNative, and I guess we can leave this issue open to see if anyone else has the same problem.

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 31, 2024

I think I narrowed down the bug. It seems that tsconfck does not parse npm packages correctly, as demonstrated by the following reprex: https://github.com/Zamiell/test

If you copy paste the remote tsconfig and put it in the repo root, then everything works fine. Thus, I guess the logic for resolving npm packages isn't working properly?

@dominikg
Copy link
Owner

please check #189 and lmk if that works for you. I did add a testcase based on your config so it really should ;) Thanks for the reproduction

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 31, 2024

thanks, that does seem to fix the problem!

@dominikg
Copy link
Owner

fix released in 3.1.2

@dominikg dominikg changed the title parse does not work with ${configDir} variable parse does not work with ${configDir} variable of tsconfig.json in node_modules Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants