All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
--formatteroption and support Oxfmt for formatting changelog (#283, #285)- The
oxfmtandprettierformatters are now available through the API as well.
- The
- Add
--checkDepsflag tovalidatecommand for dependency bump changelog validation (#267)- Compares
dependenciesandpeerDependenciesinpackage.jsonbetween git refs to detect version changes - With
--fix --currentPr <number>, automatically adds missing changelog entries - Additional CLI options:
--fromRef,--toRef,--remote,--baseBranch
- Compares
- Add
dependencyBumpsupport toChangelogclass withaddChange()and newupdateChange()method (#267) - Detect
Bump,Update, andUpgradeforms of dependency bump entries when parsing changelogs (#267) - Export
getDependencyChanges,BaseRefNotFoundError,DependencyBump,DependencyCheckResult, andMissingDependencyEntriesErrorfrom package entry point (#267)
- BREAKING: Throw error if any release section has no changelog entries (#275)
- Force fetch tags (#273)
- Fixed problems with validate on Windows with CRLF (#269)
- Add
--requirePrNumbersflag toauto-changelog updateCLI command for generation-time filtering (#253)- When enabled, commits without PR numbers are filtered out from the changelog
- Disabled by default for backward compatibility
- The
updateChangelogfunction also supports this option via therequirePrNumbersparameter
- Deduplicate commits with no PR number in subject (#254)
- For commits with no PR number in the subject (non-"Squash & Merge" commits), deduplication now checks if exact description text already exists in changelog
- Merge commits are deduplicated using commit body instead of the generic merge subject
- Add
--useChangelogEntrytoauto-changelog update(#247)- This will read the PR referenced in each commit message, look for
CHANGELOG entry:in the PR description, and use this as the new changelog entry in the changelog (or skip if theno-changeloglabel is present on the PR) - Note that
GITHUB_TOKENmust be set in order to use this option - The
updateChangelogfunction also supports this option
- This will read the PR referenced in each commit message, look for
- Add
--useShortPrLinktoauto-changelog update(#247)- This will generate short references to PRs, e.g.
#123instead of[#123](https://some/repo) - The
updateChangelogfunction also supports this option
- This will generate short references to PRs, e.g.
- Update
auto-changelog update --autoCategorizeto exclude entries with certain phrases or Conventional Commit prefixes (#247)- If commit messages have the following prefixes they will not be automatically added to the changelog:
stylerefactortestbuildcirelease
- If commit messages have the following phrases they will not be automatically added to the changelog:
Bump main version tochangelogcherry-pickcp-e2eflaky testINFRA-mergeNew Crowdin translations
- If commit messages have the following prefixes they will not be automatically added to the changelog:
- Fix
--autoCategorizeso that commit messages with Conventional Commit prefixes are categorized correctly when the prefix contains a scope (e.g.feat(scope): ...) (#240)
- Fix CLI path (#235)
- JavaScript sources and TypeScript declarations are now available in both CommonJS- and ESM-compatible variants (#226)
- Add option to changelog validation to ensure that each entry in the changelog links to one or more originating PRs (#222)
- Pass
--pr-linksto the CLI, or passensureValidPrLinksPresenttovalidateChangelogto enable this behavior, ideally in yourlintpackage script or CI workflow
- Pass
- Add an optional
shouldExtractPrLinksoption toparseChangelog(#222)- When true, this will extract pull request links from the text of each entry, identify the pull numbers, and keep them in a separate array
- See note on
Changelog.getReleaseChangesbelow for more
- BREAKING:
Changelog.getReleaseChangesnow returns an object whose values are objects of shape{ description: string; prNumbers: string[] }rather than simplystring(the description) (#222)- This affects
parseChangelogas well, since it returns an instance ofChangelog
- This affects
- BREAKING: Bump minimum Node version to 18.20 (#227)
- BREAKING: Custom subpath imports are no longer supported (#226)
- You may now only import
@metamask/auto-changelogand@metamask/auto-changelog/package.json
- You may now only import
- Add
--autoCategorizeflag toupdatecommand (#212)- When populating the Unreleased section, the tool will look for Conventional Commits prefixes in commit message subjects and place matching commits in corresponding categories automatically.
- Supported prefixes are
feat(which routes to "Added") andfix(which routes to "Fixed").
- BREAKING: Drop support for Node.js <18.18 (#203)
- BREAKING: Require
prettier@>=3.0.0(#202)- Prettier is now a peer dependency of this package.
- BREAKING: Enable Prettier formatting by default (#204)
- Changelogs are now formatted with Prettier by default when using the CLI.
- You can opt-out of this change by specifying
--no-prettier.
-
Retain tag history on update command for renamed packages with new options (#182)
- Introduced --version-before-package-rename and --tag-prefix-before-package-rename options for update command.
- Place this library under the MIT / Apache 2.0 dual license (#175)
- Remove circular dependency on
@metamask/utils(#170)
- Add missing dependency
@metamask/utils(#168)
-
Retain tag history for renamed packages with new validation options (#157)
- Introduced --version-before-package-rename and --tag-prefix-before-package-rename options for validate command.
- Add
--prettieroption for Prettier-formatted changelogs (#155)
- Add
--fixoption to validate command (#148)
- Allow prerelease versions in release headers (#130)
- Support alternate tag prefixes (#120)
- When fetching remote tags, order by date to account for miniscule time differences between tags created within automated tests (#113)
- Read repository URL from package.json if
npm_package_repository_urlis not set (#111)- This makes this package compatible with Yarn >1.
- The
validate --rccommand now ensures there are no uncategorized changes in the current release entry (#102, #106)
- Permit missing separating space in "Unreleased" link reference definition (#92)
- Use
execato execute git commands (#94)- This may fix subtle bugs related to git command execution, especially in CI.
- More exports to index.ts (#86)
- Specifically, the
Changelogclass,createEmptyChangelog, andparseChangelog.
- Specifically, the
- Correctly calculate the most recent git tag (#87)
- Previously, we passed the path to the project root directory as a parameter to an invocation of
git rev-list. For all repositories, this caused most tags belonging to merge commits to be excluded. For monorepos, this also caused tags belonging to commits that didn't change any files belonging to the changelog's package / workspace to be excluded.
- Previously, we passed the path to the project root directory as a parameter to an invocation of
- Add
initcommand (#77)
- Add
@lavamoat/allow-scriptsandsetupcommand (#78) - Detect all PRs referenced in each change description, rather than just the first (#84)
- Fix broken validation and updating when the lowest SemVer release isn't the first chronological release (#76)
- Fix PR number detection in existing change entries (#83)
- Add Changelog.getStringifiedRelease (#73)
- Remove trailing '.git' from default repo URL (#74)
- Prevent old build files from being published (#71)
- TypeScript types (#59)
- (BREAKING) Move Pull Request links to end of change entries (#66)
- Rename files to use snake-case (#64)
- Validate change categories during parsing (#62)
- This causes a validation error to be thrown earlier than previously.
- Migrate to TypeScript (#59)
- Release candidate tag validation (#55)
- The fixed check ensures that there are no existing tags for release candidates.
- Typo in CLI error message (#65)
- The initial
auto-changelogimplementation, adapted from the originalauto-changelog.jsscript inmetamask-extension. (#8) Includes the following features: