Open
Conversation
5b8a82e to
a830565
Compare
Author
|
/bot review |
|
Bot Agent progress:
Progress:
|
There was a problem hiding this comment.
Verdict
Comment
Summary
Posted 1 validated inline finding(s) after final filtering.
Findings
- [P2]
package.json:7bun run lintfails in CI (5 files have Prettier issues). Runbun run lint:fixand commit the formatting changes, or this PR's lint check will stay red.
Potential concerns (lower confidence)
- [P1]
package.json:2Setting"type": "module"at the package root whiletsconfig.jsonstill compiles to"module": "commonjs"is inconsistent and likely to breakts-mocha(which uses ts-node under the hood). Undertype: module, Node/bun treat.jsemitted files as ESM but the TS compiler will emit CJSrequire(...)calls, causing runtime errors likerequire is not definedor ESM/CJS interop failures when tests import CJS-only deps (e.g.@solana/spl-token,bn.js). Either (a) remove"type": "module", or (b) switchtsconfig.jsonto an ESM module target ("module": "NodeNext"/"ESNext"with"moduleResolution": "NodeNext") and update imports accordingly. Please confirmbun run testactually runs the test suite end-to-end on a clean checkout.
Repo checks
Repo Checks
-
LLM checks planner: added package install step before running JS commands.
-
cargo fetch --locked: ok
-
bun install --frozen-lockfile: ok
bun install v1.3.2 (b131639c)
+ @types/bn.js@5.2.0
+ @types/chai@4.3.20
+ @types/mocha@9.1.1
+ chai@4.5.0
+ mocha@9.2.2
+ prettier@2.8.8
+ ts-mocha@10.1.0
+ typescript@5.9.3
+ @anchor-lang/core@1.0.1
+ @solana/spl-token@0.4.14
+ @solana/web3.js@1.98.4
+ decimal.js@10.6.0
+ litesvm@0.1.0
190 packages installed [36.39s]
- cargo check --workspace: ok
vent_cpi]
| ^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
= note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
--> programs/dynamic-fee-sharing/src/instructions/ix_fund_fee.rs:9:1
|
9 | #[event_cpi]
| ^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
--> programs/dynamic-fee-sharing/src/instructions/ix_claim_fee.rs:9:1
|
9 | #[event_cpi]
| ^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
--> programs/dynamic-fee-sharing/src/instructions/ix_initialize_fee_vault_pda.rs:12:1
|
12 | #[event_cpi]
| ^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
--> programs/dynamic-fee-sharing/src/instructions/ix_fund_by_claiming_fee.rs:9:1
|
9 | #[event_cpi]
| ^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: `dynamic-fee-sharing` (lib) generated 5 warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.12s
- bun run lint: failed
Checking formatting...
$ prettier */*.js "*/**/*{.js,.ts}" --check
[warn] tests/claim_damm_v2.test.ts
[warn] tests/claim_dbc_creator_trading_fee.test.ts
[warn] tests/common/damm_v2.ts
[warn] tests/common/dfs.ts
[warn] tests/common/svm.ts
[warn] Code style issues found in 5 files. Forgot to run Prettier?
error: script "lint" exited with code 1
| "scripts": { | ||
| "build": "anchor build --ignore-keys", | ||
| "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", | ||
| "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", |
There was a problem hiding this comment.
P2 bun run lint fails in CI (5 files have Prettier issues). Run bun run lint:fix and commit the formatting changes, or this PR's lint check will stay red.
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.
Changes
bunas package manager + runtime for test instead of combined package manager such aspnpm+yarn.bunis more memory efficientTODO
anchor idl inithttps://github.com/solana-foundation/anchor/blob/7b108db7987afedd1e72edd783d7fc00416e213f/docs/content/docs/updates/release-notes/1-0-0.mdx#legacy-idl-instructions-replaced-by-program-metadata
Program metadata: https://github.com/solana-program/program-metadata