davestewart / alias-hq

The end-to-end solution for configuring, refactoring, maintaining and using path aliases
https://davestewart.co.uk/projects/open-source/alias-hq/
MIT License
330 stars 11 forks source link

Consider using older TS version #41

Closed IanVS closed 1 year ago

IanVS commented 2 years ago

After adding typescript as a dependency in https://github.com/davestewart/alias-hq/pull/37, I found that updating alias-hq also updated the version of typescript being used in my project, which caused some failures since I went from 4.4 to 4.5, and typescript treats minor version updates as breaking. I can solve this by using 4.4.x in my package.json, but this could cause confusion for others as well, so what do you think about using an older version of typescript that still supports the methods needed, so that an accidental upgrade is less likely?

davestewart commented 2 years ago

TBH I was never really comfortable with the TS dependency, as Alias is supposed to be pretty much agnostic, aside from the configuration format.

My gut feeling is to ditch TS and use JSON5 and write the (I presume trivial) code needed to resolve the paths.

IanVS commented 2 years ago

I don't have the time to help out with that right now, but seems like a decent approach to me.

davestewart commented 2 years ago

Yeah, no problem.

My guess is that it's unlikely to trip too many people up for right this second, so maybe I can take a look at it in the coming week(s).

IanVS commented 1 year ago

It might be worth considering using https://github.com/privatenumber/get-tsconfig, which doesn't have a dependency on TS.

IanVS commented 1 year ago

@davestewart what do you think about ^? Worth an experiment to see how it works?

davestewart commented 1 year ago

Yeah, I think it's a good idea.

I need to be able to write back to the file as well in the CLI.

There do seem to be some NPM packages to do this, but maybe I can treat them as separate problems for the time being