offline-github-changelog
Advanced tools
Comparing version 1.6.1 to 1.7.0
19
index.js
@@ -63,9 +63,20 @@ const { spawnSync } = require('child_process'); | ||
.split('=====\n') | ||
.filter(line => line && line.startsWith('Merge pull request')) | ||
.filter( | ||
line => | ||
(line && line.startsWith('Merge pull request')) || | ||
/ \(#\d+\)/.test(line) | ||
) | ||
.map(line => line.replace(/\n/g, '')) | ||
.map(line => line.split('|||||')) | ||
.map(([pullRequest, message, mergeHash, mergeAuthor, parents]) => { | ||
const pullRequestNumber = pullRequest.match( | ||
/Merge pull request #(\d+) from/ | ||
)[1]; | ||
let pullRequestNumber; | ||
if (pullRequest.startsWith('Merge pull request')) { | ||
pullRequestNumber = pullRequest.match( | ||
/Merge pull request #(\d+) from/ | ||
)[1]; | ||
} else { | ||
const matchPullRequest = pullRequest.match(/^(.*) \(#(\d+)\)/); | ||
message = matchPullRequest[1] || message; | ||
pullRequestNumber = matchPullRequest[2]; | ||
} | ||
const [from, to] = parents.split(' '); | ||
@@ -72,0 +83,0 @@ |
{ | ||
"name": "offline-github-changelog", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "A changelog generator for Github projects that only uses the Git history", | ||
@@ -33,2 +33,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"coveralls": "^3.0.3", | ||
"eslint": "^5.15.1", | ||
@@ -38,12 +39,25 @@ "eslint-config-prettier": "^4.1.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-mocha": "^5.3.0", | ||
"eslint-plugin-node": "^8.0.1", | ||
"eslint-plugin-promise": "^4.0.1", | ||
"eslint-plugin-standard": "^4.0.0", | ||
"prettier": "^1.16.4", | ||
"semver": "^6.0.0" | ||
"mocha": "^6.1.3", | ||
"nyc": "^14.0.0", | ||
"prettier": "~1.19.1", | ||
"semver": "^6.0.0", | ||
"sinon": "^7.3.1", | ||
"unexpected": "^11.2.0", | ||
"unexpected-snapshot": "^0.3.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha", | ||
"lint": "eslint . && prettier --check '**/*.js' 'bin/*'", | ||
"ci": "npm run lint" | ||
"ci": "npm test && npm run lint && npm run coverage", | ||
"coverage": "NODE_ENV=development nyc --reporter=lcov --reporter=text --all -- npm test && echo google-chrome coverage/lcov-report/index.html" | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"index.js" | ||
] | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16886
18
294
1
16