This package provides shared TypeScript type definitions used across all packages in the Cypress monorepo, covering browsers, configuration, specs, automation, proxy, cloud, reporter, driver, and more.
Key Commands
# Build both CJS and ESM outputs
yarn workspace @packages/types build
# Run a specific test file
yarn workspace @packages/types test -- <path-to-spec>
# Run tests matching a glob pattern
yarn workspace @packages/types test -- "<glob-pattern>"
# Type-check
yarn workspace @packages/types check-tsArchitecture
All source lives in src/ as individual domain-scoped files:
src/browser.ts— Browser launch and info typessrc/config.ts— Cypress configuration typessrc/spec.ts— Spec file typessrc/automation.ts— Browser automation message typessrc/proxy.ts— HTTP proxy-related typessrc/server.ts— Server-side typessrc/driver.ts— Driver protocol typessrc/reporter.ts— Reporter event typessrc/cloud.ts— Cypress Cloud API typessrc/protocol.ts— Protocol types for CDP/BiDisrc/auth.ts— Authentication typessrc/git.ts— Git info typessrc/index.ts— Barrel re-export of all types
Gotchas / Notes
- This package ships both CJS (
cjs/) and ESM (esm/) builds; thebrowserfield inpackage.jsonpoints to the ESM build. devtools-protocolis nohoisted to avoid version conflicts.- When adding new shared types, prefer adding them here rather than inline in consuming packages to keep type definitions consolidated.
Auto-Generated Files
cjs/andesm/— Generated bytsc; do not edit by hand.