Conversation
martnpaneq
reviewed
Sep 15, 2025
| } | ||
|
|
||
| options = Object.assign( options, callOptions ); | ||
| const options = { |
Contributor
There was a problem hiding this comment.
I like that you refactored the code to use the immutable object creation pattern to create options.
martnpaneq
reviewed
Sep 15, 2025
| */ | ||
| module.exports = function getOptions( callOptions, cwd ) { | ||
| const mrgitJsonPath = path.resolve( cwd, 'mrgit.json' ); | ||
| module.exports = function getOptions( callOptions, cwd = process.cwd() ) { |
Contributor
There was a problem hiding this comment.
Is cwd needed as an argument right now? It is not being used.
Contributor
Author
There was a problem hiding this comment.
This cwd parameter is required in tests 😒
Contributor
Author
There was a problem hiding this comment.
I decided that refactoring the tests was too much to do in this PR, so ¯\(ツ)/¯.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🚀 Summary
Introduced
--configCLI parameter which allows providing custom configuration filename that will be used instead of the defaultmrgit.jsonfile.📌 Related issues
💡 Additional information
My test cases:
Create custom
mrgit-custom.jsonconfiguration file in this repository. Below you can find my example configuration:{ "packages": "external/", "$rootRepository": "cksource/mrgit", "dependencies": { "ckeditor5-dev": "ckeditor/ckeditor5-dev", "ckeditor5-linters-config": "ckeditor/ckeditor5-linters-config" }, "presets": { "dev": { "$rootRepository": "cksource/mrgit", "ckeditor5-dev": "ckeditor/ckeditor5-dev", "ckeditor5-linters-config": "ckeditor/ckeditor5-linters-config" } } }Execute
mrgitcommands:node index.js- new--configCLI parameter is defined.node index.js sync- throws "Cannot find the configuration file." error.node index.js sync --config mrgit-custom.json- clones repositories into./externaldirectory.node index.js save --config mrgit-custom.json --preset dev- stores hashes inmrgit-custom.jsonfile in thedevpreset.