Skip to content

docs: Fix js-legacy README build-from-source steps - #149

Open
imitater-dou wants to merge 1 commit into
solana-program:mainfrom
imitater-dou:docs/js-legacy-build-from-source
Open

imitater-dou wants to merge 1 commit into
solana-program:mainfrom
imitater-dou:docs/js-legacy-build-from-source

Conversation

@imitater-dou

Copy link
Copy Markdown

Summary

The "Build from Source" section of clients/js-legacy/README.md still describes the old solana-program-library layout:

  • It clones solana-labs/solana-program-library (archived) and cds into token-metadata/js, which no longer exists there. The client lives in clients/js-legacy of this repo.
  • Step 5 runs npm run test:build-programs, but clients/js-legacy/package.json has no test:build-programs script. The tests (test/instruction.test.ts, test/state.test.ts) are plain mocha unit tests that don't need an on-chain program build.
  • The package is built and tested with pnpm (prepublishOnly: "pnpm build", root packageManager: pnpm@9.1.0, and CI's make test-js-clients-js-legacy runs cd clients/js-legacy && pnpm install && pnpm build && pnpm test).
  • The FAQ "open an issue" link points at the archived SPL repo, which no longer accepts issues.

Changes

  • Point the clone/cd steps at this repo and clients/js-legacy.
  • Use pnpm install / pnpm build, and replace the missing test:build-programs step with pnpm test (matching what CI runs).
  • Point the issue link at this repo.

This matches the layout already used in solana-program/memo's clients/js-legacy/README.md. Docs only.

How to verify

jq '.scripts["test:build-programs"]' clients/js-legacy/package.json   # null
jq '.scripts.test, .scripts.prepublishOnly' clients/js-legacy/package.json   # "mocha test", "pnpm build"
make -n test-js-clients-js-legacy   # ... cd clients/js-legacy && pnpm install && pnpm build && pnpm test ...
grep -n 'Connection' clients/js-legacy/test/*.ts   # no matches: unit tests only
gh api repos/solana-labs/solana-program-library --jq .archived   # true

The build-from-source section still cloned the archived
solana-program-library repo and ran `npm run test:build-programs`,
which does not exist in clients/js-legacy/package.json. Point it at
this repo and clients/js-legacy, use pnpm like CI does, and run the
unit tests instead. Also point the issue link at this repo.

Signed-off-by: ADou <ikun3.1415927@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant