summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/astro/src/core/routing/manifest/generator.ts2
-rw-r--r--packages/astro/src/runtime/server/jsx.ts2
-rw-r--r--packages/astro/src/runtime/server/render/any.ts7
-rw-r--r--packages/astro/src/runtime/server/render/astro.ts2
-rw-r--r--packages/astro/src/runtime/server/render/common.ts2
-rw-r--r--packages/astro/src/runtime/server/render/component.ts8
-rw-r--r--packages/astro/src/runtime/server/render/page.ts6
-rw-r--r--packages/astro/test/hydration-race.test.js6
8 files changed, 21 insertions, 14 deletions
diff --git a/packages/astro/src/core/routing/manifest/generator.ts b/packages/astro/src/core/routing/manifest/generator.ts
index 300dabd17..6df4806fd 100644
--- a/packages/astro/src/core/routing/manifest/generator.ts
+++ b/packages/astro/src/core/routing/manifest/generator.ts
@@ -30,7 +30,7 @@ export function getRouteGenerator(
// Unless trailingSlash config is set to 'always', don't automatically append it.
let trailing: '/' | '' = '';
- if(addTrailingSlash === 'always' && segments.length) {
+ if (addTrailingSlash === 'always' && segments.length) {
trailing = '/';
}
const toPath = compile(template + trailing);
diff --git a/packages/astro/src/runtime/server/jsx.ts b/packages/astro/src/runtime/server/jsx.ts
index d38a57184..665f67348 100644
--- a/packages/astro/src/runtime/server/jsx.ts
+++ b/packages/astro/src/runtime/server/jsx.ts
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
-import { SSRResult, SSRRenderInstruction } from '../../@types/astro.js';
+import { SSRRenderInstruction, SSRResult } from '../../@types/astro.js';
import { AstroJSX, isVNode } from '../../jsx-runtime/index.js';
import {
escapeHTML,
diff --git a/packages/astro/src/runtime/server/render/any.ts b/packages/astro/src/runtime/server/render/any.ts
index ecb26973e..62d4f5a0c 100644
--- a/packages/astro/src/runtime/server/render/any.ts
+++ b/packages/astro/src/runtime/server/render/any.ts
@@ -1,7 +1,6 @@
import { SSRRenderInstruction, SSRResult } from '../../../@types/astro';
import { escapeHTML, HTMLString, markHTMLString } from '../escape.js';
import { AstroComponent, renderAstroComponent } from './astro.js';
-import { stringifyChunk } from './common.js';
export async function* renderChild(child: any): AsyncIterable<any> {
child = await child;
@@ -35,7 +34,11 @@ export async function* renderChild(child: any): AsyncIterable<any> {
}
}
-export async function renderSlot(result: SSRResult, slotted: string, fallback?: any): Promise<string> {
+export async function renderSlot(
+ result: SSRResult,
+ slotted: string,
+ fallback?: any
+): Promise<string> {
if (slotted) {
let iterator = renderChild(slotted);
let content = '';
diff --git a/packages/astro/src/runtime/server/render/astro.ts b/packages/astro/src/runtime/server/render/astro.ts
index 94229449e..f328ce973 100644
--- a/packages/astro/src/runtime/server/render/astro.ts
+++ b/packages/astro/src/runtime/server/render/astro.ts
@@ -1,4 +1,4 @@
-import type { SSRResult, SSRRenderInstruction } from '../../../@types/astro';
+import type { SSRRenderInstruction, SSRResult } from '../../../@types/astro';
import type { AstroComponentFactory } from './index';
import { markHTMLString } from '../escape.js';
diff --git a/packages/astro/src/runtime/server/render/common.ts b/packages/astro/src/runtime/server/render/common.ts
index db1f8e8d3..61a2377cc 100644
--- a/packages/astro/src/runtime/server/render/common.ts
+++ b/packages/astro/src/runtime/server/render/common.ts
@@ -1,4 +1,4 @@
-import type { SSRResult, SSRRenderInstruction } from '../../../@types/astro';
+import type { SSRRenderInstruction, SSRResult } from '../../../@types/astro';
import { markHTMLString } from '../escape.js';
import {
diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts
index 43215d0cc..34740ab24 100644
--- a/packages/astro/src/runtime/server/render/component.ts
+++ b/packages/astro/src/runtime/server/render/component.ts
@@ -1,5 +1,9 @@
-import type { AstroComponentMetadata, SSRLoadedRenderer, SSRResult, SSRRenderInstruction } from '../../../@types/astro';
-
+import type {
+ AstroComponentMetadata,
+ SSRLoadedRenderer,
+ SSRRenderInstruction,
+ SSRResult,
+} from '../../../@types/astro';
import { markHTMLString } from '../escape.js';
import { extractDirectives, generateHydrateScript } from '../hydration.js';
diff --git a/packages/astro/src/runtime/server/render/page.ts b/packages/astro/src/runtime/server/render/page.ts
index 2a372df67..85dbec01e 100644
--- a/packages/astro/src/runtime/server/render/page.ts
+++ b/packages/astro/src/runtime/server/render/page.ts
@@ -52,10 +52,10 @@ export async function renderPage(
// Combines HTML chunks coming from the iterable with rendering instructions
// added to metadata. These instructions need to go out first to ensure
// the scripts exist before the islands that need them.
- async function * eachChunk() {
+ async function* eachChunk() {
for await (const chunk of iterable) {
- if(result._metadata.pendingInstructions.size) {
- for(const instr of result._metadata.pendingInstructions) {
+ if (result._metadata.pendingInstructions.size) {
+ for (const instr of result._metadata.pendingInstructions) {
result._metadata.pendingInstructions.delete(instr);
yield instr;
}
diff --git a/packages/astro/test/hydration-race.test.js b/packages/astro/test/hydration-race.test.js
index c26fa74fb..803a65a00 100644
--- a/packages/astro/test/hydration-race.test.js
+++ b/packages/astro/test/hydration-race.test.js
@@ -41,10 +41,10 @@ describe('Hydration script ordering', async () => {
let foundScript = false;
// Traverse the DOM going backwards until we find a script, if there is one.
- while(el.length) {
+ while (el.length) {
let last = el;
- while(el.length) {
- if(el.prop('tagName') === 'SCRIPT') {
+ while (el.length) {
+ if (el.prop('tagName') === 'SCRIPT') {
foundScript = true;
}
last = el;