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): add array of Buffers to WhereValue type #11559

Merged

Conversation

fubar
Copy link
Contributor

@fubar fubar commented Oct 16, 2019

Pull Request check-list

Please make sure to review and check all of these items:

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

Description of change

where clauses that contain arrays of Buffers (querying binary fields) fail Typescript validation due to a missing type declaration. Example:

Foo.findOne({
  where: { bar: [Buffer.alloc(0)] },
});

Buffer support was just added in #11499. This PR adds support for arrays of Buffers to the WhereValue type definition.

I ran npm run test-typings

@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #11559 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11559   +/-   ##
=======================================
  Coverage   96.27%   96.27%           
=======================================
  Files          94       94           
  Lines        9184     9184           
=======================================
  Hits         8842     8842           
  Misses        342      342

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3c767e...00fe9ca. Read the comment docs.

Copy link
Member

@papb papb left a comment

Choose a reason for hiding this comment

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

LGTM

@papb papb added status: awaiting maintainer type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. labels Oct 16, 2019
@sushantdhiman sushantdhiman merged commit 3517eb7 into sequelize:master Oct 17, 2019
@sushantdhiman
Copy link
Contributor

🎉 This PR is included in version 5.19.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@fubar
Copy link
Contributor Author

fubar commented Oct 17, 2019

Thanks @papb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released 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.

None yet

3 participants