diff --git a/package-lock.json b/package-lock.json index beefe5d7..e57b1947 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "solc-typed-ast", - "version": "18.1.4", + "version": "18.1.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "solc-typed-ast", - "version": "18.1.4", + "version": "18.1.5", "license": "Apache-2.0", "dependencies": { "axios": "^1.6.8", diff --git a/package.json b/package.json index 0c466a22..716acfc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "solc-typed-ast", - "version": "18.1.4", + "version": "18.1.5", "description": "A TypeScript library providing a normalized typed Solidity AST along with the utilities necessary to generate the AST (from Solc) and traverse/manipulate it.", "keywords": [], "files": [ diff --git a/src/ast/ast_node_factory.ts b/src/ast/ast_node_factory.ts index 0558c03d..108d6a51 100644 --- a/src/ast/ast_node_factory.ts +++ b/src/ast/ast_node_factory.ts @@ -1074,8 +1074,8 @@ export class ASTNodeFactory { return node; } - copy(node: T): T { - const cache = new Map(); + copy(node: T, remappings: IDMap | undefined): T { + const cache = new Map(remappings ? remappings.entries() : []); const clone = this.copyHelper(node, cache); const context = this.context; const postprocessor = this.postprocessor;