release-it / conventional-changelog

Conventional changelog plugin for release-it
MIT License
125 stars 38 forks source link

Undefined error in v7.0.1 #71

Closed ShawnZong closed 1 year ago

ShawnZong commented 1 year ago

after pulling the latest version of v7.0.1, we’ve encountered an undefined error in our pipeline, below is the error logs, this problem didn’t exist in v7.0.0. I was wondering is there any compatibility issue with Node18? our node version is v18.16.0

$ npx release-it --ci /var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/conventional-changelog-conventionalcommits/conventionalRecommendedBump.js:30 if (config.preMajor && level < 2) { ^ TypeError: Cannot read properties of undefined (reading 'preMajor') at whatBump (/var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/conventional-changelog-conventionalcommits/conventionalRecommendedBump.js:30:18) at /var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/conventional-recommended-bump/index.js:77:24 at ConcatStream.<anonymous> (/var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/concat-stream/index.js:37:43) at ConcatStream.emit (node:events:525:35) at finishMaybe (/var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/readable-stream/lib/_stream_writable.js:579:14) at endWritable (/var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/readable-stream/lib/_stream_writable.js:594:3) at Writable.end (/var/lang/lib/node_modules/@release-it/conventional-changelog/node_modules/readable-stream/lib/_stream_writable.js:535:22) at Transform.onend (node:internal/streams/readable:705:10) at Object.onceWrapper (node:events:627:28) at Transform.emit (node:events:513:28) Node.js v18.16.0

webpro commented 1 year ago

Does using "preset": { "name": "conventionalcommits" } (instead of "preset": "conventionalcommits") help?

Please use code blocks (not just single backticks), this is unreadable.

ShawnZong commented 1 year ago

Does using "preset": { "name": "conventionalcommits" } (instead of "preset": "conventionalcommits") help?

Please use code blocks (not just single backticks), this is unreadable.

It worked, thanks a lot!