Socket
Socket
Sign inDemoInstall

babel-plugin-aff-mock

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-aff-mock - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

14

lib/index.js

@@ -14,3 +14,4 @@ const fs = require("fs");

const comments = path.node.leadingComments || [];
const comment = comments.filter((item) => item.value.includes("aff-mock:"))[0];
const affMockComments = comments.filter((item) => item.value.includes("aff-mock:"));
let comment = affMockComments[0];

@@ -21,4 +22,13 @@ if (!comment) {

const data = comment.value.split(":");
let data = comment.value.split(":");
const index = Number(data[data.length - 1]) || 1;
comment = affMockComments[index - 1];
if (!comment) {
return;
}
data = comment.value.split(":");
const pathUrl = data[1].trim();

@@ -25,0 +35,0 @@ if (!fs.existsSync(pathLib.join(process.cwd(), pathUrl))) {

2

package.json
{
"name": "babel-plugin-aff-mock",
"version": "1.0.2",
"version": "1.1.0",
"description": "AFF Mock",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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