Procházet zdrojové kódy

fix(headless): waive the deferred Session history read

Master's `deprecate-synchronous-session-event-reads` marks `Session.eventAt`
deprecated and rejects new production calls. `liveEvents` predates that decision
and still needs the ordered log to reconstruct the preset a session runs under,
so carry the repository's standard line-scoped waiver for deferred migration.
lsdsjy před 2 týdny
rodič
revize
71b2cc80aa
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      packages/bundle/headless/src/index.ts

+ 1 - 0
packages/bundle/headless/src/index.ts

@@ -174,6 +174,7 @@ interface AdoptableHeader {
 function* liveEvents(session: Session): Generator<SessionEvent> {
 function* liveEvents(session: Session): Generator<SessionEvent> {
   const length = session.seq
   const length = session.seq
   for (let seq = 0; seq < length; seq++) {
   for (let seq = 0; seq < length; seq++) {
+    // oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
     const event = session.eventAt(SessionSeq(seq))
     const event = session.eventAt(SessionSeq(seq))
     if (event === undefined) {
     if (event === undefined) {
       throw new Error(`headless adoption cannot read seq ${String(seq)} below captured length ${String(length)}`)
       throw new Error(`headless adoption cannot read seq ${String(seq)} below captured length ${String(length)}`)