Open eagerestwolf opened 1 year ago
Does using "preset": { "name": "angular" }
(instead of "preset": "angular"
) help?
It does not. The error persists. Also, I pinned npm's version to 7.0.0, and the bug is not present in that version.
prettier-config on main [!] is 📦 v1.0.0 via v18.17.0 took 11s
❯ npm run release -- --changelog
> @garavest/prettier-config@1.0.0 release
> release-it --changelog
✔ git pull
✔ npm run lint
WARNING Environment variable "GITHUB_TOKEN" is required for automated GitHub Releases.
WARNING Falling back to web-based GitHub Release.
ERROR createPreset is not a function
So, looking over the code, it would appear this isn't an issue with your plugin. I wonder if the issue lies with conventional-changelog
? That's the only external import that would be using a preset to the best of my knowledge. Let me check out their issues.
Found it. Sorry for the comment spam. There is a bug in conventional-changelog
. They had an open issue for this. Apparently, it was resolved in a later version.
https://github.com/conventional-changelog/conventional-changelog/issues/1114
If anyone could open a PR for this plugin and update the relevant (or all) dependencies that would be great!
Could this help https://github.com/release-it/conventional-changelog/pull/75 ?
Released v7.0.2, hth!
Hi, even though we updated to the latest version 7.0.2, we are still facing this issue.
Installed deps:
my-app
└─┬ @release-it/conventional-changelog@7.0.2
└── conventional-changelog@5.1.0
Error:
ERROR The "angular" preset does not export a function. Maybe you are using an old version of the preset. Please upgrade.
Did you go from "preset": "angular"
to "preset": { "name": "angular" }
?
Yes, we did. We are using yaml, but tried both yaml and json with the name
prop you've mentioned.
My setup is working fine using version 7.0.2 and the new configuration. I am using the JSON config.
https://github.com/garavest/eslint-config/blob/main/.release-it.json
On Mon, Oct 9, 2023, 2:26 PM Norman Rusch @.***> wrote:
Yes, we did. We are using yaml, but tried both yaml and json with the name prop you've mentioned.
— Reply to this email directly, view it on GitHub https://github.com/release-it/conventional-changelog/issues/70#issuecomment-1753574462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXRIYCKTI7WUMWJDGJMGRDX6RFXBAVCNFSM6AAAAAA4LJGC5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJTGU3TINBWGI . You are receiving this because you authored the thread.Message ID: @.***>
From a small test, I also see now that in our code in the .yaml
file, this code works:
plugins:
'@release-it/conventional-changelog':
preset:
name: conventionalcommits
But this code fails:
plugins:
'@release-it/conventional-changelog':
preset:
name: angular
returning the error ERROR The "angular" preset does not export a function. Maybe you are using an old version of the preset. Please upgrade.
Thank you @silversonicaxel, this is exactly the issue.
So is the angular preset not usable anymore? I can also confirm the ERROR The "angular" preset does not export a function
error and that swapping from angular to conventionalcommits does make it go away.
EDIT: I guess we're waiting on this https://github.com/conventional-changelog/commitlint/issues/3698
Hello @eagerestwolf, release https://github.com/conventional-changelog/commitlint/releases/tag/v18.4.3 should have fixed your issue!
If I understand correctly, the original issue is still not resolved, right? Unfortunately not seeing updates from relevant dependencies atm.
I confirm that upgrading @commitlint/config-conventional
to version ^19.5.0
fixes this issue 👍
Version 7.0.1 of this plugin has a bug that prevents release-it from running at all. When running release-it (presumably in the
after:bump
hook where this plugin should be running) an error will be thrown, saying thatcreatePreset
is not a function. This error exists on my local machine as well as Girhub Actions. I know the issue is this plugin because release-it was working correctly until this plugin was installed. For reference, I have included thepackage.json
,.release-it.json
, and release workflow yaml from one of my projects, as well as the output from release-itpackage.json
.release-it.json
.github/workflows/release.yml
release-it output
This is from Github Actions, but I get an idential error on my local machine.
For the time being, I will try reverting to version 7.0.0 and just ignore the PRs from Dependabot. I mainly just wanted to bring this to your attention.