Skip to content

fix: persist unit preferences in config directory instead of package directory#2454

Open
motamman wants to merge 3 commits intoSignalK:masterfrom
motamman:persist-default-settings
Open

fix: persist unit preferences in config directory instead of package directory#2454
motamman wants to merge 3 commits intoSignalK:masterfrom
motamman:persist-default-settings

Conversation

@motamman
Copy link
Contributor

  • Unit preferences config, custom definitions, custom categories, and custom presets were being
    read from and written to the npm package directory (node_modules/signalk-server/unitpreferences/), causing all customizations to be lost on upgrade
    • On global installs (e.g. sudo npm install -g), the server process couldn't write to the root-owned package directory at all, resulting in 500 errors when saving preferences.
    • Mutable files are now read from and written to ~/.signalk/unitpreferences/, with built-in presets and standard definitions still served from the package directory
    • On first run, the config directory is created and seeded with defaults from the package

@tkurki ... this one is entirely on me. Can you look over my shoulder?

@tkurki tkurki added the fix label Mar 16, 2026
@tkurki
Copy link
Member

tkurki commented Mar 16, 2026

Draft by accident or on purpose?

@motamman motamman marked this pull request as ready for review March 16, 2026 18:47
@motamman
Copy link
Contributor Author

Draft by accident or on purpose?

accident

@tkurki tkurki added this to the 2.24 milestone Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants