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

Extension size doubled after update of TypeScript's major #2273

Closed
3 tasks done
opl- opened this issue Sep 13, 2020 · 7 comments · Fixed by #2301
Closed
3 tasks done

Extension size doubled after update of TypeScript's major #2273

opl- opened this issue Sep 13, 2020 · 7 comments · Fixed by #2301
Labels

Comments

@opl-
Copy link

opl- commented Sep 13, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: N/A
  • Vetur version: 0.27.3
  • VS Code version: N/A

Problem

I noticed that the extension size went from 147MiB in 0.26.1 to 349MiB in 0.27.3. It appears that the extra space came from the appearance of multiple redundant TypeScript packages in the Vue language server dependencies. The packages in question are:

Each of these duplicate TypeScript packages contributes 51MB to the extension size. The VLS itself uses [email protected] (server/node_modules/typescript).

I'm not sure why the problem with @typescript-eslint/typescript-estree happened. package-lock.json on a machine of a Vetur maintainer, perhaps?

In the case of the latter three, it's due to TypeScript refusing to adhere to semver (see microsoft/TypeScript#14116). I opened issues on the project pages of the affected projects.

Side note: why are suf-cli and ts-doc-gen bundled? They seem to be development dependencies. Also, one of them replaces the other.

Side note 2: this issue also affects prettier-tslint (azz/prettier-tslint#41), but since it uses TypeScript as a peer dependency npm only mentions it as an unmet peer dependency.

Reproducible Case

N/A

@TheRealSyler
Copy link
Contributor

@opl- ill update my packages soon, i wasn't aware that its important to add ts as a devDep.

@TheRealSyler
Copy link
Contributor

TheRealSyler commented Sep 13, 2020

i updated my packages and ran yarn upgrade on my local fork, and checked the yarn.lock, my packages are no longer dependent on typescript.

@yoyo930021
Copy link
Member

ref #2232 , #2233

@yoyo930021 yoyo930021 added the bug label Sep 14, 2020
@opl-
Copy link
Author

opl- commented Sep 18, 2020

It seems that @typescript-eslint/typescript-eslint uses a resolutions package.json property (only supported by default by Yarn) to force a certain TypeScript version to be used:

typescript-eslint/typescript-eslint@e6be621#diff-b9cfc7f2cdf78a7f4b91a753d10865a2

I've never used it before myself so I'm not sure how exactly it behaves, but it seems like it might be useful here?

@octref
Copy link
Member

octref commented Sep 21, 2020

@TheRealSyler @sorg/log -> s.color still depends on TS 3.9.7.

@TheRealSyler
Copy link
Contributor

@octref not as a devDep, s.color @sorg/log, did you run yarn or yarn upgrade?, or do you mean that they still depend on an old typescript version as in devDep: {ts: 3.9.7} ?

@octref
Copy link
Member

octref commented Sep 21, 2020

@TheRealSyler You are correct, I didnt' realize. I saw it in yarn why typescript, but the yarn --prod in my release script won't include it.

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

Successfully merging a pull request may close this issue.

4 participants