Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 25, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
io.github.xxfast:kstore-storage (source) 0.8.0 -> 0.9.1 age adoption passing confidence
io.github.xxfast:kstore-file (source) 0.8.0 -> 0.9.1 age adoption passing confidence
io.github.xxfast:kstore (source) 0.8.0 -> 0.9.1 age adoption passing confidence

Release Notes

xxfast/KStore (io.github.xxfast:kstore-storage)

v0.9.1

Compare Source

What's Changed

New Contributors

Full Changelog: xxfast/KStore@0.9.0...0.9.1

v0.9.0

Compare Source

What's Changed

New Contributors

Full Changelog: xxfast/KStore@0.8.0...0.9.0

⚠️ Breaking Changes

  1. Bump kstore to 0.9.0 and remove okio from your dependencies from your libs.version.toml
[versions]
-  kstore = "0.8.0"
+  kstore = "0.9.0"
-  okio = "3.6.0"
  1. If you are using kstore-file, migrate to kotlinx-io's Path from okio's .toPath()
-  import okio.Path.Companion.toPath
+  import kotlinx.io.files.Path 

- val store: KStore<Pet> = storeOf(file = "saved.json".toPath())
+ val store: KStore<Pet> = storeOf(file = Path("saved.json"))
  1. On iOS - Remove the use of experimental DocumentDirectory API, and use NSFileManager directly
-  val filesDir: String = NSFileManager.defaultManager.DocumentDirectory?.relativePath
+  val filesUrl: NSURL? = fileManager.URLForDirectory(
+    directory = NSDocumentDirectory,
+    appropriateForURL = null,
+    create = false,
+    inDomain = NSUserDomainMask,
+    error = null
+  )
+
+  val path: String = requireNotNull(filesUrl?.path) { "Documents directory not found" }

-  val files = filesDirectory.toPath()
+  val files = Path(path)
  1. On Desktop - If you are using harawata/appdirs, make sure to create those directories if they don't already exist. The store won't create them for you
+  val filesDir: String = AppDirsFactory.getInstance()
+    .getUserDataDir("io.github.xxfast.nytimes", "1.0.0", "xxfast") // or whereever

+  val path = Path(filesDir)
+  with(SystemFileSystem) { if(!exists(path)) createDirectories(path) }

val store: KStore<Pet> = storeOf(file = path)

Example Migration

xxfast/NYTimes-KMP@6eaa4a1

Full Documentation

https://xxfast.github.io/KStore/overview.html


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@TheReprator TheReprator merged commit 4a90db1 into main Nov 25, 2024
1 of 5 checks passed
@TheReprator TheReprator deleted the renovate/kstore branch November 25, 2024 21:37
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.

2 participants