Skip to content

Instantly share code, notes, and snippets.

@unicornware
Last active February 19, 2023 23:25
Show Gist options
  • Save unicornware/374f06ae50ecc69129ef44883e3552af to your computer and use it in GitHub Desktop.
Save unicornware/374f06ae50ecc69129ef44883e3552af to your computer and use it in GitHub Desktop.
Custom Typings - Changelog
declare module 'add-stream' {
import type { ReadStream, WriteStream } from 'node:fs'
/**
* Creates a transform stream that appends the contents of `stream` onto
* whatever is piped into it.
*
* @param {ReadStream} stream - Stream to append
* @return {WriteStream} Transform stream
*/
function addStream(stream: ReadStream): WriteStream
export default addStream
}
import {} from 'conventional-changelog-writer'
declare module 'conventional-changelog-writer' {
namespace GeneratedContext {
interface ExtraContext {
currentTag?: string | undefined
gitSemverTags: string[]
linkCompare?: boolean | undefined
previousTag?: string | undefined
}
}
}
import type { Nilable, Nullable } from '@flex-development/tutils'
import {} from 'conventional-commits-parser'
declare module 'conventional-commits-parser' {
export interface CommitBase {
body: Nullable<string>
committerDate: string
footer: Nullable<string>
gitTags?: Nilable<string>
hash: string
header: Nullable<string>
mentions: string[]
merge: Nullable<string>
notes: import('conventional-commits-parser').Commit.Note[]
references: import('conventional-commits-parser').Commit.Reference[]
revert: Nullable<import('conventional-commits-parser').Commit.Revert>
scope?: Nilable<string>
subject?: Nilable<string>
type?: Nilable<string>
}
export interface ICommit extends CommitBase {
raw: CommitBase
shortHash: string
version?: string | undefined
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment