Updated prisma.

This commit is contained in:
Mike Cao 2025-11-21 21:35:11 -08:00
parent b45971da33
commit b9d52af215
13 changed files with 493 additions and 167 deletions

View file

@ -14,23 +14,21 @@ describe('renderNumberLabels', () => {
expect(renderNumberLabels(input)).toBe(expected);
});
test.each([['12500', '12.5k']])(
"formats numbers ≥ 10K as 'X.Xk' (%s → %s)",
(input, expected) => {
expect(renderNumberLabels(input)).toBe(expected);
},
);
test.each([
['12500', '12.5k'],
])("formats numbers ≥ 10K as 'X.Xk' (%s → %s)", (input, expected) => {
expect(renderNumberLabels(input)).toBe(expected);
});
test.each([['1500', '1.50k']])("formats numbers ≥ 1K as 'X.XXk' (%s → %s)", (input, expected) => {
expect(renderNumberLabels(input)).toBe(expected);
});
test.each([['999', '999']])(
'calls formatNumber for values < 1000 (%s → %s)',
(input, expected) => {
expect(renderNumberLabels(input)).toBe(expected);
},
);
test.each([
['999', '999'],
])('calls formatNumber for values < 1000 (%s → %s)', (input, expected) => {
expect(renderNumberLabels(input)).toBe(expected);
});
test.each([
['0', '0'],

View file

@ -1,10 +1,10 @@
import debug from 'debug';
import { PrismaPg } from '@prisma/adapter-pg';
import { readReplicas } from '@prisma/extension-read-replicas';
import debug from 'debug';
import { PrismaClient } from '@/generated/prisma/client';
import { SESSION_COLUMNS, OPERATORS, DEFAULT_PAGE_SIZE, FILTER_COLUMNS } from './constants';
import { QueryOptions, QueryFilters, Operator } from './types';
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS, OPERATORS, SESSION_COLUMNS } from './constants';
import { filtersObjectToArray } from './params';
import type { Operator, QueryFilters, QueryOptions } from './types';
const log = debug('umami:prisma');