Make @wdio/browserstack-service v8 line self-contained for extraction#10
Open
AakashHotchandani wants to merge 4 commits into
Open
Make @wdio/browserstack-service v8 line self-contained for extraction#10AakashHotchandani wants to merge 4 commits into
AakashHotchandani wants to merge 4 commits into
Conversation
Mirror of the v9 extraction, applied to the v8 maintenance line so it can build, test, and release independently of the WebdriverIO monorepo while keeping the @wdio name. Confined to packages/wdio-browserstack-service. v8 ↔ v9 differences are handled (Node 16 support, single `.` export, got/formdata deps, ^8 peers). - package.json: webdriverio/@wdio/types/reporter/logger → peerDependencies (^8.0.0) + devDependencies; add build/test/release scripts + toolchain devDeps; publishConfig.tag = "v8" so releases publish to the v8 dist-tag (never latest); keep engines ^16.13||>=18, @wdio/cli peer ^5–^8, single `.` export - tsconfig.json/tsconfig.prod.json: self-contained (no ../../ refs) - scripts/build.mjs: standalone esbuild, single index entry, target node16 - src/request-handler.ts: unref the batch-polling interval - .changeset (baseBranch v8) + .github workflows (on v8, OIDC, v8 tag) - .npmignore, vitest.config.ts, EXTRACTION-V8.md (dist-tag strategy + diffs) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lowlist + @types Validated the v8 standalone build end-to-end and corrected three v8-specific issues the v9 path didn't have: - build with `tsc -p tsconfig.prod.json` (emits JS + d.ts, structure-preserving), NOT an esbuild single-file bundle. v8 has a top-level-await inside a circular module graph that a single bundle can't express (the monorepo builds v8 with `tsc -b`). Removed scripts/build.mjs + esbuild devDep. - `files` allowlist (build + root types) instead of .npmignore: the `scripts` npmignore rule matched build/scripts/ at depth and dropped it from the tarball. - added @types/uuid (uuid@10 has no bundled types) + @types/yauzl devDeps. PoC: npm install (no monorepo) → tsc build → pack → install as @wdio/browserstack-service → resolves to v8 build 8.48.0, webdriverio deduped, imports cleanly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…h v9) Copy the manual mocks the v8 suite resolves by convention from the monorepo root into the package __mocks__: @wdio/logger, @wdio/reporter (stats imported from the published @wdio/reporter), browserstack-local, fs, got, chalk. v8 uses `got` (not a global fetch), so vitest.config has no fetch setup file. The got mock's W3C element-key literal is de-literalized to avoid a secret-scanner false positive. Validated: a single file runs green standalone (tests/bstackLogger.test.ts 6/6). The all-at-once suite has the same teardown caveat as v9 (documented). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… is the v9-shared follow-up) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Mirror of the v9 extraction (PR #9), applied to the v8 maintenance line so it can build, test, and release independently of the WebdriverIO monorepo while keeping the
@wdio/browserstack-servicename. Confined topackages/wdio-browserstack-service.Why
@wdio/browserstack-serviceships parallel lines on npm:latest= v9 (main),v8= v8 (thisv8branch),v7= legacy. To release v8 fixes on BrowserStack's timeline (for WebdriverIO v8 / Node 16 users) without waiting on the TSC train, the v8 line needs the same self-containment as v9.The v8-critical bit: dist-tag safety
package.jsonsetspublishConfig.tag: "v8"and ChangesetsbaseBranch: v8, so releases publish to thev8dist-tag and never movelatest(which points at v9). npm OIDC trusted-publishing is per-package, so the same delegation used for v9 covers v8 automatically.Key changes (v8 values)
webdriverio/@wdio/types/@wdio/reporter/@wdio/logger→^8.0.0(+ devDeps);@wdio/clipeer stays^5–^8.tsconfig.json+tsconfig.prod.json.scripts/build.mjs— standalone esbuild, singleindexentry (v8 has no./cleanupexport),target: node16.src/request-handler.ts—unrefthe poller (same lifecycle fix as v9)..changeset/(baseBranchv8) +.github/workflows/(trigger onv8, OIDC, publishesv8tag).^16.13 || >=18and the single.export.EXTRACTION-V8.md— dist-tag strategy + v8↔v9 differences + follow-ups.v8 ↔ v9 differences handled
Node 16 support; single entrypoint;
got/formdata-node/glob ^10/tar ^6/uuid ^10(vs v9undici/glob ^11/tar ^7);^8peers; publishes tov8tag.Follow-ups (same as v9)
Test wiring (copy the v8 root
__mocks__mirroring v9) — build/release plumbing doesn't depend on it. Sync the fork'sv8(3e62544) with upstreamv8(cdbd52e/ 8.48.0) before a real cutover.