-
Notifications
You must be signed in to change notification settings - Fork 971
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
dependency upgrades; graphql-tools bug fix, typescript 4.4, deprecated babel-eslint, clean up core/package.json #3371
Conversation
Did you see the breaking changes on graphql-tools @thedavidprice ? |
@dac09 I did but they didn't apply to us. However, my plan is to wait until #3307 is merged and then revisit. Only breaking changes so far are TS 4.4 changing error type default to unknown from any (in case of catch(error)). Lastly, I do want to make sure we try these out with Auth during QA. Might be the right time to add dbAuth to E2E/test-project, which it feels like we'll also need for GraphQL Directives, yes? |
cc @msutkowski @dac09 I'm upgrading MSW in this PR and running into a TS build error: If you recall from a discussion awhile back, here's the source type issue:
It is specifically on the
I tried to diagnose as we first thought this might be due to overly strict typing restrictions. But then you thought the cause might actually be a bug with our typing of |
Just do this: I don't think there's a reason to try and fight with those types being that they're casted. If you try to do Edit: also, sorry about the delay and radio silence! Hope ya'll are well :) |
Well, look at that... Done!
All good! We're (slowly but surely) eyeing down the v1-rc, which is gonna be 🔥 Thanks as always for the help + support. Hope all's well on your end, too! |
@dac09 @dthyresson This one's ready to merge. Wanted you both to have a chance to see what's coming down the pipe... |
packages/eslint-config/shared.js
Outdated
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
babelOptions: { | ||
configFile: '../../babel.config.js', |
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.
Note sure about this one... mind walking me through what this does please?
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.
Sure thing, from the OP:
babel-eslint is moved to @babel/eslint-parser
Overview:
https://babeljs.io/blog/2020/07/13/the-state-of-babel-eslint
Migration:https://babeljs.io/blog/2020/07/13/the-state-of-babel-eslint
New parserOptions and adding path to Babel config:https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser#additional-parser-configuration
Parser now needs to know location of the babel.config.js or else it throws ('cause can't find otherwise in our directory structure). There's an option to ignore, but after reading docs that didn't seem correct for our case.
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.
Great catch @dac09 I'm now checking cwd and using findUp to get the babel.config, which works across Framework and Project now.
Also, I did confirm we must pass the babel config file to the parser. Breaks without it :-(
"lazy-get-decorator": "2.2.0", | ||
"line-column": "1.0.2", | ||
"lodash": "4.17.21", | ||
"lodash-decorators": "6.0.1", | ||
"lru-cache": "6.0.0", | ||
"proxyquire": "2.1.3", | ||
"toml": "3.0.0", | ||
"ts-morph": "11.0.3", | ||
"ts-morph": "12.0.0", |
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.
Do we need resolutions for ts-morph?
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.
Breaking here is ts-morph dependency upgrade to TS 4.4:
https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/CHANGELOG.md#1200-2021-08-27
@dac09 just updated babel-preset to get CORE_JS_VERSION from installed package = ✅ This is ready to go |
The api package should no longer (I think) have any graphql related dependencies,
@thedavidprice I fetched this PR and built, ran tests and ran e2e and all passed. Apart from the error types question for @dac09 should be good to go. But, CI has some Cypress issues -- cached node_modules (perhaps due to my committing a package change here vs another commit). Can you reset this? |
@dthyresson Yeppers, that was the Cypress Cache error — first time I've seen it although DC says it shows up a lot on his PRs. Most likely resolved in the Yarn v3 PR (I changed the CI caching mechanism). Anyway, I gave it a kick and expect things to pass now. @dac09 was there a question from DT about error types? Assuming he's talking about this type of change: I recall you saying that's the way to do it. Please confirm. |
@thedavidprice If you already went over this with Danny, then sounds good -- I was just curious about typing Errors. Then approved and good to merge. |
Status:
Everything is working except for a type issue related to MSW cookies.
To Do:
x---x---x
dependency (needed for Yarn v3 upgrade)babel-eslint
packageTBD Firebase v9(via PR Support email link authentication with Firebase #3347)add the error-overlay-plugin (now supporting Webpack v5)No go. Still buggy (see this)babel-eslint
is moved to@babel/eslint-parser
Overview:
Migration:
New parserOptions and adding path to Babel config:
Typescript Release Notes:
Breaking
https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-rc/#use-unknown-catch-variables
catch(error)
may now requirecatch(error: any)
ESBuild Release Notes: