mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
[ci] format
This commit is contained in:
parent
dda4a8e1df
commit
02ed922b1e
3 changed files with 6 additions and 10 deletions
|
@ -410,8 +410,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);
|
||||
}
|
||||
|
@ -421,10 +420,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) => {})]);
|
||||
}),
|
||||
);
|
||||
|
||||
|
@ -480,7 +476,7 @@ async function ssrMoveAssets(opts: StaticBuildOptions) {
|
|||
cwd: fileURLToPath(serverAssets),
|
||||
});
|
||||
|
||||
console.log("FILES2", files);
|
||||
console.log('FILES2', files);
|
||||
|
||||
if (files.length > 0) {
|
||||
await Promise.all(
|
||||
|
|
|
@ -174,7 +174,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');
|
||||
|
|
|
@ -18,7 +18,7 @@ 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) {
|
||||
const filename = `/_astro/${mapName}`;
|
||||
|
|
Loading…
Reference in a new issue