Merge pull request #1273 from buster-so/nate/upgrade-core-biome2

Upgrade core biome2
This commit is contained in:
Nate Kelley 2025-10-09 10:53:36 -06:00 committed by GitHub
commit 20014a84a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 56 additions and 37 deletions

View File

@ -78,6 +78,9 @@
"correctness": {
"noUnusedFunctionParameters": "off",
"noUnusedVariables": "off"
},
"performance": {
"noDelete": "off"
}
}
}

View File

@ -1,7 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": ["../../biome.json"],
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
"extends": ["../../biome2.json"],
"files": {
"include": ["src/**/*"]
"includes": ["src/**/*"]
}
}

View File

@ -10,4 +10,4 @@ declare global {
}
}
export {};
export {};

View File

@ -30,6 +30,7 @@
"@buster/env-utils": "workspace:*",
"@buster/typescript-config": "workspace:*",
"@buster/vitest-config": "workspace:*",
"@biomejs/biome": "2.2.5",
"uuid": "catalog:"
}
}

View File

@ -1,2 +1,2 @@
export * from './createTestChat';
export * from './cleanupTestChats';
export * from './createTestChat';

View File

@ -1,3 +1,3 @@
export * from './cleanupTestMessages';
export * from './createTestMessage';
export * from './createTestMessageWithContext';
export * from './cleanupTestMessages';

View File

