github-orgs-packages
Advanced tools
Comparing version
27
index.js
@@ -38,3 +38,3 @@ const { | ||
const { data: reposList } = repos; | ||
return reposList; | ||
return reposList.slice(1, 5); | ||
}) | ||
@@ -124,2 +124,26 @@ .catch((err) => { | ||
const alterDeps = deps => Object.keys(deps).map((key) => { | ||
// console.log('DEPS[KEY]', JSON.stringify(deps[key], null, 2)) | ||
const t = deps[key].map(p => { | ||
const { | ||
projectName: name, | ||
projectVersion: version, | ||
projectDescription: description, | ||
} = p; | ||
return { | ||
name, | ||
version, | ||
description | ||
}; | ||
}); | ||
return { | ||
name: key, | ||
description: deps[key][0].depDescription, | ||
currentVersion: deps[key][0].depCurrentVersion, | ||
homepage: deps[key][0].depHomepage, | ||
license: deps[key][0].depLicense, | ||
projects: t | ||
}; | ||
}); | ||
return getReposList() | ||
@@ -134,2 +158,3 @@ .map(flattenObj) | ||
.then(groupByProjectName) | ||
.then(alterDeps) | ||
.catch(console.error); |
{ | ||
"name": "github-orgs-packages", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Get information for all packages inside of your github organisation", | ||
@@ -24,2 +24,3 @@ "main": "index.js", | ||
"lint": "eslint .", | ||
"release": "xyz --increment", | ||
"release:major": "changelog -M && git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && npm version major && git push origin && git push origin --tags", | ||
@@ -41,4 +42,4 @@ "release:minor": "changelog -m && git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && npm version minor && git push origin && git push origin --tags", | ||
"generate-changelog": "^1.7.0", | ||
"xyz": "^3.0.0" | ||
"xyz": "^2.1.0" | ||
} | ||
} |
@@ -11,23 +11,33 @@ # github-orgs-packages  | ||
```js | ||
{ xyz: | ||
[ { usedVersion: '^2.1.0', | ||
depName: 'xyz', | ||
depCurrentVersion: '3.0.0', | ||
depDescription: 'Publish npm packages with fewer screw-ups', | ||
depHomepage: 'https://github.com/davidchambers/xyz', | ||
depLicense: 'WTFPL', | ||
projectName: 'cool project #1', | ||
projectVersion: '1.1.0', | ||
projectDescription: 'cool project description' } ], | ||
eslint: | ||
[ { usedVersion: '4.1.1', | ||
depName: 'eslint', | ||
depCurrentVersion: '4.18.2', | ||
depDescription: 'An AST-based pattern checker for JavaScript.', | ||
depHomepage: 'https://eslint.org', | ||
depLicense: 'MIT', | ||
projectName: 'cool project #2', | ||
projectVersion: '1.2.0', | ||
projectDescription: 'cool project description' } ] } | ||
```json | ||
[ | ||
{ | ||
"name": "xyz", | ||
"description": "Publish npm packages with fewer screw-ups", | ||
"currentVersion": "3.0.0", | ||
"homepage": "https://github.com/davidchambers/xyz", | ||
"license": "WTFPL", | ||
"projects": [ | ||
{ | ||
"name": "cool-project", | ||
"version": "2.1.0", | ||
"description": "Description" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "eslint", | ||
"description": "An AST-based pattern checker for JavaScript.", | ||
"currentVersion": "4.19.0", | ||
"homepage": "https://eslint.org", | ||
"license": "MIT", | ||
"projects": [ | ||
{ | ||
"name": "another-cool-project", | ||
"version": "2.1.0", | ||
"description": "Description" | ||
} | ||
] | ||
} | ||
] | ||
``` | ||
@@ -34,0 +44,0 @@ |
Sorry, the diff of this file is not supported yet
60137
1.25%139
20.87%59
20.41%