1.5 KiB
1.5 KiB
name, description
| name | description |
|---|---|
| pkg-update | Update every external package of a project to its latest stable version using list-packages.sh and latest-version.sh, then run build and tests. Revert all changes on failure. Supports nodejs, python, and dotnet projects. Use for dependency refresh; not for adding or removing packages. |
pkg-update — batch-update packages
Steps
- Run
tools/list-packages.sh {project dir}to get every external package (ecosystem, name, current version). - Confirm the working tree is clean: stop and report when uncommitted changes exist, so the revert cannot destroy them.
- Update ecosystem by ecosystem. This step MUST run as a sub agent (one sub agent per ecosystem):
- For every package, run
tools/latest-version.sh {ecosystem} {name}to get the latest stable version. - Rewrite the version source file (package.json / requirements.txt / pyproject.toml / *.csproj).
- Re-resolve and install (
npm install/pip install -r/dotnet restore).
- For every package, run
- Run build and tests:
- nodejs:
npm run build(if present) plusnpm test(if present). - python:
pytest(when tests exist). - dotnet:
dotnet buildplusdotnet test. - When the commands cannot be inferred, ask the user per the
jsc-ask:askrules.
- nodejs:
- Build or tests fail → revert every change (
git checkout -- .and clean untracked lock changes), then report the failing packages with an error summary. - Success → report the update list (package, old version, new version) and hand off to
jsc-git:commit.