Skip to content
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

Field overrides fix #450

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.17.3

...

## 0.17.2

- Fix tests, upgrade minor versions of mobx, mobx-state-tree
Expand Down
9 changes: 6 additions & 3 deletions generator/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,19 @@ exports.mergeConfigs = function mergeConfigs(args, config) {
!!args["--useIdentifierNumber"] || config.useIdentifierNumber,
fieldOverrides: args["--fieldOverrides"]
? parseFieldOverrides(args["--fieldOverrides"])
: parseFieldOverrides(config.fieldOverrides),
: config.fieldOverrides
? parseFieldOverrides(config.fieldOverrides)
: [],
dynamicArgs: !!args["--dynamicArgs"] || config.dynamicArgs,
debug: !!args["--debug"] || config.debug,
disableLogColors: !!args["--disableLogColors"] || config.disableLogColors
}
}

const parseFieldOverrides = (fieldOverrides) => {
const _fieldOverrides =
Array.isArray(fieldOverrides) ? fieldOverrides : fieldOverrides.split(",");
const _fieldOverrides = Array.isArray(fieldOverrides)
? fieldOverrides
: fieldOverrides.split(",")

return _fieldOverrides
.map((s) => s.trim())
Expand Down