Repository navigation
What's Changed
Requirements
Format changes
// Original
(
/* uint80 roundID */,
int answer,
/*uint startedAt*/,
/*uint timeStamp*/,
/*uint80 answeredInRound*/
) = dataFeed.latestRoundData();
// prettier-plugin-solidity 2.4.1
(
,
/* uint80 roundID */ int answer,
, /*uint startedAt*/
, /*uint timeStamp*/
) = /*uint80 answeredInRound*/ dataFeed.latestRoundData();
// prettier-plugin-solidity 2.5.0
(
/* uint80 roundID */,
int answer,
/*uint startedAt*/,
/*uint timeStamp*/,
/*uint80 answeredInRound*/
) = dataFeed.latestRoundData();An empty last slot in a deconstruction no longer adds an extra blank line when it breaks.
- A line comment inside empty parameters or arguments no longer breaks the code, and a comment inside an empty
structno longer throwsComment not printedby @Janther in #1757
// Original
function reserved(
// parameters will be added later
) public {}
// prettier-plugin-solidity 2.4.1
function reserved(// parameters will be added later) public {}
// prettier-plugin-solidity 2.5.0
function reserved(
// parameters will be added later
) public {}- Comments between a
whilecondition and its body are now the first comment of the block by @Janther in #1817
// Original
while(x < integers.length) // the variable integers was initialized to length 10
{
// prettier-plugin-solidity 2.4.1
while (
x < integers.length // the variable integers was initialized to length 10
) {
// prettier-plugin-solidity 2.5.0
while (x < integers.length) {
// the variable integers was initialized to length 10- Comments in pragma versions by @Janther in #1758
- Comments in string literals, Yul paths, Yul switch cases and Yul variable declarations by @Janther in #1755
Performance
Formatting is about 40% faster than in 2.4.1.
Performance
Formatting is about 40% faster than in 2.4.1. We now walk Slang's tree once and make far fewer calls into it, and files that allow the latest Solidity version are parsed only once. By @Janther in #1749, #1750, #1796, #1800, #1815 and #1819
Dependencies
- Updating @nomicfoundation/slang to 1.3.10, supporting Solidity up to 0.8.38 by @dependabot[bot] in #1717 and #1785
- The standalone build is now bundled with esbuild instead of webpack by @Janther in #1747
- Supporting prettier 3.10.1 by @dependabot[bot] in #1806
- Updating semver to 7.8.6 by @dependabot[bot] in #1792
Internal changes
- Browser tests for the standalone build in Chromium, Firefox and WebKit by @Janther in #1715 and #1729
Full Changelog: v2.4.1...v2.5.0