@gomusdev/web-components 4.14.4 → 4.14.5

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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.14.5 (2026-08-05)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **shop:** include path params in fetchAndCache's dedup/cache key
8
+
3
9
  ## 4.14.4 (2026-08-04)
4
10
 
5
11
  ### Bug Fixes
@@ -13987,6 +13987,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13987
13987
  }
13988
13988
  });
13989
13989
  }
13990
+ #fetchId(endpoint, query, path = {}) {
13991
+ return endpoint + JSON.stringify(query) + JSON.stringify(path);
13992
+ }
13990
13993
  /**
13991
13994
  * Returns a reactive value that will contain the fetched data, no need to await.
13992
13995
  *
@@ -14008,7 +14011,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14008
14011
  return get$2(this.#data)[dataKey];
14009
14012
  }
14010
14013
  const query = options.query;
14011
- const fetchId = endpoint + JSON.stringify(query);
14014
+ const fetchId = this.#fetchId(endpoint, query, options.path);
14012
14015
  const isNotFetchedYet = !this.#fetchStatus[fetchId];
14013
14016
  const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
14014
14017
  if (isNotFetchedYet || isCacheExpired) this.apiGet(endpoint, query, options.path).then((ret) => {
@@ -14142,7 +14145,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14142
14145
  }
14143
14146
  async apiGet(path, query = {}, pathOptions) {
14144
14147
  this.#ensureApi();
14145
- const fetchId = path + JSON.stringify(query);
14148
+ const fetchId = this.#fetchId(path, query, pathOptions);
14146
14149
  this.#fetchStatus[fetchId] = {
14147
14150
  status: "fetching",
14148
14151
  fetchedAt: Date.now()
@@ -13986,6 +13986,9 @@ var Shop = class {
13986
13986
  }
13987
13987
  });
13988
13988
  }
13989
+ #fetchId(endpoint, query, path = {}) {
13990
+ return endpoint + JSON.stringify(query) + JSON.stringify(path);
13991
+ }
13989
13992
  /**
13990
13993
  * Returns a reactive value that will contain the fetched data, no need to await.
13991
13994
  *
@@ -14007,7 +14010,7 @@ var Shop = class {
14007
14010
  return get$2(this.#data)[dataKey];
14008
14011
  }
14009
14012
  const query = options.query;
14010
- const fetchId = endpoint + JSON.stringify(query);
14013
+ const fetchId = this.#fetchId(endpoint, query, options.path);
14011
14014
  const isNotFetchedYet = !this.#fetchStatus[fetchId];
14012
14015
  const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
14013
14016
  if (isNotFetchedYet || isCacheExpired) this.apiGet(endpoint, query, options.path).then((ret) => {
@@ -14141,7 +14144,7 @@ var Shop = class {
14141
14144
  }
14142
14145
  async apiGet(path, query = {}, pathOptions) {
14143
14146
  this.#ensureApi();
14144
- const fetchId = path + JSON.stringify(query);
14147
+ const fetchId = this.#fetchId(path, query, pathOptions);
14145
14148
  this.#fetchStatus[fetchId] = {
14146
14149
  status: "fetching",
14147
14150
  fetchedAt: Date.now()