extension-develop 3.8.12 → 3.8.13

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.
Files changed (2) hide show
  1. package/dist/module.cjs +80 -3
  2. package/package.json +1 -1
package/dist/module.cjs CHANGED
@@ -133832,6 +133832,7 @@ var __webpack_modules__ = {
133832
133832
  ax: ()=>downloadedProjectFolderNotFound,
133833
133833
  dx: ()=>manifestNotFoundError,
133834
133834
  f7: ()=>configLoadingError,
133835
+ fm: ()=>buildSuccessWithWarnings,
133835
133836
  gC: ()=>unpackagingExtension,
133836
133837
  jM: ()=>debugExtensionsToLoad,
133837
133838
  jV: ()=>debugPreviewOutput,
@@ -133841,6 +133842,7 @@ var __webpack_modules__ = {
133841
133842
  tc: ()=>invalidRemoteZip,
133842
133843
  v_: ()=>writingTypeDefinitionsError,
133843
133844
  vo: ()=>buildDependenciesManualInstall,
133845
+ wh: ()=>buildWarningsDetails,
133844
133846
  xK: ()=>installingBuildDependencies,
133845
133847
  yp: ()=>noCompanionExtensionsResolved,
133846
133848
  zM: ()=>unpackagedSuccessfully
@@ -133947,7 +133949,77 @@ var __webpack_modules__ = {
133947
133949
  return output;
133948
133950
  }
133949
133951
  function buildSuccess() {
133950
- return `${getLoggingPrefix('success')} No errors or warnings found. Your extension is ${pintor__rspack_import_2_default().green('ready for deployment')}.`;
133952
+ return `${getLoggingPrefix('success')} Build succeeded with no warnings. Your extension is ${pintor__rspack_import_2_default().green('ready for deployment')}.`;
133953
+ }
133954
+ function getWarningMessage(warning) {
133955
+ if (!warning) return '';
133956
+ if ('string' == typeof warning) return warning.trim();
133957
+ const candidates = [
133958
+ warning.message,
133959
+ warning.details,
133960
+ warning.reason,
133961
+ warning.description
133962
+ ];
133963
+ for (const candidate of candidates)if ('string' == typeof candidate && candidate.trim()) return candidate.trim();
133964
+ return '';
133965
+ }
133966
+ function getWarningSource(warning) {
133967
+ if (!warning || 'string' == typeof warning) return 'bundler';
133968
+ const candidates = [
133969
+ warning.name,
133970
+ warning.moduleName,
133971
+ warning.moduleIdentifier,
133972
+ warning.originName,
133973
+ warning.pluginName
133974
+ ];
133975
+ for (const candidate of candidates)if ('string' == typeof candidate && candidate.trim()) return candidate.trim();
133976
+ return 'bundler';
133977
+ }
133978
+ function getWarningArtifact(warning) {
133979
+ if (!warning || 'string' == typeof warning) return '';
133980
+ const candidates = [
133981
+ warning.file,
133982
+ warning.chunkName,
133983
+ warning.moduleName
133984
+ ];
133985
+ for (const candidate of candidates)if ('string' == typeof candidate && candidate.trim()) return candidate.trim();
133986
+ return '';
133987
+ }
133988
+ function classifyWarning(message, source) {
133989
+ const haystack = `${message} ${source}`.toLowerCase();
133990
+ if (haystack.includes('performance') || haystack.includes('asset size') || haystack.includes('entrypoint size') || haystack.includes('exceeds the recommended size') || haystack.includes('hints')) return 'Performance';
133991
+ if (haystack.includes('deprecat') || haystack.includes('[dep_') || haystack.includes('legacy')) return 'Deprecation';
133992
+ if (haystack.includes('invalid') || haystack.includes('unknown option') || haystack.includes('configuration') || haystack.includes('schema')) return 'Configuration';
133993
+ if (haystack.includes('manifest') || haystack.includes('browser') || haystack.includes('target')) return 'Compatibility';
133994
+ if (haystack.includes('runtime') || haystack.includes('will fail') || haystack.includes('cannot resolve') || haystack.includes('service_worker')) return 'Runtime-risk';
133995
+ return 'Warning';
133996
+ }
133997
+ function suggestedActionForWarning(category) {
133998
+ if ('Performance' === category) return 'Split optional features and lazy-load heavy paths. Tune thresholds only if large assets are intentional.';
133999
+ if ('Deprecation' === category) return 'Move to the supported API/plugin path to avoid breakage in future updates.';
134000
+ if ('Configuration' === category) return 'Review extension and bundler config keys, then remove or rename invalid options.';
134001
+ if ('Compatibility' === category) return 'Verify browser target and manifest compatibility for this build.';
134002
+ if ('Runtime-risk' === category) return 'Address this warning before release; it may fail or degrade at runtime.';
134003
+ return 'Re-run with verbose output to inspect warning details and apply targeted fixes.';
134004
+ }
134005
+ function buildSuccessWithWarnings(warningCount) {
134006
+ return `${getLoggingPrefix('warn')} Build succeeded with ${warningCount} warning(s). Your extension is ${pintor__rspack_import_2_default().green('ready for deployment')}.`;
134007
+ }
134008
+ function buildWarningsDetails(warnings) {
134009
+ if (!Array.isArray(warnings) || 0 === warnings.length) return '';
134010
+ const lines = [];
134011
+ warnings.forEach((warning, index)=>{
134012
+ const message = getWarningMessage(warning);
134013
+ const source = getWarningSource(warning);
134014
+ const artifact = getWarningArtifact(warning);
134015
+ const category = classifyWarning(message, source);
134016
+ const action = suggestedActionForWarning(category);
134017
+ if (!message) return void lines.push(`- Warning ${index + 1}: details were suppressed by tool output.`, ` Source: ${source}`, " Action: Re-run with EXTENSION_VERBOSE=1 to inspect full warning messages.");
134018
+ const oneLine = message.replace(/\s+/g, ' ').trim();
134019
+ const artifactSuffix = artifact ? ` (${artifact})` : '';
134020
+ lines.push(`- ${category}: ${oneLine}${artifactSuffix}`, ` Source: ${source}`, ` Action: ${action}`);
134021
+ });
134022
+ return lines.join('\n');
133951
134023
  }
133952
134024
  function fetchingProjectPath(owner, project) {
133953
134025
  return fmt.block('Fetching project', [
@@ -135028,7 +135100,7 @@ var __webpack_modules__ = {
135028
135100
  },
135029
135101
  "./package.json" (module) {
135030
135102
  "use strict";
135031
- module.exports = JSON.parse('{"rE":"3.8.12","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"}}');
135103
+ module.exports = JSON.parse('{"rE":"3.8.13","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"}}');
135032
135104
  }
135033
135105
  };
135034
135106
  var __webpack_module_cache__ = {};
@@ -135990,12 +136062,17 @@ var __webpack_exports__ = {};
135990
136062
  process.exit(1);
135991
136063
  } else {
135992
136064
  const info = stats?.toJson({
136065
+ all: false,
135993
136066
  assets: true,
135994
136067
  warnings: true,
135995
136068
  errors: true
135996
136069
  });
135997
136070
  summary = getBuildSummary(browser, info);
135998
- console.log(messages.Cf());
136071
+ if (summary.warnings_count > 0) {
136072
+ console.log(messages.fm(summary.warnings_count));
136073
+ const warningDetails = messages.wh(info?.warnings || []);
136074
+ if (warningDetails) console.log(`\n${warningDetails}`);
136075
+ } else console.log(messages.Cf());
135999
136076
  resolve();
136000
136077
  }
136001
136078
  });
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.12",
27
+ "version": "3.8.13",
28
28
  "description": "Develop, build, preview, and package Extension.js projects.",
29
29
  "author": {
30
30
  "name": "Cezar Augusto",