Skip to content

Commit 15ff344

Browse files
authored
Merge branch 'main' into chore/migrate-vite-to-rollup
2 parents b09de9d + abea091 commit 15ff344

File tree

1,632 files changed

+20408
-7675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,632 files changed

+20408
-7675
lines changed

.changeset/config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"@aws-amplify/ui-docs",
1616
"@aws-amplify/ui-e2e",
1717
"@aws-amplify/ui-environments",
18-
"@aws-amplify/ui-next-example",
18+
"@aws-amplify/ui-next-pages-router-example",
19+
"@aws-amplify/ui-next-app-router-example",
1920
"@aws-amplify/ui-react-native-example",
21+
"@aws-amplify/ui-react-router-example",
2022
"@aws-amplify/ui-vue-example"
2123
]
2224
}

.github/dependency-review/config.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
allow-licenses:
22
- '0BSD'
33
- 'Apache-2.0'
4-
- 'Apache-2.0 AND MIT'
54
- 'BlueOak-1.0.0'
65
- 'BSL-1.0'
76
- 'BSD-1-Clause'
@@ -14,12 +13,10 @@ allow-licenses:
1413
- 'CC-BY-3.0'
1514
- 'CC-BY-4.0'
1615
- 'CC0-1.0'
17-
- 'CC0-1.0 AND MIT'
1816
- 'curl'
1917
- 'ISC'
2018
- 'JSON'
2119
- 'MIT'
22-
- 'MIT AND Zlib'
2320
- 'MPL-2.0'
2421
- 'NTP'
2522
- 'OFL-1.0'
@@ -36,3 +33,8 @@ allow-licenses:
3633
- 'X11'
3734
- 'zlib-acknowledgement'
3835
- 'Zlib'
36+
- 'Apache-2.0 AND MIT'
37+
- 'CC0-1.0 AND MIT'
38+
- 'MIT AND Zlib'
39+
- 'ISC AND MIT'
40+
- 'Apache-2.0 AND BSD-2-Clause AND CC0-1.0 AND ISC AND MIT'

.github/workflows/build-system-test-react-native.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77

88
on:
99
schedule:
10-
- cron: '0 * * * *' # Run at the first minute of every hour
10+
- cron: '0 */2 * * *' # Run on the first minute of each even numbered hour
1111

1212
jobs:
1313
build:

.github/workflows/create-hotfix.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Create a hotfix branch
2+
3+
on:
4+
workflow_dispatch # manually triggered workflow on Actions
5+
6+
permissions:
7+
contents: write # Used to push hotfix branch
8+
9+
jobs:
10+
setup:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.3 https://github.com/actions/checkout/commit/cd7d8d697e10461458bc61a30d094dc601a8b017
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Create hotfix branch
20+
env:
21+
HOTFIX_BRANCH: hotfix
22+
run: |
23+
# create hotfix branch from commit hash of the latest 'Version Packages'
24+
git checkout -b $HOTFIX_BRANCH $(git log origin/main -1 --grep='^Version Packages' --author='github-actions\[bot\]' --pretty=format:"%H")
25+
git push origin $HOTFIX_BRANCH

.github/workflows/publish-hotfix.yml

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,43 @@ jobs:
3030
uses: ./.github/actions/has-changesets
3131

3232
publish-hotfix:
33-
needs: [setup]
33+
needs: setup
3434
uses: ./.github/workflows/reusable-tagged-publish.yml
3535
with:
3636
dist-tag: hotfix
3737
secrets:
3838
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3939

4040
build-test:
41-
runs-on: ubuntu-latest
42-
needs: publish-hotfix
43-
environment: ci
41+
uses: ./.github/workflows/reusable-build-system-test.yml
42+
needs:
43+
- setup
44+
- publish-hotfix
4445
if: ${{ needs.setup.outputs.has-changesets != 'true' }}
45-
steps:
46-
- name: Build test v2
47-
uses: ./.github/workflows/reusable-build-system-test.yml
48-
with:
49-
dist-tag: hotfix
50-
env:
51-
AUTH_E2E_ROLE_ARN: ${{ secrets.AUTH_E2E_ROLE_ARN }}
52-
DOMAIN: ${{ secrets.DOMAIN }}
53-
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }}
54-
USERNAME: ${{ secrets.USERNAME }}
55-
NEW_PASSWORD: ${{ secrets.NEW_PASSWORD }}
56-
VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }}
46+
with:
47+
dist-tag: hotfix
48+
secrets:
49+
AUTH_E2E_ROLE_ARN: ${{ secrets.AUTH_E2E_ROLE_ARN }}
50+
DOMAIN: ${{ secrets.DOMAIN }}
51+
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }}
52+
USERNAME: ${{ secrets.USERNAME }}
53+
NEW_PASSWORD: ${{ secrets.NEW_PASSWORD }}
54+
VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }}
5755

