From d5e92bf85999857cc6d5f9a2f183015a5b2edb8e Mon Sep 17 00:00:00 2001 From: Klaus Hott Vidal Date: Thu, 9 Nov 2023 19:24:49 +1300 Subject: [PATCH] ready to publish (#949) * adding test cases for solidity 0.8.22 * Bump @solidity-parser/parser from 0.16.1 to 0.16.2 * bump version --- README.md | 2 +- package-lock.json | 12 ++++++------ package.json | 4 ++-- .../AllSolidityFeatures/AllSolidityFeatures.sol | 4 ++++ .../__snapshots__/jsfmt.spec.js.snap | 9 +++++++++ 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 649c37e51..1e0de6a88 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ For more details and please have a look at [Prettier's documentation](https://pr ### Creating a package for the Browser -_Added in v1.1.4_ +_Added in v1.2.0_ If you are creating your own package to be run in a browser, you might want to import the standalone files directly. diff --git a/package-lock.json b/package-lock.json index 666049a62..c0a9c2d23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "prettier-plugin-solidity", - "version": "1.1.4-dev", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prettier-plugin-solidity", - "version": "1.1.4-dev", + "version": "1.2.0", "license": "MIT", "dependencies": { - "@solidity-parser/parser": "^0.16.1", + "@solidity-parser/parser": "^0.16.2", "semver": "^7.5.4", "solidity-comments-extractor": "^0.0.7" }, @@ -1333,9 +1333,9 @@ } }, "node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.2.tgz", + "integrity": "sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg==", "dependencies": { "antlr4ts": "^0.5.0-alpha.4" } diff --git a/package.json b/package.json index 6527f285e..2b65b0f73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prettier-plugin-solidity", - "version": "1.1.4-dev", + "version": "1.2.0", "description": "A Prettier Plugin for automatically formatting your Solidity code.", "type": "module", "main": "./src/index.js", @@ -110,7 +110,7 @@ "webpack-cli": "^5.1.4" }, "dependencies": { - "@solidity-parser/parser": "^0.16.1", + "@solidity-parser/parser": "^0.16.2", "semver": "^7.5.4", "solidity-comments-extractor": "^0.0.7" }, diff --git a/tests/format/AllSolidityFeatures/AllSolidityFeatures.sol b/tests/format/AllSolidityFeatures/AllSolidityFeatures.sol index 7f299ad03..58b5ed853 100644 --- a/tests/format/AllSolidityFeatures/AllSolidityFeatures.sol +++ b/tests/format/AllSolidityFeatures/AllSolidityFeatures.sol @@ -11,12 +11,16 @@ import * as SomeSymbol from "AnotherFile.sol"; import {symbol1 as alias, symbol2} from "File.sol"; interface i { + event ForeignEvent(); function f(); } +event E(); + contract c { function c() { + emit i.ForeignEvent(); val1 = 1 wei; // 1 val2 = 1 szabo; // 1 * 10 ** 12 val3 = 1 finney; // 1 * 10 ** 15 diff --git a/tests/format/AllSolidityFeatures/__snapshots__/jsfmt.spec.js.snap b/tests/format/AllSolidityFeatures/__snapshots__/jsfmt.spec.js.snap index cbb241d61..1be3c95bd 100644 --- a/tests/format/AllSolidityFeatures/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/AllSolidityFeatures/__snapshots__/jsfmt.spec.js.snap @@ -19,12 +19,16 @@ import * as SomeSymbol from "AnotherFile.sol"; import {symbol1 as alias, symbol2} from "File.sol"; interface i { + event ForeignEvent(); function f(); } +event E(); + contract c { function c() { + emit i.ForeignEvent(); val1 = 1 wei; // 1 val2 = 1 szabo; // 1 * 10 ** 12 val3 = 1 finney; // 1 * 10 ** 15 @@ -563,11 +567,16 @@ import "AnotherFile.sol" as SomeSymbol; import {symbol1 as alias, symbol2} from "File.sol"; interface i { + event ForeignEvent(); + function f(); } +event E(); + contract c { function c() { + emit i.ForeignEvent(); val1 = 1 wei; // 1 val2 = 1 szabo; // 1 * 10 ** 12 val3 = 1 finney; // 1 * 10 ** 15