Skip to content

Commit cbefed9

Browse files
matthewpastrobot-houston
authored andcommitted
[ci] format
1 parent b2d1b3e commit cbefed9

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

packages/astro/src/vite-plugin-astro-server/route-guard.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ export function routeGuardMiddleware(settings: AstroSettings): vite.Connect.Next
116116
const fsInfo: RouteGuardFsInfo = {
117117
existsInPublic:
118118
resolved.pathname.startsWith(config.publicDir.pathname) && fs.existsSync(resolved),
119-
existsInSrc:
120-
resolved.pathname.startsWith(config.srcDir.pathname) && fs.existsSync(resolved),
119+
existsInSrc: resolved.pathname.startsWith(config.srcDir.pathname) && fs.existsSync(resolved),
121120
existsAtRootAsFile: false,
122121
};
123122

packages/astro/test/units/dev/route-guard-middleware.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ describe('routeGuardMiddleware — filesystem resolution', () => {
3030
});
3131

3232
assert.equal(nextCalled, true, 'next() should be called — file is inside srcDir');
33-
assert.notEqual(
34-
(res as any).statusCode,
35-
404,
36-
'should not return 404 for files inside srcDir',
37-
);
33+
assert.notEqual((res as any).statusCode, 404, 'should not return 404 for files inside srcDir');
3834
});
3935

4036
it('blocks root-level files outside srcDir/publicDir', async () => {

0 commit comments

Comments
 (0)