Skip to content

Commit

Permalink
chore: create .npmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 22, 2024
1 parent ef40817 commit 12eef58
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 217 deletions.
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
link-workspace-packages=true
6 changes: 3 additions & 3 deletions packages/language-service/lib/plugins/vue-template.ts
Expand Up @@ -449,7 +449,7 @@ export function create(
}

for (const binding of scriptSetupRanges?.bindings ?? []) {
const name = vueCode.sfc.scriptSetup!.content.substring(binding.start, binding.end);
const name = vueCode.sfc.scriptSetup.content.substring(binding.start, binding.end);
if (casing.tag === TagNameCasing.Kebab) {
names.add(hyphenateTag(name));
}
Expand Down Expand Up @@ -498,8 +498,8 @@ export function create(
return [];
}
let ctxVars = [
..._tsCodegen.scriptRanges()?.bindings.map(binding => vueCode.sfc.script!.content.substring(binding.start, binding.end)) ?? [],
..._tsCodegen.scriptSetupRanges()?.bindings.map(binding => vueCode.sfc.scriptSetup!.content.substring(binding.start, binding.end)) ?? [],
..._tsCodegen.scriptRanges()?.bindings.map(binding => vueCode.sfc.script.content.substring(binding.start, binding.end)) ?? [],
..._tsCodegen.scriptSetupRanges()?.bindings.map(binding => vueCode.sfc.scriptSetup.content.substring(binding.start, binding.end)) ?? [],
...templateContextProps,
];
ctxVars = [...new Set(ctxVars)];
Expand Down
Expand Up @@ -47,8 +47,8 @@ export function collectExtractProps(
const source = map.getSourceOffset(name.getEnd() - (isTsPlugin ? volarFile.snapshot.getLength() : 0));
if (
source
&& source[0] >= sfc.template!.startTagEnd + templateCodeRange[0]
&& source[0] <= sfc.template!.startTagEnd + templateCodeRange[1]
&& source[0] >= sfc.template.startTagEnd + templateCodeRange[0]

Check failure on line 50 in packages/typescript-plugin/lib/requests/collectExtractProps.ts

View workflow job for this annotation

GitHub Actions / build (18, macos-latest)

'sfc.template' is possibly 'undefined'.

Check failure on line 50 in packages/typescript-plugin/lib/requests/collectExtractProps.ts

View workflow job for this annotation

GitHub Actions / build (18, ubuntu-latest)

'sfc.template' is possibly 'undefined'.
&& source[0] <= sfc.template.startTagEnd + templateCodeRange[1]

Check failure on line 51 in packages/typescript-plugin/lib/requests/collectExtractProps.ts

View workflow job for this annotation

GitHub Actions / build (18, macos-latest)

'sfc.template' is possibly 'undefined'.

Check failure on line 51 in packages/typescript-plugin/lib/requests/collectExtractProps.ts

View workflow job for this annotation

GitHub Actions / build (18, ubuntu-latest)

'sfc.template' is possibly 'undefined'.
&& isSemanticTokensEnabled(source[1].data)
) {
if (!result.has(name.text)) {
Expand Down

0 comments on commit 12eef58

Please sign in to comment.