gitlint-parser-base
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -40,3 +40,3 @@ 'use strict' | ||
const val = matches[3] | ||
if (key === 'date') { | ||
if (key === 'date' || key === 'authordate') { | ||
this.date = val | ||
@@ -50,2 +50,4 @@ } else if (key === 'author') { | ||
const body = splits.map((item) => { | ||
// TODO(evanlucas) maybe support commit messages that are not | ||
// indented by 4 spaces | ||
if (item.length) return item.slice(4, item.length) | ||
@@ -52,0 +54,0 @@ return '' |
{ | ||
"name": "gitlint-parser-base", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "base parser for gitlint", | ||
@@ -12,4 +12,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"lintit": "~1.0.1", | ||
"tap": "~5.7.1" | ||
"lintit": "^1.0.4", | ||
"tap": "^6.2.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "license": "MIT", |
31
test.js
@@ -51,3 +51,34 @@ 'use strict' | ||
} | ||
{ | ||
const input = `commit e7c077c610afa371430180fbd447bfef60ebc5ea | ||
Author: Calvin Metcalf <cmetcalf@appgeo.com> | ||
AuthorDate: Tue Apr 12 15:42:23 2016 -0400 | ||
Commit: James M Snell <jasnell@gmail.com> | ||
CommitDate: Tue Apr 12 15:42:23 2016 -0400 | ||
stream: make null an invalid chunk to write in object mode | ||
this harmonizes behavior between readable, writable, and transform | ||
streams so that they all handle nulls in object mode the same way by | ||
considering them invalid chunks. | ||
PR-URL: https://github.com/nodejs/node/pull/6170 | ||
Reviewed-By: James M Snell <jasnell@gmail.com> | ||
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>` | ||
const data = { name: 'biscuits' } | ||
const v = { | ||
report: (obj) => { | ||
t.pass('called report') | ||
t.equal(obj.data, data, 'obj') | ||
} | ||
} | ||
const p = new Parser(input, v) | ||
t.equal(p.sha, 'e7c077c610afa371430180fbd447bfef60ebc5ea', 'sha') | ||
t.equal(p.author, 'Calvin Metcalf <cmetcalf@appgeo.com>', 'author') | ||
p.report(data) | ||
} | ||
t.end() | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6324
124