@0x/abi-gen
Advanced tools
Comparing version 5.3.0 to 5.3.1
[ | ||
{ | ||
"timestamp": 1594788383, | ||
"version": "5.3.1", | ||
"changes": [ | ||
{ | ||
"note": "Dependencies updated" | ||
} | ||
] | ||
}, | ||
{ | ||
"version": "5.3.0", | ||
@@ -4,0 +13,0 @@ "changes": [ |
@@ -8,2 +8,6 @@ <!-- | ||
## v5.3.1 - _July 15, 2020_ | ||
* Dependencies updated | ||
## v5.3.0 - _June 24, 2020_ | ||
@@ -10,0 +14,0 @@ |
@@ -174,3 +174,12 @@ #!/usr/bin/env node | ||
function makeLanguageSpecificName(methodName) { | ||
return args.language === 'Python' ? changeCase.snake(methodName) : methodName; | ||
if (args.language === 'Python') { | ||
var snakeCased = changeCase.snake(methodName); | ||
// Move leading underscores to the end. | ||
var m = /^(_*).+?(_*)$/.exec(methodName); | ||
if (m) { | ||
snakeCased = "" + snakeCased + (m[1] || m[2]); | ||
} | ||
return snakeCased; | ||
} | ||
return methodName; | ||
} | ||
@@ -177,0 +186,0 @@ if (_.isEmpty(abiFileNames)) { |
@@ -228,3 +228,11 @@ "use strict"; | ||
}); | ||
Handlebars.registerHelper('toPythonClassname', function (sourceName) { return new Handlebars.SafeString(changeCase.pascal(sourceName)); }); | ||
Handlebars.registerHelper('toPythonClassname', function (sourceName) { | ||
var pascalCased = changeCase.pascal(sourceName); | ||
// Retain trailing underscores. | ||
var m = /^.+?(_*)$/.exec(sourceName); | ||
if (m) { | ||
pascalCased = "" + pascalCased + m[1]; | ||
} | ||
return new Handlebars.SafeString(pascalCased); | ||
}); | ||
Handlebars.registerHelper('makeOutputsValue', | ||
@@ -231,0 +239,0 @@ /** |
@@ -396,7 +396,10 @@ "use strict"; | ||
]; | ||
if (pythonReservedWords.includes(snakeCased) || | ||
pythonBuiltins.includes(snakeCased) || | ||
/*changeCase strips leading underscores :(*/ input[0] === '_') { | ||
if (pythonReservedWords.includes(snakeCased) || pythonBuiltins.includes(snakeCased)) { | ||
snakeCased = "_" + snakeCased; | ||
} | ||
// Retain trailing underscores. | ||
var m = /^.+?(_*)$/.exec(input); | ||
if (m) { | ||
snakeCased = "" + snakeCased + m[1]; | ||
} | ||
return snakeCased; | ||
@@ -403,0 +406,0 @@ }, |
{ | ||
"name": "@0x/abi-gen", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"engines": { | ||
@@ -65,5 +65,5 @@ "node": ">=6.12" | ||
"dependencies": { | ||
"@0x/types": "^3.1.3", | ||
"@0x/typescript-typings": "^5.1.0", | ||
"@0x/utils": "^5.5.0", | ||
"@0x/types": "^3.2.0", | ||
"@0x/typescript-typings": "^5.1.1", | ||
"@0x/utils": "^5.5.1", | ||
"@types/toposort": "^2.0.1", | ||
@@ -73,3 +73,3 @@ "chalk": "^2.3.0", | ||
"cli-format": "^3.0.9", | ||
"ethereum-types": "^3.1.1", | ||
"ethereum-types": "^3.2.0", | ||
"glob": "^7.1.2", | ||
@@ -85,11 +85,11 @@ "handlebars": "^4.1.2", | ||
"devDependencies": { | ||
"@0x/assert": "^3.0.8", | ||
"@0x/base-contract": "^6.2.2", | ||
"@0x/contracts-gen": "^2.0.9", | ||
"@0x/dev-utils": "^3.2.2", | ||
"@0x/json-schemas": "^5.0.8", | ||
"@0x/sol-compiler": "^4.1.0", | ||
"@0x/subproviders": "^6.1.0", | ||
"@0x/tslint-config": "^4.0.0", | ||
"@0x/web3-wrapper": "^7.1.0", | ||
"@0x/assert": "^3.0.9", | ||
"@0x/base-contract": "^6.2.3", | ||
"@0x/contracts-gen": "^2.0.10", | ||
"@0x/dev-utils": "^3.3.0", | ||
"@0x/json-schemas": "^5.1.0", | ||
"@0x/sol-compiler": "^4.1.1", | ||
"@0x/subproviders": "^6.1.1", | ||
"@0x/tslint-config": "^4.1.0", | ||
"@0x/web3-wrapper": "^7.2.0", | ||
"@types/glob": "5.0.35", | ||
@@ -125,3 +125,3 @@ "@types/mkdirp": "^0.5.2", | ||
], | ||
"gitHead": "7bf710f153a51d4904e37f456466fb3c0037071f" | ||
"gitHead": "b5eb1c9ee809f14e0377658400584e9f02b7b8ef" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156066
2075
Updated@0x/types@^3.2.0
Updated@0x/utils@^5.5.1
Updatedethereum-types@^3.2.0