Add manifest v2->v3 converter + Rollup bundling#3393
Draft
simon1st25 wants to merge 11 commits intocode-charity:masterfrom
Draft
Add manifest v2->v3 converter + Rollup bundling#3393simon1st25 wants to merge 11 commits intocode-charity:masterfrom
simon1st25 wants to merge 11 commits intocode-charity:masterfrom
Conversation
Author
|
Testing & review instructions for this PR Quick test (local):
npm install --legacy-peer-deps
node scripts/convert-manifest.js --input build/manifest2.json --output build/manifest3.json --bundle-sw
Notes & cautions:
Suggested follow-ups:
If you want, I can add the CI job or update the PR description with this checklist. |
…ifact with PR/run prefix
…th artifact download link
…ed (create if missing)
… artifacts uploaded
Author
|
Kurzinfo: Die CI-Artefakt-Automation ist nun aktiv.
Trigger: Push oder Update der PR (z. B. ein zusätzlicher Commit). Wenn du eine andere Farbe, Namen oder zusätzliche Empfänger möchtest, sag kurz Bescheid. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a best-effort manifest v2 -> v3 converter, optional service-worker bundling via Rollup, a VS Code workspace file, and a short WORKSPACE_README.md explaining usage.
Files changed:
scripts/convert-manifest.js(converter, --bundle-sw support, warnings)scripts/rollup.config.js(rollup config to bundle background scripts)package.json(bundle script + devDependencies)youtube.code-workspace(workspace settings)WORKSPACE_README.md(how to open workspace & run converter)How to test locally:
build/manifest3.json— checkmanifest_version: 3,background.service_workerandhost_permissions.build/generated_service_worker.js— review the generated bundle for APIs incompatible with MV3.Notes & cautions:
webRequestusage, and any APIs that require adaptation for Manifest V3 (e.g., usedeclarativeNetRequestfor blocking network requests).npm ci && npm run bundle-swand artifacts publishing.CI workflow added:
.github/workflows/manifest-v3.ymlwas added in this branch. It runs on pull requests andfeature/**pushes and performs:npm ci --legacy-peer-depsnode scripts/convert-manifest.js --input build/manifest2.json --output build/manifest3.json --bundle-swnode scripts/validate-manifest3.js build/manifest3.jsonThis workflow bundles the service worker and validates the generated
manifest3.json. It fails the check ifmanifest_version !== 3or ifbackground.service_workeris missing.Suggested follow-ups:
"type": "module"topackage.jsonto avoid a Rollup ES module warning during action runs.If you prefer, I can add the CI artifact step or adjust triggers to run only for PRs targeting
masterin the upstream repo.