Skip to content

Evaluate providing ESM artifact for Node.js once TypeScript provides stable support #3223

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

Closed
trivikr opened this issue Jan 21, 2022 · 5 comments
Labels
feature-request New feature or enhancement. May require GitHub community feedback. p2 This is a standard priority issue

Comments

@trivikr
Copy link
Member

trivikr commented Jan 21, 2022

Is your feature request related to a problem? Please describe.

The AWS SDK for JavaScript (v3) currently does not provide a separate ESM artifact for Node.js
Users either use the CJS artifact or ES5 artifact.

Describe the solution you'd like

TypeScript 4.5 added Experimental Nightly-Only ECMAScript Module Support in Node.js.
The existing issues are being discussed here, and official documentation can be viewed here.

Provide ESM artifacts once TypeScript support gets stable.

Describe alternatives you've considered

Not providing ESM artifacts for AWS SDK for JavaScript (v3) packages.

Additional context

TypeScript version needs to be bumped to 4.6 with named export support before picking this up. Details in #3217

@trivikr trivikr added the feature-request New feature or enhancement. May require GitHub community feedback. label Jan 21, 2022
@trivikr
Copy link
Member Author

trivikr commented Apr 8, 2022

TypeScript 4.7 Beta added ECMAScript Module Support in Node.js
https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#esm-nodejs

The TypeScript 4.7 Final will be released in late-May 2022.

@trivikr
Copy link
Member Author

trivikr commented Apr 13, 2022

As per Node.js docs, we can also use an ESM Wrapper instead of emitting ESM artifacts.

@trivikr
Copy link
Member Author

trivikr commented Nov 2, 2022

Revisiting after merging Node.js and browser utilities in util-base64

As we use @tsconfig/node14 as base for clients, we can do the same for packages and follow-up experimenting with export maps with dist-es/index.js for ESM support.

@kuhe
Copy link
Contributor

kuhe commented Mar 9, 2023

related: #3622

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 Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or enhancement. May require GitHub community feedback. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants