Skip to content

Update dependency prettier-plugin-solidity to v2.3.1 - #1264

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/prettier-plugin-solidity-2.x
Open

Update dependency prettier-plugin-solidity to v2.3.1#1264
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/prettier-plugin-solidity-2.x

Conversation

@renovate

@renovate renovate Bot commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
prettier-plugin-solidity 2.0.02.3.1 age confidence

Release Notes

prettier-solidity/prettier-plugin-solidity (prettier-plugin-solidity)

v2.3.1

Compare Source

What's Changed
// prettier-plugin-solidity 2.3.0
address payable public valueInParentheses =
    (
        FancyLibrary.functionCall(
            data.data1,
            data.data2,
            IERC20(data.token).decimals(),
            currency
        )
    );

// prettier-plugin-solidity 2.3.1
address payable public valueInParentheses = (
    FancyLibrary.functionCall(
        data.data1,
        data.data2,
        IERC20(data.token).decimals(),
        currency
    )
);

Full Changelog: prettier-solidity/prettier-plugin-solidity@v2.3.0...v2.3.1

v2.3.0

Compare Source

What's Changed
Format changes

We had to address formatting choices rather than just fixing formatting bugs thus there was a need to publish a new minor release.

  • standardising all assignment types by @​Janther in #​1437
    There are 4 ways to assign a value to a variable and in each one we used to have a slightly different logic.

    // Constant Definition
    uint constant FOO_BAR = 0x1234;
    
    contract Foo {
        // State Variable Definition
        uint foo = 0x1234;
    
        function bar() {
            // Variable Declaration
            uint foobar = 0x5678;
    
            // Assignment Expression
            foobar = 0xabcd;
        }
    }

    This is likely going to impact variable definitions where the initial value was a long expression.

    // prettier-plugin-solidity@2.2.1
    contract Foo {
        bool success = aggregator1 == address(uint160(SIG_VALIDATION_SUCCESS)) &&
            aggregator2 == address(uint160(SIG_VALIDATION_SUCCESS));
    
        bytes32 public constant BALLOT_TYPEHASH =
            keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)");
    }
    
    // prettier-plugin-solidity@2.3.0
    contract Foo {
        bool success =
            aggregator1 == address(uint160(SIG_VALIDATION_SUCCESS)) &&
                aggregator2 == address(uint160(SIG_VALIDATION_SUCCESS));
    
        bytes32 public constant BALLOT_TYPEHASH = keccak256(
            "Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)"
        );
    }
  • Variables initiated with a multipart string are now indented by @​Janther in #​1436

    // prettier-plugin-solidity@2.2.1
    contract Foo {
        string public constant str =
            "DeadBeef00"
            "DeadBeef01"
            "DeadBeef02";
        function bar() public {
            string str = "DeadBeef03"
            "DeadBeef04"
            "DeadBeef05";
            str = "DeadBeef0a"
            "DeadBeef0b"
            "DeadBeef0c";
        }
    }
    
    // prettier-plugin-solidity@2.3.0
    contract Foo {
        string public constant str =
            "DeadBeef00"
            "DeadBeef01"
            "DeadBeef02";
        function bar() public {
            string str =
                "DeadBeef03"
                "DeadBeef04"
                "DeadBeef05";
            str =
                "DeadBeef0a"
                "DeadBeef0b"
                "DeadBeef0c";
        }
    }

    Notice how the state variable was already formatting correctly thus making clear the need to standardise the value assingments.

  • remove indentation of a logical operation if it's the operand of a conditional by @​Janther in #​1441

    // prettier-plugin-solidity@2.2.1
    uint foo =
        longCondition1 ||
            longCondition2
            ? 1234567890 
            : 9876543210;
    
    // prettier-plugin-solidity@2.3.0
    uint foo =
        longCondition1 ||
        longCondition2
            ? 1234567890 
            : 9876543210;
Dependencies
Behaviour changes
  • Prettier can format multiple files in parallel and this plugin is now multi-thread safe by @​Janther in #​1393
Internal changes
  • Keeping with continuously improving code speed, size and simplicity. There has been a lot of progress in reducing the size and repetition of steps while keeping or improving the execution time.
  • A few bugs if some rare format cases were addressed.
Development changes
  • Improved the code coverage to include all possible edge cases of Slang's AST. by @​Janther in #​1425
  • Improved the types, to be more descriptive and accurate to each scenario.

Full Changelog: prettier-solidity/prettier-plugin-solidity@v2.2.1...v2.3.0

v2.2.1

Compare Source

What's Changed

Release with @nomicfoundation/slang version 1.3.1 which adds support for solidity 0.8.31.

Full Changelog: prettier-solidity/prettier-plugin-solidity@v2.2.0...v2.2.1

v2.2.0

Compare Source

What's Changed

Format fixes
Behaviour changes
Internal changes

