Entry point without TLA for js package #1638

Closed
bbohlender wants to merge 5 commits from main into main
bbohlender commented 2024-03-30 13:23:42 -07:00 (Migrated from github.com)

Follow up on #1637

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

Follow up on #1637 TLDR: tooling for TLA is not there yet; An additional entry point without top-level-await is appropriate - adds ./load entry to js package - uses .js file extensions to prevent requiring [allowImportingTsExtensions](https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions)
vercel[bot] commented 2024-03-30 13:23:45 -07:00 (Migrated from github.com)

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
[vc]: #H/IG8AHbJNLxH/6XB5mofgI43UEmyllH0brvrQeJZX8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ5b2dhLXdlYnNpdGUiLCJyb290RGlyZWN0b3J5Ijoid2Vic2l0ZSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9mYm9wZW5zb3VyY2UveW9nYS13ZWJzaXRlLzNpWGRpUWNldGoxRlpoMlBMakFtbjg5R0xvUFAiLCJwcmV2aWV3VXJsIjoieW9nYS13ZWJzaXRlLWdpdC1mb3JrLWJib2hsZW5kZXItbWFpbi1mYm9wZW5zb3VyY2UudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJ5b2dhLXdlYnNpdGUtZ2l0LWZvcmstYmJvaGxlbmRlci1tYWluLWZib3BlbnNvdXJjZS52ZXJjZWwuYXBwIn19LHsibmFtZSI6InlvZ2Etd2Vic2l0ZS1sZWdhY3kiLCJyb290RGlyZWN0b3J5Ijoid2Vic2l0ZSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9mYm9wZW5zb3VyY2UveW9nYS13ZWJzaXRlLWxlZ2FjeS9Fc2EyMjQ3Z3FzTEd3WmNueEhyN0NXWUh6TFdLIiwicHJldmlld1VybCI6IiIsIm5leHRDb21taXRTdGF0dXMiOiJGQUlMRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn19XX0= **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yoga-website** | ✅ Ready ([Inspect](https://vercel.com/fbopensource/yoga-website/3iXdiQcetj1FZh2PLjAmn89GLoPP)) | [Visit Preview](https://vercel.live/open-feedback/yoga-website-git-fork-bbohlender-main-fbopensource.vercel.app?via=pr-comment-visit-preview-link&passThrough=1) | 💬 [**Add feedback**](https://vercel.live/open-feedback/yoga-website-git-fork-bbohlender-main-fbopensource.vercel.app?via=pr-comment-feedback-link) | Apr 8, 2024 5:39pm | | **yoga-website-legacy** | ❌ Failed ([Inspect](https://vercel.com/fbopensource/yoga-website-legacy/Esa2247gqsLGwZcnxHr7CWYHzLWK)) | | | Apr 8, 2024 5:39pm |
NickGerleman commented 2024-03-30 22:22:37 -07:00 (Migrated from github.com)

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

> uses .js file extensions to prevent requiring [allowImportingTsExtensions](https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions) We are already doing this in the babel transform during packing. TS entry points in package.json are also rewritten. ![IMG_0512](https://github.com/facebook/yoga/assets/835219/4efeb2a7-5b5e-4ee4-8e6b-3142cab04366)
NickGerleman commented 2024-03-30 22:25:15 -07:00 (Migrated from github.com)

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.

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.
NickGerleman (Migrated from github.com) requested changes 2024-03-30 22:29:05 -07:00
NickGerleman (Migrated from github.com) left a comment

Current change seems to be breaking the dev-time builds and scripts which transform the typescript on the fly.

I think it should probably all work after reverting extension change though.

Current change seems to be breaking the dev-time builds and scripts which transform the typescript on the fly. I think it should probably all work after reverting extension change though.
bbohlender commented 2024-03-31 00:52:43 -07:00 (Migrated from github.com)

Sorry for my confusion

Sorry for my confusion
bbohlender commented 2024-04-01 13:33:03 -07:00 (Migrated from github.com)

again sorry for forgetting to run eslint :)

again sorry for forgetting to run eslint :)
NickGerleman (Migrated from github.com) approved these changes 2024-04-01 13:49:24 -07:00
facebook-github-bot commented 2024-04-01 16:20:13 -07:00 (Migrated from github.com)

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

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D55614636).
NickGerleman commented 2024-04-01 18:41:12 -07:00 (Migrated from github.com)

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

@bbohlender would you be able to give this a quick mention in the package readme?
bbohlender commented 2024-04-02 01:28:25 -07:00 (Migrated from github.com)

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

@NickGerleman, for sure! Is that, what you had in mind?
NickGerleman commented 2024-04-08 09:39:44 -07:00 (Migrated from github.com)

That looks great. Thanks for this PR!

That looks great. Thanks for this PR!
facebook-github-bot commented 2024-04-08 09:40:08 -07:00 (Migrated from github.com)

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

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D55614636).
facebook-github-bot commented 2024-04-08 10:37:17 -07:00 (Migrated from github.com)

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

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D55614636).
facebook-github-bot commented 2024-04-08 12:08:42 -07:00 (Migrated from github.com)

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

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

Pull request closed

Sign in to join this conversation.
No description provided.