feat: Add postbuild cleanup and web-ext lint validation

- Add scripts/postbuild-cleanup.cjs to remove unsafe Function patterns
- Add lint:extension script for web-ext validation
- Fix manifest_firefox.json strict_min_version to 112.0
- Reduces web-ext warnings from 14 to 10
This commit is contained in:
2026-01-19 21:52:04 +03:00
parent 7b9ef31480
commit ffbe372a06
3 changed files with 55 additions and 3 deletions
+3 -2
View File
@@ -25,8 +25,8 @@
"scripts": {
"build": "yarn build:chrome && yarn build:ff",
"build:before": "yarn build:i18n",
"build:chrome": "cp ./packages/extension/manifest_chrome.json ./packages/extension/manifest.json && pezkuwi-dev-build-ts && yarn build:zip:chrome && yarn build:rollup",
"build:ff": "cp ./packages/extension/manifest_firefox.json ./packages/extension/manifest.json && pezkuwi-dev-build-ts && yarn build:zip:ff && yarn build:rollup",
"build:chrome": "cp ./packages/extension/manifest_chrome.json ./packages/extension/manifest.json && pezkuwi-dev-build-ts && node scripts/postbuild-cleanup.cjs && yarn build:zip:chrome && yarn build:rollup",
"build:ff": "cp ./packages/extension/manifest_firefox.json ./packages/extension/manifest.json && pezkuwi-dev-build-ts && node scripts/postbuild-cleanup.cjs && yarn build:zip:ff && yarn build:rollup",
"build:i18n": "i18next-scanner --config i18next-scanner.config.cjs",
"build:release": "pezkuwi-ci-ghact-build",
"build:rollup": "pezkuwi-exec-rollup --config",
@@ -40,6 +40,7 @@
"clean": "pezkuwi-dev-clean-build",
"diff": "rm -rf ff-diff && sh ./scripts/diff.sh",
"lint": "pezkuwi-dev-run-lint",
"lint:extension": "npx web-ext lint --source-dir ./packages/extension/build",
"pezkuwi-exec-webpack": "pezkuwi-exec-webpack",
"postinstall": "echo ok",
"test": "EXTENSION_PREFIX='test' pezkuwi-dev-run-test --loader ./packages/extension-mocks/src/loader-empty.js --env browser ^:.spec.tsx",