Skip to content

Commit b91c297

Browse files
sarahdayanclaude
andcommitted
fix: spread parserOpts and writerOpts to avoid immutable object error
The preset config objects may be frozen. Create shallow copies before passing to conventional-changelog-core to avoid "Cannot modify immutable object" error. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 447dd87 commit b91c297

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/shipjs/src/step/prepare/updateChangelog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ function runConventionalChangelog({
169169
args,
170170
templateContext,
171171
{ ...gitRawCommitsOpts, path: dir },
172-
parserOpts,
173-
writerOpts,
172+
parserOpts ? { ...parserOpts } : undefined,
173+
writerOpts ? { ...writerOpts } : undefined,
174174
{ path: dir, cwd: dir }
175175
).on('error', reject);
176176

0 commit comments

Comments
 (0)