Skip to content
Open
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 2022
},
"rules": {
"no-console": "off"
Expand Down
84 changes: 83 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Used internally by OneBlink to release repositories quickly and consistently

- [Node.js](https://nodejs.org/) 20.0 or newer
- NPM 10.0 or newer
- See recommendation from [package-diff-summary](https://github.com/jokeyrhyme/package-diff-summary.js#github_oauth_token) regarding [GitHub API Rate Limiting](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting)

## Installation

Expand All @@ -29,3 +28,86 @@ Run the following command for usage information
```sh
oneblink-release --help
```

## Changelog Automation

To avoid constant merge conflicts with the `CHANGELOG.md` file. The Release CLI can automate changelog entries by allow developers to create a single file for each change entry (or a as many entries as the developer would like to add in that single file). Start by creating a directory called: `changelog-entries` in the root of the repository and add a `.keep` file to the directory, like so:

```
|- changelog-entries/
|- .keep
|- src/
|- index.js
|- .gitignore
|- package.json
|- README.md
```

The `.keep` file will simply prevent the directory from being removed from source control after each release.

Each time a developer wants to add an entry to the changelog as part of the current release, create a file in the `changelog-entries` directory. The file must adhere to the [keepachangelog](https://keepachangelog.com/) format.

Files can have as many entries as desired, however it is recommended to keep entries small to avoid merge conflicts with other developers.

**All of the entry files will be removed as part of the release.**

### Example Changelog Entry Files

The following two files:

- `kitchen-sink.md`

````md
### Changed

- the supported NodeJS version
- the name of a function. See the change below to migrate to the new function:
```diff
-thisIsTheOldFunction()
+thisIsTheNewFunction()
```

### Removed

- something that was not being used anymore

### Added

- a new feature

### Fixed

- a bug
````

- `my-additions.md`

```md
### Added

- a really simple feature
```

Would result in the following change entry:

### Changed

- the supported NodeJS version
- the name of a function. See the change below to migrate to the new function:
```diff
-thisIsTheOldFunction()
+thisIsTheNewFunction()
```

### Removed

- something that was not being used anymore

### Added

- a new feature
- a really simple feature

### Fixed

- a bug
Empty file added changelog-entries/.keep
Empty file.
4 changes: 4 additions & 0 deletions changelog-entries/changelog-automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- changelog automation from a `changelog-entries` directory
- `oneblink-release changelog-preview` command
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('jest').Config}
*/
/** @type {import('jest').Config} */
const config = {
preset: 'ts-jest',
testEnvironment: 'node',
Expand All @@ -11,6 +9,8 @@ const config = {
'ts-jest',
{
useESM: true,
isolatedModules: true,
tsconfig: './test/tsconfig.json',
},
],
},
Expand Down
Loading
Loading