Extension size doubled after update of TypeScript's major
See original GitHub issueInfo
- 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:
@typescript-eslint/typescript-estree
- Has its ownnode_modules/typescript
(v4.0.2). The package depends ontypescript *
as adevDependency
.prettier-eslint
- Has its ownnode_modules/typescript
(v3.9.7). The package depends ontypescript ^3.9.3
. See prettier/prettier-eslint#402suf-cli
- Has its ownnode_modules/typescript
(v3.9.7). The package depends ontypescript ^3.6.3
. See TheRealSyler/suf-cli#2ts-doc-gen
- Has its ownnode_modules/typescript
(v3.9.7). The package depends ontypescript ^3.6.3
. This package, according to its readme, has been superseded bysuf-cli
.
Each of these duplicate TypeScript packages contributes 51MB to the extension size. The VLS itself uses typescript@4.0.2
(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
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
@octref not as a devDep,
s.color
@sorg/log
, did you runyarn
oryarn upgrade
?, or do you mean that they still depend on an old typescript version as indevDep: {ts: 3.9.7}
?@opl- ill update my packages soon, i wasn’t aware that its important to add ts as a devDep.