Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@volar/vue-language-core

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/vue-language-core - npm Package Compare versions

Comparing version 1.3.16 to 1.3.17

14

out/generators/script.js

@@ -556,3 +556,3 @@ "use strict";

// NOTE: defineProps is inaccurate for $props
codes.push(`$props: (await import('./__VLS_types.js')).makeOptional(defineProps<`);
codes.push(`$props: (await import('./__VLS_types')).makeOptional(defineProps<`);
addExtraReferenceVirtualCode('scriptSetup', scriptSetupRanges.propsTypeArg.start, scriptSetupRanges.propsTypeArg.end);

@@ -563,3 +563,3 @@ codes.push(`>()),\n`);

// NOTE: defineProps is inaccurate for $props
codes.push(`$props: (await import('./__VLS_types.js')).makeOptional(defineProps(`);
codes.push(`$props: (await import('./__VLS_types')).makeOptional(defineProps(`);
addExtraReferenceVirtualCode('scriptSetup', scriptSetupRanges.propsRuntimeArg.start, scriptSetupRanges.propsRuntimeArg.end);

@@ -745,8 +745,8 @@ codes.push(`)),\n`);

if (sfc.scriptSetup) {
codes.push(`InstanceType<import('./__VLS_types.js').PickNotAny<typeof __VLS_publicComponent, new () => {}>> & `);
codes.push(`InstanceType<import('./__VLS_types').PickNotAny<typeof __VLS_publicComponent, new () => {}>> & `);
}
codes.push(`InstanceType<import('./__VLS_types.js').PickNotAny<typeof __VLS_internalComponent, new () => {}>> & {\n`);
codes.push(`InstanceType<import('./__VLS_types').PickNotAny<typeof __VLS_internalComponent, new () => {}>> & {\n`);
/* CSS Module */
for (const cssModule of cssModuleClasses) {
codes.push(`${cssModule.style.module}: Record<string, string> & import('./__VLS_types.js').Prettify<{}`);
codes.push(`${cssModule.style.module}: Record<string, string> & import('./__VLS_types').Prettify<{}`);
for (const classNameRange of cssModule.classNameRanges) {

@@ -761,4 +761,4 @@ generateCssClassProperty(cssModule.index, cssModule.style.content.substring(classNameRange.start + 1, classNameRange.end), classNameRange, 'string', false);

codes.push(`let __VLS_localComponents!: NonNullable<typeof __VLS_internalComponent extends { components: infer C } ? C : {}> & typeof __VLS_componentsOption & typeof __VLS_ctx;\n`);
codes.push(`let __VLS_otherComponents!: typeof __VLS_localComponents & import('./__VLS_types.js').GlobalComponents;\n`);
codes.push(`let __VLS_own!: import('./__VLS_types.js').SelfComponent<typeof __VLS_name, typeof __VLS_internalComponent & typeof __VLS_publicComponent & (new () => { ${(0, shared_2.getSlotsPropertyName)(vueCompilerOptions.target ?? 3)}: typeof __VLS_slots })>;\n`);
codes.push(`let __VLS_otherComponents!: typeof __VLS_localComponents & import('./__VLS_types').GlobalComponents;\n`);
codes.push(`let __VLS_own!: import('./__VLS_types').SelfComponent<typeof __VLS_name, typeof __VLS_internalComponent & typeof __VLS_publicComponent & (new () => { ${(0, shared_2.getSlotsPropertyName)(vueCompilerOptions.target ?? 3)}: typeof __VLS_slots })>;\n`);
codes.push(`let __VLS_components!: typeof __VLS_otherComponents & Omit<typeof __VLS_own, keyof typeof __VLS_otherComponents>;\n`);

@@ -765,0 +765,0 @@ /* Style Scoped */

@@ -53,16 +53,15 @@ "use strict";

let snapshot = host.getScriptSnapshot(fileName);
if (snapshot) {
if (!vueCompilerOptions.strictTemplates && (
// for vue 2.6 and vue 3
basename === 'runtime-dom.d.ts' ||
// for vue 2.7
basename === 'jsx.d.ts')) {
if (!patchSnapshots.has(snapshot)) {
// allow arbitrary attributes
let tsScriptText = snapshot.getText(0, snapshot.getLength());
tsScriptText = tsScriptText.replace('type ReservedProps = {', 'type ReservedProps = { [name: string]: any');
patchSnapshots.set(snapshot, ts.ScriptSnapshot.fromString(tsScriptText));
}
snapshot = patchSnapshots.get(snapshot);
if (snapshot
&& !vueCompilerOptions.strictTemplates
&& (
// vue 3
fileName.endsWith('/node_modules/@vue/runtime-core/dist/runtime-core.d.ts')
// vue 2.7
|| fileName.endsWith('/node_modules/vue/types/v3-component-proxy.d.ts'))) {
if (!patchSnapshots.has(snapshot)) {
let text = snapshot.getText(0, snapshot.getLength());
text = text.replace(/\$props: [^;]*/g, match => `$props: Record<string, unknown> & (${match.slice('$props: '.length)})`);
patchSnapshots.set(snapshot, ts.ScriptSnapshot.fromString(text));
}
snapshot = patchSnapshots.get(snapshot);
}

@@ -69,0 +68,0 @@ return snapshot;

@@ -90,4 +90,4 @@ "use strict";

PickNotAny<
asFunctionOrAny<E>,
asFunctionOrAny<EmitEvent<Emit, K>>
asFunctionOrAny<NonNullable<E>>,
asFunctionOrAny<NonNullable<EmitEvent<Emit, K>>>
>

@@ -99,3 +99,3 @@ >;

>;
type asFunctionOrAny<F> = ((...args: any) => any) extends F ? F : any;
type asFunctionOrAny<F> = F extends ((...args: any) => any) ? F : any;
`.trim();

@@ -102,0 +102,0 @@ }

@@ -11,6 +11,9 @@ "use strict";

for (const extendPath of proxyHost.extendConfigPaths.reverse()) {
vueOptions = {
...vueOptions,
...getVueCompilerOptions(ts, ts.readJsonConfigFile(extendPath, proxyHost.host.readFile)),
};
try {
vueOptions = {
...vueOptions,
...getVueCompilerOptions(ts, ts.readJsonConfigFile(extendPath, proxyHost.host.readFile)),
};
}
catch (err) { }
}

@@ -34,6 +37,9 @@ return {

for (const extendPath of proxyHost.extendConfigPaths.reverse()) {
vueOptions = {
...vueOptions,
...getVueCompilerOptions(ts, ts.readJsonConfigFile(extendPath, proxyHost.host.readFile)),
};
try {
vueOptions = {
...vueOptions,
...getVueCompilerOptions(ts, ts.readJsonConfigFile(extendPath, proxyHost.host.readFile)),
};
}
catch (err) { }
}

@@ -40,0 +46,0 @@ return {

{
"name": "@volar/vue-language-core",
"version": "1.3.16",
"version": "1.3.17",
"main": "out/index.js",

@@ -16,4 +16,4 @@ "license": "MIT",

"dependencies": {
"@volar/language-core": "1.4.0-alpha.9",
"@volar/source-map": "1.4.0-alpha.9",
"@volar/language-core": "1.4.0-alpha.11",
"@volar/source-map": "1.4.0-alpha.11",
"@vue/compiler-dom": "^3.2.0",

@@ -23,3 +23,3 @@ "@vue/compiler-sfc": "^3.2.0",

"@vue/shared": "^3.2.0",
"minimatch": "^6.1.6",
"minimatch": "^9.0.0",
"muggle-string": "^0.2.2",

@@ -31,3 +31,3 @@ "vue-template-compiler": "^2.7.14"

},
"gitHead": "40066617609780f891a60eea1fc3c7c84cbc5505"
"gitHead": "6f897c5fc44e48a0117b935a04b17e00c3369967"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc