Skip to content

refactor: name functions by what they do - #31

Merged
maxholman[bot] merged 2 commits into
masterfrom
refactor/verb-names
Sep 27, 2026
Merged

maxholman[bot] merged 2 commits into
masterfrom
refactor/verb-names

Conversation

@maxholman

@maxholman maxholman Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Renames functions whose name ends in a preposition (Of, In, From) to a verb phrase that says what they do:

Before After
jsonBodyTypeOf resolveJsonBodyType
typesModuleSpecifierOf buildTypesModuleSpecifier
typeNameOf resolveTypeName
schemaNameOf extractSchemaName
chunkOf openChunk
separatorIn readStatementSeparator
chunksOf (map) chunksByFile
buildIn (test) buildIntoTempDir
warningsFrom (test) collectWarnings
urlFrom (test) readRequestedUrl

The change is only renames, and the generated output is identical. Stacked on #30.

@maxholman
maxholman Bot force-pushed the perf/batch-statements branch from 7c21f7d to c746e50 Compare September 27, 2026 12:28
A preposition suffix (`jsonBodyTypeOf`, `separatorIn`, `warningsFrom`)
names a relation rather than the work, so each becomes a verb phrase:
resolveJsonBodyType, buildTypesModuleSpecifier, resolveTypeName,
extractSchemaName, openChunk, readStatementSeparator, and in the tests
buildIntoTempDir, collectWarnings, readRequestedUrl. The chunk map becomes
chunksByFile.

Co-Authored-By: LLM <noreply@block65.dev>
@maxholman
maxholman Bot force-pushed the refactor/verb-names branch from f013b3c to ba58d5c Compare September 27, 2026 12:32
@maxholman
maxholman Bot changed the base branch from perf/batch-statements to master September 27, 2026 12:32
@maxholman maxholman Bot closed this Sep 27, 2026
@maxholman maxholman Bot reopened this Sep 27, 2026
The command holds its query and names its serializer, so the tests read
them directly instead of sending it through a client to a stubbed fetch.
sortQuery is rest-client's to test, so its test here is gone.

Co-Authored-By: LLM <noreply@maxholman.dev>
@maxholman
maxholman Bot merged commit 4747994 into master Sep 27, 2026
4 checks passed
@maxholman
maxholman Bot deleted the refactor/verb-names branch September 27, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants