Skip to content

Commit

Permalink
Changelog: Add script to generate changelog and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
arschmitz committed Dec 24, 2015
1 parent 574f933 commit b2b491e
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 3 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

### 2.0.6, 2015-12-23
- Expose Hammer on window or self if either is defined to avoid issues when AMD is present but not used. ( [356f795](/~https://github.com/hammerjs/hammer.js/commit/356f7955b01f3679c29d6c45931679256b45036e))
- Add support for PointerEvent instead of MSPointerEvent if supported. ([#754](/~https://github.com/hammerjs/hammer.js/issues/754), [439c7a6](/~https://github.com/hammerjs/hammer.js/commit/439c7a6c46978ab387b4b8289399e904d1c49535))
- Fixed moz-prefix, prefix should be Moz not moz. ([3ea47f3](/~https://github.com/hammerjs/hammer.js/commit/3ea47f3aebadc9d3bb6bf52bc8402cad135ef8a9))
- Removed non-existant recognizer ([f1c2d3b](/~https://github.com/hammerjs/hammer.js/commit/f1c2d3bf05f530ae092ecfc2335fceeff0e9eec9))
- Fixed config leaking between instances([189098f](/~https://github.com/hammerjs/hammer.js/commit/189098ff7736f6ed2fce9a3d3e1f5a3afee085ba))
- Fixed gaps in gesture configs and update tests to match ([70c2902](/~https://github.com/hammerjs/hammer.js/commit/70c2902d773a750e92ce8c423f8a4165c07eab97))
- Fixed Manager off method ([#768](/~https://github.com/hammerjs/hammer.js/issues/768), [da49a27](/~https://github.com/hammerjs/hammer.js/commit/da49a2730779ecc3b4dd147cc418a0df7c70fad9))
- Added compatibility with requirejs optimizer namespaces ( [70075f2](/~https://github.com/hammerjs/hammer.js/commit/70075f2df1b855f7c6d8d3caac49b9276b88c8d6))
- Made touchaction test zoomable ( [50264a7](/~https://github.com/hammerjs/hammer.js/commit/50264a70251ca88bbaf7b666401e527eee616de5))
- Fixed preventing default when for `pan-x pan-y` case ( [95eaafa](/~https://github.com/hammerjs/hammer.js/commit/95eaafadad27bd1b25d20cf976811a451922f1c4))
- Fixed incorrect touch action pan direction ( [a81da57](/~https://github.com/hammerjs/hammer.js/commit/a81da57a82ebf37e695e7c443e4e2715e7f32856))
- Fixed combined pan-x pan-y to resolve to none ( [fdae07b](/~https://github.com/hammerjs/hammer.js/commit/fdae07bc2ba3c90aad28da6791b3d5df627bc612))
- Fixed inverted touch-action for pan recognizer ([#728](/~https://github.com/hammerjs/hammer.js/issues/728), [605bd3b](/~https://github.com/hammerjs/hammer.js/commit/605bd3beca780be91dd43f9da8b809d155a43d1a))
- Fixed dependency on non standard touch list ordering ([#610](/~https://github.com/hammerjs/hammer.js/issues/610), [#791](/~https://github.com/hammerjs/hammer.js/issues/791), [287720a](/~https://github.com/hammerjs/hammer.js/commit/287720a6e5067e7f28be8b8b3b266d22905361c4))
- Fixed swipe to not trigger after multitouch gesture ([#640](/~https://github.com/hammerjs/hammer.js/issues/640), [711d8a1](/~https://github.com/hammerjs/hammer.js/commit/711d8a1df1aa5057ecb536454a36257e3c0d6d91))
- Fixed swipe recognizer to use overall gesture direction and velocity ( [963fe69](/~https://github.com/hammerjs/hammer.js/commit/963fe697515273fee508414bc29e2656465cea55))
- Fixed getDirection returning reversed direction ( [e40dcde](/~https://github.com/hammerjs/hammer.js/commit/e40dcde43bdac7a74c8ce5c05a4f62121089cd91))
- Fixed detection of tap when multi touch gestures are present ( [c46cbba](/~https://github.com/hammerjs/hammer.js/commit/c46cbba1c2cbbf874b59913416858d9dae297e64))
- Fixed incorrect event order ([#824](/~https://github.com/hammerjs/hammer.js/issues/824), [92f2d76](/~https://github.com/hammerjs/hammer.js/commit/92f2d76188480d967e738a19cd508d0b94a31329))
- Fixed leaking options between recognizer instances ([#813](/~https://github.com/hammerjs/hammer.js/issues/813), [af32c9b](/~https://github.com/hammerjs/hammer.js/commit/af32c9bace3f04bb34bee852ff56a33cc8fc27cd))
- Fixed detection when element has no style attribute ( [5ca6d8c](/~https://github.com/hammerjs/hammer.js/commit/5ca6d8cbead02c71929a8073e95ddf98e11c0e06))

### 2.0.4, 2014-09-28
- Fix IE pointer issue. [#665](/~https://github.com/hammerjs/hammer.js/pull/665)
- Fix multi-touch at different elements. [#668](/~https://github.com/hammerjs/hammer.js/pull/668)
Expand Down
71 changes: 71 additions & 0 deletions changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
var changelog = require( "changelogplease" );
var gittags = require( "git-tags" ).get( function( error, tags ) {
if ( error ) {
throw error
}
console.log( tags[ 1 ] + ".." + tags[ 0 ] );
var exclude = [ "Merge", "Whitespace", "Fixup", "Cleanup", "Formatting", "Ignore" ];
changelog( {
ticketUrl: "/~https://github.com/hammerjs/hammer.js/issues/{id}",
commitUrl: "/~https://github.com/hammerjs/hammerjs/commit/{id}",
sort: false,
repo: "./",
committish: tags[ 1 ] + ".." + tags[ 0 ]
}, function( error, log ) {
if ( error ) {
throw error;
}
log = parseLog( log );
console.log( log );
} );
function parseLog( log ) {
var lines = log.split( "\n" );
var newLog = [];
var log = [];
var currentComponent;


lines.shift();
lines.forEach( function( line ) {
var newLine = parseLine( line );
if ( newLine ) {
log.push( line );
}
} );
var log = log.join( "\n" );
return log.replace( /\*/g, "-" ).replace( /__TICKETREF__,/g, "" );
}
function parseLine( line ) {
var parts = getParts( line );

if ( exclude.indexOf( parts.component ) > -1 ) {
return false;
}
return parts;
}
function getParts( line ) {
var parts = line.split( ":" );
var component = "";
var message;
var commits = line.match( /\{\{([A-Za-z0-9 ]){0,99}\}\}/ )

if ( parts.length > 1 && parts[ 0 ].length <= 20 ) {
component = parts[ 0 ];
parts.shift();
message = parts.join( ":" );
} else {
parts = line.split( " " );
component = parts[ 1 ];
parts.shift();
message = parts.join( " " );
}

if ( component ) {
component = component.replace( /\* |,/, "" );
}
return {
component: component,
message: message
};
}
} );
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hammerjs",
"title": "Hammer.JS",
"description": "A javascript library for multi-touch gestures",
"version": "2.0.5",
"version": "2.0.4",
"homepage": "http://hammerjs.github.io/",
"license": "MIT",
"keywords": [
Expand All @@ -13,6 +13,16 @@
"name": "Jorik Tangelder",
"email": "j.tangelder@gmail.com"
},
"contributors": [
{
"name": "Alexander Schmitz",
"email": "arschmitz@gmail.com"
},
{
"name": "Chris Thoburn",
"email": ""
}
],
"repository": {
"type": "git",
"url": "git://github.com/hammerjs/hammer.js.git"
Expand All @@ -22,6 +32,8 @@
},
"dependencies": {},
"devDependencies": {
"changelogplease": "^1.2.0",
"git-tags": "^0.2.4",
"grunt": "0.4.x",
"grunt-banner": "^0.2.3",
"grunt-contrib-concat": "0.4.x",
Expand All @@ -32,8 +44,8 @@
"grunt-contrib-watch": "0.6.x",
"grunt-jscs": "^0.8.0",
"grunt-string-replace": "^0.2.7",
"jquery-hammerjs": "2.0.x",
"hammer-simulator": "git://github.com/hammerjs/simulator#master"
"hammer-simulator": "git://github.com/hammerjs/simulator#master",
"jquery-hammerjs": "2.0.x"
},
"main": "hammer.js",
"engines": {
Expand Down

0 comments on commit b2b491e

Please sign in to comment.