browser-extension-manager 1.2.6 → 1.2.8

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.
@@ -22,8 +22,10 @@
22
22
  default_locale: 'en',
23
23
 
24
24
  // Background script
25
+ // Chrome uses service_worker, Firefox uses scripts array
25
26
  background: {
26
27
  service_worker: 'assets/js/components/background.bundle.js',
28
+ scripts: ['assets/js/components/background.bundle.js'],
27
29
  },
28
30
 
29
31
  // Permissions
@@ -90,6 +92,12 @@
90
92
  gecko: {
91
93
  id: 'my-addon@example.com',
92
94
  strict_min_version: '91.0',
95
+ // Required for new Firefox extensions as of Nov 2025
96
+ // https://blog.mozilla.org/addons/2025/10/23/data-collection-consent-changes-for-new-firefox-extensions/
97
+ data_collection_permissions: {
98
+ required: ['authenticationInfo'],
99
+ optional: ['technicalAndInteraction'],
100
+ },
93
101
  },
94
102
  },
95
103
  }
@@ -100,6 +100,10 @@
100
100
  gecko: {
101
101
  // id: 'my-addon@example.com',
102
102
  // strict_min_version: '91.0',
103
+ data_collection_permissions: {
104
+ required: ['authenticationInfo'],
105
+ optional: ['technicalAndInteraction'],
106
+ },
103
107
  },
104
108
  },
105
109
  }
@@ -189,14 +189,6 @@ async function compileManifest(outputDir) {
189
189
  // Add package version to manifest
190
190
  manifest.version = project.version;
191
191
 
192
- // Add Firefox compatibility for background scripts
193
- // Firefox MV3 uses "scripts" array instead of "service_worker"
194
- // Chrome ignores "scripts", Firefox ignores "service_worker"
195
- if (manifest.background?.service_worker && !manifest.background?.scripts) {
196
- manifest.background.scripts = [manifest.background.service_worker];
197
- logger.log(`Added Firefox-compatible background.scripts`);
198
- }
199
-
200
192
  // Save as regular JSON
201
193
  jetpack.write(outputPath, JSON.stringify(manifest, null, 2));
202
194
 
@@ -309,6 +301,65 @@ async function packageZip() {
309
301
  }
310
302
  }
311
303
 
304
+ // Create source code zip for Firefox review
305
+ async function packageSource() {
306
+ const { template } = require('node-powertools');
307
+ const os = require('os');
308
+
309
+ // Log
310
+ logger.log(`Zipping source code...`);
311
+
312
+ try {
313
+ const sourceZipPath = 'packaged/source.zip';
314
+
315
+ // Only in build mode
316
+ if (!Manager.isBuildMode()) {
317
+ logger.log(`Skipping source zip (not in build mode)`);
318
+ return;
319
+ }
320
+
321
+ // Remove existing zip if it exists
322
+ jetpack.remove(sourceZipPath);
323
+
324
+ // Get system info
325
+ const platform = os.platform();
326
+ const platformName = {
327
+ darwin: 'macOS',
328
+ win32: 'Windows',
329
+ linux: 'Linux',
330
+ }[platform] || platform;
331
+
332
+ // Read template and replace variables
333
+ const templatePath = path.join(rootPathPackage, 'dist', 'gulp', 'templates', 'BUILD_INSTRUCTIONS.md');
334
+ const templateContent = jetpack.read(templatePath);
335
+ const instructions = template(templateContent, {
336
+ system: {
337
+ platform: platformName,
338
+ release: os.release(),
339
+ arch: os.arch(),
340
+ nodeVersion: process.version,
341
+ },
342
+ });
343
+
344
+ // Write instructions to project root temporarily
345
+ const instructionsPath = path.join(process.cwd(), 'BUILD_INSTRUCTIONS.md');
346
+ jetpack.write(instructionsPath, instructions);
347
+
348
+ // Create source zip using git archive (respects .gitignore)
349
+ await execute(`git archive --format=zip --output=${sourceZipPath} HEAD`);
350
+
351
+ // Add BUILD_INSTRUCTIONS.md to the zip
352
+ await execute(`zip -u ${sourceZipPath} BUILD_INSTRUCTIONS.md`);
353
+
354
+ // Clean up temp file
355
+ jetpack.remove(instructionsPath);
356
+
357
+ logger.log(`Source code zip created at ${sourceZipPath}`);
358
+ } catch (e) {
359
+ logger.error(`Error zipping source code`, e);
360
+ }
361
+ }
362
+
312
363
  function liveReload() {
313
364
  // Log
314
365
  logger.log('Reloading live server clients...');
@@ -357,6 +408,9 @@ async function packageFn(complete) {
357
408
  // Run packageZip
358
409
  await packageZip();
359
410
 
411
+ // Run packageSource
412
+ await packageSource();
413
+
360
414
  // Run build:post hook
361
415
  await hook('build:post', index);
362
416
 
@@ -0,0 +1,47 @@
1
+ # Build Instructions
2
+
3
+ This document provides instructions for building the extension from source code.
4
+
5
+ ## System Requirements
6
+
7
+ This extension was built on the following system:
8
+ - **Operating System:** { system.platform } { system.release } ({ system.arch })
9
+ - **Node.js Version:** { system.nodeVersion }
10
+
11
+ ## Prerequisites
12
+
13
+ 1. Install Node.js { system.nodeVersion } or compatible version
14
+ 2. Install npm (comes with Node.js)
15
+
16
+ ## Build Steps
17
+
18
+ 1. Extract the source code zip
19
+ 2. Open a terminal and navigate to the extracted directory
20
+ 3. Install dependencies:
21
+ ```sh
22
+ npm install
23
+ ```
24
+ 4. Build the extension:
25
+ ```sh
26
+ npm run build
27
+ ```
28
+ 5. The built extension will be in `packaged/raw/` directory
29
+ 6. The packaged zip will be at `packaged/extension.zip`
30
+
31
+ ## Loading the Extension
32
+
33
+ ### Firefox
34
+ 1. Go to `about:debugging`
35
+ 2. Click "This Firefox"
36
+ 3. Click "Load Temporary Add-on"
37
+ 4. Select `packaged/raw/manifest.json`
38
+
39
+ ### Chrome
40
+ 1. Go to `chrome://extensions`
41
+ 2. Enable "Developer mode"
42
+ 3. Click "Load unpacked"
43
+ 4. Select the `packaged/raw/` directory
44
+
45
+ ## Questions
46
+
47
+ If you have any questions about the build process, please contact the developer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-manager",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "Browser Extension Manager dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -85,10 +85,10 @@
85
85
  "minimatch": "^10.1.1",
86
86
  "node-powertools": "^2.3.2",
87
87
  "npm-api": "^1.0.1",
88
- "sass": "^1.94.2",
88
+ "sass": "^1.97.0",
89
89
  "through2": "^4.0.2",
90
90
  "web-manager": "^4.0.40",
91
- "webpack": "^5.103.0",
91
+ "webpack": "^5.104.0",
92
92
  "wonderful-fetch": "^1.3.4",
93
93
  "wonderful-version": "^1.3.2",
94
94
  "ws": "^8.18.3",