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

paths.macro

Package Overview
Dependencies
Maintainers
1
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 1.0.1 to 2.0.0

5

macro.js

@@ -6,5 +6,6 @@ const path = require('path');

const { createMacro } = require('babel-macros');
const { toUnix } = require('upath');
const getPaths = f => {
const _fileAbsolute = path.resolve(f);
const _fileAbsolute = toUnix(path.resolve(f));
const _file = path.basename(_fileAbsolute);

@@ -17,3 +18,3 @@ const _extention = path.extname(_fileAbsolute)

const _gitRoot = findRootAttempt(_fileAbsolute, (dir) => fs.existsSync(path.resolve(dir, '.git')));
const _wd = process.cwd();
const _wd = toUnix(process.cwd());

@@ -20,0 +21,0 @@ const _baseAbsolute = _fileAbsolute.replace(_file, '');

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

@@ -32,3 +32,4 @@ "keywords": [

"babel-plugin-macros": "^2.0.0",
"find-root": "^1.1.0"
"find-root": "^1.1.0",
"upath": "^1.0.2"
},

@@ -35,0 +36,0 @@ "devDependencies": {

4

README.md

@@ -1,4 +0,4 @@

# babel-plugin-paths
# Babel paths.macro
Babel macro that allows you to "import" the location of the source-file.
A [babel macro](https://github.com/kentcdodds/babel-plugin-macros) that allows you to "import" the location of the source-file.

@@ -5,0 +5,0 @@ The supported paths you can import:

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