docs(releaser): release v1.5.1 — documentation site, fuzzing completeness
ci / vet, staticcheck, test, build (push) Failing after 3m50s
ci / vet, staticcheck, test, build (push) Failing after 3m50s
- Add Hugo + Geekdoc documentation site (docs/): installation, CLI reference, configuration, CI integration, and changelog pages; explicit menu bundle nav so all pages appear in the sidebar on every page - Add Gitea CI workflow (.gitea/workflows/docs.yml): builds on push to main when docs/** changes, deploys minified site to gh-pages branch - Add docs:setup / docs:serve / docs:build Taskfile tasks; theme bundle downloaded at build time (not committed) - Add FuzzUpdate to internal/changelog and FuzzWriteVersion to internal/node to complete fuzz coverage for all file-rewriting packages - Add fuzzing completeness guidelines to CLAUDE.md: authoritative table, exempt-package rationale, seed corpus rules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,21 @@ func TestWriteVersionNotFound(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// FuzzWriteVersion verifies WriteVersion never panics on arbitrary content or version strings.
|
||||
func FuzzWriteVersion(f *testing.F) {
|
||||
f.Add(simplePackage, "1.2.3", "1.2.4")
|
||||
f.Add(`{"version":"0.0.1"}`, "0.0.1", "0.0.2")
|
||||
f.Add(`{}`, "1.0.0", "1.0.1")
|
||||
f.Add("", "1.0.0", "1.0.1")
|
||||
f.Add(`{"name":"app","version":"1.0.0","version":"dup"}`, "1.0.0", "1.0.1")
|
||||
|
||||
f.Fuzz(func(t *testing.T, content, oldVersion, newVersion string) {
|
||||
path := filepath.Join(t.TempDir(), "package.json")
|
||||
os.WriteFile(path, []byte(content), 0644) //nolint:errcheck
|
||||
WriteVersion(path, oldVersion, newVersion) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
||||
// FuzzReadVersion verifies ReadVersion never panics on arbitrary content.
|
||||
func FuzzReadVersion(f *testing.F) {
|
||||
f.Add(simplePackage)
|
||||
|
||||
Reference in New Issue
Block a user