New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vue-macros/volar

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue-macros/volar - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

25

dist/define-model.js
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
var _chunkPXLCEAZ5js = require('./chunk-PXLCEAZ5.js');

@@ -22,3 +23,7 @@

];
mergeProps() || addProps();
mergeProps() || _chunkPXLCEAZ5js.addProps.call(void 0,
codes,
["__VLS_TypePropsToRuntimeProps<__VLS_ModelToProps<", seg, ">>"],
vueLibName
);
mergeEmits() || addEmits();

@@ -40,20 +45,2 @@ codes.push(

}
function addProps() {
const idx = codes.indexOf("setup() {\n");
if (idx === -1)
return false;
const segs = [
"props: ({} as __VLS_TypePropsToRuntimeProps<__VLS_ModelToProps<",
seg,
">>),\n"
];
codes.splice(idx, 0, ...segs);
codes.push(
`type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
`,
`type __VLS_TypePropsToRuntimeProps<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('${vueLibName}').PropType<__VLS_NonUndefinedable<T[K]>> } : { type: import('${vueLibName}').PropType<T[K]>, required: true } };
`
);
return true;
}
function mergeEmits() {

@@ -60,0 +47,0 @@ const idx = codes.indexOf(

@@ -17,5 +17,4 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

const props = {};
const sources = [];
let source = file.content[idx + 1][0];
let cursor = 0;
let changed = false;
for (const stmt of sfc.scriptSetupAst.statements) {

@@ -30,8 +29,6 @@ if (!ts.isVariableStatement(stmt))

const start = exportModifier.getFullStart();
const width = exportModifier.getFullWidth();
const end = exportModifier.getEnd();
if (cursor > 0) {
sources.push([cursor, source.slice(0, start - cursor)]);
}
source = source.slice(end - cursor);
cursor = end;
changed = true;
source = `${source.slice(0, start)}${" ".repeat(width)}${source.slice(end)}`;
for (const decl of stmt.declarationList.declarations) {

@@ -43,11 +40,5 @@ if (!ts.isIdentifier(decl.name))

}
if (sources.length > 0) {
sources.push([cursor, source]);
file.content.splice(
idx + 1,
1,
...sources.map(([offset, content]) => {
return [content, "scriptSetup", offset, _languagecore.FileRangeCapabilities.full];
})
);
if (changed) {
;
file.content[idx + 1][0] = source;
}

@@ -54,0 +45,0 @@ _chunkPXLCEAZ5js.addProps.call(void 0,

{
"name": "@vue-macros/volar",
"version": "0.6.0",
"version": "0.6.1",
"packageManager": "pnpm@7.25.1",

@@ -5,0 +5,0 @@ "description": "Volar plugin for Vue Macros.",

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