browser-extension-manager 1.2.14 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/gulp/tasks/package.js +34 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
17
|
---
|
|
18
|
+
## [1.3.0] - 2025-12-16
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- Multi-target builds for Chromium and Firefox with automatic manifest adjustments
|
|
22
|
+
- Chromium build uses `background.service_worker`, Firefox build uses `background.scripts`
|
|
23
|
+
- Edge loading instructions in BUILD_INSTRUCTIONS.md
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Packaged output structure changed from `packaged/raw/` to `packaged/{chromium,firefox}/raw/`
|
|
27
|
+
- Extension zip moved from `packaged/extension.zip` to `packaged/{chromium,firefox}/extension.zip`
|
|
28
|
+
- `package.js` now creates separate builds for each browser target
|
|
29
|
+
- `publish.js` uses target-specific paths (chromium zip for Chrome/Edge, firefox raw for Firefox)
|
|
30
|
+
- `audit.js` audits chromium build (code is identical between targets)
|
|
31
|
+
|
|
18
32
|
## [1.1.13] - 2025-11-26
|
|
19
33
|
### Added
|
|
20
34
|
- Default `.env` file with publish credential templates for all stores
|
|
@@ -155,6 +155,36 @@ function getPackageVersion(packageName) {
|
|
|
155
155
|
// Build targets
|
|
156
156
|
const TARGETS = ['chromium', 'firefox'];
|
|
157
157
|
|
|
158
|
+
// Recursively remove empty arrays and objects from an object
|
|
159
|
+
function removeEmptyValues(obj) {
|
|
160
|
+
if (Array.isArray(obj)) {
|
|
161
|
+
return obj;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (obj && typeof obj === 'object') {
|
|
165
|
+
const result = {};
|
|
166
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
167
|
+
// Recursively clean nested objects
|
|
168
|
+
const cleaned = removeEmptyValues(value);
|
|
169
|
+
|
|
170
|
+
// Skip empty arrays
|
|
171
|
+
if (Array.isArray(cleaned) && cleaned.length === 0) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Skip empty objects (after cleaning)
|
|
176
|
+
if (cleaned && typeof cleaned === 'object' && !Array.isArray(cleaned) && Object.keys(cleaned).length === 0) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
result[key] = cleaned;
|
|
181
|
+
}
|
|
182
|
+
return result;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return obj;
|
|
186
|
+
}
|
|
187
|
+
|
|
158
188
|
// Special Compilation Task for manifest.json with default settings
|
|
159
189
|
async function compileManifest(outputDir, target) {
|
|
160
190
|
try {
|
|
@@ -209,8 +239,11 @@ async function compileManifest(outputDir, target) {
|
|
|
209
239
|
}
|
|
210
240
|
}
|
|
211
241
|
|
|
242
|
+
// Remove empty arrays and objects from manifest
|
|
243
|
+
const cleanedManifest = removeEmptyValues(manifest);
|
|
244
|
+
|
|
212
245
|
// Save as regular JSON
|
|
213
|
-
jetpack.write(outputPath, JSON.stringify(
|
|
246
|
+
jetpack.write(outputPath, JSON.stringify(cleanedManifest, null, 2));
|
|
214
247
|
|
|
215
248
|
logger.log(`[${target}] Manifest compiled with defaults`);
|
|
216
249
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-extension-manager",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Browser Extension Manager dependency manager",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"npm-api": "^1.0.1",
|
|
88
88
|
"sass": "^1.97.0",
|
|
89
89
|
"through2": "^4.0.2",
|
|
90
|
-
"web-manager": "^4.0
|
|
90
|
+
"web-manager": "^4.1.0",
|
|
91
91
|
"webpack": "^5.104.0",
|
|
92
92
|
"wonderful-fetch": "^1.3.4",
|
|
93
93
|
"wonderful-version": "^1.3.2",
|