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

esnext

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esnext - npm Package Compare versions

Comparing version 1.12.1 to 1.13.0

2

package.json
{
"name": "esnext",
"version": "1.12.1",
"version": "1.13.0",
"description": "Update your project to the latest ECMAScript syntax.",

@@ -5,0 +5,0 @@ "main": "dist/esnext.umd.js",

@@ -120,2 +120,3 @@ /* eslint-disable no-console */

let validate;
let inline = false;

@@ -166,2 +167,7 @@ for (let i = 0; i < args.length; i++) {

case '-I':
case '--inline':
inline = true;
break;
case '--validate':

@@ -184,2 +190,11 @@ case '--no-validate':

if (inline) {
if (!input) {
return { error: `Asked to replace input inline but no input was given` };
} else if (output) {
return { error: `Asked to replace input inline but output is already set: ${output}` };
}
output = input;
}
return { input, output, blacklist, whitelist, validate };

@@ -209,2 +224,3 @@ }

out.write(`${$0} < input.js > output.js # read stdin and write stdout\n`);
out.write(`${$0} -I file.js # rewrite a file inline\n`);
out.write(`${$0} -b modules.commonjs # blacklist plugins\n`);

@@ -217,3 +233,5 @@ out.write(`${$0} -w modules.commonjs # whitelist plugins\n`);

{ out, padding: 2, indent: 2 },
allPlugins.map(({ name, description }) => [ name, description ])
allPlugins
.sort((left, right) => left.name.localeCompare(right.name))
.map(({ name, description }) => [ name, description ])
);

@@ -220,0 +238,0 @@ out.write('\n');

@@ -57,2 +57,12 @@ import type Module from './module';

unescape(char: string, start: number, end: number): Context {
for (let i = start; i < end; i++) {
if (this.charAt(i) === '\\' && this.charAt(i + 1) === char) {
this.remove(i, i + 1);
i++;
}
}
return this;
}
unindent(): Context {

@@ -59,0 +69,0 @@ // FIXME: This is only capable of unindenting one level.

@@ -32,2 +32,6 @@ import BaseContext from '../context';

if (node.loc.start.line !== node.loc.end.line) {
return null;
}
const { left, right } = node;

@@ -92,2 +96,4 @@

}
const thisPartQuote = this.charAt(parts[i].range[0]);
this.unescape(thisPartQuote, thisPart.range[0] + 1, thisPart.range[1] - 1);
this.escape(quote, thisPart.range[0] + 1, thisPart.range[1] - 1);

@@ -132,2 +138,4 @@ }

this.remove(node.range[1] - 1, node.range[1]);
const thisPartQuote = this.charAt(node.range[0]);
this.unescape(thisPartQuote, node.range[0] + 1, node.range[1] - 1);
this.escape('`', ...node.range);

@@ -134,0 +142,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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