extension-develop 3.8.10 → 3.8.11

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/README.md CHANGED
@@ -95,7 +95,7 @@ Options accepted by each command. Values shown are typical types or enumerations
95
95
  | profile | string or false | Profile path or disable profile persistence |
96
96
  | startingUrl | string | Initial URL to open |
97
97
  | open | boolean | Focus/open the browser window (CLI: use `--no-open` to disable) |
98
- | --no-runner | boolean | Skip launching the browser runner |
98
+ | --no-browser | boolean | Skip launching the browser |
99
99
  | chromiumBinary | string | Custom Chromium-based executable path |
100
100
  | geckoBinary | string | Custom Gecko-based executable path |
101
101
 
package/dist/535.cjs CHANGED
@@ -422,11 +422,13 @@ exports.modules = {
422
422
  }
423
423
  if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(envSelectedFile(envPath));
424
424
  const envVars = envPath ? external_dotenv_.config({
425
- path: envPath
425
+ path: envPath,
426
+ quiet: true
426
427
  }).parsed || {} : {};
427
428
  const defaultsPath = external_path_.join(projectPath, '.env.defaults');
428
429
  const defaultsVars = external_fs_.existsSync(defaultsPath) ? external_dotenv_.config({
429
- path: defaultsPath
430
+ path: defaultsPath,
431
+ quiet: true
430
432
  }).parsed || {} : {};
