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

paths.macro

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paths.macro - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

.editorconfig

15

macro.js

@@ -11,8 +11,8 @@ const path = require('path');

const _file = path.basename(_fileAbsolute);
const _extention = path.extname(_fileAbsolute)
const _extention = path.extname(_fileAbsolute);
const _filename = _file.replace(_extention, '');
const _npmRoot = findRootAttempt(_fileAbsolute);
const _gitRoot = findRootAttempt(_fileAbsolute, (dir) => fs.existsSync(path.resolve(dir, '.git')));
const _npmRoot = toUnix(findRootAttempt(_fileAbsolute));
const _gitRoot = toUnix(findRootAttempt(_fileAbsolute, (dir) => fs.existsSync(path.resolve(dir, '.git'))));
const _wd = toUnix(process.cwd());

@@ -35,3 +35,3 @@

};
}
};

@@ -42,8 +42,7 @@ const findRootAttempt = (...params) => {

} catch (error) {
return [];
return '';
}
}
};
const macro = ({ references, babel, state }) => {
const macro = ({ references, state }) => {
const paths = getPaths(state.file.opts.filename);

@@ -50,0 +49,0 @@

{
"name": "paths.macro",
"version": "2.0.0",
"version": "2.0.1",
"description": "Babel plugin that returns an object containing paths like __dirname and __filename as static values",

@@ -5,0 +5,0 @@ "keywords": [

@@ -0,0 +0,0 @@ # Babel paths.macro

@@ -0,0 +0,0 @@ import base, { filename } from '../macro';

@@ -0,0 +0,0 @@ const babel = require('babel-core');

Sorry, the diff of this file is not supported yet

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