fix: migrating level to classic-level

This commit is contained in:
Chubby Granny Chaser 2025-01-22 00:48:54 +00:00
parent 2aff983dec
commit f387560836
No known key found for this signature in database
4 changed files with 7 additions and 21 deletions

View File

@ -18,7 +18,7 @@ export default defineConfig(({ mode }) => {
build: { build: {
sourcemap: true, sourcemap: true,
rollupOptions: { rollupOptions: {
external: ["better-sqlite3", "level"], external: ["better-sqlite3"],
}, },
}, },
resolve: { resolve: {

View File

@ -47,6 +47,7 @@
"auto-launch": "^5.0.6", "auto-launch": "^5.0.6",
"axios": "^1.7.9", "axios": "^1.7.9",
"better-sqlite3": "^11.7.0", "better-sqlite3": "^11.7.0",
"classic-level": "^2.0.0",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"color": "^4.2.3", "color": "^4.2.3",
"color.js": "^1.2.0", "color.js": "^1.2.0",
@ -62,7 +63,6 @@
"jsdom": "^24.0.0", "jsdom": "^24.0.0",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"knex": "^3.1.0", "knex": "^3.1.0",
"level": "^9.0.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"parse-torrent": "^11.0.17", "parse-torrent": "^11.0.17",
"piscina": "^4.7.0", "piscina": "^4.7.0",

View File

@ -1,4 +1,6 @@
import { levelDatabasePath } from "@main/constants"; import { levelDatabasePath } from "@main/constants";
import { Level } from "level"; import { ClassicLevel } from "classic-level";
export const db = new Level(levelDatabasePath, { valueEncoding: "json" }); export const db = new ClassicLevel(levelDatabasePath, {
valueEncoding: "json",
});

View File

@ -3694,7 +3694,7 @@ abort-controller@^3.0.0:
dependencies: dependencies:
event-target-shim "^5.0.0" event-target-shim "^5.0.0"
abstract-level@^2.0.0, abstract-level@^2.0.1: abstract-level@^2.0.0:
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-2.0.2.tgz#8d965e731afb42a72f163874410c1687fb2e4bdb" resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-2.0.2.tgz#8d965e731afb42a72f163874410c1687fb2e4bdb"
integrity sha512-pPJixmXk/kTKLB2sSue7o4Uj6TlLD2XfaP2gWZomHVCC6cuUGX/VslQqKG1yZHfXwBb/3lS6oSTMPGzh1P1iig== integrity sha512-pPJixmXk/kTKLB2sSue7o4Uj6TlLD2XfaP2gWZomHVCC6cuUGX/VslQqKG1yZHfXwBb/3lS6oSTMPGzh1P1iig==
@ -4166,13 +4166,6 @@ braces@^3.0.3, braces@~3.0.2:
dependencies: dependencies:
fill-range "^7.1.1" fill-range "^7.1.1"
browser-level@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-2.0.0.tgz#cc63eb1322e67c44489d7fbdda5c30a2db7b59da"
integrity sha512-RuYSCHG/jwFCrK+KWA3dLSUNLKHEgIYhO5ORPjJMjCt7T3e+RzpIDmYKWRHxq2pfKGXjlRuEff7y7RESAAgzew==
dependencies:
abstract-level "^2.0.1"
browserslist@^4.22.2, browserslist@^4.23.1: browserslist@^4.22.2, browserslist@^4.23.1:
version "4.24.0" version "4.24.0"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.0.tgz#a1325fe4bc80b64fda169629fc01b3d6cecd38d4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.0.tgz#a1325fe4bc80b64fda169629fc01b3d6cecd38d4"
@ -6939,15 +6932,6 @@ level-transcoder@^1.0.1:
buffer "^6.0.3" buffer "^6.0.3"
module-error "^1.0.1" module-error "^1.0.1"
level@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/level/-/level-9.0.0.tgz#880aa9d341a5411e36bed77f4fa233f425b492a8"
integrity sha512-n+mVuf63mUEkd8NUx7gwxY+QF5vtkibv6fXTGUgtHWLPDaA5/XZjLcI/Q1nQ8k6OttHT6Ezt+7nSEXsRUfHtOQ==
dependencies:
abstract-level "^2.0.1"
browser-level "^2.0.0"
classic-level "^2.0.0"
levn@^0.4.1: levn@^0.4.1:
version "0.4.1" version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"