Bladeren bron

chore: update userutils

Sv443 1 jaar geleden
bovenliggende
commit
d85e3ae215
3 gewijzigde bestanden met toevoegingen van 8 en 8 verwijderingen
  1. 4 4
      package-lock.json
  2. 1 1
      package.json
  3. 3 3
      src/config.ts

+ 4 - 4
package-lock.json

@@ -9,7 +9,7 @@
       "version": "1.1.1",
       "license": "AGPL-3.0-only",
       "dependencies": {
-        "@sv443-network/userutils": "^6.0.0",
+        "@sv443-network/userutils": "^6.0.1",
         "fuse.js": "^7.0.0",
         "marked": "^12.0.0",
         "nanoevents": "^9.0.0"
@@ -600,9 +600,9 @@
       ]
     },
     "node_modules/@sv443-network/userutils": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/@sv443-network/userutils/-/userutils-6.0.0.tgz",
-      "integrity": "sha512-7+sN92zRTZASs73ZThUx3CLICbrO2sg8r0sO9SK5ipyYcrUt0SmJ3/CWpP1W9MrYRkU35spRKeFeeOlnOqn75g=="
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/@sv443-network/userutils/-/userutils-6.0.1.tgz",
+      "integrity": "sha512-dWx3oTKGJ5DfSdQ2H4W9pnvp752QNuKj2yOxl/o8utEK8U8qArgpQT6FIRd3BpijcmATNE+wYyOkhBBPI31K+g=="
     },
     "node_modules/@tsconfig/node10": {
       "version": "1.0.9",

+ 1 - 1
package.json

@@ -57,7 +57,7 @@
     "openuserjs": "https://openuserjs.org/scripts/Sv443/BetterYTM"
   },
   "dependencies": {
-    "@sv443-network/userutils": "^6.0.0",
+    "@sv443-network/userutils": "^6.0.1",
     "fuse.js": "^7.0.0",
     "marked": "^12.0.0",
     "nanoevents": "^9.0.0"

+ 3 - 3
src/config.ts

@@ -1,4 +1,4 @@
-import { DataStore, compress, type ConfigMigrationsDict, decompress } from "@sv443-network/userutils";
+import { DataStore, compress, type DataMigrationsDict, decompress } from "@sv443-network/userutils";
 import { featInfo } from "./features/index";
 import { compressionSupported, info, log } from "./utils";
 import { emitSiteEvent } from "./siteEvents";
@@ -9,7 +9,7 @@ import { emitInterface, getFeaturesInterface } from "./interface";
 /** If this number is incremented, the features object data will be migrated to the new format */
 export const formatVersion = 5;
 /** Config data format migration dictionary */
-export const migrations: ConfigMigrationsDict = {
+export const migrations: DataMigrationsDict = {
   // 1 -> 2
   2: (oldData: Record<string, unknown>) => {
     const queueBtnsEnabled = Boolean(oldData.queueButtons);
@@ -53,7 +53,7 @@ export const migrations: ConfigMigrationsDict = {
     "rememberSongTimeMinPlayTime", "volumeSharedBetweenTabs",
     "setInitialTabVolume", "initialTabVolumeLevel",
   ], oldData),
-} as const satisfies ConfigMigrationsDict;
+} as const satisfies DataMigrationsDict;
 // TODO: once advanced filtering is fully implemented, clear cache on migration (to v6)
 
 /** Uses the passed {@linkcode oldData} as the base (if given) and sets all passed {@linkcode keys} to their feature default - returns a copy of the object */