Socket
Socket
Sign inDemoInstall

@vue/language-core

Package Overview
Dependencies
Maintainers
1
Versions
77
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.10 to 1.8.11

17

out/generators/script.js

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

codes.push([
sfc.scriptSetup.content.substring(0, Math.max(scriptSetupRanges.importSectionEndOffset, scriptSetupRanges.leadingCommentEndOffset)),
sfc.scriptSetup.content.substring(0, Math.max(scriptSetupRanges.importSectionEndOffset, scriptSetupRanges.leadingCommentEndOffset)) + '\n',
'scriptSetup',

@@ -437,3 +437,16 @@ 0,

if (vueCompilerOptions.target >= 3.3) {
codes.push(`const { defineProps, defineEmits, defineExpose, defineOptions, defineSlots, defineModel, withDefaults } = await import('${vueCompilerOptions.lib}');\n`);
const bindings = new Set(scriptSetupRanges.bindings.map(range => sfc.scriptSetup.content.substring(range.start, range.end)));
codes.push('const { ');
for (const [macro, aliases] of Object.entries(vueCompilerOptions.macros)) {
for (const alias of aliases) {
if (!bindings.has(alias)) {
codes.push(macro);
if (alias !== macro) {
codes.push(` : ${alias}`);
}
codes.push(`, `);
}
}
}
codes.push(`} = await import('${vueCompilerOptions.lib}');\n`);
}

@@ -440,0 +453,0 @@ if (definePropProposalA) {

2

out/parsers/scriptSetupRanges.js

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

const callText = node.expression.getText(ast);
if (callText === 'defineModel') {
if (vueCompilerOptions.macros.defineModel.includes(callText)) {
let name;

@@ -71,0 +71,0 @@ let options;

@@ -26,2 +26,4 @@ import type * as CompilerDOM from '@vue/compiler-dom';

defineExpose: string[];
defineModel: string[];
defineOptions: string[];
withDefaults: string[];

@@ -28,0 +30,0 @@ };

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

: [`(await import('vue')).default.extend(`, `)`]),
macros: vueOptions.macros ?? {
macros: {
defineProps: ['defineProps'],

@@ -234,3 +234,6 @@ defineSlots: ['defineSlots'],

defineExpose: ['defineExpose'],
defineModel: ['defineModel'],
defineOptions: ['defineOptions'],
withDefaults: ['withDefaults'],
...vueOptions.macros,
},

@@ -237,0 +240,0 @@ plugins: vueOptions.plugins ?? [],

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

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

},
"gitHead": "97d60fa475b653fe435a7fae6e2a626821658351"
"gitHead": "cce193dcc182aad5d02f630fa3ae8a793d443680"
}

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc