Skip to content

Conversation

@pwltr
Copy link
Collaborator

@pwltr pwltr commented Jul 12, 2024

Description

This replaces AsyncStorage with MMKV for the web relay cache. No need to have two key-value stores. Also adds Reactotron plugin for react-native-mmkv.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

@socket-security
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/eslint-plugin-ft-flow@3.0.7 None +1 521 kB brianzchen
npm/eslint-scope@5.1.1 None 0 78.4 kB eslintbot
npm/eslint@8.57.0 environment, filesystem +15 4.49 MB eslintbot
npm/event-target-shim@5.0.1 None 0 189 kB mysticatea
npm/events@3.3.0 None 0 82.8 kB goto-bus-stop
npm/fast-deep-equal@3.1.3 None 0 13 kB esp
npm/fast-xml-parser@4.3.4 None 0 112 kB amitgupta
npm/fetch-blob@3.2.0 None 0 21.8 kB endless
npm/flow-parser@0.206.0 None 0 768 kB flowtype
npm/fuzzysort@1.9.0 None 0 32.4 kB farzher
npm/glob@7.2.3 filesystem 0 55.1 kB isaacs
npm/graceful-fs@4.2.11 environment, filesystem 0 32.5 kB isaacs
npm/hoist-non-react-statics@3.3.2 None 0 38.9 kB mridgway
npm/husky@9.0.11 environment, filesystem, shell 0 3.61 kB typicode
npm/i18next-icu@2.3.0 None 0 712 kB adrai
npm/i18next@23.11.2 None 0 635 kB adrai
npm/ieee754@1.2.1 None 0 6.8 kB feross
npm/ignore@5.3.1 None 0 51.5 kB kael
npm/immer@10.0.4 environment 0 623 kB mweststrate
npm/inherits@2.0.4 None 0 3.96 kB isaacs
npm/intl-messageformat@10.5.11 None +2 1.28 MB longlho
npm/is-docker@2.2.1 filesystem 0 3.01 kB sindresorhus
npm/is-wsl@2.2.0 environment, filesystem 0 3.76 kB sindresorhus
npm/jdenticon@3.2.0 None 0 707 kB dmester
npm/jest-environment-node@29.7.0 unsafe 0 9.37 kB simenb
npm/jest@29.7.0 None 0 5.01 kB simenb
npm/js-tokens@4.0.0 None 0 15.1 kB lydell
npm/json5@2.2.3 None 0 235 kB jordanbtucker
npm/lnurl@0.24.2 filesystem, network Transitive: environment, shell +1 283 kB chill1
npm/lodash@4.17.21 None 0 1.41 MB bnjmnt4n
npm/loose-envify@1.4.0 environment 0 5.81 kB zertosh
npm/lottie-react-native@6.7.2 Transitive: environment, eval, filesystem, network, shell, unsafe +102 86.5 MB matinzd
npm/metro-config@0.80.7 filesystem Transitive: environment, eval, network, unsafe +7 499 kB metro-bot
npm/metro-core@0.80.7 None 0 20.9 kB metro-bot
npm/metro-runtime@0.80.7 None 0 73.3 kB metro-bot
npm/metro-source-map@0.80.7 None +3 886 kB metro-bot
npm/metro@0.80.7 environment, filesystem, network +7 2.18 MB metro-bot
npm/mime@3.0.0 None 0 60.1 kB broofa
npm/minimist@1.2.8 None 0 54.5 kB ljharb
npm/mkdirp@0.5.6 filesystem 0 7.69 kB isaacs
npm/nano-staged@0.8.0 Transitive: environment +1 46.8 kB usmanyunusov
npm/nanoid@3.3.6 None 0 21.7 kB ai
npm/node-fetch@2.6.11 network +1 212 kB node-fetch-bot
npm/object-assign@4.1.1 None 0 5.49 kB sindresorhus
npm/onetime@5.1.2 None 0 6.17 kB sindresorhus
npm/prettier@2.8.8 environment, filesystem, unsafe 0 11.2 MB prettier-bot
npm/pretty-format@26.6.2 None 0 67.6 kB simenb
npm/process@0.11.10 None 0 15.3 kB cwmma
npm/prompts@2.4.2 None 0 187 kB terkelg
npm/prop-types@15.8.1 environment 0 94.5 kB ljharb
npm/random-access-web-storage@2.0.0 None 0 11 kB nzh
npm/react-i18next@14.1.0 None 0 331 kB adrai
npm/react-is@16.13.1 environment 0 24 kB acdlite
npm/react-native-address-generator@0.3.3 None 0 68.7 MB coreyphillips
npm/react-native-biometrics@3.0.1 None 0 169 kB jayfunk
npm/react-native-bundle-visualizer@3.1.3 Transitive: environment, filesystem, shell +10 266 kB ijzerenhein
npm/react-native-camera-kit@14.0.0-beta15 None 0 311 kB scarlac
npm/react-native-device-info@11.1.0 None 0 699 kB schie
npm/react-native-dotenv@3.4.11 environment, filesystem 0 22 kB goatandsheep
npm/react-native-draggable-flatlist@4.0.1 None 0 523 kB computerjazz
npm/react-native-exit-app@2.0.0 None 0 40.3 kB wumke
npm/react-native-fetch-api@3.0.0 None 0 40.9 kB acostalima
npm/react-native-fs@2.20.0 Transitive: environment, eval, filesystem, network, shell, unsafe +102 86.8 MB hagen
npm/react-native-gesture-handler@2.15.0 None +1 3.33 MB jakub.piasecki
npm/react-native-haptic-feedback@2.2.0 None 0 696 kB mkuczera
npm/react-native-image-picker@7.1.2 None 0 178 kB johandutoit
npm/react-native-keyboard-accessory@0.1.16 None 0 30.1 kB ardaogulcan
npm/react-native-keychain@8.2.0 None 0 205 kB oblador
npm/react-native-localize@3.0.2 Transitive: environment, eval, filesystem, network, shell, unsafe +101 90.3 MB zoontek
npm/react-native-mmkv@2.12.2 None 0 3.24 MB mrousavy
npm/react-native-modal@13.0.1 None 0 72.7 kB mmazzarolo
npm/react-native-permissions@3.10.1 Transitive: environment, eval, filesystem, network, shell, unsafe +102 86.7 MB zoontek
npm/react-native-polyfill-globals@3.1.0 network 0 19.9 kB acostalima
npm/react-native-qrcode-svg@6.3.0 None 0 144 kB awesomejerry
npm/react-native-quick-actions@0.3.13 None 0 532 kB jordanbyron
npm/react-native-quick-base64@2.1.2 None 0 2.11 MB craftzdog
npm/react-native-quick-crypto@0.7.1 None 0 1.1 MB boorad
npm/react-native-randombytes@3.6.1 None 0 55.9 kB tenaciousmv
npm/react-native-reanimated-carousel@3.5.1 None 0 595 kB zhaodonghao586
npm/react-native-reanimated@3.9.0 environment, eval +2 3.85 MB piaskowyk
npm/react-native-restart@0.0.27 None 0 599 kB avishayil
npm/react-native-safe-area-context@4.10.1 environment 0 236 kB janicduplessis
npm/react-native-screens@3.31.1 None +1 1.28 MB tboba
npm/react-native-share@10.2.0 None 0 317 kB mateusandrade
npm/react-native-skia-stub@0.0.1 None 0 3.44 kB limpbrains
npm/react-native-svg-transformer@1.3.0 None 0 13.5 kB kristerkari
npm/react-native-svg@15.2.0 network 0 2.84 MB wolewicki
npm/react-native-tcp-socket@6.0.6 None 0 173 kB rapsssito
npm/react-native-toast-message@2.2.0 None 0 42 kB calintamas
npm/react-native-zip-archive@6.1.0 None 0 114 kB plrthink
npm/react-native@0.74.3 environment, network Transitive: eval, filesystem, shell, unsafe +104 148 MB react-native-bot
npm/react-redux@9.1.1 environment 0 739 kB acemarke
npm/react@18.3.1 environment 0 318 kB react-bot
npm/reactotron-react-native-mmkv@0.2.6 None 0 12.2 kB infinitered-owner
npm/reactotron-react-native@5.1.7 environment, network 0 140 kB infinitered-owner
npm/reactotron-redux@3.1.9 None 0 67.1 kB infinitered-owner
npm/readable-stream@4.5.2 environment +1 294 kB matteo.collina
npm/redux-logger@3.0.6 None 0 34.3 kB evgenyrodionov
npm/redux-persist@6.0.0 environment 0 418 kB rt2zz
npm/redux-thunk@3.1.0 None 0 26.8 kB acemarke
npm/redux@5.0.1 None 0 290 kB phryneas
npm/regenerator-runtime@0.14.0 None 0 27.8 kB benjamn
npm/resolve@1.22.2 environment, filesystem 0 145 kB ljharb
npm/rn-android-keyboard-adjust@2.1.2 None 0 29.3 kB darleikroth
npm/rn-qr-generator@1.4.0 None 0 111 kB gevorg94
npm/safe-buffer@5.2.1 None 0 32.1 kB feross
npm/secp256k1@4.0.3 None 0 1.89 MB fanatid
npm/semver@6.3.1 None 0 68.3 kB lukekarrys
npm/serve-static@1.15.0 None 0 25.2 kB dougwilson
npm/shell-quote@1.8.1 None 0 45 kB ljharb
npm/signal-exit@3.0.7 None 0 9.96 kB isaacs
npm/sodium-react-native-direct@0.4.2 None 0 13.4 MB pwltr
npm/sodium-universal@4.0.0 None 0 46.5 kB mafintosh
npm/string_decoder@1.3.0 None 0 14.4 kB matteo.collina
npm/strip-ansi@5.2.0 None 0 4.17 kB sindresorhus
npm/styled-components@5.3.11 environment 0 3.02 MB probablyup
npm/tslib@2.5.0 None 0 60 kB typescript-bot
npm/typeforce@1.18.0 None 0 19.1 kB dcousens
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot
npm/url-parse@1.5.10 None 0 63 kB swaagie
npm/util-deprecate@1.0.2 None 0 5.48 kB tootallnate
npm/uuid@9.0.1 None 0 123 kB ctavan
npm/wif@2.0.6 None +2 17.7 kB dcousens
npm/yargs@17.7.2 environment, filesystem 0 292 kB oss-bot

