Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Aug 25, 2023
1 parent 46d0a0b commit a35c21c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/core/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
import type { SinglePageBuiltModule } from '../build/types';
import { getSetCookiesFromResponse } from '../cookies/index.js';
import { consoleLogDestination } from '../logger/console.js';
import { error, type LogOptions, warn } from '../logger/core.js';
import { error, warn, type LogOptions } from '../logger/core.js';
import {
collapseDuplicateSlashes,
prependForwardSlash,
Expand Down
7 changes: 4 additions & 3 deletions packages/astro/src/core/build/plugins/plugin-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ function buildManifest(
}
const isEdgeMiddleware =
// TODO: remove in Astro 4.0
settings.config.build.excludeMiddleware ||
settings.adapter?.adapterFeatures?.edgeMiddleware;
settings.config.build.excludeMiddleware || settings.adapter?.adapterFeatures?.edgeMiddleware;

const ssrManifest: SerializedSSRManifest = {
adapterName: opts.settings.adapter?.name ?? '',
Expand All @@ -254,7 +253,9 @@ function buildManifest(
clientDirectives: Array.from(settings.clientDirectives),
entryModules,
assets: staticFiles.map(prefixAssetPath),
middlewareEntryPoint: !isEdgeMiddleware ? internals.middlewareEntryPoint?.toString() : undefined,
middlewareEntryPoint: !isEdgeMiddleware
? internals.middlewareEntryPoint?.toString()
: undefined,
};

return ssrManifest;
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/plugins/plugin-middleware.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Plugin as VitePlugin } from 'vite';
import { getOutputDirectory } from '../../../prerender/utils.js';
import { MIDDLEWARE_PATH_SEGMENT_NAME } from '../../constants.js';
import { addRollupInput } from '../add-rollup-input.js';
import type { BuildInternals } from '../internal';
import type { AstroBuildPlugin } from '../plugin';
import type { StaticBuildOptions } from '../types';
import { getOutputDirectory } from '../../../prerender/utils.js';

export const MIDDLEWARE_MODULE_ID = '@astro-middleware';

Expand Down
3 changes: 1 addition & 2 deletions packages/astro/test/middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('Middleware API in PROD mode, SSR', () => {
expect(text.includes('Error')).to.be.true;
expect(text.includes('bar')).to.be.true;
});

it('the integration should receive the path to the middleware', async () => {
fixture = await loadFixture({
root: './fixtures/middleware-dev/',
Expand All @@ -245,7 +245,6 @@ describe('Middleware API in PROD mode, SSR', () => {
throw e;
}
});

});

describe('Middleware with tailwind', () => {
Expand Down

0 comments on commit a35c21c

Please sign in to comment.