Socket
Socket
Sign inDemoInstall

babel-plugin-replace-require

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

5

HISTORY.md
History
=======
## 0.0.4
* Preserve `loc` when rewriting `require`s.
[#2](https://github.com/FormidableLabs/babel-plugin-replace-require/issues/2)
## 0.0.3

@@ -5,0 +10,0 @@

4

lib/index.js

@@ -34,4 +34,4 @@ "use strict";

if (replace) {
// Rewrite `require` with a clone of stashed node.
node.callee = Object.assign({}, replace);
// Rewrite `require` with a clone of stashed node, preserving location.
node.callee = Object.assign({}, replace, { loc: node.callee.loc });

@@ -38,0 +38,0 @@ // Replace module argument with stripped module path.

{
"name": "babel-plugin-replace-require",
"version": "0.0.3",
"version": "0.0.4",
"description": "Replace require output generated from import calls.",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc