-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: address npm audit security report #42
Changes from 3 commits
4fdd017
5bb4c5b
16b3816
f6aa03f
655b379
983e7f5
85bd9d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "groupon/node4" | ||
"extends": "groupon/node6" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/yarn.lock | ||
/package-lock.json | ||
/.nyc_output | ||
node_modules/ | ||
/tmp | ||
npm-debug.log | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
language: node_js | ||
node_js: | ||
- 4.6.1 | ||
- 6.11.5 | ||
- 8.9.0 | ||
- 6.14.3 | ||
- 8.11.3 | ||
- 10.5.0 | ||
deploy: | ||
- provider: script | ||
script: ./bin/nlm.js release | ||
script: ./node_modules/.bin/nlm release | ||
skip_cleanup: true | ||
'on': | ||
branch: master | ||
node: 8.9.0 | ||
node: 10.5.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ const run = require('../run'); | |
|
||
const SEPARATOR = '---nlm-split---'; | ||
const GIT_LOG_FORMAT = `--format=%H %P\n%B${SEPARATOR}`; | ||
const PR_MERGE_PATTERN = /^Merge pull request #(\d+) from ([^/]+)\/([\S]+)/; | ||
const PR_MERGE_PATTERN = /^Merge pull request #(\d+) from ([^\/]+)\/([\S]+)/; | ||
|
||
function parseCommit(commit) { | ||
const metaEndIdx = commit.indexOf('\n'); | ||
|
@@ -54,14 +54,14 @@ function parseCommit(commit) { | |
const parentSha = meta.shift() || null; | ||
|
||
const data = commitParser.sync(message, { | ||
issuePrefixes: ['#', 'https?://\\w[\\w.-]*[\\w/-]+?'], | ||
issuePrefixes: ['#', 'https?://\\w[\\w.-]*[\\D/-]+'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
}); | ||
const prMatch = message.match(PR_MERGE_PATTERN); | ||
if (prMatch) { | ||
const prId = prMatch[1]; | ||
data.type = 'pr'; | ||
data.pullId = prId; | ||
data.references.push({ | ||
Object.assign(data.references[0], { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain this a bit? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem. After updating the conventional-commits-parser library it seemed that there was already an array index of 0 present, and this test was expecting the original code to push those values into an empty array. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I parse it, the test was expecting there to be no references, and hence our push()ed one is What's changed is that there now are some... I'd vote:
|
||
action: 'Merges', | ||
owner: prMatch[2], | ||
repository: null, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that won't work