Skip to content

Conversation

@itspavant
Copy link

Brief Summary of Changes

Improved scripts/bootstrap.js developer experience:

  • Detects if yarn is missing and provides a clear error message instead of failing silently.
  • Adds a fallback path to run npm-equivalent bootstrap steps when Yarn is not installed, so contributors using npm are not blocked.
  • Preserves existing behavior for Yarn users (yarn bootstrap still runs as before).
  • Prints the exact command being executed for easier debugging.
  • close Issue: Improve bootstrap.js to support both Yarn and NPM with clearer errors #50

What does this PR address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are tests included?

  • Yes
  • No
    (The setup for this repo is non-trivial, so I did not run the full suite. This PR only modifies scripts/bootstrap.js, which is used for contributor setup, so it does not impact SDK runtime or published package behavior.)

Reviewer, please note:

  • The repo’s package.json currently defines "bootstrap": "yarn example && yarn install".
    If Yarn is not installed, the updated script translates this to equivalent npm commands:
    1. npm --prefix example install
    2. npm install (root)
  • This ensures contributors without Yarn can still set up the repo.
  • If maintainers prefer to enforce Yarn-only usage, the npm fallback part can be removed, leaving only the clearer error messages.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.
    (Not run due to complexity, but the change is isolated to the bootstrap script and does not affect published code.)

@itspavant
Copy link
Author

Dear Maintainers,

Please review the PR and let me know if you need any more modifications

Thank you.

@adimiz1 adimiz1 self-requested a review October 8, 2025 06:20
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.

Issue: Improve bootstrap.js to support both Yarn and NPM with clearer errors

1 participant