Skip to content

Commit d81af13

Browse files
authored
Merge remote-tracking branch 'upstream/main' into v5/custom-clients (#11374)
2 parents bd7883d + a2c3f49 commit d81af13

File tree

505 files changed

+35649
-19791
lines changed

Some content is hidden

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

505 files changed

+35649
-19791
lines changed

.circleci/config.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -1592,15 +1592,25 @@ jobs:
15921592
- amplify-ssh-deps-{{ .Branch }}
15931593
- amplify-ssh-deps
15941594
- run:
1595-
name: 'Post-release steps'
1595+
name: 'Update roll-back infrastructure'
15961596
command: |
15971597
git config --global user.email $GITHUB_EMAIL
15981598
git config --global user.name $GITHUB_USER
15991599
git pull origin release
1600-
yarn workspace @aws-amplify/core build
1601-
git add ./packages/core/src/Platform/version.ts
1602-
git commit -m "chore(release): update version.ts [ci skip]"
1600+
PUBLISH_COMMIT_HASH=$(git log -n 1 --pretty=format:"%H")
1601+
RELEASE_COMMIT_MESSAGE=$(git log -n 1 --skip 1 --pretty=oneline)
1602+
if [[ $RELEASE_COMMIT_MESSAGE = *release\(required\)* ]]; then git tag -f required-release $PUBLISH_COMMIT_HASH; fi
1603+
- run:
1604+
name: 'Update API documentation'
1605+
command: |
1606+
yarn run docs
1607+
git add ./docs/api/
1608+
git commit -m "chore(release): update API docs [ci skip]"
1609+
- run:
1610+
name: 'Push post release changes'
1611+
command: |
16031612
git push origin release
1613+
git push -f origin required-release
16041614
git push --force-with-lease origin release:main
16051615
16061616
# Specifies the branches that can be considered releasable.
@@ -2325,16 +2335,18 @@ workflows:
23252335
- getting-started-smoke-test/web:
23262336
name: Next.js - latest
23272337
npx-command: create-next-app
2338+
npx-post: --use-npm --ts --tailwind --no-eslint --no-src-dir --no-app --import-alias "@/*"`
23282339
framework: nextjs
2329-
main-file-path: pages/_app.js
2340+
main-file-path: pages/_app.tsx
23302341
dev-start: dev
23312342
build-dir: build
23322343
ssr: true
23332344
- getting-started-smoke-test/web:
23342345
name: Next.js - next
23352346
npx-command: create-next-app@canary
2347+
npx-post: --use-npm --ts --tailwind --no-eslint --no-src-dir --no-app --import-alias "@/*"`
23362348
framework: nextjs
2337-
main-file-path: pages/_app.js
2349+
main-file-path: pages/_app.tsx
23382350
dev-start: dev
23392351
build-dir: build
23402352
ssr: true
@@ -2510,7 +2522,10 @@ orbs:
25102522
no_output_timeout: 2m
25112523
- run-with-retry:
25122524
label: Install AmplifyJS
2513-
command: npm i -S aws-amplify && npm i -g wait-on serve
2525+
command: |
2526+
npm i -S aws-amplify
2527+
npm i -g wait-on serve
2528+
~/amplify-js/.circleci/duplicates-npm.sh
25142529
- run:
25152530
name: Call Amplify library in code
25162531
command: |

.circleci/duplicates-npm.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
# This script detects duplicated Amplify dependencies in the dependency graph (with NPM)
4+
duplicatedDependencies=$(
5+
npm ls -all 2>/dev/null | \
6+
grep -o -e '@\?aws-amplify[^ ]*' | \
7+
sort | uniq | \
8+
sed -E 's/^(@?[^@]+).*$/\1/g' | \
9+
uniq -d | sort
10+
)
11+
12+
if [ ! "$duplicatedDependencies" ]; then
13+
echo "No duplicated Amplify dependencies detected."
14+
else
15+
echo "Duplicated Amplify dependencies detected: $duplicatedDependencies"
16+
false
17+
fi

.github/ISSUE_TEMPLATE/1.bug_report.yaml

-10
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ body:
2121
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
2222
| `amazon-cognito-identity-js` | [![version](https://img.shields.io/npm/v/amazon-cognito-identity-js/latest.svg)](https://www.npmjs.com/package/amazon-cognito-identity-js) |
2323
| `aws-amplify` | [![version](https://img.shields.io/npm/v/aws-amplify/latest.svg)](https://www.npmjs.com/package/aws-amplify) |
24-
| `aws-amplify-angular` | [![version](https://img.shields.io/npm/v/aws-amplify-angular/latest.svg)](https://www.npmjs.com/package/aws-amplify-angular) |
25-
| `aws-amplify-react` | [![version](https://img.shields.io/npm/v/aws-amplify-react/latest.svg)](https://www.npmjs.com/package/aws-amplify-react) |
2624
| `aws-amplify-react-native` | [![version](https://img.shields.io/npm/v/aws-amplify-react-native/latest.svg)](https://www.npmjs.com/package/aws-amplify-react-native) |
27-
| `aws-amplify-vue` | [![version](https://img.shields.io/npm/v/aws-amplify-vue/latest.svg)](https://www.npmjs.com/package/aws-amplify-vue) |
2825
| `@aws-amplify/analytics` | [![version](https://img.shields.io/npm/v/@aws-amplify/analytics/latest.svg)](https://www.npmjs.com/package/@aws-amplify/analytics) |
2926
| `@aws-amplify/api` | [![version](https://img.shields.io/npm/v/@aws-amplify/api/latest.svg)](https://www.npmjs.com/package/@aws-amplify/api) |
3027
| `@aws-amplify/api-graphql` | [![version](https://img.shields.io/npm/v/@aws-amplify/api-graphql/latest.svg)](https://www.npmjs.com/package/@aws-amplify/api-graphql) |
@@ -38,12 +35,6 @@ body:
3835
| `@aws-amplify/pubsub` | [![version](https://img.shields.io/npm/v/@aws-amplify/pubsub/latest.svg)](https://www.npmjs.com/package/@aws-amplify/pubsub) |
3936
| `@aws-amplify/pushnotification` | [![version](https://img.shields.io/npm/v/@aws-amplify/pushnotification/latest.svg)](https://www.npmjs.com/package/@aws-amplify/pushnotification) |
4037
| `@aws-amplify/storage` | [![version](https://img.shields.io/npm/v/@aws-amplify/storage/latest.svg)](https://www.npmjs.com/package/@aws-amplify/storage) |
41-
| `@aws-amplify/ui` | [![version](https://img.shields.io/npm/v/@aws-amplify/ui/latest.svg)](https://www.npmjs.com/package/@aws-amplify/ui) |
42-
| `@aws-amplify/ui-angular` | [![version](https://img.shields.io/npm/v/@aws-amplify/ui-angular/latest.svg)](https://www.npmjs.com/package/@aws-amplify/ui-angular) |
43-
| `@aws-amplify/ui-components` | [![version](https://img.shields.io/npm/v/@aws-amplify/ui-components/latest.svg)](https://www.npmjs.com/package/@aws-amplify/ui-components) |
44-
| `@aws-amplify/ui-react` | [![version](https://img.shields.io/npm/v/@aws-amplify/ui-react/latest.svg)](https://www.npmjs.com/package/@aws-amplify/ui-react) |
45-
| `@aws-amplify/ui-vue` | [![version](https://img.shields.io/npm/v/@aws-amplify/ui-vue/latest.svg)](https://www.npmjs.com/package/@aws-amplify/ui-vue) |
46-
| `@aws-amplify/xr` | [![version](https://img.shields.io/npm/v/@aws-amplify/xr/latest.svg)](https://www.npmjs.com/package/@aws-amplify/xr) |
4738
4839
</details>
4940
@@ -118,7 +109,6 @@ body:
118109
- notifications
119110
- interactions
120111
- predictions
121-
- xr
122112
- Not applicable
123113
- type: textarea
124114
attributes:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: issue-pending-response
2+
on:
3+
issue_comment:
4+
types: [created]
5+
permissions:
6+
issues: write
7+
jobs:
8+
issue_commented:
9+
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'pending-response') }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: siegerts/pending-author-response@v1
13+
with:
14+
github-token: ${{ secrets.GITHUB_TOKEN }}
15+
pending-response-label: pending-response

.github/workflows/snyk-security.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 'Snyk Security'
2+
3+
on:
4+
push:
5+
branches: ['release']
6+
schedule:
7+
- cron: '0 0 * * *' # run daily at midnight GMT
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
snyk:
14+
if: github.repository == 'aws-amplify/amplify-js'
15+
permissions:
16+
contents: read # for actions/checkout to fetch code
17+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
18+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Snyk CLI to check for security issues
23+
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb
24+
- name: Build
25+
run: yarn install || true
26+
# Using `|| true` to not fail the pipeline
27+
- name: Snyk test
28+
env:
29+
SNYK_TOKEN: ${{secrets.SNYK_TOKEN}}
30+
run: snyk test --sarif | tee snyk-code.sarif # || true
31+
32+
# Push the Snyk Code results into GitHub Code Scanning tab
33+
- name: Upload result to GitHub Code Scanning
34+
uses: github/codeql-action/upload-sarif@v2
35+
with:
36+
sarif_file: snyk-code.sarif

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ package-lock.json
2020
packages/*/.watchmanconfig
2121
dual-publish-tmp
2222

23+
### Version file - core build artifact
24+
packages/core/src/Platform/version.ts
25+
2326
### Gradle ###
2427
.gradle/
2528
local.properties

docs/Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GEM
1313
execjs
1414
coffee-script-source (1.11.1)
1515
colorator (1.1.0)
16-
commonmarker (0.23.8)
16+
commonmarker (0.23.9)
1717
concurrent-ruby (1.2.2)
1818
dnsruby (1.61.9)
1919
simpleidn (~> 0.1)
@@ -211,7 +211,7 @@ GEM
211211
jekyll-feed (~> 0.9)
212212
jekyll-seo-tag (~> 2.1)
213213
minitest (5.18.0)
214-
nokogiri (1.13.10)
214+
nokogiri (1.14.3)
215215
mini_portile2 (~> 2.8.0)
216216
racc (~> 1.4)
217217
octokit (4.25.1)

docs/_config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
1010

1111
# Site settings
12+
#
1213
# These are used to personalize your new site. If you look in the HTML files,
1314
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
1415
# You can create any custom variable you would like, and they will be accessible
@@ -341,4 +342,4 @@ js_libraries:
341342
- title: Ionic
342343
url: '?platform=ionic'
343344
- title: JavaScript
344-
url: '?platform=purejs'
345+
url: '?platform=purejs'

docs/amplify-theme/_includes/site-head.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
{% if page.keywords %}
1010
<meta name="keywords" content="{{ page.keywords }}">
1111
{% endif %}
12-
<link rel="icon" htype="image/png" href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/favicon.png">
13-
<link rel='apple-touch-icon' type='image/png' href='{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/favicon.png'> <!-- iPhone -->
12+
<link rel="icon" htype="image/png" href="{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/favicon.png">
13+
<link rel='apple-touch-icon' type='image/png' href='{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/favicon.png'> <!-- iPhone -->
1414
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,400i,500,500i,700,700i|Noto+Sans:400,400i,700,700i|Source+Code+Pro&amp;subset=latin-ext">
1515
<link rel="stylesheet" href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/amplify-theme/assets/css/style.css">
16-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
16+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />

docs/amplify-theme/_includes/site-header.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
{% if site.amplify.header.logo.text %}
5555
<div class="logo-container" id="logo-container">
5656
<a href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/" class="site-header__logo">
57-
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/logo.png">
57+
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/logo.png">
5858
<p class="header-amplify">{{ site.amplify.header.logo.text }} </p>
5959
</a>
6060
</div>
6161
{% elsif site.amplify.header.logo.image %}
6262
<a href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/" class="site-header__logo">
63-
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/logo.png">
63+
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/logo.png">
6464
</a><!-- /.site-header__logo -->
6565
{% endif %}
6666
{% if site.amplify.header.nav %}
@@ -152,4 +152,4 @@
152152

153153
setBackgroundImage();
154154
</script>
155-
{% endif %}
155+
{% endif %}

docs/amplify-theme/typedoc/layouts/default.hbs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title>{{model.name}} | {{project.name}}</title>
77
<meta name="description" content="">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="icon" type="image/x-icon" href="https://aws-amplify.github.io/amplify-js/images/layout/favicon.ico">
910
<style type="text/css">/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
1011
/* ========================================================================== HTML5 display definitions ========================================================================== */
1112
/** Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */

docs/amplify-theme/typedoc/partials/header.hbs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<div class="table-wrap">
55
<div class="table-cell logo">
66
<a href="{{relativeURL "index.html"}}">
7-
<img src="https://aws-amplify.github.io/images/layout/logo.png" style="width:38px; position: absolute; margin-top: 5px;">
8-
<div style="margin-left: 45px; padding-top: 1px; position: absolute;">AWS Amplify API</div>
7+
<img src="https://aws-amplify.github.io/amplify-js/images/layout/logo.png" style="width:38px; position: absolute; margin-top: 5px;">
8+
<div style="margin-left: 45px; padding-top: 1px; position: relative;">AWS Amplify JS API</div>
99
</a>
1010
</div>
1111
<div class="table-cell" style=""> <body>
12-
<a href="/amplify-js/" style='background: #efefef; padding: 4px; border-radius: 20px; font-size: 14.5px; padding-left: 10px; padding-right: 10px;' for="tsd-filter-docs">AWS Amplify Home</a>
12+
<a href="https://docs.amplify.aws/lib/q/platform/js/" style='background: #efefef; padding: 4px; border-radius: 20px; font-size: 14.5px; padding-left: 10px; padding-right: 10px;' for="tsd-filter-docs">AWS Amplify JS Dev Center</a>
1313
</div> </body>
1414
<div class="table-cell" id="tsd-widgets">
1515
<div id="tsd-filter">

0 commit comments

Comments
 (0)