You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Per the recent incidents (microsoft/vscode#69656), I think it's a good opportunity for us to split vscode node modules into 2 pieces:
@types/vscode
vscode-test
Explanation
vscode node module contains 3 scripts:
compile: no longer used
install: used to fetch vscode.d.ts according to engine.vscode in package.json
test: used for extension test (also lib/testRunner)
Problems
install asks update server for finding matching vscode.d.ts version (actual dts files fetched from GitHub). When update service is down, all extension deps install (CI or local development) could fail.
Benefits of splitting vscode into @types/vscode and vscode-test
No awkward postinstall scripts after each npm install for extension
Users don't have to pull in the 11MB dependencies of test. They pull a few kb of vscode.d.ts from @types/vscode, and it's fully cached by npm/yarn.
vscode.d.ts are hosted on NPM which is pretty reliable. d.ts live in a @types package as they should be.
test now lives in its own repo. It's easier to make improvements, release new versions, expose functionalities (for example, import { downloadVSCodeExecutable } from vscode-test).
Challenges
We can't put all versions of vscode.d.ts into @types/vscode and let TS infer which one, from engines.vscode.
However I think we can publish vscode.d.ts the same version as we do for VS Code, since all our 1.x API are backwards compatible. Most users also auto-update to latest version, so extension authors could use "@types/vscode": "^1.31.0" and safely get minor updates.
Per the recent incidents (microsoft/vscode#69656), I think it's a good opportunity for us to split
vscodenode modules into 2 pieces:@types/vscodevscode-testExplanation
vscodenode module contains 3 scripts:compile: no longer usedinstall: used to fetchvscode.d.tsaccording toengine.vscodeinpackage.jsontest: used for extension test (alsolib/testRunner)Problems
installasks update server for finding matchingvscode.d.tsversion (actual dts files fetched from GitHub). When update service is down, all extension deps install (CI or local development) could fail.yarn installandnpm installcan't be completed offline, even if they have caching: Add Switch for Offline Installation #93testdepends on a lot of node modules (13MB). Everyone has to download them even if they just want to use the API.testneeds some improvements. For example, for running extension tests against multiple workspaces, I had to pull out the test scripts and modify them manually Vetur. Also add flag / env var to enable downloading and unzipping to.vscode-testwithout running tests... #124, people want functionalities exposed fromtestso they can build upon them.Benefits of splitting
vscodeinto@types/vscodeandvscode-testnpm installfor extensiontest. They pull a few kb ofvscode.d.tsfrom@types/vscode, and it's fully cached by npm/yarn.vscode.d.tsare hosted on NPM which is pretty reliable.d.tslive in a@typespackage as they should be.testnow lives in its own repo. It's easier to make improvements, release new versions, expose functionalities (for example,import { downloadVSCodeExecutable } from vscode-test).Challenges
We can't put all versions of
vscode.d.tsinto@types/vscodeand let TS infer which one, fromengines.vscode.However I think we can publish
vscode.d.tsthe same version as we do for VS Code, since all our 1.x API are backwards compatible. Most users also auto-update to latest version, so extension authors could use"@types/vscode": "^1.31.0"and safely get minor updates./cc @Microsoft/vscode for thoughts.