5856
build-test-react-native:
59-
runs-on: ubuntu-latest
60-
needs: publish-hotfix
61-
environment: ci
57+
uses: ./.github/workflows/reusable-build-system-test-react-native.yml
58+
needs:
59+
- setup
60+
- publish-hotfix
6261
if: ${{ needs.setup.outputs.has-changesets != 'true' }}
63-
steps:
64-
- name: Build test v2 React Native
65-
uses: ./.github/workflows/reusable-build-system-test-react-native.yml
66-
with:
67-
dist-tag: hotfix
62+
with:
63+
dist-tag: hotfix
6864

6965
publish:
7066
runs-on: ubuntu-latest
7167
environment: deployment
7268
needs:
69+
- setup
7370
- build-test
7471
- build-test-react-native
7572
if: ${{ needs.setup.outputs.has-changesets != 'true' }}
@@ -100,11 +97,40 @@ jobs:
10097
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10198
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
10299

100+
create-pr-to-main:
101+
needs: setup
102+
if: ${{ needs.setup.outputs.has-changesets != 'true' }}
103+
runs-on: ubuntu-latest
104+
permissions:
105+
pull-requests: write
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
BASE_BRANCH: "main"
109+
HEAD_BRANCH: "hotfix"
110+
steps:
111+
- name: Checkout repo
112+
uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.3 https://github.com/actions/checkout/commit/cd7d8d697e10461458bc61a30d094dc601a8b017
113+
# Check if hotfix -> main PR already exists
114+
- name: Check for existing PR
115+
id: check-pr
116+
run: |
117+
PR_EXISTS=$(gh pr list --base $BASE_BRANCH --head $HEAD_BRANCH --json number --jq 'length > 0')
118+
echo "exists=$PR_EXISTS" >> $GITHUB_OUTPUT
119+
# Create a new PR if one doesn't exist
120+
- name: Create PR to main
121+
if: steps.check-pr.outputs.exists == 'false'
122+
run: |
123+
gh pr create \
124+
--base $BASE_BRANCH \
125+
--head $HEAD_BRANCH \
126+
--title "chore: Merge hotfix into main" \
127+
--body "Merge the recently completed hotfix back into the main development branch. Generated by the publish-hotfix workflow."
128+
103129
log-failure-metric:
104130
# Send a failure data point to metric PublishLatestFailure in github-workflows@ us-east-2
105131
runs-on: ubuntu-latest
106132
environment: ci
107-
needs: publish
133+
needs: create-pr-to-main
108134
if: ${{ failure() }}
109135
steps:
110136
- name: Log failure data point to metric PublishLatestFailure
@@ -119,7 +145,7 @@ jobs:
119145
# Send a success data point to metric PublishLatestFailure in github-workflows@ us-east-2
120146
runs-on: ubuntu-latest
121147
environment: ci
122-
needs: publish
148+
needs: create-pr-to-main
123149
if: ${{ success() }}
124150
steps:
125151
- name: Log success data point to metric PublishLatestFailure

.github/workflows/publish-latest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
runs-on: ubuntu-latest
6262
environment: deployment
6363
needs:
64+
- setup
6465
- build-test
6566
- build-test-react-native
6667
if: ${{ needs.setup.outputs.has-changesets != 'true' }}

