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

ast-types

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-types - npm Package Compare versions

Comparing version 0.8.17 to 0.8.18

17

def/flow.js

@@ -67,2 +67,6 @@ require("./es7");

def("NullTypeAnnotation")
.bases("Type")
.build();
def("ThisTypeAnnotation")

@@ -168,3 +172,3 @@ .bases("Type")

.build("params")
.field("params", [def("Identifier")]);
.field("params", [def("TypeParameter")]);

@@ -176,2 +180,13 @@ def("TypeParameterInstantiation")

def("TypeParameter")
.bases("Type")
.build("name", "variance", "bound")
.field("name", String)
.field("variance",
or("plus", "minus", null),
defaults["null"])
.field("bound",
or(def("TypeAnnotation"), null),
defaults["null"]);
def("Function")

@@ -178,0 +193,0 @@ .field("returnType",

@@ -201,3 +201,3 @@ var types = require("./types");

var childPath = path.get(name);
if (childPath.value !== child) {
if (! pathHasValue(childPath, child)) {
throw new Error("");

@@ -210,2 +210,19 @@ }

function pathHasValue(path, value) {
if (path.value === value) {
return true;
}
// Empty arrays are probably produced by defaults.emptyArray, in which
// case is makes sense to regard them as equivalent, if not ===.
if (Array.isArray(path.value) &&
path.value.length === 0 &&
Array.isArray(value) &&
value.length === 0) {
return true;
}
return false;
}
function recursiveScanChild(path, bindings, scopeTypes) {

@@ -212,0 +229,0 @@ var node = path.value;

2

package.json

@@ -21,3 +21,3 @@ {

],
"version": "0.8.17",
"version": "0.8.18",
"homepage": "http://github.com/benjamn/ast-types",

@@ -24,0 +24,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

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