@semantic-release/release-notes-generator
Advanced tools
Comparing version 3.0.0 to 3.0.1
31
index.js
@@ -1,12 +0,25 @@ | ||
const changelog = require('conventional-changelog') | ||
const parseUrl = require('github-url-from-git') | ||
'use strict' | ||
module.exports = function (pluginConfig, options, cb) { | ||
const repository = options.pkg.repository ? parseUrl(options.pkg.repository.url) : null | ||
const conventionalChangelog = require('conventional-changelog') | ||
changelog({ | ||
version: options.pkg.version, | ||
repository: repository, | ||
file: false | ||
}, cb) | ||
// pluginConfig are passed to all semantic-release plugins but are not used | ||
// optios have been used in an earlier version but are currently not used. | ||
// We leave them in as we expect to need them again in future and try to | ||
// avoid breaking changes | ||
module.exports = function (pluginConfig, options, callback) { | ||
if (typeof options === 'function') { | ||
callback = options | ||
} | ||
let content = '' | ||
conventionalChangelog({ | ||
preset: 'angular' | ||
}) | ||
.on('error', callback) | ||
.on('data', (buffer) => { | ||
content += buffer.toString() | ||
}) | ||
.on('end', () => { | ||
callback(null, content.trim()) | ||
}) | ||
} |
{ | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"name": "@semantic-release/release-notes-generator", | ||
"description": "generates the release notes/changelog", | ||
"author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)", | ||
"authors": [ | ||
"Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)", | ||
"Gregor Martynus (https://twitter.com/gr2m)" | ||
], | ||
"bugs": { | ||
@@ -47,5 +50,5 @@ "url": "https://github.com/semantic-release/release-notes-generator/issues" | ||
"pretest": "standard", | ||
"test": "tap --100 --jobs-auto './test/{scenarios,specs}/**/*-test.js'", | ||
"test": "tap --100 --jobs-auto './test/{integration,unit}/**/*-test.js'", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
} | ||
} |
@@ -1,2 +0,5 @@ | ||
# semantic-release release-notes-generator | ||
# release-notes-generator | ||
> 🔩📖 generates release notes from commits | ||
[![npm version](https://badge.fury.io/js/%40semantic-release%2Frelease-notes-generator.svg)](http://badge.fury.io/js/%40semantic-release%2Frelease-notes-generator) | ||
@@ -7,2 +10,19 @@ [![Build Status](https://travis-ci.org/semantic-release/release-notes-generator.svg?branch=master)](https://travis-ci.org/semantic-release/release-notes-generator) | ||
[![devDependency Status](https://david-dm.org/semantic-release/release-notes-generator/dev-status.svg)](https://david-dm.org/semantic-release/release-notes-generator#info=devDependencies) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) | ||
## Usage | ||
```js | ||
const releaseNotes = require("@semantic-release/release-notes-generator") | ||
releaseNotes({}, (error, changelogs) { | ||
}) | ||
``` | ||
## How it works | ||
`release-notes-generator` is using [conventional-changelog](https://www.npmjs.com/package/conventional-changelog) with the Angular preset to parse commit messages and the `package.json` file in order to calculate the changelogs for a new release. | ||
## License | ||
MIT |
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3598
22
28
0
1