File tree 6 files changed +6
-6
lines changed
language-core/lib/codegen/script
6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ export function baseCreate(
137
137
138
138
const fileExists = languageServiceHost . fileExists . bind ( languageServiceHost ) ;
139
139
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` ;
141
141
const snapshots = new Map < string , ts . IScriptSnapshot > ( ) ;
142
142
languageServiceHost . fileExists = path => {
143
143
if ( path . endsWith ( globalTypesName ) ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export interface ScriptCodegenOptions {
51
51
export function * generateScript ( options : ScriptCodegenOptions ) : Generator < Code , ScriptCodegenContext > {
52
52
const ctx = createScriptCodegenContext ( options ) ;
53
53
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 } ` ;
55
55
56
56
if ( options . sfc . script ?. src ) {
57
57
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(
52
52
project . vue = { compilerOptions : vueCompilerOptions } ;
53
53
54
54
if ( project . typescript ) {
55
- const globalTypesName = `__globalTypes_ ${ vueCompilerOptions . target } _${ vueCompilerOptions . strictTemplates } .d.ts` ;
55
+ const globalTypesName = `__global_types_ ${ vueCompilerOptions . target } _${ vueCompilerOptions . strictTemplates } .d.ts` ;
56
56
const fileExists = project . typescript . languageServiceHost . fileExists . bind ( project . typescript . languageServiceHost ) ;
57
57
const getScriptSnapshot = project . typescript . languageServiceHost . getScriptSnapshot . bind ( project . typescript . languageServiceHost ) ;
58
58
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')) {
27
27
: options . host ?. getCurrentDirectory ( ) ?? ts . sys . getCurrentDirectory ( ) ;
28
28
const libDir = require . resolve ( `${ vueOptions . lib } /package.json` , { paths : [ rootDir ] } )
29
29
. 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` ;
31
31
const globalTypesContents = vue . generateGlobalTypes ( vueOptions . lib , vueOptions . target , vueOptions . strictTemplates ) ;
32
32
ts . sys . writeFile ( globalTypesPath , globalTypesContents ) ;
33
33
} catch { }
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ describe('vue-tsc-dts', () => {
37
37
: options . host ?. getCurrentDirectory ( ) ?? ts . sys . getCurrentDirectory ( ) ;
38
38
const libDir = require . resolve ( `${ vueOptions . lib } /package.json` , { paths : [ rootDir ] } )
39
39
. 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` ;
41
41
const globalTypesContents = vue . generateGlobalTypes ( vueOptions . lib , vueOptions . target , vueOptions . strictTemplates ) ;
42
42
ts . sys . writeFile ( globalTypesPath , globalTypesContents ) ;
43
43
} catch { }
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ const plugin: ts.server.PluginModuleFactory = mods => {
63
63
try {
64
64
const libDir = require . resolve ( `${ options . lib } /package.json` , { paths : [ proj . getCurrentDirectory ( ) ] } )
65
65
. 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` ;
67
67
const globalTypesContents = vue . generateGlobalTypes ( options . lib , options . target , options . strictTemplates ) ;
68
68
proj . writeFile ( globalTypesPath , globalTypesContents ) ;
69
69
} catch { }
You can’t perform that action at this time.
0 commit comments