Skip to content

init template: support package manager selection and update templates to @xahau - #51

Merged
tequdev merged 4 commits into
mainfrom
update-template
Aug 6, 2026
Merged

init template: support package manager selection and update templates to @xahau#51
tequdev merged 4 commits into
mainfrom
update-template

Conversation

@tequdev

@tequdev tequdev commented Aug 6, 2026

Copy link
Copy Markdown
Member

High Level Overview of Change

The hooks-cli init project templates were still on the old @transia/* packages. This updates them to @xahau/hooks-toolkit (2.1.0) / xahau, and adds the ability to choose a package manager for the generated project.

Context of Change

  • Updated init templates to the @xahau packages
    • Replaced @transia/xrpl -> xahau and @transia/hooks-toolkit -> @xahau/hooks-toolkit, and followed the API changes (setHooksV3 -> setHooks, seed -> wallet, SetHookFlags -> HookFlags, etc.)
    • Pinned @xahau/hooks-toolkit to ^2.1.0
  • Added a --package-manager option to init
    • Choose from npm / yarn / pnpm (defaults to npm)
    • Rewrites npm calls in the generated package.json's scripts to the selected package manager
    • Exits with an error on an invalid value
  • Expanded CI and tests
    • Bumped node-version from 16.x, 20.x to 20.x, 22.x, 24.x, 26.x, and added pnpm setup
    • Added an integration test (test/integration/init-build.test.ts) that actually runs install / build for each package manager after init
    • Added unit tests for the deploy script rewrite when --package-manager is specified, and for rejecting invalid values
  • Updated README
    • Documented init usage and the new --package-manager option

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Before / After

Test Plan

@tequdev
tequdev merged commit be2feb8 into main Aug 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant