Skip to content
Merged
Show file tree
Hide file tree
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] Feb 8, 2025
ff9c931
Merge pull request #1 from pippinmole/renovate/configure
pippinmole Feb 8, 2025
f579552
Update renovate.json
pippinmole Feb 8, 2025
cca482b
Update renovate.json
pippinmole Feb 8, 2025
8a2e15b
update .gitmodules
pippinmole Feb 8, 2025
808cf66
Merge branch 'main' of github.com:pippinmole/plasmo
pippinmole Feb 8, 2025
c6bb746
update .gitmodules
pippinmole Feb 8, 2025
2c6b90c
update test-examples.yml
pippinmole Feb 8, 2025
2d969fb
update pnpm version
pippinmole Feb 8, 2025
da5be38
update renovate.json to group all non major versions
pippinmole Feb 8, 2025
57fd793
chore(deps): update actions/cache action to v4
renovate[bot] Feb 8, 2025
55258b5
Merge pull request #6 from pippinmole/renovate/actions-cache-4.x
pippinmole Feb 8, 2025
c7d4790
chore(deps): update dependency @testing-library/react to v16
renovate[bot] Feb 8, 2025
e1ecb66
chore(deps): update dependency @types/uuid to v10
renovate[bot] Feb 8, 2025
568000f
chore(deps): update dependency rimraf to v6
renovate[bot] Feb 8, 2025
f173e11
chore(deps): update dependency turbo to v2
renovate[bot] Feb 8, 2025
153297a
fix(deps): update dependency ignore to v7
renovate[bot] Feb 8, 2025
1f715cb
Merge pull request #15 from pippinmole/renovate/rimraf-6.x
pippinmole Feb 8, 2025
e09df8c
fix(deps): update dependency json-schema-to-ts to v3
renovate[bot] Feb 8, 2025
18968e8
Merge pull request #11 from pippinmole/renovate/uuid-10.x
pippinmole Feb 8, 2025
48262cd
Merge pull request #9 from pippinmole/renovate/major-testing-library-…
pippinmole Feb 8, 2025
81a7521
chore: update turbo.json
pippinmole Feb 8, 2025
d671906
chore(deps): update react monorepo to v19
renovate[bot] Feb 8, 2025
257ea4f
Merge pull request #16 from pippinmole/renovate/major-turbo-monorepo
pippinmole Feb 8, 2025
12db4be
Merge pull request #21 from pippinmole/renovate/ignore-7.x
pippinmole Feb 8, 2025
98ca558
fix(deps): update dependency got to v14
renovate[bot] Feb 8, 2025
d567939
fix(deps): update dependency inquirer to v12
renovate[bot] Feb 8, 2025
df3a6aa
fix(deps): update dependency tsup to v8
renovate[bot] Feb 8, 2025
b7fd28c
Merge pull request #26 from pippinmole/renovate/tsup-8.x
pippinmole Feb 8, 2025
aa4d4d1
Merge pull request #23 from pippinmole/renovate/json-schema-to-ts-3.x
pippinmole Feb 8, 2025
6619624
Merge pull request #22 from pippinmole/renovate/inquirer-12.x
pippinmole Feb 8, 2025
27a2281
Merge pull request #20 from pippinmole/renovate/got-14.x
pippinmole Feb 8, 2025
b494341
chore(deps): update dependency domain-browser to v5
renovate[bot] Feb 8, 2025
f74e3e9
fix(deps): update dependency dotenv-expand to v12
renovate[bot] Feb 8, 2025
cc58306
fix(deps): update dependency package-json to v10
renovate[bot] Feb 8, 2025
1dfac2c
Merge pull request #12 from pippinmole/renovate/domain-browser-5.x
pippinmole Feb 8, 2025
8927f4c
Merge pull request #19 from pippinmole/renovate/dotenv-expand-12.x
pippinmole Feb 8, 2025
9161329
chore: add parameter to useRef for react 19 upgrade
pippinmole Feb 8, 2025
dbaabd0
Merge pull request #17 from pippinmole/renovate/major-react-monorepo
pippinmole Feb 8, 2025
9c420f4
Merge pull request #24 from pippinmole/renovate/package-json-10.x
pippinmole Feb 8, 2025
ae13608
change .gitmodules to forked examples
pippinmole Feb 8, 2025
7f11403
update examples
pippinmole Feb 8, 2025
0630e63
chore: add react19 support
pippinmole Feb 8, 2025
498d440
fix examples hash
pippinmole Feb 8, 2025
3d5e885
Revert: 'change .gitmodules to forked examples'
pippinmole Feb 8, 2025
26e8f79
chore: delete renovate.json
pippinmole Feb 8, 2025
f64cc09
Merge branch 'main' into main
louisgv Feb 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Test examples
on:
push:
branches: [main]
branches: ["main"]
pull_request:
branches: [main]
workflow_dispatch:
Copy link
Contributor

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 :-?

types: [opened, synchronize]

