fix: chore: create formula label in Codeberg + add more formula templates (#22)
- Add formulas/upgrade-dependency.toml: multi-ecosystem (npm/cargo/forge) dependency upgrade with steps for checking changelog, upgrading, applying breaking changes, and running tests - Add formulas/add-rpc-method.toml: JSON-RPC method addition with steps for reading existing patterns, implementing handler, registering, writing tests, and running tests - Document `formula` label in BOOTSTRAP.md optional labels table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
66e6095468
commit
d16dc6175d
3 changed files with 171 additions and 0 deletions
78
formulas/upgrade-dependency.toml
Normal file
78
formulas/upgrade-dependency.toml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# formulas/upgrade-dependency.toml — Upgrade a package dependency
|
||||
|
||||
name = "upgrade-dependency"
|
||||
description = "Upgrade {{package}} from {{from_version}} to {{to_version}}"
|
||||
version = 1
|
||||
|
||||
[vars.package]
|
||||
description = "Package name to upgrade (e.g. viem, serde, forge-std)"
|
||||
required = true
|
||||
|
||||
[vars.ecosystem]
|
||||
description = "Package ecosystem: npm, cargo, or forge"
|
||||
required = true
|
||||
|
||||
[vars.from_version]
|
||||
description = "Current version (e.g. 1.2.3) — used for changelog lookup"
|
||||
required = false
|
||||
default = "current"
|
||||
|
||||
[vars.to_version]
|
||||
description = "Target version (e.g. 2.0.0) — leave blank for latest"
|
||||
required = false
|
||||
default = "latest"
|
||||
|
||||
[[steps]]
|
||||
id = "check-current"
|
||||
title = "Check current {{package}} version and changelog"
|
||||
description = """
|
||||
Identify the installed version of {{package}} in the lockfile or manifest.
|
||||
Look up the changelog or release notes between {{from_version}} and {{to_version}}.
|
||||
Note any breaking changes, deprecations, or migration steps required.
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "upgrade"
|
||||
title = "Run upgrade for {{ecosystem}}"
|
||||
description = """
|
||||
Run the appropriate upgrade command for ecosystem={{ecosystem}}:
|
||||
|
||||
- npm: npm install {{package}}@{{to_version}} (or @latest)
|
||||
Then: npm install (to sync lockfile)
|
||||
- cargo: cargo update -p {{package}} [--precise {{to_version}}]
|
||||
Or bump version in Cargo.toml, then: cargo build
|
||||
- forge: Update version in foundry.toml or gitmodules, then:
|
||||
forge install {{package}} (or forge update {{package}})
|
||||
|
||||
Confirm the lockfile / manifest now reflects {{to_version}}.
|
||||
"""
|
||||
needs = ["check-current"]
|
||||
|
||||
[[steps]]
|
||||
id = "fix-breaking-changes"
|
||||
title = "Apply migration steps for breaking changes"
|
||||
description = """
|
||||
Based on the changelog reviewed in check-current, apply any required changes:
|
||||
- Rename renamed APIs or types
|
||||
- Update import paths if they moved
|
||||
- Adjust call sites for signature changes
|
||||
- Remove usage of deprecated symbols
|
||||
|
||||
If no breaking changes were noted, verify a quick build still passes.
|
||||
"""
|
||||
needs = ["upgrade"]
|
||||
|
||||
[[steps]]
|
||||
id = "run-tests"
|
||||
title = "Run tests and verify"
|
||||
description = """
|
||||
Run the full test suite appropriate for ecosystem={{ecosystem}}:
|
||||
|
||||
- npm: npm test (or the project's test script)
|
||||
- cargo: cargo test
|
||||
- forge: forge test
|
||||
|
||||
Confirm all tests pass. Fix any compilation errors or test failures introduced
|
||||
by the upgrade before declaring this done.
|
||||
"""
|
||||
needs = ["fix-breaking-changes"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue