-
Notifications
You must be signed in to change notification settings - Fork 121
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
build: update dependencies #962
Conversation
The commit updates all jest related files. Increase TS version to 3.9 to align with the jest required versions.
Codecov Report
@@ Coverage Diff @@
## master #962 +/- ##
==========================================
+ Coverage 70.60% 70.85% +0.25%
==========================================
Files 344 360 +16
Lines 11056 10596 -460
Branches 2392 2167 -225
==========================================
- Hits 7806 7508 -298
+ Misses 3236 3000 -236
- Partials 14 88 +74
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
430de47
to
68065a7
Compare
1b3481c
to
fbb41bf
Compare
d1737c5
to
82c05bf
Compare
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 great 🎉 especially fond of the code simplifications like unnested and/or removed if
s in favor of flat, and more expression-oriented ways.
Would be great to add the mentioned further linting relaxations but that could be a future PR too.
A related change, maybe in this PR but probably a separate one, is the switch to ES2015 as the target. A separate PR for that makes it easier to revert on the offchance it's not digested well by Kibana, should I put in one?
In the context of this PR, only the addition of empty rows between one-liner class members (properties, methods) looks disadvantageous, at least I often work on the notebook screen alone and prefer to see as much of the class vertically (and more code in general) as possible, but I can't really choose a smaller font size, so I like the density where the code itself is very lightweight, regular and uncompicated. Here's hoping it's not a linting rule that makes us do this 😄
'unicorn/no-array-callback-reference': 'off', | ||
'unicorn/no-array-reduce': 'off', | ||
'unicorn/prefer-dom-node-append': 'off', | ||
'unicorn/prefer-dom-node-remove': 'off', |
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.
Good calls. Would be useful to switch off the stricter level (property setting) of no-param-reassign
, it's routinely needed by efficient data processing and the Canvas2d API alike.
Also, allowing a comment line to be present atop of the file, eg. right after the comments block. And eg. mocks need no formatting, and sometimes a long array literal shouldn't be broken to a lot of lines either. Currently a simple bypass may require an exemptions inception for that bypass to work, some of these rules seem to buy less than what's lost in productivity, flow and developer experience.
Would be great to tame the destructuring rules too while at it, for at least arrays
...textValue, | ||
x: chartDimensions.left + (xScale(textBox) || 0) + xScale.bandwidth() / 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.
Nice! As we don't reuse textValue
, it doesn't give away its data flow simplicity on 1st look; this'd work to reflect that, can go either way of course
: xValues.map<TextBox>((textBox: any) => ({
x: chartDimensions.left + (xScale(textBox) || 0) + xScale.bandwidth() / 2,
...getTextValue(config.xAxisLabel.formatter)(textBox)
})
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.
done in 720e0bf
@@ -47,7 +47,9 @@ export type PointTuples = [PointTuple, ...PointTuple[]]; // at least one point | |||
/** @internal */ | |||
export class Circline { | |||
x: Coordinate = NaN; | |||
|
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.
Is it aesthetic, or helps code reading? In general I find that simple one-liners are better kept compact. It can go either way even if I'd prefer at least the option of dense, compact blocks for the simple things
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 was imposed by the eslint/prettier. I can disable this rule and lint all the code on a future PR
@@ -1542,8 +1540,8 @@ describe('Axis computational utils', () => { | |||
]); | |||
}); | |||
test('should show unique consecutive ticks if duplicateTicks is set to false', () => { | |||
const formatter: TickFormatter = (d, options = { timeZone: 'utc+1' }) => | |||
DateTime.fromMillis(d, { setZone: true, zone: options.timeZone }).toFormat('HH:mm'); | |||
const formatter: TickFormatter = (d, { timeZone } = { timeZone: 'utc+1' }) => |
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.
I suppose the goal is to cover the case when options
isn't supplied at all, rather than the case when it is provided as an object which doesn't have a timeZone
property, that's why it's not { timeZone = 'utc+1' }
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.
I think I've messed up the code with the eslinter in this case.
I've fixed in 720e0bf
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.
Thank you for making these changes. They look good to me
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.
LGTM, just had two questions
🎉 This PR is included in version 24.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Upgrading dependencies:
jest-puppeteer
andpuppeteer
were not upgraded due to lack of maintenance of thejest-puppeteer
package: this is anyway only used for debugging VRTs that are not actually used frequently.Notes
It easier to review the PR by single commit as they are mostly self-contained
Next steps
On separate PRs:
core-js
,babel-polyfill
,@elastic/ghithub-check
Checklist
Delete any items that are not applicable to this PR.
src/index.ts
(and stories only import from../src
except for test data & storybook)