Skip to content

Commit 9013c8b

Browse files
authored
Merge pull request #86 from macalinao/igm/package-bumps-9871987
Update all dependencies to latest
2 parents 5cbd2ae + a3a402f commit 9013c8b

File tree

144 files changed

+1192
-694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1192
-694
lines changed

.changeset/chilly-eyes-share.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"@macalinao/codama-instruction-accounts-dedupe-visitor": patch
3+
"@macalinao/codama-nodes-from-anchor-x": patch
4+
"@macalinao/codama-renderers-markdown": patch
5+
"@macalinao/codama-renderers-js-esm": patch
6+
"@macalinao/codama-rename-visitor": patch
7+
"@macalinao/clients-voter-stake-registry": patch
8+
"@macalinao/clients-meteora-damm-v2": patch
9+
"@macalinao/clients-orca-whirlpools": patch
10+
"@macalinao/clients-kamino-lending": patch
11+
"@macalinao/clients-spl-governance": patch
12+
"@macalinao/clients-spl-stake-pool": patch
13+
"@macalinao/clients-token-metadata": patch
14+
"@macalinao/coda-visitors": patch
15+
"@macalinao/create-coda": patch
16+
"@macalinao/clients-tribeca": patch
17+
"@macalinao/clients-quarry": patch
18+
"@macalinao/coda": patch
19+
"coda-docs": patch
20+
---
21+
22+
Regenerate all clients

.changeset/strong-wasps-travel.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@macalinao/codama-renderers-markdown": patch
3+
"@macalinao/codama-renderers-js-esm": patch
4+
"@macalinao/coda-visitors": patch
5+
"@macalinao/create-coda": patch
6+
"@macalinao/coda": patch
7+
"coda-docs": patch
8+
---
9+
10+
Update all dependencies

