@@ -49,6 +49,9 @@ export function validateEngineCompatibility(version: string): void {
49
49
50
50
/**
51
51
* 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.
52
55
*/
53
56
export function validateVSCodeTypesCompatibility ( engineVersion : string , typeVersion : string ) : void {
54
57
if ( engineVersion === '*' ) {
@@ -78,14 +81,14 @@ export function validateVSCodeTypesCompatibility(engineVersion: string, typeVers
78
81
// For all `x`, use smallest version for comparison
79
82
plainEngineVersion = plainEngineVersion . replace ( / x / g, '0' ) ;
80
83
81
- const [ typeMajor , typeMinor , typePatch ] = plainTypeVersion . split ( '.' ) . map ( x => {
84
+ const [ typeMajor , typeMinor ] = plainTypeVersion . split ( '.' ) . map ( x => {
82
85
try {
83
86
return parseInt ( x ) ;
84
87
} catch ( err ) {
85
88
return 0 ;
86
89
}
87
90
} ) ;
88
- const [ engineMajor , engineMinor , enginePatch ] = plainEngineVersion . split ( '.' ) . map ( x => {
91
+ const [ engineMajor , engineMinor ] = plainEngineVersion . split ( '.' ) . map ( x => {
89
92
try {
90
93
return parseInt ( x ) ;
91
94
} catch ( err ) {
@@ -103,7 +106,4 @@ export function validateVSCodeTypesCompatibility(engineVersion: string, typeVers
103
106
if ( typeMajor === engineMajor && typeMinor > engineMinor ) {
104
107
throw error ;
105
108
}
106
- if ( typeMajor === engineMajor && typeMinor === engineMinor && typePatch > enginePatch ) {
107
- throw error ;
108
- }
109
109
}
0 commit comments