Skip to content
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

hotfix: sharp library version #375

Merged
merged 2 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/plasmo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plasmo",
"version": "0.61.1",
"version": "0.61.2-lab.0",
"description": "The Plasmo Platform CLI",
"main": "dist/index.js",
"types": "dist/type.d.ts",
Expand Down Expand Up @@ -58,7 +58,7 @@
"package-json": "8.1.0",
"process": "0.11.10",
"semver": "7.3.8",
"sharp": "0.31.3",
"sharp": "0.31.1",
"tempy": "3.0.0",
"tiny-glob": "0.2.9",
"typescript": "4.9.4",
Expand Down
11 changes: 10 additions & 1 deletion cli/plasmo/src/features/extension-devtools/build-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const DEBOUNCE_TIME = 740

let buildDebounceTimer: NodeJS.Timeout

let hasPrematureBuild = false

export const createBuildWatcher = async (
plasmoManifest: PlasmoManifest,
hmrPort: number
Expand All @@ -23,14 +25,21 @@ export const createBuildWatcher = async (
throw err
}

if (!hasPrematureBuild) {
hasPrematureBuild = true
return
}

clearTimeout(buildDebounceTimer)
buildDebounceTimer = setTimeout(() => {
clearTimeout(buildDebounceTimer)

for (const client of wss.clients) {
if (client.readyState === WebSocket.OPEN) {
client.send(payload)
}
}
clearTimeout(buildDebounceTimer)
hasPrematureBuild = false
}, DEBOUNCE_TIME)
},
{
Expand Down
8 changes: 8 additions & 0 deletions cli/plasmo/src/features/manifest-factory/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,17 @@ export abstract class PlasmoManifest<T extends ExtensionManifest = any> {
options_ui: overrideOptionUi,
permissions: overridePermissions,
content_scripts: overrideContentScripts,
background: overrideBackground,
...overide
} = this.overideManifest as T

if (this.bundleConfig.manifestVersion === "mv2") {
base.background = {
...base.background,
...overrideBackground
}
}

if (
typeof overrideOptionUi?.open_in_tab === "boolean" &&
base.options_ui?.page
Expand Down
19 changes: 9 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.