From 6d561c5812c47beba65ecfb686f22626de014816 Mon Sep 17 00:00:00 2001 From: Florian Keller Date: Thu, 15 Mar 2018 12:08:21 +0100 Subject: [PATCH] Add generate-changelog --- .../generate-changelog-tests.ts | 8 +++++++ types/generate-changelog/index.d.ts | 21 +++++++++++++++++ types/generate-changelog/tsconfig.json | 23 +++++++++++++++++++ types/generate-changelog/tslint.json | 1 + 4 files changed, 53 insertions(+) create mode 100644 types/generate-changelog/generate-changelog-tests.ts create mode 100644 types/generate-changelog/index.d.ts create mode 100644 types/generate-changelog/tsconfig.json create mode 100644 types/generate-changelog/tslint.json diff --git a/types/generate-changelog/generate-changelog-tests.ts b/types/generate-changelog/generate-changelog-tests.ts new file mode 100644 index 0000000000..0b99857715 --- /dev/null +++ b/types/generate-changelog/generate-changelog-tests.ts @@ -0,0 +1,8 @@ +import * as changelog from 'generate-changelog'; + +changelog.generate({ + exclude: ['chore'], + minor: true, + repoUrl: 'https://github.com/lob/generate-changelog', + tag: 'v1.6.0...v1.7.0' +}).then(changelog => changelog.trim()); diff --git a/types/generate-changelog/index.d.ts b/types/generate-changelog/index.d.ts new file mode 100644 index 0000000000..2a6ba0ed56 --- /dev/null +++ b/types/generate-changelog/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for generate-changelog 1.7 +// Project: https://github.com/lob/generate-changelog#readme +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Options { + /** exclude listed commit types (e.g. `['chore', 'style', 'refactor']`) */ + exclude?: string[]; + /** whether it should be a patch changelog */ + patch?: boolean; + /** whether it should be a minor changelog */ + minor?: boolean; + /** whether it should be a major changelog */ + major?: boolean; + /** repo URL that will be used when linking commits */ + repoUrl?: string; + /** generate from specific tag or range (e.g. `v1.2.3` or `v1.2.3..v1.2.4`)' */ + tag?: string; +} + +export function generate(options: Options): Promise; diff --git a/types/generate-changelog/tsconfig.json b/types/generate-changelog/tsconfig.json new file mode 100644 index 0000000000..458186fe12 --- /dev/null +++ b/types/generate-changelog/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "generate-changelog-tests.ts" + ] +} diff --git a/types/generate-changelog/tslint.json b/types/generate-changelog/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/generate-changelog/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }