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(parameters): update generics names in SSMProvider #1413

Conversation

dreamorosi
Copy link
Contributor

@dreamorosi dreamorosi commented Apr 14, 2023

Description of your changes

As described in the linked issue, this PR aims at improving the names of some of the types introduced in the previous release (v1.8.0-beta).

The generic names that were used before looked like this:

type SSMGetMultipleOutput<T = undefined, O = undefined> =
  undefined extends T ? 
    undefined extends O ? Record<string, string> :
      O extends SSMGetMultipleOptionsTransformNone | SSMGetMultipleOptionsTransformBinary ? Record<string, string> :
        O extends SSMGetMultipleOptionsTransformAuto ? Record<string, unknown> :
          O extends SSMGetMultipleOptionsTransformJson ? Record<string, Record<string, unknown>> :
            never
    : Record<string, T>;

now, they look like this:

type SSMGetMultipleOutput<ExplicitUserProvidedType = undefined, InferredFromOptionsType = undefined> =
  undefined extends ExplicitUserProvidedType ? 
    undefined extends InferredFromOptionsType ? Record<string, string> :
      InferredFromOptionsType extends SSMGetMultipleOptionsTransformNone | SSMGetMultipleOptionsTransformBinary ? Record<string, string> :
        InferredFromOptionsType extends SSMGetMultipleOptionsTransformAuto ? Record<string, unknown> :
          InferredFromOptionsType extends SSMGetMultipleOptionsTransformJson ? Record<string, Record<string, unknown>> :
            never
    : Record<string, ExplicitUserProvidedType>;

Hopefully these new names are more evocative and better represent what these variables are for.

The PR also refreshes the package-lock.json file.

Once this PR is merged, it closes #1412.

Related issues, RFCs

Issue number: #1412

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published
  • The PR title follows the conventional commit semantics

Breaking change checklist

Is it a breaking change?: NO

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

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.

@dreamorosi dreamorosi linked an issue Apr 14, 2023 that may be closed by this pull request
2 tasks
@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Apr 14, 2023
@dreamorosi dreamorosi self-assigned this Apr 14, 2023
@github-actions github-actions bot added the internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) label Apr 14, 2023
@dreamorosi dreamorosi marked this pull request as ready for review April 14, 2023 16:27
@dreamorosi dreamorosi merged commit 9460ccc into main Apr 14, 2023
@dreamorosi dreamorosi deleted the 1412-maintenance-improve-names-of-adaptive-types-in-ssmprovider branch April 14, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) size/L PRs between 100-499 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: improve names of adaptive types in SSMProvider
1 participant