CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-conventional-changelog-writer

Write logs based on conventional commits and templates.

85

1.00x
Overview
Eval results
Files

task.mdevals/scenario-5/

Changelog Date Formatter

A tool that generates formatted changelog entries with proper date and timezone display.

Capabilities

Date Formatting in Different Timezones

You need to build a changelog generator that formats commit entries with release dates displayed in the appropriate timezone. The tool should accept commit data and context information to generate a formatted changelog string.

  • Given commits with type "feat" and context including version "1.0.0", date "2024-01-15", and timezone "America/New_York", the generated changelog displays the date in Eastern Time format @test
  • Given commits with type "fix" and context including version "1.1.0", date "2024-03-20", and timezone "Europe/London", the generated changelog displays the date in London timezone format @test
  • Given commits with type "feat" and context including version "2.0.0", date "2024-06-10", and timezone "UTC", the generated changelog displays the date in UTC format @test

Multiple Release Blocks with Different Dates

The generator should support creating separate changelog blocks for different releases, each with its own date and timezone information.

  • Given commits from two different versions (1.0.0 on 2024-01-15 and 1.1.0 on 2024-02-20), both with timezone "UTC", the generated changelog contains two separate blocks with correct dates for each version @test

Implementation

@generates

API

/**
 * Generates a formatted changelog string from commit data and context information.
 *
 * @param {Array} commits - Array of commit objects with properties: hash, type, scope, subject
 * @param {Object} context - Context object with properties: version, date (string), timeZone (string), title
 * @returns {Promise<string>} A formatted changelog string with properly formatted dates
 */
async function generateChangelog(commits, context) {
  // IMPLEMENTATION HERE
}

module.exports = { generateChangelog };

Dependencies { .dependencies }

conventional-changelog-writer { .dependency }

Provides changelog generation from structured commit data with context variables for dates and timezones.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-conventional-changelog-writer

tile.json