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

@vue/reactivity-transform

Package Overview
Dependencies
Maintainers
19
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/reactivity-transform - npm Package Compare versions

Comparing version 3.2.26 to 3.2.27

62

dist/reactivity-transform.cjs.js

@@ -141,29 +141,3 @@ 'use strict';

if (stmt.type === 'VariableDeclaration') {
if (stmt.declare)
continue;
for (const decl of stmt.declarations) {
let refCall;
const isCall = decl.init &&
decl.init.type === 'CallExpression' &&
decl.init.callee.type === 'Identifier';
if (isCall &&
(refCall = isRefCreationCall(decl.init.callee.name))) {
processRefDeclaration(refCall, decl.id, decl.init);
}
else {
const isProps = isRoot &&
isCall &&
decl.init.callee.name === 'defineProps';
for (const id of compilerCore.extractIdentifiers(decl.id)) {
if (isProps) {
// for defineProps destructure, only exclude them since they
// are already passed in as knownProps
excludedIds.add(id);
}
else {
registerBinding(id);
}
}
}
}
walkVariableDeclaration(stmt, isRoot);
}

@@ -176,4 +150,36 @@ else if (stmt.type === 'FunctionDeclaration' ||

}
else if ((stmt.type === 'ForOfStatement' || stmt.type === 'ForInStatement') &&
stmt.left.type === 'VariableDeclaration') {
walkVariableDeclaration(stmt.left);
}
}
}
function walkVariableDeclaration(stmt, isRoot = false) {
if (stmt.declare) {
return;
}
for (const decl of stmt.declarations) {
let refCall;
const isCall = decl.init &&
decl.init.type === 'CallExpression' &&
decl.init.callee.type === 'Identifier';
if (isCall &&
(refCall = isRefCreationCall(decl.init.callee.name))) {
processRefDeclaration(refCall, decl.id, decl.init);
}
else {
const isProps = isRoot && isCall && decl.init.callee.name === 'defineProps';
for (const id of compilerCore.extractIdentifiers(decl.id)) {
if (isProps) {
// for defineProps destructure, only exclude them since they
// are already passed in as knownProps
excludedIds.add(id);
}
else {
registerBinding(id);
}
}
}
}
}
function processRefDeclaration(method, id, call) {

@@ -506,3 +512,3 @@ excludedIds.add(call.callee);

function warn(msg) {
console.warn(`\x1b[1m\x1b[33m[@vue/ref-transform]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`);
console.warn(`\x1b[1m\x1b[33m[@vue/reactivity-transform]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`);
}

@@ -509,0 +515,0 @@

{
"name": "@vue/reactivity-transform",
"version": "3.2.26",
"version": "3.2.27",
"description": "@vue/reactivity-transform",

@@ -32,4 +32,4 @@ "main": "dist/reactivity-transform.cjs.js",

"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.26",
"@vue/shared": "3.2.26",
"@vue/compiler-core": "3.2.27",
"@vue/shared": "3.2.27",
"estree-walker": "^2.0.2",

@@ -36,0 +36,0 @@ "magic-string": "^0.25.7"

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