nuxt-nightly 4.2.1-29373601.148264 → 4.2.1-29373897.a1b67534
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.
|
@@ -352,11 +352,12 @@ function createAsyncData(nuxtApp, key, _handler, options, initialCachedData) {
|
|
|
352
352
|
}
|
|
353
353
|
asyncData._abortController = new AbortController();
|
|
354
354
|
asyncData.status.value = "pending";
|
|
355
|
+
const cleanupController = new AbortController();
|
|
355
356
|
const promise = new Promise(
|
|
356
357
|
(resolve, reject) => {
|
|
357
358
|
try {
|
|
358
359
|
const timeout = opts.timeout ?? options.timeout;
|
|
359
|
-
const mergedSignal = mergeAbortSignals([asyncData._abortController?.signal, opts?.signal], timeout);
|
|
360
|
+
const mergedSignal = mergeAbortSignals([asyncData._abortController?.signal, opts?.signal], cleanupController.signal, timeout);
|
|
360
361
|
if (mergedSignal.aborted) {
|
|
361
362
|
const reason = mergedSignal.reason;
|
|
362
363
|
reject(reason instanceof Error ? reason : new DOMException(String(reason ?? "Aborted"), "AbortError"));
|
|
@@ -365,7 +366,7 @@ function createAsyncData(nuxtApp, key, _handler, options, initialCachedData) {
|
|
|
365
366
|
mergedSignal.addEventListener("abort", () => {
|
|
366
367
|
const reason = mergedSignal.reason;
|
|
367
368
|
reject(reason instanceof Error ? reason : new DOMException(String(reason ?? "Aborted"), "AbortError"));
|
|
368
|
-
}, { once: true });
|
|
369
|
+
}, { once: true, signal: cleanupController.signal });
|
|
369
370
|
return Promise.resolve(handler(nuxtApp, { signal: mergedSignal })).then(resolve, reject);
|
|
370
371
|
} catch (err) {
|
|
371
372
|
reject(err);
|
|
@@ -406,6 +407,7 @@ function createAsyncData(nuxtApp, key, _handler, options, initialCachedData) {
|
|
|
406
407
|
if (pendingWhenIdle) {
|
|
407
408
|
asyncData.pending.value = false;
|
|
408
409
|
}
|
|
410
|
+
cleanupController.abort();
|
|
409
411
|
delete nuxtApp._asyncDataPromises[key];
|
|
410
412
|
});
|
|
411
413
|
nuxtApp._asyncDataPromises[key] = promise;
|
|
@@ -450,7 +452,7 @@ function createHash(_handler, options) {
|
|
|
450
452
|
getCachedData: options.getCachedData ? hash(options.getCachedData) : void 0
|
|
451
453
|
};
|
|
452
454
|
}
|
|
453
|
-
function mergeAbortSignals(signals, timeout) {
|
|
455
|
+
function mergeAbortSignals(signals, cleanupSignal, timeout) {
|
|
454
456
|
const list = signals.filter((s) => !!s);
|
|
455
457
|
if (typeof timeout === "number" && timeout >= 0) {
|
|
456
458
|
const timeoutSignal = AbortSignal.timeout?.(timeout);
|
|
@@ -483,7 +485,7 @@ function mergeAbortSignals(signals, timeout) {
|
|
|
483
485
|
}
|
|
484
486
|
};
|
|
485
487
|
for (const sig of list) {
|
|
486
|
-
sig.addEventListener?.("abort", onAbort, { once: true });
|
|
488
|
+
sig.addEventListener?.("abort", onAbort, { once: true, signal: cleanupSignal });
|
|
487
489
|
}
|
|
488
490
|
return controller.signal;
|
|
489
491
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3835,7 +3835,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3835
3835
|
});
|
|
3836
3836
|
}
|
|
3837
3837
|
|
|
3838
|
-
const version = "4.2.1-
|
|
3838
|
+
const version = "4.2.1-29373897.a1b67534";
|
|
3839
3839
|
|
|
3840
3840
|
function createImportProtectionPatterns(nuxt, options) {
|
|
3841
3841
|
const patterns = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.2.1-
|
|
3
|
+
"version": "4.2.1-29373897.a1b67534",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"@dxup/nuxt": "^0.2.1",
|
|
68
68
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
69
69
|
"@nuxt/devtools": "^3.0.1",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.1-
|
|
71
|
-
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.1-
|
|
72
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.1-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.1-29373897.a1b67534",
|
|
71
|
+
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.1-29373897.a1b67534",
|
|
72
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.1-29373897.a1b67534",
|
|
73
73
|
"@nuxt/telemetry": "^2.6.6",
|
|
74
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.1-
|
|
74
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.1-29373897.a1b67534",
|
|
75
75
|
"@unhead/vue": "^2.0.19",
|
|
76
76
|
"@vue/shared": "^3.5.22",
|
|
77
77
|
"c12": "^3.3.1",
|