From 9f34e3f889805f26df326fb19444995a14a39826 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 16 Jan 2025 09:06:34 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/content/content-layer.ts | 4 +--- packages/astro/src/core/dev/container.ts | 1 - packages/astro/src/core/dev/restart.ts | 2 +- packages/astro/test/content-layer.test.js | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/content/content-layer.ts b/packages/astro/src/content/content-layer.ts index 6ff356675271..1342ff8b33c6 100644 --- a/packages/astro/src/content/content-layer.ts +++ b/packages/astro/src/content/content-layer.ts @@ -23,7 +23,6 @@ import { safeStringify, } from './utils.js'; import { type WrappedWatcher, createWatcherWrapper } from './watcher.js'; -import type { AstroConfig } from '../types/public/index.js'; export interface ContentLayerOptions { store: MutableDataStore; @@ -32,7 +31,6 @@ export interface ContentLayerOptions { watcher?: FSWatcher; } - export class ContentLayer { #logger: Logger; #store: MutableDataStore; @@ -184,7 +182,7 @@ export class ContentLayer { } = this.#settings.config; const astroConfigDigest = safeStringify(hashableConfig); - + const { digest: currentConfigDigest } = contentConfig.config; this.#lastConfigDigest = currentConfigDigest; diff --git a/packages/astro/src/core/dev/container.ts b/packages/astro/src/core/dev/container.ts index 7425a1a3bdb3..8dcbb6dfe406 100644 --- a/packages/astro/src/core/dev/container.ts +++ b/packages/astro/src/core/dev/container.ts @@ -124,7 +124,6 @@ export async function createContainer({ watcher: viteServer.watcher, }); - const container: Container = { inlineConfig: inlineConfig ?? {}, fs, diff --git a/packages/astro/src/core/dev/restart.ts b/packages/astro/src/core/dev/restart.ts index e2baa9a38fe9..4aa1e2b74130 100644 --- a/packages/astro/src/core/dev/restart.ts +++ b/packages/astro/src/core/dev/restart.ts @@ -2,6 +2,7 @@ import type nodeFs from 'node:fs'; import { fileURLToPath } from 'node:url'; import * as vite from 'vite'; import { globalContentLayer } from '../../content/content-layer.js'; +import { attachContentServerListeners } from '../../content/server-listeners.js'; import { eventCliSession, telemetry } from '../../events/index.js'; import { SETTINGS_FILE } from '../../preferences/constants.js'; import type { AstroSettings } from '../../types/astro.js'; @@ -13,7 +14,6 @@ import { createSafeError } from '../errors/index.js'; import { formatErrorMessage } from '../messages.js'; import type { Container } from './container.js'; import { createContainer, startContainer } from './container.js'; -import { attachContentServerListeners } from '../../content/server-listeners.js'; async function createRestartedContainer( container: Container, diff --git a/packages/astro/test/content-layer.test.js b/packages/astro/test/content-layer.test.js index 83385c6d2482..f3d85e382fa9 100644 --- a/packages/astro/test/content-layer.test.js +++ b/packages/astro/test/content-layer.test.js @@ -1,10 +1,10 @@ import assert from 'node:assert/strict'; import { promises as fs, existsSync } from 'node:fs'; -import { setTimeout } from 'node:timers/promises'; import { sep } from 'node:path'; import { sep as posixSep } from 'node:path/posix'; import { Writable } from 'node:stream'; import { after, before, describe, it } from 'node:test'; +import { setTimeout } from 'node:timers/promises'; import * as cheerio from 'cheerio'; import * as devalue from 'devalue'; import { Logger } from '../dist/core/logger/core.js';