prettier-plugin-solidity
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "prettier-plugin-solidity", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "A Prettier Plugin for automatically formatting your Solidity code.", | ||
@@ -87,15 +87,15 @@ "type": "module", | ||
"engines": { | ||
"node": ">=16" | ||
"node": ">=18" | ||
}, | ||
"devDependencies": { | ||
"@babel/code-frame": "^7.22.10", | ||
"c8": "^9.0.0", | ||
"@babel/code-frame": "^7.26.2", | ||
"c8": "^10.1.3", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.47.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"esm-utils": "^4.1.2", | ||
"esmock": "^2.3.8", | ||
"jest": "^29.6.3", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"esm-utils": "^4.3.0", | ||
"esmock": "^2.6.9", | ||
"jest": "^29.7.0", | ||
"jest-light-runner": "^0.6.0", | ||
@@ -105,12 +105,12 @@ "jest-snapshot-serializer-ansi": "^2.1.0", | ||
"jest-watch-typeahead": "^2.2.2", | ||
"lines-and-columns": "^2.0.3", | ||
"prettier": "^3.1.1", | ||
"lines-and-columns": "^2.0.4", | ||
"prettier": "^3.3.3", | ||
"proxyquire": "^2.1.3", | ||
"solc": "^0.8.26", | ||
"webpack": "^5.88.2", | ||
"webpack-cli": "^5.1.4" | ||
"solc": "^0.8.28", | ||
"webpack": "^5.97.1", | ||
"webpack-cli": "^6.0.1" | ||
}, | ||
"dependencies": { | ||
"@solidity-parser/parser": "^0.18.0", | ||
"semver": "^7.5.4" | ||
"@solidity-parser/parser": "^0.19.0", | ||
"semver": "^7.6.3" | ||
}, | ||
@@ -117,0 +117,0 @@ "peerDependencies": { |
@@ -15,4 +15,11 @@ import { doc } from 'prettier'; | ||
if (node.unitAlias) { | ||
// import "./Foo.sol" as Foo; | ||
document = [importPath, ' as ', node.unitAlias]; | ||
// First we look for '*' between the beginning of the import and the | ||
// beginning of the importPath | ||
document = options.originalText | ||
.slice(options.locStart(node), options.locStart(node.pathLiteral)) | ||
.includes('*') | ||
? // import * as Bar from "./Bar.sol"; | ||
['* as ', node.unitAlias, ' from ', importPath] | ||
: // import "./Foo.sol" as Foo; | ||
[importPath, ' as ', node.unitAlias]; | ||
} else if (node.symbolAliases) { | ||
@@ -19,0 +26,0 @@ // import { Foo, Bar as Qux } from "./Foo.sol"; |
@@ -22,2 +22,4 @@ import { doc } from 'prettier'; | ||
const transient = (node) => (node.isTransient ? ' transient' : ''); | ||
const override = (node, path, print) => { | ||
@@ -47,2 +49,3 @@ if (!node.override) return ''; | ||
immutable(node), | ||
transient(node), | ||
override(node, path, print), | ||
@@ -49,0 +52,0 @@ name(node) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1998523
4755
+ Added@solidity-parser/parser@0.19.0(transitive)
- Removed@solidity-parser/parser@0.18.0(transitive)
Updatedsemver@^7.6.3