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

Install typescript version matching installed compiler version. #12

Open
osyrisrblx opened this issue Feb 21, 2024 · 3 comments
Open

Install typescript version matching installed compiler version. #12

osyrisrblx opened this issue Feb 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@osyrisrblx
Copy link
Member

We can fetch + parse the package.json using jsdelivr.net

The end result should be like "typescript": "=5.3.3",

@osyrisrblx osyrisrblx added the enhancement New feature or request label Feb 21, 2024
@Dionysusnu
Copy link

Dionysusnu commented Feb 21, 2024

Supersedes roblox-ts/roblox-ts#2199

Is jsdelivr the preferred strategy? We could also install roblox-ts first, then parse the node_modules/roblox-ts/package.json.

@osyrisrblx
Copy link
Member Author

Copying the body from roblox-ts/roblox-ts#2199

Running rbxtsc init will make the package manager install the latest (stable) version of TypeScript, not the actual version that roblox-ts is meant to support. This causes version conflicts, where for example the user's editor might show support for a new feature, but the compiler wouldn't yet recognise it.

@osyrisrblx
Copy link
Member Author

We could also install roblox-ts first, then parse the node_modules/roblox-ts/package.json.
This is possible, but I am concerned about having to run npm install twice. It's not a very fast command. 😓

I realized jsdelivr might have caching issues with @latest.

Alternatively, we could do:

npm view roblox-ts@latest dependencies.typescript

(or swap @latest for a specific version)

Whatever caching issues this has would probably match npm install.

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

No branches or pull requests

2 participants