Skip to content

Commit

Permalink
chore: update babel libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Cesar Chavez Lopez authored and Christopher Cesar Chavez Lopez committed Apr 6, 2022
1 parent 8d96531 commit 197ab38
Show file tree
Hide file tree
Showing 6 changed files with 3,426 additions and 3,139 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["env"],
"presets": ["@babel/preset-env"],
"env": {
"test": {
"plugins": ["istanbul"]
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"env": {
"browser": false,
"es6": true,
Expand Down
47 changes: 29 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@nodefactory/solidity-comments-core",
"name": "@doncesarts/solidity-comments-core",
"version": "1.2.0",
"description": "",
"main": "dist/index.js",
"engines": {
"node": "^8.10.0"
"node": "^16.0.0"
},
"scripts": {
"dev": "babel-node src/index.es6",
Expand Down Expand Up @@ -33,31 +33,42 @@
],
"contributors": [
"Belma Gutlić <[email protected]>",
"Marin Petrunić <[email protected]>"
"Marin Petrunić <[email protected]>",
"doncesarts <[email protected]>"
],
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/register": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.5",
"babel-plugin-istanbul": "^4.1.6",
"babel-preset-env": "^1.7.0",
"@abhijithvijayan/eslint-config": "2.6.3",
"@abhijithvijayan/eslint-config-airbnb": "^1.0.2",
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.8",
"@babel/eslint-parser": "^7.12.16",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.16.11",
"@babel/register": "^7.17.7",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"babel-plugin-istanbul": "^6.1.1",
"babel-register": "^6.26.0",
"babel-tape-runner": "^2.0.1",
"coveralls": "^3.0.2",
"electron": "^3.0.2",
"eslint": "^5.0.1",
"babel-tape-runner": "^3.0.0",
"coveralls": "^3.1.1",
"electron": "^18.0.2",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.13.0",
"eslint-config-strongloop": "^2.1.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"istanbul": "^0.4.5",
"nyc": "^12.0.2",
"nyc": "^15.1.0",
"prettier": "^2.6.2",
"tap-spec": "^5.0.0",
"tape": "^4.9.1"
"tape": "^5.5.2"
},
"dependencies": {
"mustache": "^2.3.0",
"solidity-parser-antlr": "^0.3.0"
"mustache": "^4.2.0",
"solidity-parser-antlr": "^0.4.11"
},
"nyc": {
"require": [
Expand Down
7 changes: 2 additions & 5 deletions src/lib/generators/comments-generator.es6
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ export default class CommentsGenerator {
}

extractParamNames(item) {
let params = [];
item.parameters.parameters.forEach((paramObj) => {
params.push({name: paramObj.name});
});
return params;
const parameters = item.parameters.parameters ? item.parameters.parameters : item.parameters;
return parameters.map((p) => ({name: p.name}));
}
}
1 change: 1 addition & 0 deletions test/index.test.es6
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ test('Assert generate comments from text', (t) => {
t.plan(1);
let commentedContract =
generateCommentsFromText(fs.readFileSync('./test/test-contracts/Metacoin.sol', 'utf-8'));
console.log(commentedContract);
t.equal(
commentedContract,
fs.readFileSync('./test/test-contracts/Metacoin.commented.sol', 'utf-8')
Expand Down
Loading

0 comments on commit 197ab38

Please sign in to comment.