diff --git a/baker/SiteBaker.tsx b/baker/SiteBaker.tsx index 0d1055ce426..c5134f53c07 100644 --- a/baker/SiteBaker.tsx +++ b/baker/SiteBaker.tsx @@ -334,7 +334,6 @@ export class SiteBaker { const publishedChartsRaw = await mapSlugsToConfigs(knex) const publishedCharts: LinkedChart[] = [] - let i = 0 for (const publishedChartsRawChunk of chunk( publishedChartsRaw, 20 @@ -357,7 +356,6 @@ export class SiteBaker { }) }) ) - i++ } const publishedChartsBySlug = keyBy(publishedCharts, "originalSlug") diff --git a/baker/algolia/algoliaUtils.tsx b/baker/algolia/algoliaUtils.tsx index 401d29a9272..657e1c59237 100644 --- a/baker/algolia/algoliaUtils.tsx +++ b/baker/algolia/algoliaUtils.tsx @@ -34,7 +34,6 @@ import { import { getIndexName } from "../../site/search/searchClient.js" import { ObjectWithObjectID } from "@algolia/client-search" import { SearchIndex } from "algoliasearch" -import { gdocFromJSON } from "../../db/model/Gdoc/GdocFactory.js" import { match, P } from "ts-pattern" interface TypeAndImportance { diff --git a/baker/algolia/indexToAlgolia.tsx b/baker/algolia/indexToAlgolia.tsx index 954980176e3..67015b21041 100644 --- a/baker/algolia/indexToAlgolia.tsx +++ b/baker/algolia/indexToAlgolia.tsx @@ -1,4 +1,3 @@ -import fs from "fs" import * as db from "../../db/db.js" import * as wpdb from "../../db/wpdb.js" import { ALGOLIA_INDEXING } from "../../settings/serverSettings.js" diff --git a/baker/sitemap.ts b/baker/sitemap.ts index 33cdfa41974..c02c799f866 100644 --- a/baker/sitemap.ts +++ b/baker/sitemap.ts @@ -15,7 +15,6 @@ import { countryProfileSpecs } from "../site/countryProfileProjects.js" import { ExplorerAdminServer } from "../explorerAdminServer/ExplorerAdminServer.js" import { EXPLORERS_ROUTE_FOLDER } from "../explorer/ExplorerConstants.js" import { ExplorerProgram } from "../explorer/ExplorerProgram.js" -import { GdocPost } from "../db/model/Gdoc/GdocPost.js" import { getPostsFromSnapshots } from "../db/model/Post.js" import { calculateDataInsightIndexPageCount } from "../db/model/Gdoc/gdocUtils.js" diff --git a/db/model/Gdoc/GdocBase.ts b/db/model/Gdoc/GdocBase.ts index 3117361ef23..f1921f17efe 100644 --- a/db/model/Gdoc/GdocBase.ts +++ b/db/model/Gdoc/GdocBase.ts @@ -6,7 +6,6 @@ import { LinkedIndicator, keyBy, ImageMetadata, - excludeUndefined, OwidGdocErrorMessage, OwidGdocErrorMessageType, excludeNullish, diff --git a/db/model/Gdoc/GdocFactory.ts b/db/model/Gdoc/GdocFactory.ts index 69a712a6f24..d573bd873cc 100644 --- a/db/model/Gdoc/GdocFactory.ts +++ b/db/model/Gdoc/GdocFactory.ts @@ -1,4 +1,4 @@ -import { get, groupBy, pick } from "lodash" +import { get, groupBy } from "lodash" import { match, P } from "ts-pattern" import { DATA_INSIGHTS_INDEX_PAGE_SIZE, @@ -9,7 +9,6 @@ import { DbPlainTag, DbRawPostGdoc, GdocsContentSource, - ImageMetadata, OwidGdoc, OwidGdocBaseInterface, OwidGdocIndexItem, diff --git a/db/model/Gdoc/GdocPost.ts b/db/model/Gdoc/GdocPost.ts index 0ac10cc7479..712625c11d7 100644 --- a/db/model/Gdoc/GdocPost.ts +++ b/db/model/Gdoc/GdocPost.ts @@ -23,15 +23,8 @@ import { ADMIN_BASE_URL } from "../../../settings/clientSettings.js" import { parseDetails, parseFaqs } from "./rawToEnriched.js" import { htmlToEnrichedTextBlock } from "./htmlToEnriched.js" import { GdocBase } from "./GdocBase.js" -import { - KnexReadWriteTransaction, - KnexReadonlyTransaction, - knexRaw, -} from "../../db.js" -import { - getGdocBaseObjectById, - getAndLoadPublishedGdocPosts, -} from "./GdocFactory.js" +import { KnexReadonlyTransaction, knexRaw } from "../../db.js" +import { getGdocBaseObjectById } from "./GdocFactory.js" export class GdocPost extends GdocBase implements OwidGdocPostInterface { content!: OwidGdocPostContent diff --git a/db/model/Image.ts b/db/model/Image.ts index 1077b4498fe..322e170f839 100644 --- a/db/model/Image.ts +++ b/db/model/Image.ts @@ -18,7 +18,6 @@ import { DbInsertImage, serializeImageRow, ImagesTableName, - merge, excludeUndefined, } from "@ourworldindata/utils" import { OwidGoogleAuth } from "../OwidGoogleAuth.js" @@ -32,7 +31,6 @@ import { GDOCS_SHARED_DRIVE_ID, } from "../../settings/serverSettings.js" import { KnexReadWriteTransaction, KnexReadonlyTransaction } from "../db.js" -import { at } from "lodash" class ImageStore { async fetchImageMetadata(