-
Notifications
You must be signed in to change notification settings - Fork 10
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
Upgrade TypeScript & other deps #588
Conversation
TypeScript 3.6.5 -> 3.9.2 ElementUI 2.12.0 -> 2.13.1 (needed a TypeScript fix from 2.13.0)
TypeScript 3.6.2 -> 3.9.2
@sentry/node 5.4.0 -> 5.15.5 knex 0.19.5 -> 0.20.15 (cannot go to 0.21 due to node 8 EOL) jest 24.9.0 -> 25.5.4 (cannot go to 26 due to node 8 EOL) ts-jest 23.1.3 -> 25.5.0 nodemon 1.19.1 -> 2.0.3 Due to changes in jest behavior (running globalSetup in a worker process), globalSetup/globalTeardown had to be converted to TS, and a workaround for transpiling migrations had to be added
839a8b1
to
4c62bfe
Compare
|
||
module.exports = async () => { | ||
export = async () => { |
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 is new syntax for me, quickly looked up and found some old discussion here: microsoft/TypeScript#7185
is this for commonJS compat?
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.
Yes. module.exports =
and export =
are functionally equivalent. Both would be imported with globalSetup = require(...)
/ import * as globalSetup from '...'
. In fact, TypeScript allows both forms of export, I just figured it would be better to match syntax with the rest of the file.
I thought it was an ES Modules thing, not a TypeScript thing, but I could be mistaken...
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.
MDN and Node's docs don't have any mention of it, so I guess it is a TypeScript thing after all.
@@ -42,7 +42,7 @@ | |||
"d3": "^5.11.0", | |||
"date-fns": "^1.29.0", | |||
"dom-to-image-google-font-issue": "^2.6.2", | |||
"element-ui": "^2.12.0", | |||
"element-ui": "^2.13.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'm still bearing the static CSS in mind, might need to change it sooner now. We might be missing a few fixes from this version, but it would take a lot of fixes to fix Element! 🙂
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'm actually more concerned that ElementUI's updates will include intentional style changes that will break our layout, than concerned that our old static CSS will stop being compatible.
Fortunately not much has changed: ElemeFE/element@v2.12.0...v2.13.1
The only component with style changes that I'm concerned about is ElTable
, as those tweaks could potentially change our AnnotationsTable layout a bit.
Webapp dependency updates:
Graphql dependency updates:
Graphql dependency updates to resolve security alerts:
Due to changes in jest behavior,
globalSetup
/globalTeardown
had to be converted to TS to prevent a type-checking error from double-transpilation. There's a Jest bug causing TypeORM migrations to not be transformed, so I added a workaround that imports everything as usual (via the ts-jest transform), but registers ts-node just before TypeORM runs the migrations, so that they're transformed via ts-node.Also, I wasn't able to find the root cause, but after these changes it was much more common for the first test to timeout during
setupTestFramework
'sbeforeAll
orbeforeEach
, causing entire test suites to randomly fail. I strongly suspect thatbeforeAll
wasn't previously included in the timeouts, as it would regularly take 9-11s to run this function in CircleCI. I bumped thetestTimeout
from 5s to 15s to resolve this.Noteworthy changelogs:
?.
optional chaining operator