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(types): support union in CreationAttributes #14146

Merged
merged 1 commit into from Feb 24, 2022
Merged

fix(types): support union in CreationAttributes #14146

merged 1 commit into from Feb 24, 2022

Conversation

ephys
Copy link
Member

@ephys ephys commented Feb 20, 2022

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • Does yarn test or yarn test-DIALECT pass with this change (including linting)?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description Of Change

PR #13909 introduced a change where creation attributes that accept undefined were also as being optional in typings.

The way this change was implemented is incompatible with TS unions and broke with the following example #14129

closes #14129

I'm bringing this change in v6 only for backward compatibility. I will bring a different solution in v7, see #14091 (comment) for more

@ephys ephys self-assigned this Feb 20, 2022
@ephys ephys added type: bug type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. labels Feb 20, 2022
Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

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

LGTM, can we also cherry-pick some other issues from the release log of v6 before we do the new release?

@ephys
Copy link
Member Author

ephys commented Feb 20, 2022

I'd prefer to do that in a separate PR but we can cancel the release of this one and merge the other one right afterwards (or just let both be published) :)

I'll do another small v7 PR that can be cherry-picked first, then open the cherry pick PR

@WikiRik
Copy link
Member

WikiRik commented Feb 20, 2022

Canceling the release and merging the other right afterward would have my preference

@ephys
Copy link
Member Author

ephys commented Feb 20, 2022

PR I'd like to merge and cherry-pick in v6 before merging this one: #14147

Copy link

@snitin315 snitin315 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 so much.

Copy link
Member

@fzn0x fzn0x left a comment

Choose a reason for hiding this comment

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

Good to merge :)

@ephys
Copy link
Member Author

ephys commented Feb 24, 2022

This is going to cause an extra release but I'll merge this one because it's been 4 days and I haven't cherry-picked the other PRs yet, so might as well release this one while I work on the other ones

@ephys ephys merged commit d23bd7a into v6 Feb 24, 2022
@ephys ephys deleted the ephys/fix-14129 branch February 24, 2022 15:00
@github-actions
Copy link
Contributor

🎉 This PR is included in version 6.16.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ephys ephys linked an issue Feb 25, 2022 that may be closed by this pull request
7 tasks
aliatsis pushed a commit to creditiq/sequelize that referenced this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released type: bug type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v6.14.0+ breakes existing model types
4 participants