There has been a lot of work put into simplifying the printing flow avoiding extra steps and cleaning up the patterns in the printing functions across the codebase. There has been a noticeable improvement in the execution speed and cleaner codebase.

Development changes

Full Changelog: prettier-solidity/prettier-plugin-solidity@v2.1.0...v2.2.0

v2.1.0

Compare Source

What's Changed

API Changes
Format Changes
  • Only break import deconstruction if the list of items is longer than 1. by @​Janther in #​1178
// Original
import { Item } from "../../../contracts/very/long/path/to/File1.sol";
import { Item1, Item2 } from "../../../contracts/very/long/path/to/File2.sol";

// version 2.0.0
import {
    Item
} from "../../../contracts/very/long/path/to/File.sol";
import {
    Item1,
    Item2
} from "../../../contracts/very/long/path/to/File2.sol";

// version 2.1.0
import { Item } from "../../../contracts/very/long/path/to/File.sol";
import {
    Item1,
    Item2
} from "../../../contracts/very/long/path/to/File2.sol";
  • New rules added to the grouping in a single line when possible and indentation when the line breaks on binary operations to improve readability and make operations precedence more visible. by @​Janther in #​1133
// Original
x = veryLongNameA * veryLongNameB + veryLongNameC;
x = veryLongNameA + veryLongNameB * veryLongNameC;

x = veryVeryLongNameA * veryVeryLongNameB + veryVeryLongNameC;
x = veryVeryLongNameA + veryVeryLongNameB * veryVeryLongNameC;

// version 2.0.0
x =
    veryLongNameA *
    veryLongNameB +
    veryLongNameC;
x =
    veryLongNameA +
    veryLongNameB *
    veryLongNameC;

x =
    veryVeryLongNameA *
    veryVeryLongNameB +
    veryVeryLongNameC;
x =
    veryVeryLongNameA +
    veryVeryLongNameB *
    veryVeryLongNameC;

// version 2.1.0
x =
    veryLongNameA * veryLongNameB +
    veryLongNameC;
x =
    veryLongNameA +
    veryLongNameB * veryLongNameC;

x =
    veryVeryLongNameA *
        veryVeryLongNameB +
    veryVeryLongNameC;
x =
    veryVeryLongNameA +
    veryVeryLongNameB *
        veryVeryLongNameC;
  • Fixed a format issue where a small operand would be left in a new line if the right operand breaks in an assignment. by @​Janther in #​1161
// Original
a = veryVeryVeryVeryVeryLongFunctionCalledA(veryVeryVeryVeryVeryLongArgumentCalledB) ** c;

// version 2.0.0
a =
    veryVeryVeryVeryVeryLongFunctionCalledA(
        veryVeryVeryVeryVeryLongVariableCalledB
    ) **
    c;

// version 2.1.0
a =
    veryVeryVeryVeryVeryLongFunctionCalledA(
        veryVeryVeryVeryVeryLongVariableCalledB
    ) ** c;
  • Added parentheses on consecutive equality operators to improve readability in operation precedence. by @​Janther in #​1132
// Original
a == b == c;
a != b == c;

// version 2.0.0
a == b == c;
a != b == c;

// version 2.1.0
(a == b) == c;
(a != b) == c;
// Original
struct A {
    uint a;
    uint b;
    // uint c; // commented because I decided to test something
}

// version 2.0.0
struct A {
    uint a;
    uint b;
}
// uint c; // commented because I decided to test something

// version 2.1.0
struct A {
    uint a;
    uint b;
    // uint c; // commented because I decided to test something
}
Breaking Changes

New Contributors

Full Changelog: prettier-solidity/prettier-plugin-solidity@v2.0.0...v2.1.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, 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.

@renovate
renovate Bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from 084eb7c to c6929e3 Compare November 9, 2025 07:11
@renovate renovate Bot changed the title Update dependency prettier-plugin-solidity to v2.1.0 Update dependency prettier-plugin-solidity to v2.2.0 Nov 9, 2025
@renovate
renovate Bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from c6929e3 to 0188f5f Compare December 18, 2025 23:25
@renovate renovate Bot changed the title Update dependency prettier-plugin-solidity to v2.2.0 Update dependency prettier-plugin-solidity to v2.2.1 Dec 18, 2025
@renovate
renovate Bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from 0188f5f to d670371 Compare March 10, 2026 19:11
@renovate renovate Bot changed the title Update dependency prettier-plugin-solidity to v2.2.1 Update dependency prettier-plugin-solidity to v2.3.0 Mar 10, 2026
@renovate
renovate Bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from d670371 to 66d4493 Compare March 12, 2026 15:03
@renovate renovate Bot changed the title Update dependency prettier-plugin-solidity to v2.3.0 Update dependency prettier-plugin-solidity to v2.3.1 Mar 12, 2026
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.

0 participants