Migrate to hooks 2.0 to keep the pub up-to-date-dependencies points
The `hooks` dependency constraint is `^1.0.0`, which does not allow the stable `hooks: 2.0.0` (published mid-May 2026). pana flags this: we still get the full 40 "up-to-date dependencies" points now, but about 30 days after 2.0.0's release (around mid-June 2026) that category stops being awarded, dropping the pub score below 160.
Fix: widen the constraint to `^2.0.0` (or `>=1.0.0 <3.0.0` if 1.x still needs supporting). This is a major-version bump on the build-hook package, so it needs verification, not a blind bump:
- `hook/build.dart` and `buildModels` in `lib/build_hooks.dart` import `package:hooks/hooks.dart`. Confirm the 2.0 API still matches (the `build`/`buildModels` entry points and the `BuildInput`/`BuildOutput` types).
- Re-run a consumer build that converts `.glb` to `.model` (the example app's hook) to confirm the shader-bundle and model build hooks still run end to end.
Deadline: before the 30-day window closes (around mid-June 2026) to avoid the score regression.
0 条评论