Skip to content
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

chore(credential-providers): use .browser extension for index #3519

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Apr 7, 2022

Issue

N/A

Description

We use .browser.ts as an extension for browser specific JS code, and .native.ts extension for react-native specific JS code if it's different from that in the browser.

The primary reason for using "browser.ts" could have been due to "browser" configuration in package.json

The .web.ts extension in credential-providers could have been created as it's used in browser as well as react-native. I we want to follow this standard, the packages which are used across browser and react-native will need to be renamed to use -web - like @aws-sdk/util-utf8-browser or @aws-sdk/util-base64-browser, or the packages with -native suffix need to be created which re-exports -browser.

This suggestive PR renames .web.ts to .browser.ts which is one of the options.

Testing

Verified that index.browser.js is transpiled in dist-es

$ credential-providers> yarn run lerna run --scope '@aws-sdk/credential-providers' --include-dependencies build
...

$ credential-providers> ls dist-es
fromCognitoIdentity.js      fromEnv.js               fromProcess.js               fromTokenFile.js  index.js
fromCognitoIdentityPool.js  fromIni.js               fromSSO.js                   fromWebToken.js
fromContainerMetadata.js    fromInstanceMetadata.js  fromTemporaryCredentials.js  index.browser.js

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr marked this pull request as ready for review August 9, 2023 20:25
@trivikr trivikr requested a review from a team as a code owner August 9, 2023 20:25
@siddsriv siddsriv merged commit b228e1b into aws:main Aug 9, 2023
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
@trivikr trivikr deleted the credential-providers-extension-web branch September 13, 2024 14:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants