Skip to content

Commit c30700e

Browse files
cshfangstocaaro
andauthored
chore: Align polyfill pattern to reduce duplicated export files (#12222)
Co-authored-by: Aaron S <[email protected]>
1 parent 388d7b8 commit c30700e

File tree

15 files changed

+35
-71
lines changed

15 files changed

+35
-71
lines changed

packages/api-rest/src/utils/index.native.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/api-rest/src/utils/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
import './polyfills';
5+
46
export { createCancellableOperation } from './createCancellableOperation';
57
export { resolveCredentials } from './resolveCredentials';
68
export { parseSigningInfo } from './parseSigningInfo';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
// no op
4+
// noop - polyfills not required on platform

packages/auth/src/providers/cognito/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import './polyfill';
4+
import './polyfills';
55

66
export { signUp } from './apis/signUp';
77
export { resetPassword } from './apis/resetPassword';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
import { loadUrlPolyfill } from '@aws-amplify/react-native';
4+
5+
loadUrlPolyfill();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
// noop - polyfills not required on platform

packages/core/src/clients/middleware/signing/signer/signatureV4/index.native.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/core/src/clients/middleware/signing/signer/signatureV4/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
import './polyfills';
5+
46
// TODO: V6 replace Signer
57
export { signRequest } from './signRequest';
68
export { presignUrl } from './presignUrl';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
import { loadUrlPolyfill } from '@aws-amplify/react-native';
4+
5+
loadUrlPolyfill();

0 commit comments

Comments
 (0)