auto
auto copied to clipboard
Error combining magic-zero with either npm or conventional-commits
Describe the bug
When adding the magic-zero
plugin, and either or both npm
or conventional-commits
, Auto fails with a traceback claiming the config file has not loaded.
To Reproduce
Set the following in your auto.config.js file (after installing the necessary plugins with npm):
plugins: [
"magic-zero",
"npm",
],
Or:
plugins: [
"conventional-commits",
"magic-zero",
],
Then run any Auto command, like auto version
or auto shipit --dry-run
Expected behavior
I'd expect the magic-zero behavior (translating 'minor' to the third integer and 'major' to the second when the first is 0
) would be combined with either npm
versions or the conventional-commit version bump calculations.
Instead, the follow error is printed:
$ auto version
Error: Auto is not initialized! Make sure the have run Auto.loadConfig
at Auto.createErrorMessage (/.../node_modules/@auto-it/core/src/auto.ts:2038:12)
at Auto.prefixRelease (/.../node_modules/@auto-it/core/src/auto.ts:2028:18)
at getPreviousVersion (/.../node_modules/@auto-it/npm/src/index.ts:296:16)
When magic-zero
is removed, or all plugins other than magic-zero
are removed, it runs successfully without a traceback.
Environment information:
"auto" version: v10.25.0
"git" version: v2.24.3 (Apple Git-128)
"node" version: v14.16.0
GHE version: v2.22.7
(Issue also occurred on Node 12.x and 10.x.)