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 Dec 18, 2024
1 parent b4fec3c commit a94e309
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/astro/src/core/app/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RoutingStrategies } from '../../i18n/utils.js';
import type { ComponentInstance, SerializedRouteData } from '../../types/astro.js';
import type { AstroMiddlewareInstance } from '../../types/public/common.js';
import type { Locales, ResolvedSessionConfig, SessionConfig } from '../../types/public/config.js';
import type { Locales, ResolvedSessionConfig, } from '../../types/public/config.js';
import type {
RouteData,
SSRComponentMetadata,
Expand Down Expand Up @@ -69,7 +69,7 @@ export type SSRManifest = {
i18n: SSRManifestI18n | undefined;
middleware?: () => Promise<AstroMiddlewareInstance> | AstroMiddlewareInstance;
checkOrigin: boolean;
sessionConfig?: ResolvedSessionConfig<any>
sessionConfig?: ResolvedSessionConfig<any>;
};

export type SSRManifestI18n = {
Expand Down
8 changes: 5 additions & 3 deletions packages/astro/src/core/build/plugins/plugin-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import { encodeKey } from '../../encryption.js';
import { fileExtension, joinPaths, prependForwardSlash } from '../../path.js';
import { DEFAULT_COMPONENTS } from '../../routing/default.js';
import { serializeRouteData } from '../../routing/index.js';
import { resolveSessionDriver } from '../../session.js';
import { addRollupInput } from '../add-rollup-input.js';
import { getOutFile, getOutFolder } from '../common.js';
import { type BuildInternals, cssOrder, mergeInlineCss } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin.js';
import type { StaticBuildOptions } from '../types.js';
import { makePageDataKey } from './util.js';
import { resolveSessionDriver } from '../../session.js';

const manifestReplace = '@@ASTRO_MANIFEST_REPLACE@@';
const replaceExp = new RegExp(`['"]${manifestReplace}['"]`, 'g');
Expand Down Expand Up @@ -53,8 +53,10 @@ function vitePluginManifest(options: StaticBuildOptions, internals: BuildInterna
`import { deserializeManifest as _deserializeManifest } from 'astro/app'`,
`import { _privateSetManifestDontUseThis } from 'astro:ssr-manifest'`,
];

const resolvedDriver = await resolveSessionDriver(options.settings.config.experimental?.session?.driver);

const resolvedDriver = await resolveSessionDriver(
options.settings.config.experimental?.session?.driver,
);

const contents = [
`const manifest = _deserializeManifest('${manifestReplace}');`,
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/types/public/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
responsiveImages?: boolean;

/**
*
*
* @name experimental.session
* @type {SessionConfig}
* @version 5.0.0
Expand Down
5 changes: 0 additions & 5 deletions packages/astro/test/units/sessions/astro-session.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,8 @@ test('AstroSession - Data Persistence', async (t) => {

assert.equal(value, undefined);
});



});



test('AstroSession - Error Handling', async (t) => {
await t.test('should throw error when setting invalid data', async () => {
const session = createSession();
Expand Down

0 comments on commit a94e309

Please sign in to comment.