Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and actions-user committed Mar 25, 2022
1 parent b4e4c87 commit 21d617e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AstroBuilder {
client: new URL('./client/', this.config.dist),
server: new URL('./server/', this.config.dist),
serverEntry: 'entry.mjs',
staticMode: undefined
staticMode: undefined,
};
await runHookBuildStart({ config: this.config, buildConfig });

Expand Down Expand Up @@ -173,7 +173,7 @@ class AstroBuilder {

// You're done! Time to clean up.
await viteServer.close();
await runHookBuildDone({ config: this.config, pages: pageNames, routes: Object.values(allPages).map(pd => pd.route) });
await runHookBuildDone({ config: this.config, pages: pageNames, routes: Object.values(allPages).map((pd) => pd.route) });

if (logging.level && levels[logging.level] <= levels['info']) {
const buildMode = this.config.buildOptions.experimentalSsr ? 'ssr' : 'static';
Expand Down
9 changes: 7 additions & 2 deletions src/core/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ export function timerMessage(message: string, startTime: number = performance.no
* A warning that SSR is experimental. Remove when we can.
*/
export function warnIfUsingExperimentalSSR(opts: LogOptions, config: AstroConfig) {
if(isBuildingToSSR(config)) {
warn(opts, 'warning', bold(`Warning:`), ` SSR support is still experimental and subject to API changes. If using in production pin your dependencies to prevent accidental breakage.`);
if (isBuildingToSSR(config)) {
warn(
opts,
'warning',
bold(`Warning:`),
` SSR support is still experimental and subject to API changes. If using in production pin your dependencies to prevent accidental breakage.`
);
}
}
2 changes: 1 addition & 1 deletion src/integrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function runHookBuildStart({ config, buildConfig }: { config: Astro
}
}

export async function runHookBuildDone({ config, pages, routes }: { config: AstroConfig; pages: string[], routes: RouteData[] }) {
export async function runHookBuildDone({ config, pages, routes }: { config: AstroConfig; pages: string[]; routes: RouteData[] }) {
for (const integration of config.integrations) {
if (integration.hooks['astro:build:done']) {
await integration.hooks['astro:build:done']({ pages: pages.map((p) => ({ pathname: p })), dir: config.dist, routes });
Expand Down

0 comments on commit 21d617e

Please sign in to comment.