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

Consider using older TS version #41

Closed
IanVS opened this issue Nov 29, 2021 · 6 comments · Fixed by #65
Closed

Consider using older TS version #41

IanVS opened this issue Nov 29, 2021 · 6 comments · Fixed by #65

Comments

@IanVS
Copy link
Contributor

IanVS commented Nov 29, 2021

After adding typescript as a dependency in #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
Copy link
Owner

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
Copy link
Contributor Author

IanVS commented Nov 29, 2021

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

@davestewart
Copy link
Owner

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
Copy link
Contributor Author

IanVS commented Jan 17, 2023

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

@IanVS
Copy link
Contributor Author

IanVS commented Mar 20, 2023

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

@davestewart
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants