Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 17, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@nomicfoundation/slang (source) ^0.18.3 -> ^1.0.0 age adoption passing confidence

Release Notes

NomicFoundation/slang (@​nomicfoundation/slang)

v1.3.0

Compare Source

Minor Changes
  • #​1396 d568dec Thanks @​beta-ziliani! - Add a rewriter API, allowing the transformation of CSTs by extending the BaseRewriter type, overriding the appropriate methods (User Guide).

  • #​1440 4438fc8 Thanks @​OmarTawfik! - add TextIndexExtensions.zero() utility to create an index at offset zero, which is useful for creating cursors from child nodes where parent offset is not needed.

  • #​1390 6a0f598 Thanks @​OmarTawfik! - Add new TypeScript APIs for creating nodes and edges:

    • NonterminalNode.create(kind: NonterminalKind, children: Edge[]): NonterminalNode
    • TerminalNode.create(kind: TerminalKind, text: string): TerminalNode
    • createEdge(label: EdgeLabel, node: Node): Edge
    • Edge.createWithNonterminal(label: EdgeLabel, node: NonterminalNode): Edge
    • Edge.createWithTerminal(label: EdgeLabel, node: TerminalNode): Edge
Patch Changes
  • #​1424 d54a35c Thanks @​ggiraldez! - Resolve identifiers in assembly blocks to locally imported symbols

  • #​1388 4607e6a Thanks @​beta-ziliani! - Fixed the pragma grammar and CST nodes:

    • pragma abicoder <version>:
      • Only enabled starting Solidity 0.7.5.
      • <version> is restricted to new keywords (v1 and v2).
    • pragma experimental <flag>:
      • Only enabled starting Solidity 0.4.16.
      • <flag> is restricted to be a string, or new keywords representing ABIEncoderV2 and SMTChecker.
  • #​1431 a62c857 Thanks @​OmarTawfik! - fix CST query matches to return an empty array for unmatched named captures, instead of undefined.

v1.2.1

Compare Source

Patch Changes
  • #​1377 f3b51be Thanks @​ggiraldez! - Bind untyped tuple deconstruction elements as references, not declarations

  • #​1335 6c3ad5d Thanks @​ggiraldez! - Top-level ConstantDefinitions now bind to their type and resolve extension functions called on them

  • #​1338 18be0bc Thanks @​ggiraldez! - Make try/catch parameters and vars in for loop initialization available in Yul

  • #​1339 f16e4b5 Thanks @​ggiraldez! - Fixes to the binding rules in Solidity:

    • Make the .length member available in all static-size byte arrays
    • Allow assembly blocks (and nested Yul functions) to access inherited state variables
    • Allow assembly blocks access to constructor/modifier/fallback parameters
    • msg.sender is of address type (not payable) until 0.5.0
    • Top-level constants need to be visible from assembly blocks in files that import them
    • Resolve named arguments when calling an extension function
    • Imported symbols using deconstruction syntax can be bound in assembly blocks
  • #​1353 8e718dd Thanks @​ggiraldez! - Fixes to the binding rules in Solidity:

    • Values of the deprecated byte type have a length member until 0.8.0
    • Bind a qualified identifier in the same contract, ie. Foo.x in a method body of Foo
    • Correctly bind external constants and built-ins in nested functions in assembly blocks
    • Literal boolean values should bind to the bool type to chain extension functions
    • Public state variables the generate getters should have members of external functions (such as .selector)
    • Event types have a selector member
  • #​1326 045179b Thanks @​ggiraldez! - Fixes to binding rules:

    • Update TupleDeconstructionStatement so that their definiens is the TypedTupleMember/UntypedTupleMember for each variable declared.
    • Update YulVariableDeclarationStatement so that their definiens is the YulIdentifier for each variable declared.
  • #​1350 0594fe8 Thanks @​ggiraldez! - Fixes to bindings rules in Solidity:

    • Allow binding of using directives inside interfaces in Solidity < 0.7.1
    • Bind literal fixed arrays types
    • Fix generating binding graph for built-ins: remove the memory location specifier from types so they bind properly
    • Fix return type of value() and gas() legacy call options to allow chaining them
    • Bind legacy call options in the result of new expressions
    • Bind output type of public getters when the state variable is a nested mapping or array
    • A using directive with the global modifier should impact the source unit's lexical scope
    • Relax the Solidity version where the transfer() method works for non-payable addresses; this is a workaround for a Solidity quirk that makes it possible to do address(uint160(to)).transfer(amount) even after 0.5.0
    • Fix bound return types of wrap() and unwrap() methods of a user value defined type
    • Resolve the type of min() and max() of type() expressions for integer types to the integer type given in the expression operand
    • Fix binding of fully qualified modifier invocations
    • Fix #​1321: min() and max() for type() expressions on enum types should bind only after Solidity 0.8.8
    • Bound type for literal number expressions is uint256 by default; this allows correctly binding extension methods operating on literal values
    • The type bytes is an array type and should bind the push() and pop() methods
    • Contract or interface reference values implicitly inherit from the address type on Solidity < 0.5.0
    • Modifiers are allowed inside interfaces until Solidity 0.8.8 and thus should properly bind and be accessible from inheriting contracts
    • Libraries before Solidity 0.5.0 allowed this in function methods and work as an address type

