Skip to content

Commit 71a7479

Browse files
authored
Transient keyword (#1079)
* updating dependencies * passing tests * printing transient keyword
1 parent ca03db0 commit 71a7479

24 files changed

+109
-88
lines changed

package-lock.json

+30-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -87,30 +87,30 @@
8787
"node": ">=16"
8888
},
8989
"devDependencies": {
90-
"@babel/code-frame": "^7.22.10",
91-
"c8": "^9.0.0",
90+
"@babel/code-frame": "^7.26.2",
91+
"c8": "^9.1.0",
9292
"cross-env": "^7.0.3",
9393
"eslint": "^8.47.0",
9494
"eslint-config-airbnb-base": "^15.0.0",
95-
"eslint-config-prettier": "^9.0.0",
96-
"eslint-plugin-import": "^2.28.1",
97-
"esm-utils": "^4.1.2",
98-
"esmock": "^2.3.8",
99-
"jest": "^29.6.3",
95+
"eslint-config-prettier": "^9.1.0",
96+
"eslint-plugin-import": "^2.31.0",
97+
"esm-utils": "^4.3.0",
98+
"esmock": "^2.6.9",
99+
"jest": "^29.7.0",
100100
"jest-light-runner": "^0.6.0",
101101
"jest-snapshot-serializer-ansi": "^2.1.0",
102102
"jest-snapshot-serializer-raw": "^2.0.0",
103103
"jest-watch-typeahead": "^2.2.2",
104-
"lines-and-columns": "^2.0.3",
105-
"prettier": "^3.1.1",
104+
"lines-and-columns": "^2.0.4",
105+
"prettier": "^3.3.3",
106106
"proxyquire": "^2.1.3",
107-
"solc": "^0.8.26",
108-
"webpack": "^5.88.2",
109-
"webpack-cli": "^6.0.0"
107+
"solc": "^0.8.28",
108+
"webpack": "^5.97.1",
109+
"webpack-cli": "^6.0.1"
110110
},
111111
"dependencies": {
112-
"@solidity-parser/parser": "^0.18.0",
113-
"semver": "^7.5.4"
112+
"@solidity-parser/parser": "^0.19.0",
113+
"semver": "^7.6.3"
114114
},
115115
"peerDependencies": {
116116
"prettier": ">=2.3.0"

src/nodes/VariableDeclaration.js

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const storageLocation = (node) =>
1919

2020
const immutable = (node) => (node.isImmutable ? ' immutable' : '');
2121

22+
const transient = (node) => (node.isTransient ? ' transient' : '');
23+
2224
const override = (node, path, print) => {
2325
if (!node.override) return '';
2426
if (node.override.length === 0) return [line, 'override'];
@@ -43,6 +45,7 @@ export const VariableDeclaration = {
4345
constantKeyword(node),
4446
storageLocation(node),
4547
immutable(node),
48+
transient(node),
4649
override(node, path, print),
4750
name(node)
4851
])

tests/format/HexLiteral/HexLiteral.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract HexLiteral {
55
bytes8 hex1 = hex'DeadBeef';

tests/format/HexLiteral/__snapshots__/jsfmt.spec.js.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ singleQuote: false
99
| printWidth
1010
=====================================input======================================
1111
// SPDX-License-Identifier: MIT
12-
pragma solidity 0.8.26;
12+
pragma solidity 0.8.28;
1313
1414
contract HexLiteral {
1515
bytes8 hex1 = hex'DeadBeef';
@@ -18,7 +18,7 @@ contract HexLiteral {
1818
1919
=====================================output=====================================
2020
// SPDX-License-Identifier: MIT
21-
pragma solidity 0.8.26;
21+
pragma solidity 0.8.28;
2222
2323
contract HexLiteral {
2424
bytes8 hex1 = hex"DeadBeef";
@@ -37,7 +37,7 @@ singleQuote: true
3737
| printWidth
3838
=====================================input======================================
3939
// SPDX-License-Identifier: MIT
40-
pragma solidity 0.8.26;
40+
pragma solidity 0.8.28;
4141
4242
contract HexLiteral {
4343
bytes8 hex1 = hex'DeadBeef';
@@ -46,7 +46,7 @@ contract HexLiteral {
4646
4747
=====================================output=====================================
4848
// SPDX-License-Identifier: MIT
49-
pragma solidity 0.8.26;
49+
pragma solidity 0.8.28;
5050
5151
contract HexLiteral {
5252
bytes8 hex1 = hex'DeadBeef';

tests/format/ModifierInvocations/ModifierInvocations.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract ModifierDefinitions {
55
// We enforce the use of parentheses in modifiers without parameters.

tests/format/ModifierInvocations/__snapshots__/jsfmt.spec.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ printWidth: 80
88
| printWidth
99
=====================================input======================================
1010
// SPDX-License-Identifier: MIT
11-
pragma solidity 0.8.26;
11+
pragma solidity 0.8.28;
1212
1313
contract ModifierDefinitions {
1414
// We enforce the use of parentheses in modifiers without parameters.
@@ -27,7 +27,7 @@ contract ModifierInvocations is ModifierDefinitions {
2727
2828
=====================================output=====================================
2929
// SPDX-License-Identifier: MIT
30-
pragma solidity 0.8.26;
30+
pragma solidity 0.8.28;
3131
3232
contract ModifierDefinitions {
3333
// We enforce the use of parentheses in modifiers without parameters.

tests/format/NumberLiteral/NumberLiteral.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract NumberLiteral {
55
function numbers()public {

tests/format/NumberLiteral/__snapshots__/jsfmt.spec.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ printWidth: 80
77
| printWidth
88
=====================================input======================================
99
// SPDX-License-Identifier: MIT
10-
pragma solidity 0.8.26;
10+
pragma solidity 0.8.28;
1111
1212
contract NumberLiteral {
1313
function numbers()public {
@@ -22,7 +22,7 @@ contract NumberLiteral {
2222
2323
=====================================output=====================================
2424
// SPDX-License-Identifier: MIT
25-
pragma solidity 0.8.26;
25+
pragma solidity 0.8.28;
2626
2727
contract NumberLiteral {
2828
function numbers() public {

tests/format/Parentheses/AddNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract AddNoParentheses {
55
function addAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/BitAndNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract BitAndNoParentheses {
55
function bitAndAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/BitOrNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract BitOrNoParentheses {
55
function bitOrAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/BitXorNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract BitXorNoParentheses {
55
function bitXorAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/DivNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract DivNoParentheses {
55
function divAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/ExpNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract ExpNoParentheses {
55
function expAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/LogicNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract LogicNoParentheses {
55
function orOr(bool a, bool b, bool c) public pure returns (bool) {

tests/format/Parentheses/ModNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract ModNoParentheses {
55
function modAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/MulNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract MulNoParentheses {
55
function mulAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/ShiftLNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract ShiftLNoParentheses {
55
function shiftLAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/ShiftRNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract ShiftRNoParentheses {
55
function shiftRAdd(uint256 a, uint256 b, uint256 c)

tests/format/Parentheses/SubNoParentheses.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity 0.8.28;
33

44
contract SubNoParentheses {
55
function subAdd(uint256 a, uint256 b, uint256 c)

0 commit comments

Comments
 (0)