Socket
Socket
Sign inDemoInstall

editions

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editions - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

18

es2015/index.js

@@ -34,10 +34,5 @@ /* @flow */

// Always the same
// Environment fetching
var EARLIEST_ESNEXT_NODE_VERSION = ['0', '12'];
var NODE_VERSION = process && process.versions && process.versions.node && process.versions.node.split('.');
var ESNEXT_UNSUPPORTED = NODE_VERSION[0] < EARLIEST_ESNEXT_NODE_VERSION[0] || NODE_VERSION[0] === EARLIEST_ESNEXT_NODE_VERSION[0] && NODE_VERSION[1] < EARLIEST_ESNEXT_NODE_VERSION[1];
// Environment fetching
var blacklist = process && process.env && process.env.EDITIONS_SYNTAX_BLACKLIST && process.env.EDITIONS_SYNTAX_BLACKLIST.split(',');

@@ -51,4 +46,11 @@

syntaxBlacklist.typescript = new Error('The typescript syntax is skipped as we want to use a precompiled edition rather than compiling at runtime');
if (ESNEXT_UNSUPPORTED) {
syntaxBlacklist.esnext = new Error('The esnext syntax is skipped on early node versions as attempting to use esnext features will output debugging information on these node versions');
// Blacklist non-esnext node versions from esnext
if (process && process.versions && process.versions.node) {
var EARLIEST_ESNEXT_NODE_VERSION = [0, 12];
var NODE_VERSION = process.versions.node.split('.').map(function (n) {
return parseInt(n, 10);
});
var ESNEXT_UNSUPPORTED = NODE_VERSION[0] < EARLIEST_ESNEXT_NODE_VERSION[0] || NODE_VERSION[0] === EARLIEST_ESNEXT_NODE_VERSION[0] && NODE_VERSION[1] < EARLIEST_ESNEXT_NODE_VERSION[1];
if (ESNEXT_UNSUPPORTED) syntaxBlacklist.esnext = new Error('The esnext syntax is skipped on early node versions as attempting to use esnext features will output debugging information on these node versions');
}

@@ -55,0 +57,0 @@

# History
## v1.3.3 2016 November 4
- Properly add node 0.8 support
## v1.3.2 2016 November 4

@@ -4,0 +7,0 @@ - Added node 0.8 support

{
"name": "editions",
"version": "1.3.2",
"version": "1.3.3",
"description": "Publish multiple editions for your JavaScript packages consistently and easily (e.g. source edition, esnext edition, es2015 edition)",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/bevry/editions",

@@ -20,11 +20,2 @@ /* @flow */

// Always the same
const EARLIEST_ESNEXT_NODE_VERSION = ['0', '12']
const NODE_VERSION = process && process.versions && process.versions.node && process.versions.node.split('.')
const ESNEXT_UNSUPPORTED =
NODE_VERSION[0] < EARLIEST_ESNEXT_NODE_VERSION[0] || (
NODE_VERSION[0] === EARLIEST_ESNEXT_NODE_VERSION[0] &&
NODE_VERSION[1] < EARLIEST_ESNEXT_NODE_VERSION[1]
)
// Environment fetching

@@ -39,4 +30,12 @@ const blacklist = process && process.env && process.env.EDITIONS_SYNTAX_BLACKLIST && process.env.EDITIONS_SYNTAX_BLACKLIST.split(',')

syntaxBlacklist.typescript = new Error('The typescript syntax is skipped as we want to use a precompiled edition rather than compiling at runtime')
if ( ESNEXT_UNSUPPORTED ) {
syntaxBlacklist.esnext = new Error('The esnext syntax is skipped on early node versions as attempting to use esnext features will output debugging information on these node versions')
// Blacklist non-esnext node versions from esnext
if ( process && process.versions && process.versions.node ) {
const EARLIEST_ESNEXT_NODE_VERSION = [0, 12]
const NODE_VERSION = process.versions.node.split('.').map((n) => parseInt(n, 10))
const ESNEXT_UNSUPPORTED = NODE_VERSION[0] < EARLIEST_ESNEXT_NODE_VERSION[0] || (
NODE_VERSION[0] === EARLIEST_ESNEXT_NODE_VERSION[0] &&
NODE_VERSION[1] < EARLIEST_ESNEXT_NODE_VERSION[1]
)
if ( ESNEXT_UNSUPPORTED ) syntaxBlacklist.esnext = new Error('The esnext syntax is skipped on early node versions as attempting to use esnext features will output debugging information on these node versions')
}

@@ -43,0 +42,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