-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Type annotations #4789
Type annotations #4789
Conversation
@@ -7,6 +7,8 @@ | |||
"@percy/cli": "^1.0.0-beta.73", | |||
"@percy/playwright": "^1.0.1", | |||
"@playwright/test": "^1.18.0", | |||
"@types/eventemitter3": "^1.0.0", | |||
"@types/lodash": "^4.14.178", |
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.
This doesn't update the packages we're currently using, this only adds types (hence the @types/
) of the package's we're using which gives us intellisense in IDEs.
// TODO useless makePoint call? | ||
this.makePoint(point, series); | ||
this.removePoint(removalPoint); | ||
|
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.
What's the point of this makePoint
call? I left it in place just in case there's a side-effect I don't know about (is there?), but this.removePoint()
is not using it.
Seems like copy/paste left overs from a long time ago. What's the point of making a point just to remove a another point?
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.
@shefalijoshi can you take a look at this?
insertionPoint, | ||
pointsRequired | ||
); | ||
this.addPoint(this.makePoint(point, series), insertionPoint); |
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.
removed another unused arg that didn't do anything.
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.
This follows the conventions that I've seen with my limited exposure to typescript. I need to defer to someone with more familiarity with the src/api to validate the rest of these changes.
@trusktr added the mocha types from our interactive demo of this functionality during testathon |
@unlikelyzero Hey, looks like tests fail because Node is too old for our build setup. My guess is that something had an in-range change that introduced syntax that causes a syntax error in older versions of Node. It'd be nice to be testing on Node 16/17. The new Node 18 LTS is coming out in April. I think this would be a fine change, as our version of Node is what we build with, and not something that impacts consumers. If they want to build from node_modules like Vista does, they'll use whatever build tools and Node version they want. |
I don't think there's any particular project keeping us on 12. 18 will be what we need for VIPER Flight. I would imagine that we would want to continue to support 14 for open source users. Are statistics on node version information by project available from npm's regististry (i.e. openmct is built 88% of the time by node12)? It sounds like there are at least 4 PRs stuck on node 16 support. I think we may need to bite the bullet and figure out why this is failing on node16+ #3966 |
@trusktr node16 has been merged in as of monday. I've rebased to pick up that change along with our circleci changes |
Need to follow up with @akhenry before merge as this will remove lower versions of Node support. |
I normally think open source users prefer the latest, and that orgs and corporations are the ones stuck behind. |
The Node 16 build has the same issue:
I wonder where that problem is. |
The app works fine though, and the current log-plots stuff is branched off of this, and that works too. |
I am able to get |
Codecov Report
@@ Coverage Diff @@
## master #4789 +/- ##
==========================================
- Coverage 50.13% 50.09% -0.04%
==========================================
Files 513 513
Lines 18848 18854 +6
Branches 1669 1669
==========================================
- Hits 9449 9445 -4
- Misses 8982 8992 +10
Partials 417 417
Continue to review full report at Codecov.
|
@@ -210,8 +215,8 @@ export default { | |||
if (this.shouldRegenerateTicks(range, forceRegeneration)) { | |||
let newTicks = this.getTicks(); | |||
this.tickRange = { | |||
min: Math.min.apply(Math, newTicks), | |||
max: Math.max.apply(Math, newTicks), |
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.
Our coverage tool has recently been updated, we can freely use modern syntax now.
legend: _.cloneDeep(_.get(options.domainObject, 'configuration.legend', {})) | ||
xAxis: {}, | ||
yAxis: _.cloneDeep(options.domainObject.configuration?.yAxis ?? {}), | ||
legend: _.cloneDeep(options.domainObject.configuration?.legend ?? {}) |
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.
modern syntax ftw!
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.
Looks good.
closes #4793
Describe your changes:
All Submissions:
Author Checklist
Reviewer Checklist