Skip to content

Commit

Permalink
chore: removed bentocache
Browse files Browse the repository at this point in the history
  • Loading branch information
gustaveWPM committed Apr 22, 2024
1 parent b984e9f commit dc462ad
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 250 deletions.
2 changes: 1 addition & 1 deletion .ts-prune/artifacts/tsprune-false-positives.conf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ packages/shared-types/src/React.ts:8 - ReactElementKey
packages/shared-types/src/JSON.ts:8 - JSONData (used in module)
packages/shared-types/src/Numbers.ts:11 - Count
packages/shared-types/src/Numbers.ts:14 - MsValue
packages/shared-types/src/Numbers.ts:15 - TimestampInMs
packages/shared-types/src/Numbers.ts:15 - MsTimestamp
packages/shared-types/src/Numbers.ts:8 - Quantity
packages/shared-types/src/Numbers.ts:9 - Percentage
packages/shared-types/src/Numbers.ts:7 - Limit
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"@rtm/shared-lib": "*",
"@rtm/shared-types": "*",
"@vercel/speed-insights": "^1.0.10",
"bentocache": "1.0.0-beta.8",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^1.0.0",
Expand Down Expand Up @@ -152,5 +151,5 @@
"engines": {
"node": "^20.x"
},
"packageManager": "pnpm@9.0.4"
"packageManager": "pnpm@9.0.5"
}
2 changes: 1 addition & 1 deletion packages/prebuilder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"@rtm/shared-types": "*",
"typescript": "^5.4.4"
},
"packageManager": "pnpm@9.0.4"
"packageManager": "pnpm@9.0.5"
}
4 changes: 2 additions & 2 deletions packages/prebuilder/src/dx/watcher.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* v8 ignore start */
// Stryker disable all

import type { TimestampInMs, MsValue } from '@rtm/shared-types/Numbers';
import type { MsTimestamp, MsValue } from '@rtm/shared-types/Numbers';

import { watch } from 'chokidar';

import type { Path } from '../types/Metadatas';

let lastEventTimestamp: TimestampInMs | null = null;
let lastEventTimestamp: MsTimestamp | null = null;

const DEBOUNCE_THRESHOLD_IN_MS: MsValue = 10;

Expand Down
38 changes: 19 additions & 19 deletions packages/prebuilder/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import formatMessage from './config/formatMessage';
// NOTE: formatMessage import MUST be at the top of the file

import type { MaybeUndefined, MaybeNull, Couple } from '@rtm/shared-types/CustomUtilityTypes';
import type { TimestampInMs } from '@rtm/shared-types/Numbers';
import type { MsTimestamp } from '@rtm/shared-types/Numbers';

import { dirname, join } from 'path';
import { ArgError } from 'arg';
Expand Down Expand Up @@ -50,23 +50,23 @@ const BENCHMARK_ACCURACY = 5;
const HANDLED_ERRORS_TYPES = [FeedbackError, BuilderError, ArgumentsValidatorError, ArgError];

let clocks = {} as Partial<{
pagesTaxonomyCheckersStartTime: TimestampInMs;
blogTaxonomyCheckersStartTime: TimestampInMs;
pagesTaxonomyCheckersEndTime: TimestampInMs;
blogTaxonomyCheckersEndTime: TimestampInMs;
lpTaxonomyCheckersStartTime: TimestampInMs;
lpTaxonomyCheckersEndTime: TimestampInMs;
localesCheckersStartTime: TimestampInMs;
localesCheckersEndTime: TimestampInMs;
pagesCodegenStartTime: TimestampInMs;
utilsCodegenStartTime: TimestampInMs;
blogCodegenStartTime: TimestampInMs;
pagesCodegenEndTime: TimestampInMs;
utilsCodegenEndTime: TimestampInMs;
blogCodegenEndTime: TimestampInMs;
lpCodegenStartTime: TimestampInMs;
lpCodegenEndTime: TimestampInMs;
globalStartTime: TimestampInMs;
pagesTaxonomyCheckersStartTime: MsTimestamp;
blogTaxonomyCheckersStartTime: MsTimestamp;
pagesTaxonomyCheckersEndTime: MsTimestamp;
blogTaxonomyCheckersEndTime: MsTimestamp;
lpTaxonomyCheckersStartTime: MsTimestamp;
lpTaxonomyCheckersEndTime: MsTimestamp;
localesCheckersStartTime: MsTimestamp;
localesCheckersEndTime: MsTimestamp;
pagesCodegenStartTime: MsTimestamp;
utilsCodegenStartTime: MsTimestamp;
blogCodegenStartTime: MsTimestamp;
pagesCodegenEndTime: MsTimestamp;
utilsCodegenEndTime: MsTimestamp;
blogCodegenEndTime: MsTimestamp;
lpCodegenStartTime: MsTimestamp;
lpCodegenEndTime: MsTimestamp;
globalStartTime: MsTimestamp;
}>;

function resetBenchmarkClocks(): void {
Expand Down Expand Up @@ -108,7 +108,7 @@ function printPrebuildReport({
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
const IGNORED = -1 as const;

const computeDelay = (maybeStart: MaybeUndefined<TimestampInMs>, maybeEnd: MaybeUndefined<TimestampInMs>) =>
const computeDelay = (maybeStart: MaybeUndefined<MsTimestamp>, maybeEnd: MaybeUndefined<MsTimestamp>) =>
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
maybeStart === undefined || maybeEnd === undefined ? IGNORED : (Math.abs(maybeEnd - maybeStart) / 1e3).toFixed(BENCHMARK_ACCURACY);

Expand Down
2 changes: 1 addition & 1 deletion packages/shared-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@
"@types/hast": "^3.0.4",
"vitest": "^1.4.0"
},
"packageManager": "pnpm@9.0.4"
"packageManager": "pnpm@9.0.5"
}
2 changes: 1 addition & 1 deletion packages/shared-types/src/Numbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type Count = number;

export type PxValue = number;
export type MsValue = number;
export type TimestampInMs = number;
export type MsTimestamp = number;

// Stryker restore all
/* v8 ignore stop */
Loading

0 comments on commit dc462ad

Please sign in to comment.