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

babel-plugin-transform-dev

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-dev - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

7

CHANGELOG.md

@@ -12,2 +12,9 @@ # Changelog

## 2.0.0 (December 3, 2015)
- **Breaking Change**
- Replace `__ENV__` with the result of evaluating `"production" !== process.env.NODE_ENV`
- **Internal**
- Don't run tests twice in before release hook
## 1.1.1 (December 2, 2015)

@@ -14,0 +21,0 @@

2

lib/index.js

@@ -18,3 +18,3 @@ 'use strict';

if (t.isIdentifier(path.node, { name: '__DEV__' })) {
path.replaceWith(this.opts.evaluate ? bool : expr);
path.replaceWith(this.opts.evaluate !== false ? bool : expr);
}

@@ -21,0 +21,0 @@ }

{
"name": "babel-plugin-transform-dev",
"version": "1.1.1",
"description": "A plugin for Babel v6 which replaces `__DEV__` with `'production' !== process.env.NODE_ENV`.",
"version": "2.0.0",
"description": "A plugin for Babel v6 which replaces `__DEV__` with the result of evaluating `'production' !== process.env.NODE_ENV`.",
"main": "lib/index.js",

@@ -33,5 +33,5 @@ "keywords": [

"postversion": "git push --tags origin HEAD:master",
"release:breaking": "npm test && npm version major -m 'Release v%s' && npm publish",
"release:feature": "npm test && npm version minor -m 'Release v%s' && npm publish",
"release:fix": "npm test && npm version patch -m 'Release v%s' && npm publish"
"release:breaking": "npm version major -m 'Release v%s' && npm publish",
"release:feature": "npm version minor -m 'Release v%s' && npm publish",
"release:fix": "npm version patch -m 'Release v%s' && npm publish"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -6,9 +6,7 @@ # babel-plugin-transform-dev

Replaces all occurrences of `__DEV__` in your JavaScript code with `"production" !== process.env.NODE_ENV`.
Replaces all occurrences of `__DEV__` in your JavaScript code with the result of evaluating `"production" !== process.env.NODE_ENV`.
Make sure to put this plugin before other plugins that might transform `process.env`.
In order to replace `__ENV__` with just `"production" !== process.env.NODE_ENV`, set the plugin's `evaluate` option to `false`.
You can also set the plugin's `evaluate` option to `true` in order to replace `__ENV__` with the result of evaluating `"production" !== process.env.NODE_ENV` at build time.
## Installation

@@ -15,0 +13,0 @@

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