-
-
Notifications
You must be signed in to change notification settings - Fork 450
chore: Add React 19 support + Update major package versions #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
b827a91
Add renovate.json
renovate[bot] ff9c931
Merge pull request #1 from pippinmole/renovate/configure
pippinmole f579552
Update renovate.json
pippinmole cca482b
Update renovate.json
pippinmole 8a2e15b
update .gitmodules
pippinmole 808cf66
Merge branch 'main' of github.com:pippinmole/plasmo
pippinmole c6bb746
update .gitmodules
pippinmole 2c6b90c
update test-examples.yml
pippinmole 2d969fb
update pnpm version
pippinmole da5be38
update renovate.json to group all non major versions
pippinmole 57fd793
chore(deps): update actions/cache action to v4
renovate[bot] 55258b5
Merge pull request #6 from pippinmole/renovate/actions-cache-4.x
pippinmole c7d4790
chore(deps): update dependency @testing-library/react to v16
renovate[bot] e1ecb66
chore(deps): update dependency @types/uuid to v10
renovate[bot] 568000f
chore(deps): update dependency rimraf to v6
renovate[bot] f173e11
chore(deps): update dependency turbo to v2
renovate[bot] 153297a
fix(deps): update dependency ignore to v7
renovate[bot] 1f715cb
Merge pull request #15 from pippinmole/renovate/rimraf-6.x
pippinmole e09df8c
fix(deps): update dependency json-schema-to-ts to v3
renovate[bot] 18968e8
Merge pull request #11 from pippinmole/renovate/uuid-10.x
pippinmole 48262cd
Merge pull request #9 from pippinmole/renovate/major-testing-library-…
pippinmole 81a7521
chore: update turbo.json
pippinmole d671906
chore(deps): update react monorepo to v19
renovate[bot] 257ea4f
Merge pull request #16 from pippinmole/renovate/major-turbo-monorepo
pippinmole 12db4be
Merge pull request #21 from pippinmole/renovate/ignore-7.x
pippinmole 98ca558
fix(deps): update dependency got to v14
renovate[bot] d567939
fix(deps): update dependency inquirer to v12
renovate[bot] df3a6aa
fix(deps): update dependency tsup to v8
renovate[bot] b7fd28c
Merge pull request #26 from pippinmole/renovate/tsup-8.x
pippinmole aa4d4d1
Merge pull request #23 from pippinmole/renovate/json-schema-to-ts-3.x
pippinmole 6619624
Merge pull request #22 from pippinmole/renovate/inquirer-12.x
pippinmole 27a2281
Merge pull request #20 from pippinmole/renovate/got-14.x
pippinmole b494341
chore(deps): update dependency domain-browser to v5
renovate[bot] f74e3e9
fix(deps): update dependency dotenv-expand to v12
renovate[bot] cc58306
fix(deps): update dependency package-json to v10
renovate[bot] 1dfac2c
Merge pull request #12 from pippinmole/renovate/domain-browser-5.x
pippinmole 8927f4c
Merge pull request #19 from pippinmole/renovate/dotenv-expand-12.x
pippinmole 9161329
chore: add parameter to useRef for react 19 upgrade
pippinmole dbaabd0
Merge pull request #17 from pippinmole/renovate/major-react-monorepo
pippinmole 9c420f4
Merge pull request #24 from pippinmole/renovate/package-json-10.x
pippinmole ae13608
change .gitmodules to forked examples
pippinmole 7f11403
update examples
pippinmole 0630e63
chore: add react19 support
pippinmole 498d440
fix examples hash
pippinmole 3d5e885
Revert: 'change .gitmodules to forked examples'
pippinmole 26e8f79
chore: delete renovate.json
pippinmole f64cc09
Merge branch 'main' into main
louisgv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
91 changes: 91 additions & 0 deletions
91
cli/plasmo/templates/static/react19/content-script-ui-mount.tsx
This file contains hidden or 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,91 @@ | ||
| import React from "react" | ||
| import { createRoot } from "react-dom/client" | ||
|
|
||
| import { createAnchorObserver, createRender } from "@plasmo-static-common/csui" | ||
| import { | ||
| InlineCSUIContainer, | ||
| OverlayCSUIContainer | ||
| } from "@plasmo-static-common/csui-container-react" | ||
| import { getLayout } from "@plasmo-static-common/react" | ||
|
|
||
| import type { | ||
| PlasmoCSUI, | ||
| PlasmoCSUIAnchor, | ||
| PlasmoCSUIJSXContainer | ||
| } from "~type" | ||
|
|
||
| // @ts-ignore | ||
| import * as RawMount from "__plasmo_mount_content_script__" | ||
|
|
||
| // Escape parcel's static analyzer | ||
| const Mount = RawMount as PlasmoCSUI<PlasmoCSUIJSXContainer> | ||
|
|
||
| const observer = createAnchorObserver(Mount) | ||
|
|
||
| const render = createRender( | ||
| Mount, | ||
| [InlineCSUIContainer, OverlayCSUIContainer], | ||
| observer?.mountState, | ||
| async (anchor, rootContainer) => { | ||
| const root = createRoot(rootContainer) | ||
| anchor.root = root | ||
|
|
||
| const Layout = getLayout(RawMount) | ||
|
|
||
| switch (anchor.type) { | ||
| case "inline": { | ||
| root.render( | ||
| <Layout> | ||
| <InlineCSUIContainer anchor={anchor}> | ||
| <RawMount.default anchor={anchor} /> | ||
| </InlineCSUIContainer> | ||
| </Layout> | ||
| ) | ||
| break | ||
| } | ||
| case "overlay": { | ||
| const targetList = observer?.mountState.overlayTargetList || [ | ||
| anchor.element | ||
| ] | ||
|
|
||
| root.render( | ||
| <Layout> | ||
| {targetList.map((target, i) => { | ||
| const id = `plasmo-overlay-${i}` | ||
| const innerAnchor: PlasmoCSUIAnchor = { | ||
| element: target, | ||
| type: "overlay" | ||
| } | ||
| return ( | ||
| <OverlayCSUIContainer | ||
| key={id} | ||
| id={id} | ||
| anchor={innerAnchor} | ||
| watchOverlayAnchor={Mount.watchOverlayAnchor}> | ||
| <RawMount.default anchor={innerAnchor} /> | ||
| </OverlayCSUIContainer> | ||
| ) | ||
| })} | ||
| </Layout> | ||
| ) | ||
| break | ||
| } | ||
| } | ||
| } | ||
| ) | ||
|
|
||
| if (!!observer) { | ||
| observer.start(render) | ||
| } else { | ||
| render({ | ||
| element: document.documentElement, | ||
| type: "overlay" | ||
| }) | ||
| } | ||
|
|
||
| if (typeof Mount.watch === "function") { | ||
| Mount.watch({ | ||
| observer, | ||
| render | ||
| }) | ||
| } |
This file contains hidden or 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,13 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>__plasmo_static_index_title__</title> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div id="__plasmo"></div> | ||
| <script src="__plasmo_static_script__" type="module"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or 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,27 @@ | ||
| import React from "react" | ||
| import { createRoot } from "react-dom/client" | ||
|
|
||
| import { getLayout } from "@plasmo-static-common/react" | ||
|
|
||
| // @ts-ignore | ||
| import * as Component from "__plasmo_import_module__" | ||
|
|
||
| let __plasmoRoot: HTMLElement = null | ||
|
|
||
| document.addEventListener("DOMContentLoaded", () => { | ||
| if (!!__plasmoRoot) { | ||
| return | ||
| } | ||
|
|
||
| __plasmoRoot = document.getElementById("__plasmo") | ||
|
|
||
| const root = createRoot(__plasmoRoot) | ||
|
|
||
| const Layout = getLayout(Component) | ||
|
|
||
| root.render( | ||
| <Layout> | ||
| <Component.default /> | ||
| </Layout> | ||
| ) | ||
| }) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like having the manual dispatch is nice to run it now and then :-?