Skip to content

feat!(oxvg): #177 support dot-config#178

Merged
noahbald merged 1 commit intomainfrom
feat/177-update-config-loading
Sep 23, 2025
Merged

feat!(oxvg): #177 support dot-config#178
noahbald merged 1 commit intomainfrom
feat/177-update-config-loading

Conversation

@noahbald
Copy link
Owner

@noahbald noahbald commented Sep 23, 2025

Adds support for loading oxvg configuration from common dot-config sources, e.g. ~/.config/oxvg

Closes #177

Description

Replaces config with etcetera for lighter-weight and more extensive config resolution. Previously the config would only be picked up from cwd, the config can now also be loaded from common dot-file sources.

Motivation and Context

This allows users to easily provide a common configuration when using oxvg in various places.

How Has This Been Tested?

Running oxvg optimise --config to preview each situation

  • Created a config at ./oxvgrc.json
  • Created a config at ~/.config/oxvg/config.json.
  • Tested with a malformed config.
  • Tested with no configs (i.e. default config)

Types of changes

Features

  • Config can be loaded from ~/.config/oxvg/config.json on XDG/Unix, ~/Library/Preferences/oxvg/config.json on Apple, and ~\AppData\Roaming\oxvg\config.json on Windows.

Breaking changes

  • json5 no longer supported
  • Panics when resolved config is malformed

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@noahbald noahbald self-assigned this Sep 23, 2025
@noahbald noahbald merged commit 9be92b6 into main Sep 23, 2025
20 of 21 checks passed
@noahbald noahbald deleted the feat/177-update-config-loading branch September 23, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default location for config file

1 participant