Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Apr 22, 2024
1 parent 26e8991 commit d04de54
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
14 changes: 2 additions & 12 deletions packages/astro/src/core/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,14 @@ import { getOutputDirectory, isServerLikeOutput } from '../../prerender/utils.js
import type { SSRManifestI18n } from '../app/types.js';
import { NoPrerenderedRoutesWithDomains } from '../errors/errors-data.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { routeIsFallback } from '../redirects/helpers.js';
import {
RedirectSinglePageBuiltModule,
getRedirectLocationOrThrow,
routeIsRedirect,
} from '../redirects/index.js';
import { getRedirectLocationOrThrow, routeIsRedirect } from '../redirects/index.js';
import { RenderContext } from '../render-context.js';
import { callGetStaticPaths } from '../render/route-cache.js';
import { createRequest } from '../request.js';
import { matchRoute } from '../routing/match.js';
import { getOutputFilename } from '../util.js';
import { getOutDirWithinCwd, getOutFile, getOutFolder } from './common.js';
import {
cssOrder,
getEntryFilePathFromComponentPath,
getPageDataByComponent,
mergeInlineCss,
} from './internal.js';
import { cssOrder, getPageDataByComponent, mergeInlineCss } from './internal.js';
import { BuildPipeline } from './pipeline.js';
import type {
PageBuildData,
Expand Down
9 changes: 6 additions & 3 deletions packages/astro/src/core/build/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ import { getOutDirWithinCwd } from './common.js';
* The build pipeline is responsible to gather the files emitted by the SSR build and generate the pages by executing these files.
*/
export class BuildPipeline extends Pipeline {
#componentsInterner: WeakMap<RouteData, SinglePageBuiltModule> = new WeakMap();
#componentsInterner: WeakMap<RouteData, SinglePageBuiltModule> = new WeakMap<
RouteData,
SinglePageBuiltModule
>();
/**
* This cache is needed to map a single `RouteData` to its file path.
* @private
*/
#routesByFilePath: WeakMap<RouteData, string> = new WeakMap();
#routesByFilePath: WeakMap<RouteData, string> = new WeakMap<RouteData, string>();

get outFolder() {
const ssr = isServerLikeOutput(this.settings.config);
Expand Down Expand Up @@ -262,7 +265,7 @@ export class BuildPipeline extends Pipeline {
return await entry.page();
} else {
// SAFETY: the pipeline calls `retrieveRoutesToGenerate`, which is in charge to fill the cache.
let filePath = this.#routesByFilePath.get(routeData)!;
const filePath = this.#routesByFilePath.get(routeData)!;
const module = await this.retrieveSsrEntry(routeData, filePath);
return module.page();
}
Expand Down
2 changes: 0 additions & 2 deletions packages/astro/test/i18n-routing-manual.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ describe('Dev server manual routing', () => {
describe('SSG manual routing', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
/** @type {import('./test-utils').DevServer} */
let devServer;

before(async () => {
fixture = await loadFixture({
Expand Down
3 changes: 1 addition & 2 deletions packages/astro/test/reroute.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ describe('Dev reroute', () => {
});
});

describe.only('Build reroute', () => {
describe('Build reroute', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
let devServer;

before(async () => {
fixture = await loadFixture({
Expand Down

0 comments on commit d04de54

Please sign in to comment.