Skip to content

Commit

Permalink
chore: sync main with feat-email-mfa/main (#6320)
Browse files Browse the repository at this point in the history
* chore(react): remove direct usage of react-test-renderer and types (#6255)

* chore(deps): upgrade next deps to point to ^14.2.15 (#6263)

* fix(docs): use correct listLocation attribute names in Storage Browser auth example (#6264)

* chore(react-native): update allowed peerDep to >=0.70 (#6266)

* chore(react): add support for react 19 (#5826)

* chore(storage-browser): bump up package size limit (#6267)

* chore(changeset): update react 19 changeset from patch to minor bump (#6269)

* chore(react): remove radix-ui upgrades (#6268)

* fix(docs): remove typo from liveness detector core docs (#6256)

* Version Packages (#6261)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: remove temporary pin to react 18 in react@latest build tests (#6274)

* chore: remove temporary use of react 18 in react@latest build tests

* chore: update workflow for forced test run

* chore: adjusting testing strategy, modify publish workflow instead of reusable test

* chore: reverting temporary testing changes

* Revert support for React 19 (#6278)

* Revert "chore: remove temporary pin to react 18 in react@latest build tests (#6274)"

This reverts commit d9ee32d.

* Revert "fix(docs): remove typo from liveness detector core docs (#6256)"

This reverts commit 9d71dd8.

* Revert "chore(react): remove radix-ui upgrades (#6268)"

This reverts commit c623990.

* Revert "chore(changeset): update react 19 changeset from patch to minor bump (#6269)"

This reverts commit 7045aed.

* Revert "chore(storage-browser): bump up package size limit (#6267)"

This reverts commit a79b8e9.

* Revert "chore(react): add support for react 19 (#5826)"

This reverts commit 954e9be.

* chore: add changeset

* Version Packages (#6281)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(deps): bump nextjs version (#6284)

* chore: add v0.76 and latest to React Native build system tests (#6285)

* chore: add react native v0.76 build system tests to CI
* chore: add react native 'latest' to build system tests

* fix(github-actions): bump upload-artifact to v4 (#6289)

* feat(i18n): add Chinese translations for password fields in zh.ts (#6125)

Co-authored-by: Caleb Pollman <[email protected]>

* test(e2e): add storage-browser offline tests (#6206)

* test(e2e): add storage-browser offline tests

* address feedback

* fix EOF

* fix EOF

* Update packages/e2e/cypress/integration/common/shared.ts

Co-authored-by: Caleb Pollman <[email protected]>

* address feedback

---------

Co-authored-by: Caleb Pollman <[email protected]>

* chore(docs): update react web Authenticator hideSignUp example (#6290)

* feat(react): reenable react 19 support (#6296)

* Revert "Revert support for React 19 (#6278)"

This reverts commit 475e4a3.

* update radix deps
* remove radix namespace sanitization
* migrate/cleanup FileUploader component override example
* add ExtendedView component for surfacing ReactNode conflicts
* Remove extended and overridden react types

* chore(build-system-tests): disable react@latest tests (#6297)

* Version Packages (#6292)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(ci): add retry delays to build tests & upgrade actions/cache (#6291)

* chore: add delay between install retries, swap RN to use install script
* chore: upgrade actions/cache to v4.2.0

* chore(build-system-tests): reenable react@latest tests (#6299)

* fix(slider): remounted controlled value not updating (#6301)

* fix(ui): fix and add missing sv translations (#6288)

Co-authored-by: Jordan Van Ness <[email protected]>
Co-authored-by: Caleb Pollman <[email protected]>

* chore(changeset): add changeset for PR #6301 (#6303)

* fix(react-storage): enable default checksum algorithm for create folder action  (#6305)

* fix: include default checksum alg header in createFolder action

* test: update createFolder test spec for checksum alg header

* chore: adding changeset

* Version Packages (#6304)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(docs): Update Android UI component versions (#6311)

* chore(deps-dev): bump vite from 5.2.14 to 5.4.12 (#6307)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.14 to 5.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(storage-browser): export UseView type (#6314)

* chore(ui-react-storage): clean up outdated styles file (#6197)

Co-authored-by: ashika112 <[email protected]>

* chore(react-native): add fed sign in example env (#6318)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Caleb Pollman <[email protected]>
Co-authored-by: Tiffany Yeung <[email protected]>
Co-authored-by: Jordan Van Ness <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: BeforeSunset16 <[email protected]>
Co-authored-by: Caleb Pollman <[email protected]>
Co-authored-by: Ashwin Kumar <[email protected]>
Co-authored-by: Danny Banks <[email protected]>
Co-authored-by: berg-dee <[email protected]>
Co-authored-by: Vincent Tran <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: AllanZhengYP <[email protected]>
Co-authored-by: ashika112 <[email protected]>
  • Loading branch information
15 people authored Jan 28, 2025
1 parent 0a30f78 commit e9de3ef
Show file tree
Hide file tree
Showing 376 changed files with 2,597 additions and 2,559 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-rockets-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aws-amplify/ui-react-storage": patch
---

fix(storage-browser): export UseView type
14 changes: 9 additions & 5 deletions .github/actions/install-with-retries/install-with-retries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if [ "$SKIP_CYPRESS_BINARY" = "true" ]; then
export CYPRESS_INSTALL_BINARY=0
fi

for i in {1..3}; do
for i in {1..4}; do
echo "===================="
echo "Attempt $i out of 3:"
echo "Attempt $i out of 4:"
echo "===================="

if [ "$NO_LOCKFILE" = "true" ]; then
Expand All @@ -32,10 +32,14 @@ for i in {1..3}; do
# Check return value and exit early if successful
return_value=$?
[ $return_value -eq 0 ] && break
echo "[ERROR]: yarn install failed with exit code $return_value, waiting to retry..."

# Sleep 5 seconds before retrying
sleep 5
# Don't add delay at end of last attempt if last attempt fails
if [ "$i" -le 3 ]; then
# NPM publish can be flaky causing failed installs
# Add exponential backoff between retries: [4/16/64]s ~= [5/15/60]s
echo "[ERROR]: yarn install failed with exit code $return_value, waiting to retry in $((4 * i)) seconds..."
sleep $((4 ** i))
fi
done

# exit 0 if last `yarn install` was successful, non-zero otherwise
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/receive-fork-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo ${{ github.event.pull_request.base.sha }} > ./commit/base_sha
echo ${{ github.event.review.commit_id }} > ./commit/commit_id
echo ${{ github.event.pull_request.number }} > ./commit/pr_number
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
with:
name: commit
path: commit/
18 changes: 15 additions & 3 deletions .github/workflows/reusable-build-system-test-react-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
framework: [react-native]
framework-version: [
# uncomment to enable
# { formatted: latest, value: latest },
{ formatted: latest, value: latest },
{ formatted: 076, value: 0.76 },
{ formatted: 075, value: 0.75 },
{ formatted: 074, value: 0.74 },
{ formatted: 073, value: 0.73 },
Expand All @@ -36,6 +37,9 @@ jobs:
exclude:
- build-tool: expo
platform: ios
- build-tool: expo
platform: android
framework-version: { formatted: '076', value: '0.76' }
- build-tool: expo
platform: android
framework-version: { formatted: '075', value: '0.75' }
Expand Down Expand Up @@ -102,6 +106,14 @@ jobs:
pkg-manager: npm
node-version: 20
logfile: test.log
- framework: react-native
framework-version: { formatted: 076, value: '0.76' }
build-tool: expo
build-tool-version: 52
platform: android
pkg-manager: npm
node-version: 20
logfile: test.log

env:
MEGA_APP_NAME: rn${{ matrix.framework-version.formatted }}${{ matrix.build-tool }}${{ matrix.build-tool-version }}${{ matrix.platform }}ui${{ inputs.dist-tag }}
Expand All @@ -122,7 +134,7 @@ jobs:
- name: Restore CocoaPods cache
if: ${{ matrix.platform == 'ios' }}
id: restore-cocoapods-cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ./examples/react-native/ios/Pods
key: ${{ runner.os }}-cocoapods
Expand All @@ -131,7 +143,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
- name: Restore node_modules cache
if: ${{ matrix.platform == 'ios' }}
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cache
with:
path: |
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/reusable-build-system-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
fail-fast: false
matrix:
framework: [react]
# temporarily pointing all react tests to v18
# framework-version: [latest]
framework-version: [18]
framework-version: [latest]
build-tool: [next, vite]
build-tool-version: [latest]
pkg-manager: [npm]
Expand Down Expand Up @@ -125,7 +123,7 @@ jobs:
- name: Delete AWS Profile
run: rm -rf ~/.aws
- name: Restore cypress runner from Cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cypress-cache
with:
path: ~/.cache/Cypress
Expand All @@ -148,7 +146,7 @@ jobs:
# step, so we go ahead and update the cache entry.
- name: Cache cypress runner
if: steps.restore-cypress-cache.outputs.cache-hit != 'true'
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-canary-cypress-${{ hashFiles('build-system-tests/e2e/yarn.lock') }}
Expand All @@ -168,7 +166,7 @@ jobs:
TAGS: '@${{ matrix.framework }}'

- name: Upload videos and screenshots
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ failure() && steps.e2e.outcome != 'success' }}
with:
name: canary-cypress-error-${{ env.MEGA_APP_NAME }}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
persist-credentials: false

- name: Next.js Cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -107,7 +107,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

- name: Restore cypress runner Cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cypress-cache
with:
path: ~/.cache/Cypress
Expand All @@ -116,7 +116,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1

- name: Restore node_modules cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cache
with:
path: |
Expand All @@ -127,15 +127,15 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3

- name: Restore ui/dist cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-ui-cache
with:
path: ./packages/ui/dist
key: ${{ runner.os }}-ui-${{ inputs.commit }}

- name: Restore ${{ matrix.package }}/dist cache
id: restore-package-cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ./packages/${{ matrix.package }}/dist
key: ${{ runner.os }}-${{ matrix.package }}-${{ inputs.commit }}
Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }}

- name: Upload failure screenshots and errors
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ failure() && steps.e2e.outcome != 'success' }}
with:
name: e2e-cypress-error-${{ matrix.package }}
Expand Down Expand Up @@ -394,7 +394,7 @@ jobs:

- name: Restore CocoaPods cache
id: restore-cocoapods-cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ./examples/react-native/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ inputs.commit }}
Expand Down Expand Up @@ -481,7 +481,7 @@ jobs:
VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }}

- name: Upload failure screenshots and errors
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ failure() && steps.e2e-ios.outcome != 'success' }}
with:
name: e2e-detox-error-react-native-ios
Expand Down Expand Up @@ -622,7 +622,7 @@ jobs:
adb -s emulator-$EMULATOR2_PORT emu kill
- name: Upload failure screenshots and errors
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ failure() && steps.e2e-android.outcome != 'success' }}
with:
name: e2e-detox-error-react-native-android
Expand Down Expand Up @@ -652,7 +652,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

- name: Restore cypress runner Cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cypress-cache
with:
path: ~/.cache/Cypress
Expand All @@ -661,7 +661,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1

- name: Restore Puppeteer runner cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-puppeteer-cache
with:
path: ~/.cache/puppeteer
Expand All @@ -670,7 +670,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1

- name: Restore node_modules cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cache
with:
path: |
Expand Down Expand Up @@ -736,7 +736,7 @@ jobs:
run: yarn docs test:links

- name: Upload failure screenshots and errors
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ failure() && steps.e2e.outcome != 'success' }}
with:
name: docs-e2e-cypress-error
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reusable-setup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- name: Restore cypress runner from Cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cypress-cache
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('yarn.lock') }}
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
- name: Restore Puppeteer runner from Cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-puppeteer-cache
with:
path: ~/.cache/puppeteer
Expand All @@ -55,17 +55,17 @@ jobs:
- name: Cache cypress runner
# create new cypress cache entry only if cypress cache missed and we installed a new one.
if: steps.restore-cypress-cache.outputs.cache-hit != 'true'
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('yarn.lock') }}
- name: Cache packages/ui/dist
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ./packages/ui/dist
key: ${{ runner.os }}-ui-${{ inputs.commit }}
- name: Cache node_modules
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: |
./node_modules
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

- name: Restore node_modules cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-cache
with:
path: |
Expand All @@ -65,7 +65,7 @@ jobs:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3

- name: Restore ui/dist cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
id: restore-ui-cache
with:
path: ./packages/ui/dist
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
run: yarn ${{ matrix.package }} size

- name: Cache ${{ matrix.package }}/dist
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ./packages/${{ matrix.package }}/dist
key: ${{ runner.os }}-${{ matrix.package }}-${{ inputs.commit }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Takes 2 parameters: the package manager and the dependencies to be installed
# Usage: install_with_retries npm "$DEPENDENCIES" or install_with_retries yarn "$DEPENDENCIES"
install_dependencies_with_retries() {
local retries=3
local retries=4
local attempt=1
echo "Disable exit-on-error temporarily"
echo "set +e"
Expand All @@ -20,10 +20,13 @@ install_dependencies_with_retries() {
set -e
break
fi
# Add exponential backoff delay between failed attempts
# [4/16/64]s ~= [5/15/60]s
local wait=$((4 ** attempt))
attempt=$((attempt + 1))
if [ $attempt -le $retries ]; then
echo "$1 install failed. Retrying in 5 seconds..."
sleep 5
echo "$1 install failed. Retrying in $wait seconds..."
sleep $wait
else
echo "$1 install failed after $retries attempts."
echo "Re-enable exit-on-error"
Expand Down
2 changes: 1 addition & 1 deletion build-system-tests/scripts/mega-app-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ else
# react-native-safe-area-context v5.0.0+ does not support RN 0.74 and lower
DEPENDENCIES="$TAGGED_UI_FRAMEWORK @aws-amplify/react-native aws-amplify react-native-safe-area-context@^4.2.5 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill"
echo "npm install $DEPENDENCIES"
npm install $DEPENDENCIES
install_dependencies_with_retries npm "$DEPENDENCIES"
if [[ "$BUILD_TOOL" == "expo" ]]; then
if [[ "$FRAMEWORK_VERSION" == "0.75" ]]; then
# Expo SDK version 51.0.0 supports RN 0.74 and 0.75 but installs 0.74 by default https://expo.dev/changelog/2024/08-14-react-native-0.75#2-install-updated-packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function SignOutButton() {
return <Button title="Sign Out" onPress={signOut} />;
}

function App(): JSX.Element {
function App(): React.JSX.Element {
return (
<>
<Authenticator.Provider>
Expand Down
Loading

0 comments on commit e9de3ef

Please sign in to comment.