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

defs

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defs - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

16

build/es5/defs-main.js

@@ -594,6 +594,14 @@ "use strict";

var ast = (gotAST ? src : options.parse(src, {
loc: true,
range: true,
}));
var parsed;
try {
parsed = options.parse(src, {
loc: true,
range: true,
});
} catch (e) {
return {
errors: [fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", e.lineNumber, e.column, src.split("\n")[e.lineNumber - 1], fmt.repeat(" ", e.column - 1) + "^")],
};
}
var ast = (gotAST ? src : parsed);

@@ -600,0 +608,0 @@ // TODO detect unused variables (never read)

@@ -0,1 +1,4 @@

## v0.6.1 2013-12-09
* Graceful error handling on malformed source input (issue #18)
## v0.6.0 2013-12-01

@@ -2,0 +5,0 @@ * Accept a custom parse function

@@ -594,6 +594,14 @@ "use strict";

const ast = (gotAST ? src : options.parse(src, {
loc: true,
range: true,
}));
let parsed;
try {
parsed = options.parse(src, {
loc: true,
range: true,
});
} catch (e) {
return {
errors: [fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", e.lineNumber, e.column, src.split("\n")[e.lineNumber - 1], fmt.repeat(" ", e.column - 1) + "^")],
};
}
const ast = (gotAST ? src : parsed);

@@ -600,0 +608,0 @@ // TODO detect unused variables (never read)

@@ -47,3 +47,3 @@ # Loop closures

Not all loop closures can be transpiled into IIFE's. If the loop body (which contains the
loop closure) also contains a `return`, `break`, `continue`, `arguments` or `var`, then
loop closure) also contains a `return`, `yield`, `break`, `continue`, `arguments` or `var`, then
defs will detect that and give you an error (because an IIFE would likely change

@@ -50,0 +50,0 @@ the loop body semantics). If so either rewrite the loop body so it doesn't use any of these or

{
"name": "defs",
"version": "0.6.0",
"version": "0.6.1",
"description": "Static scope analysis and transpilation of ES6 block scoped const and let variables, to ES3.",

@@ -5,0 +5,0 @@ "main": "build/es5/defs-main.js",

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