From 75de4a8c735899033cdffc09ee4ecccd875ab611 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Mon, 16 Dec 2024 19:20:28 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/build/index.ts | 3 +-- packages/astro/src/core/build/static-build.ts | 10 +++------- packages/astro/test/astro-basic.test.js | 2 +- packages/astro/test/sourcemap.test.js | 4 ++-- packages/integrations/react/src/index.ts | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts index 14bc534ddca2..a31b34ce84a0 100644 --- a/packages/astro/src/core/build/index.ts +++ b/packages/astro/src/core/build/index.ts @@ -205,8 +205,7 @@ class AstroBuilder { key: keyPromise, }; - const { internals, ssrOutputChunkNames } = - await viteBuild(opts); + const { internals, ssrOutputChunkNames } = await viteBuild(opts); const hasServerIslands = this.settings.serverIslandNameMap.size > 0; // Error if there are server islands but no adapter provided. diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 8023d9e3b012..ccd0994d6d0f 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -356,8 +356,7 @@ async function cleanServerOutput( ) { const out = getOutDirWithinCwd(opts.settings.config.outDir); // The SSR output chunks for Astro are all .mjs files - const files = ssrOutputChunkNames - .filter((f) => f.endsWith('.mjs')); + const files = ssrOutputChunkNames.filter((f) => f.endsWith('.mjs')); if (internals.manifestFileName) { files.push(internals.manifestFileName); } @@ -367,10 +366,7 @@ async function cleanServerOutput( files.map(async (filename) => { const url = new URL(filename, out); const map = new URL(url + '.map'); - await Promise.all([ - fs.promises.rm(url), - fs.promises.rm(new URL(map)).catch((e) => {}) - ]); + await Promise.all([fs.promises.rm(url), fs.promises.rm(new URL(map)).catch((e) => {})]); }), ); @@ -426,7 +422,7 @@ async function ssrMoveAssets(opts: StaticBuildOptions) { cwd: fileURLToPath(serverAssets), }); - console.log("FILES2", files); + console.log('FILES2', files); if (files.length > 0) { await Promise.all( diff --git a/packages/astro/test/astro-basic.test.js b/packages/astro/test/astro-basic.test.js index a780a6cb47ca..0c4908c2d520 100644 --- a/packages/astro/test/astro-basic.test.js +++ b/packages/astro/test/astro-basic.test.js @@ -169,7 +169,7 @@ describe('Astro basic build', () => { it('server sourcemaps not included in output', async () => { const files = await fixture.readdir('/'); - const hasSourcemaps = files.some(fileName => { + const hasSourcemaps = files.some((fileName) => { return fileName.endsWith('.map'); }); assert.equal(hasSourcemaps, false, 'no sourcemap files in output'); diff --git a/packages/astro/test/sourcemap.test.js b/packages/astro/test/sourcemap.test.js index 36cd071a6b98..7040655a35df 100644 --- a/packages/astro/test/sourcemap.test.js +++ b/packages/astro/test/sourcemap.test.js @@ -18,9 +18,9 @@ describe('Sourcemap', async () => { it('Builds non-empty sourcemap', async () => { const assets = await fixture.readdir('/_astro'); - const maps = assets.filter(file => file.endsWith('.map')); + const maps = assets.filter((file) => file.endsWith('.map')); assert.ok(maps.length > 0, 'got source maps'); - for(const mapName of maps) { + for (const mapName of maps) { const filename = `/_astro/${mapName}`; const map = await fixture.readFile(filename); assert.equal(map.includes('"sources":[]'), false); diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index 6df52fb14ba4..b1effa27a044 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -60,7 +60,7 @@ function getViteConfiguration( 'react/jsx-runtime', 'react/jsx-dev-runtime', 'react-dom', - 'react-compiler-runtime' + 'react-compiler-runtime', ], exclude: [reactConfig.server], },