@ -7,9 +7,7 @@ import { v4 as uuidv4 } from 'uuid';
* @param params - Optional parameters to override defaults
* @returns The organization ID
*/
export async function createTestOrganization(params?: {
name?: string;
}): Promise<string> {
export async function createTestOrganization(params?: { name?: string }): Promise<string> {
try {
const organizationId = uuidv4();
const name = params?.name || `Test Organization ${uuidv4()}`;

View File

@ -7,10 +7,7 @@ import { v4 as uuidv4 } from 'uuid';
* @param params - Optional parameters to override defaults
* @returns The user ID
*/
export async function createTestUser(params?: {
email?: string;
name?: string;
}): Promise<string> {
export async function createTestUser(params?: { email?: string; name?: string }): Promise<string> {
try {
const userId = uuidv4();
const email = params?.email || `test-${uuidv4()}@example.com`;

View File

@ -1,8 +1,8 @@
import { describe, expect, it, vi } from 'vitest';
import {
type TestEnvironment,
cleanupTestEnvironment,
setupTestEnvironment,
type TestEnvironment,
withTestEnv,
} from './env-helpers';
@ -140,7 +140,7 @@ describe('env-helpers.ts - Unit Tests', () => {
}
if (originalCustomVar === undefined) {
delete process.env.CUSTOM_VAR;
process.env.CUSTOM_VAR = undefined;
}
});

View File

@ -31,8 +31,7 @@ export function withTestEnv<T>(testFn: () => Promise<T>): () => Promise<T> {
return async () => {
const originalEnv = { ...process.env };
// biome-ignore lint/correctness/noUnusedVariables:
const env = await setupTestEnvironment();
await setupTestEnvironment();
try {
return await testFn();
} finally {

View File

@ -1,9 +1,10 @@
// Database test helpers
export * from './database/chats';
export * from './database/dataSources';
export * from './database/messages';
export * from './database/organizations';
export * from './database/users';
export * from './database/chats';
export * from './database/messages';
export * from './database/dataSources';
export * from './envHelpers';

View File

@ -40,7 +40,7 @@ export function createMockDate(fixedDate: string | Date) {
const mockDate = new Date(fixedDate);
const originalDate = Date;
// @ts-ignore
// @ts-expect-error
global.Date = vi.fn(() => mockDate);
global.Date.now = vi.fn(() => mockDate.getTime());

View File

@ -0,0 +1,14 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
"extends": ["../../biome2.json"],
"files": {
"includes": ["src/**/*", "scripts/**/*", "configs/**/*"]
},
"linter": {
"rules": {
"suspicious": {
"noConsole": "off"
}
}
}
}

View File

@ -1,6 +1,6 @@
import { loadEnv } from 'vite';
import { defineConfig } from 'vitest/config';
import type { Plugin, ViteUserConfig } from 'vitest/config';
import { defineConfig } from 'vitest/config';
export const baseConfig = defineConfig(async () => {
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');

View File

@ -1,6 +1,6 @@
import { loadEnv } from 'vite';
import { defineConfig } from 'vitest/config';
import type { Plugin, ViteUserConfig } from 'vitest/config';
import { defineConfig } from 'vitest/config';
export const uiConfig = defineConfig(async () => {
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');

View File

@ -26,6 +26,7 @@
},
"scripts": {
"build": "tsc --build",
"lint": "biome check --write",
"collect-json-reports": "node dist/scripts/collect-json-outputs.js",
"merge-json-reports": "nyc merge coverage/raw coverage/merged/merged-coverage.json",
"report": "nyc report -t coverage/merged --report-dir coverage/report --reporter=html --exclude-after-remap false",
@ -35,6 +36,7 @@
"@buster/typescript-config": "workspace:*",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
"@biomejs/biome": "2.2.5",
"glob": "^11.0.3",
"jsdom": "^26.1.0",
"nyc": "^17.1.0",

View File

@ -44,7 +44,6 @@ async function collectCoverageFiles() {
await fs.copyFile(coverageFilePath, destinationFile);
} catch (_err) {
// File doesn't exist in this directory, skip
// biome-ignore lint/suspicious/noConsoleLog: <explanation>
console.log(`No coverage.json found in ${match}`);
}
}
@ -55,13 +54,11 @@ async function collectCoverageFiles() {
const replaceDotPatterns = (str: string) => str.replace(/\.\.\//g, '');
if (directoriesWithCoverage.length > 0) {
// biome-ignore lint/suspicious/noConsoleLog: This is a log
console.log(
`Found coverage.json in: ${directoriesWithCoverage.map(replaceDotPatterns).join(', ')}`
);
}
// biome-ignore lint/suspicious/noConsoleLog: This is a log
console.log(`Coverage collected into: ${path.join(process.cwd())}`);
} catch (error) {
console.error('Error collecting coverage files:', error);

View File

@ -1,7 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": ["../../biome.json"],
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
"extends": ["../../biome2.json"],
"files": {
"include": ["src/**/*"]
"includes": ["src/**/*"]
}
}

View File

@ -27,6 +27,7 @@
"dependencies": {
"@buster/typescript-config": "workspace:*",
"@buster/vitest-config": "workspace:*",
"@mendable/firecrawl-js": "^1.29.1"
"@mendable/firecrawl-js": "^1.29.1",
"@biomejs/biome": "2.2.5"
}
}

View File

@ -1,20 +1,17 @@
// Main exports for the web-tools package
export { researchCompany } from './deep-research/company-research';
export { FirecrawlService } from './services/firecrawl';
export { pollJobStatus } from './utils/polling';
// Types
export type {
CompanyResearch,
CompanyResearchOptions,
CompanyResearchError,
CompanyResearchOptions,
} from './deep-research/types';
export type {
FirecrawlConfig,
WebSearchOptions,
WebSearchResult,
WebSearchResponse,
WebSearchResult,
} from './services/firecrawl';
export { FirecrawlService } from './services/firecrawl';
export type { PollingOptions } from './utils/polling';
export { pollJobStatus } from './utils/polling';

View File

@ -1395,6 +1395,9 @@ importers:
packages/test-utils:
dependencies:
'@biomejs/biome':
specifier: 2.2.5
version: 2.2.5
'@buster/database':
specifier: workspace:*
version: link:../database
@ -1415,6 +1418,9 @@ importers:
packages/vitest-config:
dependencies:
'@biomejs/biome':
specifier: 2.2.5
version: 2.2.5
'@buster/typescript-config':
specifier: workspace:*
version: link:../typescript-config
@ -1445,6 +1451,9 @@ importers:
packages/web-tools:
dependencies:
'@biomejs/biome':
specifier: 2.2.5
version: 2.2.5
'@buster/typescript-config':
specifier: workspace:*
version: link:../typescript-config