Skip to content
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## [0.28.2](https://github.com/algolia/shipjs/compare/v0.28.1...v0.28.2) (2026-02-05)


### Bug Fixes

* **changelog:** handle frozen commit objects from conventional-changelog-writer ([4a65f39](https://github.com/algolia/shipjs/commit/4a65f39eac7d7d68f838dfeda82423fc48bb5fbe))
* pass preset parserOpts and writerOpts to conventional-changelog ([#1045](https://github.com/algolia/shipjs/issues/1045)) ([447dd87](https://github.com/algolia/shipjs/commit/447dd87c8e95155464d543fb79849d55d4996adb))
* spread parserOpts and writerOpts to avoid immutable object error ([b91c297](https://github.com/algolia/shipjs/commit/b91c297a75d219879ba87f1f23d0dd40e18b6b52))



## [0.28.1](https://github.com/algolia/shipjs/compare/v0.28.0...v0.28.1) (2026-02-05)

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.28.1",
"version": "0.28.2",
"npmClient": "yarn",
"packages": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.28.1",
"version": "0.28.2",
"scripts": {
"postinstall": "patch-package",
"prepare": "yarn build",
Expand Down
2 changes: 1 addition & 1 deletion packages/shipjs-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shipjs-lib",
"version": "0.28.1",
"version": "0.28.2",
"description": "Take control of what is going to be your next release.",
"main": "dist/index.esm.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/shipjs-lib/src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '0.28.1';
export default '0.28.2';
4 changes: 2 additions & 2 deletions packages/shipjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shipjs",
"version": "0.28.1",
"version": "0.28.2",
"description": "Take control of what is going to be your next release.",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -51,7 +51,7 @@
"prettier": "^3.5.3",
"serialize-javascript": "^6.0.2",
"shell-quote": "^1.8.2",
"shipjs-lib": "0.28.1",
"shipjs-lib": "0.28.2",
"temp-write": "^6.0.0",
"tempfile": "^5.0.0"
},
Expand Down
22 changes: 20 additions & 2 deletions packages/shipjs/src/step/prepare/updateChangelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ export async function prepareParams({
return { args, gitRawCommitsOpts, templateContext };
}

// Wraps a transform function to clone commits before modification.
// This is needed because conventional-changelog-writer freezes commit objects,
// but presets like angular expect to mutate them.
function wrapTransform(originalTransform) {
if (!originalTransform) {
return undefined;
}

return (commit, context) => {
const mutableCommit = JSON.parse(JSON.stringify(commit));

return originalTransform(mutableCommit, context);
};
}

function runConventionalChangelog({
args,
templateContext,
Expand All @@ -165,12 +180,15 @@ function runConventionalChangelog({
}

const { parserOpts, writerOpts } = args.config || {};
const wrappedWriterOpts = writerOpts
? { ...writerOpts, transform: wrapTransform(writerOpts.transform) }
: undefined;
const changelogStream = conventionalChangelogCore(
args,
templateContext,
{ ...gitRawCommitsOpts, path: dir },
parserOpts,
writerOpts,
parserOpts ? { ...parserOpts } : undefined,
wrappedWriterOpts,
{ path: dir, cwd: dir }
).on('error', reject);

Expand Down
2 changes: 1 addition & 1 deletion packages/shipjs/src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '0.28.1';
export default '0.28.2';