{"id":13457638,"url":"https://github.com/unjs/changelogen","last_synced_at":"2025-06-10T22:41:59.706Z","repository":{"id":37015820,"uuid":"487966757","full_name":"unjs/changelogen","owner":"unjs","description":"💅 Beautiful Changelogs using Conventional Commits","archived":false,"fork":false,"pushed_at":"2024-11-19T11:48:48.000Z","size":655,"stargazers_count":941,"open_issues_count":66,"forks_count":49,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-19T17:12:23.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-02T19:31:01.000Z","updated_at":"2024-11-19T15:57:29.000Z","dependencies_parsed_at":"2024-02-26T10:28:07.493Z","dependency_job_id":"334f08e0-3f2f-47ca-b0cb-d85569029a96","html_url":"https://github.com/unjs/changelogen","commit_stats":{"total_commits":178,"total_committers":22,"mean_commits":8.090909090909092,"dds":0.6067415730337078,"last_synced_commit":"42972f29e6d2c178fe27c8fad1e894858fab220a"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fchangelogen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fchangelogen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fchangelogen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fchangelogen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unjs","download_url":"https://codeload.github.com/unjs/changelogen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289608,"owners_count":20591101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T09:00:32.605Z","updated_at":"2025-06-10T22:41:59.696Z","avatar_url":"https://github.com/unjs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","others","版本发布"],"sub_categories":["开发者工具"],"readme":"# changelogen\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Codecov][codecov-src]][codecov-href]\n[![License][license-src]][license-href]\n\nGenerate Beautiful Changelogs using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)\n\n## Quick Start\n\nGenerate a changelog in Markdown format and display in the console:\n\n```sh\nnpx changelogen@latest\n```\n\nGenerate a changelog, bump the version in `package.json` and update `CHANGELOG.md` (without commit):\n\n```sh\nnpx changelogen@latest --bump\n```\n\nBump the version, update `CHANGELOG.md` and make a git commit and tag:\n\n```sh\nnpx changelogen@latest --release\n```\n\n## CLI Usage\n\n```sh\nnpx changelogen@latest [...args] [--dir \u003cdir\u003e]\n```\n\n**Arguments:**\n\n- `--from`: Start commit reference. When not provided, **latest git tag** will be used as default.\n- `--to`: End commit reference. When not provided, **latest commit in HEAD** will be used as default.\n- `--dir`: Path to git repository. When not provided, **current working directory** will be used as as default.\n- `--clean`: Determine if the working directory is clean and if it is not clean, exit.\n- `--output`: Changelog file name to create or update. Defaults to `CHANGELOG.md` and resolved relative to dir. Use `--no-output` to write to console only.\n- `--noAuthors`: Skip contributors section in changelog.\n- `--bump`: Determine semver change and update version in `package.json`.\n- `--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`. You can enable the automatic push of the new tag and release commit to your git repository by adding `--push`.\n- `--publish`. Publishes package as a new version on `npm`. You will need to set authorisation tokens separately via `.npmrc` or environment variables.\n- `--publishTag` Use custom npm tag for publishing (Default is `latest`)\n- `--nameSuffix`: Adds suffix to package name (Example: `--nameSuffix canary` renames `foo` to `foo-canary`)\n- `--versionSuffix`: Adds suffix to package version. When set without value or to `true`, uses date + commit hash as commit\n- `--canary`. Shortcut to `--bump --versionSuffix` (`--nameSuffix` will be also added if arg has a string value).\n- `-r`: Release as specific version.\n- `--major`: Bump as a semver-major version\n- `--minor`: Bump as a semver-minor version\n- `--patch`: Bump as a semver-patch version\n- `--premajor`: Bump as a semver-premajor version, can set id with string.\n- `--preminor`: Bump as a semver-preminor version, can set id with string.\n- `--prepatch`: Bump as a semver-prepatch version, can set id with string.\n- `--prerelease`: Bump as a semver-prerelease version, can set id with string.\n- `--hideAuthorEmail`: Do not include author email in changelog if github username cannot be found.\n\n\u003e [!NOTE]\n\u003e Version numbers starting with `0.` or `0.0.` follow different rules.\n\u003e\n\u003e In these cases, the second or third digit is treated as the major version. They use the formats `0.major.minor` and `0.0.major` instead of the standard `major.minor.patch`.\n\u003e\n\u003e To ensure consistent semantic versioning, start version numbering at `1.0.0`.\n\n### `changelogen gh release`\n\nChangelogen has built-in functionality to sync with Github releases.\n\nIn order to manually sync a release, you can use `changelogen gh release`. It will parse current `CHANGELOG.md` from current repository (local, then remote) and create or update releases.\n\nUsage:\n\n```sh\nnpx changelogen@latest gh release [all|versions...] [--dir] [--token]\n```\n\nTo enable this integration, make sure there is a valid `repository` field in `package.json` or `repo` is set in `.changelogenrc`.\n\nBy default in unauthenticated mode, changelogen will open a browser link to make manual release. By providing github token, it can be automated.\n\n- Using environment variables or `.env`, use `CHANGELOGEN_TOKENS_GITHUB` or `GITHUB_TOKEN` or `GH_TOKEN`\n- Using CLI args, use `--token \u003ctoken\u003e`\n- Using global configuration, put `tokens.github=\u003ctoken\u003e` inside `~/.changlogenrc`\n- Using [GitHub CLI](https://cli.github.com/) token when authenticated with `gh auth login`\n\n## Configuration\n\nConfiguration is loaded by [unjs/c12](https://github.com/unjs/c12) from cwd. You can use either `changelog.config.json`, `changelog.config.{ts,js,mjs,cjs}`, `.changelogrc` or use the `changelog` field in `package.json`.\n\nSee [./src/config.ts](./src/config.ts) for available options and defaults.\n\n## 💻 Development\n\n- Clone this repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js \u003c 16.10)\n- Install dependencies using `pnpm install`\n- Run interactive tests using `pnpm dev`\n\n## License\n\nMade with 💛\n\nPublished under [MIT License](./LICENSE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/changelogen?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[npm-version-href]: https://npmjs.com/package/changelogen\n[npm-downloads-src]: https://img.shields.io/npm/dm/changelogen?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[npm-downloads-href]: https://npmjs.com/package/changelogen\n[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/changelogen/main?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[codecov-href]: https://codecov.io/gh/unjs/changelogen\n[license-src]: https://img.shields.io/github/license/unjs/changelogen.svg?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[license-href]: https://github.com/unjs/changelogen/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funjs%2Fchangelogen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funjs%2Fchangelogen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funjs%2Fchangelogen/lists"}