Changes as per Greptile feedback

This commit is contained in:
candieduniverse
2026-03-05 18:39:43 -08:00
parent 9f80d95037
commit 338a6bbb63
3 changed files with 6 additions and 8 deletions
+1 -5
View File
@@ -3,11 +3,7 @@
"ts"
],
"spec": [
"src/**/__tests__/*.ts",
"src/test/**/*.test.ts"
],
"ignore": [
"src/test/e2e/**/*.ts"
"src/**/__tests__/*.ts"
],
"require": [
"ts-node/register",
+2 -2
View File
@@ -241,7 +241,7 @@ function normalizeFieldLookupName(str) {
return str
}
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase())
return str.replace(/-([a-zA-Z])/g, (_, letter) => letter.toUpperCase())
}
/**
@@ -378,7 +378,7 @@ function replaceMessage(protoContent, messageName, newMessageContent) {
}
// Message doesn't exist, append before the first message or at end
console.warn(`Warning: ${messageName} message not found in proto file, appending`)
return protoContent + "\n\n" + newMessageContent
return `${protoContent}\n\n${newMessageContent}`
}
async function main() {
+3 -1
View File
@@ -6,7 +6,9 @@ import { fileURLToPath } from "node:url"
import { expect } from "chai"
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..")
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const repoRoot = path.resolve(__dirname, "../..")
describe("generate-state-proto script", () => {
it("preserves field numbers for map fields and hyphenated secret names", function () {