Skip to content

Commit

Permalink
chore(scripts): add list-outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
komret committed Aug 23, 2024
1 parent 9c4f871 commit dd6281c
Show file tree
Hide file tree
Showing 9 changed files with 425 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"generate-package": "yarn tsx ./scripts/generatePackage.js",
"deps": "rimraf **/node_modules && yarn",
"depcheck": "yarn nx affected --target=depcheck",
"list-outdated": "./scripts/list-outdated-dependencies/list-outdated-dependencies.sh",
"message-system-sign-config": "yarn workspace @suite-common/message-system sign-config",
"format": "yarn nx format:write",
"format:all": "yarn prettier --write \"**/*.{js,ts,tsx,mdx,md,html,json,yml,yaml}\"",
Expand Down
109 changes: 109 additions & 0 deletions scripts/list-outdated-dependencies/common-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
@babel/cli
@babel/core
@babel/node
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-decorators
@babel/plugin-transform-runtime
@babel/preset-env
@babel/preset-react
@babel/preset-typescript
@babel/runtime
@mobily/ts-belt
@pmmmwh/react-refresh-webpack-plugin
@reduxjs/toolkit
@testing-library/react
@testing-library/user-event
@types/copy-webpack-plugin
@types/file-saver
@types/fs-extra
@types/prettier
@types/react
@types/react-dom
@types/react-router
@types/react-router-dom
@types/react-test-renderer
@types/react-window
@types/redux-logger
@types/redux-mock-store
@types/tar
@types/webpack-bundle-analyzer
@types/webpack-plugin-serve
@typescript-eslint/eslint-plugin
@typescript-eslint/parser
babel-loader
bignumber.js
bn.js
chalk
concurrently
copy-webpack-plugin
cross-fetch
depcheck
dotenv
eslint
eslint-plugin-chai-friendly
eslint-plugin-cypress
eslint-plugin-import
eslint-plugin-jest
eslint-plugin-jsx-a11y
eslint-plugin-mdx
eslint-plugin-react
eslint-plugin-react-hooks
escape-string-regexp
fake-indexeddb
file-saver
fs-extra
glob
history
html-webpack-plugin
immer
jest
jest-canvas-mock
jest-environment-jsdom
jest-eslint
jest-watch-typeahead
jsdom
minimatch
nx
octokit
patch-package
prettier
prettier-eslint
proxy-memoize
raw-loader
react
react-dom
react-fela
react-inspector
react-redux
react-refresh
react-router
react-router-dom
react-test-renderer
react-toastify
react-use
react-window
redux
redux-devtools-extension
redux-logger
redux-mock-store
redux-thunk
rimraf
sort-package-json
tar
ts-mixer
ts-node
tsconfig-paths
tslib
tsx
typeforce
typescript
version-bump-prompt
webpack
webpack-bundle-analyzer
webpack-cli
webpack-dev-server
webpack-merge
webpack-nano
webpack-plugin-serve
worker-loader
yargs
92 changes: 92 additions & 0 deletions scripts/list-outdated-dependencies/connect-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
next
next-seo
next-themes
nextra
nextra-theme-docs
tailwindcss
postcss
postcss-cli
postcss-import
postcss-lightningcss
postcss-loader
postcss-modules-extract-imports
postcss-modules-local-by-default
postcss-modules-scope
postcss-modules-values
postcss-styled-syntax
@tailwindcss/nesting
@codemirror/state
@sentry/browser
@sentry/core
@sentry/electron
@sentry/webpack-plugin
@sentry/integrations
@sentry/types
@sinclair/typebox
@sinclair/typebox-codegen
@hbsnow/rehype-sectionize
@types/bytebuffer
@types/chrome
@vitejs/plugin-react
vitest
eth-phishing-detect
pushdata-bitcoin
@types/karma
karma
karma-babel-preprocessor
karma-chrome-launcher
karma-jasmine
karma-jasmine-async
karma-sourcemap-loader
karma-webpack
lodash
@types/git-url-parse
git-url-parse
clsx
protobufjs
protobufjs-cli
es6-promise
focus-visible
base-x
@uiw/react-codemirror
browserify-bignum
match-sorter
zod
esbuild
xvfb-maybe
scroll-into-view-if-needed // je potřeba?
codemirror-json-schema
json-stable-stringify
@types/json-stable-stringify
intersection-observer
@types/semver
semver
node-libs-browser
json-stable-stringify
type-fest
usb
tiny-worker
terser-webpack-plugin
remark-gemoji
remark-gfm
socks-proxy-agent
selfsigned
swr
pkg
long
json5
groestl-hash-js
@types/flexsearch
flexsearch
codemirror-json5
@types/w3c-web-usb
@types/sharedworker
crc
cbor-js
ws
@types/ws
crypto-browserify
stream-browserify
events
@types/web
jssha
34 changes: 34 additions & 0 deletions scripts/list-outdated-dependencies/list-outdated-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

