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

@unplugin-vue-ce/sub-style

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unplugin-vue-ce/sub-style - npm Package Compare versions

Comparing version 1.0.0-beta.15 to 1.0.0-beta.16

10

./index.js

@@ -16,3 +16,3 @@ // ../packages/sub-style/index.ts

function injectToComponent(mgcStr, node, parent) {
if (node.type === "Identifier" && parent.type === "FunctionDeclaration" && node.name === "createComponentInstance")
if (node.type === "Identifier" && parent && parent.type === "FunctionDeclaration" && node.name === "createComponentInstance")
isCreateComponentInstance = true;

@@ -36,3 +36,3 @@ if (isCreateComponentInstance && node.type === "Identifier" && node.name === "instance")

isComponentUpdateFnIdentifier = true;
if (isComponentUpdateFnIdentifier && parent.type === "VariableDeclarator" && node.type === "Identifier" && node.name === "subTree") {
if (isComponentUpdateFnIdentifier && parent && parent.type === "VariableDeclarator" && node.type === "Identifier" && node.name === "subTree") {
isComponentUpdateFnIdentifier = false;

@@ -43,3 +43,3 @@ mgcStr.prependRight(parent.end + 1, injectToBaseCreateRendererContent);

isUnmountIdentifier = true;
if (isUnmountIdentifier && parent.type === "CallExpression" && node.type === "Identifier" && node.name === "unmountComponent") {
if (isUnmountIdentifier && parent && parent.type === "CallExpression" && node.type === "Identifier" && node.name === "unmountComponent") {
isUnmountIdentifier = false;

@@ -60,3 +60,3 @@ mgcStr.prependLeft(parent.start - 1, injectToUnMountContent);

function injectApiCustomElement(mgcStr, node, parent) {
if (node.type === "Identifier" && node.name === "VueElement" && parent.type === "ClassDeclaration")
if (node.type === "Identifier" && node.name === "VueElement" && parent && parent.type === "ClassDeclaration")
isVueElementIdentifier = true;

@@ -69,3 +69,3 @@ if (node.type === "Identifier" && node.name === "BaseClass" && isVueElementIdentifier)

mgcStr.prependLeft(node.start, injectBindFnContent);
if (node.type === "Identifier" && node.name === "_applyStyles" && parent.type === "ClassMethod" && isVueElementIdentifier && isBaseClassIdentifier) {
if (node.type === "Identifier" && node.name === "_applyStyles" && parent && parent.type === "ClassMethod" && isVueElementIdentifier && isBaseClassIdentifier) {
isApplyStylesIdentifier = true;

@@ -72,0 +72,0 @@ mgcStr.prependLeft(parent.end + 1, injectAddAndRemoveStyle);

@@ -16,3 +16,3 @@ // ../packages/sub-style/index.ts

function injectToComponent(mgcStr, node, parent) {
if (node.type === "Identifier" && parent.type === "FunctionDeclaration" && node.name === "createComponentInstance")
if (node.type === "Identifier" && parent && parent.type === "FunctionDeclaration" && node.name === "createComponentInstance")
isCreateComponentInstance = true;

@@ -36,3 +36,3 @@ if (isCreateComponentInstance && node.type === "Identifier" && node.name === "instance")

isComponentUpdateFnIdentifier = true;
if (isComponentUpdateFnIdentifier && parent.type === "VariableDeclarator" && node.type === "Identifier" && node.name === "subTree") {
if (isComponentUpdateFnIdentifier && parent && parent.type === "VariableDeclarator" && node.type === "Identifier" && node.name === "subTree") {
isComponentUpdateFnIdentifier = false;

@@ -43,3 +43,3 @@ mgcStr.prependRight(parent.end + 1, injectToBaseCreateRendererContent);

isUnmountIdentifier = true;
if (isUnmountIdentifier && parent.type === "CallExpression" && node.type === "Identifier" && node.name === "unmountComponent") {
if (isUnmountIdentifier && parent && parent.type === "CallExpression" && node.type === "Identifier" && node.name === "unmountComponent") {
isUnmountIdentifier = false;

@@ -60,3 +60,3 @@ mgcStr.prependLeft(parent.start - 1, injectToUnMountContent);

function injectApiCustomElement(mgcStr, node, parent) {
if (node.type === "Identifier" && node.name === "VueElement" && parent.type === "ClassDeclaration")
if (node.type === "Identifier" && node.name === "VueElement" && parent && parent.type === "ClassDeclaration")
isVueElementIdentifier = true;

@@ -69,3 +69,3 @@ if (node.type === "Identifier" && node.name === "BaseClass" && isVueElementIdentifier)

mgcStr.prependLeft(node.start, injectBindFnContent);
if (node.type === "Identifier" && node.name === "_applyStyles" && parent.type === "ClassMethod" && isVueElementIdentifier && isBaseClassIdentifier) {
if (node.type === "Identifier" && node.name === "_applyStyles" && parent && parent.type === "ClassMethod" && isVueElementIdentifier && isBaseClassIdentifier) {
isApplyStylesIdentifier = true;

@@ -72,0 +72,0 @@ mgcStr.prependLeft(parent.end + 1, injectAddAndRemoveStyle);

@@ -6,3 +6,3 @@ {

"type": "module",
"version": "1.0.0-beta.15",
"version": "1.0.0-beta.16",
"packageManager": "pnpm@8.6.12",

@@ -63,3 +63,3 @@ "keywords": [

"@babel/types": "^7.22.10",
"@unplugin-vue-ce/utils": "^1.0.0-beta.15",
"@unplugin-vue-ce/utils": "^1.0.0-beta.16",
"baiwusanyu-utils": "^1.0.15",

@@ -66,0 +66,0 @@ "estree-walker-ts": "^1.0.1",

Sorry, the diff of this file is not supported yet

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