GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(changelog): allow overriding the changelog context by lyn1dev · Pull Request #370 · absolute-version/commit-and-tag-version

Conversation

@lyn1dev

@lyn1dev lyn1dev commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Problem

The changelog generator's context was passed as a fixed object:

.context({ version: newVersion })

Because of that, the values the changelog template renders from could not be
changed. For example, setting linkCompare: false or linkReferences: false (or
the commitUrlFormat/compareUrlFormat templates to an empty string, as in
#216) had no effect: the version heading, commit hashes and closes #123
references were still rendered as links.

Change

A new context option is merged into the generator context:

.context({ ...args.context, version: newVersion })

It can be set in .versionrc / the commit-and-tag-version key of
package.json:

{
  "commit-and-tag-version": {
    "context": {
      "linkCompare": false,
      "linkReferences": false
    }
  }
}

version stays authoritative, since it is the version being released. The
option is documented in the "Customizing CHANGELOG Generation" section of the
readme.

Testing

  • Added test/changelog-context.integration-test.js, which runs the CLI against
    a real temporary git repository (with a v1.0.0 tag and a feat: commit) and
    a package.json carrying a repository url:
    • the default run still links the compare range and the commit hash;
    • with context: { linkCompare: false, linkReferences: false }, the changelog
      is generated without the compare range and commit-hash links.
  • npx vitest run test/changelog-context.integration-test.js:
    • without the change to lib/lifecycles/changelog.js: 1 failed | 1 passed
      (applies the configured context to the changelog fails, the default case
      passes);
    • with the change: 2 passed.
  • npm test (vitest with coverage, then eslint . and
    prettier "./**/*.{ts,js}" --check): 15 test files, 163 tests passed; lint and
    format checks clean.

Fixes #216

AI was used to write this code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lyn1dev
feat(changelog): allow overriding the changelog context
5bfb954
The changelog generator context was fixed to the version being released, so
values the template renders from (such as linkCompare and linkReferences)
could not be changed. Merge a configured context into it, keeping the version
authoritative.
TimothyJones
TimothyJones requested changes Nov 24, 2026
View reviewed changes
Comment thread README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@TimothyJones
Update README.md
6f0a02f
TimothyJones
TimothyJones approved these changes Nov 24, 2026
View reviewed changes
@TimothyJones
TimothyJones merged commit f4be71f into absolute-version:master Nov 24, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@TimothyJones

TimothyJones commented Nov 24, 2026

Copy link
Copy Markdown
Member

Thanks for this! I'll get it released shortly

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
chore(master): release 13.4.0 #369
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TimothyJones TimothyJones TimothyJones approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Is there a way to disable compare and commit urls?

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lyn1dev @TimothyJones
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.