feat: add support for additional release configuration file formats
Presentation
The supported ways to supply configuration are:
- A
.releasercfile, written in YAML or JSON, with optional extensions:.yaml/.yml/.json/.js/.cjs/.mjs- A
release.config.(js|cjs|.mjs)file that exports an object- A
releasekey in the project'spackage.jsonfile
This MR extends existing support with .releaserc.(cjs|mjs) and release.config.(js|cjs|mjs) as well as fixes an existing error with .releaserc.js.
JavaScript config files are serialized to JSON at detection time using node -pe, so downstream YAML processing works unchanged. .mjs files require Node.js ≥ 22.12.0 (satisfied by the default node:lts-slim image).
Closes #69 (closed)
Checklist
- General:
[ ] use rules instead of only/except[ ] optimized cache configuration (wherever applicable)
- Publicly usable:
[ ] untagged runners[ ] no proxy configuration but supporthttp_proxy/https_proxy/no_proxy[ ] no custom CA certificate(s) but supports$CUSTOM_CA_CERTSor$DEFAULT_CA_CERTSto declare custom CA certificate(s)[ ] internet hostnames/urls only
- Used Docker images:
[ ] public images[ ] official images (when possible)[ ]latesttag (when possible)
- Documented:
-
README.mddocuments the new feature [ ]kicker.jsondescribes the new feature
-
- Tested & examplified:
- (url to a project sample successfully using the new feature)
Edited by Mikael Karon