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
134134 } ) ;
135135 }
136136
137+ const pugPluginPkg = await getPackageJsonOfWorkspacePackage ( fileUri . fsPath , '@vue/language-plugin-pug' ) ;
138+
137139 // check using pug but don't install @vue/language-plugin-pug
138140 if (
139141 sfc ?. descriptor . template ?. lang === 'pug'
140- && ! await getPackageJsonOfWorkspacePackage ( fileUri . fsPath , '@vue/language-plugin-pug' )
142+ && ! pugPluginPkg
141143 ) {
142144 problems . push ( {
143145 title : '`@vue/language-plugin-pug` missing' ,
@@ -157,6 +159,22 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
157159 } ) ;
158160 }
159161
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+
160178 // check syntax highlight extension installed
161179 if ( sfc ) {
162180 const blocks = [
You can’t perform that action at this time.
0 commit comments