Skip to content

Commit

Permalink
Let's not use depricated packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Lleyton Gray committed Feb 6, 2022
1 parent ef3ad33 commit b59f132
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 35 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@types/chrome": "0.0.178",
"@types/crypto-js": "^4.1.0",
"@types/jszip": "^3.4.1",
"@types/nedb": "1.8.12",
"@types/node": "17.0.15",
"@types/node-fetch": "^3.0.3",
"@types/react": "17.0.39",
Expand Down Expand Up @@ -80,7 +79,6 @@
"jszip": "^3.6.0",
"mobx": "6.3.13",
"mobx-react-lite": "3.2.3",
"nedb": "1.8.0",
"node-bookmarks-parser": "^2.0.0",
"node-fetch": "^3.2.0",
"prettier": "2.5.1",
Expand Down Expand Up @@ -110,6 +108,7 @@
"@fortawesome/free-regular-svg-icons": "^6.0.0-beta2",
"@fortawesome/free-solid-svg-icons": "^6.0.0-beta2",
"@fortawesome/react-fontawesome": "^0.1.17",
"@seald-io/nedb": "^2.2.1",
"electron-chrome-extensions": "^3.8.0",
"fast-average-color": "^7.0.1",
"hex-to-rgb": "^1.0.1",
Expand Down
6 changes: 5 additions & 1 deletion src/main/services/storage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ipcMain, dialog } from 'electron';
import * as Datastore from 'nedb';
import * as Datastore from '@seald-io/nedb';
import { fileTypeFromBuffer } from 'file-type';
import * as icojs from 'icojs';

Expand All @@ -23,6 +23,8 @@ import fetch from 'node-fetch';
import { Settings } from '../models/settings';

interface Databases {
// TODO: ts moment
// @ts-ignore
[key: string]: Datastore;
}

Expand Down Expand Up @@ -426,6 +428,8 @@ export class StorageService {
}

private createDatabase = (name: string) => {
// TODO: ts moment
// @ts-ignore
return new Datastore({
filename: getPath(`storage/${name}.db`),
autoload: true,
Expand Down
48 changes: 16 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,20 @@
resolved "https://registry.yarnpkg.com/@remusao/trie/-/trie-1.4.1.tgz#755d09f8a007476334e611f42719b2d581f00720"
integrity sha512-yvwa+aCyYI/UjeD39BnpMypG8N06l86wIDW1/PAc6ihBRnodIfZDwccxQN3n1t74wduzaz74m4ZMHZnB06567Q==

"@seald-io/binary-search-tree@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@seald-io/binary-search-tree/-/binary-search-tree-1.0.2.tgz#9f0e5cec5e0acf97f1b495f2f6d3476ddb6a94ed"
integrity sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA==

"@seald-io/nedb@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@seald-io/nedb/-/nedb-2.2.1.tgz#e46fc4bb079f2c4f9da8e8d7485e581621db6a57"
integrity sha512-uUAUpMT8SyWIc+KISyRqQy95mCjY0hx8tudzFTuvyhtON1xnfrqSfMRNxaVhx/W2aeWqLRNUqhDH6L3Tm9sBhQ==
dependencies:
"@seald-io/binary-search-tree" "^1.0.2"
async "0.2.10"
localforage "^1.9.0"

"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
Expand Down Expand Up @@ -717,13 +731,6 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==

"@types/[email protected]":
version "1.8.12"
resolved "https://registry.yarnpkg.com/@types/nedb/-/nedb-1.8.12.tgz#597bb124ddaf16039c6d478f4abc0a8f2006b134"
integrity sha512-ICDoQMORMjOSqfNFXT4ENXfwwCir1BPblXNm0SPH7C4Q10ou+pvVagcFAJ+rrzf3A47tGU4K/KbzKu7wO9j45Q==
dependencies:
"@types/node" "*"

"@types/node-fetch@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-3.0.3.tgz#9d969c9a748e841554a40ee435d26e53fa3ee899"
Expand Down Expand Up @@ -1444,13 +1451,6 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==

[email protected]:
version "0.2.5"
resolved "https://registry.yarnpkg.com/binary-search-tree/-/binary-search-tree-0.2.5.tgz#7dbb3b210fdca082450dad2334c304af39bdc784"
integrity sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=
dependencies:
underscore "~1.4.4"

bluebird-lst@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/bluebird-lst/-/bluebird-lst-1.0.9.tgz#a64a0e4365658b9ab5fe875eb9dfb694189bb41c"
Expand Down Expand Up @@ -4150,7 +4150,7 @@ loader-utils@^2.0.0:
emojis-list "^3.0.0"
json5 "^2.1.2"

localforage@^1.3.0:
localforage@^1.9.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
Expand Down Expand Up @@ -4343,7 +4343,7 @@ minimist@^1.2.0, minimist@^1.2.5:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==

mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@~0.5.1:
mkdirp@^0.5.4, mkdirp@^0.5.5:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
Expand Down Expand Up @@ -4419,17 +4419,6 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=

[email protected]:
version "1.8.0"
resolved "https://registry.yarnpkg.com/nedb/-/nedb-1.8.0.tgz#0e3502cd82c004d5355a43c9e55577bd7bd91d88"
integrity sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=
dependencies:
async "0.2.10"
binary-search-tree "0.2.5"
localforage "^1.3.0"
mkdirp "~0.5.1"
underscore "~1.4.4"

[email protected]:
version "0.6.3"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
Expand Down Expand Up @@ -6156,11 +6145,6 @@ unbox-primitive@^1.0.1:
has-symbols "^1.0.2"
which-boxed-primitive "^1.0.2"

underscore@~1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604"
integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ=

unique-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d"
Expand Down

0 comments on commit b59f132

Please sign in to comment.