Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog-templater #1222

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,122 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.X.X] - Month, XX, 202X

### React

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Core

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Documentation

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Figma

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Sketch/Abstract

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Hds-js

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

## [3.5.0] - February, 6, 2024

### React
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"start:core": "lerna run --scope hds-core start",
"start:react": "lerna run --scope hds-react start",
"release": "lerna publish from-package --yes",
"update-versions": "lerna version --exact --no-git-tag-version --no-push --amend --yes"
"update-versions": "lerna version --exact --no-git-tag-version --no-push --amend --yes",
"update-changelog": "node ./scripts/changelog/update-changelog.js"
},
"devDependencies": {
"lerna": "^7.0.1",
Expand Down
116 changes: 116 additions & 0 deletions scripts/changelog/CHANGELOG.template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
## [3.X.X] - Month, XX, 202X

### React

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Core

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Documentation

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Figma

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Sketch/Abstract

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

### Hds-js

#### Breaking

- [Component] What are the breaking changes?

#### Added

- [Component] What is added?

#### Changed

Changes that are not related to specific components
- [Component] What has been changed

#### Fixed

- [Component] What bugs/typos are fixed?

13 changes: 13 additions & 0 deletions scripts/changelog/update-changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This takes the CHANGELOG.md and prepends the CHANGELOG.template.md to it.
*/

const fs = require('fs');
const changeLogFile = './CHANGELOG.md';

const old = fs.readFileSync(changeLogFile, 'utf8');
const template = fs.readFileSync('./scripts/changelog/CHANGELOG.template.md', 'utf8');
const latestVersionPosition = old.indexOf('## [');
changeLogWithTemplate = old.substring(0, latestVersionPosition) + template + old.substring(latestVersionPosition);

fs.writeFileSync(changeLogFile, changeLogWithTemplate);
Loading