Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Nov 6, 2023
2 parents e026a8e + d75acaf commit 3296817
Show file tree
Hide file tree
Showing 83 changed files with 2,722 additions and 322 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Set up git for OSBotify
id: setupGitForOSBotify
uses: Expensify/App/.github/actions/composite/setupGitForOSBotifyApp@8c19d6da4a3d7ce3b15c9cd89a802187d208ecab
with:
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
Expand Down Expand Up @@ -119,7 +120,7 @@ jobs:
**Important:** There may be conflicts that GitHub is not able to detect, so please _carefully_ review this pull request before approving."
gh pr edit --add-assignee "${{ github.actor }},${{ steps.getCPMergeCommit.outputs.MERGE_ACTOR }}"
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}

- name: "Announces a CP failure in the #announce Slack room"
uses: 8398a7/action-slack@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT"
fi
env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}

- name: Reopen and comment on issue (not a team member)
if: ${{ !fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) }}
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
COMMENT: |
Sorry, only members of @Expensify/Mobile-Deployers can close deploy checklists.
Expand All @@ -51,14 +51,14 @@ jobs:
id: checkDeployBlockers
uses: Expensify/App/.github/actions/javascript/checkDeployBlockers@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

- name: Reopen and comment on issue (has blockers)
if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS || 'false') }}
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
COMMENT: |
This issue either has unchecked items or has not yet been marked with the `:shipit:` emoji of approval.
Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ require('dotenv').config();

const defaultConfig = getDefaultConfig(__dirname);

const isUsingMockAPI = process.env.E2E_TESTING === 'true';
const isE2ETesting = process.env.E2E_TESTING === 'true';