.github/workflows/reusable-build-system-test-react-native.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
framework: [react-native]
19-
framework-version: [
20-
# uncomment to enable
19+
framework-version:
20+
[
2121
{ formatted: latest, value: latest },
22+
{ formatted: 078, value: 0.78 },
2223
{ formatted: 077, value: 0.77 },
2324
{ formatted: 076, value: 0.76 },
2425
{ formatted: 075, value: 0.75 },
@@ -38,6 +39,9 @@ jobs:
3839
exclude:
3940
- build-tool: expo
4041
platform: ios
42+
- build-tool: expo
43+
platform: android
44+
framework-version: { formatted: '078', value: '0.78' }
4145
- build-tool: expo
4246
platform: android
4347
framework-version: { formatted: '077', value: '0.77' }
@@ -64,17 +68,17 @@ jobs:
6468
# https://stackoverflow.com/questions/63463373/create-an-expo-project-with-a-specific-version
6569
# Only include officially supported Expo SDK versions: https://docs.expo.dev/versions/latest/
6670
- framework: react-native
67-
framework-version: { formatted: 073, value: '0.73' }
71+
framework-version: { formatted: 077, value: '0.77' }
6872
build-tool: expo
69-
build-tool-version: 50
73+
build-tool-version: 52
7074
platform: android
7175
pkg-manager: npm
7276
node-version: 20
7377
logfile: test.log
7478
- framework: react-native
75-
framework-version: { formatted: 074, value: '0.74' }
79+
framework-version: { formatted: 076, value: '0.76' }
7680
build-tool: expo
77-
build-tool-version: 51
81+
build-tool-version: 52
7882
platform: android
7983
pkg-manager: npm
8084
node-version: 20
@@ -88,17 +92,17 @@ jobs:
8892
node-version: 20
8993
logfile: test.log
9094
- framework: react-native
91-
framework-version: { formatted: 076, value: '0.76' }
95+
framework-version: { formatted: 074, value: '0.74' }
9296
build-tool: expo
93-
build-tool-version: 52
97+
build-tool-version: 51
9498
platform: android
9599
pkg-manager: npm
96100
node-version: 20
97101
logfile: test.log
98102
- framework: react-native
99-
framework-version: { formatted: 077, value: '0.77' }
103+
framework-version: { formatted: 073, value: '0.73' }
100104
build-tool: expo
101-
build-tool-version: 52
105+
build-tool-version: 50
102106
platform: android
103107
pkg-manager: npm
104108
node-version: 20
@@ -130,6 +134,7 @@ jobs:
130134
restore-keys: pods-${{ hashFiles('examples/react-native/ios/Podfile.lock') }}
131135
env:
132136
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
137+
133138
- name: Restore node_modules cache
134139
if: ${{ matrix.platform == 'ios' }}
135140
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57
@@ -141,6 +146,7 @@ jobs:
141146
key: ${{ runner.os }}-nodemodules
142147
env:
143148
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
149+
144150
- name: Install Java 17
145151
if: ${{ matrix.platform == 'android' }}
146152
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # 3.6.0
@@ -158,6 +164,7 @@ jobs:
158164
echo "ruby --version"
159165
ruby --version
160166
continue-on-error: true # brew overwrite step addresses a python install issue: https://github.com/actions/runner-images/issues/8500
167+
161168
- name: Update CocoaPods
162169
if: ${{ matrix.platform == 'ios' }}
163170
run: |
@@ -169,16 +176,13 @@ jobs:
169176
run: |
170177
echo -e "echo \$ANDROID_HOME"
171178
echo $ANDROID_HOME
172-
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install 'build-tools;33.0.2' platform-tools
173-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-27;default;x86_64"
174-
echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --force --name Pixel_5_API_27 --device "pixel_5" --abi x86_64 --package "system-images;android-27;default;x86_64"
175-
printf 'hw.cpu.ncore=2\n' >> ~/.android/avd/Pixel_5_API_27.avd/config.ini
176-
printf 'hw.ramSize=2048\n' >> ~/.android/avd/Pixel_5_API_27.avd/config.ini
177-
printf 'hw.heapSize=576\n' >> ~/.android/avd/Pixel_5_API_27.avd/config.ini
179+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "build-tools;33.0.2" "platform-tools" "system-images;android-27;default;x86_64"
180+
$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --name Pixel_5_API_27 --force --device "pixel_5" --abi x86_64 --package "system-images;android-27;default;x86_64"
181+
178182
- name: Start Android emulator
179183
if: ${{ matrix.platform == 'android' }}
180184
run: |
181-
nohup $ANDROID_HOME/emulator/emulator -avd Pixel_5_API_27 -port ${{ env.EMULATOR_PORT }} -no-boot-anim -no-audio -no-snapshot-load -gpu host -accel on &
185+
$ANDROID_HOME/emulator/emulator -avd Pixel_5_API_27 -port ${{ env.EMULATOR_PORT }} -no-boot-anim -no-audio -no-snapshot-load -gpu host -accel on &
182186
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
183187
$ANDROID_HOME/platform-tools/adb devices
184188
# disable spell checker
@@ -192,6 +196,7 @@ jobs:
192196
run: npm run setup:${{matrix.framework}}:${{matrix.build-tool}} -- --name ${{ env.MEGA_APP_NAME }} --platform ${{matrix.platform}} --tag ${{inputs.dist-tag}} --framework-version ${{matrix.framework-version.value}} --build-tool-version ${{matrix.build-tool-version}}
193197
shell: bash
194198
working-directory: build-system-tests
199+
195200
- name: Detect Mega App Error in Log
196201
run: npm run checkReactNativeLogs -- --log-file-name ${{ matrix.logfile }} --mega-app-name ${{ env.MEGA_APP_NAME }} --platform ${{ matrix.platform }}
197202
shell: bash

.github/workflows/reusable-e2e.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,25 @@ jobs:
6969
include:
7070
- example: angular
7171
package: angular
72+
resource-path: ui/components/authenticator/sign-in-with-username
7273
tags: '@angular and not @todo-angular'
7374

7475
- example: next
7576
package: react
77+
resource-path: ui/components/authenticator/sign-in-with-username
7678
tags: '@react and not @todo-react'
7779

80+
- example: react-router
81+
package: react
82+
tags: '@react-router and not @todo-react-router'
83+
84+
- example: next-app-router
85+
package: react
86+
tags: '@next-app-router and not @todo-next-app-router'
87+
7888
- example: vue
7989
package: vue
90+
resource-path: ui/components/authenticator/sign-in-with-username
8091
tags: '@vue and not @todo-vue'
8192

8293
steps:
@@ -184,6 +195,9 @@ jobs:
184195
if: ${{ matrix.package == 'react' }}
185196
run: yarn react-ai build
186197

198+
- name: Build test-utils package
199+
run: yarn test-utils build
200+
187201
- name: Add Amplify CLI
188202
run: yarn global add @aws-amplify/cli
189203

@@ -311,7 +325,7 @@ jobs:
311325
run: yarn ${{ matrix.example }}-example build
312326

313327
- name: Start ${{ matrix.example }} example
314-
run: yarn ${{ matrix.example }}-example start & npx wait-on -c waitOnConfig.json -t 20000 http-get://localhost:3000/ui/components/authenticator/sign-in-with-username
328+
run: yarn ${{ matrix.example }}-example start & npx wait-on -c waitOnConfig.json -t 20000 http-get://localhost:3000/${{ matrix.resource-path || '' }}
315329
env:
316330
# Setting this value temporarily since the beta liveness sample app hits the gamma endpoint
317331
NEXT_PUBLIC_STREAMING_API_URL: wss://streaming-rekognition-gamma.us-east-1.amazonaws.com

.github/workflows/reusable-unit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ jobs:
146146
- name: Check ${{ matrix.package }} bundle size
147147
if: |
148148
matrix.package == 'react' ||
149+
matrix.package == 'react-ai' ||
149150
matrix.package == 'react-auth' ||
150151
matrix.package == 'react-geo' ||
151152
matrix.package == 'react-liveness' ||

.github/workflows/version-packages.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Version Packages
77

88
on:
99
push:
10-
branches: [main]
10+
branches: [main, hotfix]
1111

1212
permissions:
1313
contents: write # Used to commit to "Version Packages" PR
@@ -42,5 +42,9 @@ jobs:
4242
uses: changesets/action@b98cec97583b917ff1dc6179dd4d230d3e439894
4343
with:
4444
version: yarn bumpVersions
45+
# Use the current branch as the base for the PR
46+
base: ${{ github.ref_name }}
47+
# Custom title based on branch
48+
title: 'Version Packages (${{ github.ref_name }})'
4549
env:
4650
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)