jobs:
build:
Expand Down
14 changes: 7 additions & 7 deletions api/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"chrome-extension"
],
"peerDependencies": {
"react": "^16.8.6 || ^17 || ^18"
"react": "^16.8.6 || ^17 || ^18 || ^19.0.0"
},
"peerDependenciesMeta": {
"react": {
Expand All @@ -121,18 +121,18 @@
"devDependencies": {
"@jest/globals": "29.7.0",
"@jest/types": "29.6.3",
"@testing-library/react": "14.1.0",
"@testing-library/react": "16.2.0",
"@types/chrome": "0.0.251",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react": "19.0.8",
"cross-env": "7.0.3",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "5.0.5",
"react": "19.0.0",
"react-dom": "19.0.0",
"rimraf": "6.0.1",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.3.6",
"typescript": "5.2.2"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions api/messaging/src/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const useMessage = <RequestBody, ResponseBody>(
}

export const usePort: PlasmoMessaging.PortHook = (name) => {
const portRef = useRef<chrome.runtime.Port>()
const portRef = useRef<chrome.runtime.Port>(undefined)
const reconnectRef = useRef(0)
const [data, setData] = useState()

Expand Down Expand Up @@ -76,7 +76,7 @@ export function useMessageRelay<RequestBody = any>(
}

export const useRelay: PlasmoMessaging.RelayFx = (req, onMessage) => {
const relayRef = useRef<() => void>()
const relayRef = useRef<() => void>(undefined)

useEffect(() => {
relayRef.current = relay(req, onMessage)
Expand Down
2 changes: 1 addition & 1 deletion api/persistent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.3.6",
"typescript": "5.2.2"
}
}
14 changes: 7 additions & 7 deletions api/selector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"chrome-extension"
],
"peerDependencies": {
"react": "^16.8.6 || ^17 || ^18"
"react": "^16.8.6 || ^17 || ^18 || ^19.0.0"
},
"peerDependenciesMeta": {
"react": {
Expand All @@ -78,18 +78,18 @@
"devDependencies": {
"@jest/globals": "29.7.0",
"@jest/types": "29.6.3",
"@testing-library/react": "14.1.0",
"@testing-library/react": "16.2.0",
"@types/chrome": "0.0.251",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react": "19.0.8",
"cross-env": "7.0.3",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "5.0.5",
"react": "19.0.0",
"react-dom": "19.0.0",
"rimraf": "6.0.1",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.3.6",
"typescript": "5.2.2"
}
}
10 changes: 5 additions & 5 deletions cli/plasmo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@
"chalk": "5.3.0",
"change-case": "5.1.2",
"dotenv": "16.3.1",
"dotenv-expand": "10.0.0",
"dotenv-expand": "12.0.1",
"events": "3.3.0",
"fast-glob": "3.3.2",
"fflate": "0.8.1",
"get-port": "7.0.0",
"got": "13.0.0",
"ignore": "5.2.4",
"inquirer": "9.2.12",
"got": "14.4.5",
"ignore": "7.0.3",
"inquirer": "12.4.1",
"is-path-inside": "4.0.0",
"json5": "2.2.3",
"mnemonic-id": "3.2.7",
"node-object-hash": "3.0.0",
"package-json": "8.1.1",
"package-json": "10.0.1",
"process": "0.11.10",
"semver": "7.5.4",
"sharp": "0.32.6",
Expand Down
91 changes: 91 additions & 0 deletions cli/plasmo/templates/static/react19/content-script-ui-mount.tsx
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
})
}
13 changes: 13 additions & 0 deletions cli/plasmo/templates/static/react19/index.html
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>
27 changes: 27 additions & 0 deletions cli/plasmo/templates/static/react19/index.tsx
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>
)
})
2 changes: 1 addition & 1 deletion core/parcel-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"@parcel/types": "2.9.3",
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
}
}
2 changes: 1 addition & 1 deletion core/parcel-compressor-utf8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/plugin": "2.9.3"
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@parcel/types": "2.8.3",
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/cache": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-namer-manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"@plasmo/config": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-optimizer-encapsulate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-optimizer-es/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-packager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@plasmo/config": "workspace:*",
"@plasmo/constants": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-resolver-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@parcel/plugin": "2.9.3",
"@parcel/types": "2.9.3",
"@parcel/utils": "2.9.3",
"tsup": "7.2.0",
"tsup": "8.3.6",
"typescript": "5.2.2"
}
}
6 changes: 3 additions & 3 deletions core/parcel-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"constants-browserify": "1.0.0",
"crc-32": "1.2.2",
"crypto-browserify": "3.12.0",
"domain-browser": "4.23.0",
"domain-browser": "5.7.0",
"esbuild": "0.19.5",
"events": "3.3.0",
"https-browserify": "1.0.0",
Expand All @@ -49,7 +49,7 @@
"stream-http": "3.2.0",
"string_decoder": "1.3.0",
"timers-browserify": "2.0.12",
"tsup": "7.2.0",
"tsup": "8.3.6",
"tty-browserify": "0.0.1",
"url": "0.11.3",
"util": "0.12.5",
Expand All @@ -62,6 +62,6 @@
"@parcel/types": "2.9.3",
"fast-glob": "3.3.2",
"fs-extra": "11.1.1",
"got": "13.0.0"
"got": "14.4.5"
}
}
2 changes: 1 addition & 1 deletion core/parcel-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@plasmo/utils": "workspace:*",
"@plasmohq/persistent": "workspace:*",
"@types/chrome": "0.0.251",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@types/trusted-types": "2.0.7",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-transformer-inject-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-transformer-inline-css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"@plasmo/config": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion core/parcel-transformer-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "7.2.0"
"tsup": "8.3.6"
},
"dependencies": {
"@parcel/core": "2.9.3",
Expand Down
Loading