Skip to content

Commit

Permalink
chore: Align polyfill pattern to reduce duplicated export files (#12222)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron S <[email protected]>
  • Loading branch information
cshfang and stocaaro authored Oct 6, 2023
1 parent 388d7b8 commit c30700e
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 71 deletions.
13 changes: 0 additions & 13 deletions packages/api-rest/src/utils/index.native.ts

This file was deleted.

2 changes: 2 additions & 0 deletions packages/api-rest/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import './polyfills';

export { createCancellableOperation } from './createCancellableOperation';
export { resolveCredentials } from './resolveCredentials';
export { parseSigningInfo } from './parseSigningInfo';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// no op
// noop - polyfills not required on platform
2 changes: 1 addition & 1 deletion packages/auth/src/providers/cognito/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import './polyfill';
import './polyfills';

export { signUp } from './apis/signUp';
export { resetPassword } from './apis/resetPassword';
Expand Down
5 changes: 5 additions & 0 deletions packages/auth/src/providers/cognito/polyfills/index.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { loadUrlPolyfill } from '@aws-amplify/react-native';

loadUrlPolyfill();
4 changes: 4 additions & 0 deletions packages/auth/src/providers/cognito/polyfills/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// noop - polyfills not required on platform

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import './polyfills';

// TODO: V6 replace Signer
export { signRequest } from './signRequest';
export { presignUrl } from './presignUrl';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { loadUrlPolyfill } from '@aws-amplify/react-native';

loadUrlPolyfill();
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// noop - polyfills not required on platform
44 changes: 0 additions & 44 deletions packages/storage/src/providers/s3/utils/client/index.native.ts

This file was deleted.

2 changes: 2 additions & 0 deletions packages/storage/src/providers/s3/utils/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import './polyfills';

export { SERVICE_NAME } from './base';
export {
getObject,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { loadUrlPolyfill } from '@aws-amplify/react-native';

loadUrlPolyfill();
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// noop - polyfills not required on platform

0 comments on commit c30700e

Please sign in to comment.