Skip to content

Commit 4555d0e

Browse files
committed
Merge branch 'main' into renderers-rust/use-granular-crates
2 parents 480026d + 289cf8e commit 4555d0e

File tree

257 files changed

+71952
-19650
lines changed

Some content is hidden

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

257 files changed

+71952
-19650
lines changed

.changeset/tasty-weeks-protect.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@codama/nodes-from-anchor": patch
3+
---
4+
5+
Recognize program addresses from seeds of kind set to `"account"` if the address of the account it points to is statically known. (See #607)

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
},
1111
"devDependencies": {
1212
"@changesets/changelog-github": "^0.5.1",
13-
"@changesets/cli": "^2.29.3",
13+
"@changesets/cli": "^2.29.5",
1414
"@codama/internals": "workspace:*",
15-
"@eslint/js": "^9.26.0",
15+
"@eslint/js": "^9.29.0",
1616
"@eslint/json": "^0.12.0",
1717
"@solana/eslint-config-solana": "^4.0.0",
1818
"@solana/prettier-config-solana": "0.0.5",
19-
"@types/node": "^22",
20-
"@typescript-eslint/eslint-plugin": "^8.32.0",
21-
"@typescript-eslint/parser": "^8.32.0",
19+
"@types/node": "^24",
20+
"@typescript-eslint/eslint-plugin": "^8.34.1",
21+
"@typescript-eslint/parser": "^8.34.1",
2222
"agadoo": "^3.0.0",
23-
"eslint": "^9.26.0",
23+
"eslint": "^9.29.0",
2424
"eslint-plugin-simple-import-sort": "^12.1.1",
2525
"eslint-plugin-sort-keys-fix": "^1.1.2",
2626
"eslint-plugin-typescript-sort-keys": "^3.3.0",
27-
"happy-dom": "^17.4.6",
27+
"happy-dom": "^18.0.1",
2828
"prettier": "^3.5.3",
2929
"rimraf": "6.0.1",
30-
"turbo": "^2.5.3",
31-
"tsup": "^8.4.0",
30+
"turbo": "^2.5.4",
31+
"tsup": "^8.5.0",
3232
"typescript": "^5.8.3",
33-
"vitest": "^3.1.3",
34-
"zx": "^8.5.3"
33+
"vitest": "^3.2.4",
34+
"zx": "^8.5.5"
3535
},
3636
"engines": {
3737
"node": ">=20.0.0"

packages/cli/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99

1010
This package provides a CLI for the Codama library that can be used to run scripts on Codama IDLs.
1111

12-
Note that, whilst the CLI code is located in the `@codama/cli` package, the CLI binary is directly provided by the main `codama` library.
13-
1412
## Getting started
1513

16-
To get started with Codama, simply install `codama` to your project and run the `init` command like so:
14+
To get started with Codama, simply install `@codama/cli` which provides the `codama` binary. Then, run the `init` command like so:
1715

1816
```sh
19-
pnpm install codama
20-
codama init
17+
pnpm install @codama/cli
18+
pnpm codama init
2119
```
2220

2321
You will be prompted for the path of your IDL and asked to select any script presets you would like to use.
@@ -27,9 +25,9 @@ You will be prompted for the path of your IDL and asked to select any script pre
2725
Once you have your codama config file, you can run your Codama scripts using the `codama run` command as follows:
2826

2927
```sh
30-
codama run # Only runs your before visitors.
31-
codama run js rust # Runs your before visitors followed by the `js` and `rust` scripts.
32-
codama run --all # Runs your before visitors followed by all your scripts.
28+
pnpm codama run # Only runs your before visitors.
29+
pnpm codama run js rust # Runs your before visitors followed by the `js` and `rust` scripts.
30+
pnpm codama run --all # Runs your before visitors followed by all your scripts.
3331
```
3432

3533
## The configuration file
File renamed without changes.

packages/cli/package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@codama/cli",
3-
"version": "1.0.12",
4-
"description": "The package that provides a CLI for the Codama standard",
3+
"version": "1.1.1",
4+
"description": "A CLI for setting up and managing Codama IDLs",
55
"exports": {
66
"types": "./dist/types/index.d.ts",
77
"node": {
@@ -13,8 +13,13 @@
1313
"module": "./dist/index.node.mjs",
1414
"types": "./dist/types/index.d.ts",
1515
"type": "commonjs",
16+
"bin": {
17+
"codama": "./bin/cli.cjs"
18+
},
1619
"files": [
20+
"./bin",
1721
"./dist/types",
22+
"./dist/cli.*",
1823
"./dist/index.*"
1924
],
2025
"sideEffects": false,
@@ -24,8 +29,9 @@
2429
"cli"
2530
],
2631
"scripts": {
27-
"build": "rimraf dist && pnpm build:src && pnpm build:types",
32+
"build": "rimraf dist && pnpm build:src && pnpm build:cli && pnpm build:types",
2833
"build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
34+
"build:cli": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs cli",
2935
"build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
3036
"dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
3137
"lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
@@ -45,7 +51,7 @@
4551
"@codama/renderers-rust": "workspace:*",
4652
"@codama/visitors": "workspace:*",
4753
"@codama/visitors-core": "workspace:*",
48-
"commander": "^13.1.0",
54+
"commander": "^14.0.0",
4955
"picocolors": "^1.1.1",
5056
"prompts": "^2.4.2"
5157
},

packages/library/src/cli/index.ts renamed to packages/cli/src/cli/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { createProgram, logDebug, logError } from '@codama/cli';
1+
import { createProgram } from '../program';
2+
import { logDebug, logError } from '../utils';
23

34
const program = createProgram();
45

packages/dynamic-codecs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codama/dynamic-codecs",
3-
"version": "1.1.14",
3+
"version": "1.1.15",
44
"description": "Get codecs on demand for Codama IDLs",
55
"exports": {
66
"types": "./dist/types/index.d.ts",
@@ -53,7 +53,7 @@
5353
"@codama/errors": "workspace:*",
5454
"@codama/nodes": "workspace:*",
5555
"@codama/visitors-core": "workspace:*",
56-
"@solana/codecs": "2.1.0"
56+
"@solana/codecs": "2.1.1"
5757
},
5858
"license": "MIT",
5959
"repository": {

packages/dynamic-parsers/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codama/dynamic-parsers",
3-
"version": "1.1.14",
3+
"version": "1.1.15",
44
"description": "Helpers to dynamically identify and parse accounts and instructions",
55
"exports": {
66
"types": "./dist/types/index.d.ts",
@@ -54,10 +54,10 @@
5454
"@codama/errors": "workspace:*",
5555
"@codama/nodes": "workspace:*",
5656
"@codama/visitors-core": "workspace:*",
57-
"@solana/instructions": "2.1.0"
57+
"@solana/instructions": "2.1.1"
5858
},
5959
"devDependencies": {
60-
"@solana/codecs": "2.1.0"
60+
"@solana/codecs": "2.1.1"
6161
},
6262
"license": "MIT",
6363
"repository": {

packages/errors/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @codama/errors
22

3+
## 1.3.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
- @codama/node-types@1.3.0
9+
310
## 1.2.13
411

512
### Patch Changes

packages/errors/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codama/errors",
3-
"version": "1.2.13",
3+
"version": "1.3.0",
44
"description": "Error management for Codama",
55
"exports": {
66
"types": "./dist/types/index.d.ts",
@@ -54,7 +54,7 @@
5454
},
5555
"dependencies": {
5656
"@codama/node-types": "workspace:*",
57-
"commander": "^13.1.0",
57+
"commander": "^14.0.0",
5858
"chalk": "^5.4.1"
5959
},
6060
"license": "MIT",

0 commit comments

Comments
 (0)