finish phase 4: drop @atproto/api dependency, lex-only errors, delete toLex and legacy validators

oxlint-suppressions.json gains a baseline entry for webpack.config.js: the
file was never previously staged/linted (lint script covers src+modules
only), and editing it exposed its pre-existing violations to lint-staged.
All suppressed counts are pre-existing; this change only removes a line.
This commit is contained in:
Samuel Newman
2026-07-17 13:28:29 +03:00
parent ca5b8b6346
commit 8ee62d67bd
20 changed files with 80 additions and 265 deletions
+2 -2
View File
@@ -66,8 +66,8 @@ function toSystemMessageView(
* The guard disjunction is kept inline in the `if` (rather than a separate
* boolean) so TS narrows `ev` to the union of system-message log types, all
* of which carry a `message: SystemMessageView`. The generated lexicon types
* are stricter than the old `@atproto/api` ones (no `[k: string]: unknown`
* index signature), so a separate boolean would not narrow the access.
* are strict (no `[k: string]: unknown` index signature), so a separate
* boolean would not narrow the access.
*/
if (
bsky.isType(chat.bsky.convo.defs.logAddMember, ev) ||
+2 -2
View File
@@ -205,7 +205,7 @@ export function useFeedPreviews(
if (item.isFallbackMarker) continue
const moderations = item.items.map(item =>
// @atproto/api and yields lex-typed slice items.
// the tuner yields lex-typed slice items.
moderatePost(item.post, moderationOpts!),
)
@@ -232,7 +232,7 @@ export function useFeedPreviews(
const feedPostSliceItem: FeedPostSliceItem = {
_reactKey: `${item._reactKey}-${i}-${subItem.post.uri}`,
uri: subItem.post.uri,
// off @atproto/api and yields lex-typed slice items.
// the tuner yields lex-typed slice items.
post: subItem.post,
record: subItem.record,
moderation: moderations[i],
+2 -2
View File
@@ -288,7 +288,7 @@ export function usePostFeedQuery(
.map(slice => {
const moderations = slice.items.map(item =>
moderatePost(
// off @atproto/api and yields lex-typed slice items.
// the tuner yields lex-typed slice items.
item.post,
moderationOpts!,
),
@@ -341,7 +341,7 @@ export function usePostFeedQuery(
const feedPostSliceItem: FeedPostSliceItem = {
_reactKey: `${slice._reactKey}-${i}-${item.post.uri}`,
uri: item.post.uri,
// off @atproto/api and yields lex-typed slice items.
// the tuner yields lex-typed slice items.
post: item.post,
record: item.record,
moderation: moderations[i],
+2 -2
View File
@@ -289,8 +289,8 @@ export function buildSearchPostsV2Filters(
}
/**
* Consistent with timestamp parsing in @atproto/api. Only the date is used; the
* time is appended here since the lexicon expects a datetime value.
* Consistent with atproto timestamp parsing. Only the date is used; the time
* is appended here since the lexicon expects a datetime value.
*/
const parseTimestamp = (value: string | undefined): string | undefined => {
if (!value) return undefined