Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from vuejs:master #157

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/vscode/src/features/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function getPackageJsonOfWorkspacePackage(folder: string, pkg: string) {
const path = require.resolve(pkg + '/package.json', { paths: [folder] });
return {
path,
json: require(path) as { version: string },
json: require(path) as { version: string; },
};
} catch { }
}
2 changes: 1 addition & 1 deletion extensions/vscode/src/hybridMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const enabledHybridMode = computed(() => {
return true;
}
return config.server.hybridMode;
})
});

export const enabledTypeScriptPlugin = computed(() => {
return (
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
"test": "vitest run",
"test:update": "vitest run --update",
"lint": "tsslint --projects {tsconfig.json,packages/*/tsconfig.json,extensions/*/tsconfig.json}",
"lint:fix": "pnpm run lint -- --fix",
"lint:fix": "pnpm run lint -- --fix --vscode-settings .vscode/settings.json",
"chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter"
},
"devDependencies": {
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@tsslint/cli": "latest",
"@tsslint/config": "latest",
"@tsslint/eslint": "latest",
"@typescript-eslint/eslint-plugin": "latest",
"@vue/language-core": "2.2.0",
"typescript": "latest",
"vitest": "latest"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/language-core/lib/codegen/script/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function* generateTemplateComponents(options: ScriptCodegenOptions): Generator<C

if (options.sfc.script && options.scriptRanges?.exportDefault?.componentsOption) {
const { componentsOption } = options.scriptRanges.exportDefault;
yield `const __VLS_componentsOption = `
yield `const __VLS_componentsOption = `;
yield [
options.sfc.script.content.slice(componentsOption.start, componentsOption.end),
'script',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function* generateInterpolation(
options: {
ts: typeof ts,
destructuredPropNames: Set<string> | undefined,
templateRefNames: Set<string> | undefined
templateRefNames: Set<string> | undefined;
},
ctx: TemplateCodegenContext,
source: string,
Expand Down
12 changes: 6 additions & 6 deletions packages/language-core/lib/parsers/scriptSetupRanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ type DefineProp = {
defaultValue?: TextRange;
required?: boolean;
isModel?: boolean;
}
};

type DefineProps = CallExpressionRange & {
name?: string;
destructured?: Set<string>;
destructuredRest?: string;
statement: TextRange;
}
};

type WithDefaults = Pick<CallExpressionRange, 'callExp' | 'exp' | 'arg'>;

type DefineEmits = CallExpressionRange & {
name?: string;
hasUnionTypeArg?: boolean;
statement: TextRange;
}
};

type DefineSlots = CallExpressionRange & {
name?: string;
isObjectBindingPattern?: boolean;
statement: TextRange;
}
};

type DefineExpose = CallExpressionRange;

type DefineOptions = {
name?: string;
inheritAttrs?: string;
}
};

type UseAttrs = CallExpressionRange;

Expand All @@ -58,7 +58,7 @@ type UseSlots = CallExpressionRange;

type UseTemplateRef = CallExpressionRange & {
name?: string;
}
};

export interface ScriptSetupRanges extends ReturnType<typeof parseScriptSetupRanges> { }

Expand Down
Loading
Loading