Mobile: Fixes #13854: Fix some icons are invisible: Upgrade react-native-vector-icons to v12 (#13905)

This commit is contained in:
Henry Heino authored and GitHub committed 2025-12-18 01:12:14 +00:00
1 parent 1ede5bc499
commit 2798cc6027
19 files changed
+227 -180

No files matched your search

@@ -145,5 +145,3 @@ dependencies {
implementation jscFlavor
}
}
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
@@ -36,8 +36,5 @@ rootProject.name = 'Joplin'
expoAutolinking.useExpoVersionCatalog()
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':app'
includeBuild(expoAutolinking.reactNativeGradlePlugin)
+15 -12
View File
@@ -2,10 +2,9 @@
import * as React from 'react';
import { TextStyle, Text, StyleProp } from 'react-native';
const FontAwesomeIcon = require('react-native-vector-icons/FontAwesome5').default;
const AntIcon = require('react-native-vector-icons/AntDesign').default;
const MaterialCommunityIcon = require('react-native-vector-icons/MaterialCommunityIcons').default;
const Ionicon = require('react-native-vector-icons/Ionicons').default;
import { FontAwesome5 } from '@react-native-vector-icons/fontawesome5';
import { MaterialDesignIcons } from '@react-native-vector-icons/material-design-icons';
import { Ionicons } from '@react-native-vector-icons/ionicons';
interface Props {
name: string;
@@ -43,20 +42,24 @@ const Icon: React.FC<Props> = props => {
};
if (namePrefix.match(/^fa[bsr]?$/)) {
let iconStyle = 'solid';
if (namePrefix.startsWith('fab')) {
iconStyle = 'brand';
} else if (namePrefix.startsWith('fas')) {
iconStyle = 'solid';
}
return (
<FontAwesomeIcon
brand={namePrefix.startsWith('fab')}
solid={namePrefix.startsWith('fas')}
<FontAwesome5
name={nameSuffix}
iconStyle={iconStyle}
{...sharedProps}
/>
);
} else if (namePrefix === 'ant') {
return <AntIcon name={nameSuffix} {...sharedProps}/>;
} else if (namePrefix === 'material') {
return <MaterialCommunityIcon name={nameSuffix} {...sharedProps}/>;
return <MaterialDesignIcons name={nameSuffix} {...sharedProps}/>;
} else if (namePrefix === 'ionicon') {
return <Ionicon name={nameSuffix} {...sharedProps}/>;
return <Ionicons name={nameSuffix} {...sharedProps}/>;
} else if (namePrefix === 'text') {
return (
<Text
@@ -69,7 +72,7 @@ const Icon: React.FC<Props> = props => {
</Text>
);
} else {
return <FontAwesomeIcon name='cog' {...sharedProps}/>;
return <FontAwesome5 name='cog' {...sharedProps}/>;
}
};
@@ -126,12 +126,12 @@ const declarations: CommandDeclaration[] = [
{
name: EditorCommandType.IndentLess,
label: () => _('Decrease indent level'),
iconName: 'ant indent-left',
iconName: 'material format-indent-decrease',
},
{
name: EditorCommandType.IndentMore,
label: () => _('Increase indent level'),
iconName: 'ant indent-right',
iconName: 'material format-indent-increase',
},
{
name: `editor.${EditorCommandType.SwapLineDown}`,
@@ -2,7 +2,6 @@ import * as React from 'react';
import { PureComponent, ReactElement } from 'react';
import { connect } from 'react-redux';
import { View, Text, StyleSheet, TouchableOpacity, ViewStyle, Platform } from 'react-native';
const Icon = require('react-native-vector-icons/Ionicons').default;
import BackButtonService from '../../services/BackButtonService';
import NavService from '@joplin/lib/services/NavService';
import { _, _n } from '@joplin/lib/locale';
@@ -26,6 +25,7 @@ import WebBetaButton from './WebBetaButton';
import Menu, { MenuOptionType } from './Menu';
import shim from '@joplin/lib/shim';
import CommandService from '@joplin/lib/services/CommandService';
import Icon from '../Icon';
export { MenuOptionType };
// Rather than applying a padding to the whole bar, it is applied to each
@@ -282,7 +282,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
accessibilityHint={_('Show/hide the sidebar')}
accessibilityRole="button">
<View style={styles.sideMenuButton}>
<Icon name="menu" style={styles.topIcon} />
<Icon name="ionicon menu" style={styles.topIcon} accessibilityLabel={null} />
</View>
</TouchableOpacity>
);
@@ -299,8 +299,9 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
accessibilityRole="button">
<View style={disabled ? styles.backButtonDisabled : styles.backButton}>
<Icon
name="arrow-back"
name="ionicon arrow-back"
style={styles.topIcon}
accessibilityLabel={null}
/>
</View>
</TouchableOpacity>
@@ -688,7 +689,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
!menuOptions.length || !showContextMenuButton ? null : (
<Menu themeId={this.props.themeId} options={menuOptions}>
<View style={contextMenuStyle} accessibilityLabel={_('Actions')}>
<Icon name="ellipsis-vertical" style={this.styles().contextMenuTrigger} />
<Icon name="ionicon ellipsis-vertical" style={this.styles().contextMenuTrigger} accessibilityLabel={null}/>
</View>
</Menu>
);
@@ -2,7 +2,7 @@ import * as React from 'react';
import { useMemo } from 'react';
import { TouchableOpacity, Text, StyleSheet, ScrollView, View, ViewStyle } from 'react-native';
import { connect } from 'react-redux';
const Icon = require('react-native-vector-icons/Ionicons').default;
import { Ionicons as Icon } from '@react-native-vector-icons/ionicons';
import { themeStyle } from './global-style';
import { AppState } from '../utils/types';
@@ -6,7 +6,7 @@ import { Dispatch } from 'redux';
import { AccessibilityActionEvent, AccessibilityActionInfo, View } from 'react-native';
import { connect } from 'react-redux';
import BottomDrawer from '../BottomDrawer';
const Icon = require('react-native-vector-icons/Ionicons').default;
import { Ionicons as Icon } from '@react-native-vector-icons/ionicons';
type OnButtonPress = ()=> void;
interface ButtonSpec {
@@ -11,9 +11,9 @@ import { Button } from 'react-native-paper';
import createRootStyle from '../../utils/createRootStyle';
import ScreenHeader from '../ScreenHeader';
import Clipboard from '@react-native-clipboard/clipboard';
const Icon = require('react-native-vector-icons/Ionicons').default;
import Logger from '@joplin/utils/Logger';
import { reg } from '@joplin/lib/registry';
import Icon from '../Icon';
const logger = Logger.create('JoplinCloudLoginScreen');
@@ -179,7 +179,7 @@ const JoplinCloudScreenComponent = (props: Props) => {
</Text>
{state.active === 'LINK_USED' ? (
<Animated.View style={{ transform: [{ rotate: syncIconRotation }] }}>
<Icon name='sync' style={styles.loadingIcon}/>
<Icon name='ionicon sync' style={styles.loadingIcon} accessibilityLabel={_('Waiting for authorisation...')}/>
</Animated.View>
) : null }
</View>
@@ -3,7 +3,6 @@ import { useMemo, useEffect, useCallback, useContext } from 'react';
import { Easing, Animated, TouchableOpacity, Text, StyleSheet, ScrollView, View, Image, ImageStyle } from 'react-native';
import { Dispatch } from 'redux';
import { connect } from 'react-redux';
const IonIcon = require('react-native-vector-icons/Ionicons').default;
import Icon from './Icon';
import Folder from '@joplin/lib/models/Folder';
import Synchronizer from '@joplin/lib/Synchronizer';
@@ -203,8 +202,8 @@ const FolderItem: React.FC<FolderItemProps> = props => {
const baseStyles = props.styles;
const collapsed = props.collapsed;
const iconName = collapsed ? 'chevron-down' : 'chevron-up';
const iconComp = <IonIcon name={iconName} style={baseStyles.folderToggleIcon} />;
const iconName = collapsed ? 'ionicon chevron-down' : 'ionicon chevron-up';
const iconComp = <Icon name={iconName} style={baseStyles.folderToggleIcon} accessibilityLabel={null} />;
const onTogglePress = useCallback(() => {
props.onTogglePress(props.folder);
@@ -233,7 +232,7 @@ const FolderItem: React.FC<FolderItemProps> = props => {
if (folderId === getTrashFolderId()) {
folderIcon = getTrashFolderIcon(FolderIconType.FontAwesome);
} else if (props.alwaysShowFolderIcons) {
return <IonIcon name="folder-outline" style={baseStyles.folderBaseIcon} />;
return <Icon name="ionicon folder-outline" style={baseStyles.folderBaseIcon} accessibilityLabel={null} />;
} else {
return null;
}
@@ -2,26 +2,6 @@
* @jest-environment jsdom
*/
import { writeFileSync } from 'fs-extra';
import { join } from 'path';
import Setting from '@joplin/lib/models/Setting';
// Mock react-native-vector-icons -- it uses ESM imports, which, by default, are not
// supported by jest.
jest.doMock('react-native-vector-icons/Ionicons', () => {
return {
default: {
getImageSourceSync: () => {
// Create an empty file that can be read/used as an image resource.
const iconPath = join(Setting.value('cacheDir'), 'test-icon.png');
writeFileSync(iconPath, '', 'utf-8');
return { uri: iconPath };
},
},
};
});
import lightTheme from '@joplin/lib/themes/light';
import { editPopupClass, getEditPopupSource } from './useEditPopup';
import { describe, it, expect, beforeAll, jest } from '@jest/globals';
@@ -6,7 +6,7 @@ import { useMemo } from 'react';
import { extname } from 'path';
import shim from '@joplin/lib/shim';
import { Platform } from 'react-native';
const Icon = require('react-native-vector-icons/Ionicons').default;
import { Ionicons as Icon } from '@react-native-vector-icons/ionicons';
export const editPopupClass = 'joplin-editPopup';
@@ -342,30 +342,17 @@
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNDeviceInfo/RNDeviceInfoPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome6_Brands.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome6_Regular.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome6_Solid.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/react-native-image-picker/RNImagePickerPrivacyInfo.bundle",
"${PODS_ROOT}/../../node_modules/@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Brands.ttf",
"${PODS_ROOT}/../../node_modules/@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Regular.ttf",
"${PODS_ROOT}/../../node_modules/@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Solid.ttf",
"${PODS_ROOT}/../../node_modules/@react-native-vector-icons/ionicons/fonts/Ionicons.ttf",
"${PODS_ROOT}/../../node_modules/@react-native-vector-icons/material-design-icons/fonts/MaterialDesignIcons.ttf",
"${PODS_ROOT}/../../node_modules/@react-native-vector-icons/material-icons/fonts/MaterialIcons.ttf",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
@@ -375,30 +362,17 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNDeviceInfoPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome6_Brands.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome6_Regular.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome6_Solid.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNImagePickerPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialDesignIcons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
-1
View File
@@ -42,7 +42,6 @@ target 'Joplin' do
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'JoplinRNShareExtension', :path => 'ShareExtension'
post_install do |installer|
+49 -29
View File
@@ -1520,6 +1520,34 @@ PODS:
- React-Core
- react-native-sqlite-storage (6.0.1):
- React-Core
- react-native-vector-icons (12.3.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-vector-icons-fontawesome5 (12.3.0)
- react-native-vector-icons-ionicons (12.3.0)
- react-native-vector-icons-material-design-icons (12.4.0)
- react-native-vector-icons-material-icons (12.4.0)
- react-native-version-info (1.1.1):
- React-Core
- react-native-webview (13.15.0):
@@ -1916,30 +1944,6 @@ PODS:
- Yoga
- RNSVG (15.13.0):
- React-Core
- RNVectorIcons (10.3.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- SocketRocket (0.7.1)
- Yoga (0.0.0)
- ZXingObjC/Core (3.6.9)
@@ -2012,6 +2016,11 @@ DEPENDENCIES:
- "react-native-saf-x (from `../node_modules/@joplin/react-native-saf-x`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-sqlite-storage (from `../node_modules/react-native-sqlite-storage`)
- "react-native-vector-icons (from `../node_modules/@react-native-vector-icons/get-image`)"
- "react-native-vector-icons-fontawesome5 (from `../node_modules/@react-native-vector-icons/fontawesome5`)"
- "react-native-vector-icons-ionicons (from `../node_modules/@react-native-vector-icons/ionicons`)"
- "react-native-vector-icons-material-design-icons (from `../node_modules/@react-native-vector-icons/material-design-icons`)"
- "react-native-vector-icons-material-icons (from `../node_modules/@react-native-vector-icons/material-icons`)"
- react-native-version-info (from `../node_modules/react-native-version-info`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
@@ -2058,7 +2067,6 @@ DEPENDENCIES:
- RNSecureRandom (from `../node_modules/react-native-securerandom`)
- RNShare (from `../node_modules/react-native-share`)
- RNSVG (from `../node_modules/react-native-svg`)
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
SPEC REPOS:
@@ -2191,6 +2199,16 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-sqlite-storage:
:path: "../node_modules/react-native-sqlite-storage"
react-native-vector-icons:
:path: "../node_modules/@react-native-vector-icons/get-image"
react-native-vector-icons-fontawesome5:
:path: "../node_modules/@react-native-vector-icons/fontawesome5"
react-native-vector-icons-ionicons:
:path: "../node_modules/@react-native-vector-icons/ionicons"
react-native-vector-icons-material-design-icons:
:path: "../node_modules/@react-native-vector-icons/material-design-icons"
react-native-vector-icons-material-icons:
:path: "../node_modules/@react-native-vector-icons/material-icons"
react-native-version-info:
:path: "../node_modules/react-native-version-info"
react-native-webview:
@@ -2283,8 +2301,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-share"
RNSVG:
:path: "../node_modules/react-native-svg"
RNVectorIcons:
:path: "../node_modules/react-native-vector-icons"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
@@ -2351,6 +2367,11 @@ SPEC CHECKSUMS:
react-native-saf-x: 404f0f9a29cc6bf21d88582e054c45a11b28c22b
react-native-safe-area-context: 2243039f43d10cb1ea30ec5ac57fc6d1448413f4
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
react-native-vector-icons: a45ecc326ec090450f152dfc7076ce1173331ce5
react-native-vector-icons-fontawesome5: 271d813e27a86d30bb8cf1fc2f12dae74b74b69b
react-native-vector-icons-ionicons: ad07e944a092a5cf71b8b569d8f5ce2bf674c415
react-native-vector-icons-material-design-icons: 76cd460b3540b80527b4a80fb7f867f7deedb498
react-native-vector-icons-material-icons: d67e485a05560416ff6b5977d5fa7e0eb6af6870
react-native-version-info: f0b04e16111c4016749235ff6d9a757039189141
react-native-webview: 0dceb35a9d050f5fa55f7fe2d8c4d1903651eb7d
React-NativeModulesApple: 2c4377e139522c3d73f5df582e4f051a838ff25e
@@ -2397,11 +2418,10 @@ SPEC CHECKSUMS:
RNSecureRandom: b64d263529492a6897e236a22a2c4249aa1b53dc
RNShare: 40ace3f87cd881869e8085aced9dc16b425c74aa
RNSVG: 295a96bc43f2baa5958d64aeec9847a1d8ca7a3d
RNVectorIcons: e431ef1e6bef75d6ad0e33a83d376e6207962a9d
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
PODFILE CHECKSUM: 8140bf5e9b1f33537d13122a2fecbacaefb2ee5b
PODFILE CHECKSUM: 862189470c6e7bbee6a39c783bf65a36b631921c
COCOAPODS: 1.16.2
+15 -7
View File
@@ -112,14 +112,22 @@ jest.doMock('@expo/vector-icons/MaterialCommunityIcons', () => {
throw new Error('Not supported in testing environments.');
});
// Used by the renderer
jest.doMock('react-native-vector-icons/Ionicons', () => {
return {
default: class extends require('react-native').View {
const mockIconLibrary = (libraryName, exportName) => {
jest.doMock(libraryName, () => {
const MockIconComponent = class extends require('react-native').View {
// Used by the renderer
static getImageSourceSync = () => ({ uri: '' });
},
};
});
};
return {
default: MockIconComponent,
[exportName]: MockIconComponent,
};
});
};
mockIconLibrary('@react-native-vector-icons/ionicons', 'Ionicons');
mockIconLibrary('@react-native-vector-icons/material-design-icons', 'MaterialDesignIcons');
mockIconLibrary('@react-native-vector-icons/fontawesome5', 'FontAwesome5');
// react-native-fs's CachesDirectoryPath export doesn't work in a testing environment.
// Use a temporary folder instead.
+5 -1
View File
@@ -35,6 +35,11 @@
"@react-native-community/netinfo": "11.4.1",
"@react-native-community/push-notification-ios": "1.11.0",
"@react-native-documents/picker": "10.1.6",
"@react-native-vector-icons/fontawesome5": "12.3.0",
"@react-native-vector-icons/get-image": "12.3.0",
"@react-native-vector-icons/ionicons": "12.3.0",
"@react-native-vector-icons/material-design-icons": "12.4.0",
"@react-native-vector-icons/material-icons": "12.4.0",
"assert-browserify": "2.0.0",
"buffer": "6.0.3",
"color": "3.2.1",
@@ -74,7 +79,6 @@
"react-native-sqlite-storage": "6.0.1",
"react-native-svg": "15.13.0",
"react-native-url-polyfill": "2.0.0",
"react-native-vector-icons": "10.3.0",
"react-native-version-info": "1.1.1",
"react-native-webview": "13.15.0",
"react-native-zip-archive": "7.0.2",
+11 -16
View File
@@ -1,29 +1,24 @@
import fontAwesomeFont from 'react-native-vector-icons/Fonts/FontAwesome.ttf';
import fontAwesomeSolidFont from 'react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf';
import fontAwesomeRegularFont from 'react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf';
import fontAwesomeBrandsFont from 'react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf';
import ioniconFont from 'react-native-vector-icons/Fonts/Ionicons.ttf';
import materialCommunityIconsFont from 'react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';
import antDesignFont from 'react-native-vector-icons/Fonts/AntDesign.ttf';
import fontAwesomeSolidFont from '@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Solid.ttf';
import fontAwesomeRegularFont from '@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Regular.ttf';
import fontAwesomeBrandsFont from '@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Brands.ttf';
import ioniconFont from '@react-native-vector-icons/ionicons/fonts/Ionicons.ttf';
import materialCommunityIconsFont from '@react-native-vector-icons/material-icons/fonts/MaterialIcons.ttf';
import materialIconsFont from '@react-native-vector-icons/material-design-icons/fonts/MaterialDesignIcons.ttf';
// See https://www.npmjs.com/package/react-native-vector-icons
const setUpRnVectorIcons = () => {
const iconFontStyles = `
@font-face {
src: url(${fontAwesomeFont});
font-family: FontAwesome;
}
@font-face {
src: url(${fontAwesomeSolidFont});
font-family: FontAwesome5_Solid;
font-family: FontAwesome5Free-Solid;
}
@font-face {
src: url(${fontAwesomeRegularFont});
font-family: FontAwesome5_Regular;
font-family: FontAwesome5Free-Regular;
}
@font-face {
src: url(${fontAwesomeBrandsFont});
font-family: FontAwesome5_Brands;
font-family: FontAwesome5Brands-Regular;
}
@font-face {
src: url(${ioniconFont});
@@ -34,8 +29,8 @@ const setUpRnVectorIcons = () => {
font-family: MaterialCommunityIcons;
}
@font-face {
src: url(${antDesignFont});
font-family: AntDesign;
src: url(${materialIconsFont});
font-family: MaterialDesignIcons;
}
`;
+1 -2
View File
@@ -79,8 +79,7 @@ const buildSharedConfig = (hotReload: boolean): webpack.Configuration => {
'@react-native-documents/picker': emptyLibraryMock,
'react-native-exit-app': emptyLibraryMock,
'expo-camera': emptyLibraryMock,
// Remove this after upgrading react-native-vector-icons.
'@react-native-vector-icons/material-design-icons': throwOnLoadLibraryMock,
'react-native-vector-icons/MaterialCommunityIcons': throwOnLoadLibraryMock,
// Workaround for applying serviceworker types to a single file.
// See https://joshuatz.com/posts/2021/strongly-typed-service-workers/.
+104 -34
View File
@@ -10529,6 +10529,11 @@ __metadata:
"@react-native-community/netinfo": "npm:11.4.1"
"@react-native-community/push-notification-ios": "npm:1.11.0"
"@react-native-documents/picker": "npm:10.1.6"
"@react-native-vector-icons/fontawesome5": "npm:12.3.0"
"@react-native-vector-icons/get-image": "npm:12.3.0"
"@react-native-vector-icons/ionicons": "npm:12.3.0"
"@react-native-vector-icons/material-design-icons": "npm:12.4.0"
"@react-native-vector-icons/material-icons": "npm:12.4.0"
"@react-native/babel-preset": "npm:0.80.1"
"@react-native/metro-config": "npm:0.79.5"
"@react-native/typescript-config": "npm:0.80.2"
@@ -10594,7 +10599,6 @@ __metadata:
react-native-sqlite-storage: "npm:6.0.1"
react-native-svg: "npm:15.13.0"
react-native-url-polyfill: "npm:2.0.0"
react-native-vector-icons: "npm:10.3.0"
react-native-version-info: "npm:1.1.1"
react-native-web: "npm:0.21.1"
react-native-webview: "npm:13.15.0"
@@ -13591,6 +13595,84 @@ __metadata:
languageName: node
linkType: hard
"@react-native-vector-icons/common@npm:^12.3.0, @react-native-vector-icons/common@npm:^12.4.0":
version: 12.4.0
resolution: "@react-native-vector-icons/common@npm:12.4.0"
dependencies:
find-up: "npm:^7.0.0"
picocolors: "npm:^1.1.1"
plist: "npm:^3.1.0"
peerDependencies:
"@react-native-vector-icons/get-image": ^12.3.0
react: "*"
react-native: "*"
peerDependenciesMeta:
"@react-native-vector-icons/get-image":
optional: true
bin:
rnvi-update-plist: lib/commonjs/scripts/updatePlist.js
checksum: 10/9c59a8c21f98106621320f77b89e9ea11a2d59d70d61576742ffb65e7426537d3b218de46dd997c63422ff37347d44513e64d3305625423a21ec9a21581c8d94
languageName: node
linkType: hard
"@react-native-vector-icons/fontawesome5@npm:12.3.0":
version: 12.3.0
resolution: "@react-native-vector-icons/fontawesome5@npm:12.3.0"
dependencies:
"@react-native-vector-icons/common": "npm:^12.4.0"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/d11626e7ccb4698c97c970796a3d8b6b6d23c768611ba1ef29b73883678592294c97de007b20dda085a02a25f06ab3c1e77dd7fe0f68b71824a9869cc68249b6
languageName: node
linkType: hard
"@react-native-vector-icons/get-image@npm:12.3.0":
version: 12.3.0
resolution: "@react-native-vector-icons/get-image@npm:12.3.0"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/c5e447ebc528efed360c05e2f5c170adcc0b51c84ee026a23b655b0e45ee990505b17f4cb306afce83b766f4c3dd6ea25bf3bdb772f700ccce0a0b31c049c18e
languageName: node
linkType: hard
"@react-native-vector-icons/ionicons@npm:12.3.0":
version: 12.3.0
resolution: "@react-native-vector-icons/ionicons@npm:12.3.0"
dependencies:
"@react-native-vector-icons/common": "npm:^12.3.0"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/da342a72ef599de1d897e8fe1acee50d58b95c7c253fd26f4a831fd5488d2826a636fb259e8b5970ab45e9e85790cffd3552837a025b0f2310f571f71effcbeb
languageName: node
linkType: hard
"@react-native-vector-icons/material-design-icons@npm:12.4.0":
version: 12.4.0
resolution: "@react-native-vector-icons/material-design-icons@npm:12.4.0"
dependencies:
"@react-native-vector-icons/common": "npm:^12.4.0"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/15227f2acab0367cad5315248bd8444a3aaa8a620a7ce96649abd5667f57a781aaa442753d6841791cd07b51ae41ec7c0118eae8ebc0444584702c8b0e06c882
languageName: node
linkType: hard
"@react-native-vector-icons/material-icons@npm:12.4.0":
version: 12.4.0
resolution: "@react-native-vector-icons/material-icons@npm:12.4.0"
dependencies:
"@react-native-vector-icons/common": "npm:^12.4.0"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10/472eb93fe551716558e4178707e08c854c05861acb2f7baff53222f13e0d0c0a02f790cfa20fcfb20eb8df1a5562f87380480b02419019c388db223d9a78779b
languageName: node
linkType: hard
"@react-native/assets-registry@npm:0.79.2":
version: 0.79.2
resolution: "@react-native/assets-registry@npm:0.79.2"
@@ -29058,6 +29140,17 @@ __metadata:
languageName: node
linkType: hard
"find-up@npm:^7.0.0":
version: 7.0.0
resolution: "find-up@npm:7.0.0"
dependencies:
locate-path: "npm:^7.2.0"
path-exists: "npm:^5.0.0"
unicorn-magic: "npm:^0.1.0"
checksum: 10/7e6b08fbc05a10677e25e74bb0a020054a86b31d1806c5e6a9e32e75472bbf177210bc16e5f97453be8bda7ae2e3d97669dbb2901f8c30b39ce53929cbea6746
languageName: node
linkType: hard
"findit@npm:^2.0.0":
version: 2.0.0
resolution: "findit@npm:2.0.0"
@@ -36189,7 +36282,7 @@ __metadata:
languageName: node
linkType: hard
"locate-path@npm:^7.1.0":
"locate-path@npm:^7.1.0, locate-path@npm:^7.2.0":
version: 7.2.0
resolution: "locate-path@npm:7.2.0"
dependencies:
@@ -41720,7 +41813,7 @@ __metadata:
languageName: node
linkType: hard
"plist@npm:^3.0.4, plist@npm:^3.0.5":
"plist@npm:^3.0.4, plist@npm:^3.0.5, plist@npm:^3.1.0":
version: 3.1.0
resolution: "plist@npm:3.1.0"
dependencies:
@@ -43894,21 +43987,6 @@ __metadata:
languageName: node
linkType: hard
"react-native-vector-icons@npm:10.3.0":
version: 10.3.0
resolution: "react-native-vector-icons@npm:10.3.0"
dependencies:
prop-types: "npm:^15.7.2"
yargs: "npm:^16.1.1"
bin:
fa-upgrade.sh: bin/fa-upgrade.sh
fa5-upgrade: bin/fa5-upgrade.sh
fa6-upgrade: bin/fa6-upgrade.sh
generate-icon: bin/generate-icon.js
checksum: 10/8f83860985f89be7c6a46298e23802aad12d1743987b015d7eaf4eb206d03e1818d3b48c1ad9a19ec1e0a3a17a8ecf22385ab52b0cfb16f6602a3df264ec87cb
languageName: node
linkType: hard
"react-native-version-info@npm:1.1.1":
version: 1.1.1
resolution: "react-native-version-info@npm:1.1.1"
@@ -51330,6 +51408,13 @@ __metadata:
languageName: node
linkType: hard
"unicorn-magic@npm:^0.1.0":
version: 0.1.0
resolution: "unicorn-magic@npm:0.1.0"
checksum: 10/9b4d0e9809807823dc91d0920a4a4c0cff2de3ebc54ee87ac1ee9bc75eafd609b09d1f14495e0173aef26e01118706196b6ab06a75fe0841028b3983a8af313f
languageName: node
linkType: hard
"unified@npm:9.2.0":
version: 9.2.0
resolution: "unified@npm:9.2.0"
@@ -53839,7 +53924,7 @@ __metadata:
languageName: node
linkType: hard
"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3":
"yargs-parser@npm:^20.2.3":
version: 20.2.9
resolution: "yargs-parser@npm:20.2.9"
checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc
@@ -53925,21 +54010,6 @@ __metadata:
languageName: node
linkType: hard
"yargs@npm:^16.1.1":
version: 16.2.0
resolution: "yargs@npm:16.2.0"
dependencies:
cliui: "npm:^7.0.2"
escalade: "npm:^3.1.1"
get-caller-file: "npm:^2.0.5"
require-directory: "npm:^2.1.1"
string-width: "npm:^4.2.0"
y18n: "npm:^5.0.5"
yargs-parser: "npm:^20.2.2"
checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e
languageName: node
linkType: hard
"yargs@npm:^17.3.1":
version: 17.5.1
resolution: "yargs@npm:17.5.1"