Skip to content

Run generator tests when packages/react-on-rails TypeScript files change #2205

@justin808

Description

@justin808

Problem

PR #2125 changed TypeScript types in packages/react-on-rails/src/types/index.ts (changing ReactElement<unknown> to ReactElement), which exposed a latent type error in serverRenderReactComponent.ts. This wasn't caught until the release script ran pnpm publish which performs a fresh TypeScript build.

The generator/example tests would have caught this because they run a full build, but they weren't triggered because the CI change detection doesn't consider packages/react-on-rails/** changes as requiring generator tests.

Root Cause

In script/ci-changes-detector (or the workflow's change detection logic), changes to packages/react-on-rails/src/** files don't trigger the generator/examples tests. These tests do a full build and would catch TypeScript compilation errors.

Proposed Solution

Update the CI change detection to run generator tests (or at minimum, a TypeScript build verification) when non-doc files in packages/react-on-rails/ change.

Specifically, changes to these paths should trigger additional CI:

  • packages/react-on-rails/src/**/*.ts
  • packages/react-on-rails/tsconfig.json
  • Root tsconfig.json

Context

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions