dividab / tsconfig-paths

Load node modules according to tsconfig paths, in run-time or via API.
MIT License
1.82k stars 104 forks source link

fix: use get-tsconfig to handle tsconfig file resolution #247

Open effervescentia opened 1 year ago

effervescentia commented 1 year ago

hey @jonaskello I rewrote my other PR using the library get-tsconfig which does not rely on the API exposed by typescript, it has zero dependencies and implements all of the features of the latest TSConfig files (including extends as an array, which I see was a recent change to this repo).

I'd really appreciate some feedback on how to move either of these changes forward

effervescentia commented 1 year ago

hey @jonaskello following up in this PR as well just to get your attention. let me know if there's anything I can do to help move either of these changes forward

effervescentia commented 1 year ago

Hi @Jontem sorry to ping you as well, but I wasn't getting a response from your colleague can you provide any information on how I can progress either this PR or my other PR?

Unfortunately your library is at the root of many typescript-enabled workflows and this issue is seriously affecting my team because it does not follow the extension behaviour of official TypeScript tools

jonaskello commented 1 year ago

Unfortunately your library is at the root of many typescript-enabled workflows

Yes, I know this :-). So the main problem or merging anything is that we don't want to break any of the many existing users, which makes larger changes like this difficult to assess. I saw that a bunch of tests were removed. I guess this was because the assumption is that the external library is fully tested? But perhaps we can keep all current tests to ensure some level of combability?

effervescentia commented 1 year ago

Thanks for the reply @jonaskello :) sorry for the continual pings on these changes

and sure 👍 I'm happy to re-add the tests for added safety

Do you have any preference between using get-tsconfig and using the internals of typescript? I'll update the PR for whichever one you're more comfortable with using and close the other

jonaskello commented 1 year ago

I don't like relying on undocumented API:s so although I don't like external dependencies either I guess get-tsconfig is my preferred choice here :-).

effervescentia commented 1 year ago

Amazing 👍 I'll rework this PR to keep the existing tests as best as possible

effervescentia commented 7 months ago

Heya @jonaskello long time no chat 😅 After more than a year brewing I've finally had a chance to go back in and re-add the tests I had removed

As you can see it maintains compatibility with the original test suite while also handling multiple levels of extension (the original reason for this PR)

Let me know what else I can do to push this along, I'll try to follow up more regularly going forward

jonaskello commented 7 months ago

Nice work! However, it seems the github checks are failing, perhaps you can take a look at it?

effervescentia commented 7 months ago

Nice work! However, it seems the github checks are failing, perhaps you can take a look at it?

will do 👍