Skip to content

Commit

Permalink
fix(pkg.transform): transform should be performed before normalizing …
Browse files Browse the repository at this point in the history
…pkgData
  • Loading branch information
stevemao committed Jul 22, 2015
1 parent 2884a47 commit 7c59bfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -73,7 +73,7 @@ The location of your "package.json".

Type: `function` Default: pass through

A function that takes `package.json` data as the argument and returns the modified data. Note this is performed on the normalized package.json data. Useful when you need to add a leading 'v' to your version, etc.
A function that takes `package.json` data as the argument and returns the modified data. Note this is performed before normalizing package.json data. Useful when you need to add a leading 'v' to your version or modify your repository url, etc.

##### append

Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Expand Up @@ -89,7 +89,7 @@ describe('conventionalChangelog', function() {
path: __dirname + '/fixtures/_short.json',
transform: function(pkg) {
pkg.version = 'v' + pkg.version;
pkg.repository.url = 'https://github.com/a/b.git';
pkg.repository = 'a/b';
return pkg;
}
}
Expand Down

0 comments on commit 7c59bfd

Please sign in to comment.