facebook / yoga

Yoga is an embeddable layout engine targeting web standards.
https://yogalayout.dev/
MIT License
17.25k stars 1.42k forks source link

Entry point without TLA for js package #1638

Closed bbohlender closed 5 months ago

bbohlender commented 6 months ago

Follow up on #1637

TLDR: tooling for TLA is not there yet; An additional entry point without top-level-await is appropriate

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yoga-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2024 5:39pm
yoga-website-legacy ❌ Failed (Inspect) Apr 8, 2024 5:39pm
NickGerleman commented 6 months ago

uses .js file extensions to prevent requiring allowImportingTsExtensions

We are already doing this in the babel transform during packing. TS entry points in package.json are also rewritten.

IMG_0512

NickGerleman commented 6 months ago

It looks like the Jest environment didn’t like the extension change.

The model in the repo right now is that when Yoga is published, its package entry point is changed to be written to babel generated JS, along with rewriting imports. But still include original sources as well.

bbohlender commented 6 months ago

Sorry for my confusion

bbohlender commented 6 months ago

again sorry for forgetting to run eslint :)

facebook-github-bot commented 6 months ago

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

NickGerleman commented 6 months ago

@bbohlender would you be able to give this a quick mention in the package readme?

bbohlender commented 6 months ago

@NickGerleman, for sure! Is that, what you had in mind?

NickGerleman commented 6 months ago

That looks great. Thanks for this PR!

facebook-github-bot commented 6 months ago

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 6 months ago

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 5 months ago

@NickGerleman merged this pull request in facebook/yoga@bbdd1afe596b3f78fa5887410513d9a98b944715.