New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local plugin and parameters #1031
Comments
You can try quoting:
|
Which solution worked @LastDragon-ru ? I've a similar case with local plugins but quotes annotations doesn't affect modules load. ./release/.release-it.json {
"plugins": {
"./release/calver-plugin.js": {
"format": "yyyy.0M.0D",
"increment": "calendar",
"rcIncrement": "calendar.rc",
"fallbackIncrement": "calendar",
"candidate": false
},
"@release-it/bumper": {
"in": ["package.json"],
"out": ["package.json"]
},
"./release/generate-changelog-plugin.js": {}
}
} ./package.json "release-candidate": "release-it --ci --config ./release/.release-it.json --plugins./release/calver-plugin.js.candidate=true", I can't find an effective annotation to configure my "candidate" argument. |
|
In the example "release-candidate": "release-it '--plugins../release/calver-plugin.js.candidate'" You'd need to fiddle a bit with the dots and the quotes to get it right. Here, dots are object key separators, but also path segments. Use |
Yes, I didn't quote the command in the package.json but I was able to test with your first answer and nothing helped. More precisely, I see in the debug that it's the .js extension that's causing the problem, precisely because the dot is a separator and a segment of the path. $ release-it --debug --ci --config ./release/.release-it.json '--plugins./release/calver-plugin.js.candidate'
Add more dot before extension will add more sub-object in configuration. |
Maybe you can omit the Either way, it's something I might be able to handle/fix in release-it core. |
No, unfortunately I can't. ESM does not allow you to import the module without the extension |
Feel free to take a stab at it btw, happy to review PRs. |
I have a local plugin:
It is added to config and it is work
But I cannot find a way to pass parameters to it :( When I try to pass
--plugins.<name>.param
it just fail withError: Cannot find module '<name>'
. I have tried--plugins.dump.param=455
,--plugins.Dump.param=455
,--plugins../.release-it/plugins/Dump.mjs.param=455
,--plugins./.release-it/plugins/Dump.mjs.param=455
, but nothing work.I'm doing something wrong or maybe it just not supported yet?
The text was updated successfully, but these errors were encountered: