veryfront 0.1.843 → 0.1.844

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.843",
3
+ "version": "0.1.844",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAm0B3B,CAAC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAy0B3B,CAAC"}
@@ -354,15 +354,21 @@ export const getRouterScript = () => `
354
354
  return data;
355
355
  }
356
356
 
357
+ function startPageDataFetch(path, signal, options = {}) {
358
+ const request = fetchPageDataFresh(path, signal, options).finally(() => {
359
+ if (pendingPageDataFetches.get(path) === request) {
360
+ pendingPageDataFetches.delete(path);
361
+ }
362
+ });
363
+ pendingPageDataFetches.set(path, request);
364
+ return request;
365
+ }
366
+
357
367
  function fetchPageDataDeduped(path) {
358
368
  const pending = pendingPageDataFetches.get(path);
359
369
  if (pending) return pending;
360
370
 
361
- const refreshPromise = fetchPageDataFresh(path, null).finally(() => {
362
- pendingPageDataFetches.delete(path);
363
- });
364
- pendingPageDataFetches.set(path, refreshPromise);
365
- return refreshPromise;
371
+ return startPageDataFetch(path, null);
366
372
  }
367
373
 
368
374
  function refreshPageDataInBackground(path) {
@@ -394,7 +400,7 @@ export const getRouterScript = () => `
394
400
  return handlePageDataVersionMismatch(path, data);
395
401
  }
396
402
 
397
- return fetchPageDataFresh(path, signal, {
403
+ return startPageDataFetch(path, signal, {
398
404
  triggerReloadOnVersionMismatch: true,
399
405
  recordRouteTiming: true,
400
406
  timingSource: 'network'
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.843";
2
+ export declare const VERSION = "0.1.844";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.843";
4
+ export const VERSION = "0.1.844";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.843",
3
+ "version": "0.1.844",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",