CLAUDE.md

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
Coda is an automated client generation tool for Solana programs. Built on top of [Codama](https://github.com/codama-idl/codama), Coda provides a CLI that transforms Anchor IDLs into modern TypeScript clients with full type safety and ES modules support.
88

99
The monorepo contains:
10+
1011
- **Coda CLI** - The main tool for generating TypeScript clients from Anchor IDLs
1112
- **Codama utilities** - Custom visitors and renderers for enhanced code generation
1213
- **Generated clients** - Pre-built clients for popular Solana programs
@@ -71,27 +72,31 @@ coda/
7172
## Core Packages
7273

7374
### 1. **@macalinao/coda** - CLI for client generation
74-
- Works out of the box (looks for `./idls/*.json` by default)
75-
- Configurable via `coda.config.mjs`
76-
- Generates TypeScript clients with full type safety
77-
- Built on Codama for extensibility
78-
- Supports glob patterns for IDL discovery
75+
76+
- Works out of the box (looks for `./idls/*.json` by default)
77+
- Configurable via `coda.config.mjs`
78+
- Generates TypeScript clients with full type safety
79+
- Built on Codama for extensibility
80+
- Supports glob patterns for IDL discovery
7981

8082
### 2. **@macalinao/codama-instruction-accounts-dedupe-visitor**
81-
- Flattens nested account structures from Anchor IDL
82-
- Preserves relationships through naming conventions
83-
- Updates PDA seeds when accounts are flattened
83+
84+
- Flattens nested account structures from Anchor IDL
85+
- Preserves relationships through naming conventions
86+
- Updates PDA seeds when accounts are flattened
8487

8588
### 3. **@macalinao/codama-renderers-js-esm**
86-
- ESM-native TypeScript renderer for Codama
87-
- Adds `.js` extensions to all imports
88-
- Removes Node.js-specific environment checks
89-
- Ensures compatibility with `"type": "module"`
89+
90+
- ESM-native TypeScript renderer for Codama
91+
- Adds `.js` extensions to all imports
92+
- Removes Node.js-specific environment checks
93+
- Ensures compatibility with `"type": "module"`
9094

9195
### 4. **@macalinao/clients-token-metadata**
92-
- Pre-generated client for Metaplex Token Metadata program
93-
- Includes custom PDAs and type definitions
94-
- Ready-to-use TypeScript client
96+
97+
- Pre-generated client for Metaplex Token Metadata program
98+
- Includes custom PDAs and type definitions
99+
- Ready-to-use TypeScript client
95100

96101
## How Coda Works
97102

@@ -104,12 +109,15 @@ coda/
104109
## Configuration (coda.config.mjs)
105110

106111
### Default Configuration
112+
107113
Coda automatically discovers IDLs without any configuration:
114+
108115
- Looks for `./idls/*.json` by default
109116
- Place your IDL files in the `idls/` directory
110117
- No config file needed for basic usage!
111118

112119
### Single IDL Configuration
120+
113121
For projects with a single program (like [token-metadata](https://github.com/macalinao/coda/tree/master/clients/token-metadata)):
114122

115123
```javascript
@@ -120,17 +128,18 @@ export default defineConfig({
120128
// Optional: Custom path for single IDL
121129
idlPath: "./idls/my_program.json",
122130
outputDir: "./src/generated",
123-
131+
124132
// Optional: Codama visitors for customization
125133
visitors: [
126134
addPdasVisitor({
127135
// Add custom PDAs
128-
})
129-
]
136+
}),
137+
],
130138
});
131139
```
132140

133141
### Multiple IDL Configuration with Glob Pattern
142+
134143
For projects with multiple programs (like [quarry](https://github.com/macalinao/coda/tree/master/clients/quarry)):
135144

136145
```javascript
@@ -140,15 +149,16 @@ export default defineConfig({
140149
// Use glob pattern to match all IDLs
141150
idlPath: "./idls/*.json",
142151
outputDir: "./src/generated",
143-
152+
144153
// Optional: Add PDAs and other visitors for each program
145154
visitors: [
146155
// Custom visitors for each program
147-
]
156+
],
148157
});
149158
```
150159

151160
### Multiple IDL Configuration with Array
161+
152162
You can also explicitly list IDL files:
153163

154164
```javascript
@@ -166,6 +176,7 @@ export default defineConfig({
166176
```
167177

168178
### Advanced Glob Patterns
179+
169180
Use specific patterns to match only certain IDLs:
170181

171182
```javascript
@@ -183,6 +194,7 @@ export default defineConfig({
183194
## Code Style Guidelines
184195

185196
### TypeScript
197+
186198
- Use specific types, avoid `any`
187199
- Prefer interfaces over type aliases for objects
188200
- Use `import type` for type-only imports (enforced by Biome)
@@ -192,11 +204,14 @@ export default defineConfig({
192204
- **File naming**: Use kebab-case for all TypeScript files (e.g., `root-node-from-anchor.ts`, `create-codama-from-idls.ts`)
193205

194206
### After Making Code Changes
207+
195208
**Always run these commands to ensure code quality:**
209+
196210
1. `bun run build` - Check for TypeScript errors
197211
2. `bun run lint:fix` - Fix linting and formatting issues
198212

199213
### Biome/ESLint Configuration
214+
200215
- No floating promises (must be handled)
201216
- Use const assertions where applicable
202217
- No non-null assertions are allowed
@@ -207,6 +222,7 @@ export default defineConfig({
207222
## Turborepo Configuration
208223

209224
Tasks are defined in turbo.json:
225+
210226
- `build`: Depends on upstream builds, outputs to `./dist/**`
211227
- `lint`: Depends on upstream builds
212228
- `test`: Depends on build, no caching
@@ -222,6 +238,7 @@ Tasks are defined in turbo.json:
222238
5. **Build**: Run `bun run build`
223239

224240
Example package.json for a client:
241+
225242
```json
226243
{
227244
"name": "@macalinao/clients-[program-name]",
@@ -236,6 +253,7 @@ Example package.json for a client:
236253
## CI/CD
237254

238255
GitHub Actions workflow runs on push/PR to main:
256+
239257
- Installs dependencies with frozen lockfile
240258
- Builds all packages
241259
- Runs linting (biome + eslint)
@@ -252,6 +270,7 @@ GitHub Actions workflow runs on push/PR to main:
252270
## Package Structure Guidelines
253271

254272
When creating new packages:
273+
255274
- Use TypeScript directly with `tsc` for building (no tsup/rollup/etc)
256275
- Follow the same structure as existing packages
257276
- Scripts should be: `build`, `clean`, `lint`, `test`, `codegen` (if applicable)
@@ -261,21 +280,23 @@ When creating new packages:
261280
## Working with Generated Code
262281

263282
Generated clients provide:
283+
264284
- **Instructions**: Typed builders for all program instructions
265285
- **Accounts**: Decoders and fetchers for all account types
266286
- **Types**: All TypeScript types from the IDL
267287
- **PDAs**: Helper functions for program-derived addresses
268288
- **Errors**: Typed error enums and handlers
269289

270290
Example usage:
291+
271292
```typescript
272293
import { createTransferInstruction } from "./generated";
273294

274295
const instruction = createTransferInstruction({
275296
source: sourceAddress,
276297
destination: destAddress,
277298
authority: authorityAddress,
278-
amount: 1000n
299+
amount: 1000n,
279300
});
280301
```
281302

@@ -285,7 +306,7 @@ const instruction = createTransferInstruction({
285306

286307
When writing documentation for Coda or generated clients:
287308

288-
1. **Command Examples**:
309+
1. **Command Examples**:
289310
- Always show direct command usage: `coda generate`, not `bunx coda generate` or `npx coda`
290311
- Assume users have installed the package globally or are using it directly
291312
- Show the simplest path to success
@@ -318,6 +339,7 @@ When writing documentation for Coda or generated clients:
318339
The `apps/docs/` folder contains the documentation site built with Fumadocs and Next.js 15. The structure follows the Fumadocs reference implementation in `vendor/fumadocs/apps/docs/`.
319340

320341
### Tech Stack
342+
321343
- **Framework**: Next.js 15 with App Router
322344
- **Documentation**: Fumadocs UI
323345
- **Styling**: Tailwind CSS v4 (no config file needed, uses @source directives)
@@ -326,26 +348,30 @@ The `apps/docs/` folder contains the documentation site built with Fumadocs and
326348
- **Linting**: Modern ESLint flat config (eslint.config.mjs)
327349

328350
### Development
351+
329352
```bash
330353
cd apps/docs
331354
bun run dev # Start dev server on localhost:3000
332355
bun run build # Build for production
333356
```
334357

335358
### Adding Documentation
359+
336360
1. Create MDX files in `apps/docs/content/docs/`
337361
2. Update navigation in `meta.json` files if needed
338362
3. Code blocks automatically get syntax highlighting
339363
4. Use frontmatter for page metadata (title, description)
340364
5. **Important**: Do NOT include `# Title` headers in MDX files - the title is already specified in the YAML frontmatter and will be rendered automatically
341365

342366
### Key Files
367+
343368
- `src/app/layout.config.tsx` - Site branding and navigation
344369
- `source.config.ts` - MDX and syntax highlighting config
345370
- `src/app/global.css` - Tailwind v4 imports with @source directives
346371
- `content/docs/` - Documentation content in MDX
347372

348373
### MDX Writing Guidelines
374+
349375
- **No redundant headers**: Since the title is specified in YAML frontmatter, do NOT add `# Title` as the first line of content
350376
- Start documentation content directly with the introduction paragraph or first section (`##`)
351377
- The title from frontmatter will be automatically rendered by Fumadocs
@@ -370,4 +396,4 @@ node -e "import('./coda.config.mjs').then(c => console.log(c.default))"
370396

371397
# Clean and rebuild
372398
bun run clean && bun run codegen && bun run build
373-
```
399+
```

apps/docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ For better documentation layout, use the `<Cards>` component for link grids:
5555

5656
```mdx
5757
<Cards>
58-
<Card
59-
title="Installation"
58+
<Card
59+
title="Installation"
6060
description="Step-by-step guide to install Coda"
6161
href="/docs/installation"
6262
/>
63-
<Card
64-
title="Quick Start"
63+
<Card
64+
title="Quick Start"
6565
description="Generate your first TypeScript client"
6666
href="/docs/quick-start"
6767
/>

apps/docs/biome.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.2/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
33
"root": false,
44
"extends": ["@macalinao/biome-config/base"],
55
"linter": {

0 commit comments

Comments
 (0)