-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: verify public interfaces are compliant to TS4.0 #12013
Merged
AllanZhengYP
merged 22 commits into
aws-amplify:next/release
from
AllanZhengYP:typescript-upgrade-commit
Sep 19, 2023
Merged
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3f92c49
Merge branch 'next/release' into 'next/main' (#12005)
ashwinkumar6 366fd9d
feat: initial commit of ts-compliance-test
AllanZhengYP 22164f5
test: add ts3.8 compliance test
AllanZhengYP 41253ac
test: update tsc compliance test to target TS4.0
AllanZhengYP 3c6b30e
chore: include cognito server path
AllanZhengYP e5e4e5a
Merge remote-tracking branch 'upstream/next/release' into typescript-…
AllanZhengYP 1aeb0b1
chore: fix diffs
AllanZhengYP b174df7
test: add tsc compliance test to github actions
AllanZhengYP 9b43f1e
Merge branch 'next/release' into typescript-upgrade-commit
AllanZhengYP 44083a4
chore: add @smithy/[email protected] along with @aws-sdk/types
AllanZhengYP 55faa18
chore: update yarn.lock
AllanZhengYP bbd50a8
chore: run yarn upgrade
AllanZhengYP 8335928
Merge remote-tracking branch 'upstream/next/release' into typescript-…
AllanZhengYP 93d9885
chore: fix git diff
AllanZhengYP 4a46e15
chore: add documentation
AllanZhengYP 2a710fa
Revert "chore: add @smithy/[email protected] along with @aws-sdk/types"
AllanZhengYP 74d6124
Merge branch 'next/release' into typescript-upgrade-commit
jimblanc aa9f664
Merge branch 'next/release' into typescript-upgrade-commit
israx 777ad50
feat: add aws-amplify to the tsc-compliance-test dev dependency
AllanZhengYP 2001ab5
update yarn.lock
AllanZhengYP 0716c95
fix: use @types/node@16 to compatible with ts4.0
AllanZhengYP 01695a5
Merge branch 'next/release' into typescript-upgrade-commit
stocaaro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Test Github Actions | ||
on: workflow_call | ||
|
||
jobs: | ||
tsc_compliance_test: | ||
name: TSC Compliance Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f | ||
with: | ||
path: amplify-js | ||
- name: Setup node and build the repository | ||
uses: ./amplify-js/.github/actions/node-and-build | ||
- name: Run GithubAction tests | ||
working-directory: ./amplify-js | ||
run: yarn test:tsc-compliance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This is an **internal-only** package to make sure all the Amplify JS library public interfaces are always compatible | ||
with TypeScript 4.0 compiler. | ||
|
||
If any additional public APIs are added to the library, you must make sure the new API is included in the `ts4_0.ts` | ||
file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "tsc-compliance-test", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"private": true, | ||
"devDependencies": { | ||
AllanZhengYP marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"@types/node": "20.6.2", | ||
"aws-amplify": "6.0.0", | ||
"typescript": "4.0.x" | ||
}, | ||
"scripts": { | ||
"test:compliance:ts4.0": "tsc -p tsconfig.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import * as Amplify from 'aws-amplify'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
import * as analytics from 'aws-amplify/analytics'; | ||
|
||
import * as auth from 'aws-amplify/auth'; | ||
import * as authCognito from 'aws-amplify/auth/cognito'; | ||
import * as authServer from 'aws-amplify/auth/server'; | ||
import * as authCognitoServer from 'aws-amplify/auth/cognito/server'; | ||
|
||
import * as storage from 'aws-amplify/storage'; | ||
import * as storageServer from 'aws-amplify/storage/server'; | ||
import * as storageS3 from 'aws-amplify/storage/s3'; | ||
import * as storageS3Server from 'aws-amplify/storage/s3/server'; | ||
|
||
import * as utils from 'aws-amplify/utils'; | ||
|
||
export const allPublicPaths = [ | ||
Amplify, | ||
analytics, | ||
auth, | ||
authCognito, | ||
authServer, | ||
authCognitoServer, | ||
storage, | ||
storageServer, | ||
storageS3, | ||
storageS3Server, | ||
utils, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"strict": true, | ||
"target": "ESNext", | ||
"lib": ["DOM", "ESNext.AsyncIterable", "ES2018.AsyncGenerator"], | ||
"moduleResolution": "node", | ||
"types": ["node"] | ||
}, | ||
"include": ["ts4_0.ts"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required to pull in the latest
@smithy/types
fix