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

babel-plugin-empower-assert

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

babel-plugin-empower-assert - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## [1.1.0](https://github.com/twada/babel-plugin-empower-assert/releases/tag/v1.1.0) (2016-04-12)
#### Features
* support AssignmentExpression ([61dc73f8](https://github.com/twada/babel-plugin-empower-assert/commit/61dc73f8ffd02e8c8b495be5ca17b6ee2f644af0))
## [1.0.0](https://github.com/twada/babel-plugin-empower-assert/releases/tag/v1.0.0) (2016-04-12)

@@ -2,0 +10,0 @@

@@ -16,2 +16,25 @@ /**

visitor: {
AssignmentExpression: {
enter: function (nodePath, pluginPass) {
if (!nodePath.equals('operator', '=')) {
return;
}
var left = nodePath.get('left');
if (!left.isIdentifier()) {
return;
}
if (!left.equals('name', 'assert')) {
return;
}
var right = nodePath.get('right');
if (!right.isCallExpression()) {
return;
}
var callee = right.get('callee');
var arg = right.get('arguments')[0];
if (isRequireAssert(callee, arg)) {
arg.set('value', 'power-assert');
}
}
},
VariableDeclarator: {

@@ -18,0 +41,0 @@ enter: function (nodePath, pluginPass) {

2

package.json
{
"name": "babel-plugin-empower-assert",
"description": "Babel plugin to convert assert to power-assert at compile time",
"version": "1.0.0",
"version": "1.1.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Takuto Wada",

[![power-assert][power-assert-banner]][power-assert-url]
[![Build Status][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![License][license-image]][license-url]
`babel-plugin-empower-assert` is a [Babel](https://babeljs.io/) plugin to convert [assert](https://nodejs.org/api/assert.html) to [power-assert](https://github.com/power-assert-js/power-assert) at compile time.

@@ -123,1 +126,7 @@

[travis-image]: https://secure.travis-ci.org/twada/babel-plugin-empower-assert.svg?branch=master
[npm-url]: https://npmjs.org/package/babel-plugin-empower-assert
[npm-image]: https://badge.fury.io/js/babel-plugin-empower-assert.svg
[license-url]: http://twada.mit-license.org/
[license-image]: https://img.shields.io/badge/license-MIT-brightgreen.svg
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