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

@vue/language-core

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/language-core - npm Package Compare versions

Comparing version 1.8.14 to 1.8.15

22

out/generators/script.js

@@ -60,2 +60,3 @@ "use strict";

importSectionEndOffset: 0,
withDefaults: undefined,
defineProps: undefined,

@@ -431,2 +432,10 @@ defineSlots: undefined,

let setupCodeModifies = [];
if (scriptSetupRanges.defineProps && !scriptSetupRanges.propsAssignName) {
if (scriptSetupRanges.withDefaults) {
setupCodeModifies.push([() => codes.push(`const __VLS_props = `), scriptSetupRanges.withDefaults.start, scriptSetupRanges.withDefaults.start]);
}
else {
setupCodeModifies.push([() => codes.push(`const __VLS_props = `), scriptSetupRanges.defineProps.start, scriptSetupRanges.defineProps.start]);
}
}
if (scriptSetupRanges.defineSlots && !scriptSetupRanges.slotsAssignName) {

@@ -595,14 +604,7 @@ setupCodeModifies.push([() => codes.push(`const __VLS_slots = `), scriptSetupRanges.defineSlots.start, scriptSetupRanges.defineSlots.start]);

// fill $props
if (scriptSetupRanges.propsTypeArg) {
if (scriptSetupRanges.defineProps) {
// NOTE: defineProps is inaccurate for $props
codes.push(`$props: __VLS_makeOptional(defineProps<`);
addExtraReferenceVirtualCode('scriptSetup', scriptSetupRanges.propsTypeArg.start, scriptSetupRanges.propsTypeArg.end);
codes.push(`>()),\n`);
codes.push(`$props: __VLS_makeOptional(${scriptSetupRanges.propsAssignName ?? `__VLS_props`}),\n`);
codes.push(`...${scriptSetupRanges.propsAssignName ?? `__VLS_props`},\n`);
}
else if (scriptSetupRanges.propsRuntimeArg) {
// NOTE: defineProps is inaccurate for $props
codes.push(`$props: __VLS_makeOptional(defineProps(`);
addExtraReferenceVirtualCode('scriptSetup', scriptSetupRanges.propsRuntimeArg.start, scriptSetupRanges.propsRuntimeArg.end);
codes.push(`)),\n`);
}
// fill $emit

@@ -609,0 +611,0 @@ if (scriptSetupRanges.defineEmits) {

@@ -10,2 +10,3 @@ import type * as ts from 'typescript/lib/tsserverlibrary';

withDefaultsArg: TextRange | undefined;
withDefaults: TextRange | undefined;
defineProps: TextRange | undefined;

@@ -12,0 +13,0 @@ defineSlots: TextRange | undefined;

@@ -9,2 +9,3 @@ "use strict";

let propsAssignName;
let withDefaults;
let defineProps;

@@ -50,2 +51,3 @@ let propsRuntimeArg;

withDefaultsArg,
withDefaults,
defineProps,

@@ -176,2 +178,3 @@ defineSlots,

else if (vueCompilerOptions.macros.withDefaults.includes(callText)) {
withDefaults = _getStartEnd(node);
if (node.arguments.length >= 2) {

@@ -178,0 +181,0 @@ const arg = node.arguments[1];

@@ -20,2 +20,3 @@ import { Sfc, VueLanguagePlugin } from '../types';

withDefaultsArg: import("../types").TextRange | undefined;
withDefaults: import("../types").TextRange | undefined;
defineProps: import("../types").TextRange | undefined;

@@ -22,0 +23,0 @@ defineSlots: import("../types").TextRange | undefined;

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

? F extends (event: infer E, ...args: infer A) => infer R
? { [K in E as K extends string ? K : never]: (...args: A) => R; }
? { [K in E as K extends string ? K : never]: (...args: A) => void; }
: never

@@ -118,0 +118,0 @@ : never;

{
"name": "@vue/language-core",
"version": "1.8.14",
"version": "1.8.15",
"main": "out/index.js",

@@ -37,3 +37,3 @@ "license": "MIT",

},
"gitHead": "5febf2694e80621a7b852464edc76b74f73a5cb6"
"gitHead": "24de4582131385e75f904bff7294df0e16ce1e01"
}
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