Commit Graph

5 Commits

Author SHA1 Message Date
Michel Weststrate
7e50c0466a Move app/src (mostly) to flipper-ui-core/src
Summary:
This diff moves all UI code from app/src to app/flipper-ui-core. That is now slightly too much (e.g. node deps are not removed yet), but from here it should be easier to move things out again, as I don't want this diff to be open for too long to avoid too much merge conflicts.

* But at least flipper-ui-core is Electron free :)
* Killed all cross module imports as well, as they where now even more in the way
* Some unit test needed some changes, most not too big (but emotion hashes got renumbered in the snapshots, feel free to ignore that)
* Found some files that were actually meaningless (tsconfig in plugins, WatchTools files, that start generating compile errors, removed those

Follow up work:
* make flipper-ui-core configurable, and wire up flipper-server-core in Electron instead of here
* remove node deps (aigoncharov)
* figure out correct place to load GKs, plugins, make intern requests etc., and move to the correct module
* clean up deps

Reviewed By: aigoncharov

Differential Revision: D32427722

fbshipit-source-id: 14fe92e1ceb15b9dcf7bece367c8ab92df927a70
2021-11-16 05:29:21 -08:00
Michel Weststrate
db3d0486e7 Make sure all tests run in same TimeZone
Summary:
Not being able to have timestamps in Jest snapshots, as they would differ across machines required jumping through a lot of hoops.

Run this into once again more by a test suite that didn't trigger on CI, but failed for me locally.

With this fix everyone can happily commit time based snapshots and they will always be assumed to be running in UTC :)

Reviewed By: nikoant

Differential Revision: D29025759

fbshipit-source-id: 426d1b065afdd4a2ed75b47203b13fff0ece1272
2021-06-10 13:00:49 -07:00
Michel Weststrate
191df465b7 Updated to typescript 4
Summary:
allow-large-files

Updated to typescript 4. Note that this is no new major, the way TS numbers is that 4.0 is simply the number after 3.9 (so they refuse to use 3.10).

Primarily reason is that it allows us to use `/** deprecated */`. although there are definitely more interesting improvements

Reviewed By: passy, nikoant

Differential Revision: D23869445

fbshipit-source-id: 54e251b398b8698d9b18898ce66c3203b32aa356
2020-09-24 05:58:29 -07:00
Michel Weststrate
bf79c9472e Always mock FBLogger during unit tests
Summary: Unit tests tend to randomly bail out once FBLogger is (indirectly) required by some module under test. This makes sure FBLogger is stubbed by default. We might want to do the same for `User` in the future.

Reviewed By: jknoxville

Differential Revision: D22186274

fbshipit-source-id: 2ede364c4b691d69826781355592226b075d8367
2020-07-01 09:12:35 -07:00
Anton Nikolaev
c1bb656a0d Re-use babel transformations
Summary:
SORRY FOR BIG DIFF, but it's really hard to split it as all these changes are cross-dependent and should be made at once:
1. Moved transformations to separate package "flipper-babel-transformer" and linked it using yarn workspaces to "static" and "pkg" packages where they are re-used. Removed double copies of transformations we had before int these two packages.
2. Converted transformations to typescript
3. Refactored transformations to avoid relying on file system paths for customisation (FB stubs and Electron stubs for headless build)
4. As babel transformations must be built before other builds - enabled incremental build for them and changed scripts to invoke the transformations build before other build scripts
5. As we need to deploy all the dependencies including the fresh "flipper-babel-transformer" as a part of "static" - implemented script which copies package with all the dependencies taking in account yarn workspaces (hoisting and symlinks)

Reviewed By: passy, mweststrate

Differential Revision: D20690662

fbshipit-source-id: 38a275b60d3c91e01ec21d1dbd72d03c05cfac0b
2020-03-27 03:26:51 -07:00