feat: monorepo conversion — add @wdio/browserstack-service alongside the gRPC core#37
Open
AakashHotchandani wants to merge 1 commit into
Open
Conversation
…ide the gRPC core Adds the WebdriverIO service (@wdio/browserstack-service) as packages/browserstack-service and moves the existing gRPC/protobuf core (@browserstack/wdio-browserstack-service) into packages/core (git history preserved), so both ship from this repo. - npm workspace: root build builds core then service; tests scoped to the service. - service: esbuild bundle (deps external) + tsc declarations; strict files allowlist (build + README + LICENSE + ambient d.ts); peerDeps for webdriverio/@wdio/* so the consumer keeps a single shared copy. - release: Changesets + npm OIDC trusted publishing via .github/workflows/release.yml (main -> latest, v8 -> v8 dist-tag); the gRPC core is ignored by Changesets and stays on the SDK team's manual publish flow. - fix(tests): the @wdio/reporter mock no longer imports the real module from within its own mock (a top-level vi.importActual + static import deadlocked vitest and hung reporter.test.ts); stub the stats classes instead. Full suite: 39 files / 980 tests pass and the run exits cleanly. - repo metadata -> browserstack/wdio-browserstack-service; an added changeset bumps the first release to 9.29.0 (current npm latest is 9.28.0). Verified locally: npm ci + build + test green; clean 80-file / ~590kB tarball; a real BrowserStack session passed with webdriverio deduped to one copy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| ): Promise<string> { | ||
| return new Promise((resolve) => { | ||
| const process = exec( | ||
| cmdCommand, |
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.
What
Converts this repo into an npm workspace and adds the WebdriverIO service so BrowserStack can publish
@wdio/browserstack-servicefrom here on its own cadence (WebdriverIO TSC has approved this and will set up OIDC trusted publishing). Nothing changes for end users — same package name, sameservices: ['browserstack'].Layout
packages/core@browserstack/wdio-browserstack-servicegit mv(history preserved); build & behavior unchangedpackages/browserstack-service@wdio/browserstack-serviceThe core (owned by
@browserstack/sdk-dev) is behavior-unchangedpackages/core/;buf generate+tscbuild and thefilesallowlist are unchanged.ignores@browserstack/wdio-browserstack-service(.changeset/config.json) — this pipeline never versions or publishes the core. Your manual publish flow continues exactly as before.Release pipeline (service only)
.github/workflows/release.yml) — no long-lived token, provenance-signed.main→latest(v9); a futurev8branch →v8dist-tag (via per-branchpublishConfig.tag; the workflow hardcodes no tag).latestis currently9.28.0).Test-infra fix
The
@wdio/reportermock imported the real module from inside its own mock (a top-levelvi.importActual+ a static import), which deadlocked vitest and hungreporter.test.ts. Replaced with runtime stubs (those classes are only used as TS types). Full suite now: 39 files / 980 tests pass and the run exits cleanly.Verified locally
npm ci+npm run build(core via buf+tsc, service via esbuild+tsc) ✅npm test→ 39 files / 980 tests pass, clean exit ✅npm pack→ clean 80-file / ~590 kB tarball (onlybuild/ + README + LICENSE + ambient d.ts; no docs/logs/maps) ✅services: ['browserstack']resolved, session created, spec green,webdriveriodeduped to a single copy ✅To go live (after this merges)
@wdionpm org admin sets a Trusted Publisher on@wdio/browserstack-service: Orgbrowserstack, Repowdio-browserstack-service, Workflowrelease.yml, Environment empty.9.29.0).🤖 Generated with Claude Code