Skip to content

Latest commit

 

History

History
341 lines (222 loc) · 15.3 KB

File metadata and controls

341 lines (222 loc) · 15.3 KB

Changelog

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.

Added

  • Add --formatter option and support Oxfmt for formatting changelog (#283, #285)
    • The oxfmt and prettier formatters are now available through the API as well.

Added

  • Add --checkDeps flag to validate command for dependency bump changelog validation (#267)
    • Compares dependencies and peerDependencies in package.json between git refs to detect version changes
    • With --fix --currentPr <number>, automatically adds missing changelog entries
    • Additional CLI options: --fromRef, --toRef, --remote, --baseBranch
  • Add dependencyBump support to Changelog class with addChange() and new updateChange() method (#267)
  • Detect Bump, Update, and Upgrade forms of dependency bump entries when parsing changelogs (#267)
  • Export getDependencyChanges, BaseRefNotFoundError, DependencyBump, DependencyCheckResult, and MissingDependencyEntriesError from package entry point (#267)

Changed

  • BREAKING: Throw error if any release section has no changelog entries (#275)

Fixed

  • Force fetch tags (#273)

Fixed

  • Fixed problems with validate on Windows with CRLF (#269)

Added

  • Add --requirePrNumbers flag to auto-changelog update CLI 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 updateChangelog function also supports this option via the requirePrNumbers parameter

Added

  • 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

Added

  • Add --useChangelogEntry to auto-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 the no-changelog label is present on the PR)
    • Note that GITHUB_TOKEN must be set in order to use this option
    • The updateChangelog function also supports this option
  • Add --useShortPrLink to auto-changelog update (#247)
    • This will generate short references to PRs, e.g. #123 instead of [#123](https://some/repo)
    • The updateChangelog function also supports this option

Changed

  • Update auto-changelog update --autoCategorize to 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:
      • style
      • refactor
      • test
      • build
      • ci
      • release
    • If commit messages have the following phrases they will not be automatically added to the changelog:
      • Bump main version to
      • changelog
      • cherry-pick
      • cp-
      • e2e
      • flaky test
      • INFRA-
      • merge
      • New Crowdin translations

Fixed

  • Fix --autoCategorize so that commit messages with Conventional Commit prefixes are categorized correctly when the prefix contains a scope (e.g. feat(scope): ...) (#240)

Fixed

  • Fix CLI path (#235)

Added

  • 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-links to the CLI, or pass ensureValidPrLinksPresent to validateChangelog to enable this behavior, ideally in your lint package script or CI workflow
  • Add an optional shouldExtractPrLinks option to parseChangelog (#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.getReleaseChanges below for more

Changed

  • BREAKING: Changelog.getReleaseChanges now returns an object whose values are objects of shape { description: string; prNumbers: string[] } rather than simply string (the description) (#222)
    • This affects parseChangelog as well, since it returns an instance of Changelog
  • 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-changelog and @metamask/auto-changelog/package.json

Added

  • Add --autoCategorize flag to update command (#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") and fix (which routes to "Fixed").

Changed

  • 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.

Added

  • 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.

Changed

  • Place this library under the MIT / Apache 2.0 dual license (#175)

Fixed

  • Remove circular dependency on @metamask/utils (#170)

Fixed

  • Add missing dependency @metamask/utils (#168)

Added

  • 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.

Added

  • Add --prettier option for Prettier-formatted changelogs (#155)

Added

  • Add --fix option to validate command (#148)

Added

  • Allow prerelease versions in release headers (#130)

Added

  • Support alternate tag prefixes (#120)

Changed

  • BREAKING: Update minimum Node.js version to v14 (#117)
  • Get package version from manifest (#121)

Fixed

  • When fetching remote tags, order by date to account for miniscule time differences between tags created within automated tests (#113)

Changed

  • Read repository URL from package.json if npm_package_repository_url is not set (#111)
    • This makes this package compatible with Yarn >1.

Added

  • The validate --rc command now ensures there are no uncategorized changes in the current release entry (#102, #106)

Changed

  • Permit missing separating space in "Unreleased" link reference definition (#92)
  • Use execa to execute git commands (#94)
    • This may fix subtle bugs related to git command execution, especially in CI.

Added

  • More exports to index.ts (#86)
    • Specifically, the Changelog class, createEmptyChangelog, and parseChangelog.

Fixed

  • 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.

Added

  • Add init command (#77)

Changed

  • Add @lavamoat/allow-scripts and setup command (#78)
  • Detect all PRs referenced in each change description, rather than just the first (#84)

Fixed

  • 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)

Added

  • Add Changelog.getStringifiedRelease (#73)

Fixed

  • Remove trailing '.git' from default repo URL (#74)

Fixed

  • Prevent old build files from being published (#71)

Added

  • TypeScript types (#59)

Changed

  • (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)

Fixed

  • Release candidate tag validation (#55)
    • The fixed check ensures that there are no existing tags for release candidates.
  • Typo in CLI error message (#65)

Added

  • The initial auto-changelog implementation, adapted from the original auto-changelog.js script in metamask-extension. (#8) Includes the following features:
    • An update command (#26)
    • A validate command (#28)
    • Monorepo support (#41)
    • Configurable repository URL, version, and changelog file path (#33, #31, #30)