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

babel-plugin-mockable-imports

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-mockable-imports - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

6

CHANGELOG.md

@@ -8,2 +8,8 @@ # Changelog

## [1.5.1] - 2019-05-29
- Fix a bug where calls to `$imports.$add` were added to the top-level of the
module but were not statements. This invalid output caused problems when the
plugin was used together with some other Babel plugins
## [1.5.0] - 2019-05-13

@@ -10,0 +16,0 @@

18

index.js

@@ -50,10 +50,12 @@ "use strict";

function createAddImportCall(alias, source, symbol, value) {
return t.callExpression(
t.memberExpression(t.identifier("$imports"), t.identifier("$add")),
[
t.stringLiteral(alias),
t.stringLiteral(source),
t.stringLiteral(symbol),
value
]
return t.expressionStatement(
t.callExpression(
t.memberExpression(t.identifier("$imports"), t.identifier("$add")),
[
t.stringLiteral(alias),
t.stringLiteral(source),
t.stringLiteral(symbol),
value
]
)
);

@@ -60,0 +62,0 @@ }

{
"name": "babel-plugin-mockable-imports",
"version": "1.5.0",
"version": "1.5.1",
"description": "Babel plugin for mocking ES imports",

@@ -5,0 +5,0 @@ "main": "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