Skip to content

Commit

Permalink
remove test param
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 26, 2024
1 parent 8431cca commit 39235d8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/language-core/lib/languagePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ export function createVueLanguagePlugin2<T>(
asFileName: (scriptId: T) => string,
isRootFile: (fileName: string) => boolean,
compilerOptions: ts.CompilerOptions,
vueCompilerOptions: VueCompilerOptions,
test?: boolean
vueCompilerOptions: VueCompilerOptions
): LanguagePlugin<T, VueVirtualCode> {
const pluginContext: Parameters<VueLanguagePlugin>[0] = {
modules: {
Expand All @@ -108,7 +107,6 @@ export function createVueLanguagePlugin2<T>(
compilerOptions,
vueCompilerOptions,
globalTypesHolder: undefined,
test,
};
const plugins = createPlugins(pluginContext);

Expand Down
3 changes: 3 additions & 0 deletions packages/language-core/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export interface VueCompilerOptions {
experimentalDefinePropProposal: 'kevinEdition' | 'johnsonEdition' | false;
experimentalResolveStyleCssClasses: 'scoped' | 'always' | 'never';
experimentalModelPropName: Record<string, Record<string, boolean | Record<string, string> | Record<string, string>[]>>;

// internal
__test?: boolean;
}

export const validVersions = [2, 2.1] as const;
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/lib/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export function initialize(
compilerOptions = ts.getDefaultCompilerOptions();
vueCompilerOptions = resolveVueCompilerOptions({});
}
vueCompilerOptions.__test = params.initializationOptions.typescript.disableAutoImportCache;
updateFileWatcher(vueCompilerOptions);
return {
languagePlugins: [createVueLanguagePlugin2(
Expand All @@ -48,8 +49,7 @@ export function initialize(
sys.useCaseSensitiveFileNames
),
compilerOptions,
vueCompilerOptions,
params.initializationOptions.typescript.disableAutoImportCache
vueCompilerOptions
)],
setup({ project }) {
project.vue = { compilerOptions: vueCompilerOptions };
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ connection.onInitialize(params => {
vueOptions: resolveVueCompilerOptions({}),
options: ts.getDefaultCompilerOptions(),
};
commandLine.vueOptions.__test = params.initializationOptions.typescript.disableAutoImportCache;
return {
languagePlugins: [createVueLanguagePlugin2(
ts,
asFileName,
() => false,
commandLine.options,
commandLine.vueOptions,
params.initializationOptions.typescript.disableAutoImportCache
commandLine.vueOptions
)],
setup({ project }) {
project.vue = { compilerOptions: commandLine.vueOptions };
Expand Down

0 comments on commit 39235d8

Please sign in to comment.