From dd6281c4927b3646ed4e25e0b806f8a25ef4f181 Mon Sep 17 00:00:00 2001 From: Jan Komarek Date: Fri, 23 Aug 2024 14:19:59 +0200 Subject: [PATCH] chore(scripts): add list-outdated --- package.json | 1 + .../common-dependencies.txt | 109 ++++++++++++++++++ .../connect-dependencies.txt | 92 +++++++++++++++ .../list-outdated-dependencies.sh | 34 ++++++ .../mission-dependencies.txt | 40 +++++++ .../mobile-dependencies.txt | 67 +++++++++++ .../qa-dependencies.txt | 10 ++ .../trends-dependencies.txt | 18 +++ .../usability-dependencies.txt | 54 +++++++++ 9 files changed, 425 insertions(+) create mode 100644 scripts/list-outdated-dependencies/common-dependencies.txt create mode 100644 scripts/list-outdated-dependencies/connect-dependencies.txt create mode 100755 scripts/list-outdated-dependencies/list-outdated-dependencies.sh create mode 100644 scripts/list-outdated-dependencies/mission-dependencies.txt create mode 100644 scripts/list-outdated-dependencies/mobile-dependencies.txt create mode 100644 scripts/list-outdated-dependencies/qa-dependencies.txt create mode 100644 scripts/list-outdated-dependencies/trends-dependencies.txt create mode 100644 scripts/list-outdated-dependencies/usability-dependencies.txt diff --git a/package.json b/package.json index f45926adeaa..f3a33a484e1 100644 --- a/package.json +++ b/package.json @@ -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}\"", diff --git a/scripts/list-outdated-dependencies/common-dependencies.txt b/scripts/list-outdated-dependencies/common-dependencies.txt new file mode 100644 index 00000000000..57c43e1c33e --- /dev/null +++ b/scripts/list-outdated-dependencies/common-dependencies.txt @@ -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 \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/connect-dependencies.txt b/scripts/list-outdated-dependencies/connect-dependencies.txt new file mode 100644 index 00000000000..357ed02c5a9 --- /dev/null +++ b/scripts/list-outdated-dependencies/connect-dependencies.txt @@ -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 \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/list-outdated-dependencies.sh b/scripts/list-outdated-dependencies/list-outdated-dependencies.sh new file mode 100755 index 00000000000..aa5c0c566bf --- /dev/null +++ b/scripts/list-outdated-dependencies/list-outdated-dependencies.sh @@ -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") \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/mission-dependencies.txt b/scripts/list-outdated-dependencies/mission-dependencies.txt new file mode 100644 index 00000000000..e336995fedb --- /dev/null +++ b/scripts/list-outdated-dependencies/mission-dependencies.txt @@ -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 \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/mobile-dependencies.txt b/scripts/list-outdated-dependencies/mobile-dependencies.txt new file mode 100644 index 00000000000..060a6532960 --- /dev/null +++ b/scripts/list-outdated-dependencies/mobile-dependencies.txt @@ -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 \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/qa-dependencies.txt b/scripts/list-outdated-dependencies/qa-dependencies.txt new file mode 100644 index 00000000000..487ca5252db --- /dev/null +++ b/scripts/list-outdated-dependencies/qa-dependencies.txt @@ -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 \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/trends-dependencies.txt b/scripts/list-outdated-dependencies/trends-dependencies.txt new file mode 100644 index 00000000000..84c78e6d0cc --- /dev/null +++ b/scripts/list-outdated-dependencies/trends-dependencies.txt @@ -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 \ No newline at end of file diff --git a/scripts/list-outdated-dependencies/usability-dependencies.txt b/scripts/list-outdated-dependencies/usability-dependencies.txt new file mode 100644 index 00000000000..25d380ca4f9 --- /dev/null +++ b/scripts/list-outdated-dependencies/usability-dependencies.txt @@ -0,0 +1,54 @@ +@crowdin/cli +@floating-ui/react +@headlessui/react +@storybook/addon-actions +@storybook/addon-controls +@storybook/addon-links +@storybook/addon-viewport +@storybook/addons +@storybook/client-api +@storybook/react +@storybook/react-webpack5 +@types/qrcode .react +@types/react-date-range +@types/react-qr-reader +@types/ua-parser-js +autoprefixer +babel-plugin-styled-components +css-in-js-utils +css-loader +css-minimiz +css-minimizer-webpack-plugin +csstype +framer-motion +lottie-react +qrcode.react +react-date-range +react-helmet-async +react-intl +react-markdown +react-medium-image-zoom +react-qr-reader +react-select +react-svg +recharts +storybook +style-loader +styled-components +stylelint +stylelint-config-standard +typescript-styled-plugin +ua-parser-js +zxcvbn +date-fns +@types/zxcvbn +react-focus-lock +@formatjs/cli // je potřeba? +@formatjs/intl // je potřeba? +@types/pako +pako +polished // je potřeba? +svgo +sharp +@types/pdfmake +pdfmake \ No newline at end of file