upgrade plebbit-react-hooks, update electron and scripts

This commit is contained in:
Tom (plebeius.eth)
2025-05-12 23:54:44 +02:00
parent 45e9482241
commit 9e351c6b9d
11 changed files with 3273 additions and 2062 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import tcpPortUsed from 'tcp-port-used';
import EnvPaths from 'env-paths';
import { randomBytes } from 'crypto';
import fs from 'fs-extra';
import PlebbitRpc from '@plebbit/plebbit-js/dist/node/rpc/src/index.js';
import PlebbitRpc from '@plebbit/plebbit-js/rpc';
import path from 'path';
import { fileURLToPath } from 'url';
import isDev from 'electron-is-dev';
@@ -14,7 +14,7 @@ const port = 9138;
const defaultPlebbitOptions = {
// find the user's OS data path
dataPath: !isDev ? envPaths.data : path.join(dirname, '..', '.plebbit'),
ipfsHttpClientsOptions: ['http://localhost:50019/api/v0'],
kuboRpcClientsOptions: [{ url: 'http://localhost:50019/api/v0' }],
httpRoutersOptions: ['https://routing.lol', 'https://peers.pleb.bot', 'https://peers.plebpubsub.xyz', 'https://peers.forumindex.com'],
};
+13 -13
View File
@@ -8,7 +8,7 @@
"dependencies": {
"@capacitor/app": "6.0.1",
"@floating-ui/react": "0.26.1",
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#54cf36c50dd31f5641a9475f5566b7b29b3873c7",
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#f760ce2f5961307c93517fed0257b425bbf38c30",
"@react-spring/web": "9.7.5",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "13.0.0",
@@ -31,8 +31,8 @@
"lodash": "4.17.21",
"memoizee": "0.4.15",
"prettier": "3.0.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-i18next": "13.2.2",
"react-markdown": "8.0.6",
"react-router-dom": "6.16.0",
@@ -43,7 +43,7 @@
"remark-gfm": "3.0.1",
"remark-supersub": "1.0.0",
"tcp-port-used": "1.0.2",
"typescript": "5.2.2",
"typescript": "5.1.6",
"zustand": "4.4.3"
},
"scripts": {
@@ -57,16 +57,16 @@
"electron:no-delete-data": "yarn electron:before:download-ipfs && electron .",
"electron:start": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://localhost:3000 && yarn electron\"",
"electron:start:no-delete-data": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://localhost:3000 && yarn electron:no-delete-data\"",
"electron:build:linux": "electron-builder build --publish never -l",
"electron:build:windows": "electron-builder build --publish never -w",
"electron:build:mac": "electron-builder build --publish never -m",
"electron:before": "yarn electron:before:download-ipfs && yarn electron:before:delete-data",
"electron:build:linux": "yarn build && electron-rebuild && electron-builder build --publish never -l",
"electron:build:windows": "yarn build && yarn electron-rebuild && electron-builder build --publish never -w",
"electron:build:mac": "yarn build && yarn electron-rebuild && electron-builder build --publish never -m",
"electron:before": "yarn electron-rebuild && yarn electron:before:download-ipfs && yarn electron:before:delete-data",
"electron:before:download-ipfs": "node electron/download-ipfs",
"electron:before:delete-data": "rimraf .plebbit",
"android:build:icons": "cordova-res android --skip-config --copy --resources /tmp/plebbit-react-android-icons --icon-source ./android/icons/icon.png --splash-source ./android/icons/splash.png --icon-foreground-source ./android/icons/icon-foreground.png --icon-background-source '#ffffee'",
"prettier": "prettier {src,electron}/**/*.{js,ts,tsx} --write",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"android:build": "yarn build && npx cap sync android && npx cap open android"
"android:build": "yarn build && npx cap sync android && npx cap run android"
},
"browserslist": {
"production": [
@@ -86,9 +86,10 @@
"@capacitor/android": "5.0.0",
"@capacitor/cli": "5.0.0",
"@capacitor/core": "5.0.0",
"@electron/rebuild": "4.0.0",
"@types/memoizee": "0.4.9",
"@typescript-eslint/eslint-plugin": "8.26.0",
"@typescript-eslint/parser": "8.26.0",
"@typescript-eslint/eslint-plugin": "8.29.0",
"@typescript-eslint/parser": "8.29.0",
"@vitejs/plugin-react": "4.3.4",
"assert": "2.1.0",
"babel-plugin-react-compiler": "19.0.0-beta-40c6c23-20250301",
@@ -100,9 +101,8 @@
"crypto-browserify": "3.12.1",
"cz-conventional-changelog": "3.3.0",
"decompress": "4.2.1",
"electron": "35.0.1",
"electron": "36.0.0",
"electron-builder": "24.13.2",
"electron-rebuild": "3.2.9",
"eslint": "8.56.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-react": "7.37.4",
+1 -1
View File
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
import { Link, useLocation, useParams } from 'react-router-dom';
import { useFloating, offset, size, autoUpdate, Placement } from '@floating-ui/react';
import { Comment } from '@plebbit/plebbit-react-hooks';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import { shouldShowSnow } from '../../lib/snow';
import { getHasThumbnail } from '../../lib/utils/media-utils';
import { getFormattedTimeAgo } from '../../lib/utils/time-utils';
+1 -1
View File
@@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next';
import { Link, useLocation, useParams } from 'react-router-dom';
import { Comment, useAuthorAvatar, useEditedComment } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import styles from '../../views/post/post.module.css';
import { CommentMediaInfo, getDisplayMediaInfoType, getHasThumbnail, getMediaDimensions } from '../../lib/utils/media-utils';
import { hashStringToColor, getTextColorForBackground } from '../../lib/utils/post-utils';
+1 -1
View File
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
import { Link, useLocation, useParams } from 'react-router-dom';
import { Comment, useAuthorAvatar, useEditedComment } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import styles from '../../views/post/post.module.css';
import { shouldShowSnow } from '../../lib/snow';
import { getHasThumbnail } from '../../lib/utils/media-utils';
+1 -1
View File
@@ -4,7 +4,7 @@ import { Trans, useTranslation } from 'react-i18next';
import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits-pages';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import { formatMarkdown } from '../../lib/utils/post-utils';
import { getFormattedTimeAgo } from '../../lib/utils/time-utils';
import { isValidURL } from '../../lib/utils/url-utils';
@@ -1,5 +1,5 @@
import { setAccount, useAccount, useBlock } from '@plebbit/plebbit-react-hooks';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import styles from './blocked-addresses-setting.module.css';
import { useTranslation } from 'react-i18next';
@@ -1,5 +1,5 @@
import { setAccount, useAccount, useSubscribe } from '@plebbit/plebbit-react-hooks';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import styles from './subscriptions-setting.module.css';
import { useTranslation } from 'react-i18next';
import { useState } from 'react';
+1 -1
View File
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import { useAccount, useAccountComment, useAccountSubplebbits } from '@plebbit/plebbit-react-hooks';
import { isAllView, isCatalogView, isSubscriptionsView } from '../../lib/utils/view-utils';
import { useDefaultSubplebbitAddresses } from '../../hooks/use-default-subplebbits';
+1 -1
View File
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import Plebbit from '@plebbit/plebbit-js';
import { Subplebbit, useSubplebbitStats } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import { useDefaultSubplebbitsState, useDefaultSubplebbitTags } from '../../../hooks/use-default-subplebbits';
+3250 -2039
View File
File diff suppressed because it is too large Load Diff