Skip to content

Commit

Permalink
Fix typos (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored Jan 10, 2024
1 parent 87e4641 commit ff2f9db
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const profileMod = moderateProfile(profileView, getOpts())
// =

if (postMod.content.filter) {
// dont render in feeds or similar
// don't render in feeds or similar
// in contexts where this is disruptive (eg threads) you should ignore this and instead check blur
}
if (postMod.content.blur) {
Expand Down Expand Up @@ -315,7 +315,7 @@ import { BskyAgent } from '@atproto/api'

const agent = new BskyAgent({ service: 'https://example.com' })

// provide a custom fetch implementation (shouldnt be needed in node or the browser)
// provide a custom fetch implementation (shouldn't be needed in node or the browser)
import {
AtpAgentFetchHeaders,
AtpAgentFetchHandlerResponse,
Expand Down
6 changes: 3 additions & 3 deletions packages/api/docs/moderation.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import { moderatePost } from '@atproto/api'
const postMod = moderatePost(postView, getOpts())

if (postMod.content.filter) {
// dont render in feeds or similar
// don't render in feeds or similar
// in contexts where this is disruptive (eg threads) you should ignore this and instead check blur
}
if (postMod.content.blur) {
Expand Down Expand Up @@ -123,8 +123,8 @@ import { moderateProfile } from '@atproto/api'

const profileMod = moderateProfile(profileView, getOpts())

if (profileMod.acount.filter) {
// dont render in discovery
if (profileMod.account.filter) {
// don't render in discovery
}
if (profileMod.account.blur) {
// render the whole account behind a cover (use profileMod.account.cause to explain)
Expand Down
8 changes: 4 additions & 4 deletions packages/api/src/moderation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function moderateProfile(
account.blur = true
}

// dont give profile.filter because that is meaningless
// don't give profile.filter because that is meaningless
profile.filter = false

// downgrade based on authorship
Expand All @@ -67,7 +67,7 @@ export function moderateProfile(
downgradeDecision(profile, 'alert')
}

// derive avatar blurring from account & profile, but override for mutes because that shouldnt blur
// derive avatar blurring from account & profile, but override for mutes because that shouldn't blur
let avatarBlur = false
let avatarNoOverride = false
if ((account.blur || account.blurMedia) && account.cause?.type !== 'muted') {
Expand All @@ -78,7 +78,7 @@ export function moderateProfile(
avatarNoOverride = account.noOverride || profile.noOverride
}

// dont blur the account for blocking & muting
// don't blur the account for blocking & muting
if (
account.cause?.type === 'blocking' ||
account.cause?.type === 'blocked-by' ||
Expand Down Expand Up @@ -188,7 +188,7 @@ export function moderatePost(
// derive embed blurring from the quoted post and the quoted post author's account
const mergedQuote = takeHighestPriorityDecision(quote, quotedAccount)

// derive avatar blurring from account & profile, but override for mutes because that shouldnt blur
// derive avatar blurring from account & profile, but override for mutes because that shouldn't blur
let blurAvatar = false
if ((account.blur || account.blurMedia) && account.cause?.type !== 'muted') {
blurAvatar = true
Expand Down
2 changes: 1 addition & 1 deletion packages/api/tests/moderation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe('Moderation', () => {
})

/*
TODO enable when 3P labeler support is addded
TODO enable when 3P labeler support is added
it('Ignores labels from unknown labelers', () => {
const res1 = moderateProfile(
mock.profileViewBasic({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
.columns(['subjectDid', 'sortAt', 'cid'])
.execute()

// drop old indices that are superceded by these
// drop old indices that are superseded by these
await db.schema.dropIndex('like_creator_idx').execute()
await db.schema.dropIndex('follow_subjectdid_idx').execute()
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bsky/src/services/util/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const tidyNotifications = async (db: PrimaryDatabase, did: string) => {
// take most recent of read/unread cutoffs
const cutoffAt = greatest(readCutoffAt, unreadCutoffAt)
if (cutoffAt) {
// skip delete if it wont catch any notifications
// skip delete if it won't catch any notifications
const earliestAt = least(readStats?.earliestAt, unreadStats?.earliestAt)
if (earliestAt && earliestAt < cutoffAt.toISOString()) {
await db.db
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Going to remove pg-db_test-1

### `with-redis-and-test-db.sh`

This script is similar to `with-test-db.sh`, but in addition to an ephemeral/single-use postgres database it also provies a single-use redis instance. When the script starts, Dockerized postgres and redis containers start-up, and when the script completes the containers are removed.
This script is similar to `with-test-db.sh`, but in addition to an ephemeral/single-use postgres database it also provides a single-use redis instance. When the script starts, Dockerized postgres and redis containers start-up, and when the script completes the containers are removed.

The environment variables `DB_POSTGRES_URL` and `REDIS_HOST` will be set with a connection strings that can be used to connect to postgres and redis respectively.

Expand Down
2 changes: 1 addition & 1 deletion packages/lexicon/src/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class Lexicons {
} else if (def.type === 'object') {
return ComplexValidators.object(this, 'Object', def, value)
} else {
// shouldnt happen
// shouldn't happen
throw new InvalidLexiconError('Definition must be a record or object')
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/syntax/src/datetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export const isValidDatetime = (dtStr: string): boolean => {
return true
}

/* Takes a flexible datetime sting and normalizes representation.
/* Takes a flexible datetime string and normalizes representation.
*
* This function will work with any valid atproto datetime (eg, anything which isValidDatetime() is true for). It *additinally* is more flexible about accepting datetimes that don't comply to RFC 3339, or are missing timezone information, and normalizing them to a valid datetime.
* This function will work with any valid atproto datetime (eg, anything which isValidDatetime() is true for). It *additionally* is more flexible about accepting datetimes that don't comply to RFC 3339, or are missing timezone information, and normalizing them to a valid datetime.
*
* One use-case is a consistent, sortable string. Another is to work with older invalid createdAt datetimes.
*
Expand Down

0 comments on commit ff2f9db

Please sign in to comment.