-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make fixture loader compatible with React Server Components (#1471)
* Extract client code * Fix imports * Define core package exports * Update test-pnp.yml * Update test-pnp.yml * Update test-pnp.yml * Fix /client export * Simplify * Update test-pnp.yml * Revert "Update test-pnp.yml" This reverts commit eddcfdd. * Create renderer package * Merge branch 'main' into rsc * Update test-pnp.yml * Extract universal renderer parts * Extract decorateFixture helper * Extract FixtureContextProvider * Move FixtureContext * Use DecoratedFixture in server fixture loader * Remove decorator props * WIP * Remove onErrorReset callback * Rename module loades * Rename stuff * Rename stuff * Rename stuff * Revert "Rename stuff" This reverts commit 41b7072. * Revert "Rename stuff" This reverts commit 8bd0198. * Revert "Rename stuff" This reverts commit e753f45. * Revert "Rename module loades" This reverts commit de26081. * Revert "Revert "Rename module loades"" This reverts commit 7b90124. * Revert "Revert "Rename stuff"" This reverts commit da1edd8. * Revert "Revert "Rename stuff"" This reverts commit 046eb06. * Revert "Revert "Rename stuff"" This reverts commit 38553d8. * Temp fix * Path fix * Rename stuff * Remove server entry point * Tmp fix * Path fix * Use renderKey and add patched retry lib to repo * Simplify * Add back async-retry * Simplify * Simplify * Simplify * Rename * Simplify * Simplify * Refactor * Fix ServerFixtureLoader * Update DomFixtureLoader.tsx * Extract isInsideWindowIframe helper * Simplify * Rename stuff * Tidy up * Update ServerFixtureLoader.tsx * Tidy up * Update domRendererConnect.ts * Rename * Pass entire rendererConfig to fixture loaders * Rename component * Simplify * Simplify * Simplify * Use .ts extension * Update RendererContext.ts * Remove superfluous 'use client' * Update DomRendererProvider.tsx * Update docs * Update MIGRATION_V6.md * Simplify * Test getFixtures().getElement() * Rename * Rename stuff * Rename stuff * Update AsyncModuleLoader.tsx * Update StaticModuleLoader.tsx * Remove extra module * Update useFixtureSelection.ts * Enforce renderKey usage * Tweak * Tweak * Make ErrorCatch CRA-agnostic * Show renderer error notification * Update runtimeStatus.tsx * Upgrade async-until and async-retry * Upgrade deps * Improve placement of 'use client' directives * Add comments * Send rendererReady while async module loader is importing modules * Update SidePanel.tsx * asdf * Update test-pnp.yml
- Loading branch information
Showing
184 changed files
with
1,933 additions
and
1,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
examples/webpack/tests/__snapshots__/fixtures.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders fixture elements 1`] = ` | ||
<button | ||
onClick={[Function]} | ||
> | ||
0 | ||
times | ||
</button> | ||
`; | ||
|
||
exports[`renders fixture elements 2`] = ` | ||
<button | ||
onClick={[Function]} | ||
> | ||
555555555 | ||
times | ||
</button> | ||
`; | ||
|
||
exports[`renders fixture elements 3`] = ` | ||
<div | ||
style={ | ||
{ | ||
"border": "2px dashed #AAA", | ||
"borderRadius": 8, | ||
"padding": "0 16px", | ||
} | ||
} | ||
> | ||
<h1> | ||
Hi | ||
<strong> | ||
Maggie | ||
</strong> | ||
! | ||
</h1> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/react-cosmos-core/src/fixtureTree/createFixtureTree/createRawFixtureTree.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/react-cosmos-core/src/fixtureTree/createFixtureTree/createRawFixtureTree.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/react-cosmos-core/src/fixtureTree/createFixtureTree/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/react-cosmos-core/src/fixtureTree/flattenFixtureTree.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/react-cosmos-core/src/fixtureTree/flattenFixtureTree.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.