v1.2.0

Compare Source

Minor Changes
Patch Changes

v1.1.0

Compare Source

Minor Changes
  • #​1288 2090ab8 Thanks @​OmarTawfik! - support Solidity 0.8.29 and Custom Storage Layouts:

    • ContractDefinition nodes will no longer have an optional InheritanceSpecifier child directly, but will hold a list of ContractSpecifier children
    • ContractSpecifier nodes have either InheritanceSpecifier or StorageLayoutSpecifier children
  • #​1265 2312260 Thanks @​mjoerussell! - Add LanguageUtils::infer_language_versions(source_code) -> Version[] API, which will analyze version pragmas inside a source file, and return a list of supported language versions that they allow. This can be used to select a valid language version to use with the rest of Slang APIs. Please see the Choosing a Solidity Version guide for more information.

Patch Changes
  • #​1291 da1f863 Thanks @​ggiraldez! - Resolve arguments to inheritance specifiers and expressions in storage layout specifiers using the contract's parent scope.

v1.0.0

Compare Source

Major Changes

v0.20.1

Compare Source

Patch Changes

v0.20.0

Compare Source

Minor Changes
Patch Changes

v0.19.0

Compare Source

Minor Changes
  • #​1156 3a82f06 Thanks @​OmarTawfik! - add node.descendants() and cursor.descendants() APIs to allow iterating over all descendants of the current node in pre-order traversal.

  • #​1156 3a82f06 Thanks @​OmarTawfik! - fix node.children() and parseOutput.errors() return types

  • #​1194 7a25d63 Thanks @​OmarTawfik! - split parser/Parser.supportedVersions() into a new utils/LanguageFacts API, with allVersions(), earliestVersion(), and latestVersion() methods.

  • #​1194 7a25d63 Thanks @​OmarTawfik! - expose the BingingGraph API to allow querying definitions/references between source files.

  • #​1156 3a82f06 Thanks @​OmarTawfik! - add cursor.ancestors() API to allow iterating over all ancestors of the current node, starting with the immediate parent, and moving upwards, ending with the root node.

  • #​1156 3a82f06 Thanks @​OmarTawfik! - add cursor.remainingNodes() API to allow iterating over all the remaining nodes in the current tree, moving in pre-order traversal, until the tree is completed.

  • #​1223 3e85a14 Thanks @​OmarTawfik! - split Parser.parse() API into parse_file_contents() and parse_nonterminal().

  • #​1194 7a25d63 Thanks @​OmarTawfik! - add a CompilationBuilder API to incrementally load and resolve source files and their imports.

  • #​1223 3e85a14 Thanks @​OmarTawfik! - rename Query.parse() to Query.create(), and provide exact TextRange for any errors it returns.

  • #​1172 6102886 Thanks @​beta-ziliani! - Improved error recovery, where leading trivia are always parsed and included before an erroneous terminal.

  • #​1223 3e85a14 Thanks @​OmarTawfik! - add TerminalKindExtensions.is_identifier() API to distinguish terminals like Solidity's Identifier and Yul's YulIdentifier.

  • #​1187 6389361 Thanks @​beta-ziliani! - Change ParseOutput and File.tree to return a NonTerminal instead of a Node.

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@socket-security
Copy link

socket-security bot commented Mar 17, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​nomicfoundation/​slang@​0.18.3 ⏵ 1.3.094 -6100100 +2089 +7100

View full report

@renovate renovate bot force-pushed the renovate/nomicfoundation-slang-1.x branch from 519a10e to bb4db02 Compare July 23, 2025 22:39
@renovate renovate bot force-pushed the renovate/nomicfoundation-slang-1.x branch from bb4db02 to e7cda8b Compare October 16, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant