extension-develop 3.8.7-canary.202.d641bcc → 3.8.7-canary.204.e2fceca

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/dist/535.cjs CHANGED
@@ -8048,12 +8048,20 @@ Set background.noDynamicEntryWarning to true to disable this warning.
8048
8048
  const normalizedModifiedFilePaths = Array.from(modifiedFiles).map((filePath)=>String(filePath).replace(/\\/g, '/'));
8049
8049
  const compilerContextRoot = String(compiler?.options?.context || '').replace(/\\/g, '/');
8050
8050
  const filesInCurrentCompilerContext = compilerContextRoot ? normalizedModifiedFilePaths.filter((filePath)=>filePath === compilerContextRoot || filePath.startsWith(`${compilerContextRoot}/`)) : normalizedModifiedFilePaths;
8051
- const watchedModifiedFilePaths = filesInCurrentCompilerContext.length > 0 ? filesInCurrentCompilerContext : normalizedModifiedFilePaths;
8052
- const hitManifest = watchedModifiedFilePaths.some((filePath)=>/(^|\/)manifest\.json$/i.test(filePath));
8053
- const localeChanged = watchedModifiedFilePaths.some((filePath)=>/(^|\/)__?locales\/.+\.json$/i.test(filePath));
8051
+ const watchedModifiedFilePaths = compilerContextRoot ? filesInCurrentCompilerContext : normalizedModifiedFilePaths;
8052
+ const normalizedOutputPath = String(compiler?.options?.output?.path || '').replace(/\\/g, '/');
8053
+ const normalizedSourceRootPath = compilerContextRoot ? `${compilerContextRoot}/src` : '';
8054
+ const sourceModifiedFilePaths = watchedModifiedFilePaths.filter((filePath)=>!(normalizedOutputPath && (filePath === normalizedOutputPath || filePath.startsWith(`${normalizedOutputPath}/`))));
8055
+ const hitManifest = sourceModifiedFilePaths.some((filePath)=>{
8056
+ if (normalizedSourceRootPath) return filePath === `${normalizedSourceRootPath}/manifest.json`;
8057
+ return /(^|\/)manifest\.json$/i.test(filePath);
8058
+ });
8059
+ const localeChanged = sourceModifiedFilePaths.some((filePath)=>{
8060
+ if (normalizedSourceRootPath) return filePath.startsWith(`${normalizedSourceRootPath}/_locales/`);
8061
+ return /(^|\/)__?locales\/.+\.json$/i.test(filePath);
8062
+ });
8054
8063
  let serviceWorkerChanged = false;
