fix: restore native browser ESM imports (#2495)
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested Fixes #2494. - Rewrite emitted ESM references to the private X.509 state package import into browser-resolvable relative imports. - Keep one private state registry across Node CommonJS and ESM consumers while allowing native browsers to load the SDK directly. - Preserve browser credential protections, blocked internal package exports, and compatibility with browser `process`, `module`, and `exports` shims. This is intentionally the production-only release fix. Expanded browser and bundler regression coverage will follow separately. ## Additional context & links Verified locally: - Real headless Chrome directly imports the built SDK without an import map and rejects browser API-key usage by default, including with browser `process`, `module`, and `exports` shims. - Browser-targeted ES2020 bundling succeeds. - Node 22.0.0 preserves both mixed CommonJS/ESM X.509 authentication combinations. - Existing packed-package checks pass, including CommonJS, ESM, browser conditions, and optional dependencies. - `pnpm build`, `pnpm lint`, `pnpm exec tsc`, and 196 focused authentication/browser-security tests pass. - The complete existing test suite previously passed: 7,548 tests, with 2 skipped.
J
Justin Beckwith committed
c8cab1e90eb5daf05d17d5c90492e6728afa91b7
Parent: d691a10
Committed by GitHub <noreply@github.com>
on 8/27/2026, 3:52:56 PM