Skip to content

chore(deps): update dependency prettier-plugin-solidity to v2.3.1#854

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

chore(deps): update dependency prettier-plugin-solidity to v2.3.1#854
renovate[bot] wants to merge 1 commit intomainfrom
renovate/prettier-plugin-solidity-2.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 30, 2025

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: 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 3 times, most recently from c7563ad to 257d9c4 Compare August 21, 2025 00:28
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from 257d9c4 to c81d926 Compare September 27, 2025 12:01
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from c81d926 to 6b26b49 Compare October 21, 2025 18:53
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from 6b26b49 to 843f1dc Compare November 9, 2025 07:13
@renovate renovate bot changed the title chore(deps): update dependency prettier-plugin-solidity to v2.1.0 chore(deps): 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 843f1dc to d56c07a Compare December 18, 2025 23:35
@renovate renovate bot changed the title chore(deps): update dependency prettier-plugin-solidity to v2.2.0 chore(deps): 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 d56c07a to 02603b8 Compare December 31, 2025 18:42
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from 02603b8 to d6779de Compare February 2, 2026 16:00
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from d6779de to f734dfc Compare February 12, 2026 12:50
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from f734dfc to 1ca027c Compare March 10, 2026 19:10
@renovate renovate bot changed the title chore(deps): update dependency prettier-plugin-solidity to v2.2.1 chore(deps): 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 1ca027c to 203d044 Compare March 12, 2026 15:12
@renovate renovate bot changed the title chore(deps): update dependency prettier-plugin-solidity to v2.3.0 chore(deps): update dependency prettier-plugin-solidity to v2.3.1 Mar 12, 2026
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch 7 times, most recently from 0e6fd4f to 17172bc Compare March 16, 2026 02:55
@renovate renovate bot force-pushed the renovate/prettier-plugin-solidity-2.x branch from 17172bc to 315dc88 Compare March 16, 2026 06:11
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