-
Notifications
You must be signed in to change notification settings - Fork 154
Feature request: provide scoped subpath exports for schemas & envelopes #2829
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
Comments
I would like to take this issue :) One question tho: Should the barrel export stay for backwards compatibility (and the explicit exports are added on top)? So that it doesn't break existing code? |
Thank you @daschaa, assigning this to you!
Yes, we will leave it both for backwards compatibility but also for convenience for those who can't/don't want to use subpath exports. |
While we are talking about exports, this is a good opportunity to close #2811 , should we do both with one PR? |
I would do them separately (easier to review, identify issues, and revert if needed), but ideally would do #2811 first so we can include the new schemas from that PR in the exports from this one as well. |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.7.0 version! |
Use case
The Parser utility has a number of built-in schemas and envelopes that customers can use in their functions. Currently, all of these except two are exposed via a barrel file
@aws-lambda-powertools/parser/schemas
.We should work towards exporting each category of schemas and envelopes on a per-service basis via dedicated exports.
Solution/User Experience
Customers should be able to import any given schema or envelope using a targeted export, for example, all the API Gateway-related schemas should be available under the
@aws-lambda-powertools/parser/schemas/api-gateway
export and all the S3 ones under@aws-lambda-powertools/parser/schemas/s3
, the same applies to envelopes which would have, for example, SQS envelopes under@aws-lambda-powertools/parser/envelopes/sqs
.With this change, customers would be able to have a slimmer bundle since they'd be importing only the schemas/envelopes of the category they're actually using instead of all of them.
Alternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: