Skip to content

Commit

Permalink
Merge branch 'main' into rn-getDeviceName
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinkumar6 committed Apr 29, 2024
2 parents b388b66 + 8fb751a commit 5006e37
Show file tree
Hide file tree
Showing 5,641 changed files with 134,851 additions and 814,451 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 34 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,55 @@ module.exports = {
'setupTests.ts',
'jest.setup.*',
'jest.config.*',
// temporarily disable lint on __tests__
'__tests__',
// 'packages/adapter-nextjs/__tests__',
'packages/analytics/__tests__',
'packages/api/__tests__',
'packages/api-graphql/__tests__',
'packages/api-rest/__tests__',
'packages/auth/__tests__',
// 'packages/aws-amplify/__tests__',
// 'packages/core/__tests__',
'packages/datastore/__tests__',
'packages/datastore-storage-adapter/__tests__',
'packages/geo/__tests__',
'packages/interactions/__tests__',
'packages/notifications/__tests__',
'packages/predictions/__tests__',
'packages/pubsub/__tests__',
'packages/react-native/__tests__',
'packages/rtn-push-notification/__tests__',
'packages/rtn-web-browser/__tests__',
'packages/storage/__tests__',
// will enable lint by packages
// 'adapter-nextjs',
// 'packages/analytics',
// 'packages/api',
'packages/api-graphql',
// 'packages/api-graphql',
// 'packages/api-rest',
'packages/auth',
// 'packages/auth',
// 'packages/aws-amplify',
// 'packages/core',
'packages/datastore',
'packages/datastore-storage-adapter',
'packages/geo',
'packages/interactions',
'packages/notifications',
'packages/predictions',
'packages/pubsub',
'packages/react-native',
'packages/rtn-push-notification',
'packages/rtn-web-browser',
// 'packages/geo',
// 'packages/interactions',
// 'packages/notifications',
// 'packages/predictions',
// 'packages/pubsub',
// 'packages/react-native',
// 'packages/rtn-push-notification',
// 'packages/rtn-web-browser',
// 'packages/storage',
],
rules: {
camelcase: [
'error',
{
allow: [
// exceptions for core package
'phone_number',
'search_indices',
// exceptions for api packages
'graphql_headers',
// exceptions for the legacy config
/^(aws_|amazon_)/,
Expand Down Expand Up @@ -105,6 +126,7 @@ module.exports = {
'no-useless-constructor': 'off',
'no-trailing-spaces': 'error',
'no-return-await': 'error',
'n/no-callback-literal': 'off',
'object-shorthand': 'error',
'prefer-destructuring': 'off',
'promise/catch-or-return': [
Expand Down
6 changes: 6 additions & 0 deletions .github/integ-config/detox-integ-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
- test_name: 'integ_rn_ios_datastore_sqlite_adapter'
working_directory: amplify-js-samples-staging/samples/react-native/datastore/SQLiteAdapter
timeout_minutes: 120
- test_name: 'integ_rn_ios_api_gen2_rn_72_detox_cli'
working_directory: amplify-js-samples-staging/samples/react-native/api/gen2/ApiGraphQLGen2
timeout_minutes: 120
- test_name: 'integ_rn_ios_api_v6_rn_72_detox_cli'
working_directory: amplify-js-samples-staging/samples/react-native/api/v6/ApiGRAPHQL
timeout_minutes: 120
# - test_name: 'integ_rn_android_storage'
# working_directory: ~/amplify-js-samples-staging/samples/react-native/storage/StorageApp
# - test_name: 'integ_rn_android_storage_multipart_progress'
Expand Down
9 changes: 9 additions & 0 deletions .github/integ-config/integ-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,15 @@ tests:
spec: multi-part-copy
browser: *minimal_browser_list

# GEN2 STORAGE
- test_name: integ_react_storage
desc: 'React Storage Gen2'
framework: react
category: storage
sample_name: [storage-gen2]
spec: storage-gen2
browser: *minimal_browser_list

# INAPPMESSAGING
- test_name: integ_in_app_messaging
desc: 'React InApp Messaging'
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/aws-amplify-dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `⚠️ This PR includes manual changes to the "aws-amplify" package.json file, which can have library-wide implications.
body: `⚠️ This PR includes changes to the "aws-amplify" package.json file, which can have library-wide implications.
Please ensure that this PR:
- Does not modify "@aws-amplify/*" dependency versions, which may misalign core dependencies across the library.
A repository administrator **is required** to review & merge this change.`
- Does not manually change "@aws-amplify/*" dependency versions, which may misalign core dependencies across the library
- Remove any export paths without a major version bump
A repository administrator **is required** to review this change.`
})
- name: Fail status check
if: steps.aws-amplify-package-check.outputs.any_changed == 'true'
run: exit 1
2 changes: 1 addition & 1 deletion .github/workflows/callable-canary-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
prebuild-macos:
uses: ./.github/workflows/callable-prebuild-amplify-js.yml
with:
runs_on: macos-latest
runs_on: macos-12
prebuild-samples-staging:
secrets: inherit
uses: ./.github/workflows/callable-prebuild-samples-staging.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/callable-e2e-test-detox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
e2e-test:
name: E2E-Detox ${{ inputs.test_name }}
runs-on: macos-latest
runs-on: macos-12
timeout-minutes: ${{ inputs.timeout_minutes }}

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/callable-npm-publish-lts-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
with:
path: amplify-js
token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
# Minimal depth 0 so we can fetch all git tags.
fetch-depth: 0

- name: Setup node and build the repository
uses: ./amplify-js/.github/actions/node-and-build
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/callable-npm-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,29 @@ name: Release to npm and update repository
on: workflow_call

jobs:
deploy-prep:
name: Prepare for release
runs-on: ubuntu-latest
steps:
- name: Generate a temporary branch name for merge PR
id: generate-branch-name
run: |
echo "BRANCH_NAME=temp/release-merge-$(date +%s)" >> "$GITHUB_OUTPUT"
outputs:
branch_name: ${{ steps.generate-branch-name.outputs.BRANCH_NAME }}

deploy:
name: Publish to Amplify Package
runs-on: ubuntu-latest
needs: deploy-prep
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: amplify-js
token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
# Minimal depth 0 so we can fetch all git tags.
fetch-depth: 0

- name: Setup node and build the repository
uses: ./amplify-js/.github/actions/node-and-build
Expand Down Expand Up @@ -45,11 +59,20 @@ jobs:
run: |
yarn run docs
git add ./docs/api/
git commit -m "chore(release): update API docs [ci skip]"
git commit -m "chore(release): update API docs [skip release]"
- name: Push post release changes
- name: Push post release changes to the release branch
working-directory: ./amplify-js
run: |
git push origin release
if [ $(git tag -l "required-release") ]; then git push -f origin required-release; fi
git push --force-with-lease origin release:main
- name: Create a PR to merge temporary release branch into main development branch
working-directory: ./amplify-js
env:
TEMP_BRANCH_NAME: ${{ needs.deploy-prep.outputs.branch_name }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
run: |
git checkout -b $TEMP_BRANCH_NAME
git push origin $TEMP_BRANCH_NAME
gh pr create -B main -H $TEMP_BRANCH_NAME --title 'chore: Merge release into main' --body 'Merge the recently completed release back into the main development branch. Generated by the callable-npm-publish-release workflow.'
2 changes: 1 addition & 1 deletion .github/workflows/callable-release-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
prebuild-macos:
uses: ./.github/workflows/callable-prebuild-amplify-js.yml
with:
runs_on: macos-latest
runs_on: macos-12
prebuild-samples-staging:
secrets: inherit
uses: ./.github/workflows/callable-prebuild-samples-staging.yml
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/push-latest-release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Push - release from release to latest

concurrency:
# group name unique for push to push-latest-release
group: push-release-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- release

jobs:
e2e:
# Skip the release workflow if the head commit in the triggering branch contains [skip release]
if: ${{ !contains(github.event.head_commit.message, '[skip release]') }}
secrets: inherit
uses: ./.github/workflows/callable-release-verification.yml
release:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"type": "node",
"request": "launch",
// The debugger will only run tests for the package specified here:
"cwd": "${workspaceFolder}/packages/datastore",
"cwd": "${workspaceFolder}/packages/api-graphql",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
// Optionally specify a single test file to run/debug:
"connectivityHandling.test.ts",
"generateClientWithAmplifyInstance.test.ts",
"--runInBand",
"--testTimeout",
"600000", // 10 min timeout so jest doesn't error while we're stepping through code
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.tabSize": 4,
"prettier.requireConfig": true,
"typescript.tsdk": "node_modules/typescript/lib",
"formattingToggle.affects": [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AWS Amplify provides a declarative and easy-to-use interface across different ca

Our default implementation works with Amazon Web Services (AWS), but AWS Amplify is designed to be open and pluggable for any custom backend or service.

#### Visit our [Documentation site](https://docs.amplify.aws/) to learn more about AWS Amplify. Please see our [Amplify JavaScript](https://docs.amplify.aws/lib/q/platform/js/) page within our Documentation site for information around the full list of features we support.
#### Visit our [documentation site](https://docs.amplify.aws/) to learn more about AWS Amplify. Please see the [Amplify JavaScript](https://docs.amplify.aws/lib/q/platform/js/) page for information around the full list of features we support.

- [Demo Applications](https://github.com/aws-amplify/amplify-js-samples)
- [Contributing](https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md)
Expand Down
89 changes: 0 additions & 89 deletions docs/.eslintrc

This file was deleted.

23 changes: 0 additions & 23 deletions docs/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions docs/.gitlab-ci.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
Loading

0 comments on commit 5006e37

Please sign in to comment.