From 9b1410ea52ff15343fab2aa7312730cc0aef0cdf Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Tue, 24 Oct 2023 10:23:49 -0400 Subject: [PATCH 1/5] fix waiting state for showcasing teams --- shared/package.json | 1 + .../profile/showcase-team-offer/container.tsx | 36 --- shared/profile/showcase-team-offer/index.tsx | 209 +++++++++--------- shared/profile/showcase-team-offer/page.tsx | 2 +- shared/profile/user/index.tsx | 2 +- shared/profile/user/teams/container.tsx | 48 ---- shared/profile/user/teams/index.tsx | 101 +++++---- shared/profile/user/teams/teaminfo.tsx | 2 +- 8 files changed, 172 insertions(+), 229 deletions(-) delete mode 100644 shared/profile/showcase-team-offer/container.tsx delete mode 100644 shared/profile/user/teams/container.tsx diff --git a/shared/package.json b/shared/package.json index 2a2eed484420..fb1571208324 100644 --- a/shared/package.json +++ b/shared/package.json @@ -61,6 +61,7 @@ "android-debug": "react-native run-android --mode 'debug'", "android-install-downgrade": "adb install -r -d android/app/build/outputs/apk/debug/app-debug.apk", "android-unsigned": "react-native run-android --mode 'releaseUnsigned'", + "android-install-downgrade-unsigned": "adb install -r -d android/app/build/outputs/apk/releaseUnsigned/app-releaseUnsigned.apk", "clean-and-install": "rm -rf node_modules ; yarn pod-clean ; yarn modules ; yarn pod-install", "coverage": "rm -rf coverage-ts; npx typescript-coverage-report" }, diff --git a/shared/profile/showcase-team-offer/container.tsx b/shared/profile/showcase-team-offer/container.tsx deleted file mode 100644 index f1f273b1eabc..000000000000 --- a/shared/profile/showcase-team-offer/container.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import * as C from '../../constants' -import * as Constants from '../../constants/teams' -import * as Tracker2Constants from '../../constants/tracker2' -import Render from '.' - -const Container = () => { - const waiting = C.useWaitingState(s => s.counts) - const _you = C.useCurrentUserState(s => s.username) - const teamMeta = C.useTeamsState(s => s.teamMeta) - const navigateUp = C.useRouterState(s => s.dispatch.navigateUp) - const onCancel = (you: string) => { - // sadly a little racy, doing this for now - setTimeout(() => { - C.useTrackerState.getState().dispatch.load({ - assertion: you, - guiID: Tracker2Constants.generateGUIID(), - ignoreCache: true, - inTracker: false, - reason: '', - }) - }, 500) - navigateUp() - } - - const setMemberPublicity = C.useTeamsState(s => s.dispatch.setMemberPublicity) - const onPromote = setMemberPublicity - const props = { - onCancel: () => onCancel(_you), - onPromote, - teams: Constants.sortTeamsByName(teamMeta), - waiting, - } - return -} - -export default Container diff --git a/shared/profile/showcase-team-offer/index.tsx b/shared/profile/showcase-team-offer/index.tsx index 5f86dfd0b36a..bf3e56bae505 100644 --- a/shared/profile/showcase-team-offer/index.tsx +++ b/shared/profile/showcase-team-offer/index.tsx @@ -1,9 +1,65 @@ +import * as C from '../../constants' import * as Kb from '../../common-adapters' -import {teamWaitingKey} from '../../constants/teams' import type * as T from '../../constants/types' import {useTeamsSubscribe} from '../../teams/subscriber' -export type RowProps = { +const Container = () => { + const waiting = C.useWaitingState(s => s.counts) + const you = C.useCurrentUserState(s => s.username) + const teamMeta = C.useTeamsState(s => s.teamMeta) + const navigateUp = C.useRouterState(s => s.dispatch.navigateUp) + const onCancel = (you: string) => { + // sadly a little racy, doing this for now + setTimeout(() => { + C.useTrackerState.getState().dispatch.load({ + assertion: you, + guiID: C.Tracker.generateGUIID(), + ignoreCache: true, + inTracker: false, + reason: '', + }) + }, 500) + navigateUp() + } + + const setMemberPublicity = C.useTeamsState(s => s.dispatch.setMemberPublicity) + const onPromote = setMemberPublicity + const props = { + onCancel: () => onCancel(you), + onPromote, + teams: C.Teams.sortTeamsByName(teamMeta), + waiting, + } + + useTeamsSubscribe() + return ( + + + {!Kb.Styles.isMobile && } + + {Kb.Styles.isMobile && } + {props.teams.map(teamMeta => ( + props.onPromote(teamMeta.id, promoted)} + showcased={teamMeta.showcasing} + waiting={!!props.waiting.get(C.Teams.teamWaitingKey(teamMeta.id))} + /> + ))} + + + + ) +} + +type RowProps = { canShowcase: boolean name: T.Teams.Teamname isOpen: boolean @@ -14,63 +70,50 @@ export type RowProps = { isExplicitMember: boolean } -export type Props = { - onCancel: () => void - onPromote: (teamID: T.Teams.TeamID, promote: boolean) => void - teams: ReadonlyArray - waiting: Map -} - -const TeamRow = ({ - canShowcase, - name, - isOpen, - membercount, - onPromote, - showcased, - waiting, - isExplicitMember, -}: RowProps) => ( - - - - - - - {name} - - {isOpen && ( - - )} - - - {membercount + ' member' + (membercount !== 1 ? 's' : '')} +const TeamRow = (p: RowProps) => { + const {canShowcase, name, isOpen, membercount, onPromote, showcased, waiting, isExplicitMember} = p + return ( + + + + + + + {name} + + {isOpen && ( + + )} + + + {membercount + ' member' + (membercount !== 1 ? 's' : '')} + + {showcased || canShowcase || waiting ? ( + + onPromote(!showcased)} + small={true} + type="Success" + mode={showcased ? 'Secondary' : 'Primary'} + waiting={waiting} + /> + + ) : ( + + + {isExplicitMember + ? 'Admins aren’t allowing members to feature.' + : 'Add yourself to the team first.'} + + + )} - {showcased || canShowcase || waiting ? ( - - onPromote(!showcased)} - small={true} - type="Success" - mode={showcased ? 'Secondary' : 'Primary'} - waiting={waiting} - /> - - ) : ( - - - {isExplicitMember - ? 'Admins aren’t allowing members to feature.' - : 'Add yourself to the team first.'} - - - )} + {!Kb.Styles.isMobile && } - {!Kb.Styles.isMobile && } - -) + ) +} const ShowcaseTeamOfferHeader = () => ( @@ -88,38 +131,6 @@ const ShowcaseTeamOfferHeader = () => ( ) -const ShowcaseTeamOffer = (props: Props) => { - useTeamsSubscribe() - return ( - - - {!Kb.Styles.isMobile && } - - {Kb.Styles.isMobile && } - {props.teams.map(teamMeta => ( - props.onPromote(teamMeta.id, promoted)} - showcased={teamMeta.showcasing} - waiting={ - // @ts-ignore - !!props.waiting[teamWaitingKey(teamMeta.id)] - } - /> - ))} - - - - ) -} - const styles = Kb.Styles.styleSheetCreate( () => ({ @@ -136,26 +147,20 @@ const styles = Kb.Styles.styleSheetCreate( paddingTop: Kb.Styles.globalMargins.mediumLarge, }, }), - headerText: { - marginBottom: Kb.Styles.globalMargins.xsmall, - }, + headerText: {marginBottom: Kb.Styles.globalMargins.xsmall}, membershipText: Kb.Styles.platformStyles({ common: {color: Kb.Styles.globalColors.black_50}, isElectron: {textAlign: 'right'}, isMobile: {textAlign: 'center'}, }), - membershipTextContainer: { - flexShrink: 1, - }, + membershipTextContainer: {flexShrink: 1}, meta: { alignSelf: 'center', marginLeft: Kb.Styles.globalMargins.xtiny, marginTop: 2, }, noteContainer: Kb.Styles.platformStyles({ - isMobile: { - paddingTop: Kb.Styles.globalMargins.small, - }, + isMobile: {paddingTop: Kb.Styles.globalMargins.small}, }), noteText: { paddingBottom: Kb.Styles.globalMargins.small, @@ -175,14 +180,10 @@ const styles = Kb.Styles.styleSheetCreate( paddingRight: Kb.Styles.globalMargins.small, paddingTop: Kb.Styles.globalMargins.tiny, }, - isMobile: { - minHeight: Kb.Styles.isMobile ? 64 : 48, - }, + isMobile: {minHeight: Kb.Styles.isMobile ? 64 : 48}, }), - teamText: { - alignSelf: 'flex-start', - }, + teamText: {alignSelf: 'flex-start'}, }) as const ) -export default ShowcaseTeamOffer +export default Container diff --git a/shared/profile/showcase-team-offer/page.tsx b/shared/profile/showcase-team-offer/page.tsx index 7e1d0bbeb6c9..3d9b6c75143b 100644 --- a/shared/profile/showcase-team-offer/page.tsx +++ b/shared/profile/showcase-team-offer/page.tsx @@ -1,6 +1,6 @@ import * as React from 'react' -const ShowCase = React.lazy(async () => import('./container')) +const ShowCase = React.lazy(async () => import('.')) const Screen = () => ( diff --git a/shared/profile/user/index.tsx b/shared/profile/user/index.tsx index 3b621faf3e64..daf632d6d672 100644 --- a/shared/profile/user/index.tsx +++ b/shared/profile/user/index.tsx @@ -7,7 +7,7 @@ import Assertion from '../../tracker2/assertion/container' import Bio from '../../tracker2/bio/container' import Friend from './friend/container' import Measure from './measure' -import Teams from './teams/container' +import Teams from './teams' import chunk from 'lodash/chunk' import * as T from '../../constants/types' import type {RPCError} from '../../util/errors' diff --git a/shared/profile/user/teams/container.tsx b/shared/profile/user/teams/container.tsx deleted file mode 100644 index 35fd690c0a79..000000000000 --- a/shared/profile/user/teams/container.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import * as C from '../../../constants' -import * as Constants from '../../../constants/tracker2' -import * as T from '../../../constants/types' -import Teams, {type Props} from '.' - -type OwnProps = { - username: string -} - -const noTeams = new Array() - -const Container = (ownProps: OwnProps) => { - const d = C.useTrackerState(s => Constants.getDetails(s, ownProps.username)) - const _isYou = C.useCurrentUserState(s => s.username === ownProps.username) - const _roles = C.useTeamsState(s => s.teamRoleMap.roles) - const _teamNameToID = C.useTeamsState(s => s.teamNameToID) - const _youAreInTeams = C.useTeamsState(s => s.teamnames.size > 0) - const teamShowcase = d.teamShowcase || noTeams - const navigateAppend = C.useRouterState(s => s.dispatch.navigateAppend) - const onEdit = () => { - navigateAppend('profileShowcaseTeamOffer') - } - const joinTeam = C.useTeamsState(s => s.dispatch.joinTeam) - const showTeamByName = C.useTeamsState(s => s.dispatch.showTeamByName) - const onJoinTeam = joinTeam - const clearModals = C.useRouterState(s => s.dispatch.clearModals) - const onViewTeam = (teamname: string) => { - clearModals() - showTeamByName(teamname) - } - const props = { - onEdit: _isYou && _youAreInTeams ? onEdit : undefined, - onJoinTeam: onJoinTeam, - onViewTeam: onViewTeam, - teamMeta: teamShowcase.reduce((map, t) => { - const teamID = _teamNameToID.get(t.name) || T.Teams.noTeamID - map[t.name] = { - inTeam: !!((_roles.get(teamID)?.role || 'none') !== 'none'), - teamID, - } - return map - }, {}), - teamShowcase: teamShowcase, - } - return -} - -export default Container diff --git a/shared/profile/user/teams/index.tsx b/shared/profile/user/teams/index.tsx index b4aab667bc93..e2550dc9e040 100644 --- a/shared/profile/user/teams/index.tsx +++ b/shared/profile/user/teams/index.tsx @@ -1,25 +1,71 @@ +import * as C from '../../../constants' +import * as Constants from '../../../constants/tracker2' +import * as T from '../../../constants/types' import * as Kb from '../../../common-adapters' import * as React from 'react' -import type * as T from '../../../constants/types' import OpenMeta from './openmeta' -import TeamInfo from './teaminfo' +import {default as TeamInfo, type Props as TIProps} from './teaminfo' -export type Props = { - // lint totally confused - teamShowcase: ReadonlyArray - teamMeta: { - [K in string]: { +type OwnProps = {username: string} + +const noTeams = new Array() + +const Container = (ownProps: OwnProps) => { + const d = C.useTrackerState(s => Constants.getDetails(s, ownProps.username)) + const _isYou = C.useCurrentUserState(s => s.username === ownProps.username) + const _roles = C.useTeamsState(s => s.teamRoleMap.roles) + const _teamNameToID = C.useTeamsState(s => s.teamNameToID) + const _youAreInTeams = C.useTeamsState(s => s.teamnames.size > 0) + const teamShowcase = d.teamShowcase || noTeams + const navigateAppend = C.useRouterState(s => s.dispatch.navigateAppend) + const _onEdit = () => { + navigateAppend('profileShowcaseTeamOffer') + } + const joinTeam = C.useTeamsState(s => s.dispatch.joinTeam) + const showTeamByName = C.useTeamsState(s => s.dispatch.showTeamByName) + const onJoinTeam = joinTeam + const clearModals = C.useRouterState(s => s.dispatch.clearModals) + const onViewTeam = (teamname: string) => { + clearModals() + showTeamByName(teamname) + } + const onEdit = _isYou && _youAreInTeams ? _onEdit : undefined + const teamMeta = teamShowcase.reduce<{ + [key: string]: { inTeam: boolean teamID: T.Teams.TeamID } - } - onJoinTeam: (teamname: string) => void - onViewTeam: (teamname: string) => void - onEdit?: () => void + }>((map, t) => { + const teamID = _teamNameToID.get(t.name) || T.Teams.noTeamID + map[t.name] = { + inTeam: !!((_roles.get(teamID)?.role || 'none') !== 'none'), + teamID, + } + return map + }, {}) + + return onEdit || teamShowcase.length > 0 ? ( + + + Teams + {!!onEdit && } + + {!!onEdit && !teamShowcase.length && } + {teamShowcase.map(t => ( + onViewTeam(t.name)} + inTeam={teamMeta[t.name]?.inTeam ?? false} + /> + ))} + + ) : null } -// TODO types -const TeamShowcase = (props: any) => { +const TeamShowcase = (props: Omit) => { + const {name, isOpen} = props const makePopup = React.useCallback( (p: Kb.Popup2Parms) => { const {attachTo, toggleShowingPopup} = p @@ -36,16 +82,15 @@ const TeamShowcase = (props: any) => { - {props.name} + {name} - + ) } -// TODO types -const ShowcaseTeamsOffer = (p: any) => ( +const ShowcaseTeamsOffer = (p: {onEdit: () => void}) => ( @@ -58,26 +103,6 @@ const ShowcaseTeamsOffer = (p: any) => ( ) -const Teams = (p: Props) => - p.onEdit || p.teamShowcase.length > 0 ? ( - - - Teams - {!!p.onEdit && } - - {!!p.onEdit && !p.teamShowcase.length && } - {p.teamShowcase.map(t => ( - p.onViewTeam(t.name)} - inTeam={p.teamMeta[t.name]?.inTeam ?? false} - /> - ))} - - ) : null - const styles = Kb.Styles.styleSheetCreate( () => ({ @@ -97,4 +122,4 @@ const styles = Kb.Styles.styleSheetCreate( }) as const ) -export default Teams +export default Container diff --git a/shared/profile/user/teams/teaminfo.tsx b/shared/profile/user/teams/teaminfo.tsx index 8827ec0912c7..d6a9bd3f5637 100644 --- a/shared/profile/user/teams/teaminfo.tsx +++ b/shared/profile/user/teams/teaminfo.tsx @@ -20,7 +20,7 @@ const Kb = { WaitingButton, } -type Props = { +export type Props = { attachTo?: React.RefObject description: string inTeam: boolean From 5b5f6bdfc10ddd31c9fb7cfb16bada10133b35d7 Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Wed, 25 Oct 2023 13:41:40 -0400 Subject: [PATCH 2/5] WIP --- protocol/bin/flow.js | 2 +- shared/app/globals.native.tsx | 4 - .../chat/conversation/fwd-msg/team-picker.tsx | 2 +- shared/chat/conversation/normal/index.d.ts | 2 +- .../markdown/service-decoration.tsx | 3 +- .../common-adapters/plain-input.desktop.tsx | 3 +- shared/common-adapters/plain-input.native.tsx | 3 +- shared/constants/chat2/common.tsx | 3 +- shared/constants/chat2/convostate.tsx | 11 +- shared/constants/chat2/index.tsx | 3 +- shared/constants/chat2/meta.tsx | 5 +- .../fs/platform-specific.desktop.tsx | 5 +- shared/constants/gregor.tsx | 3 +- shared/constants/teams.tsx | 2 +- shared/constants/types/chat2/index.tsx | 9 +- shared/constants/types/rpc-chat-gen.tsx | 2 +- shared/constants/types/rpc-gen.tsx | 2 +- shared/constants/types/rpc-gregor-gen.tsx | 2 +- shared/constants/types/rpc-stellar-gen.tsx | 2 +- shared/constants/whats-new.tsx | 3 +- shared/desktop/app/ipctypes.tsx | 2 +- shared/desktop/renderer/globals.desktop.tsx | 1 - shared/engine/index.platform.desktop.tsx | 10 +- shared/engine/types.d.ts | 2 +- shared/package.json | 5 +- shared/todo.txt | 1 + shared/util/clipboard.desktop.tsx | 2 +- shared/util/electron.d.ts | 2 +- shared/util/electron.desktop.tsx | 2 +- shared/yarn.lock | 253 +++++++++--------- 30 files changed, 182 insertions(+), 169 deletions(-) diff --git a/protocol/bin/flow.js b/protocol/bin/flow.js index 8cd2ce443d2d..ddd86b35bfd5 100644 --- a/protocol/bin/flow.js +++ b/protocol/bin/flow.js @@ -477,7 +477,7 @@ ${project.import.map(n => importMap[n] || '').join('\n')} ${project.import.map(n => `export {${n}}`).join('\n')} export type Bool = boolean export type Boolean = boolean -export type Bytes = Buffer +export type Bytes = Uint8Array export type Double = number export type Int = number export type Int64 = number diff --git a/shared/app/globals.native.tsx b/shared/app/globals.native.tsx index 499366669bf8..710c547febb6 100644 --- a/shared/app/globals.native.tsx +++ b/shared/app/globals.native.tsx @@ -2,10 +2,6 @@ // >>>>>>>>>>>>>>>>>>>>>>> DO NOT REORDER ANYTHING in this file <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // This is supposed to bootstrap / polyfill / fixup the app. Do NOT add things here or change things unless you really know // what's happening -// -// Needed for purepack -// @ts-ignore -globalThis.buffer = global.Buffer = window.Buffer = require('buffer/').Buffer __FILE_SUFFIX__ = '' __PROFILE__ = false __HOT__ = false diff --git a/shared/chat/conversation/fwd-msg/team-picker.tsx b/shared/chat/conversation/fwd-msg/team-picker.tsx index 66f41840358c..c1d37db9f713 100644 --- a/shared/chat/conversation/fwd-msg/team-picker.tsx +++ b/shared/chat/conversation/fwd-msg/team-picker.tsx @@ -20,7 +20,7 @@ const TeamPicker = (props: Props) => { const message = C.useChatContext(s => s.messageMap.get(ordinal)) const [pickerState, setPickerState] = React.useState('picker') const [term, setTerm] = React.useState('') - const dstConvIDRef = React.useRef() + const dstConvIDRef = React.useRef() const [results, setResults] = React.useState>([]) const [waiting, setWaiting] = React.useState(false) const [error, setError] = React.useState('') diff --git a/shared/chat/conversation/normal/index.d.ts b/shared/chat/conversation/normal/index.d.ts index 9668461c8342..266161504867 100644 --- a/shared/chat/conversation/normal/index.d.ts +++ b/shared/chat/conversation/normal/index.d.ts @@ -6,7 +6,7 @@ export type Props = { requestScrollToBottomRef: React.MutableRefObject void)> requestScrollUpRef: React.MutableRefObject void)> requestScrollDownRef: React.MutableRefObject void)> - onPaste: (data: Buffer) => void + onPaste: (data: Uint8Array) => void onAttach?: (paths: Array) => void onFocusInput: () => void onRequestScrollDown: () => void diff --git a/shared/common-adapters/markdown/service-decoration.tsx b/shared/common-adapters/markdown/service-decoration.tsx index 05edaf061ed7..ab2d6982bd82 100644 --- a/shared/common-adapters/markdown/service-decoration.tsx +++ b/shared/common-adapters/markdown/service-decoration.tsx @@ -15,6 +15,7 @@ import type { renderEmoji as renderEmojiType, RPCToEmojiData as RPCToEmojiDataType, } from '../../util/emoji' +import {base64ToUint8Array, uint8ArrayToString} from 'uint8array-extras' const prefix = 'keybase://' export const linkIsKeybaseLink = (link: string) => link.startsWith(prefix) @@ -112,7 +113,7 @@ const ServiceDecoration = (p: Props) => { // Parse JSON to get the type of the decoration let parsed: T.RPCChat.UITextDecoration try { - const jsonString = Buffer.from(json, 'base64').toString() + const jsonString = uint8ArrayToString(base64ToUint8Array(json)) parsed = JSON.parse(jsonString) } catch (e) { return null diff --git a/shared/common-adapters/plain-input.desktop.tsx b/shared/common-adapters/plain-input.desktop.tsx index 6f065d754b14..30c2da109115 100644 --- a/shared/common-adapters/plain-input.desktop.tsx +++ b/shared/common-adapters/plain-input.desktop.tsx @@ -5,6 +5,7 @@ import pick from 'lodash/pick' import logger from '../logger' import {checkTextInfo} from './input.shared' import type {InternalProps, TextInfo, Selection} from './plain-input' +import {stringToUint8Array} from 'uint8array-extras' const maybeParseInt = (input: string | number, radix: number): number => typeof input === 'string' ? parseInt(input, radix) : input @@ -30,7 +31,7 @@ class PlainInput extends React.PureComponent { _onChange = ({target: {value = ''}}) => { if (this.props.maxBytes) { const {maxBytes} = this.props - if (Buffer.byteLength(value) > maxBytes) { + if (stringToUint8Array(value).byteLength > maxBytes) { return } } diff --git a/shared/common-adapters/plain-input.native.tsx b/shared/common-adapters/plain-input.native.tsx index 15a130ddd7af..fc6298a5419b 100644 --- a/shared/common-adapters/plain-input.native.tsx +++ b/shared/common-adapters/plain-input.native.tsx @@ -13,6 +13,7 @@ import {Box2} from './box' import {checkTextInfo} from './input.shared' import {getStyle as getTextStyle} from './text' import {isIOS} from '../constants/platform' +import {stringToUint8Array} from 'uint8array-extras' // A plain text input component. Handles callbacks, text styling, and auto resizing but // adds no styling. @@ -105,7 +106,7 @@ class PlainInput extends React.PureComponent { _onChangeText = (t: string) => { if (this.props.maxBytes) { const {maxBytes} = this.props - if (Buffer.byteLength(t) > maxBytes) { + if (stringToUint8Array(t).byteLength > maxBytes) { return } } diff --git a/shared/constants/chat2/common.tsx b/shared/constants/chat2/common.tsx index 1e0f72f032ab..2c11d689f60f 100644 --- a/shared/constants/chat2/common.tsx +++ b/shared/constants/chat2/common.tsx @@ -131,7 +131,8 @@ export const allMessageTypes: Set = new Set([ 'placeholder', ]) -export const generateOutboxID = () => Buffer.from([...Array(8)].map(() => Math.floor(Math.random() * 256))) +export const generateOutboxID = () => + Uint8Array.from([...Array(8)], () => Math.floor(Math.random() * 256)) export const formatTextForQuoting = (text: string) => text diff --git a/shared/constants/chat2/convostate.tsx b/shared/constants/chat2/convostate.tsx index d22615f768fb..f1e9aac5ccf3 100644 --- a/shared/constants/chat2/convostate.tsx +++ b/shared/constants/chat2/convostate.tsx @@ -20,6 +20,7 @@ import {type StoreApi, type UseBoundStore, useStore} from 'zustand' import * as Platform from '../platform' import KB2 from '../../util/electron' import NotifyPopup from '../../util/notify-popup' +import {hexToUint8Array} from 'uint8array-extras' const {darwinCopyToChatTempUploadFile} = KB2.functions const makeThreadSearchInfo = (): T.Chat.ThreadSearchInfo => ({ @@ -147,7 +148,7 @@ export type ConvoState = ConvoStore & { restricted: boolean, convs?: Array ) => void - attachmentPasted: (data: Buffer) => void + attachmentPasted: (data: Uint8Array) => void attachmentPreviewSelect: (ordinal: T.Chat.Ordinal) => void attachmentUploadCanceled: (outboxIDs: Array) => void attachmentDownload: (ordinal: T.Chat.Ordinal) => void @@ -553,7 +554,7 @@ const createSlice: Z.ImmerStateCreator = (set, get) => { // disable sending exploding messages if flag is false const ephemeralLifetime = get().explodingMode const ephemeralData = ephemeralLifetime !== 0 ? {ephemeralLifetime} : {} - const outboxIDs = paths.reduce>((obids, p) => { + const outboxIDs = paths.reduce>((obids, p) => { obids.push(p.outboxID ? p.outboxID : Common.generateOutboxID()) return obids }, []) @@ -565,7 +566,7 @@ const createSlice: Z.ImmerStateCreator = (set, get) => { conversationID: T.Chat.keyToConversationID(conversationIDKey), filename: Styles.unnormalizePath(p.path), identifyBehavior: T.RPCGen.TLFIdentifyBehavior.chatGui, - metadata: Buffer.from([]), + metadata: new Uint8Array(), outboxID: outboxIDs[i], title: titles[i] ?? '', tlfName: tlfName ?? '', @@ -1055,7 +1056,7 @@ const createSlice: Z.ImmerStateCreator = (set, get) => { logger.info('bail on not logged in') return } - const tlfID = Buffer.from(T.Teams.teamIDToString(teamID), 'hex') + const tlfID = hexToUint8Array(T.Teams.teamIDToString(teamID)) await T.RPCChat.localMarkTLFAsReadLocalRpcPromise({tlfID}) } C.ignorePromise(f()) @@ -2227,7 +2228,7 @@ const createSlice: Z.ImmerStateCreator = (set, get) => { conversationID: T.Chat.keyToConversationID(conversationIDKey), filename: path, identifyBehavior: T.RPCGen.TLFIdentifyBehavior.chatGui, - metadata: Buffer.from([]), + metadata: new Uint8Array(), outboxID, title: '', tlfName: meta.tlfname, diff --git a/shared/constants/chat2/index.tsx b/shared/constants/chat2/index.tsx index b924a901710b..088fcc127e76 100644 --- a/shared/constants/chat2/index.tsx +++ b/shared/constants/chat2/index.tsx @@ -12,6 +12,7 @@ import * as Meta from './meta' import {isMobile, isPhone} from '../platform' import * as Z from '../../util/zustand' import * as Common from './common' +import {uint8ArrayToString} from 'uint8array-extras' export const defaultTopReacjis = [ {name: ':+1:'}, @@ -1847,7 +1848,7 @@ export const _useState = Z.createZustand((set, get) => { explodingItems.forEach(i => { try { const {category, body} = i.item - const secondsString = Buffer.from(body).toString() + const secondsString = uint8ArrayToString(body) const seconds = parseInt(secondsString, 10) if (isNaN(seconds)) { logger.warn(`Got dirty exploding mode ${secondsString} for category ${category}`) diff --git a/shared/constants/chat2/meta.tsx b/shared/constants/chat2/meta.tsx index dd5f1ccf40dd..0eb9c3e7c715 100644 --- a/shared/constants/chat2/meta.tsx +++ b/shared/constants/chat2/meta.tsx @@ -6,6 +6,7 @@ import {formatTimeForConversationList} from '../../util/timestamp' import {globalColors} from '../../styles' import {isPhone} from '../platform' import type {AllowedColors} from '../../common-adapters/text' +import {base64ToUint8Array, uint8ArrayToHex} from 'uint8array-extras' const conversationMemberStatusToMembershipType = (m: T.RPCChat.ConversationMemberStatus) => { switch (m) { @@ -21,8 +22,8 @@ const conversationMemberStatusToMembershipType = (m: T.RPCChat.ConversationMembe } // This one call handles us getting a string or a buffer -const supersededConversationIDToKey = (id: string | Buffer): string => { - return typeof id === 'string' ? Buffer.from(id, 'base64').toString('hex') : id.toString('hex') +const supersededConversationIDToKey = (id: string | Uint8Array): string => { + return typeof id === 'string' ? uint8ArrayToHex(base64ToUint8Array(id)) : uint8ArrayToHex(id) } export const unverifiedInboxUIItemToConversationMeta = ( diff --git a/shared/constants/fs/platform-specific.desktop.tsx b/shared/constants/fs/platform-specific.desktop.tsx index 9c10cf00920a..600bb7d6d16e 100644 --- a/shared/constants/fs/platform-specific.desktop.tsx +++ b/shared/constants/fs/platform-specific.desktop.tsx @@ -6,6 +6,7 @@ import {isWindows, isLinux, pathSep, isDarwin} from '../platform.desktop' import logger from '../../logger' import * as Path from '../../util/path' import KB2 from '../../util/electron.desktop' +import {uint8ArrayToHex} from 'uint8array-extras' const {openPathInFinder, openURL, getPathType, selectFilesToUploadDialog} = KB2.functions const {darwinCopyToKBFSTempUploadFile, relaunchApp, uninstallKBFSDialog, uninstallDokanDialog} = KB2.functions @@ -20,9 +21,7 @@ const _openPathInSystemFileManagerPromise = async (openPath: string, isFolder: b const escapeBackslash = isWindows ? (pathElem: string): string => - pathElem - .replace(/‰/g, '‰2030') - .replace(/([<>:"/\\|?*])/g, (_, c) => '‰' + Buffer.from(c).toString('hex')) + pathElem.replace(/‰/g, '‰2030').replace(/([<>:"/\\|?*])/g, (_, c) => '‰' + uint8ArrayToHex(c)) : (pathElem: string): string => pathElem const _rebaseKbfsPathToMountLocation = (kbfsPath: T.FS.Path, mountLocation: string) => diff --git a/shared/constants/gregor.tsx b/shared/constants/gregor.tsx index ed782a047aee..fc0c483f86fc 100644 --- a/shared/constants/gregor.tsx +++ b/shared/constants/gregor.tsx @@ -1,7 +1,8 @@ +const decoder = new TextDecoder() export const bodyToJSON = (body?: Uint8Array) => { if (!body) return undefined try { - return JSON.parse(Buffer.from(body).toString()) + return JSON.parse(decoder.decode(body)) } catch { return undefined } diff --git a/shared/constants/teams.tsx b/shared/constants/teams.tsx index 076b8d8244d2..d0626b3cee50 100644 --- a/shared/constants/teams.tsx +++ b/shared/constants/teams.tsx @@ -1308,7 +1308,7 @@ export const _useState = Z.createZustand((set, get) => { const pushState = await T.RPCGen.gregorGetStateRpcPromise(undefined, teamWaitingKey(teamID)) const item = pushState.items?.find(i => i.item?.category === chosenChannelsGregorKey) let teams: Array = [] - let msgID: Buffer | undefined + let msgID: Uint8Array | undefined if (item?.item?.body) { const body = item.item.body msgID = item.md?.msgID diff --git a/shared/constants/types/chat2/index.tsx b/shared/constants/types/chat2/index.tsx index 6cc68f4f0b9a..68a712bb481d 100644 --- a/shared/constants/types/chat2/index.tsx +++ b/shared/constants/types/chat2/index.tsx @@ -3,6 +3,7 @@ import * as RPCTypes from '../rpc-gen' import * as _Message from './message' import type * as Meta from './meta' import type * as RPCChatTypes from '../rpc-chat-gen' +import {uint8ArrayToHex, hexToUint8Array} from 'uint8array-extras' export type PaymentConfirmInfo = { error?: RPCTypes.Status @@ -193,16 +194,16 @@ export type RenderMessageType = | 'attachment:video' export const conversationIDToKey = (conversationID: RPCChatTypes.ConversationID): Common.ConversationIDKey => - Common.stringToConversationIDKey(Buffer.from(conversationID).toString('hex')) + Common.stringToConversationIDKey(uint8ArrayToHex(conversationID)) export const keyToConversationID = (key: Common.ConversationIDKey): RPCChatTypes.ConversationID => - Buffer.from(Common.conversationIDKeyToString(key), 'hex') + hexToUint8Array(Common.conversationIDKeyToString(key)) export const rpcOutboxIDToOutboxID = (outboxID: RPCChatTypes.OutboxID): _Message.OutboxID => - _Message.stringToOutboxID(outboxID.toString('hex')) + _Message.stringToOutboxID(uint8ArrayToHex(outboxID)) export const outboxIDToRpcOutboxID = (outboxID: _Message.OutboxID): RPCChatTypes.OutboxID => - Buffer.from(_Message.outboxIDToString(outboxID), 'hex') + hexToUint8Array(_Message.outboxIDToString(outboxID)) export * from './message' export * from './common' diff --git a/shared/constants/types/rpc-chat-gen.tsx b/shared/constants/types/rpc-chat-gen.tsx index 7bfb3ce21ae1..08f18807f400 100644 --- a/shared/constants/types/rpc-chat-gen.tsx +++ b/shared/constants/types/rpc-chat-gen.tsx @@ -10,7 +10,7 @@ export {Keybase1} export {Stellar1} export type Bool = boolean export type Boolean = boolean -export type Bytes = Buffer +export type Bytes = Uint8Array export type Double = number export type Int = number export type Int64 = number diff --git a/shared/constants/types/rpc-gen.tsx b/shared/constants/types/rpc-gen.tsx index b49d504cd4fc..9a2b77c910ae 100644 --- a/shared/constants/types/rpc-gen.tsx +++ b/shared/constants/types/rpc-gen.tsx @@ -6,7 +6,7 @@ import * as Gregor1 from './rpc-gregor-gen' export {Gregor1} export type Bool = boolean export type Boolean = boolean -export type Bytes = Buffer +export type Bytes = Uint8Array export type Double = number export type Int = number export type Int64 = number diff --git a/shared/constants/types/rpc-gregor-gen.tsx b/shared/constants/types/rpc-gregor-gen.tsx index 34d7576baba8..dda63a06aab0 100644 --- a/shared/constants/types/rpc-gregor-gen.tsx +++ b/shared/constants/types/rpc-gregor-gen.tsx @@ -4,7 +4,7 @@ export type Bool = boolean export type Boolean = boolean -export type Bytes = Buffer +export type Bytes = Uint8Array export type Double = number export type Int = number export type Int64 = number diff --git a/shared/constants/types/rpc-stellar-gen.tsx b/shared/constants/types/rpc-stellar-gen.tsx index 5f808d90180f..feffc73578c4 100644 --- a/shared/constants/types/rpc-stellar-gen.tsx +++ b/shared/constants/types/rpc-stellar-gen.tsx @@ -6,7 +6,7 @@ import * as Keybase1 from './rpc-gen' export {Keybase1} export type Bool = boolean export type Boolean = boolean -export type Bytes = Buffer +export type Bytes = Uint8Array export type Double = number export type Int = number export type Int64 = number diff --git a/shared/constants/whats-new.tsx b/shared/constants/whats-new.tsx index e1e2f6fa93b6..b10688865991 100644 --- a/shared/constants/whats-new.tsx +++ b/shared/constants/whats-new.tsx @@ -1,5 +1,6 @@ import type * as T from './types' import * as Z from '../util/zustand' +import {uint8ArrayToString} from 'uint8array-extras' /* * IMPORTANT: @@ -108,7 +109,7 @@ export const _useState = Z.createZustand((set, get) => { updateLastSeen: lastSeenItem => { if (lastSeenItem) { const {body} = lastSeenItem.item - const pushStateLastSeenVersion = Buffer.from(body).toString() + const pushStateLastSeenVersion = uint8ArrayToString(body) const lastSeenVersion = pushStateLastSeenVersion || noVersion // Default to 0.0.0 (noVersion) if user has never marked a version as seen set(s => { diff --git a/shared/desktop/app/ipctypes.tsx b/shared/desktop/app/ipctypes.tsx index 9b7289783882..e3a94fd0f27c 100644 --- a/shared/desktop/app/ipctypes.tsx +++ b/shared/desktop/app/ipctypes.tsx @@ -77,4 +77,4 @@ export type Action = | {type: 'clipboardAvailableFormats'} | {type: 'installCachedDokan'} | {type: 'uninstallDokan'; payload: {execPath: string}} - | {type: 'engineSend'; payload: {buf: Buffer}} + | {type: 'engineSend'; payload: {buf: Uint8Array}} diff --git a/shared/desktop/renderer/globals.desktop.tsx b/shared/desktop/renderer/globals.desktop.tsx index 39a3857ec66d..e3d8b1326c15 100644 --- a/shared/desktop/renderer/globals.desktop.tsx +++ b/shared/desktop/renderer/globals.desktop.tsx @@ -1,4 +1,3 @@ -window.Buffer = require('buffer/').Buffer import {enableMapSet} from 'immer' enableMapSet() export {} diff --git a/shared/engine/index.platform.desktop.tsx b/shared/engine/index.platform.desktop.tsx index fd556b7bc931..80513d54a52f 100644 --- a/shared/engine/index.platform.desktop.tsx +++ b/shared/engine/index.platform.desktop.tsx @@ -4,7 +4,6 @@ import {socketPath} from '../constants/platform.desktop' import {printRPCBytes} from '../local-debug' import type {SendArg, createClientType, incomingRPCCallbackType, connectDisconnectCB} from './index.platform' import KB2 from '../util/electron.desktop' -import {Buffer} from 'buffer/' const {engineSend, mainWindowDispatch, ipcRendererOn} = KB2.functions const {isRenderer} = KB2.constants @@ -27,16 +26,15 @@ class NativeTransport extends TransportShared { // Override Transport._raw_write -- see transport.iced in framed-msgpack-rpc. _raw_write(msg: string, encoding: 'binary') { if (printRPCBytes) { - const b = Buffer.from(msg, encoding) - logger.debug('[RPC] Writing', b.length, 'bytes:', b.toString('hex')) + logger.debug('[RPC] Writing', msg.length) } super._raw_write(msg, encoding) } // Override Packetizer.packetize_data -- see packetizer.iced in framed-msgpack-rpc. - packetize_data(m: Buffer) { + packetize_data(m: Uint8Array) { if (printRPCBytes) { - logger.debug('[RPC] Read', m.length, 'bytes:', m.toString('hex')) + logger.debug('[RPC] Read', m.length) } // @ts-ignore this isn't a typical redux action mainWindowDispatch({payload: m}, 'engineIncoming') @@ -91,7 +89,7 @@ function createClient( // plumb back data from the node side ipcRendererOn?.('engineIncoming', (_e, action) => { try { - client.transport.packetize_data(new Buffer(action.payload)) + client.transport.packetize_data(new Uint8Array(action.payload)) } catch (e) { logger.error('>>>> rpcOnJs JS thrown!', e) } diff --git a/shared/engine/types.d.ts b/shared/engine/types.d.ts index 2a7c01640ad8..981f06298ca0 100644 --- a/shared/engine/types.d.ts +++ b/shared/engine/types.d.ts @@ -14,7 +14,7 @@ export type CommonResponseHandler = { } export type Bool = boolean export type Boolean = boolean -export type Bytes = Buffer +export type Bytes = Uint8Array export type Double = number export type Int = number export type Int64 = number diff --git a/shared/package.json b/shared/package.json index fb1571208324..99260a8e03bf 100644 --- a/shared/package.json +++ b/shared/package.json @@ -82,7 +82,6 @@ "@react-navigation/native": "6.1.9", "@react-navigation/native-stack": "6.9.16", "@reduxjs/toolkit": "1.9.7", - "buffer": "6.0.3", "classnames": "2.3.2", "date-fns": "2.30.0", "emoji-datasource-apple": "15.0.1", @@ -100,7 +99,7 @@ "expo-media-library": "15.6.0", "expo-sms": "11.5.0", "expo-task-manager": "11.5.0", - "framed-msgpack-rpc": "1.1.23", + "framed-msgpack-rpc": "file:../../node-framed-msgpack-rpc", "google-libphonenumber": "3.2.33", "iced-runtime": "1.0.4", "lodash": "4.17.21", @@ -132,7 +131,7 @@ "react-window": "1.8.9", "shallowequal": "1.1.0", "simple-markdown": "0.7.3", - "typedarray-to-buffer": "4.0.0", + "uint8array-extras": "0.3.0", "url-parse": "1.5.10", "use-debounce": "9.0.4", "util": "0.12.5", diff --git a/shared/todo.txt b/shared/todo.txt index 175c1027ef80..b3545e2c7573 100644 --- a/shared/todo.txt +++ b/shared/todo.txt @@ -1 +1,2 @@ Some short term todos: +switch buffers to uint8array diff --git a/shared/util/clipboard.desktop.tsx b/shared/util/clipboard.desktop.tsx index fa90ec42f51a..6b0a26d880e6 100644 --- a/shared/util/clipboard.desktop.tsx +++ b/shared/util/clipboard.desktop.tsx @@ -1,7 +1,7 @@ import KB2 from './electron.desktop' const {clipboardAvailableFormats} = KB2.functions -export async function readImageFromClipboard(event: React.SyntheticEvent): Promise { +export async function readImageFromClipboard(event: React.SyntheticEvent): Promise { const formats = await (clipboardAvailableFormats?.() ?? []) console.log('Read clipboard, formats:', formats) const imageFormats = formats.filter(f => f.startsWith('image/')) diff --git a/shared/util/electron.d.ts b/shared/util/electron.d.ts index 8bded27c4b3d..df4b2292027a 100644 --- a/shared/util/electron.d.ts +++ b/shared/util/electron.d.ts @@ -5,7 +5,7 @@ type KB2 = { darwinCopyToChatTempUploadFile?: ( dst: string, originalFilePath: string - ) => Promise<{outboxID: Buffer; path: string}> + ) => Promise<{outboxID: Uint8Array; path: string}> } } diff --git a/shared/util/electron.desktop.tsx b/shared/util/electron.desktop.tsx index 58b4054049ae..0d2679b50149 100644 --- a/shared/util/electron.desktop.tsx +++ b/shared/util/electron.desktop.tsx @@ -96,7 +96,7 @@ export type KB2 = { windowPositionBottomRight?: boolean }) => void closeRenderer?: (options: {windowComponent?: string; windowParam?: string}) => void - readImageFromClipboard?: () => Promise + readImageFromClipboard?: () => Promise setOpenAtLogin?: (enabled: boolean) => Promise showOpenDialog?: (options: OpenDialogOptions) => Promise> showSaveDialog?: (options: SaveDialogOptions) => Promise diff --git a/shared/yarn.lock b/shared/yarn.lock index 023c4f3d1981..098475803227 100644 --- a/shared/yarn.lock +++ b/shared/yarn.lock @@ -1826,13 +1826,6 @@ dependencies: cross-spawn "^7.0.1" -"@msgpack/msgpack@1.9.3": - version "1.9.3" - resolved "https://registry.yarnpkg.com/@msgpack/msgpack/-/msgpack-1.9.3.tgz#2196023f65a1d77261f950c356e3a4491faf1601" - integrity sha512-ciyjF3R0E+39yXO1B4lsRwWe0LvvvohFglhlmmrUZN696BdqGqnMmyPY9xFOwJnDjIt4gnozARok7xdpQvyFeg== - dependencies: - base64-js "^1.3.0" - "@msgpack/msgpack@2.8.0": version "2.8.0" resolved "https://registry.yarnpkg.com/@msgpack/msgpack/-/msgpack-2.8.0.tgz#4210deb771ee3912964f14a15ddfb5ff877e70b9" @@ -2615,9 +2608,9 @@ integrity sha512-dEzDpaR+P/thkMsjsREQDX9OP8AMyLncTkgUgTTIxq5lJTlQffiLJt67ImDtaX+kC7CaNIX30pfdrrMZkym+eg== "@types/node@*": - version "20.8.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25" - integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ== + version "20.8.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" + integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== dependencies: undici-types "~5.25.1" @@ -2839,6 +2832,14 @@ "@typescript-eslint/types" "6.8.0" "@typescript-eslint/visitor-keys" "6.8.0" +"@typescript-eslint/scope-manager@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz#2626e9a7fe0e004c3e25f3b986c75f584431134e" + integrity sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw== + dependencies: + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/visitor-keys" "6.9.0" + "@typescript-eslint/type-utils@6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz#50365e44918ca0fd159844b5d6ea96789731e11f" @@ -2854,6 +2855,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded" integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ== +"@typescript-eslint/types@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.9.0.tgz#86a0cbe7ac46c0761429f928467ff3d92f841098" + integrity sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw== + "@typescript-eslint/typescript-estree@6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1" @@ -2867,7 +2873,20 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.8.0", "@typescript-eslint/utils@^6.0.0": +"@typescript-eslint/typescript-estree@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.0.tgz#d0601b245be873d8fe49f3737f93f8662c8693d4" + integrity sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ== + dependencies: + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/visitor-keys" "6.9.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.8.0.tgz#d42939c2074c6b59844d0982ce26a51d136c4029" integrity sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q== @@ -2880,6 +2899,19 @@ "@typescript-eslint/typescript-estree" "6.8.0" semver "^7.5.4" +"@typescript-eslint/utils@^6.0.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.9.0.tgz#5bdac8604fca4823f090e4268e681c84d3597c9f" + integrity sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.9.0" + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/typescript-estree" "6.9.0" + semver "^7.5.4" + "@typescript-eslint/visitor-keys@6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz#cffebed56ae99c45eba901c378a6447b06be58b8" @@ -2888,6 +2920,14 @@ "@typescript-eslint/types" "6.8.0" eslint-visitor-keys "^3.4.1" +"@typescript-eslint/visitor-keys@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz#cc69421c10c4ac997ed34f453027245988164e80" + integrity sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg== + dependencies: + "@typescript-eslint/types" "6.9.0" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -3462,12 +3502,12 @@ babel-plugin-polyfill-corejs2@^0.4.6: semver "^6.3.1" babel-plugin-polyfill-corejs3@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz#a75fa1b0c3fc5bd6837f9ec465c0f48031b8cab1" - integrity sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA== + version "0.8.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz#25c2d20002da91fe328ff89095c85a391d6856cf" + integrity sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ== dependencies: "@babel/helper-define-polyfill-provider" "^0.4.3" - core-js-compat "^3.32.2" + core-js-compat "^3.33.1" babel-plugin-polyfill-regenerator@^0.5.3: version "0.5.3" @@ -3550,7 +3590,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.1.2, base64-js@^1.2.3, base64-js@^1.3.0, base64-js@^1.3.1, base64-js@^1.5.1: +base64-js@^1.1.2, base64-js@^1.2.3, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3750,14 +3790,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -3823,7 +3855,7 @@ cacheable-request@^7.0.2: normalize-url "^6.0.1" responselike "^2.0.0" -call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4: +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== @@ -3875,9 +3907,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001541: - version "1.0.30001551" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001551.tgz#1f2cfa8820bd97c971a57349d7fd8f6e08664a3e" - integrity sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg== + version "1.0.30001554" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001554.tgz#ba80d88dff9acbc0cd4b7535fc30e0191c5e2e2a" + integrity sha512-A2E3U//MBwbJVzebddm1YfNp7Nud5Ip+IPn4BozBmn4KqVX7AvluoIDFWjsv5OkGnKUXQVmMSoMKLa3ScCblcQ== chalk@^2.0.1, chalk@^2.4.2: version "2.4.2" @@ -4215,7 +4247,7 @@ cookie@0.5.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -core-js-compat@^3.31.0, core-js-compat@^3.32.2: +core-js-compat@^3.31.0, core-js-compat@^3.33.1: version "3.33.1" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.33.1.tgz#debe80464107d75419e00c2ee29f35982118ff84" integrity sha512-6pYKNOgD/j/bkC5xS5IIg6bncid3rfrI42oBH1SQJbsmYPKF7rhzcFzYCcxYMmNQQ0rCEB8WqpW7QHndOggaeQ== @@ -4667,9 +4699,9 @@ electron-positioner@^4.1.0: integrity sha512-726DfbI9ZNoCg+Fcu6XLuTKTnzf+6nFqv7h+K/V6Ug7IbaPMI7s9S8URnGtWFCy5N5PL4HSzRFF2mXuinftDdg== electron-to-chromium@^1.4.535: - version "1.4.561" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.561.tgz#816f31d9ae01fe58abbf469fca7e125b16befd85" - integrity sha512-eS5t4ulWOBfVHdq9SW2dxEaFarj1lPjvJ8PaYMOjY0DecBaj/t4ARziL2IPpDr4atyWwjLFGQ2vo/VCgQFezVQ== + version "1.4.566" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" + integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== electron@27.0.1: version "27.0.1" @@ -4768,25 +4800,25 @@ errorhandler@^1.5.1: escape-html "~1.0.3" es-abstract@^1.22.1: - version "1.22.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" - integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== + version "1.22.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" + integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== dependencies: array-buffer-byte-length "^1.0.0" arraybuffer.prototype.slice "^1.0.2" available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + call-bind "^1.0.5" es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" function.prototype.name "^1.1.6" - get-intrinsic "^1.2.1" + get-intrinsic "^1.2.2" get-symbol-description "^1.0.0" globalthis "^1.0.3" gopd "^1.0.1" - has "^1.0.3" has-property-descriptors "^1.0.0" has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" internal-slot "^1.0.5" is-array-buffer "^3.0.2" is-callable "^1.2.7" @@ -4796,7 +4828,7 @@ es-abstract@^1.22.1: is-string "^1.0.7" is-typed-array "^1.1.12" is-weakref "^1.0.2" - object-inspect "^1.12.3" + object-inspect "^1.13.1" object-keys "^1.1.1" object.assign "^4.1.4" regexp.prototype.flags "^1.5.1" @@ -4810,7 +4842,7 @@ es-abstract@^1.22.1: typed-array-byte-offset "^1.0.0" typed-array-length "^1.0.4" unbox-primitive "^1.0.2" - which-typed-array "^1.1.11" + which-typed-array "^1.1.13" es-array-method-boxes-properly@^1.0.0: version "1.0.0" @@ -4843,20 +4875,20 @@ es-module-lexer@^1.2.1: integrity sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q== es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" + integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q== dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" + get-intrinsic "^1.2.2" has-tostringtag "^1.0.0" + hasown "^2.0.0" es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== dependencies: - has "^1.0.3" + hasown "^2.0.0" es-to-primitive@^1.2.1: version "1.2.1" @@ -5622,9 +5654,9 @@ flow-enums-runtime@^0.0.5: integrity sha512-PSZF9ZuaZD03sT9YaIs0FrGJ7lSUw7rHZIex+73UYVXg46eL/wxN5PaVcPJFudE2cJu5f0fezitV5aBkLHPUOQ== flow-parser@0.*: - version "0.219.2" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.219.2.tgz#4d5d2d6784d5d8c856b2fd49f31ed44b06b50b01" - integrity sha512-OqzmNECXX85x/5L/OP9TfHErdDoSUoKR4y1sTTy/A5K2arwl7s5EmX0XTkkcJPlCAHYkElWj5Se+ZwNN/6ry2Q== + version "0.219.4" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.219.4.tgz#ee07223d2e6463afd5458724f7a9253c4c142032" + integrity sha512-HNskU8X5MRRfhgX1Y/kMYRUM9pIh0vbosYP2Gt5N6A9+ShsgxPWLh62SgfuGk+Qz+eboqCYBff4CEN1vATJ7AQ== flow-parser@^0.206.0: version "0.206.0" @@ -5670,19 +5702,17 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -framed-msgpack-rpc@1.1.23: - version "1.1.23" - resolved "https://registry.yarnpkg.com/framed-msgpack-rpc/-/framed-msgpack-rpc-1.1.23.tgz#79a055d76e10dfeef02d18fbd7c0c587c4c50f95" - integrity sha512-cP49D7tObCLclfsluLt7POypi/489v3W8J1FcDIQHsUQwqZ4K0gaMlhaO7gHYUcqZAupII/A0DHOadpOOaKs6g== - dependencies: - iced-error "0.0.9" - iced-lock "^1.0.2" - iced-runtime "^1.0.1" - pako "^1.0.11" - path-parse "^1.0.6" - typedarray-to-buffer "^3.1.5" +"framed-msgpack-rpc@file:../../node-framed-msgpack-rpc": + version "1.1.24" + dependencies: + iced-error "0.0.13" + iced-lock "2.0.1" + iced-runtime "1.0.4" + pako "2.1.0" + path-parse "1.0.7" + typedarray-to-buffer "4.0.0" optionalDependencies: - "@msgpack/msgpack" "1.9.3" + "@msgpack/msgpack" "2.8.0" purepack ">=1" freeport-async@2.0.0: @@ -5803,15 +5833,15 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== dependencies: - function-bind "^1.1.1" - has "^1.0.3" + function-bind "^1.1.2" has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" get-node-dimensions@^1.2.1: version "1.2.1" @@ -6056,11 +6086,11 @@ has-flag@^4.0.0: integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== dependencies: - get-intrinsic "^1.1.1" + get-intrinsic "^1.2.2" has-proto@^1.0.1: version "1.0.1" @@ -6079,11 +6109,6 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" - integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== - hasown@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" @@ -6296,19 +6321,19 @@ hyphenate-style-name@^1.0.3: resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== -iced-error@0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/iced-error/-/iced-error-0.0.9.tgz#c7c3057614c0a187d96b3d18c6d520e6b872ed37" - integrity sha512-HcD8dHa6aCGxjlVqcitYgS8VHd4HXFc5IT44yVH6sAJq/mlSHiOZqBkmgAUuZdyOqiZQiBCElF3cFllYNRNPcw== +iced-error@0.0.13: + version "0.0.13" + resolved "https://registry.yarnpkg.com/iced-error/-/iced-error-0.0.13.tgz#a4a8a4f1461a59c7a2a380b4f745ffd80718f08b" + integrity sha512-yEEaG8QfyyRL0SsbNNDw3rVgTyqwHFMCuV6jDvD43f/2shmdaFXkqvFLGhDlsYNSolzYHwVLM/CrXt9GygYopA== -iced-lock@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/iced-lock/-/iced-lock-1.1.0.tgz#6116ef1cab3acd6e6b10893bb27ba622fd3fde72" - integrity sha512-J9UMVitgTMYrkUil5EB9/Q4BPWiMpFH156yjDlmMoMRKs3s3PnXj/6G0UlzIOGnNi5JVNk/zVYLXVnuo+1QnqQ== +iced-lock@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/iced-lock/-/iced-lock-2.0.1.tgz#92fe46ffe01b872bf88f963c2a319fa8ad80d13b" + integrity sha512-J6dnGMpAoHNyACUYJYhiJkLY7YFRTa7NMZ8ZygpYB3HNDOGWtzv55+kT2u1zItRi4Y1EXruG9d1VDsx8R5faTw== dependencies: iced-runtime "^1.0.0" -iced-runtime@1.0.4, iced-runtime@^1.0.0, iced-runtime@^1.0.1: +iced-runtime@1.0.4, iced-runtime@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/iced-runtime/-/iced-runtime-1.0.4.tgz#e9de26dfe98cd8621201f7f3dfb9f7f09c550990" integrity sha512-rgiJXNF6ZgF2Clh/TKUlBDW3q51YPDJUXmxGQXx1b8tbZpVpTn+1RX9q1sjNkujXIIaVxZByQzPHHORg7KV51g== @@ -6325,7 +6350,7 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -ieee754@^1.1.13, ieee754@^1.2.1: +ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -6426,12 +6451,12 @@ internal-ip@4.3.0: ipaddr.js "^1.9.0" internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + version "1.0.6" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" + integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg== dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" + get-intrinsic "^1.2.2" + hasown "^2.0.0" side-channel "^1.0.4" interpret@^3.1.1: @@ -6532,14 +6557,7 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" - integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== - dependencies: - has "^1.0.3" - -is-core-module@^2.13.1: +is-core-module@^2.13.0, is-core-module@^2.13.1: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== @@ -6718,11 +6736,6 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.3, is-typed- dependencies: which-typed-array "^1.1.11" -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" @@ -8335,7 +8348,7 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-inspect@^1.12.3, object-inspect@^1.9.0: +object-inspect@^1.13.1, object-inspect@^1.9.0: version "1.13.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== @@ -8635,10 +8648,10 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -pako@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== +pako@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== param-case@^3.0.4: version "3.0.4" @@ -8766,7 +8779,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.5, path-parse@^1.0.6, path-parse@^1.0.7: +path-parse@1.0.7, path-parse@^1.0.5, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -10738,13 +10751,6 @@ typedarray-to-buffer@4.0.0: resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz#cdd2933c61dd3f5f02eda5d012d441f95bfeb50a" integrity sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ== -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - typescript@5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" @@ -10763,6 +10769,11 @@ uglify-es@^3.1.9: commander "~2.13.0" source-map "~0.6.1" +uint8array-extras@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/uint8array-extras/-/uint8array-extras-0.3.0.tgz#4b5714e4bf15bb36ae7fd6faeef11aae34a0af59" + integrity sha512-erJsJwQ0tKdwuqI0359U8ijkFmfiTcq25JvvzRVc1VP+2son1NJRXhxcAKJmAW3ajM8JSGAfsAXye8g4s+znxA== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -11195,7 +11206,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== -which-typed-array@^1.1.11, which-typed-array@^1.1.2, which-typed-array@^1.1.9: +which-typed-array@^1.1.11, which-typed-array@^1.1.13, which-typed-array@^1.1.2, which-typed-array@^1.1.9: version "1.1.13" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== From 908c55ac1381e86938445dc4f95266e69a91af6a Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Wed, 25 Oct 2023 16:06:43 -0400 Subject: [PATCH 3/5] WIP --- .../react-native-kb/cpp/react-native-kb.cpp | 28 +++++++++---------- shared/app/globals.native.tsx | 1 + shared/constants/gregor.tsx | 5 ++-- shared/package.json | 1 + shared/yarn.lock | 5 ++++ 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/rnmodules/react-native-kb/cpp/react-native-kb.cpp b/rnmodules/react-native-kb/cpp/react-native-kb.cpp index a7c82d809c10..61ba3a12e210 100644 --- a/rnmodules/react-native-kb/cpp/react-native-kb.cpp +++ b/rnmodules/react-native-kb/cpp/react-native-kb.cpp @@ -78,21 +78,19 @@ Value convertMPToJSI(Runtime &runtime, msgpack::object &o) { case msgpack::type::BIN: { auto ptr = o.via.bin.ptr; int size = o.via.bin.size; - // make ArrayBuffer and copy in data - Function arrayBufferCtor = - runtime.global().getPropertyAsFunction(runtime, "ArrayBuffer"); - Value ab = arrayBufferCtor.callAsConstructor(runtime, size); - Object abo = ab.getObject(runtime); - ArrayBuffer abbuf = abo.getArrayBuffer(runtime); - std::copy(ptr, ptr + size, abbuf.data(runtime)); - - // Wrap in Buffer like framed-msg-pack - Object bufObj = runtime.global().getPropertyAsObject(runtime, "Buffer"); - Function bufFrom = bufObj.getPropertyAsFunction(runtime, "from"); - Value buf = bufFrom.callWithThis( - runtime, bufObj, - std::move(ab)); // Buffer shares the memory and just wraps - return buf; + + // make ArrayBuffer and copy in data + Function arrayBufferCtor = + runtime.global().getPropertyAsFunction(runtime, "ArrayBuffer"); + Value ab = arrayBufferCtor.callAsConstructor(runtime, size); + Object abo = ab.getObject(runtime); + ArrayBuffer abbuf = abo.getArrayBuffer(runtime); + std::copy(ptr, ptr + size, abbuf.data(runtime)); + + // Wrap in Uint8Array + Function uCtor = runtime.global().getPropertyAsFunction(runtime, "Uint8Array"); + Value uc = uCtor.callAsConstructor(runtime, std::move(abbuf)); + return uc; } case msgpack::type::ARRAY: { auto size = o.via.array.size; diff --git a/shared/app/globals.native.tsx b/shared/app/globals.native.tsx index 710c547febb6..703b9603a9aa 100644 --- a/shared/app/globals.native.tsx +++ b/shared/app/globals.native.tsx @@ -2,6 +2,7 @@ // >>>>>>>>>>>>>>>>>>>>>>> DO NOT REORDER ANYTHING in this file <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // This is supposed to bootstrap / polyfill / fixup the app. Do NOT add things here or change things unless you really know // what's happening +import 'fastestsmallesttextencoderdecoder' __FILE_SUFFIX__ = '' __PROFILE__ = false __HOT__ = false diff --git a/shared/constants/gregor.tsx b/shared/constants/gregor.tsx index fc0c483f86fc..f0c6cd71a29d 100644 --- a/shared/constants/gregor.tsx +++ b/shared/constants/gregor.tsx @@ -1,8 +1,9 @@ -const decoder = new TextDecoder() +import {uint8ArrayToString} from 'uint8array-extras' + export const bodyToJSON = (body?: Uint8Array) => { if (!body) return undefined try { - return JSON.parse(decoder.decode(body)) + return JSON.parse(uint8ArrayToString(body)) } catch { return undefined } diff --git a/shared/package.json b/shared/package.json index 99260a8e03bf..f513eedd8aa2 100644 --- a/shared/package.json +++ b/shared/package.json @@ -99,6 +99,7 @@ "expo-media-library": "15.6.0", "expo-sms": "11.5.0", "expo-task-manager": "11.5.0", + "fastestsmallesttextencoderdecoder": "1.0.22", "framed-msgpack-rpc": "file:../../node-framed-msgpack-rpc", "google-libphonenumber": "3.2.33", "iced-runtime": "1.0.4", diff --git a/shared/yarn.lock b/shared/yarn.lock index 098475803227..ffdd3a2313f3 100644 --- a/shared/yarn.lock +++ b/shared/yarn.lock @@ -5434,6 +5434,11 @@ fastest-levenshtein@^1.0.12: resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== +fastestsmallesttextencoderdecoder@1.0.22: + version "1.0.22" + resolved "https://registry.yarnpkg.com/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz#59b47e7b965f45258629cc6c127bf783281c5e93" + integrity sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw== + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" From 6e24bfce23799ca1a43665be7e183f4b60590e99 Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Thu, 26 Oct 2023 09:22:18 -0400 Subject: [PATCH 4/5] WIP --- .../react-native-kb/android/CMakeLists.txt | 2 +- rnmodules/react-native-kb/package.json | 2 +- .../react-native-kb/react-native-kb.podspec | 4 +- shared/desktop/yarn-helper/index.tsx | 4 +- shared/ios/Keybase.xcodeproj/project.pbxproj | 12 ++--- shared/ios/Podfile.lock | 4 +- shared/package.json | 4 +- shared/yarn.lock | 45 ++++++++++--------- 8 files changed, 40 insertions(+), 37 deletions(-) diff --git a/rnmodules/react-native-kb/android/CMakeLists.txt b/rnmodules/react-native-kb/android/CMakeLists.txt index f405b95531c4..e06b41c5d739 100644 --- a/rnmodules/react-native-kb/android/CMakeLists.txt +++ b/rnmodules/react-native-kb/android/CMakeLists.txt @@ -16,7 +16,7 @@ message(INFO "params: ${NODE_MODULES_DIR}") # Specifies a path to native header files. include_directories( ../cpp - "${NODE_MODULES_DIR}/msgpack-cxx-4.1.1/include" + "${NODE_MODULES_DIR}/msgpack-cxx-6.1.0/include" ) set_target_properties( diff --git a/rnmodules/react-native-kb/package.json b/rnmodules/react-native-kb/package.json index 21dfbb4c50ff..84ae76a58639 100644 --- a/rnmodules/react-native-kb/package.json +++ b/rnmodules/react-native-kb/package.json @@ -1,6 +1,6 @@ { "name": "react-native-kb", - "version": "0.1.0", + "version": "0.1.1", "description": "misc kb", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/rnmodules/react-native-kb/react-native-kb.podspec b/rnmodules/react-native-kb/react-native-kb.podspec index b498cb780ec7..d9cec3b040d9 100644 --- a/rnmodules/react-native-kb/react-native-kb.podspec +++ b/rnmodules/react-native-kb/react-native-kb.podspec @@ -26,7 +26,7 @@ Pod::Spec.new do |s| if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" s.pod_target_xcconfig = { - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-4.1.1/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers", + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers", "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" } @@ -37,7 +37,7 @@ Pod::Spec.new do |s| s.dependency "ReactCommon/turbomodule/core" else s.pod_target_xcconfig = { - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-4.1.1/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers", + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers", "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" } diff --git a/shared/desktop/yarn-helper/index.tsx b/shared/desktop/yarn-helper/index.tsx index 88d8bae7febd..1b4eda9f0aa1 100644 --- a/shared/desktop/yarn-helper/index.tsx +++ b/shared/desktop/yarn-helper/index.tsx @@ -133,8 +133,8 @@ const decorateInfo = (info: any) => { const getMsgPack = () => { if (process.platform === 'darwin') { - const ver = '4.1.1' - const shasum = '3b64e37641520ea0c9d1f52f80de61ea1868b42c' + const ver = '6.1.0' + const shasum = '09b6b71cdfb4b176e5bb12b02b4ffc290ec10b41' const file = `msgpack-cxx-${ver}.tar.gz` const url = `https://github.com/msgpack/msgpack-c/releases/download/cpp-${ver}/${file}` const prefix = path.resolve(__dirname, '..', '..', 'node_modules') diff --git a/shared/ios/Keybase.xcodeproj/project.pbxproj b/shared/ios/Keybase.xcodeproj/project.pbxproj index 5c04c21665cc..f614661261dc 100644 --- a/shared/ios/Keybase.xcodeproj/project.pbxproj +++ b/shared/ios/Keybase.xcodeproj/project.pbxproj @@ -918,7 +918,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../node_modules/msgpack-cxx-4.1.1/include/**", + "$(SRCROOT)/../node_modules/msgpack-cxx-6.1.0/include", "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", @@ -957,8 +957,8 @@ "$(inherited)", "-Wl", "-ld_classic", - " ", - "-Wl -ld_classic ", + "-Wl", + "-ld_classic", ); OTHER_SWIFT_FLAGS = "-DDEBUG"; "OTHER_SWIFT_FLAGS[sdk=iphonesimulator*]" = "-DDEBUG -DSIMULATOR"; @@ -1014,7 +1014,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../node_modules/msgpack-cxx-4.1.1/include", + "$(SRCROOT)/../node_modules/msgpack-cxx-6.1.0/include", "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", @@ -1052,8 +1052,8 @@ "$(inherited)", "-Wl", "-ld_classic", - " ", - "-Wl -ld_classic ", + "-Wl", + "-ld_classic", ); OTHER_SWIFT_FLAGS = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; diff --git a/shared/ios/Podfile.lock b/shared/ios/Podfile.lock index cd809b8b4029..3ae75825bb7f 100644 --- a/shared/ios/Podfile.lock +++ b/shared/ios/Podfile.lock @@ -435,7 +435,7 @@ PODS: - React - react-native-image-keyboard (2.2.0): - React - - react-native-kb (0.1.0): + - react-native-kb (0.1.1): - React-Core - react-native-netinfo (9.4.1): - React-Core @@ -950,7 +950,7 @@ SPEC CHECKSUMS: react-native-flipper-performance-plugin: 42ec5017abd26e7c5a1f527f2db92c14a90cabdb react-native-hw-keyboard-event: b517cefb8d5c659a38049c582de85ff43337dc53 react-native-image-keyboard: adbf5996b8592a7d8cb8d3e431a9607f9cf3b270 - react-native-kb: 012aae36daea66781ffd175321b9510709094622 + react-native-kb: 00f70648f2f1e0ab1df703c6e8774f8ffffe121c react-native-netinfo: fefd4e98d75cbdd6e85fc530f7111a8afdf2b0c5 react-native-safe-area-context: 238cd8b619e05cb904ccad97ef42e84d1b5ae6ec react-native-webview: 8fc09f66a1a5b16bbe37c3878fda27d5982bb776 diff --git a/shared/package.json b/shared/package.json index f513eedd8aa2..d4d79389de1b 100644 --- a/shared/package.json +++ b/shared/package.json @@ -54,7 +54,7 @@ "tsc": "node --max-old-space-size=4096 ./node_modules/.bin/tsc --project ./tsconfig.json ", "modules": "yarn install --pure-lockfile --ignore-optional", "log-to-trace": "yarn _node desktop/yarn-helper/log-to-trace", - "pod-clean": "rm -rf ios/build; rm -rf ios/Pods; rm -f ios/.xcode.env.local", + "pod-clean": "pod cache clean --all ; rm -rf ios/build; rm -rf ios/Pods; rm -f ios/.xcode.env.local", "pod-install": "cd ios; pod install --repo-update", "pod-install-new": "cd ios; RCT_NEW_ARCH_ENABLED=1 pod install --repo-update", "android-clean": "cd android; ./gradlew clean", @@ -100,7 +100,7 @@ "expo-sms": "11.5.0", "expo-task-manager": "11.5.0", "fastestsmallesttextencoderdecoder": "1.0.22", - "framed-msgpack-rpc": "file:../../node-framed-msgpack-rpc", + "framed-msgpack-rpc": "keybase/node-framed-msgpack-rpc#nojima/HOTPOT-use-buffer", "google-libphonenumber": "3.2.33", "iced-runtime": "1.0.4", "lodash": "4.17.21", diff --git a/shared/yarn.lock b/shared/yarn.lock index ffdd3a2313f3..08909ba67347 100644 --- a/shared/yarn.lock +++ b/shared/yarn.lock @@ -1291,9 +1291,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" - integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== "@eslint/eslintrc@^2.1.2": version "2.1.2" @@ -2608,16 +2608,18 @@ integrity sha512-dEzDpaR+P/thkMsjsREQDX9OP8AMyLncTkgUgTTIxq5lJTlQffiLJt67ImDtaX+kC7CaNIX30pfdrrMZkym+eg== "@types/node@*": - version "20.8.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" - integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== + version "20.8.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" + integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@^18.11.18": - version "18.18.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.6.tgz#26da694f75cdb057750f49d099da5e3f3824cb3e" - integrity sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w== + version "18.18.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.7.tgz#bb3a7068dc4ba421b6968f2a259298b3a4e129e8" + integrity sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ== + dependencies: + undici-types "~5.26.4" "@types/prop-types@*": version "15.7.9" @@ -5659,9 +5661,9 @@ flow-enums-runtime@^0.0.5: integrity sha512-PSZF9ZuaZD03sT9YaIs0FrGJ7lSUw7rHZIex+73UYVXg46eL/wxN5PaVcPJFudE2cJu5f0fezitV5aBkLHPUOQ== flow-parser@0.*: - version "0.219.4" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.219.4.tgz#ee07223d2e6463afd5458724f7a9253c4c142032" - integrity sha512-HNskU8X5MRRfhgX1Y/kMYRUM9pIh0vbosYP2Gt5N6A9+ShsgxPWLh62SgfuGk+Qz+eboqCYBff4CEN1vATJ7AQ== + version "0.219.5" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.219.5.tgz#bff08036bd8f2aa7ebfd54a580dc418e37bc9c0e" + integrity sha512-lHx/cl2XjopBx/ma9RYhG7FGj2JLKacoBwtI3leOp8AwRDPGwu6bzJoaCMfIl/sq14KdtY5MGzd5q6nKfGzcuQ== flow-parser@^0.206.0: version "0.206.0" @@ -5707,8 +5709,9 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -"framed-msgpack-rpc@file:../../node-framed-msgpack-rpc": +framed-msgpack-rpc@keybase/node-framed-msgpack-rpc#nojima/HOTPOT-use-buffer: version "1.1.24" + resolved "https://codeload.github.com/keybase/node-framed-msgpack-rpc/tar.gz/e85c337b91a7cc2bae43e62328c461a6818458de" dependencies: iced-error "0.0.13" iced-lock "2.0.1" @@ -9153,9 +9156,9 @@ rcedit@^3.0.1: cross-spawn-windows-exe "^1.1.0" react-devtools-core@^4.27.2: - version "4.28.4" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.4.tgz#fb8183eada77093f4c2f9830e664bf22255abe27" - integrity sha512-IUZKLv3CimeM07G3vX4H4loxVpByrzq3HvfTX7v9migalwvLs9ZY5D3S3pKR33U+GguYfBBdMMZyToFhsSE/iQ== + version "4.28.5" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.5.tgz#c8442b91f068cdf0c899c543907f7f27d79c2508" + integrity sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA== dependencies: shell-quote "^1.6.1" ws "^7" @@ -10789,10 +10792,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" From ac0377fc479a58b25dcfcbb445b9bcd0c866fc97 Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Thu, 26 Oct 2023 09:46:50 -0400 Subject: [PATCH 5/5] WIP --- shared/todo.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/shared/todo.txt b/shared/todo.txt index b3545e2c7573..175c1027ef80 100644 --- a/shared/todo.txt +++ b/shared/todo.txt @@ -1,2 +1 @@ Some short term todos: -switch buffers to uint8array