File tree Expand file tree Collapse file tree 6 files changed +6
-6
lines changed
language-core/lib/codegen/script Expand file tree Collapse file tree 6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ export function baseCreate(
137137
138138 const fileExists = languageServiceHost . fileExists . bind ( languageServiceHost ) ;
139139 const getScriptSnapshot = languageServiceHost . getScriptSnapshot . bind ( languageServiceHost ) ;
140- const globalTypesName = `__globalTypes_ ${ commandLine . vueOptions . target } _${ commandLine . vueOptions . strictTemplates } .d.ts` ;
140+ const globalTypesName = `__global_types_ ${ commandLine . vueOptions . target } _${ commandLine . vueOptions . strictTemplates } .d.ts` ;
141141 const snapshots = new Map < string , ts . IScriptSnapshot > ( ) ;
142142 languageServiceHost . fileExists = path => {
143143 if ( path . endsWith ( globalTypesName ) ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export interface ScriptCodegenOptions {
5151export function * generateScript ( options : ScriptCodegenOptions ) : Generator < Code , ScriptCodegenContext > {
5252 const ctx = createScriptCodegenContext ( options ) ;
5353
54- yield `/// <reference types="${ options . vueCompilerOptions . lib } /dist/__globalTypes_ ${ options . vueCompilerOptions . target } _${ options . vueCompilerOptions . strictTemplates } .d.ts" />${ newLine } ` ;
54+ yield `/// <reference types="${ options . vueCompilerOptions . lib } /dist/__global_types_ ${ options . vueCompilerOptions . target } _${ options . vueCompilerOptions . strictTemplates } .d.ts" />${ newLine } ` ;
5555
5656 if ( options . sfc . script ?. src ) {
5757 yield * generateSrc ( options . sfc . script , options . sfc . script . src ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export function initialize(
5252 project . vue = { compilerOptions : vueCompilerOptions } ;
5353
5454 if ( project . typescript ) {
55- const globalTypesName = `__globalTypes_ ${ vueCompilerOptions . target } _${ vueCompilerOptions . strictTemplates } .d.ts` ;
55+ const globalTypesName = `__global_types_ ${ vueCompilerOptions . target } _${ vueCompilerOptions . strictTemplates } .d.ts` ;
5656 const fileExists = project . typescript . languageServiceHost . fileExists . bind ( project . typescript . languageServiceHost ) ;
5757 const getScriptSnapshot = project . typescript . languageServiceHost . getScriptSnapshot . bind ( project . typescript . languageServiceHost ) ;
5858 const snapshots = new Map < string , ts . IScriptSnapshot > ( ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export function run(tscPath = require.resolve('typescript/lib/tsc')) {
2727 : options . host ?. getCurrentDirectory ( ) ?? ts . sys . getCurrentDirectory ( ) ;
2828 const libDir = require . resolve ( `${ vueOptions . lib } /package.json` , { paths : [ rootDir ] } )
2929 . slice ( 0 , - 'package.json' . length ) ;
30- const globalTypesPath = `${ libDir } dist/__globalTypes_ ${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
30+ const globalTypesPath = `${ libDir } dist/__global_types_ ${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
3131 const globalTypesContents = vue . generateGlobalTypes ( vueOptions . lib , vueOptions . target , vueOptions . strictTemplates ) ;
3232 ts . sys . writeFile ( globalTypesPath , globalTypesContents ) ;
3333 } catch { }
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ describe('vue-tsc-dts', () => {
3737 : options . host ?. getCurrentDirectory ( ) ?? ts . sys . getCurrentDirectory ( ) ;
3838 const libDir = require . resolve ( `${ vueOptions . lib } /package.json` , { paths : [ rootDir ] } )
3939 . slice ( 0 , - 'package.json' . length ) ;
40- const globalTypesPath = `${ libDir } dist/__globalTypes_ ${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
40+ const globalTypesPath = `${ libDir } dist/__global_types_ ${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
4141 const globalTypesContents = vue . generateGlobalTypes ( vueOptions . lib , vueOptions . target , vueOptions . strictTemplates ) ;
4242 ts . sys . writeFile ( globalTypesPath , globalTypesContents ) ;
4343 } catch { }
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ const plugin: ts.server.PluginModuleFactory = mods => {
6363 try {
6464 const libDir = require . resolve ( `${ options . lib } /package.json` , { paths : [ proj . getCurrentDirectory ( ) ] } )
6565 . slice ( 0 , - 'package.json' . length ) ;
66- const globalTypesPath = `${ libDir } dist/__globalTypes_ ${ options . target } _${ options . strictTemplates } .d.ts` ;
66+ const globalTypesPath = `${ libDir } dist/__global_types_ ${ options . target } _${ options . strictTemplates } .d.ts` ;
6767 const globalTypesContents = vue . generateGlobalTypes ( options . lib , options . target , options . strictTemplates ) ;
6868 proj . writeFile ( globalTypesPath , globalTypesContents ) ;
6969 } catch { }
You can’t perform that action at this time.
0 commit comments