@icp-sdk/core-migrate
v1.0.2
Published
CLI tool to migrate from agent-js to @icp-sdk/core
Downloads
14
Readme
@icp-sdk/core-migrate
CLI tool to automatically migrate your project from agent-js packages to @icp-sdk/core.
What it does
This tool automatically performs the migration steps described in the upgrading guide:
- Removes old dependencies: Automatically removes the following
agent-jspackages from your project:@dfinity/agent@dfinity/candid@dfinity/identity@dfinity/identity-secp256k1@dfinity/principal
- Adds new dependency: Installs
@icp-sdk/corepackage - Updates imports: Finds and replaces all import statements in your source code to use the new
@icp-sdk/corepackage.Note: this tool only replaces the
@dfinity/*imports. If you are using@dfinity/*packages somewhere else in your code, e.g. in tests mocks, you will need to find and replace the occurrences manually.
Supported package managers
- npm
- yarn
- pnpm
Usage
Run the migration tool in your project directory.
With npm:
npx @icp-sdk/core-migrate@latestWith pnpm:
pnpm dlx @icp-sdk/core-migrate@latestFor more options, run npx @icp-sdk/core-migrate@latest --help.
