Skip to content

fix(frontend): type-check every workspace - #1492

Merged
kentwelcome merged 1 commit into
mainfrom
feature/drc-3217-ensure-recce-frontend-type-check-validates-every-workspace
Aug 5, 2026
Merged

fix(frontend): type-check every workspace#1492
kentwelcome merged 1 commit into
mainfrom
feature/drc-3217-ensure-recce-frontend-type-check-validates-every-workspace

Conversation

@gcko

@gcko gcko commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

Bug fix

What this PR does / why we need it:

  • Makes the public pnpm type:check command validate the root app, @datarecce/ui, and @datarecce/storybook with each workspace's own tsconfig.json.
  • Adds a non-recursive Storybook leaf command and includes its stories, configuration, Vitest config, and required shared declarations in the Storybook TypeScript program.
  • Fixes the package-boundary and ES target errors exposed by those checks without aligning workspace targets or libs.
  • Preserves the existing pre-push and UI release callers, which now invoke the aggregate command automatically.

Which issue(s) this PR fixes:

Closes DRC-3217

Special notes for your reviewer:

Failure propagation was proven with a temporary Storybook-only type error: before this change, the public root command exited 0 while the direct Storybook check exited 1; after aggregation, the public command exited 1. The probe was removed before committing.

Verification:

  • cd js && pnpm lint — 667 files checked
  • cd js && pnpm type:check — root, UI, and Storybook all passed
  • cd js && pnpm test — 3,983 passed, 5 skipped
  • cd js && pnpm run build — production build passed
  • Pre-push hook — aggregate type-check plus 1,858 affected tests passed

Does this PR introduce a user-facing change?:

No.

NONE

Signed-off-by: Jared Scott <jared.scott@datarecce.io>
@gcko gcko self-assigned this Aug 5, 2026
@gcko
gcko requested review from kentwelcome and a lite review from Copilot August 5, 2026 08:01

@kentwelcome kentwelcome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kentwelcome
kentwelcome merged commit d803684 into main Aug 5, 2026
9 checks passed
@kentwelcome
kentwelcome deleted the feature/drc-3217-ensure-recce-frontend-type-check-validates-every-workspace branch August 5, 2026 08:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the JS monorepo’s TypeScript validation by making pnpm type:check run tsc for the root app, @datarecce/ui, and @datarecce/storybook using each workspace’s own tsconfig.json, and updates code to be compatible with Storybook’s ES2020 type-checking constraints.

Changes:

  • Aggregate pnpm type:check to run per-workspace checks, and add a dedicated Storybook type:check script.
  • Fix ES-target typing gaps by replacing Object.hasOwn / Object.groupBy usage and introducing a small hasOwn helper.
  • Update Storybook TS program inputs (includes shared declarations + required UI sources) and adjust UI tests to use colocated test utilities.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
js/packages/ui/src/utils/hasOwn.ts Adds an Object.hasOwn replacement compatible with ES2020 type-checking.
js/packages/ui/src/css.d.ts Provides *.css module typing for non-Next TS programs (e.g., Storybook).
js/packages/ui/src/components/ui/dataGrid/inlineRenderCell.tsx Switches Object.hasOwn checks to the new hasOwn helper.
js/packages/ui/src/components/ui/dataGrid/dataGridFactory.tsx Switches Object.hasOwn checks to the new hasOwn helper.
js/packages/ui/src/components/result/createResultView.testUtils.tsx Adds colocated mocks/providers for createResultView tests.
js/packages/ui/src/components/result/createResultView.test.tsx Updates mocks/imports to use the new colocated test utilities.
js/packages/ui/src/components/lineage/hooks/useTrackLineageRender.ts Replaces Object.groupBy with a reduce-based counter to avoid newer lib requirements.
js/packages/ui/src/components/lineage/changeCategory.ts Uses hasOwn helper to avoid Object.hasOwn typing requirements.
js/packages/storybook/tsconfig.json Expands include to cover required shared declarations and UI sources for Storybook type-checking.
js/packages/storybook/package.json Adds type:check script (tsc --noEmit).
js/package.json Makes root type:check run root + UI + Storybook checks, with a type:check:root leaf script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants