Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Dec 16, 2024
1 parent 0ac0f25 commit 75de4a8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions packages/astro/src/core/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 3 additions & 7 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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) => {})]);

Check notice on line 369 in packages/astro/src/core/build/static-build.ts

View workflow job for this annotation

GitHub Actions / Lint

lint/correctness/noUnusedFunctionParameters

This parameter is unused.

Check notice on line 369 in packages/astro/src/core/build/static-build.ts

View workflow job for this annotation

GitHub Actions / Lint

lint/correctness/noUnusedVariables

This parameter is unused.
}),
);

Expand Down Expand Up @@ -426,7 +422,7 @@ async function ssrMoveAssets(opts: StaticBuildOptions) {
cwd: fileURLToPath(serverAssets),
});

console.log("FILES2", files);
console.log('FILES2', files);

Check warning on line 425 in packages/astro/src/core/build/static-build.ts

View workflow job for this annotation

GitHub Actions / Lint

lint/suspicious/noConsoleLog

Don't use console.log

if (files.length > 0) {
await Promise.all(
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/astro-basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/sourcemap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function getViteConfiguration(
'react/jsx-runtime',
'react/jsx-dev-runtime',
'react-dom',
'react-compiler-runtime'
'react-compiler-runtime',
],
exclude: [reactConfig.server],
},
Expand Down

0 comments on commit 75de4a8

Please sign in to comment.