Skip to content

Commit 12eef58

Browse files
committed
chore: create .npmrc
1 parent ef40817 commit 12eef58

File tree

4 files changed

+20
-217
lines changed

4 files changed

+20
-217
lines changed

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
link-workspace-packages=true

packages/language-service/lib/plugins/vue-template.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export function create(
449449
}
450450

451451
for (const binding of scriptSetupRanges?.bindings ?? []) {
452-
const name = vueCode.sfc.scriptSetup!.content.substring(binding.start, binding.end);
452+
const name = vueCode.sfc.scriptSetup.content.substring(binding.start, binding.end);
453453
if (casing.tag === TagNameCasing.Kebab) {
454454
names.add(hyphenateTag(name));
455455
}
@@ -498,8 +498,8 @@ export function create(
498498
return [];
499499
}
500500
let ctxVars = [
501-
..._tsCodegen.scriptRanges()?.bindings.map(binding => vueCode.sfc.script!.content.substring(binding.start, binding.end)) ?? [],
502-
..._tsCodegen.scriptSetupRanges()?.bindings.map(binding => vueCode.sfc.scriptSetup!.content.substring(binding.start, binding.end)) ?? [],
501+
..._tsCodegen.scriptRanges()?.bindings.map(binding => vueCode.sfc.script.content.substring(binding.start, binding.end)) ?? [],
502+
..._tsCodegen.scriptSetupRanges()?.bindings.map(binding => vueCode.sfc.scriptSetup.content.substring(binding.start, binding.end)) ?? [],
503503
...templateContextProps,
504504
];
505505
ctxVars = [...new Set(ctxVars)];

packages/typescript-plugin/lib/requests/collectExtractProps.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export function collectExtractProps(
4747
const source = map.getSourceOffset(name.getEnd() - (isTsPlugin ? volarFile.snapshot.getLength() : 0));
4848
if (
4949
source
50-
&& source[0] >= sfc.template!.startTagEnd + templateCodeRange[0]
51-
&& source[0] <= sfc.template!.startTagEnd + templateCodeRange[1]
50+
&& source[0] >= sfc.template.startTagEnd + templateCodeRange[0]
51+
&& source[0] <= sfc.template.startTagEnd + templateCodeRange[1]
5252
&& isSemanticTokensEnabled(source[1].data)
5353
) {
5454
if (!result.has(name.text)) {

0 commit comments

Comments
 (0)