Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const CATEGORY_BY_SLUG: ReadonlyMap<string, CategoryEntry> = new Map(
CATEGORIES.map((c) => [c.slug, c]),
);

export const CATEGORY_SLUG_BY_LABEL: ReadonlyMap<Category, string> = new Map(
const CATEGORY_SLUG_BY_LABEL: ReadonlyMap<Category, string> = new Map(
CATEGORIES.map((c) => [c.label, c.slug]),
);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/dataset-jsonld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const HF_DATASET_URL =
/** Concept DOI for the dataset on Zenodo. Always resolves to the latest
* version. New version DOIs are minted automatically when we push a
* new git tag of the form `vX.Y.Z-dataset`. */
export const ZENODO_CONCEPT_DOI = "10.5281/zenodo.20800311";
export const ZENODO_CONCEPT_URL = `https://doi.org/${ZENODO_CONCEPT_DOI}`;
const ZENODO_CONCEPT_DOI = "10.5281/zenodo.20800311";
const ZENODO_CONCEPT_URL = `https://doi.org/${ZENODO_CONCEPT_DOI}`;

/** Latest parquet headlines snapshot via Hugging Face's auto-converted
* parquet API. The repo itself only holds dated partitions
Expand Down
2 changes: 1 addition & 1 deletion src/lib/materialize/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function freshnessOf(meta: StalenessMeta | undefined, now = Date.now()):
* display values carry forward separately via StalenessMeta. Cadences
* mirror the live loader: 24h = 72 pts @ 20 min, 7d = 84 pts @ 2 h,
* 30d = 60 pts @ 12 h. */
export const SeriesRingSchema = z.object({
const SeriesRingSchema = z.object({
/** Epoch ms of points[0]. */
startEpoch: z.number(),
stepSec: z.number(),
Expand Down
5 changes: 3 additions & 2 deletions src/lib/search-featured.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ export async function buildFeaturedLeaders(): Promise<FeaturedLeadersBlob> {
};
}

/** Exported for the public endpoint + the dialog's TS type. */
export const FEATURED_SLUGS = ALL_SLUGS;
// FEATURED_SLUGS previously re-exported ALL_SLUGS but had zero
// external consumers. ALL_SLUGS stays used internally by
// buildFeaturedLeaders below.

/**
* Worker-safe variant of `buildFeaturedLeaders`. Reads each of the 12
Expand Down
16 changes: 4 additions & 12 deletions src/lib/time-constants.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
/**
* Shared time-unit constants.
*
* Single source of truth for the milliseconds / seconds conversions that
* leak across files as magic numbers (86400, 60_000, 3_600_000, ...).
* Importing from here makes the intent obvious at the call site and
* keeps grep-ability if a duration unit ever has to change.
*
* Naming convention mirrors the unit-of-measure that the constant
* EXPANDS into (MS_PER_MINUTE === 60_000 milliseconds in one minute).
* Single source of truth for the seconds conversions that leak across
* files as magic numbers (86400, 60, 3600). Importing from here makes
* the intent obvious at the call site and keeps grep-ability if a
* duration unit ever has to change.
*/

export const MS_PER_SECOND = 1_000;
export const MS_PER_MINUTE = 60_000;
export const MS_PER_HOUR = 3_600_000;
export const MS_PER_DAY = 86_400_000;

export const SECONDS_PER_MINUTE = 60;
export const SECONDS_PER_HOUR = 3_600;
export const SECONDS_PER_DAY = 86_400;
Loading