File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
extensions/vscode/src/features Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -134,10 +134,12 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
134
134
} ) ;
135
135
}
136
136
137
+ const pugPluginPkg = await getPackageJsonOfWorkspacePackage ( fileUri . fsPath , '@vue/language-plugin-pug' ) ;
138
+
137
139
// check using pug but don't install @vue/language-plugin-pug
138
140
if (
139
141
sfc ?. descriptor . template ?. lang === 'pug'
140
- && ! await getPackageJsonOfWorkspacePackage ( fileUri . fsPath , '@vue/language-plugin-pug' )
142
+ && ! pugPluginPkg
141
143
) {
142
144
problems . push ( {
143
145
title : '`@vue/language-plugin-pug` missing' ,
@@ -157,6 +159,22 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
157
159
} ) ;
158
160
}
159
161
162
+ // check using pug but outdated @vue /language-plugin-pug
163
+ if (
164
+ sfc ?. descriptor . template ?. lang === 'pug'
165
+ && pugPluginPkg
166
+ && ! semver . gte ( pugPluginPkg . json . version , '2.0.5' )
167
+ ) {
168
+ problems . push ( {
169
+ title : 'Outdated `@vue/language-plugin-pug`' ,
170
+ message : [
171
+ 'The version of `@vue/language-plugin-pug` is too low, it is required to upgrade to `2.0.5` or later.' ,
172
+ '' ,
173
+ '- @vue/language-plugin-pug: ' + pugPluginPkg . path ,
174
+ ] . join ( '\n' ) ,
175
+ } ) ;
176
+ }
177
+
160
178
// check syntax highlight extension installed
161
179
if ( sfc ) {
162
180
const blocks = [
You can’t perform that action at this time.
0 commit comments