Skip to content

Conversation

daschaa
Copy link
Contributor

@daschaa daschaa commented Jul 26, 2024

Summary

Changes

With this change the exports from schemas and envelopes are also available as scoped exports instead of just the barrel file.

Steps of testing this change were:

  1. Build the parser utility with npm run build insided the parser directory
  2. Run the prepack step npm run prepack to be able to import this in another project as file import.
  3. Set up a testing project.
  4. Install the locally packed parser utility with npm i $PATH_TO_POWERTOOLS/packages/parser. This will result in an entry in the package.json like:
    "dependencies": {
     "@aws-lambda-powertools/parser": "file:../powertools-lambda-typescript-fork/packages/parser",
    }
    
  5. Try to import schemas with the scoped import e.g.
    import { KinesisFirehoseSqsRecord } from '@aws-lambda-powertools/parser/schemas';
    

Issue number: closes #2829


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

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@boring-cyborg boring-cyborg bot added the dependencies Changes that touch dependencies, e.g. Dependabot, etc. label Jul 26, 2024
@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Jul 26, 2024
@daschaa daschaa marked this pull request as ready for review July 26, 2024 07:30
@daschaa daschaa requested a review from a team July 26, 2024 07:30
@daschaa daschaa requested a review from a team as a code owner July 26, 2024 07:30
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, and for the test steps in the PR body.

I have a concern only about one group which I would rather exclude from the PR, other than that it looks good.

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for this PR and improving everyone's bundles!

Copy link

@dreamorosi dreamorosi merged commit 76138bf into aws-powertools:main Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Changes that touch dependencies, e.g. Dependabot, etc. size/L PRs between 100-499 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: provide scoped subpath exports for schemas & envelopes

2 participants