if (isUsingMockAPI) {
if (isE2ETesting) {
// eslint-disable-next-line no-console
console.log('⚠️⚠️⚠️⚠️ Using mock API ⚠️⚠️⚠️⚠️');
}

const e2eSourceExts = ['e2e.js', 'e2e.ts'];

/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
Expand All @@ -22,10 +24,11 @@ if (isUsingMockAPI) {
const config = {
resolver: {
assetExts: _.filter(defaultAssetExts, (ext) => ext !== 'svg'),
sourceExts: [...defaultSourceExts, 'jsx', 'svg'],
// When we run the e2e tests we want files that have the extension e2e.js to be resolved as source files
sourceExts: [...(isE2ETesting ? e2eSourceExts : []), ...defaultSourceExts, 'jsx', 'svg'],
resolveRequest: (context, moduleName, platform) => {
const resolution = context.resolveRequest(context, moduleName, platform);
if (isUsingMockAPI && moduleName.includes('/API')) {
if (isE2ETesting && moduleName.includes('/API')) {
const originalPath = resolution.filePath;
const mockPath = originalPath.replace('src/libs/API.ts', 'src/libs/E2E/API.mock.js').replace('/src/libs/API.js/', 'src/libs/E2E/API.mock.js');
// eslint-disable-next-line no-console
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
"analyze-packages": "ANALYZE_BUNDLE=true webpack --config config/webpack/webpack.common.js --env envFile=.env.production",
"symbolicate:android": "npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map",
"symbolicate:ios": "npx metro-symbolicate main.jsbundle.map",
"test:e2e:main": "node tests/e2e/testRunner.js --development --branch main --skipCheckout",
"test:e2e:delta": "node tests/e2e/testRunner.js --development --branch main --label delta --skipCheckout",
"test:e2e:dev": "node tests/e2e/testRunner.js --development --skipCheckout --config ./config.dev.js --buildMode skip --skipInstallDeps",
"test:e2e:main": "node tests/e2e/testRunner.js --development --skipCheckout",
"test:e2e:delta": "node tests/e2e/testRunner.js --development --label delta --skipCheckout --skipInstallDeps",
"test:e2e:compare": "node tests/e2e/merge.js",
"gh-actions-unused-styles": "./.github/scripts/findUnusedKeys.sh",
"workflow-test": "./workflow_tests/scripts/runWorkflowTests.sh",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ function CarouselButtons({page, attachments, shouldShowArrows, onBack, onForward

CarouselButtons.propTypes = propTypes;
CarouselButtons.defaultProps = defaultProps;
CarouselButtons.displayName = 'CarouselButtons';

export default CarouselButtons;
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,6 @@ function CarouselItem({item, isFocused, onPress}) {

CarouselItem.propTypes = propTypes;
CarouselItem.defaultProps = defaultProps;
CarouselItem.displayName = 'CarouselItem';

export default CarouselItem;
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ function AttachmentCarouselPage({source, isAuthTokenRequired, isActive: initialI
</>
);
}

AttachmentCarouselPage.propTypes = pagePropTypes;
AttachmentCarouselPage.defaultProps = defaultProps;
AttachmentCarouselPage.displayName = 'AttachmentCarouselPage';

export default AttachmentCarouselPage;
Original file line number Diff line number Diff line change
Expand Up @@ -574,5 +574,6 @@ function ImageTransformer({imageWidth, imageHeight, imageScaleX, imageScaleY, sc
}
ImageTransformer.propTypes = imageTransformerPropTypes;
ImageTransformer.defaultProps = imageTransformerDefaultProps;
ImageTransformer.displayName = 'ImageTransformer';

export default ImageTransformer;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable es/no-optional-chaining */
import PropTypes from 'prop-types';
import React from 'react';
import {StyleSheet} from 'react-native';
Expand All @@ -19,6 +18,8 @@ function ImageWrapper({children}) {
</Animated.View>
);
}

ImageWrapper.propTypes = imageWrapperPropTypes;
ImageWrapper.displayName = 'ImageWrapper';

export default ImageWrapper;
3 changes: 2 additions & 1 deletion src/components/Attachments/AttachmentCarousel/Pager/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable es/no-optional-chaining */
import PropTypes from 'prop-types';
import React, {useImperativeHandle, useMemo, useRef, useState} from 'react';
import {View} from 'react-native';
Expand Down Expand Up @@ -168,8 +167,10 @@ function AttachmentCarouselPager({
</GestureHandlerRootView>
);
}

AttachmentCarouselPager.propTypes = pagerPropTypes;
AttachmentCarouselPager.defaultProps = pagerDefaultProps;
AttachmentCarouselPager.displayName = 'AttachmentCarouselPager';

const AttachmentCarouselPagerWithRef = React.forwardRef((props, ref) => (
<AttachmentCarouselPager
Expand Down
2 changes: 2 additions & 0 deletions src/components/Attachments/AttachmentCarousel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ function AttachmentCarousel({report, reportActions, source, onNavigate, setDownl
</View>
);
}

AttachmentCarousel.propTypes = propTypes;
AttachmentCarousel.defaultProps = defaultProps;
AttachmentCarousel.displayName = 'AttachmentCarousel';

export default compose(
withOnyx({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ function AttachmentCarousel({report, reportActions, source, onNavigate, onClose,
}
AttachmentCarousel.propTypes = propTypes;
AttachmentCarousel.defaultProps = defaultProps;
AttachmentCarousel.displayName = 'AttachmentCarousel';

export default compose(
withOnyx({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ function AttachmentViewImage({source, file, isAuthTokenRequired, loadComplete, o

AttachmentViewImage.propTypes = propTypes;
AttachmentViewImage.defaultProps = attachmentViewImageDefaultProps;
AttachmentViewImage.displayName = 'AttachmentViewImage';

export default compose(memo, withLocalize)(AttachmentViewImage);
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ function AttachmentViewImage({source, file, isAuthTokenRequired, isFocused, isUs

AttachmentViewImage.propTypes = propTypes;
AttachmentViewImage.defaultProps = attachmentViewImageDefaultProps;
AttachmentViewImage.displayName = 'AttachmentViewImage';

export default compose(memo, withLocalize)(AttachmentViewImage);
3 changes: 3 additions & 0 deletions src/components/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ function Avatar(props) {
</View>
);
}

Avatar.defaultProps = defaultProps;
Avatar.propTypes = propTypes;
Avatar.displayName = 'Avatar';

export default Avatar;
1 change: 1 addition & 0 deletions src/components/Composer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ function Composer({

Composer.propTypes = propTypes;
Composer.defaultProps = defaultProps;
Composer.displayName = 'Composer';

const ComposerWithRef = React.forwardRef((props, ref) => (
<Composer
Expand Down
1 change: 1 addition & 0 deletions src/components/InvertedFlatList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ InvertedFlatList.defaultProps = {
contentContainerStyle: {},
onScroll: () => {},
};
InvertedFlatList.displayName = 'InvertedFlatList';

const InvertedFlatListWithRef = forwardRef((props, ref) => (
<InvertedFlatList
Expand Down
Loading

0 comments on commit 3296817

Please sign in to comment.