-
Notifications
You must be signed in to change notification settings - Fork 9
v8: establish the standalone @wdio/browserstack-service v8 maintenance line #42
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
AakashHotchandani
wants to merge
57
commits into
main
Choose a base branch
from
v8
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
46ee119
feat: convert to npm workspace; add @wdio/browserstack-service alongs…
AakashHotchandani 8505f85
fix(ci): regenerate package-lock.json to match workspace package.json
AakashHotchandani 52767e8
fix(ci): regenerate package-lock.json via a clean full resolution
AakashHotchandani 67b9cef
fix(ci): include peerDependency closure in lockfile (npm default peer…
AakashHotchandani 254a69d
fix(node18): make telemetry fail-safe + openAsBlob fallback + scope f…
AakashHotchandani f935a52
chore(review): SHA-pin publish actions, fix core npm metadata, drop i…
AakashHotchandani 47a1c8f
chore(review): SHA-pin publish-workflow actions + correct core npm me…
AakashHotchandani 068e2b5
fix(release): drop setup-node registry-url so it can't shadow OIDC token
AakashHotchandani 7d90b13
wip(v8): extract v8 service into standalone v8 branch (mirror v9)
AakashHotchandani b234493
wip(v8): partial teardown cleanup (timer restore + observer disconnect)
AakashHotchandani bda3277
test(v8): fix standalone test suite — reporter mock cycle, util emit …
AakashHotchandani dddc424
refactor(v8): flatten gRPC core into the service package (inline proto)
AakashHotchandani 43e8030
fix(ci): peer-inclusive lockfile + @types/node override (v8)
AakashHotchandani 29be3ed
feat(v8): port SDK-6277 screenshot-on-failure over gRPC in the CLI fl…
AakashHotchandani 3d0d0ec
chore(v8): release enablement — peer->dep alignment + manual/hybrid r…
AakashHotchandani 4d40118
fix(v8 ci): make per-file test runner CI-proof (strip ANSI/disable co…
AakashHotchandani 6dedffb
fix(v8): resolve semgrep/CodeQL findings — non-literal RegExp → endsW…
AakashHotchandani f78d091
fix(browserstack-service): declare webdriverio as a dependency, not a…
AakashHotchandani 22817e7
Merge pull request #46 from browserstack/fix/webdriverio-peer-to-dep-v8
AakashHotchandani 2e76bd3
feat(v8): add skipAppOverride service option
Bhargavi-BS 3d9ae4f
chore: remove changeset file (review feedback)
Bhargavi-BS cc229fe
feat(v8): port missing monorepo parity commits — test-plan/grpc-size/…
AakashHotchandani f27144b
test(v8): port unit tests for the ported parity commits (#15231, #15200)
AakashHotchandani 5045503
fix(v8): report skipped, hook-aborted tests and hook results in the C…
kamal-kaur04 8d21b2f
fix(v8): map skipped test results in loadTestResult
kamal-kaur04 9475762
fix(v8): backport tracker fixes — hook instance creation, hook keying…
kamal-kaur04 78406cf
fix(v8): mint hook ids — anchored HOOK_REGEX never matched the qualif…
kamal-kaur04 2b1f799
fix(v8): treat sync-skip hooks as skipped; harden batch upload diagno…
kamal-kaur04 6d422d5
Merge pull request #58 from browserstack/port/wdio-v8-missing-commits
AakashHotchandani 879ca82
ci: mirror ready-for-review label + SDK PR review gate workflows onto v8
xxshubhamxx 62595ea
ci: also mirror PULL_REQUEST_TEMPLATE.md onto v8
xxshubhamxx dccf9e2
Merge pull request #62 from browserstack/ci/port-pr-review-workflows-…
xxshubhamxx 334a55f
Version Packages
github-actions[bot] 9346497
Merge pull request #59 from kamal-kaur04/fix/cli-skipped-tests-report…
kamal-kaur04 9cf34ac
Merge pull request #43 from browserstack/changeset-release/v8
Dalwin-Barnard ea9db70
SDK-6983: rescue SDK-log upload on signal termination (v8)
kamal-kaur04 df152df
Merge pull request #68 from browserstack/fix/cli-skipped-tests-report…
hamza-browserstack 6073bcc
add: changeset
kamal-kaur04 0120ce0
Merge pull request #91 from browserstack/changeset-update
hamza-browserstack abc5972
Version Packages
github-actions[bot] e8b2100
Merge pull request #93 from browserstack/changeset-release/v8
hamza-browserstack 4fc5bfa
chore: strip ticket refs from log-upload rescue comments
kamal-kaur04 50a06fe
test: cover log-upload rescue paths
kamal-kaur04 aec8d08
fix: force conventional exit after signal grace window; gate logsUplo…
kamal-kaur04 007bfac
Merge pull request #87 from browserstack/SDK-6983-flush-on-signal-v8
hamza-browserstack effdc1e
chore(v8): add missing changeset for #87 (SDK-6983, patch)
AakashHotchandani 77ddc4a
Merge pull request #111 from browserstack/chore/v8-changeset-sdk-6983…
AakashHotchandani 761a926
Version Packages
github-actions[bot] 149644c
ci(v8): port the changeset-from-pr generator to the v8 branch
AakashHotchandani d97c37f
Merge pull request #113 from browserstack/ci/port-changeset-generator…
AakashHotchandani c7d505a
Merge pull request #112 from browserstack/changeset-release/v8
hamza-browserstack e70e07b
Merge branch 'v8' into feat/skip-app-override-v8
Bhargavi-BS 60af86c
Merge pull request #50 from browserstack/feat/skip-app-override-v8
rahulpsq 635fc26
changeset file
Bhargavi-BS f275e93
Merge pull request #132 from browserstack/chore/v8-changeset-sdk-skip…
rahulpsq c4f9098
Version Packages
github-actions[bot] 8c6eb00
Merge pull request #114 from browserstack/changeset-release/v8
rahulpsq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Changesets | ||
|
|
||
| This repo uses [Changesets](https://github.com/changesets/changesets) to version and publish | ||
| **`@wdio/browserstack-service`** on BrowserStack's own cadence (independent of WebdriverIO's | ||
| release schedule). | ||
|
|
||
| - Add a changeset for any user-facing change: `npm run changeset` (pick patch/minor/major). | ||
| - On merge to `main` (the v9 line) or `v8` (the v8 line), the Release workflow opens a | ||
| "Version Packages" PR; merging that PR publishes to npm via OIDC trusted publishing. | ||
| - The gRPC/protobuf client is generated inline from the bundled `.proto` files at build time | ||
| (`buf generate`) — it is no longer a separate workspace package, so `config.json` `ignore` is | ||
| empty and there is nothing extra for this pipeline to skip. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", | ||
| "changelog": "@changesets/cli/changelog", | ||
| "commit": false, | ||
| "fixed": [], | ||
| "linked": [], | ||
| "access": "public", | ||
| "baseBranch": "v8", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@wdio/browserstack-service": patch | ||
| --- | ||
|
|
||
| Port SDK-6277 (upstream webdriverio/webdriverio#15330): in the CLI/binary (v8) flow, forward screenshot-on-failure to the binary over gRPC as a `TEST_SCREENSHOT` log (the binary uploads it via its own authorized testhub session) instead of the direct-HTTP `onScreenshot` path, which 401s under the worker's binary-issued JWT. Also registers the command/result listeners in CLI mode so the user's `saveScreenshot()`/`takeScreenshot()` result is captured, and honors the incoming log `kind` in the mocha CLI framework so screenshots route correctly. Keeps the standalone v8 line at parity with the monorepo. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| "@wdio/browserstack-service": minor | ||
| --- | ||
|
|
||
| BrowserStack now publishes `@wdio/browserstack-service` from its own repository | ||
| (`browserstack/wdio-browserstack-service`) on an independent release cadence, using npm OIDC | ||
| trusted publishing. No change for end users — same package name and the same | ||
| `services: ['browserstack']` configuration continue to work unchanged. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| - v8 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-test: | ||
| name: Build & test (node ${{ matrix.node-version }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| node-version: ['18.20', '20', '22'] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
|
|
||
| - name: Install | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Test | ||
| run: npm test | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| name: Release | ||
|
|
||
| # Publishes @wdio/browserstack-service to npm via OIDC Trusted Publishing | ||
| # (no long-lived NPM_TOKEN). One-time setup by an @wdio npm org admin on npmjs.com: | ||
| # @wdio/browserstack-service -> Settings -> Trusted Publisher -> GitHub Actions | ||
| # Organization/user: browserstack | ||
| # Repository: wdio-browserstack-service | ||
| # Workflow filename: release.yml | ||
| # Environment: (leave empty) | ||
| # Requires: PUBLIC repo (for provenance), npm >= 11.5.1, Node >= 22.14.0. | ||
| # | ||
| # The gRPC/protobuf client is generated inline at build time (buf generate); there is no | ||
| # separate core package for this workflow to version or publish. | ||
| # | ||
| # Release model (publishing is MANUAL): | ||
| # * push to main / v8 -> opens/updates the "Version Packages" PR only. NEVER publishes; | ||
| # merging that PR does NOT publish either. | ||
| # * Run workflow (publish) -> publishes the merged version to npm (main -> `latest`, | ||
| # v8 -> `v8`) with git tag + GitHub release + provenance. | ||
| # * Run workflow (canary) -> snapshot prerelease to the npm `canary` dist-tag. | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main # v9 line -> opens Version PR (publish target: dist-tag "latest") | ||
| - v8 # v8 line -> opens Version PR (publish target: dist-tag "v8" via publishConfig.tag) | ||
| workflow_dispatch: | ||
| inputs: | ||
| publish: | ||
| description: 'Publish the merged version to npm (main -> `latest`, v8 -> `v8`). Merge the "Version Packages" PR first so there are no pending changesets.' | ||
| type: boolean | ||
| default: false | ||
| canary: | ||
| description: 'Publish a canary prerelease to the npm `canary` dist-tag (validates OIDC + provenance end-to-end; never touches `latest`). Requires at least one pending changeset.' | ||
| type: boolean | ||
| default: false | ||
|
|
||
| # Never run main and v8 releases on top of each other. | ||
| concurrency: release-${{ github.ref }} | ||
|
|
||
| permissions: | ||
| contents: write # commit the "Version Packages" PR + create git tags | ||
| pull-requests: write # open the "Version Packages" PR | ||
| id-token: write # OIDC for npm trusted publishing + provenance | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| fetch-depth: 0 # Changesets needs full history/tags | ||
|
|
||
| - name: Setup Node | ||
| # NOTE: intentionally NO `registry-url:` here. setup-node's registry-url writes | ||
| # `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}` into ~/.npmrc; with no | ||
| # NODE_AUTH_TOKEN that becomes an empty token line that can shadow OIDC Trusted | ||
| # Publishing at `npm publish` time. npm already defaults to registry.npmjs.org and | ||
| # publishConfig.access=public handles the scoped publish, so the line isn't needed. | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: 22 # resolves to >= 22.14 on the runner (OIDC floor) | ||
| cache: 'npm' | ||
|
|
||
| # Trusted Publishing needs npm >= 11.5.1. Pin to the 11.x line so a future | ||
| # npm major can never silently change publish behaviour. | ||
| - name: Upgrade npm to an OIDC-capable version | ||
| run: npm install -g npm@11 | ||
|
|
||
| - name: Install | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Test | ||
| run: npm test | ||
|
|
||
| # Version PR (push to main / v8): run changesets in VERSION-ONLY mode — open or update the | ||
| # "Version Packages" PR (version bump + CHANGELOG). This step NEVER publishes: with no | ||
| # `publish:` input, once the Version PR is merged (a push with no pending changesets) the | ||
| # action simply no-ops. Publishing is the separate, manual step below. | ||
| - name: Open/update the "Version Packages" PR | ||
| if: github.event_name == 'push' | ||
| uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1 | ||
| with: | ||
| version: npm run version # changeset version — manages the Version PR only | ||
| createGithubReleases: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| # Publish (manual, workflow_dispatch with publish=true): publish the already-versioned | ||
| # package to npm — main -> `latest`, v8 -> `v8` (via publishConfig.tag) — with git tag, | ||
| # GitHub release, and provenance, over the OIDC trusted publisher (no NPM_TOKEN). | ||
| # Merge the "Version Packages" PR first: this publishes only when there are no pending | ||
| # changesets. If any remain, the action safely opens/updates the Version PR instead. | ||
| - name: Publish to npm | ||
| if: github.event_name == 'workflow_dispatch' && inputs.publish | ||
| uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1 | ||
| with: | ||
| publish: npm run release # changeset publish (honors publishConfig.tag per branch) | ||
| createGithubReleases: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # No NPM_TOKEN: auth is OIDC via id-token: write above. | ||
| NPM_CONFIG_PROVENANCE: 'true' | ||
|
|
||
| # Canary (manual, workflow_dispatch with canary=true): snapshot-version the pending | ||
| # changesets and publish a prerelease to the `canary` dist-tag via the SAME OIDC trusted | ||
| # publisher. Validates OIDC + provenance end-to-end without touching `latest`. | ||
| # snapshot.useCalculatedVersion=true in .changeset/config.json makes the version | ||
| # <next>-canary-<datetime> (e.g. 9.30.0-canary-...). Requires >=1 pending changeset. | ||
| - name: Canary publish to `canary` dist-tag | ||
| if: github.event_name == 'workflow_dispatch' && inputs.canary | ||
| run: | | ||
| npx changeset version --snapshot canary | ||
| npx changeset publish --no-git-tag --tag canary | ||
| env: | ||
| NPM_CONFIG_PROVENANCE: 'true' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,24 @@ | ||
| node_modules | ||
|
|
||
| # build outputs | ||
| dist | ||
| generated | ||
| build | ||
| src/generated | ||
| packages/*/dist | ||
| packages/*/build | ||
| packages/*/src/generated | ||
|
|
||
| # test/coverage | ||
| coverage | ||
| packages/*/coverage | ||
|
|
||
| # packed tarballs & logs | ||
| *.tgz | ||
| *.log | ||
| logs | ||
|
|
||
| # local/editor | ||
| .DS_Store | ||
| .env | ||
| .env.* |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,119 +1,50 @@ | ||
| # @browserstack/wdio-browserstack-service | ||
| # wdio-browserstack-service | ||
|
|
||
|  | ||
|  | ||
| Home of [`@wdio/browserstack-service`](https://www.npmjs.com/package/@wdio/browserstack-service) — the BrowserStack WebdriverIO integration, maintained by BrowserStack. | ||
|
|
||
| Core SDK for BrowserStack integration used by the WebdriverIO BrowserStack Service. | ||
| For user configuration and service options, see the official service README: | ||
| [https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-browserstack-service/README.md](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-browserstack-service/README.md) | ||
| | Package | npm | What it is | | ||
| |---|---|---| | ||
| | [`packages/browserstack-service`](./packages/browserstack-service) | [`@wdio/browserstack-service`](https://www.npmjs.com/package/@wdio/browserstack-service) | The WebdriverIO service users add via `services: ['browserstack']`. Its gRPC/protobuf client is generated from the bundled `.proto` files at build time. | | ||
|
|
||
| ## Table of Contents | ||
| 1. [Overview](#overview) | ||
| 2. [Code Generation](#code-generation) | ||
| 3. [Development](#development) | ||
| 4. [Contributing](#contributing) | ||
| 5. [License](#license) | ||
| ## Usage (for end users) | ||
|
|
||
| ## Overview | ||
| This package provides the TypeScript-based gRPC client and Protobuf definitions | ||
| used internally by the `@wdio/browserstack-service` plugin for WebdriverIO. | ||
| It includes: | ||
| - Generated TypeScript types and clients from Protobuf definitions. | ||
| - Message factory constructors for backward compatibility. | ||
| Nothing changes — install the service and add it to your WebdriverIO config: | ||
|
|
||
| ## Installation | ||
| This module is included as a dependency of the `@wdio/browserstack-service` package. | ||
| Users should install and configure the service as documented in the linked README above. | ||
|
|
||
| ## Setup & Configuration | ||
| Add the service to your WebdriverIO configuration (`wdio.conf.js`): | ||
| <!-- Usage is provided by @wdio/browserstack-service. --> | ||
| ``` | ||
| export BROWSERSTACK_USERNAME=your_username | ||
| export BROWSERSTACK_ACCESS_KEY=your_access_key | ||
| ```sh | ||
| npm i -D @wdio/browserstack-service | ||
| ``` | ||
|
|
||
| ## Usage | ||
| Import and use the gRPC client and message constructors: | ||
| ```ts | ||
| import { SDKClient, StartBinSessionRequestConstructor } from '@browserstack/wdio-browserstack-service'; | ||
| import path from 'path'; | ||
| import process from 'process'; | ||
| import { CLIUtils } from '@browserstack/cli-utils'; // example import, adjust if needed | ||
| import { version as packageVersion } from './package.json'; // adjust to your setup | ||
|
|
||
| // Initialize the client (uses default insecure credentials unless overridden) | ||
| const client = new SDKClient('grpc.browserstack.com:443'); | ||
|
|
||
| // Collect framework details | ||
| const automationFrameworkDetail = CLIUtils.getAutomationFrameworkDetail(); | ||
| const testFrameworkDetail = CLIUtils.getTestFrameworkDetail(); | ||
|
|
||
| const frameworkVersions = { | ||
| ...automationFrameworkDetail.version, | ||
| ...testFrameworkDetail.version | ||
| }; | ||
|
|
||
| // Build StartBinSessionRequest | ||
| const startReq = StartBinSessionRequestConstructor.create({ | ||
| binSessionId: 'your-session-id', // replace with actual session id | ||
| sdkLanguage: CLIUtils.getSdkLanguage(), | ||
| sdkVersion: packageVersion, | ||
| pathProject: process.cwd(), | ||
| pathConfig: path.resolve(process.cwd(), 'browserstack.yml'), | ||
| cliArgs: process.argv.slice(2), | ||
| frameworks: [automationFrameworkDetail.name, testFrameworkDetail.name], | ||
| frameworkVersions, | ||
| language: CLIUtils.getSdkLanguage(), | ||
| testFramework: testFrameworkDetail.name, | ||
| wdioConfig: {}, // provide your WDIO config if applicable | ||
| }); | ||
|
|
||
| // Start a session | ||
| client.startBinSession(startReq).then(response => { | ||
| console.log('Started session:', response.binSessionId); | ||
| }).catch(err => { | ||
| console.error('Failed to start session:', err); | ||
| }); | ||
| ```js | ||
| // wdio.conf.js | ||
| export const config = { | ||
| services: ['browserstack'], | ||
| // ... | ||
| } | ||
| ``` | ||
|
|
||
| ## Code Generation | ||
| This project uses [Buf](https://docs.buf.build/) and `ts-proto` to | ||
| generate TypeScript code from Protobuf definitions. | ||
|
|
||
| ### Prerequisites | ||
| - [Buf CLI](https://docs.buf.build/installation) | ||
| - Node.js ≥16 | ||
| See the [service README](./packages/browserstack-service/README.md) for full configuration. | ||
|
|
||
| ### Generate & Build | ||
| ```bash | ||
| # Clean previously generated files | ||
| npm run clean | ||
| ## Development | ||
|
|
||
| # Generate from .proto files | ||
| npm run generate | ||
| This is an npm workspace with a single published package. | ||
|
|
||
| # Compile to JS and declaration files | ||
| npm run build | ||
| ```sh | ||
| npm ci # install | ||
| npm run build # generate the gRPC client from proto, then compile | ||
| npm test # run the service test suite | ||
| ``` | ||
|
|
||
| Generated files appear under `dist/` and should be published to npm. | ||
| - `npm run generate` (inside the package) runs `buf generate` to emit the gRPC/protobuf client into `src/grpc/generated` from the `.proto` files under `src/proto`. `npm run build` runs this automatically before compiling, so the generated code is never committed. | ||
| - The service is compiled with `tsc` (TypeScript declarations included). | ||
|
|
||
| ## Development | ||
| Clone the repository and install dependencies: | ||
| ```bash | ||
| git clone https://github.com/browserstack/wdio-browserstack-service.git | ||
| cd wdio-browserstack-service | ||
| npm install | ||
| ``` | ||
| ## Releases | ||
|
|
||
| Run generation and build: | ||
| ```bash | ||
| npm run build | ||
| ``` | ||
| `@wdio/browserstack-service` is versioned and published with [Changesets](https://github.com/changesets/changesets) | ||
| on BrowserStack's own cadence (independent of WebdriverIO core's release schedule): | ||
|
|
||
| ## Contributing | ||
| Contributions are welcome! Please open issues or pull requests in the [GitHub repository](https://github.com/browserstack/wdio-browserstack-service). | ||
| - `main` → `latest` dist-tag (v9 line) | ||
| - `v8` branch → `v8` dist-tag (v8 line) | ||
|
|
||
| ## License | ||
| MIT © BrowserStack | ||
| Publishing uses **npm OIDC trusted publishing** (no long-lived token; provenance-signed). The gRPC/protobuf | ||
| client is generated inline at build time from the `.proto` files in this repo — there is no separately | ||
| published core package. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.