[ci] format
This commit is contained in:
parent
7e5ac1f45c
commit
f9e8e72a48
4 changed files with 9 additions and 12 deletions
|
@ -11,7 +11,7 @@ test.describe('Lit components', () => {
|
|||
test.beforeEach(() => {
|
||||
delete globalThis.window;
|
||||
});
|
||||
|
||||
|
||||
test.describe('Development', () => {
|
||||
let devServer;
|
||||
const t = test.extend({});
|
||||
|
@ -19,7 +19,7 @@ test.describe('Lit components', () => {
|
|||
t.beforeEach(async ({ astro }) => {
|
||||
devServer = await astro.startDevServer();
|
||||
});
|
||||
|
||||
|
||||
t.afterEach(async () => {
|
||||
await devServer.stop();
|
||||
});
|
||||
|
@ -110,12 +110,12 @@ test.describe('Lit components', () => {
|
|||
|
||||
test.describe('Production', () => {
|
||||
let previewServer;
|
||||
const t = test.extend({});
|
||||
const t = test.extend({});
|
||||
|
||||
t.beforeAll(async ({ astro }) => {
|
||||
// Playwright's Node version doesn't have these functions, so stub them.
|
||||
process.stdout.clearLine = () => {};
|
||||
process.stdout.cursorTo = () => {};
|
||||
process.stdout.cursorTo = () => {};
|
||||
await astro.build();
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import type { PluginContext } from 'rollup';
|
||||
import type { Plugin as VitePlugin } from 'vite';
|
||||
import type { AstroConfig } from '../../@types/astro';
|
||||
import type { BuildInternals } from '../../core/build/internal.js';
|
||||
import type { PluginMetadata as AstroPluginMetadata } from '../../vite-plugin-astro/types';
|
||||
|
||||
|
@ -9,9 +8,7 @@ import { resolveClientDevPath } from '../../core/render/dev/resolve.js';
|
|||
import { getTopLevelPages } from './graph.js';
|
||||
import { getPageDataByViteID, trackClientOnlyPageDatas } from './internal.js';
|
||||
|
||||
export function vitePluginAnalyzer(
|
||||
internals: BuildInternals
|
||||
): VitePlugin {
|
||||
export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
|
||||
function hoistedScriptScanner() {
|
||||
const uniqueHoistedIds = new Map<string, string>();
|
||||
const pageScripts = new Map<string, Set<string>>();
|
||||
|
|
|
@ -145,9 +145,9 @@ function buildManifest(
|
|||
|
||||
// HACK! Patch this special one.
|
||||
const entryModules = Object.fromEntries(internals.entrySpecifierToBundleMap.entries());
|
||||
if(!(BEFORE_HYDRATION_SCRIPT_ID in entryModules)) {
|
||||
if (!(BEFORE_HYDRATION_SCRIPT_ID in entryModules)) {
|
||||
entryModules[BEFORE_HYDRATION_SCRIPT_ID] =
|
||||
'data:text/javascript;charset=utf-8,//[no before-hydration script]';
|
||||
'data:text/javascript;charset=utf-8,//[no before-hydration script]';
|
||||
}
|
||||
|
||||
const ssrManifest: SerializedSSRManifest = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Plugin as VitePlugin, ConfigEnv } from 'vite';
|
||||
import { ConfigEnv, Plugin as VitePlugin } from 'vite';
|
||||
import { AstroConfig, InjectedScriptStage } from '../@types/astro.js';
|
||||
|
||||
// NOTE: We can't use the virtual "\0" ID convention because we need to
|
||||
|
@ -57,6 +57,6 @@ export default function astroScriptsPlugin({ config }: { config: AstroConfig }):
|
|||
name: BEFORE_HYDRATION_SCRIPT_ID,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue