Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[2.5.0] - 2026-11-10
β¨ New Features
- Bun runtime support:
playwright-graphql is verified to work under the Playwright Bun runtime (bun --bun playwright test). With Playwright 1.65+, the test runner transpiles your TypeScript test files through Bun itself, and both getSdkRequester and the ts-morph-based GraphQL coverage reporter run correctly.
π§ Changes
- Peer dependency bumped:
@playwright/test peer dependency raised from >= 1.44.x to >= 1.65.x to align with the Playwright release that adds the Bun runtime. Bun runtime support requires Playwright 1.65+ (stable release).
graphql promoted to a direct dependency: previously resolved transitively, now declared explicitly since getSdkRequester uses print/DocumentNode at runtime and generated clients import from graphql.
- Toolchain bumps: TypeScript 7 (
@typescript/native), @graphql-codegen/cli 7.1.3 β 7.4.6, @types/node ^22 β ^26; added bun.lock lockfile for the Bun runtime.
π Requirements
- @playwright/test:
>= 1.65.x (peer dependency). The Bun runtime (bun --bun playwright test) requires Playwright 1.65+.
- Node.js:
>= 20.19.0 (required for ESM support and ESLint 10). Tested on Node.js 22 LTS and 24.
- TypeScript:
7.x for build/type-checking (@typescript/native); 6.0.3+ for the Jest/ts-jest test runner.
β¨ New Features
- ESM Compatibility: Full support for @graphql-codegen/cli@7.1.3 with ECMAScript Modules, enabling seamless integration with modern ESM-based projects while maintaining CommonJS compatibility.
- ts-morph Migration: Complete migration from TypeScript Compiler API to ts-morph for AST parsing in
gql-client-parser.ts, providing better type safety and maintainability.
- Type Safety Enhancements: Comprehensive type safety improvements across the entire codebase with strict type checking, eliminating unsafe
any types.
- ESLint Enforcement: Full ESLint compliance with strict
@typescript-eslint rules, ensuring consistent code quality.
π§ Improvements
- Code Quality: 100% ESLint compliance with zero errors across all source files
- Import Organization: Consistent import grouping (built-ins, third-party, local) with proper spacing
- Null Safety: Enhanced null/undefined checks with type guards throughout the codebase
- String Methods: Refactored regular expressions to use string methods (
startsWith, endsWith, slice, etc.) where possible
- Error Handling: Improved error messages for invalid inputs and edge cases
- Type Guards: Added runtime type validation for safer object property access
- Yargs Integration: Fixed import from
yargs/helpers for hideBin function, resolving ESM compatibility issues
π Bug Fixes
- Fixed ESM module resolution issues with @graphql-codegen/cli v7.1.3
- Corrected unsafe type assignments and
any usage throughout the codebase
- Resolved template literal type safety issues in error messages
- Fixed import order violations per ESLint rules
- Corrected strict equality comparisons (replaced
== with ===)
- Resolved unsafe enum comparisons in GraphQL document validation
- Fixed nullish coalescing operator usage (replaced
|| with ?? where appropriate)
π Requirements
- Node.js: >= 20.19.0 (required for ESLint 10 with flat config)
- TypeScript: >= 6.0.3 (required for ESM and new language features)
- @playwright/test: >= 1.44.x (peer dependency)
- ESLint: >= 10.x (using flat config)
- TypeScript-ESLint: >= 8.x
π Migration Notes
This is a quality-focused release with no breaking changes. However, note the following:
- Type Safety: This release enforces stricter type checking. If your code relies on implicit
any types or unsafe operations, you may need to add explicit type annotations.
- ESM Compatibility: The library now fully supports ESM. If you encounter βCannot use import statement outside moduleβ errors, ensure your project is configured for ESM or use CommonJS imports.
- @graphql-codegen/cli: Updated to v7.1.3 which includes ESM support. If you were using an older version, this is automatically handled by the dependency update.
π Technical Details
AST Migration (ts-morph)
- Migrated
src/coverage-reporter/gql-client-parser.ts from TypeScript Compiler API to ts-morph
- Added comprehensive type guards for safe AST node access
- Improved error handling for invalid TypeScript/GraphQL syntax
- Better type inference for parsed parameters and operations
ESLint Improvements
- Migrated to ESLint 10 with flat config (
eslint.config.js)
- Migrated from
eslint-plugin-import to eslint-plugin-import-x (ESLint 10 compatible)
- Enabled
flat/eslint-recommended and flat/recommended presets from @typescript-eslint
- Fixed all
@typescript-eslint/no-explicit-any violations
- Resolved
@typescript-eslint/no-unsafe-* errors with proper type guards
- Corrected
import-x/order violations with consistent grouping
- Added
no-console exceptions for intentional logging (muted gqlg logs)
- Fixed type assertion issues with proper type guards
Dependencies
- Updated
@graphql-codegen/cli from 6.1.0 to 7.1.3 for ESM support
- Added
ts-morph v28.0.0 for AST manipulation
- Updated TypeScript to 6.0.3+ support
[2.3.0] - 2025-XX-XX
β οΈ Release Notes
This version was skipped in favor of 2.3.0-rc1 to ensure quality without accumulating technical debt.
[2.2.0] - 2025-XX-XX
Previous version - see Git history for changes.