-
-
Notifications
You must be signed in to change notification settings - Fork 824
Add manifest v2->v3 converter + Rollup bundling #3393
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
base: master
Are you sure you want to change the base?
Add manifest v2->v3 converter + Rollup bundling #3393
Conversation
|
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
|
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. |
|
hi! @simon1st25 please include what sections may be tested, handwritten ( or not ) |
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.