Skip to content

refactor: improve SDK setup instructions and bootstrap flow for clarity and consistency #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tech-sushant
Copy link
Contributor

This pull request refines the bootstrapProjectWithSDK function and enhances SDK setup instructions across multiple programming languages. The changes aim to improve clarity, consistency, and usability for developers integrating BrowserStack SDK into their projects.

Improvements to SDK setup instructions:

  • Refactored SDK setup steps for clarity and formatting across languages:
    • Updated getSDKPrefixCommand in src/tools/sdk-utils/commands.ts to include step-by-step instructions with clear formatting for Node.js and Java SDKs. [1] [2]
    • Enhanced language-specific instructions in src/tools/sdk-utils/constants.ts, adding distinct steps for Python, Java, C#, WebdriverIO, and Cypress SDK integration. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Enhancements to bootstrapProjectWithSDK:

  • Unified instructions handling:
    • Consolidated SDK setup instructions into a single combinedInstructions variable, ensuring consistent formatting for all configurations. [1] [2]
    • Added a helper function formatFinalInstructions to apply consistent formatting across all instruction types.

Code cleanup and modularization:

  • Improved imports:

    • Organized imports in src/tools/bstack-sdk.ts to remove duplicates and enhance readability. [1] [2]
  • Enhanced error handling:

    • Improved error messages for unsupported Percy configurations and added structured error tracking. [1] [2]

These changes collectively streamline the SDK integration process, making it easier for developers to follow and implement the required steps.

@ruturaj-browserstack
Copy link
Contributor

LGTM

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.

2 participants