431
433
  const combinedVars = {
432
434
  ...defaultsVars,
@@ -689,7 +691,7 @@ exports.modules = {
689
691
  compiler.hooks.done.tap('develop:brand', (stats)=>{
690
692
  const hasErrors = Boolean(stats?.hasErrors?.());
691
693
  const hasWarnings = Boolean(stats?.hasWarnings?.());
692
- const runnerEnabled = '0' !== String(process.env.EXTENSION_BROWSER_RUNNER_ENABLED || '1');
694
+ const browserLaunchEnabled = '0' !== String(process.env.EXTENSION_BROWSER_LAUNCH_ENABLED || '1');
693
695
  stats.compilation.name = void 0;
694
696
  const duration = stats.compilation.endTime - stats.compilation.startTime;
695
697
  const manifestName = boring_readJsonFileSafe(this.manifestPath).name;
@@ -705,12 +707,12 @@ exports.modules = {
705
707
  });
706
708
  if (hasUserFileChange) this.sawUserInvalidation = true;
707
709
  }
708
- if (runnerEnabled && !(0, shared_state.TC)() && !hasErrors && !hasWarnings) {
710
+ if (browserLaunchEnabled && !(0, shared_state.TC)() && !hasErrors && !hasWarnings) {
709
711
  this.printedPostBannerStartupSuccess = true;
710
712
  (0, shared_state.FF)(line);
711
713
  return;
712
714
  }
713
- if (runnerEnabled && !hasErrors && !hasWarnings) {
715
+ if (browserLaunchEnabled && !hasErrors && !hasWarnings) {
714
716
  if (!this.sawUserInvalidation) if (this.printedPostBannerStartupSuccess) return;
715
717
  else this.printedPostBannerStartupSuccess = true;
716
718
  }
@@ -10262,7 +10264,7 @@ Set background.noDynamicEntryWarning to true to disable this warning.
10262
10264
  manifestPath
10263
10265
  })
10264
10266
  ];
10265
- if (!devOptions.noRunner) plugins.push(new BrowsersPlugin({
10267
+ if (!devOptions.noBrowser) plugins.push(new BrowsersPlugin({
10266
10268
  extension: unpackedExtensionDirsToLoad,
10267
10269
  browser: devOptions.browser,
10268
10270
  noOpen: devOptions.noOpen,
package/dist/928.cjs CHANGED
@@ -32,7 +32,7 @@ exports.modules = {
32
32
  return `${getLoggingPrefix('info')} ${cap} ${extensionOutput} ${pretty}.`;
33
33
  }
34
34
  function browserRunnerDisabled() {
35
- return `${getLoggingPrefix('info')} Browser runner disabled (no-runner).`;
35
+ return `${getLoggingPrefix('info')} Browser launch disabled (no-browser).`;
36
36
  }
37
37
  function portInUse(requestedPort, newPort) {
38
38
  return `Port: Requested port ${external_pintor_default().brightBlue(requestedPort.toString())} is in use; using ${external_pintor_default().brightBlue(newPort.toString())} instead.`;
@@ -325,7 +325,7 @@ exports.modules = {
325
325
  }
326
326
  var webpack_config = __webpack_require__("./webpack/webpack-config.ts");
327
327
  async function dev_server_devServer(projectStructure, devOptions) {
328
- process.env.EXTENSION_BROWSER_RUNNER_ENABLED = devOptions.noRunner ? '0' : '1';
328
+ process.env.EXTENSION_BROWSER_LAUNCH_ENABLED = devOptions.noBrowser ? '0' : '1';
329
329
  const { manifestPath, packageJsonPath } = projectStructure;
330
330
  const manifestDir = external_path_.dirname(manifestPath);
331
331
  const packageJsonDir = external_path_.dirname(packageJsonPath);
@@ -436,7 +436,7 @@ exports.modules = {
436
436
  await devServer.start();
437
437
  if (startTimeout) clearTimeout(startTimeout);
438
438
  console.log(ready('development', devOptions.browser));
439
- if (devOptions.noRunner) console.log(browserRunnerDisabled());
439
+ if (devOptions.noBrowser) console.log(browserRunnerDisabled());
440
440
  } catch (error) {
441
441
  if (startTimeout) clearTimeout(startTimeout);
442
442
  console.log(extensionJsRunnerError(error));
package/dist/module.cjs CHANGED
@@ -133165,7 +133165,8 @@ var __webpack_modules__ = {
133165
133165
  if (external_fs_.existsSync(defaultsPath)) {
133166
133166
  external_dotenv_default().config({
133167
133167
  path: defaultsPath,
133168
- override: Boolean(options?.override)
133168
+ override: Boolean(options?.override),
133169
+ quiet: true
133169
133170
  });
133170
133171
  loadedAny = true;
133171
133172
  }
@@ -133179,7 +133180,8 @@ var __webpack_modules__ = {
133179
133180
  if (external_fs_.existsSync(filePath)) {
133180
133181
  external_dotenv_default().config({
133181
133182
  path: filePath,
133182
- override: Boolean(options?.override)
133183
+ override: Boolean(options?.override),
133184
+ quiet: true
133183
133185
  });
133184
133186
  loadedAny = true;
133185
133187
  break;
@@ -133637,12 +133639,12 @@ var __webpack_modules__ = {
133637
133639
  gC: ()=>unpackagingExtension,
133638
133640
  jM: ()=>debugExtensionsToLoad,
133639
133641
  jV: ()=>debugPreviewOutput,
133642
+ k4: ()=>previewSkippedNoBrowser,
133640
133643
  ng: ()=>writingTypeDefinitions,
133641
133644
  tQ: ()=>fetchingProjectPath,
133642
133645
  tc: ()=>invalidRemoteZip,
133643
133646
  v_: ()=>writingTypeDefinitionsError,
133644
133647
  vo: ()=>buildDependenciesManualInstall,
133645
- wH: ()=>previewSkippedNoRunner,
133646
133648
  xK: ()=>installingBuildDependencies,
133647
133649
  yp: ()=>noCompanionExtensionsResolved,
133648
133650
  zM: ()=>unpackagedSuccessfully
@@ -133703,8 +133705,8 @@ var __webpack_modules__ = {
133703
133705
  function previewing(browser) {
133704
133706
  return `${getLoggingPrefix('info')} Previewing the extension on ${capitalizedBrowserName(browser)}...`;
133705
133707
  }
133706
- function previewSkippedNoRunner(browser) {
133707
- return `${getLoggingPrefix('info')} Skipping browser runner for ${capitalizedBrowserName(browser)} (no-runner).`;
133708
+ function previewSkippedNoBrowser(browser) {
133709
+ return `${getLoggingPrefix('info')} Skipping browser launch for ${capitalizedBrowserName(browser)} (no-browser).`;
133708
133710
  }
133709
133711
  function installingRequiredDependencies() {
133710
133712
  const suffix = 'true' === process.env.EXTENSION_ONE_TIME_INSTALL_HINT ? ' (this is a one time operation)' : '';
@@ -134830,7 +134832,7 @@ var __webpack_modules__ = {
134830
134832
  },
134831
134833
  "./package.json" (module) {
134832
134834
  "use strict";
134833
- module.exports = JSON.parse('{"rE":"3.8.10","El":{"@rspack/core":"^1.7.5","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.19.0"}}');
134835
+ module.exports = JSON.parse('{"rE":"3.8.11","El":{"@rspack/core":"^1.7.5","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.19.0"}}');
134834
134836
  }
134835
134837
  };
134836
134838
  var __webpack_module_cache__ = {};
@@ -135401,9 +135403,13 @@ var __webpack_exports__ = {};
135401
135403
  return external_path_.join(cacheDir, 'version.json');
135402
135404
  }
135403
135405
  function getProjectDepsHash(projectPath) {
135406
+ const lockfileSignature = getNearestLockfileSignature(projectPath);
135404
135407
  try {
135405
135408
  const packageJsonPath = external_path_.join(projectPath, 'package.json');
135406
- if (!external_fs_.existsSync(packageJsonPath)) return 'no-package-json';
135409
+ if (!external_fs_.existsSync(packageJsonPath)) return (0, external_crypto_.createHash)('sha1').update(JSON.stringify({
135410
+ packageJson: 'no-package-json',
135411
+ lockfile: lockfileSignature
135412
+ })).digest('hex');
135407
135413
  const raw = external_fs_.readFileSync(packageJsonPath, 'utf8');
135408
135414
  const parsed = JSON.parse(raw || '{}');
135409
135415
  const deps = parsed?.dependencies || {};
@@ -135416,13 +135422,43 @@ var __webpack_exports__ = {};
135416
135422
  };
135417
135423
  const stable = JSON.stringify({
135418
135424
  dependencies: normalize(deps),
135419
- devDependencies: normalize(devDeps)
135425
+ devDependencies: normalize(devDeps),
135426
+ lockfile: lockfileSignature
135420
135427
  });
135421
135428
  return (0, external_crypto_.createHash)('sha1').update(stable).digest('hex');
135422
135429
  } catch {
135423
- return 'invalid-package-json';
135430
+ return (0, external_crypto_.createHash)('sha1').update(JSON.stringify({
135431
+ packageJson: 'invalid-package-json',
135432
+ lockfile: lockfileSignature
135433
+ })).digest('hex');
135424
135434
  }
135425
135435
  }
135436
+ function getNearestLockfileSignature(projectPath) {
135437
+ const lockfileNames = [
135438
+ 'pnpm-lock.yaml',
135439
+ 'package-lock.json',
135440
+ 'yarn.lock',
135441
+ 'bun.lock',
135442
+ 'bun.lockb'
135443
+ ];
135444
+ let current = external_path_.resolve(projectPath);
135445
+ while(true){
135446
+ for (const lockfileName of lockfileNames){
135447
+ const lockfilePath = external_path_.join(current, lockfileName);
135448
+ if (external_fs_.existsSync(lockfilePath)) try {
135449
+ const content = external_fs_.readFileSync(lockfilePath);
135450
+ const digest = (0, external_crypto_.createHash)('sha1').update(content).digest('hex');
135451
+ return `${lockfileName}:${digest}`;
135452
+ } catch {
135453
+ return `${lockfileName}:unreadable`;
135454
+ }
135455
+ }
135456
+ const parent = external_path_.dirname(current);
135457
+ if (parent === current) break;
135458
+ current = parent;
135459
+ }
135460
+ return 'none';
135461
+ }
135426
135462
  function ensureCacheVersion(cacheDir) {
135427
135463
  const versionPath = getCacheVersionPath(cacheDir);
135428
135464
  const expectedVersion = package_0.rE;
@@ -136005,7 +136041,7 @@ var __webpack_exports__ = {};
136005
136041
  const commandConfig = await (0, config_loader.eY)(packageJsonDir, 'preview');
136006
136042
  const browserConfig = await (0, config_loader.xY)(packageJsonDir, browser);
136007
136043
  console.log(messages.V_(browser));
136008
- if (previewOptions.noRunner) return void console.log(messages.wH(browser));
136044
+ if (previewOptions.noBrowser) return void console.log(messages.k4(browser));
136009
136045
  const safeBrowserConfig = (0, sanitize.a)(browserConfig);
136010
136046
  const safeCommandConfig = (0, sanitize.a)(commandConfig);
136011
136047
  const safePreviewOptions = (0, sanitize.a)(previewOptions);
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "webpack/webpack-lib/build-dependencies.json"
25
25
  ],
26
26
  "name": "extension-develop",
27
- "version": "3.8.10",
27
+ "version": "3.8.11",
28
28
  "description": "Develop, build, preview, and package Extension.js projects.",
29
29
  "author": {
30
30
  "name": "Cezar Augusto",