prettier-plugin-solidity
Advanced tools
Comparing version 1.0.0-beta.5 to 1.0.0-beta.6
@@ -11,2 +11,10 @@ module.exports = { | ||
coverageDirectory: './coverage/', | ||
coverageThreshold: { | ||
global: { | ||
branches: 100, | ||
functions: 100, | ||
lines: 100, | ||
statements: 100 | ||
} | ||
}, | ||
setupFiles: ['<rootDir>/tests_config/run_spec.js'], | ||
@@ -13,0 +21,0 @@ snapshotSerializers: ['<rootDir>/tests_config/raw-serializer.js'], |
{ | ||
"name": "prettier-plugin-solidity", | ||
"version": "1.0.0-beta.5", | ||
"version": "1.0.0-beta.6", | ||
"description": "prettier plugin for solidity", | ||
@@ -68,3 +68,3 @@ "main": "src", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^7.0.0", | ||
"eslint-config-prettier": "^8.0.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
@@ -76,3 +76,3 @@ "jest": "^26.6.3", | ||
"dependencies": { | ||
"@solidity-parser/parser": "^0.11.0", | ||
"@solidity-parser/parser": "^0.12.0", | ||
"dir-to-object": "^2.0.0", | ||
@@ -79,0 +79,0 @@ "emoji-regex": "^9.2.1", |
@@ -12,3 +12,3 @@ const { | ||
? concat([ | ||
node.isReasonStringType ? 'Error' : '', | ||
node.kind || '', | ||
'(', | ||
@@ -15,0 +15,0 @@ printSeparatedList(path.map(print, 'parameters')), |
@@ -10,3 +10,11 @@ const { | ||
print: ({ node, options }) => { | ||
const list = node.parts.map((part) => printString(part, options)); | ||
const list = node.parts.map((part, index) => | ||
printString(part, { | ||
...options, | ||
// node.isUnicode is an array of the same length as node.parts | ||
// that indicates if that string fragment has the unicode prefix | ||
isUnicode: node.isUnicode[index] | ||
}) | ||
); | ||
return join(line, list); | ||
@@ -13,0 +21,0 @@ } |
@@ -478,7 +478,8 @@ "use strict"; | ||
options.parser === "scss" | ||
) | ||
), | ||
options.isUnicode | ||
); | ||
} | ||
function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { | ||
function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes, isUnicode) { | ||
const otherQuote = enclosingQuote === '"' ? "'" : '"'; | ||
@@ -518,3 +519,3 @@ | ||
return enclosingQuote + newContent + enclosingQuote; | ||
return (isUnicode ? "unicode" : "") + enclosingQuote + newContent + enclosingQuote; | ||
} | ||
@@ -521,0 +522,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
503879
3863
+ Added@solidity-parser/parser@0.12.2(transitive)
- Removed@solidity-parser/parser@0.11.1(transitive)