Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into v5/custom-clients
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed May 16, 2023
2 parents bd7883d + a410950 commit 926d1ef
Show file tree
Hide file tree
Showing 505 changed files with 35,641 additions and 19,783 deletions.
29 changes: 22 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1592,15 +1592,25 @@ jobs:
- amplify-ssh-deps-{{ .Branch }}
- amplify-ssh-deps
- run:
name: 'Post-release steps'
name: 'Update roll-back infrastructure'
command: |
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
git pull origin release
yarn workspace @aws-amplify/core build
git add ./packages/core/src/Platform/version.ts
git commit -m "chore(release): update version.ts [ci skip]"
PUBLISH_COMMIT_HASH=$(git log -n 1 --pretty=format:"%H")
RELEASE_COMMIT_MESSAGE=$(git log -n 1 --skip 1 --pretty=oneline)
if [[ $RELEASE_COMMIT_MESSAGE = *release\(required\)* ]]; then git tag -f required-release $PUBLISH_COMMIT_HASH; fi
- run:
name: 'Update API documentation'
command: |
yarn run docs
git add ./docs/api/
git commit -m "chore(release): update API docs [ci skip]"
- run:
name: 'Push post release changes'
command: |
git push origin release
git push -f origin required-release
git push --force-with-lease origin release:main
# Specifies the branches that can be considered releasable.
Expand Down Expand Up @@ -2325,16 +2335,18 @@ workflows:
- getting-started-smoke-test/web:
name: Next.js - latest
npx-command: create-next-app
npx-post: --use-npm --ts --tailwind --no-eslint --no-src-dir --no-app --import-alias "@/*"`
framework: nextjs
main-file-path: pages/_app.js
main-file-path: pages/_app.tsx
dev-start: dev
build-dir: build
ssr: true
- getting-started-smoke-test/web:
name: Next.js - next
npx-command: create-next-app@canary
npx-post: --use-npm --ts --tailwind --no-eslint --no-src-dir --no-app --import-alias "@/*"`
framework: nextjs
main-file-path: pages/_app.js
main-file-path: pages/_app.tsx
dev-start: dev
build-dir: build
ssr: true
Expand Down Expand Up @@ -2510,7 +2522,10 @@ orbs:
no_output_timeout: 2m
- run-with-retry:
label: Install AmplifyJS
command: npm i -S aws-amplify && npm i -g wait-on serve
command: |
npm i -S aws-amplify
npm i -g wait-on serve
~/amplify-js/.circleci/duplicates-npm.sh
- run:
name: Call Amplify library in code
command: |
Expand Down
17 changes: 17 additions & 0 deletions .circleci/duplicates-npm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# This script detects duplicated Amplify dependencies in the dependency graph (with NPM)
duplicatedDependencies=$(
npm ls -all 2>/dev/null | \
grep -o -e '@\?aws-amplify[^ ]*' | \
sort | uniq | \
sed -E 's/^(@?[^@]+).*$/\1/g' | \
uniq -d | sort
)