valid_argument_values=("common" "connect" "mission" "mobile" "qa" "trends" "usability")
valid_arguments_hint="Valid values are: ${valid_argument_values[*]}."

# Check if an argument was provided
if [ "$#" -ne 1 ]; then
echo "The script requires 1 argument, but $# were provided."
echo "$valid_arguments_hint"
exit 1
fi

# Function to check if a value is in an array
contains() {
local value="$1"
shift
local array=("$@")
for item in "${array[@]}"; do
if [ "$item" == "$value" ]; then
return 0
fi
done
return 1
}

# Check if the provided argument is valid
if ! contains "$1" "${valid_argument_values[@]}"; then
echo "Invalid argument '$1'."
echo "$valid_arguments_hint"
exit 1
fi

# Run yarn outdated on target dependencies
yarn outdated $(tr '\n' ' ' < "$(dirname "${BASH_SOURCE[0]}")/$1-dependencies.txt")
40 changes: 40 additions & 0 deletions scripts/list-outdated-dependencies/mission-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@hookform/resolvers
react-hook-form
@electron/notarize
electron
electron-builder
electron-localshortcut
electron-store
electron-updater
@types/electron-localshortcut
electron-localshortcut
@types/cors
cors
dropbox
express
simple-git
systeminformation
golomb
idb
broadcast-channel
@types/bs58
bs58
@types/bs58check
bs58check
@types/create-hmac
create-hmac
bech32
bip66
bitcoin-ops
blake-hash
blakejs
openpgp
varuint-bitcoin
int64-buffer
minimaldata
bcrypto
@types/wif
wif
@types/uuid
uuid
tiny-secp256k1
67 changes: 67 additions & 0 deletions scripts/list-outdated-dependencies/mobile-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
react-native
expo
expo-constants
expo-localization
expo-modules-core
react-fela
fela
fela-enforce-longhands
fela-native
fela-plugin-embedded
fela-plugin-extend
fela-plugin-multiple-selectors
fela-plugin-placeholder-prefixer
fela-plugin-unit
fela-sort-media-query-mobile-first
@react-native/babel-preset
detox
@babel/plugin-transform-export-namespace-from
@config-plugins/detox
@react-native/metro-config
@react-navigation/bottom-tabs
@react-navigation/core
@react-navigation/native
@react-navigation/native-stack
@sentry/react-native
@shopify/flash-list
@testing-library/react-native
@types/jest
@types/node
babel-plugin-transform-inline-environment-variables
babel-plugin-transform-remove-console
buffer
expo-atlas
expo-av
expo-barcode-scanner
expo-build-properties
expo-clipboard
expo-crypto
expo-dev-client
expo-device
expo-haptics
expo-image
expo-linear-gradient
expo-local-authentication
expo-navigation-bar
expo-secure-store
expo-splash-screen
expo-status-bar
expo-system-ui
jotai
lottie-react-native
react-native-gesture-handler
react-native-keyboard-aware-scroll-view
react-native-mmkv
react-native-restart
react-native-safe-area-context
react-native-screens
react-native-svg
react-qr-code
redux-devtools-expo-dev-plugin
redux-persist
ts-jest
@shopify/react-native-skia
react-native-reanimated
yup
metro-react-native-babel-preset
jest-expo
10 changes: 10 additions & 0 deletions scripts/list-outdated-dependencies/qa-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@playwright/browser-chromium
@playwright/browser-firefox
@playwright/browser-webkit
@playwright/test
cypress
cypress-file-upload
cypress-image-snapshot
cypress-real-events
@currents/playwright
@types/cypress-image-snapshot
18 changes: 18 additions & 0 deletions scripts/list-outdated-dependencies/trends-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@ethereumjs/common
@ethereumjs/tx
@everstake/wallet-sdk
@fivebinaries/coin-selection
@solana/buffer-layout
@solana/web3.js
web3-utils
jws
@metamask/eth-sig-util
@stellar/stellar-sdk
eth-phishing-detect
@types/invity-api
ripple-lib
ajv
@types/jws
json-schema-to-typescript
@types/bchaddrjs
bchaddrjs
Loading

0 comments on commit dd6281c

Please sign in to comment.