Skip to content

Commit

Permalink
chore: sync central-logger with main (#12784)
Browse files Browse the repository at this point in the history
* chore: enable e2e in-app test

* chore: correct integ sample path

* feat(ci): allow 0BSD license (#12761)

Co-authored-by: Ashwin Kumar <ashwsrir@amazon.com>

* fix(api): issue 12756 by exporting CONNECTION_STATE_CHANGE as a value (#12757)

fix: issue 12756 by exporting CONNECTION_STATE_CHANGE as a value

rather than as a type

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>

---------

Co-authored-by: ManojNB <manojnb95@gmail.com>
Co-authored-by: ManojNB <manojnb@amazon.com>
Co-authored-by: Ashwin Kumar <ashwsrir@amazon.com>
Co-authored-by: Tim <timheilman@users.noreply.github.com>
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
  • Loading branch information
6 people committed Jan 2, 2024
1 parent 23c6d2e commit d25b4cd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/dependency-review/dependecy-review-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
allow-licenses:
- 'Apache-2.0'
- '0BSD'
- 'BSL-1.0'
- 'BSD-1-Clause'
- 'BSD-2-Clause-FreeBSD'
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 @@ -734,6 +734,15 @@ tests:
spec: multi-part-copy
browser: *minimal_browser_list

# INAPPMESSAGING
- test_name: integ_in_app_messaging
desc: 'React InApp Messaging'
framework: react
category: in-app-messaging
sample_name: [in-app-messaging-app]
spec: in-app-messaging
browser: *minimal_browser_list

# - test_name: integ_duplicate_packages
# desc: 'Duplicate Package Errors'
# framework: react
Expand Down
5 changes: 4 additions & 1 deletion packages/api/__tests__/API.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ResourcesConfig } from 'aws-amplify';
import { InternalGraphQLAPIClass } from '@aws-amplify/api-graphql/internals';
import { generateClient } from '@aws-amplify/api';
import { generateClient, CONNECTION_STATE_CHANGE } from '@aws-amplify/api';
import { AmplifyClassV6 } from '@aws-amplify/core';
// import { runWithAmplifyServerContext } from 'aws-amplify/internals/adapter-core';

Expand Down Expand Up @@ -38,6 +38,9 @@ describe('API generateClient', () => {
);
});

test('CONNECTION_STATE_CHANGE importable as a value, not a type', async () => {
expect(CONNECTION_STATE_CHANGE).toBe('ConnectionStateChange');
})
// test('server-side client.graphql', async () => {
// const config: ResourcesConfig = {
// API: {
Expand Down
3 changes: 2 additions & 1 deletion packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ export { GraphQLAuthError, ConnectionState } from '@aws-amplify/api-graphql';
export type {
GraphQLResult,
GraphQLReturnType,
CONNECTION_STATE_CHANGE,
} from '@aws-amplify/api-graphql';

export { CONNECTION_STATE_CHANGE } from '@aws-amplify/api-graphql';

import type { V6Client } from '@aws-amplify/api-graphql';

// explicitly defaulting to `never` here resolves
Expand Down
1 change: 1 addition & 0 deletions packages/aws-amplify/__tests__/exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('aws-amplify Exports', () => {
it('should only export expected symbols from the top level', () => {
expect(Object.keys(apiTopLevelExports).sort()).toEqual(
[
'CONNECTION_STATE_CHANGE',
'ConnectionState',
'GraphQLAuthError',
'del',
Expand Down

0 comments on commit d25b4cd

Please sign in to comment.