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

solidity-ast

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solidity-ast - npm Package Compare versions

Comparing version 0.4.56 to 0.4.57

13

dist/ast-dereferencer.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ASTDereferencerError = exports.curry2 = exports.astDereferencer = void 0;
exports.ASTDereferencerError = void 0;
exports.astDereferencer = astDereferencer;
exports.curry2 = curry2;
const is_node_type_1 = require("../utils/is-node-type");
const find_all_1 = require("../utils/find-all");
const array_prototype_findlast_1 = __importDefault(require("array.prototype.findlast"));
// An ASTDereferencer is a function that looks up an AST node given its id, in all of the source files involved in a

@@ -42,3 +40,3 @@ // solc run. It will generally be used together with the AST property `referencedDeclaration` (found in Identifier,

continue;
const childId = Array.isArray(child) ? (0, array_prototype_findlast_1.default)(child, n => n)?.id : child?.id;
const childId = Array.isArray(child) ? child.findLast(n => n)?.id : child?.id;
if (childId === undefined)

@@ -83,3 +81,2 @@ continue;

}
exports.astDereferencer = astDereferencer;
function curry2(fn) {

@@ -96,4 +93,2 @@ function curried(a, ...b) {

}
exports.curry2 = curry2;
const isArray = Array.isArray;
class ASTDereferencerError extends Error {

@@ -100,0 +95,0 @@ id;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.srcDecoder = void 0;
exports.srcDecoder = srcDecoder;
const path_1 = __importDefault(require("path"));

@@ -35,3 +35,2 @@ function srcDecoder(solcInput, solcOutput, basePath = '.') {

}
exports.srcDecoder = srcDecoder;
function countInBuffer(buf, str) {

@@ -38,0 +37,0 @@ let count = 0;

{
"name": "solidity-ast",
"version": "0.4.56",
"version": "0.4.57",
"description": "Solidity AST schema and type definitions",

@@ -27,16 +27,13 @@ "author": "Francisco Giordano <frangio.1@gmail.com>",

},
"dependencies": {
"array.prototype.findlast": "^1.2.2"
},
"devDependencies": {
"@types/lodash": "^4.14.155",
"@types/node": "^14.18.33",
"ajv": "^8.5.0",
"chalk": "^4.0.0",
"fast-check": "^3.12.0",
"json-schema-to-typescript": "^10.1.4",
"lodash": "^4.17.15",
"mocha": "^10.1.0",
"@types/lodash": "^4.17.7",
"@types/node": "^18.14.10",
"ajv": "^8.17.1",
"chalk": "^4.1.2",
"fast-check": "^3.20.0",
"json-schema-to-typescript": "^14.1.0",
"lodash": "^4.17.21",
"mocha": "^10.6.0",
"promisified": "^0.5.0",
"semver": "^7.3.2",
"semver": "^7.6.2",
"solc-0.6.10": "npm:solc@0.6.10",

@@ -73,2 +70,3 @@ "solc-0.6.11": "npm:solc@0.6.11",

"solc-0.8.25": "npm:solc@0.8.25",
"solc-0.8.26": "npm:solc@0.8.26",
"solc-0.8.3": "npm:solc@0.8.3",

@@ -80,7 +78,7 @@ "solc-0.8.4": "npm:solc@0.8.4",

"solc-0.8.9": "npm:solc@0.8.9",
"typedoc": "^0.24.8",
"typedoc-theme-hierarchy": "^4.1.0",
"typescript": "^4.9.5"
"typedoc": "^0.26.4",
"typedoc-theme-hierarchy": "^5.0.3",
"typescript": "^5.5.3"
},
"license": "MIT"
}
import { isNodeType, ExtendedNodeType, ExtendedNodeTypeMap } from '../utils/is-node-type';
import { findAll } from '../utils/find-all';
import type { ASTDereferencer, NodeWithSourceUnit } from '../utils';
import type { Node, NodeType, NodeTypeMap } from '../node';
import type { Node, NodeType } from '../node';
import type { SolcOutput } from '../solc';
import { SourceUnit } from '../types';
import findLast from 'array.prototype.findlast';
// An ASTDereferencer is a function that looks up an AST node given its id, in all of the source files involved in a

@@ -48,3 +45,3 @@ // solc run. It will generally be used together with the AST property `referencedDeclaration` (found in Identifier,

if (typeof child !== "object") continue;
const childId = Array.isArray(child) ? findLast(child, n => n)?.id : child?.id;
const childId = Array.isArray(child) ? child.findLast(n => n)?.id : child?.id;
if (childId === undefined) continue;

@@ -117,4 +114,2 @@ if (id <= childId && (nextRootId === undefined || childId <= nextRootId)) {

const isArray: (arg: any) => arg is any[] | readonly any[] = Array.isArray;
export class ASTDereferencerError extends Error {

@@ -121,0 +116,0 @@ constructor(readonly id: number, readonly nodeType: readonly ExtendedNodeType[]) {

@@ -773,3 +773,3 @@ /* tslint:disable */

baseModifiers?: number[] | null;
body: Block;
body?: Block | null;
documentation?: StructuredDocumentation | null;

@@ -776,0 +776,0 @@ overrides?: OverrideSpecifier | null;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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