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
Problem
A TS Server plugin may depend on a TypeScript API that is only available in specific versions of typescript, such as TS 2.6+ for example. Currently the TypeScript server will always attempt to load this plugin, even if it does not meet those requirements.
Proposal
In the plugin's package.json, add a engines: typescriptserver section:
{
"engines": {
"typescriptserver": "^2.6.0"
}
}
this entry would specify a semver that the typescript server would check against its own version to determine if a plugin can be loaded or not. If a plugin is not compatible, we should generate an error event (see #18849)
The text was updated successfully, but these errors were encountered:
ts.version is not the right check here. it assumes that any change to the language version means a breaking change to the API, which is not true.
The correct version to use is ts.servicesVersion is the right one to check. we only change this version when we update the API in a breaking fashion. see #19455 (comment) and #19507 for an example.
@RyanCavanaugh can we update the docs with these recommendations?
@DanielRosenwasser@minestarks This is another one we should make sure we handle for IntelliCode. Looks like no action is required here besides documentation and a runtime check in the plugin itself.
Problem
A TS Server plugin may depend on a TypeScript API that is only available in specific versions of typescript, such as TS 2.6+ for example. Currently the TypeScript server will always attempt to load this plugin, even if it does not meet those requirements.
Proposal
In the plugin's
package.json
, add aengines: typescriptserver
section:this entry would specify a semver that the typescript server would check against its own version to determine if a plugin can be loaded or not. If a plugin is not compatible, we should generate an error event (see #18849)
The text was updated successfully, but these errors were encountered: