Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitlint-parser-base

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlint-parser-base - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -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",

@@ -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()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc