@@ -49,6 +49,9 @@ export function validateEngineCompatibility(version: string): void {
4949
5050/**
5151 * User shouldn't use a newer version of @types/vscode than the one specified in engines.vscode
52+ *
53+ * NOTE: This is enforced at the major and minor level., Since we don't have control over the patch
54+ * version (it's auto-incremented by DefinitelyTyped), we don't look at the patch version at all.
5255 */
5356export function validateVSCodeTypesCompatibility ( engineVersion : string , typeVersion : string ) : void {
5457if ( engineVersion === '*' ) {
@@ -78,14 +81,14 @@ export function validateVSCodeTypesCompatibility(engineVersion: string, typeVers
7881// For all `x`, use smallest version for comparison
7982plainEngineVersion = plainEngineVersion . replace ( / x / g, '0' ) ;
8083
81- const [ typeMajor , typeMinor , typePatch ] = plainTypeVersion . split ( '.' ) . map ( x => {
84+ const [ typeMajor , typeMinor ] = plainTypeVersion . split ( '.' ) . map ( x => {
8285try {
8386return parseInt ( x ) ;
8487} catch ( err ) {
8588return 0 ;
8689}
8790} ) ;
88- const [ engineMajor , engineMinor , enginePatch ] = plainEngineVersion . split ( '.' ) . map ( x => {
91+ const [ engineMajor , engineMinor ] = plainEngineVersion . split ( '.' ) . map ( x => {
8992try {
9093return parseInt ( x ) ;
9194} catch ( err ) {
@@ -103,7 +106,4 @@ export function validateVSCodeTypesCompatibility(engineVersion: string, typeVers
103106if ( typeMajor === engineMajor && typeMinor > engineMinor ) {
104107throw error ;
105108}
106- if ( typeMajor === engineMajor && typeMinor === engineMinor && typePatch > enginePatch ) {
107- throw error ;
108- }
109109}
0 commit comments