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

fix(helm): convert to typescript #4859

Merged
merged 1 commit into from Nov 23, 2019
Merged

fix(helm): convert to typescript #4859

merged 1 commit into from Nov 23, 2019

Conversation

JamieMagee
Copy link
Contributor

See #1261

export async function getRepositoryData(repository) {
export async function getRepositoryData(
repository: string
): Promise<ReleaseResult[]> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What was the reason for needing to switch the return value from being an object to it being an array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous return type was:

interface RepositoryData {
  [key: string]: {
    version: string;
    homepage: string;
    sources: string[];
    urls: string[]
  }[]
}

Compared with ReleaseResult that we use everywhere else:

interface ReleaseResult {
  name: string;
  homepage: string;
  sourceUrl: string;
  releases: {
    version: string;
    ....
  }[]
  ...
}

It was just much easier to re-use the interface we use everywhere else, including the calling method, instead of creating a new type specifically for Helm.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, I missed that

@rarkins
Copy link
Collaborator

rarkins commented Nov 23, 2019

Somehow we got a conflict?

@JamieMagee
Copy link
Contributor Author

Not sure what the conflict was. I rebased locally, but there were no conflicts?

@rarkins rarkins changed the title refactor(helm): convert to typescript fix(helm): convert to typescript Nov 23, 2019
@rarkins rarkins merged commit 33079e7 into renovatebot:master Nov 23, 2019
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 19.67.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JamieMagee JamieMagee deleted the helm-typescript branch January 24, 2020 08:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
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.

None yet

3 participants