Repository navigation
extension: Firefox 发行通道(AMO unlisted 签名)+ 图标换 repo avatar - #6
Merged
Merged
Conversation
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.
问题
Firefox 用户无法使用插件:现有 manifest 是 Chrome MV3 专属(
background.service_worker),且 background 初始化调用的storage.local.setAccessLevel是 Chrome 专属 API,Firefox 下直接中断。另外插件图标仍是旧版,与 repo avatar 不一致。变更
public/manifest.json保持 Chrome 版不动(单一事实源);scripts/make-firefox-manifest.mjs在构建时派生dist/manifest.json:事件页background.scripts(取代 service worker,type: module保留——background.js 与 index 共享 rollup 代码分块)、browser_specific_settings.gecko(id=ip-radar-extension@steponeerror.github.io,strict_min_version=127,即 optional_host_permissions 门槛)。派生契约由测试钉死(改了什么 + 没改什么)。background.ts的setAccessLevel加存在性守卫,Chrome 行为逐字节等价;新增独立测试文件覆盖无该 API 的启动路径(独立文件是刻意的:background 模块副作用需全新模块注册表)。UpdateCheck.tsx按VITE_CHANNEL比对 Release 资产前缀(IP.Radar.Firefox_*/IP.Radar.Chrome_*),Chrome 端字符串与行为零变化。build:firefox:构建 + 派生 + 打包IP.Radar.Firefox_v<版本>.zip(rm -f防同版本重建累积陈旧 hashed chunks)。about:debugging临时加载(重启即失)、永久安装走 AMO unlisted 签名(amo.env+web-ext sign,免费不公开上架,重签后已装者 AMO 自动更新)、gecko id 首签后永久不可换、Release 需上传IP.Radar.Firefox_v<版本>.zip资产更新检查才就绪。public/icons/{32,64,128}.png由用户 1024px repo avatar 重生成(LANCZOS)。验证
npm test36 passed / 1 skipped(含新增 2 测)build:firefox产物 manifest 字段精确(background scripts+module、gecko 块);连续两次构建 zip 条目集完全一致(rm -f 生效)npm run build后dist/manifest.json与public/manifest.json字节一致(cmp干净)chrome.*全域盘点确认唯一 Chrome 专属调用已守卫)→ 修复波 scoped 复审 2/2 ADDRESSED注意
gecko id 首次 AMO 签名后即为永久身份(换 id = 新扩展);首签前跑一次
web-ext lint。签名凭据只进amo.env(gitignore)。