-
Notifications
You must be signed in to change notification settings - Fork 490
Allow TypeScript 3 as a peer dependency #376
Conversation
It looks like we're running into an unrelated Jest or JSDOM bug in CI: Could someone restart the build for master to troubleshoot? I want to confirm if my PR caused this, I don't think it did. |
Have kicked off the build again, still failing. I know jsdom didn't support local storage at some point. |
Perhaps it's a regression in a newer dependency version. Because we're not using yarn lockfiles, it my be causing CI to install different dependencies on each build. Do you think we could add an older lockfile that works? |
Unfortunately, it did, due to the For now, it's sufficient to add a specific
Somewhere around here: https://github.com/wmonk/create-react-app-typescript/blob/master/packages/react-scripts/scripts/utils/createJestConfig.js#L23 |
Thanks for the tip. That config line already seems to be in createJestConfig in my branch of the fork and CRA upstream. Any ideas? Could we solve this by including JSDOM as a dependency with a minimum version, or does this affect all recent versions of JSDOM? |
Considering the reports about this issue, it seems to be side-effect of a feature that was implemented in Thus, there are two ways to solve or at least get around this issue for now:
Given that CRA upstream already includes (2), I suppose it's favorable to pick this up as well. |
If I'm understanding Yarn correctly, the latest versions of packages will be installed when the package.json changes because we do not have a lockfile, so tweaking the Jest version is not an option unless we add a lockfile. testURL is already our the config. Should we wait for that PR to be released, or do you think we could add a lockfile that locks to an earlier version of Jest without this bug? It would still have to support our version of jest-dom, though. |
Sorry, I got a little bit messed up these days - lack of sleep, thanks to the unlikely high temperatures... It's correct that |
Do you think this could go behind #227 which essentially removes all the other packages? @DorianGrey |
@DorianGrey Sorry for the confusion, and thanks for the explanation! I'll try this soon. @wmonk Alternatively we could delete the other package directories and keep the fork link, right? Git should be smart enough to keep unmodified files deleted when updates are merged from upstream, but it may try to recreate new or modified files. |
The main reason to get rid of the fork link is for adding upstream features from CRA which is a real pain with the extra packages. The other reason is that there are a bunch of tests that we don't care about, so can have a nice focussed test suite. |
If i understand correctly, the main goal is to delete sources for packages
other than react-scripts. I think we can still do that by just deleting the
other packages, though git might get confused about upstream merges.
…On Tue, Aug 7, 2018, 11:18 AM Will Monk ***@***.***> wrote:
The main reason to get rid of the fork link is for adding upstream
features from CRA which is a real pain with the extra packages. The other
reason is that there are a bunch of tests that we don't care about, so can
have a nice focussed test suite.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#376 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4l9IDiqd6CNRpTqOEhW99TXc38Yzp4ks5uOa_jgaJpZM4VvX3t>
.
|
@wmonk : Since the affected package Whether the config should be adopted before or not depends on which PR should be merged first. I'd suggest that this one will sooner be ready for that than #227, and contains some changes that should be merged as soon as it is ready. |
I've resolved the issues regarding Currently, two tests are failing due to:
For more recent versions, this should only be |
Now that #227 is merged, this should be able to be rebased and fixed? |
Continued in #387. |
Verification
yarn
andyarn create-react-app
no longer have peer dependency warnings for react-scripts-ts, ts-jest, and fork-ts-checker-webpack-plugin.