if [ ! "$duplicatedDependencies" ]; then
echo "No duplicated Amplify dependencies detected."
else
echo "Duplicated Amplify dependencies detected: $duplicatedDependencies"
false
fi
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/1.bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ body:
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `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) |
| `aws-amplify` | [![version](https://img.shields.io/npm/v/aws-amplify/latest.svg)](https://www.npmjs.com/package/aws-amplify) |
| `aws-amplify-angular` | [![version](https://img.shields.io/npm/v/aws-amplify-angular/latest.svg)](https://www.npmjs.com/package/aws-amplify-angular) |
| `aws-amplify-react` | [![version](https://img.shields.io/npm/v/aws-amplify-react/latest.svg)](https://www.npmjs.com/package/aws-amplify-react) |
| `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) |
| `aws-amplify-vue` | [![version](https://img.shields.io/npm/v/aws-amplify-vue/latest.svg)](https://www.npmjs.com/package/aws-amplify-vue) |
| `@aws-amplify/analytics` | [![version](https://img.shields.io/npm/v/@aws-amplify/analytics/latest.svg)](https://www.npmjs.com/package/@aws-amplify/analytics) |
| `@aws-amplify/api` | [![version](https://img.shields.io/npm/v/@aws-amplify/api/latest.svg)](https://www.npmjs.com/package/@aws-amplify/api) |
| `@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) |
Expand All @@ -38,12 +35,6 @@ body:
| `@aws-amplify/pubsub` | [![version](https://img.shields.io/npm/v/@aws-amplify/pubsub/latest.svg)](https://www.npmjs.com/package/@aws-amplify/pubsub) |
| `@aws-amplify/pushnotification` | [![version](https://img.shields.io/npm/v/@aws-amplify/pushnotification/latest.svg)](https://www.npmjs.com/package/@aws-amplify/pushnotification) |
| `@aws-amplify/storage` | [![version](https://img.shields.io/npm/v/@aws-amplify/storage/latest.svg)](https://www.npmjs.com/package/@aws-amplify/storage) |
| `@aws-amplify/ui` | [![version](https://img.shields.io/npm/v/@aws-amplify/ui/latest.svg)](https://www.npmjs.com/package/@aws-amplify/ui) |
| `@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) |
| `@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) |
| `@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) |
| `@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) |
| `@aws-amplify/xr` | [![version](https://img.shields.io/npm/v/@aws-amplify/xr/latest.svg)](https://www.npmjs.com/package/@aws-amplify/xr) |
</details>
Expand Down Expand Up @@ -118,7 +109,6 @@ body:
- notifications
- interactions
- predictions
- xr
- Not applicable
- type: textarea
attributes:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/issue-pending-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: issue-pending-response
on:
issue_comment:
types: [created]
permissions:
issues: write
jobs:
issue_commented:
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'pending-response') }}
runs-on: ubuntu-latest
steps:
- uses: siegerts/pending-author-response@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pending-response-label: pending-response
36 changes: 36 additions & 0 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Snyk Security'

on:
push:
branches: ['release']
schedule:
- cron: '0 0 * * *' # run daily at midnight GMT

permissions:
contents: read

jobs:
snyk:
if: github.repository == 'aws-amplify/amplify-js'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Snyk CLI to check for security issues
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb
- name: Build
run: yarn install || true
# Using `|| true` to not fail the pipeline
- name: Snyk test
env:
SNYK_TOKEN: ${{secrets.SNYK_TOKEN}}
run: snyk test --sarif | tee snyk-code.sarif # || true

# Push the Snyk Code results into GitHub Code Scanning tab
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk-code.sarif
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ package-lock.json
packages/*/.watchmanconfig
dual-publish-tmp

### Version file - core build artifact
packages/core/src/Platform/version.ts

### Gradle ###
.gradle/
local.properties
Expand Down
4 changes: 2 additions & 2 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GEM
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.23.8)
commonmarker (0.23.9)
concurrent-ruby (1.2.2)
dnsruby (1.61.9)
simpleidn (~> 0.1)
Expand Down Expand Up @@ -211,7 +211,7 @@ GEM
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.18.0)
nokogiri (1.13.10)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (4.25.1)
Expand Down
3 changes: 2 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.

# Site settings
#
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
Expand Down Expand Up @@ -341,4 +342,4 @@ js_libraries:
- title: Ionic
url: '?platform=ionic'
- title: JavaScript
url: '?platform=purejs'
url: '?platform=purejs'
6 changes: 3 additions & 3 deletions docs/amplify-theme/_includes/site-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
{% if page.keywords %}
<meta name="keywords" content="{{ page.keywords }}">
{% endif %}
<link rel="icon" htype="image/png" href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/favicon.png">
<link rel='apple-touch-icon' type='image/png' href='{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/favicon.png'> <!-- iPhone -->
<link rel="icon" htype="image/png" href="{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/favicon.png">
<link rel='apple-touch-icon' type='image/png' href='{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/favicon.png'> <!-- iPhone -->
<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">
<link rel="stylesheet" href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/amplify-theme/assets/css/style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
6 changes: 3 additions & 3 deletions docs/amplify-theme/_includes/site-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
{% if site.amplify.header.logo.text %}
<div class="logo-container" id="logo-container">
<a href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/" class="site-header__logo">
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/logo.png">
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/logo.png">
<p class="header-amplify">{{ site.amplify.header.logo.text }} </p>
</a>
</div>
{% elsif site.amplify.header.logo.image %}
<a href="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/" class="site-header__logo">
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.baseurl }}{% endif %}/images/layout/logo.png">
<img src="{% if jekyll.environment == 'production' %}{{ site.amplify.docs_baseurl }}{% endif %}/images/layout/logo.png">
</a><!-- /.site-header__logo -->
{% endif %}
{% if site.amplify.header.nav %}
Expand Down Expand Up @@ -152,4 +152,4 @@

setBackgroundImage();
</script>
{% endif %}
{% endif %}
1 change: 1 addition & 0 deletions docs/amplify-theme/typedoc/layouts/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<title>{{model.name}} | {{project.name}}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="https://aws-amplify.github.io/amplify-js/images/layout/favicon.ico">
<style type="text/css">/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
/* ========================================================================== HTML5 display definitions ========================================================================== */
/** Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */
Expand Down
6 changes: 3 additions & 3 deletions docs/amplify-theme/typedoc/partials/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<div class="table-wrap">
<div class="table-cell logo">
<a href="{{relativeURL "index.html"}}">
<img src="https://aws-amplify.github.io/images/layout/logo.png" style="width:38px; position: absolute; margin-top: 5px;">
<div style="margin-left: 45px; padding-top: 1px; position: absolute;">AWS Amplify API</div>
<img src="https://aws-amplify.github.io/amplify-js/images/layout/logo.png" style="width:38px; position: absolute; margin-top: 5px;">
<div style="margin-left: 45px; padding-top: 1px; position: relative;">AWS Amplify JS API</div>
</a>
</div>
<div class="table-cell" style=""> <body>
<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>
<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>
</div> </body>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
Expand Down
Loading

0 comments on commit 926d1ef

Please sign in to comment.