New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prettier-plugin-solidity

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-solidity - npm Package Compare versions

Comparing version 1.0.0-alpha.6 to 1.0.0-alpha.7

tests/strings/__snapshots__/jsfmt.spec.js.snap

2

package.json
{
"name": "prettier-plugin-solidity",
"version": "1.0.0-alpha.6",
"version": "1.0.0-alpha.7",
"description": "prettier plugin for solidity",

@@ -5,0 +5,0 @@ "main": "src",

@@ -136,5 +136,6 @@ /* eslint-disable no-nested-ternary, operator-linebreak */

doc = path.call(print, 'typeName');
if (node.name) {
doc = join(' ', [doc, node.name]);
}
doc = join(
' ',
[doc, node.storageLocation, node.name].filter(element => element)
);
return doc;

@@ -221,3 +222,3 @@ case 'ModifierInvocation':

node.initExpression ? path.call(print, 'initExpression') : '',
' ',
'; ',
node.conditionExpression ? path.call(print, 'conditionExpression') : '',

@@ -231,3 +232,3 @@ '; ',

return concat(['emit ', path.call(print, 'eventCall'), ';']);
case 'VariableDeclarationStatement':
case 'VariableDeclarationStatement': {
doc = join(

@@ -250,3 +251,5 @@ ', ',

}
return concat([doc, ';']);
const addSemicolon = path.getParentNode().type !== 'ForStatement';
return concat([doc, addSemicolon ? ';' : '']);
}
case 'StateVariableDeclaration':

@@ -438,4 +441,5 @@ doc = concat(

'{',
indent(hardline),
indent(join(line, path.map(print, 'operations'))),
hardline,
join(line, path.map(print, 'operations')),
'}'

@@ -446,2 +450,5 @@ ]);

case 'AssemblyCall':
if (node.arguments.length === 0) {
return node.functionName;
}
// @TODO: add call args

@@ -468,5 +475,15 @@ return concat([

return join(' ', [doc, '{}']);
case 'AssemblyFunctionDefinition':
// @TODO
return '';
case 'AssemblyLocalDefinition':
return join(' ', [
'let',
join(', ', path.map(print, 'names')),
':=',
path.call(print, 'expression')
]);
case 'AssemblyAssignment':
return join(' ', [
join(', ', path.map(print, 'names')),
':=',
path.call(print, 'expression')
]);
default:

@@ -473,0 +490,0 @@ throw new Error(`Unknown type: ${JSON.stringify(node.type)}`);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc