feat: migrate @dfinity/* imports to @icp-sdk/core#368
Draft
andreacerulli wants to merge 4 commits intomainfrom
Draft
feat: migrate @dfinity/* imports to @icp-sdk/core#368andreacerulli wants to merge 4 commits intomainfrom
andreacerulli wants to merge 4 commits intomainfrom
Conversation
Migrate all frontend code from deprecated @dfinity/{agent,principal,candid,identity}
to @icp-sdk/core/{agent,principal,candid,identity} and @dfinity/auth-client to
@icp-sdk/auth/client.
- Main library (frontend/ic_vetkeys): update deps and all source imports
- All 7 example frontends: update deps, source imports, and Svelte components
- Point example @dfinity/vetkeys deps to local build (file:../../../frontend/ic_vetkeys)
- Fix encrypted_notes tsconfig for moduleResolution: bundler compatibility
- Update prepare script to skip rebuild when dist/ exists
When examples install @dfinity/vetkeys via file: reference, npm triggers the prepare script. On CI (fresh checkout), devDependencies like vite aren't available yet, causing exit code 127. Skip the build gracefully when vite is not found, with a helpful message.
The file: reference to the local @dfinity/vetkeys library requires the workspace to be installed first (so the library gets built via its prepare script). Add actions/setup-node and npm install steps to all example CI jobs before the deploy step.
dfx generate produces declarations with @dfinity/agent imports, which conflict with the migrated @icp-sdk/core source imports. Add a sed post-processing step to each gen_bindings.sh that rewrites the imports after generation. This is a temporary bridge until PR3 replaces dfx generate with @icp-sdk/bindgen entirely.
391d828 to
6260525
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate all frontend code from deprecated @dfinity/{agent,principal,candid,identity} to @icp-sdk/core/{agent,principal,candid,identity} and @dfinity/auth-client to @icp-sdk/auth/client.