Commit Graph

7 Commits

Author SHA1 Message Date
Nick Gerleman
6628873c2a Separate Node and Web Binaries (#1325)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1325

Fixes https://github.com/facebook/yoga/issues/1321

Reviewed By: cortinico

Differential Revision: D47368830

fbshipit-source-id: 570a45ad7fd182ef82e6edda4037ae2f6faa0c75
2023-07-12 18:04:17 -07:00
Nick Gerleman
cd7390e093 Include CMmake configuration stdio
Summary: Include error messages or other output for CMake generating the build for ninja

Reviewed By: yungsters

Differential Revision: D46884396

fbshipit-source-id: a31ae4dbdecd8833e62d8e3b8bf8dcaae9ba67e2
2023-06-23 14:08:12 -07:00
Nick Gerleman
e409bfb43a Use babel-node instead of ts-node when running benchmark script
Summary:
`ts-node` does transformation using tsc. Do transformation with Babel instead so that the generation is consistent with Jest and the packed output.

We still need `ts-node` around since various systems rely on it being present to enable `.ts` config files.

This also enables transformation of any JS files.

Reviewed By: yungsters

Differential Revision: D45722106

fbshipit-source-id: 51b7a4f6a1532bea1133d59e626297d3b40f1762
2023-05-10 17:12:10 -07:00
Nick Gerleman
af89315fd4 Fixup TypeScript with export maps (#1284)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1284

This makes TypeScript resolution play nicely with export maps, and converts the entrypoints to TypeScript.

We remove the non-export-map fallbacks as well, so the export maps are always followed.

Tests are moved to load yoga from its external export, testing the entrypoints.

This moves the only untyped bit to the binary wrapper, which another diff will move.

Reviewed By: yungsters

Differential Revision: D45713689

fbshipit-source-id: 228e6f2c9d53520230707a81e76c3c35fcd46de5
2023-05-09 22:21:01 -07:00
Nick Gerleman
aa812d0e48 In-place JS environment
Summary:
This change restructures the package to try to remove the JS build step from the inner loop. Instead, we have a single `src` directory that we babel transform when using, then apply the same transform inline during prepublish.

At the end, we will be publishing a source directory with Babel transformed TS, JS, and TS declarations.

We do a little spring cleaning when doing this. Fixing up some of the folder/file conventions, and removing the non-export-map fallbacks.

We cannot remove the need for a native build.

Reviewed By: yungsters

Differential Revision: D45682153

fbshipit-source-id: ea2dd75c2dd6e3529b1ef6cf6ac6a64a270049a4
2023-05-09 15:35:42 -07:00
Nick Gerleman
0a6a581936 Match xplat/yoga/javascript prettier conventions
Summary:
Match Prettier config to match other Meta OSS projects

Didn't update the test generator to use this form yet.

Reviewed By: yungsters

Differential Revision: D45570415

fbshipit-source-id: d5fd791b047debf41c28aecac75fb8dde16da3e3
2023-05-09 15:35:42 -07:00
Nick Gerleman
44ea3c1555 Add types to scripts and config files (#1277)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1277

Now that we have some TypeScript infra set up, move scripts (mainly the benchmarking one) and config files to TypeScript.

Starts to move away a bit from the magic globals used in the JS environment.

Reviewed By: yungsters

Differential Revision: D45511176

fbshipit-source-id: 09bb1117a1b331758ed9d210e82d5b250577df81
2023-05-04 08:11:04 -07:00