alias-hq icon indicating copy to clipboard operation
alias-hq copied to clipboard

Consider using older TS version

Open IanVS opened this issue 3 years ago • 3 comments

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?

IanVS avatar Nov 29 '21 15:11 IanVS

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.

davestewart avatar Nov 29 '21 16:11 davestewart

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

IanVS avatar Nov 29 '21 16:11 IanVS

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).

davestewart avatar Nov 29 '21 16:11 davestewart

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

IanVS avatar Jan 17 '23 21:01 IanVS

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

IanVS avatar Mar 20 '23 12:03 IanVS

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

davestewart avatar Mar 20 '23 15:03 davestewart