New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@algebraic/ast

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algebraic/ast - npm Package Compare versions

Comparing version 1.0.0-alpha.19 to 1.0.0-alpha.20

4

_template.js

@@ -0,1 +1,3 @@

const fromEntries = require("@climb/from-entries");
const { of, is, string } = require("@algebraic/type");

@@ -66,3 +68,3 @@ const { OrderedSet, Map } = require("@algebraic/collections");

node :
of(node)({ ...node, ...Object.fromEntries(mappedChildren) });
of(node)({ ...node, ...fromEntries(mappedChildren) });
}

@@ -31,3 +31,3 @@ const { is, data, nullable, array, or } = require("@algebraic/type");

([id]) => data.always (null),
params => array(nullable(Node.RootPattern)),
params => [array(nullable(Node.RootPattern)), []],

@@ -34,0 +34,0 @@ ([generator]) => data.always (false),

@@ -0,1 +1,3 @@

const fromEntries = require("@climb/from-entries");
const Comment = require("./comment");

@@ -37,4 +39,4 @@ const { Position, SourceLocation } = require("./source-location");

.filter(name => t[name] && !t.DEPRECATED_KEYS[name]);
const mapVisitorFields = (fields, node) => Object
.fromEntries(fields.map(field =>
const mapVisitorFields = (fields, node) =>
fromEntries(fields.map(field =>
[field, mapNullableNode(node[field])]));

@@ -45,3 +47,3 @@ const toMapNodeFields = (name, fields) => node =>

...mapCommonNodeFields(node) });
const nodeFieldMaps = Object.fromEntries(
const nodeFieldMaps = fromEntries(
undeprecated.map(name =>

@@ -93,3 +95,3 @@ [name, toMapNodeFields(name, t.VISITOR_KEYS[name])]));

const toPatternFields = (keys, type) => mappedFields =>
type({ ...mappedFields, ...Object.fromEntries(keys
type({ ...mappedFields, ...fromEntries(keys
.map(key => [key, mappedFields[key]])

@@ -173,3 +175,3 @@ .map(([key, value]) => [key,

...Object.fromEntries([
...fromEntries([
Node.BigIntLiteral,

@@ -176,0 +178,0 @@ Node.NumericLiteral,

const { isArray } = Array;
const fromEntries = require("@climb/from-entries");
const { is, of, getTypename } = require("@algebraic/type");

@@ -28,2 +29,5 @@ const Node = require("./node");

{
if (!node)
return node;
const type = of(node);

@@ -43,3 +47,3 @@ const typename = getTypename(type);

node :
type({ ...node, ...Object.fromEntries(mappedChildren) });
type({ ...node, ...fromEntries(mappedChildren) });
}
{
"name": "@algebraic/ast",
"version": "1.0.0-alpha.19",
"version": "1.0.0-alpha.20",
"description": "",

@@ -16,8 +16,10 @@ "main": "node.js",

"@babel/types": "^7.5.0",
"@climb/partition": "1.0.0-alpha.4"
"@climb/dfs-reachability": "1.0.0-alpha.5",
"@climb/from-entries": "1.0.0-alpha.5",
"@climb/partition": "1.0.0-alpha.5"
},
"peerDependencies": {
"@algebraic/type": "1.0.0-alpha.19",
"@algebraic/collections": "1.0.0-alpha.19"
"@algebraic/type": "1.0.0-alpha.20",
"@algebraic/collections": "1.0.0-alpha.20"
}
}

@@ -0,1 +1,3 @@

const fromEntries = require("@climb/from-entries");
const { is, string } = require("@algebraic/type");

@@ -30,3 +32,3 @@ const { OrderedSet } = require("@algebraic/collections");

return (...args) =>
fromBabel(indexedTemplate(Object.fromEntries(
fromBabel(indexedTemplate(fromEntries(
[

@@ -33,0 +35,0 @@ ...(hasRest ? args.slice(0, params.length - 1) : args)

const { isArray } = Array;
const fromEntries = require("@climb/from-entries");
module.exports = function toBabel(node)

@@ -14,3 +16,3 @@ {

const babelNode = Object.fromEntries(Object
const babelNode = fromEntries(Object
.entries(node)

@@ -17,0 +19,0 @@ .map(([key, value]) => [key, toBabel(node[key])]))

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