Skip to content

Commit 9d59e8f

Browse files
authored
reset log & current vars after each execution (#10)
fixes #7 and #8
1 parent a0aa247 commit 9d59e8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
var EOL = require('os').EOL
22
var lineReader = require('line-reader')
33
var semver = /\[?v?([\w\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])\]?/
4-
var log = { versions: [] }
4+
var log
55
var current
66

77
function parseChangelog (file, callback) {
8+
log = { versions: [] }
9+
current = null
10+
811
lineReader.eachLine(file, handleLine, EOL).then(function () {
912
// push last version into log
1013
pushCurrent()

0 commit comments

Comments
 (0)