Conversation
|
fixing the conflicts now |
817f39d to
20e8307
Compare
3e94dc9 to
f1636f7
Compare
- Add codegen error codes - Use namespaces for test defaults - Use helpers to convert to and from BN - Fixed versions for Solana and Anchor CLI - Add constants, e.g., ZERO - Move shared TypeScript logic to "lib" directory - Setup husky and lint-staged - Switch to BUSL license - Migrate from mocha to vitest - Use only bn.js for big numbers - Format files with biome - Major refactoring improvements
ci: skip build and tests if cache is identical ci: suppress annoying anchor build logs
|
@PaulRBerg in order to move faster with the review process, i'll leave questions sequentially i hope it works for you |
andreivladbrg
left a comment
There was a problem hiding this comment.
left a few more comments
btw, as always, you're very good with structural changes 🫡 - it's much better organized (i suppose the SDK work made you a pro at TS 😆)
andreivladbrg
left a comment
There was a problem hiding this comment.
just had a look at the new .test files
they seem to be the same tests, just refactored to the context pattern + vitest - the removal of try/catch makes the code considerably more readable
gj again👌
|
Thanks @andreivladbrg for your feedback - glad you like the new structure! |
style: indenting for even-better-toml
|
nice one with d076eb2, @andreivladbrg! |
refactor: dry codegen script utils
|
Alright, we now also have auto-generated struct types. Can you plz review @andreivladbrg @IaroslavMazur? |
andreivladbrg
left a comment
There was a problem hiding this comment.
left few more comments on the new codegen scripts
IaroslavMazur
left a comment
There was a problem hiding this comment.
Great stuff, @PaulRBerg! 👏 Appreciate the numerous optimisations and simplifications! 💪
Pushed some small changes in 2492604 - and leaving the rest of my feedback below.
| import { PublicKey } from "@solana/web3.js"; | ||
| import { type PublicKey } from "@solana/web3.js"; | ||
| import type BN from "bn.js"; | ||
| import keccak256 from "keccak256"; |
There was a problem hiding this comment.
Getting the following TS warning for keccak256, as well as BN:
Module '"/Users/iaros/Desktop/Projects/solsab/node_modules/keccak256/dist/keccak256"' can only be default-imported using the 'esModuleInterop' flagts(1259)
keccak256.d.ts(5, 1): This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
We used to have "esModuleInterop": true in tsconfig.json, but it has been removed in this PR.
There was a problem hiding this comment.
We're still using esModuleInterop because we're extending the shared TSConfig from the devkit.
I don't know why you get that warning. Do you get it in VSCode? If yes, can you confirm you are using the node_modules-installed TypeScript?
Otherwise, can you confirm you are using Node.js v23 or later?
There was a problem hiding this comment.
Do you get it in VSCode?
Yes.
If yes, can you confirm you are using the node_modules-installed TypeScript?
Nope, it appears that I'm running a "global" TypeScript, as which tsc returns /Users/iaros/.nvm/versions/node/v23.8.0/bin/tsc.
This is weird, because SolSab's package.json contains "typescript": "5.8.3" inside devDependencies{} 🤔
refactor: remove unused types refactor: import types from anchor package test: rename params in assertion helpers
andreivladbrg
left a comment
There was a problem hiding this comment.
looks good to me, just one small comment
Co-authored-by: Iaroslav Mazur <iaroslav.mazur@proton.me>
PR
My feedback for the TypeScript part of the repo. Rust will follow suit.
Issues Closed