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

conventional-commits-parser

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conventional-commits-parser - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="1.2.1"></a>
## [1.2.1](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.0...v1.2.1) (2016-04-24)
### Bug Fixes
* **mention:** fix mention matching ([43b32e7](https://github.com/conventional-changelog/conventional-commits-parser/commit/43b32e7)), closes [#26](https://github.com/conventional-changelog/conventional-commits-parser/issues/26)
<a name="1.2.0"></a>

@@ -2,0 +12,0 @@ # [1.2.0](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.1.0...v1.2.0) (2016-04-15)

2

lib/regex.js

@@ -52,4 +52,4 @@ 'use strict';

references: reReferences,
mentions: /@(\S+)/g
mentions: /@([\w-]+)/g
};
};
{
"name": "conventional-commits-parser",
"version": "1.2.0",
"version": "1.2.1",
"description": "Parse raw conventional commits",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/conventional-changelog/conventional-commits-parser",

@@ -242,2 +242,67 @@ 'use strict';

});
describe('mentions', function() {
it('should match basically mention', function() {
var string = 'Thanks!! @someone';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@someone');
expect(match[1]).to.equal('someone');
});
it('should match mention with hyphen', function() {
var string = 'Thanks!! @some-one';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@some-one');
expect(match[1]).to.equal('some-one');
});
it('should match mention with underscore', function() {
var string = 'Thanks!! @some_one';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@some_one');
expect(match[1]).to.equal('some_one');
});
it('should match mention with parentheses', function() {
var string = 'Fix feature1 (by @someone)';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@someone');
expect(match[1]).to.equal('someone');
});
it('should match mention with brackets', function() {
var string = 'Fix feature1 [by @someone]';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@someone');
expect(match[1]).to.equal('someone');
});
it('should match mention with braces', function() {
var string = 'Fix feature1 {by @someone}';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@someone');
expect(match[1]).to.equal('someone');
});
it('should match mention with angle brackets', function() {
var string = 'Fix feature1 by <@someone>';
var mentions = regex().mentions;
var match = mentions.exec(string);
expect(match[0]).to.equal('@someone');
expect(match[1]).to.equal('someone');
});
});
});
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