Repository navigation
Releases: c2pc/config-migrate
Release list
v1.0.7
Replacer: UUID placeholder
You can now use a ___uuid___ placeholder in config values. It is replaced with a new UUID each time the replacer runs, which is handy for generating unique IDs, tokens, or instance identifiers in configs.
Deprecated keys and migration helpers
Migration logic is extended with “deprecated”-style keys so you can reshape config without losing old data:
_deprecated— copy a value from an old path into a key (e.g. movehostintoserver.host)._deprecated_expand— expand an old array into a list of objects using a template._deprecated_collapse— take an array of objects and collapse one field into a simple array._deprecated_concat— glue several fields (after the above steps) into one string with a template like{0}:{1}._deprecated_replace— force a key to take the new value and ignore the merged old one.
Order of steps is: merge → deprecated → expand → collapse → concat → replace, so you can combine them in one migration (e.g. rename/move with _deprecated, then glue with _deprecated_concat).
INI config support
INI files are now supported as a config format. The driver uses gopkg.in/ini.v1; all values are kept as strings. Use the ini:// scheme (e.g. ini:///path/to/config.ini) the same way you use json:// or yaml://. Migrations for INI should be INI files as well.
v1.0.6
v1.0.5
v1.0.4
- Fixed errors in commits
- Update copyright in LICENSE
Full Changelog: v1.0.4...v1.0.4
v1.0.3
- Fixed bugs
- Made the comments readable
- Added \n between comments
- Renamed config package to driver
- Renamed CommentSuffix
Full Changelog: v1.0.3...v1.0.3
v1.0.2
✨ What's new
- Refactored
mergeMapsfunction to improve performance - Removed use of
reflect.TypeOf, replacing it with faster type assertions - Reduced the number of unnecessary
replace()calls - Improved array and map merging logic
🧪 Testing
- All unit tests passed ✅
- Benchmarks showed ~30-40% performance gains on large nested structures
📚 Related
- Closes #3
Full Changelog: v1.0.2...v1.0.2
v1.0.1
v1.0.0
- YAML and JSON config migrations
- IP, ProjectName, Random replacers
- Add example code
- Fix bugs
Full Changelog: https://github.com/c2pc/config-migrate/commits/v1.0.0