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 Versions

2

2.0.1

Diff

Changelog

Source

[2.0.1] - 2022-08-25

  • Fix warning about $imports not being registered with Babel's scope tracker, when using this plugin together with Babel's TypeScript support #75.
robertknight
published 2.0.0 •

Changelog

Source

[2.0.0] - 2021-11-01

The package has been converted to use ES modules. To use it you will need a version of Node and other tooling which supports ES modules.

  • Convert package to ES module format #54
robertknight
published 1.8.0 •

Changelog

Source

[1.8.0] - 2021-10-02

  • Ignore imports added by @rollup/plugin-babel by default and support regex patterns in excludeImportsFromModules #52

  • Fix excludeImportsFromModules not working with ES imports #49

robertknight
published 1.7.1 •

Changelog

Source

[1.7.1] - 2020-02-18

  • Handle case where identifier referring to import is renamed by another Babel plugin after the call to $imports.$add is generated #25
robertknight
published 1.7.0 •

Changelog

Source

[1.7.0] - 2020-02-01

  • Support selectively restoring/undoing mocks by passing an argument to $restore #23
robertknight
published 1.6.0 •

Changelog

Source

[1.6.0] - 2020-01-20

  • Support mocking CommonJS imports of a specific export in the form var alias = require("module/path").exportName or var alias = require("module/path")["exportName"] #22
robertknight
published 1.5.2 •

Changelog

Source

[1.5.2] - 2019-11-04

  • Fix a bug where functions passed to $imports.$mock were processed as both objects and functions #16
robertknight
published 1.5.1 •

Changelog

Source

[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
robertknight
published 1.5.0 •

Changelog

Source

[1.5.0] - 2019-05-13

  • Support passing a function to $mock to semi-automatically mock imports based on the source, symbol name or original value (#14)
robertknight
published 1.4.0 •

Changelog

Source

[1.4.0] - 2019-05-08

  • Ignore Babel-generated CommonJS imports (https://github.com/robertknight/babel-plugin-mockable-imports/pull/8). The plugin uses the heuristic that CommonJS imports are auto-generated if the variable name starts with an underscore.
2
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