🚮 Removed packages: npm/@babel/preset-typescript@7.21.4, npm/@eslint-community/eslint-utils@4.4.0, npm/@istanbuljs/schema@0.1.3, npm/@nodelib/fs.stat@2.0.5, npm/@nodelib/fs.walk@1.2.8, npm/@react-native-async-storage/async-storage@1.22.3, npm/@types/babel__traverse@7.20.0, npm/@types/scheduler@0.16.3, npm/accepts@1.3.8, npm/acorn@8.11.3, npm/agent-base@7.1.1, npm/async@3.2.4, npm/available-typed-arrays@1.0.5, npm/bn.js@4.12.0, npm/buffer@5.7.1, npm/call-bind@1.0.2, npm/camelcase@5.3.1, npm/caniuse-lite@1.0.30001600, npm/catering@2.1.1, npm/cipher-base@1.0.4, npm/color-name@1.1.3, npm/decode-uri-component@0.2.2, npm/define-data-property@1.1.1, npm/define-properties@1.2.0, npm/diff-sequences@29.6.3, npm/domhandler@5.0.3, npm/electron-to-chromium@1.4.719, npm/elliptic@6.5.4, npm/entities@4.5.0, npm/env-paths@2.2.1, npm/error-stack-parser@2.1.4, npm/es-define-property@1.0.0

View full report↗︎

@socket-security
Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Install scripts npm/tiny-secp256k1@1.1.6
  • Install script: install
  • Source: npm run build || echo "secp256k1 bindings compilation fail. Pure JS implementation will be used."
🚫
Install scripts npm/sodium-react-native-direct@0.4.2
  • Install script: postinstall
  • Source: tar -xzf libsodium/build.tgz --directory ./libsodium
🚫

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/tiny-secp256k1@1.1.6
  • @SocketSecurity ignore npm/sodium-react-native-direct@0.4.2

@limpbrains
Copy link
Contributor

Awesome find

@pwltr
Copy link
Collaborator Author

pwltr commented Jul 15, 2024

Been testing this for a few days and seems to work. There is a rare issue (that only I seem to have) with the current web relay client cache where it becomes corrupted after a few weeks of use and I have to clear it in dev settings to repair. Not sure if that problem will be fixed but it doesn't seem like it got worse fwiw.

@pwltr pwltr requested a review from limpbrains July 15, 2024 09:07
@pwltr pwltr merged commit d9e9e3d into master Jul 15, 2024
@pwltr pwltr deleted the chore/remove-async-storage branch July 15, 2024 09:27
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.

3 participants