Update ESLint 10, replace trace-mapping auto-detection with DI #65
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mburchard/bit-log!65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/update-eslint-10"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
import()of@jridgewell/trace-mappingwith an explicitconfigureSourceMapResolver(TraceMap, originalPositionFor)API, so bundlers no longer pull trace-mapping into production bundles when source map resolution is not neededTest plan
pnpm lintpassespnpm typecheckpassespnpm buildsucceeds@jridgewell/trace-mappingexportsSource map resolution is no longer auto-detected via dynamic import. Consumers must now explicitly configure the resolver: import {originalPositionFor, TraceMap} from '@jridgewell/trace-mapping'; import {configureSourceMapResolver} from '@mburchard/bit-log'; configureSourceMapResolver(TraceMap, originalPositionFor); This prevents bundlers (Vite, Rollup, Webpack) from pulling @jridgewell/trace-mapping into the production bundle when source map resolution is not needed. - Remove enableSourceMapResolution(), initResolver(), flushInitQueue() and all associated module-level state (InitState, initState, initQueue) - Add configureSourceMapResolver() with generic signature for type-safe usage with @jridgewell/trace-mapping - Add resetSourceMapResolver() (@internal, for test isolation) - Simplify resolveEventSourceMap() to synchronous resolver check - Remove enableSourceMapResolution() call from Logger.includeCallSite setter - Re-export configureSourceMapResolver from index.ts as public API - Rewrite public API tests to use DI approach instead of vi.resetModules() - Add compile-time type compatibility check with real trace-mapping exports - Update README with explicit setup instructions - Bump version to 1.2.1