8055
- let contentScriptChanged = false;
8056
- if (this.serviceWorkerSourceDependencyPaths.size > 0) serviceWorkerChanged = watchedModifiedFilePaths.some((modifiedFilePath)=>{
8064
+ if (this.serviceWorkerSourceDependencyPaths.size > 0) serviceWorkerChanged = sourceModifiedFilePaths.some((modifiedFilePath)=>{
8057
8065
  if (this.serviceWorkerSourceDependencyPaths.has(modifiedFilePath)) return true;
8058
8066
  for (const serviceWorkerSourceDependencyPath of this.serviceWorkerSourceDependencyPaths)if (modifiedFilePath.endsWith(serviceWorkerSourceDependencyPath)) return true;
8059
8067
  return false;
@@ -8062,21 +8070,15 @@ Set background.noDynamicEntryWarning to true to disable this warning.
8062
8070
  const { absolutePath: serviceWorkerAbsolutePath, relativePath: serviceWorkerRelativePath } = this.ctx.getServiceWorkerPaths() || {};
8063
8071
  if (serviceWorkerAbsolutePath) {
8064
8072
  const normalizedServiceWorkerAbsolutePath = serviceWorkerAbsolutePath.replace(/\\/g, '/');
8065
- serviceWorkerChanged = watchedModifiedFilePaths.some((filePath)=>{
8073
+ serviceWorkerChanged = sourceModifiedFilePaths.some((filePath)=>{
8066
8074
  const normalizedPath = filePath.replace(/\\/g, '/');
8067
8075
  return normalizedPath === normalizedServiceWorkerAbsolutePath || normalizedPath.endsWith(normalizedServiceWorkerAbsolutePath) || (serviceWorkerRelativePath ? normalizedPath === serviceWorkerRelativePath.replace(/\\/g, '/') || normalizedPath.endsWith('/' + serviceWorkerRelativePath.replace(/\\/g, '/')) : false);
8068
8076
  });
8069
8077
  }
8070
8078
  }
8071
- if (this.contentScriptSourceDependencyPaths.size > 0) contentScriptChanged = watchedModifiedFilePaths.some((modifiedFilePath)=>{
8072
- if (this.contentScriptSourceDependencyPaths.has(modifiedFilePath)) return true;
8073
- for (const contentPath of this.contentScriptSourceDependencyPaths)if (modifiedFilePath.endsWith(contentPath)) return true;
8074
- return false;
8075
- });
8076
8079
  if (hitManifest) this.ctx.setPendingReloadReason('manifest');
8077
8080
  else if (localeChanged) this.ctx.setPendingReloadReason('locales');
8078
8081
  else if (serviceWorkerChanged) this.ctx.setPendingReloadReason('sw');
8079
- else if (contentScriptChanged) this.ctx.setPendingReloadReason('content');
8080
8082
  } catch (error) {
8081
8083
  this.logger?.warn?.('[reload-debug] watchRun inspect failed:', String(error));
8082
8084
  }
@@ -8087,7 +8089,6 @@ Set background.noDynamicEntryWarning to true to disable this warning.
8087
8089
  if (hasErrors) return;
8088
8090
  this.refreshSWFromManifest(stats.compilation);
8089
8091
  this.refreshServiceWorkerSourceDependencyPaths(stats.compilation);
8090
- this.refreshContentScriptSourceDependencyPaths(stats.compilation);
8091
8092
  if (!this.hasCompletedSuccessfulBuild) {
8092
8093
  this.hasCompletedSuccessfulBuild = true;
8093
8094
  this.firstSuccessfulBuildAtMs = Date.now();
@@ -8144,19 +8145,6 @@ Set background.noDynamicEntryWarning to true to disable this warning.
8144
8145
  this.serviceWorkerSourceDependencyPaths = discovered;
8145
8146
  } catch {}
8146
8147
  }
8147
- refreshContentScriptSourceDependencyPaths(compilation) {
8148
- try {
8149
- const entrypoints = compilation?.entrypoints;
8150
- if (!entrypoints) return;
8151
- const discovered = new Set();
8152
- for (const [name] of entrypoints){
8153
- if (!String(name).startsWith("content_scripts/content-")) continue;
8154
- const deps = this.collectEntrypointModuleResourcePaths(compilation, String(name));
8155
- for (const dep of deps)discovered.add(dep);
8156
- }
8157
- this.contentScriptSourceDependencyPaths = discovered;
8158
- } catch {}
8159
- }
8160
8148
  collectEntrypointModuleResourcePaths(compilation, entrypointName) {
8161
8149
  const collectedResourcePaths = new Set();
8162
8150
  const entrypoints = compilation?.entrypoints;
@@ -8185,13 +8173,11 @@ Set background.noDynamicEntryWarning to true to disable this warning.
8185
8173
  chromium_hard_reload_define_property(this, "hasCompletedSuccessfulBuild", void 0);
8186
8174
  chromium_hard_reload_define_property(this, "firstSuccessfulBuildAtMs", void 0);
8187
8175
  chromium_hard_reload_define_property(this, "serviceWorkerSourceDependencyPaths", void 0);
8188
- chromium_hard_reload_define_property(this, "contentScriptSourceDependencyPaths", void 0);
8189
8176
  this.options = options;
8190
8177
  this.ctx = ctx;
8191
8178
  this.hasCompletedSuccessfulBuild = false;
8192
8179
  this.firstSuccessfulBuildAtMs = null;
8193
8180
  this.serviceWorkerSourceDependencyPaths = new Set();
8194
- this.contentScriptSourceDependencyPaths = new Set();
8195
8181
  }
8196
8182
  }
8197
8183
  chromium_hard_reload_define_property(ChromiumHardReloadPlugin, "INITIAL_RELOAD_COOLDOWN_MS", 5000);
package/dist/module.cjs CHANGED
@@ -134819,7 +134819,7 @@ var __webpack_modules__ = {
134819
134819
  },
134820
134820
  "./package.json" (module) {
134821
134821
  "use strict";
134822
- module.exports = JSON.parse('{"rE":"3.8.7-canary.202.d641bcc","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"}}');
134822
+ module.exports = JSON.parse('{"rE":"3.8.7-canary.204.e2fceca","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"}}');
134823
134823
  }
134824
134824
  };
134825
134825
  var __webpack_module_cache__ = {};
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.7-canary.202.d641bcc",
27
+ "version": "3.8.7-canary.204.e2fceca",
28
28
  "description": "Develop, build, preview, and package Extension.js projects.",
29
29
  "author": {
30
30
  "name": "Cezar Augusto",