diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f552254f30e2..033342db30b9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -85,7 +85,6 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c - [ ] iOS: Native - [ ] iOS: mWeb Safari - [ ] MacOS: Chrome / Safari - - [ ] MacOS: Desktop - [ ] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed) - [ ] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx` - [ ] I followed proper code patterns (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code)) @@ -157,11 +156,4 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c - - -
-MacOS: Desktop - - - -
+ \ No newline at end of file diff --git a/.github/actions/composite/setupNode/action.yml b/.github/actions/composite/setupNode/action.yml index c12ef3636066..00fb5d7283f3 100644 --- a/.github/actions/composite/setupNode/action.yml +++ b/.github/actions/composite/setupNode/action.yml @@ -6,10 +6,6 @@ inputs: description: "Indicates if node is set up for hybrid app" required: false default: 'false' - IS_DESKTOP_BUILD: - description: "Indicates if node is set up for desktop app" - required: false - default: 'false' outputs: cache-hit: @@ -27,9 +23,7 @@ runs: with: node-version-file: '.nvmrc' cache: npm - cache-dependency-path: | - normalized-package-lock.json - desktop/package-lock.json + cache-dependency-path: normalized-package-lock.json - id: cache-node-modules # v4 @@ -46,14 +40,6 @@ runs: path: Mobile-Expensify/node_modules key: ${{ runner.os }}-node-modules-${{ hashFiles('Mobile-Expensify/package-lock.json', 'Mobile-Expensify/patches/**') }} - - id: cache-desktop-node-modules - if: inputs.IS_DESKTOP_BUILD == 'true' - # v4 - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 - with: - path: desktop/node_modules - key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json', 'desktop/patches/**') }} - - name: Remove ND node_modules if needed for hybrid app build if: inputs.IS_HYBRID_BUILD == 'true' && steps.cache-node-modules.outputs.cache-hit == 'true' && steps.cache-old-dot-node-modules.outputs.cache-hit != 'true' shell: bash @@ -65,12 +51,4 @@ runs: with: timeout_minutes: 30 max_attempts: 3 - command: npm ci - - - name: Install node packages for desktop submodule - if: inputs.IS_DESKTOP_BUILD == 'true' && steps.cache-desktop-node-modules.outputs.cache-hit != 'true' - uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847 - with: - timeout_minutes: 30 - max_attempts: 3 - command: cd desktop && npm ci + command: npm ci \ No newline at end of file diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/action.yml b/.github/actions/javascript/markPullRequestsAsDeployed/action.yml index f7af5e586968..b8a39af6c3ae 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/action.yml +++ b/.github/actions/javascript/markPullRequestsAsDeployed/action.yml @@ -20,9 +20,6 @@ inputs: ANDROID: description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')" required: true - DESKTOP: - description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')" - required: true IOS: description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')" required: true diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index d8d7a926f00b..a13c54e6b1ae 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -12840,7 +12840,6 @@ async function run() { const isProd = ActionUtils.getJSONInput('IS_PRODUCTION_DEPLOY', { required: true }); const version = core.getInput('DEPLOY_VERSION', { required: true }); const androidResult = getDeployTableMessage(core.getInput('ANDROID', { required: true })); - const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', { required: true })); const iOSResult = getDeployTableMessage(core.getInput('IOS', { required: true })); const webResult = getDeployTableMessage(core.getInput('WEB', { required: true })); const date = core.getInput('DATE'); @@ -12852,7 +12851,7 @@ async function run() { message += `on ${date}`; } message += `šŸš€`; - message += `\n\nplatform | result\n---|---\nšŸ–„ desktop šŸ–„|${desktopResult}`; + message += `\n\nplatform | result\n---|---`; message += `\nšŸ•ø web šŸ•ø|${webResult}`; message += `\nšŸ¤– android šŸ¤–|${androidResult}\nšŸŽ iOS šŸŽ|${iOSResult}`; if (note) { diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts b/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts index 93131cb8125e..bf7ce3c35f44 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts +++ b/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts @@ -103,7 +103,6 @@ async function run() { const version = core.getInput('DEPLOY_VERSION', {required: true}); const androidResult = getDeployTableMessage(core.getInput('ANDROID', {required: true}) as PlatformResult); - const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', {required: true}) as PlatformResult); const iOSResult = getDeployTableMessage(core.getInput('IOS', {required: true}) as PlatformResult); const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}) as PlatformResult); @@ -117,7 +116,7 @@ async function run() { message += `on ${date}`; } message += `šŸš€`; - message += `\n\nplatform | result\n---|---\nšŸ–„ desktop šŸ–„|${desktopResult}`; + message += `\n\nplatform | result\n---|---`; message += `\nšŸ•ø web šŸ•ø|${webResult}`; message += `\nšŸ¤– android šŸ¤–|${androidResult}\nšŸŽ iOS šŸŽ|${iOSResult}`; diff --git a/.github/actions/javascript/postTestBuildComment/action.yml b/.github/actions/javascript/postTestBuildComment/action.yml index ad97aa9015f4..ea2c75475f9e 100644 --- a/.github/actions/javascript/postTestBuildComment/action.yml +++ b/.github/actions/javascript/postTestBuildComment/action.yml @@ -16,9 +16,6 @@ inputs: ANDROID: description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')" required: false - DESKTOP: - description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')" - required: false IOS: description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')" required: false @@ -28,9 +25,6 @@ inputs: ANDROID_LINK: description: "Link for the Android build" required: false - DESKTOP_LINK: - description: "Link for the desktop build" - required: false IOS_LINK: description: "Link for the iOS build" required: false diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js index eb1ade0901c4..3a31cd257a72 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -11585,12 +11585,11 @@ const github_1 = __nccwpck_require__(5438); const CONST_1 = __importDefault(__nccwpck_require__(9873)); const GithubUtils_1 = __importDefault(__nccwpck_require__(9296)); function getTestBuildMessage(appPr, mobileExpensifyPr) { - const inputs = ['ANDROID', 'DESKTOP', 'IOS', 'WEB']; + const inputs = ['ANDROID', 'IOS', 'WEB']; const names = { [inputs[0]]: 'Android', - [inputs[1]]: 'Desktop', - [inputs[2]]: 'iOS', - [inputs[3]]: 'Web', + [inputs[1]]: 'iOS', + [inputs[2]]: 'Web', }; const result = inputs.reduce((acc, platform) => { const input = core.getInput(platform, { required: false }); @@ -11619,17 +11618,17 @@ function getTestBuildMessage(appPr, mobileExpensifyPr) { }; return acc; }, {}); - const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS${appPr ? ', Desktop, and Web' : ''}. Happy testing! :test_tube::test_tube: + const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS${appPr ? ', and Web' : ''}. Happy testing! :test_tube::test_tube: Built from${appPr ? ` App PR Expensify/App#${appPr}` : ''}${mobileExpensifyPr ? ` Mobile-Expensify PR Expensify/Mobile-Expensify#${mobileExpensifyPr}` : ''}. | Android :robot: | iOS :apple: | | ------------- | ------------- | | ${result.ANDROID.link} | ${result.IOS.link} | | ${result.ANDROID.qrCode} | ${result.IOS.qrCode} | -| Desktop :computer: | Web :spider_web: | -| ------------- | ------------- | -| ${result.DESKTOP.link} | ${result.WEB.link} | -| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} | +| Web :spider_web: | +| ------------- | +| ${result.WEB.link} | +| ${result.WEB.qrCode} | --- diff --git a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts index 8a825cf8e09c..a2278e10fce5 100644 --- a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts +++ b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts @@ -5,12 +5,11 @@ import CONST from '@github/libs/CONST'; import GithubUtils from '@github/libs/GithubUtils'; function getTestBuildMessage(appPr?: number, mobileExpensifyPr?: number): string { - const inputs = ['ANDROID', 'DESKTOP', 'IOS', 'WEB'] as const; + const inputs = ['ANDROID', 'IOS', 'WEB'] as const; const names = { [inputs[0]]: 'Android', - [inputs[1]]: 'Desktop', - [inputs[2]]: 'iOS', - [inputs[3]]: 'Web', + [inputs[1]]: 'iOS', + [inputs[2]]: 'Web', }; const result = inputs.reduce( @@ -47,17 +46,17 @@ function getTestBuildMessage(appPr?: number, mobileExpensifyPr?: number): string {} as Record, {link: string; qrCode: string}>, ); - const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS${appPr ? ', Desktop, and Web' : ''}. Happy testing! :test_tube::test_tube: + const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS${appPr ? ', and Web' : ''}. Happy testing! :test_tube::test_tube: Built from${appPr ? ` App PR Expensify/App#${appPr}` : ''}${mobileExpensifyPr ? ` Mobile-Expensify PR Expensify/Mobile-Expensify#${mobileExpensifyPr}` : ''}. | Android :robot: | iOS :apple: | | ------------- | ------------- | | ${result.ANDROID.link} | ${result.IOS.link} | | ${result.ANDROID.qrCode} | ${result.IOS.qrCode} | -| Desktop :computer: | Web :spider_web: | -| ------------- | ------------- | -| ${result.DESKTOP.link} | ${result.WEB.link} | -| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} | +| Web :spider_web: | +| ------------- | +| ${result.WEB.link} | +| ${result.WEB.qrCode} | --- diff --git a/.github/workflows/checkE2ETestCode.yml b/.github/workflows/checkE2ETestCode.yml index 60ca53e2699f..25c2be16c28b 100644 --- a/.github/workflows/checkE2ETestCode.yml +++ b/.github/workflows/checkE2ETestCode.yml @@ -19,8 +19,6 @@ jobs: - name: Setup Node uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: 'true' - name: Verify e2e tests compile correctly run: npm run e2e-test-runner-build diff --git a/.github/workflows/checkSVGCompression.yml b/.github/workflows/checkSVGCompression.yml index 5947a04a454d..534c5aaf367d 100644 --- a/.github/workflows/checkSVGCompression.yml +++ b/.github/workflows/checkSVGCompression.yml @@ -26,8 +26,6 @@ jobs: - name: Setup Node uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - name: Compress SVG check uses: ./.github/actions/javascript/checkSVGCompression diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f893cb6200bf..7fdd3ef5f3b6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -286,70 +286,6 @@ jobs: GITHUB_TOKEN: ${{ github.token }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - desktop: - name: Build and deploy Desktop - needs: prep - runs-on: macos-14-large - steps: - - name: Checkout - # v4 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - - name: Setup Node - uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - - # v6.0.0 - - name: Setup Python for node-gyp - id: setup-python - uses: actions/setup-python@18566f86b301499665bd3eb1a2247e0849c64fa5 - with: - python-version: '3.12' - cache: 'pip' - cache-dependency-path: desktop/requirements.txt - - - name: Ensure setuptools for node-gyp - run: pip install --upgrade -r desktop/requirements.txt - - - name: Load Desktop credentials from 1Password - id: load-credentials - # v2 - uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 - with: - export-env: false - env: - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - DESKTOP_CERTIFICATE_BASE64: "op://${{ vars.OP_VAULT }}/Desktop Certificates.p12/CSC_LINK" - DESKTOP_CERTIFICATE_PASSWORD: "op://${{ vars.OP_VAULT }}/Desktop Certificates.p12/CSC_KEY_PASSWORD" - - - name: Build desktop app - run: ${{ github.ref == 'refs/heads/production' && 'npm run desktop-build' || 'npm run desktop-build-staging' }} - env: - CSC_LINK: ${{ steps.load-credentials.outputs.DESKTOP_CERTIFICATE_BASE64 }} - CSC_KEY_PASSWORD: ${{ steps.load-credentials.outputs.DESKTOP_CERTIFICATE_PASSWORD }} - APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - GCP_GEOLOCATION_API_KEY: ${{ secrets.GCP_GEOLOCATION_API_KEY_PRODUCTION }} - S3_BUCKET: ${{ github.ref == 'refs/heads/production' && vars.PRODUCTION_S3_BUCKET || vars.STAGING_S3_BUCKET }} - - - name: Upload desktop sourcemaps artifact - # v4 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: desktop-sourcemaps-artifact - path: ./desktop/dist/www/merged-source-map.js.map - - - name: Upload desktop build artifact - # v4 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: desktop-build-artifact - path: ./desktop-build/NewExpensify.dmg - ios: name: Build and deploy iOS HybridApp needs: prep @@ -613,7 +549,7 @@ jobs: name: Post a Slack message when any platform fails to build or deploy runs-on: ubuntu-latest if: ${{ failure() }} - needs: [android, desktop, ios, web] + needs: [android, ios, web] steps: - name: Checkout # v4 @@ -629,7 +565,7 @@ jobs: outputs: IS_AT_LEAST_ONE_PLATFORM_DEPLOYED: ${{ steps.checkDeploymentSuccessOnAtLeastOnePlatform.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED }} IS_ALL_PLATFORMS_DEPLOYED: ${{ steps.checkDeploymentSuccessOnAllPlatforms.outputs.IS_ALL_PLATFORMS_DEPLOYED }} - needs: [android, desktop, ios, web] + needs: [android, ios, web] if: ${{ always() }} steps: - name: Check deployment success on at least one platform @@ -638,7 +574,6 @@ jobs: isAtLeastOnePlatformDeployed="false" if [ "${{ needs.iOS.result }}" == "success" ] || \ [ "${{ needs.android.result }}" == "success" ] || \ - [ "${{ needs.desktop.result }}" == "success" ] || \ [ "${{ needs.web.result }}" == "success" ]; then isAtLeastOnePlatformDeployed="true" fi @@ -651,7 +586,6 @@ jobs: isAllPlatformsDeployed="false" if [ "${{ needs.iOS.result }}" == "success" ] && \ [ "${{ needs.android.result }}" == "success" ] && \ - [ "${{ needs.desktop.result }}" == "success" ] && \ [ "${{ needs.web.result }}" == "success" ]; then isAllPlatformsDeployed="true" fi @@ -699,10 +633,9 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name + - name: Rename web sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name continue-on-error: true run: | - mv ./desktop-sourcemaps-artifact/merged-source-map.js.map ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map mv ./web-sourcemaps-artifact/merged-source-map.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map - name: Upload artifacts to GitHub Release @@ -713,8 +646,6 @@ jobs: ./android-build-artifact/Expensify-release.aab#android.aab ./android-apk-artifact/Expensify.apk#android.apk ./android-sourcemap-artifact/index.android.bundle.map#android-sourcemap.js.map - ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-sourcemap.js.map - ./desktop-build-artifact/NewExpensify.dmg#desktop.dmg ./ios-build-artifact/Expensify.ipa#ios.ipa ./ios-sourcemap-artifact/main.jsbundle.map#ios-sourcemap.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map#web-sourcemap.js.map @@ -774,7 +705,7 @@ jobs: name: Post a Slack message when all platforms deploy successfully runs-on: ubuntu-latest if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_ALL_PLATFORMS_DEPLOYED) }} - needs: [prep, android, desktop, ios, web, checkDeploymentSuccess, createRelease] + needs: [prep, android, ios, web, checkDeploymentSuccess, createRelease] steps: - name: 'Announces the deploy in the #announce Slack room' # v3 @@ -831,7 +762,7 @@ jobs: postGithubComments: uses: ./.github/workflows/postDeployComments.yml if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }} - needs: [prep, android, desktop, ios, web, checkDeploymentSuccess, createRelease] + needs: [prep, android, ios, web, checkDeploymentSuccess, createRelease] secrets: inherit with: version: ${{ needs.prep.outputs.APP_VERSION }} @@ -839,4 +770,3 @@ jobs: android: ${{ needs.android.result }} ios: ${{ needs.ios.result }} web: ${{ needs.web.result }} - desktop: ${{ needs.desktop.result }} diff --git a/.github/workflows/e2ePerformanceTests.yml b/.github/workflows/e2ePerformanceTests.yml index de82e002c96b..822deea3edd6 100644 --- a/.github/workflows/e2ePerformanceTests.yml +++ b/.github/workflows/e2ePerformanceTests.yml @@ -113,8 +113,6 @@ jobs: - name: Setup Node uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: 'true' - name: Make zip directory for everything to send to AWS Device Farm run: mkdir zip diff --git a/.github/workflows/lint-changed.yml b/.github/workflows/lint-changed.yml index 7bba2072bdd6..00f05209cfa7 100644 --- a/.github/workflows/lint-changed.yml +++ b/.github/workflows/lint-changed.yml @@ -54,8 +54,6 @@ jobs: - name: Setup Node uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - name: Run ESLint to check for deprecation warnings run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fe3855db4b54..baa630c61ef8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,8 +23,6 @@ jobs: - name: Setup Node uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - name: Lint JavaScript and Typescript with ESLint run: npm run lint diff --git a/.github/workflows/postDeployComments.yml b/.github/workflows/postDeployComments.yml index 1b653085c114..35123e3d1504 100644 --- a/.github/workflows/postDeployComments.yml +++ b/.github/workflows/postDeployComments.yml @@ -23,10 +23,6 @@ on: description: Web deploy status required: true type: string - desktop: - description: Desktop deploy status - required: true - type: string secrets: OS_BOTIFY_TOKEN: description: Token for accessing Mobile-Expensify repository @@ -71,15 +67,6 @@ on: - failure - cancelled - skipped - desktop: - description: Desktop deploy status - required: true - type: choice - options: - - success - - failure - - cancelled - - skipped date: description: The date when this deploy occurred required: false @@ -118,7 +105,6 @@ jobs: DEPLOY_VERSION: ${{ inputs.version }} GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} ANDROID: ${{ inputs.android }} - DESKTOP: ${{ inputs.desktop }} IOS: ${{ inputs.ios }} WEB: ${{ inputs.web }} DATE: ${{ inputs.date }} diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 5b68e033ee66..12af5722e60e 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -23,8 +23,6 @@ jobs: - name: Setup Node uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - name: Verify there's no Prettier diff run: | diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 13139f888ed7..a1de9107f02d 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -22,10 +22,6 @@ on: description: Should build web app? type: boolean default: true - DESKTOP: - description: Should build desktop app? - type: boolean - default: true IOS: description: Should build iOS app? type: boolean @@ -162,73 +158,6 @@ jobs: body: `🚧 @${{ github.actor }} has triggered a test Expensify/Mobile-Expensify build. You can view the [workflow run here](${workflowURL}).` }); - desktop: - name: Build and deploy Desktop for testing - if: ${{ inputs.DESKTOP && inputs.APP_PULL_REQUEST_NUMBER }} - needs: [prep] - runs-on: macos-14-large - steps: - - name: Checkout - # v4 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: ${{ needs.prep.outputs.APP_REF }} - - - name: Create .env.adhoc file based on staging and add PULL_REQUEST_NUMBER env to it - run: | - cp .env.staging .env.adhoc - sed -i '' 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc - echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc - - - name: Setup Node - uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - - # v6.0.0 - - name: Setup python for node-gyp - id: setup-python - uses: actions/setup-python@18566f86b301499665bd3eb1a2247e0849c64fa5 - with: - python-version: '3.12' - cache: 'pip' - cache-dependency-path: desktop/requirements.txt - - - name: Ensure setuptools for node-gyp - run: pip install --upgrade -r desktop/requirements.txt - - - name: Load Desktop credentials from 1Password - id: load-credentials - # v2 - uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 - with: - export-env: false - env: - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - DESKTOP_CERTIFICATE_BASE64: "op://${{ vars.OP_VAULT }}/Desktop Certificates.p12/CSC_LINK" - DESKTOP_CERTIFICATE_PASSWORD: "op://${{ vars.OP_VAULT }}/Desktop Certificates.p12/CSC_KEY_PASSWORD" - - - name: Configure AWS Credentials - # v4 - uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Build desktop app for testing - run: npm run desktop-build-adhoc - env: - CSC_LINK: ${{ steps.load-credentials.outputs.DESKTOP_CERTIFICATE_BASE64 }} - CSC_KEY_PASSWORD: ${{ steps.load-credentials.outputs.DESKTOP_CERTIFICATE_PASSWORD }} - APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - GCP_GEOLOCATION_API_KEY: ${{ secrets.GCP_GEOLOCATION_API_KEY_STAGING }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - web: name: Build and deploy Web if: ${{ inputs.WEB && inputs.APP_PULL_REQUEST_NUMBER }} @@ -497,7 +426,7 @@ jobs: runs-on: ubuntu-latest if: always() name: Post a GitHub comment with app download links for testing - needs: [prep, getMobileExpensifyPR, desktop, web, androidHybrid, iosHybrid] + needs: [prep, getMobileExpensifyPR, web, androidHybrid, iosHybrid] steps: - name: Checkout # v4 @@ -518,11 +447,9 @@ jobs: MOBILE_EXPENSIFY_PR_NUMBER: ${{ needs.getMobileExpensifyPR.outputs.MOBILE_EXPENSIFY_PR }} GITHUB_TOKEN: ${{ github.token }} ANDROID: ${{ needs.androidHybrid.result }} - DESKTOP: ${{ needs.desktop.result }} IOS: ${{ needs.iosHybrid.result }} WEB: ${{ needs.web.result }} ANDROID_LINK: ${{ needs.androidHybrid.outputs.S3_APK_PATH }} - DESKTOP_LINK: https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/${{ inputs.APP_PULL_REQUEST_NUMBER }}/NewExpensify.dmg IOS_LINK: ${{ needs.iosHybrid.outputs.IOS_PATH }} WEB_LINK: https://${{ inputs.APP_PULL_REQUEST_NUMBER }}.pr-testing.expensify.com diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index c675f3a3b5a2..6d48f9a933c8 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -19,8 +19,6 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 - uses: ./.github/actions/composite/setupNode - with: - IS_DESKTOP_BUILD: true - name: Type check with TypeScript run: npm run typecheck diff --git a/contributingGuides/CONTRIBUTING.md b/contributingGuides/CONTRIBUTING.md index 2ee6d448d825..fd5e9aa90a99 100644 --- a/contributingGuides/CONTRIBUTING.md +++ b/contributingGuides/CONTRIBUTING.md @@ -180,8 +180,8 @@ Additionally, if you want to discuss an idea with the open source community with 3. Lint - All code must pass lint checks before a merge of a pull request 15. Please never force push when a PR review has already started (because this messes with the PR review history) 16. Please pay attention to the pull request template, especially to how we link PRs with issues they fix. Make sure you don't use GitHub keywords such as `fixes` in your PR description, as this can break our current automated steps for issue management. Follow the PR template format carefully. -17. Upon submission of a PR, please include a numbered list of explicit testing steps for each platform (Web, Desktop, iOS, Android, and Mobile Web) to confirm the fix works as expected and there are no regressions. -18. Please add a screenshot of the app running on each platform (Web, Desktop, iOS, Android, Mobile Web). +17. Upon submission of a PR, please include a numbered list of explicit testing steps for each platform (Web, iOS, Android, and Mobile Web) to confirm the fix works as expected and there are no regressions. +18. Please add a screenshot of the app running on each platform (Web, iOS, Android, Mobile Web). ### Completing the final checklist 19. Once your PR has been deployed to production, a checklist will automatically be commented in the GH issue. You're required to complete the steps that have your name mentioned before payment will be issued. diff --git a/contributingGuides/REVIEWER_CHECKLIST.md b/contributingGuides/REVIEWER_CHECKLIST.md index 61c8a0f2bab7..08d033144f1c 100644 --- a/contributingGuides/REVIEWER_CHECKLIST.md +++ b/contributingGuides/REVIEWER_CHECKLIST.md @@ -16,7 +16,6 @@ - [ ] iOS: HybridApp - [ ] iOS: mWeb Safari - [ ] MacOS: Chrome / Safari - - [ ] MacOS: Desktop - [ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack - [ ] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx` - [ ] I verified proper code patterns were followed (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code)) @@ -95,10 +94,3 @@ - -
-MacOS: Desktop - - - -
diff --git a/contributingGuides/SETUP_DESKTOP.md b/contributingGuides/SETUP_DESKTOP.md deleted file mode 100644 index 2a4c36cce2d0..000000000000 --- a/contributingGuides/SETUP_DESKTOP.md +++ /dev/null @@ -1,99 +0,0 @@ -# Desktop Setup Instructions - -## Prerequisites - -### Desktop-Specific Prerequisites - -1. **Install mkcert and Setup HTTPS** - - Install `mkcert`: `brew install mkcert` followed by `npm run setup-https`. If you are not using macOS, follow the instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation). - -2. **Configure Local Hosts** - - Create a host entry in your local hosts file, `/etc/hosts` for dev.new.expensify.com pointing to localhost: - ``` - 127.0.0.1 dev.new.expensify.com - ``` - -## Recommended Node Setup -In order to have more consistent builds, we use a strict `node` and `npm` version as defined in the `package.json` `engines` field and `.nvmrc` file. `npm install` will fail if you do not use the version defined, so it is recommended to install `node` via `nvm` for easy node version management. Automatic `node` version switching can be installed for [`zsh`](https://github.com/nvm-sh/nvm#zsh) or [`bash`](https://github.com/nvm-sh/nvm#bash) using `nvm`. - -## Configuring HTTPS - -The webpack development server now uses https. If you're using a mac, you can simply run `npm run setup-https`. - -If you're using another operating system, you will need to ensure `mkcert` is installed, and then follow the instructions in the repository to generate certificates valid for `dev.new.expensify.com` and `localhost`. The certificate should be named `certificate.pem` and the key should be named `key.pem`. They should be placed in `config/webpack`. - -## Running the Desktop App - -### Development App -- To run the **Development app**: `npm run desktop` -- This will start a new Electron process running on your MacOS desktop in the `dist/Mac` folder. - -## Environment Variables - -Creating an `.env` file is not necessary. We advise external contributors against it. It can lead to errors when variables referenced here get updated since your local `.env` file is ignored. - -### Key Variables for Desktop Development -- `NEW_EXPENSIFY_URL` - The root URL used for the website -- `SECURE_EXPENSIFY_URL` - The URL used to hit the Expensify secure API -- `EXPENSIFY_URL` - The URL used to hit the Expensify API -- `EXPENSIFY_PARTNER_NAME` - Constant used for the app when authenticating. -- `EXPENSIFY_PARTNER_PASSWORD` - Another constant used for the app when authenticating. (This is OK to be public) -- `PUSHER_APP_KEY` - Key used to authenticate with Pusher.com -- `USE_WEB_PROXY`āš ļø- Used in web/desktop development, it starts a server along the local development server to proxy requests to the backend. External contributors should set this to `true` otherwise they'll have CORS errors. If you don't want to start the proxy server set this explicitly to `false` - -### Optional Performance Variables -- `CAPTURE_METRICS` (optional) - Set this to `true` to capture performance metrics and see them in Flipper. See [PERFORMANCE.md](contributingGuides/PERFORMANCE.md#performance-metrics-opt-in-on-local-release-builds) for more information -- `ONYX_METRICS` (optional) - Set this to `true` to capture even more performance metrics and see them in Flipper. See [React-Native-Onyx#benchmarks](https://github.com/Expensify/react-native-onyx#benchmarks) for more information -- `USE_WDYR` - Flag to turn [`Why Did You Render`](https://github.com/welldone-software/why-did-you-render) testing on or off - -> If your changes to .env aren't having an effect, try `rm -rf .rock`, then re-run `npm run desktop` - -## Debugging - -### Electron DevTools -The desktop app runs in Electron, which provides access to Chrome DevTools for debugging web content within the Electron wrapper. - -### Onyx Access -To make it easier to test things in desktop, we expose the Onyx object to the window, so you can easily do `Onyx.set('bla', 1)`. - -### Release Profiling for Desktop -1. Install the necessary packages: `npm i` -2. Run your desktop app in production mode -3. Recording traces works similarly to web - use `cmd+d` to access profiling tools -4. Generated source maps and traces can be analyzed using the same tools as web - -## Desktop-Specific Features - -### Electron Integration -The desktop app uses Electron to wrap the web application, providing: -- Native window management -- System tray integration -- Native notifications -- File system access -- Auto-updater functionality - -### Build Configuration -Desktop builds are configured through: -- `desktop/` directory containing Electron-specific code -- `config/electronBuilder.config.js` for build settings -- Platform-specific packaging and distribution - -## Troubleshooting - -### Electron Issues -1. If Electron fails to start, try clearing the cache: `rm -rf node_modules && npm install` -2. Ensure you have the correct Node version as specified in `.nvmrc` -3. Make sure HTTPS certificates are properly configured - -### CORS Errors -If you are running into CORS errors: -- Ensure `USE_WEB_PROXY` is set to `true` in your environment -- Check that the proxy server is running alongside the development server -- Verify that `mkcert` certificates are properly installed - -### General Issues -1. If you are having issues with **_Getting Started_**, please reference [React Native's Documentation](https://reactnative.dev/docs/environment-setup) -2. For Electron-specific issues, check the [Electron documentation](https://www.electronjs.org/docs) -3. Ensure all prerequisites are properly installed before running the desktop app - -**Note:** Expensify engineers that will be testing with the API in your local dev environment please refer to [these additional instructions](https://stackoverflow.com/c/expensify/questions/7699/7700). diff --git a/contributingGuides/SETUP_WEB.md b/contributingGuides/SETUP_WEB.md index db25bc371d23..533af3b30741 100644 --- a/contributingGuides/SETUP_WEB.md +++ b/contributingGuides/SETUP_WEB.md @@ -55,7 +55,7 @@ Creating an `.env` file is not necessary. We advise external contributors agains - `EXPENSIFY_PARTNER_NAME` - Constant used for the app when authenticating. - `EXPENSIFY_PARTNER_PASSWORD` - Another constant used for the app when authenticating. (This is OK to be public) - `PUSHER_APP_KEY` - Key used to authenticate with Pusher.com -- `USE_WEB_PROXY`āš ļø- Used in web/desktop development, it starts a server along the local development server to proxy requests to the backend. External contributors should set this to `true` otherwise they'll have CORS errors. If you don't want to start the proxy server set this explicitly to `false` +- `USE_WEB_PROXY`āš ļø- Used in web development, it starts a server along the local development server to proxy requests to the backend. External contributors should set this to `true` otherwise they'll have CORS errors. If you don't want to start the proxy server set this explicitly to `false` ### Optional Performance Variables - `CAPTURE_METRICS` (optional) - Set this to `true` to capture performance metrics and see them in Flipper. See [PERFORMANCE.md](contributingGuides/PERFORMANCE.md#performance-metrics-opt-in-on-local-release-builds) for more information diff --git a/contributingGuides/philosophies/CROSS-PLATFORM.md b/contributingGuides/philosophies/CROSS-PLATFORM.md index 02462024fc5f..9befc2303595 100644 --- a/contributingGuides/philosophies/CROSS-PLATFORM.md +++ b/contributingGuides/philosophies/CROSS-PLATFORM.md @@ -4,7 +4,6 @@ Learn how the app supports features across all our different platforms. Currently supported platforms: - Web - Mobile Web -- Desktop - iOS - Android @@ -30,9 +29,8 @@ In most cases, the code written for this repo should be platform-independent. In - Mobile => `index.native.js` - iOS Native App/Android Native App => `index.ios.js`/`index.android.js` - Web => `index.website.js` -- Desktop => `index.desktop.js` -**Note:** `index.js` should be the default and only platform-specific implementations should be done in their respective files. i.e: If you have mobile-specific implementation in `index.native.js`, then the desktop/web implementation can be contained in a shared `index.js`. +**Note:** `index.js` should be the default and only platform-specific implementations should be done in their respective files. i.e: If you have mobile-specific implementation in `index.native.js`, then the web implementation can be contained in a shared `index.js`. `index.ios.js` and `index.android.js` are used when the app is running natively on respective platforms. These files are not used when users access the app through mobile browsers, but `index.website.js` is used instead. `index.native.js` are for both iOS and Android native apps. `index.native.js` should not be included in the same module as `index.ios.js` or `index.android.js`. diff --git a/contributingGuides/philosophies/DEPLOYING.md b/contributingGuides/philosophies/DEPLOYING.md index 584ed5fdecef..69f6c0fb6c4b 100644 --- a/contributingGuides/philosophies/DEPLOYING.md +++ b/contributingGuides/philosophies/DEPLOYING.md @@ -53,7 +53,7 @@ The [`deploy` workflow](https://github.com/Expensify/App/blob/main/.github/workf - If `production` was updated, it creates a GitHub Release for the new version. ### platformDeploy -The [`platformDeploy` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/platformDeploy.yml) is what actually runs the deployment on all four platforms (iOS, Android, Web, macOS Desktop). It runs a staging deploy whenever a new tag is pushed to GitHub, and runs a production deploy whenever a new release is created. +The [`platformDeploy` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/platformDeploy.yml) is what actually runs the deployment on all three platforms (iOS, Android, Web). It runs a staging deploy whenever a new tag is pushed to GitHub, and runs a production deploy whenever a new release is created. ### lockDeploys The [`lockDeploys` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/lockDeploys.yml) executes when the `StagingDeployCash` is locked, and it waits for any currently running staging deploys to finish, then gives Applause the :green_circle: to begin QA by commenting in the `StagingDeployCash` checklist. @@ -62,7 +62,7 @@ The [`lockDeploys` workflow](https://github.com/Expensify/App/blob/main/.github/ The [`finishReleaseCycle` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/finishReleaseCycle.yml) executes when the `StagingDeployCash` is closed. It updates the `production` branch from `staging` (triggering a production deploy), deploys `main` to staging (with a new `PATCH` version), and creates a new `StagingDeployCash` deploy checklist. ### testBuild -The [`testBuild` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/testBuild.yml) builds ad-hoc staging apps (hybrid iOS, hybrid Android, web, and desktop) from pull requests submitted to the App and Mobile-Expensify repositories. This process enables testers to review modifications before they are merged into the main branch and deployed to the staging environment. This workflow accepts up to two inputs: +The [`testBuild` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/testBuild.yml) builds ad-hoc staging apps (hybrid iOS, hybrid Android, and web) from pull requests submitted to the App and Mobile-Expensify repositories. This process enables testers to review modifications before they are merged into the main branch and deployed to the staging environment. This workflow accepts up to two inputs: - A PR number from the App repository for testing New Dot (ND) changes. - A PR number from the Mobile-Expensify repository for testing Old Dot (OD) changes. @@ -75,26 +75,6 @@ Sometimes it might be beneficial to generate a local production version instead ### - Web app local production builds SHOULD use `npm run build` In order to generate a production web build, run `npm run build`, this will generate a production javascript build in the `dist/` folder. -### - MacOS desktop app local production builds SHOULD disable publishing for local testing -The commands used to compile a production or staging desktop build are `npm run desktop-build` and `npm run desktop-build-staging`, respectively. These will produce an app in the `dist/Mac` folder named NewExpensify.dmg that you can install like a normal app. - -HOWEVER, by default those commands will try to notarize the build (signing it as Expensify) and publish it to the S3 bucket where it's hosted for users. In most cases you won't actually need or want to do that for your local testing. To get around that and disable those behaviors for your local build, apply the following diff: - -```diff -diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh -index 791f59d733..526306eec1 100755 ---- a/scripts/build-desktop.sh -+++ b/scripts/build-desktop.sh -@@ -35,4 +35,4 @@ npx webpack --config config/webpack/webpack.desktop.ts --env file=$ENV_FILE - title "Building Desktop App Archive Using Electron" - info "" - shift 1 --npx electron-builder --config config/electronBuilder.config.js --publish always "$@" -+npx electron-builder --config config/electronBuilder.config.js --publish never "$@" -``` - -There may be some cases where you need to test a signed and published build, such as when testing the update flows. Instructions on setting that up can be found in [Testing Electron Auto-Update](https://github.com/Expensify/App/blob/main/desktop/README.md#testing-electron-auto-update). Good luck šŸ™ƒ - ### - iOS app local production builds SHOULD use `npm run ios-build` In order to compile a production iOS build, run `npm run ios-build`, this will generate a `Chat.ipa` in the root directory of this project. diff --git a/eslint.config.mjs b/eslint.config.mjs index 16ea201026a7..c46379b91207 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -587,6 +587,7 @@ const config = defineConfig([ '**/vendor', 'modules/group-ib-fp/**/*', 'web/snippets/gib.js', + 'desktop/**/*', ]), ]); diff --git a/package.json b/package.json index ede97df122b4..5b3b7766af47 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,8 @@ "build": "webpack --config config/webpack/webpack.common.ts --env file=.env.production && ts-node ./scripts/combine-web-sourcemaps.ts", "build-staging": "webpack --config config/webpack/webpack.common.ts --env file=.env.staging && ts-node ./scripts/combine-web-sourcemaps.ts", "build-adhoc": "webpack --config config/webpack/webpack.common.ts --env file=.env.adhoc && ts-node ./scripts/combine-web-sourcemaps.ts", - "desktop": "./scripts/set-pusher-suffix.sh && ts-node desktop/start.ts", - "desktop-build": "./scripts/build-desktop.sh production", - "desktop-build-staging": "./scripts/build-desktop.sh staging", "createDocsRoutes": "ts-node .github/scripts/createDocsRoutes.ts", "detectRedirectCycle": "ts-node .github/scripts/detectRedirectCycle.ts", - "desktop-build-adhoc": "./scripts/build-desktop.sh adhoc", "ios-build": "bundle exec fastlane ios build_unsigned", "ios-hybrid-build": "bundle exec fastlane ios build_unsigned_hybrid", "android-build": "bundle exec fastlane android build_local", diff --git a/tests/unit/markPullRequestsAsDeployedTest.ts b/tests/unit/markPullRequestsAsDeployedTest.ts index fb29e697f1e3..2f19afc2cdfc 100644 --- a/tests/unit/markPullRequestsAsDeployedTest.ts +++ b/tests/unit/markPullRequestsAsDeployedTest.ts @@ -81,7 +81,6 @@ function mockGetInputDefaultImplementation(key: string): boolean | string { return version; case 'IOS': case 'ANDROID': - case 'DESKTOP': case 'WEB': return 'success'; case 'DATE': @@ -192,7 +191,6 @@ describe('markPullRequestsAsDeployed', () => { platform | result ---|--- -šŸ–„ desktop šŸ–„|success āœ… šŸ•ø web šŸ•ø|success āœ… šŸ¤– android šŸ¤–|success āœ… šŸŽ iOS šŸŽ|success āœ…`, @@ -222,7 +220,6 @@ platform | result platform | result ---|--- -šŸ–„ desktop šŸ–„|success āœ… šŸ•ø web šŸ•ø|success āœ… šŸ¤– android šŸ¤–|success āœ… šŸŽ iOS šŸŽ|success āœ…`, @@ -281,7 +278,6 @@ platform | result platform | result ---|--- -šŸ–„ desktop šŸ–„|success āœ… šŸ•ø web šŸ•ø|success āœ… šŸ¤– android šŸ¤–|success āœ… šŸŽ iOS šŸŽ|success āœ…`, @@ -299,9 +295,6 @@ platform | result if (key === 'IOS') { return 'failed'; } - if (key === 'DESKTOP') { - return 'cancelled'; - } return mockGetInputDefaultImplementation(key); }); @@ -316,7 +309,6 @@ platform | result platform | result ---|--- -šŸ–„ desktop šŸ–„|cancelled šŸ”Ŗ šŸ•ø web šŸ•ø|success āœ… šŸ¤– android šŸ¤–|skipped 🚫 šŸŽ iOS šŸŽ|failed āŒ`, diff --git a/tests/unit/postTestBuildComment.ts b/tests/unit/postTestBuildComment.ts index cbb45a622405..f7caf2dc6f61 100644 --- a/tests/unit/postTestBuildComment.ts +++ b/tests/unit/postTestBuildComment.ts @@ -46,41 +46,39 @@ jest.mock('@actions/github', () => ({ const androidLink = 'https://expensify.app/ANDROID_LINK'; const iOSLink = 'https://expensify.app/IOS_LINK'; const webLink = 'https://expensify.app/WEB_LINK'; -const desktopLink = 'https://expensify.app/DESKTOP_LINK'; const androidQRCode = `![Android](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${androidLink})`; -const desktopQRCode = `![Desktop](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${desktopLink})`; const iOSQRCode = `![iOS](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${iOSLink})`; const webQRCode = `![Web](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${webLink})`; -const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: +const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! :test_tube::test_tube: Built from App PR Expensify/App#12 Mobile-Expensify PR Expensify/Mobile-Expensify#13. | Android :robot: | iOS :apple: | | ------------- | ------------- | | ${androidLink} | ${iOSLink} | | ${androidQRCode} | ${iOSQRCode} | -| Desktop :computer: | Web :spider_web: | -| ------------- | ------------- | -| ${desktopLink} | ${webLink} | -| ${desktopQRCode} | ${webQRCode} | +| Web :spider_web: | +| ------------- | +| ${webLink} | +| ${webQRCode} | --- :eyes: [View the workflow run that generated this build](https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/1234) :eyes: `; -const onlyAppMessage = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: +const onlyAppMessage = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! :test_tube::test_tube: Built from App PR Expensify/App#12. | Android :robot: | iOS :apple: | | ------------- | ------------- | | ${androidLink} | ā© SKIPPED ā© | | ${androidQRCode} | The build for iOS was skipped | -| Desktop :computer: | Web :spider_web: | -| ------------- | ------------- | -| āŒ FAILED āŒ | ā© SKIPPED ā© | -| The QR code can't be generated, because the Desktop build failed | The build for Web was skipped | +| Web :spider_web: | +| ------------- | +| ā© SKIPPED ā© | +| The build for Web was skipped | --- @@ -94,10 +92,10 @@ Built from Mobile-Expensify PR Expensify/Mobile-Expensify#13. | ${androidLink} | ${iOSLink} | | ${androidQRCode} | ${iOSQRCode} | -| Desktop :computer: | Web :spider_web: | -| ------------- | ------------- | -| ā© SKIPPED ā© | ā© SKIPPED ā© | -| The build for Desktop was skipped | The build for Web was skipped | +| Web :spider_web: | +| ------------- | +| ā© SKIPPED ā© | +| The build for Web was skipped | --- @@ -119,24 +117,22 @@ describe('Post test build comments action tests', () => { when(core.getInput).calledWith('ANDROID', {required: false}).mockReturnValue('success'); when(core.getInput).calledWith('IOS', {required: false}).mockReturnValue('success'); when(core.getInput).calledWith('WEB', {required: false}).mockReturnValue('success'); - when(core.getInput).calledWith('DESKTOP', {required: false}).mockReturnValue('success'); when(core.getInput).calledWith('ANDROID_LINK').mockReturnValue(androidLink); when(core.getInput).calledWith('IOS_LINK').mockReturnValue(iOSLink); when(core.getInput).calledWith('WEB_LINK').mockReturnValue('https://expensify.app/WEB_LINK'); - when(core.getInput).calledWith('DESKTOP_LINK').mockReturnValue('https://expensify.app/DESKTOP_LINK'); createCommentMock.mockResolvedValue({} as CreateCommentResponse); mockListComments.mockResolvedValue({ data: [ { - body: ':test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing!', + body: ':test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing!', // eslint-disable-next-line @typescript-eslint/naming-convention node_id: 'IC_abcd', }, ], }); await ghAction(); - expect(mockGraphql).toBeCalledTimes(1); - expect(mockGraphql).toBeCalledWith(` + expect(mockGraphql).toHaveBeenCalledTimes(1); + expect(mockGraphql).toHaveBeenCalledWith(` mutation { minimizeComment(input: {classifier: OUTDATED, subjectId: "IC_abcd"}) { minimizedComment { @@ -145,8 +141,8 @@ describe('Post test build comments action tests', () => { } } `); - expect(createCommentMock).toBeCalledTimes(1); - expect(createCommentMock).toBeCalledWith(CONST.APP_REPO, 12, message); + expect(createCommentMock).toHaveBeenCalledTimes(1); + expect(createCommentMock).toHaveBeenCalledWith(CONST.APP_REPO, 12, message); }); test('Test GH action when only App PR number is provided', async () => { @@ -156,21 +152,20 @@ describe('Post test build comments action tests', () => { when(core.getInput).calledWith('ANDROID', {required: false}).mockReturnValue('success'); when(core.getInput).calledWith('IOS', {required: false}).mockReturnValue('skipped'); when(core.getInput).calledWith('WEB', {required: false}).mockReturnValue('skipped'); - when(core.getInput).calledWith('DESKTOP', {required: false}).mockReturnValue('failure'); when(core.getInput).calledWith('ANDROID_LINK').mockReturnValue('https://expensify.app/ANDROID_LINK'); createCommentMock.mockResolvedValue({} as CreateCommentResponse); mockListComments.mockResolvedValue({ data: [ { - body: ':test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing!', + body: ':test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing!', // eslint-disable-next-line @typescript-eslint/naming-convention node_id: 'IC_abcd', }, ], }); await ghAction(); - expect(mockGraphql).toBeCalledTimes(1); - expect(mockGraphql).toBeCalledWith(` + expect(mockGraphql).toHaveBeenCalledTimes(1); + expect(mockGraphql).toHaveBeenCalledWith(` mutation { minimizeComment(input: {classifier: OUTDATED, subjectId: "IC_abcd"}) { minimizedComment { @@ -179,8 +174,8 @@ describe('Post test build comments action tests', () => { } } `); - expect(createCommentMock).toBeCalledTimes(1); - expect(createCommentMock).toBeCalledWith(CONST.APP_REPO, 12, onlyAppMessage); + expect(createCommentMock).toHaveBeenCalledTimes(1); + expect(createCommentMock).toHaveBeenCalledWith(CONST.APP_REPO, 12, onlyAppMessage); }); test('Test GH action when only Mobile-Expensify PR number is provided', async () => { @@ -192,7 +187,6 @@ describe('Post test build comments action tests', () => { when(core.getInput).calledWith('ANDROID_LINK').mockReturnValue(androidLink); when(core.getInput).calledWith('IOS_LINK').mockReturnValue(iOSLink); when(core.getInput).calledWith('WEB', {required: false}).mockReturnValue('skipped'); - when(core.getInput).calledWith('DESKTOP', {required: false}).mockReturnValue('skipped'); createCommentMock.mockResolvedValue({} as CreateCommentResponse); mockListComments.mockResolvedValue({ data: [ @@ -204,8 +198,8 @@ describe('Post test build comments action tests', () => { ], }); await ghAction(); - expect(mockGraphql).toBeCalledTimes(1); - expect(mockGraphql).toBeCalledWith(` + expect(mockGraphql).toHaveBeenCalledTimes(1); + expect(mockGraphql).toHaveBeenCalledWith(` mutation { minimizeComment(input: {classifier: OUTDATED, subjectId: "IC_abcd"}) { minimizedComment { @@ -214,7 +208,7 @@ describe('Post test build comments action tests', () => { } } `); - expect(createCommentMock).toBeCalledTimes(1); - expect(createCommentMock).toBeCalledWith(CONST.MOBILE_EXPENSIFY_REPO, 13, onlyMobileExpensifyMessage); + expect(createCommentMock).toHaveBeenCalledTimes(1); + expect(createCommentMock).toHaveBeenCalledWith(CONST.MOBILE_EXPENSIFY_REPO, 13, onlyMobileExpensifyMessage); }); }); diff --git a/tsconfig.json b/tsconfig.json index 7e1dba141d7c..f8058fb17f35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -34,7 +34,6 @@ }, "include": [ "src", - "desktop", "web", "website", "docs",