changelogen
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -0,4 +1,8 @@ | ||
declare type SemverBumpType = 'major' | 'minor' | 'patch'; | ||
interface ChangelogConfig { | ||
cwd: string; | ||
types: Record<string, { | ||
title: string; | ||
semver?: SemverBumpType; | ||
}>; | ||
@@ -9,3 +13,5 @@ scopeMap: Record<string, string>; | ||
to: string; | ||
output: string | false; | ||
} | ||
declare function loadChangelogConfig(cwd: string, overrides?: Partial<ChangelogConfig>): Promise<ChangelogConfig>; | ||
@@ -22,2 +28,6 @@ interface GitCommitAuthor { | ||
} | ||
interface Reference { | ||
type: 'hash' | 'issue' | 'pull-request'; | ||
value: string; | ||
} | ||
interface GitCommit extends RawGitCommit { | ||
@@ -27,3 +37,3 @@ description: string; | ||
scope: string; | ||
references: string[]; | ||
references: Reference[]; | ||
authors: GitCommitAuthor[]; | ||
@@ -34,3 +44,5 @@ isBreaking: boolean; | ||
declare function getCurrentGitBranch(): Promise<string>; | ||
declare function getGitDiff(from: any, to: any): Promise<RawGitCommit[]>; | ||
declare function getCurrentGitTag(): Promise<string>; | ||
declare function getCurrentGitRef(): Promise<string>; | ||
declare function getGitDiff(from: string | undefined, to?: string): Promise<RawGitCommit[]>; | ||
declare function parseCommits(commits: RawGitCommit[], config: ChangelogConfig): GitCommit[]; | ||
@@ -41,2 +53,2 @@ declare function parseGitCommit(commit: RawGitCommit, config: ChangelogConfig): GitCommit | null; | ||
export { GitCommit, GitCommitAuthor, RawGitCommit, generateMarkDown, getCurrentGitBranch, getGitDiff, getLastGitTag, parseCommits, parseGitCommit }; | ||
export { ChangelogConfig, GitCommit, GitCommitAuthor, RawGitCommit, Reference, generateMarkDown, getCurrentGitBranch, getCurrentGitRef, getCurrentGitTag, getGitDiff, getLastGitTag, loadChangelogConfig, parseCommits, parseGitCommit }; |
{ | ||
"name": "changelogen", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Generate Beautiful Changelogs using Conventional Commits", | ||
@@ -25,7 +25,9 @@ "repository": "unjs/changelogen", | ||
"dependencies": { | ||
"c12": "^0.2.7", | ||
"c12": "^0.2.10", | ||
"consola": "^2.15.3", | ||
"convert-gitmoji": "^0.1.2", | ||
"execa": "^6.1.0", | ||
"mri": "^1.2.0", | ||
"scule": "^0.2.1" | ||
"scule": "^0.3.2", | ||
"semver": "^7.3.7" | ||
}, | ||
@@ -35,5 +37,6 @@ "devDependencies": { | ||
"@types/node": "^17.0.31", | ||
"c8": "latest", | ||
"@types/semver": "^7.3.12", | ||
"@vitest/coverage-c8": "^0.22.1", | ||
"eslint": "latest", | ||
"jiti": "^1.13.0", | ||
"jiti": "^1.14.0", | ||
"standard-version": "latest", | ||
@@ -44,3 +47,3 @@ "typescript": "latest", | ||
}, | ||
"packageManager": "pnpm@7.2.1", | ||
"packageManager": "pnpm@7.9.5", | ||
"scripts": { | ||
@@ -51,5 +54,5 @@ "build": "unbuild", | ||
"lint": "eslint --ext .ts,.js,.mjs,.cjs .", | ||
"release": "pnpm test && standard-version && git push --follow-tags && pnpm publish", | ||
"test": "pnpm lint && vitest run" | ||
"release": "pnpm test && pnpm changelogen --release && git push --follow-tags && pnpm publish", | ||
"test": "pnpm lint && vitest run --coverage" | ||
} | ||
} |
@@ -12,3 +12,3 @@ # changelogen | ||
Generate changelog in markdown format to the console output: | ||
Generate changelog in markdown format and update (or create) `CHANGELOG.md`: | ||
@@ -19,7 +19,6 @@ ```sh | ||
## CLI Usage | ||
```sh | ||
npx changelogen@latest [--from=...] [--to=...] [<rootDir>] | ||
npx changelogen@latest [...args] [<rootDir>] | ||
``` | ||
@@ -29,9 +28,9 @@ | ||
- `from`: Start commit reference. When not provided, **latest git tag** will be used as default. | ||
- `to`: End commit reference. When not provided, **latest commit in HEAD** will be used as default. | ||
- `rootDir`: Path to git repository. When not provided, **current working directory** will be used as as default. | ||
- `--from`: Start commit reference. When not provided, **latest git tag** will be used as default. | ||
- `--to`: End commit reference. When not provided, **latest commit in HEAD** will be used as default. | ||
- `--rootDir`: Path to git repository. When not provided, **current working directory** will be used as as default. | ||
- `--output`: Changelog file name to create or update. Defaults to `CHANGELOG.md` and resolved relative to rootDir. Use `--no-output` to write to console only. | ||
- `--bump`: Determine semver change and update version in `package.json`. | ||
- `--release`. Bumps version in `package.json` and creates commit and git tags using local `git`. You can disable commit using `--no-commit` and tag using `--no-tag`. | ||
## Configuration | ||
@@ -38,0 +37,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
28513
679
7
10
1
65
3
1
+ Addedconvert-gitmoji@^0.1.2
+ Addedsemver@^7.3.7
+ Addedconvert-gitmoji@0.1.5(transitive)
+ Addedscule@0.3.2(transitive)
+ Addedsemver@7.6.3(transitive)
- Removedscule@0.2.1(transitive)
Updatedc12@^0.2.10
Updatedscule@^0.3.2