-
Notifications
You must be signed in to change notification settings - Fork 915
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
Upgrades TypeScript to 4.1, simplifies jest config #1230
Conversation
# [31.1.0](elastic/elastic-charts@v31.0.0...v31.1.0) (2021-07-06) ### Bug Fixes * **heatmap:** pick correct brush end value ([opensearch-project#1230](elastic/elastic-charts#1230)) ([cb95a75](elastic/elastic-charts@cb95a75)), closes [opensearch-project#1229](elastic/elastic-charts#1229) ### Features * **a11y:** accessible goal and gauge chart ([#1174](elastic/elastic-charts#1174)) ([775dc98](elastic/elastic-charts@775dc98)), closes [opensearch-project#1160](elastic/elastic-charts#1160)
I'm taking a look at the error that the functional tests are throwing:
|
Currently trying to fix the bootstrap errors related to
|
Would this reduce the delta changed in this PR but resolve the CVE if the merging happened in a separate PR? |
Yeah, but I can't get the TypeScript upgrade to bootstrap even without those jest changes. There's a conflict with the jest dependencies so I'm going to wait for #1301 and then try again. |
3b5c51a
to
5027633
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.
LGTM
@@ -135,7 +135,7 @@ describe('Server logging configuration', function () { | |||
'--verbose', | |||
]); | |||
|
|||
const message$ = Rx.fromEvent(child.stdout, 'data').pipe( | |||
const message$ = Rx.fromEvent(child.stdout!, 'data').pipe( |
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.
Nit: This is nullable. Given that its a test it should be okay though.
cdc3585
to
7c1155d
Compare
bf318d4
to
1f3399a
Compare
e35cbfa
to
f44d550
Compare
Did we want to put this PR in draft? |
Good question. I'm still actively trying to fix the functional test error, but I guess I can put it in draft until that's fixed. |
Looks like the CVE was addressed in this PR. For that reason and the conflicts, I will remove the |
* Addressing the `nth-check` CVE requires bumping `css-select`, which is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from TypeScript 4.0 to 4.1. * TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes). The main changes that impact Dashboards is that `resolve`'s parameters are no longer optional in `Promise`s, and that potentially undefined indexes must use the `!` non-null assertion operator. * The upgrades to TypeScript and `cheerio` triggered some jest errors which prompted the upgrade to the `enzyme` dependencies. * Merges files under `/src/test_utils` and `/src/dev/jest` into the `@osd/test` package to simplify. * Fixes the naming of the `@osd/eslint-config-opensearch-dashboards` package. * Fixes inconsistent plugin installation tests. Resolves opensearch-project#1081 Signed-off-by: Tommy Markley <[email protected]>
Verify impact to plugins. |
Closing. We are not doing a TypeScript upgrade now as the refactor is too much for the benefit. We can revisit this later. |
Description
Most of the PR is just adding parameters to
Promise
s and changing references to the updated@osd/test/jest
directory.nth-check
CVE required bumpingcss-select
, which is a dependency ofcheerio
. Bumpingcheerio
requires upgrading from TypeScript 4.0 to 4.1.resolve
's parameters are no longer optional inPromise
s, and that potentially undefined indexes must use the!
non-null assertion operator.cheerio
triggered some jest errors which prompted the upgrade to theenzyme
dependencies./src/test_utils
and/src/dev/jest
into the@osd/test
package to simplify.@osd/eslint-config-opensearch-dashboards
package.Issues Resolved
Resolves #1081
Partially addresses #1187
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr