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(build): upgrade to TypeScript 3.2.1 #2098
Conversation
Object.assign(w, clause); | ||
} | ||
return w; | ||
return clause; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, are you sure this change is preserving current behavior?
A test case to consider:
cast({and: [{x: 1}, {y: 2}], z: 3})
Before your change, cast returns
{and: [{x: 1}, {y: 2}]}
After your change, cast returns
{and: [{x: 1}, {y: 2}], z: 3}
I am typing these examples from my head based on how I understand the code. I may be wrong.
@raymondfeng please take a second look at this change.
If the new implementation of cast
is just an identity function (returning the input without any change), then I think we should mark cast
as deprecated (at minimum in TSDocs; ideally also at runtime using depd) and remove it in the next major version.
This does not necessarily has to happen in this pull request, but it would be great to make those changes soon, otherwise we are increasing our technical debt.
Thoughts?
packages/repository/src/query.ts
Outdated
@@ -480,13 +472,14 @@ export class FilterBuilder<MT extends object = AnyObject> { | |||
if (!this.filter.fields) { | |||
this.filter.fields = {}; | |||
} | |||
const _fields = this.filter.fields; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why underscore? Can we use fields
or perhaps allFields
/filterFields
to better distinguish from field
name used later?
Nice! I am proposing to make the following additional changes while upgrading to TS 3.2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that our build is failing without some of these changes, I am ok to land this pull request as-is in order to fix our failing builds.
I wish the change-set could have been smaller though, I am not confident that this patch is fully backwards compatible 😟
de90b26
to
e041795
Compare
c137aa2
to
f6adee4
Compare
f6adee4
to
bed1ad7
Compare
See https://blogs.msdn.microsoft.com/typescript/2018/11/29/announcing-typescript-3-2/
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated