The package previously named "bridge" houses the protocol-byte layer (OIDB cmds, msg-push decoders, highway uploaders, element-builder, event bus). The name "bridge" suggested transport/lifecycle, which it isn't — that role lives in core/hook and core/bridge/manager. Rename to match what's actually inside. This is a pure rename: zero logic changes, all 73 import sites updated mechanically and TS-verified. core/onebot dependencies key updated. ESLint override path adjusted for the moved oidb-services directory. Rename detection threshold: git log --find-renames=20% recommended when following history across this commit — content-replacement (@snowluma/bridge → @snowluma/protocol) dropped per-file similarity below git's default 50% on import-heavy files.
20 lines
713 B
TypeScript
20 lines
713 B
TypeScript
// Vitest config — drives both `pnpm bench` and `pnpm test`.
|
|
// Tests live under `tests/`, benchmarks under `bench/`.
|
|
import protobufVitePlugin from '@snowluma/proton/vite';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
// proton's vite plugin inlines `protobuf_encode<T>` / `protobuf_decode<T>`
|
|
// call sites at build time. Required for both tests and benchmarks
|
|
// to hit the production code path rather than proton's runtime
|
|
// fallback (which throws unless a runtime-map JSON is loaded).
|
|
plugins: [protobufVitePlugin()],
|
|
test: {
|
|
include: ['tests/**/*.test.ts'],
|
|
benchmark: {
|
|
include: ['bench/**/*.bench.ts'],
|
|
},
|
|
environment: 'node',
|
|
},
|
|
});
|