Socket
Socket
Sign inDemoInstall

babylon

Package Overview
Dependencies
Maintainers
7
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babylon - npm Package Compare versions

Comparing version 6.8.2 to 6.8.3

24

CHANGELOG.md

@@ -16,2 +16,26 @@ # Changelog

## 6.8.1 (2016-06-06)
### New Feature
- Parse type parameter declarations with defaults like `type Foo<T = string> = T`
### Bug Fixes
- Type parameter declarations need 1 or more type parameters.
- The existential type `*` is not a valid type parameter.
- The existential type `*` is a primary type
### Spec Compliancy
- The param list for type parameter declarations now consists of `TypeParameter` nodes
- New `TypeParameter` AST Node (replaces using the `Identifier` node before)
```
interface TypeParameter <: Node {
bound: TypeAnnotation;
default: TypeAnnotation;
name: string;
variance: "plus" | "minus";
}
```
## 6.8.0 (2016-05-02)

@@ -18,0 +42,0 @@

26

lib/plugins/flow.js

@@ -65,14 +65,20 @@ "use strict";

return function (expr, noIn, startPos, startLoc, refNeedsArrowPos) {
var state = this.state.clone();
try {
return inner.call(this, expr, noIn, startPos, startLoc);
} catch (err) {
if (refNeedsArrowPos && err instanceof SyntaxError) {
this.state = state;
refNeedsArrowPos.start = this.state.start;
return expr;
} else {
throw err;
// only do the expensive clone if there is a question mark
// and if we come from inside parens
if (refNeedsArrowPos && this.match(_types.types.question)) {
var state = this.state.clone();
try {
return inner.call(this, expr, noIn, startPos, startLoc);
} catch (err) {
if (err instanceof SyntaxError) {
this.state = state;
refNeedsArrowPos.start = err.pos || this.state.start;
return expr;
} else {
throw err;
}
}
}
return inner.call(this, expr, noIn, startPos, startLoc);
};

@@ -79,0 +85,0 @@ });

{
"name": "babylon",
"version": "6.8.2",
"version": "6.8.3",
"description": "A JavaScript parser",

@@ -13,2 +13,6 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

},
"files": [
"bin",
"lib"
],
"devDependencies": {

@@ -15,0 +19,0 @@ "ava": "^0.15.2",

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