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

Support { plain: true } in typescript typings for sequelize.query #11596

Merged
merged 5 commits into from Feb 17, 2020

Conversation

segersniels
Copy link
Contributor

@segersniels segersniels commented Oct 22, 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

Closes #11595

Related PR's

@papb
Copy link
Member

papb commented Oct 23, 2019

Hello! I see you are a first-time contributor, thank you for taking the time to help Sequelize! I hope to see more PRs from you in the future!

Please add at least one test to make sure your implementation works as intented and to prevent regressions in the future. Take a look into recent merged PRs to see how others created tests. If you have trouble, let me know.

Testing the TypeScript typings consists simply on checking if some code can be compiled. In other words, a typings test is just some TS code that should compile. What it does when executed is irrelevant, the test is simply to compile it without errors, as can be seen in our CI configuration (using npm run test-typings) here and here. Since it's just a compilation, getting no output from it means that it passed. Getting a compilation error is a failure. Note that if you directly throw an error from your typings test code, the test will still pass because throwing an error is something that compiles just fine.

For good examples on how to write typescript typings, check the following PRs: #11368 #11379 #11520

Let me know if you need further help!

@papb papb added status: awaiting response For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. labels Oct 23, 2019
@papb papb changed the title 🎨 Support { plain: true } in typescript typings Support { plain: true } in typescript typings for sequelize.query Oct 25, 2019
@codecov
Copy link

codecov bot commented Feb 12, 2020

Codecov Report

Merging #11596 into master will decrease coverage by 6.53%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11596      +/-   ##
==========================================
- Coverage    91.2%   84.66%   -6.54%     
==========================================
  Files          92       90       -2     
  Lines        8985     8897      -88     
==========================================
- Hits         8195     7533     -662     
- Misses        790     1364     +574
Impacted Files Coverage Δ
lib/dialects/mssql/query-generator.js 2.82% <0%> (-92.78%) ⬇️
lib/dialects/abstract/query-generator.js 94.4% <100%> (-1.34%) ⬇️
lib/dialects/mssql/query-interface.js 8.69% <0%> (-91.31%) ⬇️
lib/dialects/mssql/query.js 5.58% <0%> (-89.95%) ⬇️
lib/dialects/mssql/resource-lock.js 22.22% <0%> (-77.78%) ⬇️
lib/dialects/mssql/data-types.js 30.12% <0%> (-69.88%) ⬇️
...ors/connection/connection-acquire-timeout-error.js 40% <0%> (-60%) ⬇️
...dialects/abstract/query-generator/helpers/quote.js 93.33% <0%> (-6.67%) ⬇️
lib/utils/join-sql-fragments.js 78.26% <0%> (-4.35%) ⬇️
... and 9 more

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 281c912...ec667dc. Read the comment docs.

@segersniels segersniels changed the base branch from master to v5 Feb 12, 2020
@segersniels segersniels changed the base branch from v5 to master Feb 12, 2020
@segersniels
Copy link
Contributor Author

segersniels commented Feb 12, 2020

@papb Added a test 👌

@segersniels segersniels requested a review from papb Feb 12, 2020
types/test/sequelize.ts Outdated Show resolved Hide resolved
@papb
Copy link
Member

papb commented Feb 17, 2020

Hello! I ended up having direct improvement ideas for your PR while I was reviewing it. I decided to commit my ideas directly in your PR to save time for both of us :) Please let me know if you disagree with any of the changes I made.

@segersniels
Copy link
Contributor Author

segersniels commented Feb 17, 2020

@papb Agree with the changes you made, should be sufficient! Also made a PR for the v5 branch, should probably cherry-pick the changes onto that branch.

papb
papb approved these changes Feb 17, 2020
@papb papb merged commit 41aba1f into sequelize:master Feb 17, 2020
@papb
Copy link
Member

papb commented Feb 17, 2020

Thank you!!

@papb papb removed the status: awaiting response For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action label Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Typescript bindings incomplete when using sequelize.query()
2 participants