Open davidsneighbour opened 3 months ago
change .versionrc.js
to .versionrc.cjs
.
this package support cjs extension
Oops, I have mistook the issue as about "supporting Package type=module environment". My suggestion above isn't that relevant then.
I have checked the source code, mjs is not supported as the config is always imported via require
. See: https://github.com/absolute-version/commit-and-tag-version/blob/7ebdacd6edd26076eabed753cdcf3070142f5f0d/lib/configuration.js#L19-L20
I guess this would be a feature request.
Off the top of my head, it will need to use dynamic import to load an ESM config and making the code flow async.
I agree, I think this is a feature request. It would definitely be good to have the ability to use ESM for the config.
I believe it would (almost) come for free if we upgraded it to typescript, so I'll tag #29
I don't know if this is a bug or maybe a future feature: using a config that is in the ESM format leads to errors:
Does the package understand the config in ESM format and if not is it possible to add this as a feature?