fix: correct import paths for TypeScript compilation

- Add .js extension to entityIdMapper baseStorage import
- Change roaring imports from subpath to main package export
- Use import { RoaringBitmap32 } from 'roaring' for ESM compatibility
This commit is contained in:
David Snelling 2025-10-13 16:40:50 -07:00
parent 2f6ab9559a
commit aeffd32fe0
5 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@
* @module utils/entityIdMapper * @module utils/entityIdMapper
*/ */
import type { BaseStorage } from '../storage/baseStorage' import type { BaseStorage } from '../storage/baseStorage.js'
export interface EntityIdMapperOptions { export interface EntityIdMapperOptions {
storage: BaseStorage storage: BaseStorage

View file

@ -18,7 +18,7 @@ import {
ZoneMap ZoneMap
} from './metadataIndexChunking.js' } from './metadataIndexChunking.js'
import { EntityIdMapper } from './entityIdMapper.js' import { EntityIdMapper } from './entityIdMapper.js'
import RoaringBitmap32 from 'roaring/RoaringBitmap32' import { RoaringBitmap32 } from 'roaring'
export interface MetadataIndexEntry { export interface MetadataIndexEntry {
field: string field: string

View file

@ -22,7 +22,7 @@
import { StorageAdapter } from '../coreTypes.js' import { StorageAdapter } from '../coreTypes.js'
import { prodLog } from './logger.js' import { prodLog } from './logger.js'
import RoaringBitmap32 from 'roaring/RoaringBitmap32' import { RoaringBitmap32 } from 'roaring'
import type { EntityIdMapper } from './entityIdMapper.js' import type { EntityIdMapper } from './entityIdMapper.js'
// ============================================================================ // ============================================================================

View file

@ -7,7 +7,7 @@
* Run with: NODE_OPTIONS='--max-old-space-size=8192' npx tsx tests/performance/roaring-bitmap-benchmark.ts * Run with: NODE_OPTIONS='--max-old-space-size=8192' npx tsx tests/performance/roaring-bitmap-benchmark.ts
*/ */
import RoaringBitmap32 from 'roaring/RoaringBitmap32' import { RoaringBitmap32 } from 'roaring'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
// Benchmark configuration // Benchmark configuration

View file

@ -13,7 +13,7 @@ import { EntityIdMapper } from '../../../src/utils/entityIdMapper.js'
import { ChunkManager } from '../../../src/utils/metadataIndexChunking.js' import { ChunkManager } from '../../../src/utils/metadataIndexChunking.js'
import { MetadataIndexManager } from '../../../src/utils/metadataIndex.js' import { MetadataIndexManager } from '../../../src/utils/metadataIndex.js'
import { MemoryStorage } from '../../../src/storage/adapters/memoryStorage.js' import { MemoryStorage } from '../../../src/storage/adapters/memoryStorage.js'
import RoaringBitmap32 from 'roaring/RoaringBitmap32' import { RoaringBitmap32 } from 'roaring'
import { v4 as uuidv4 } from '../../../src/universal/uuid.js' import { v4 as uuidv4 } from '../../../src/universal/uuid.js'
describe('EntityIdMapper', () => { describe('EntityIdMapper', () => {