Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/verify-generated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify Generated Artifacts

on:
pull_request:
workflow_dispatch:

jobs:
verify-generated-content:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run generation scripts
run: |
bun scripts/generate-component-types.ts
bun scripts/generate-manual-edits-docs.ts
bun scripts/generate-readme-docs.ts
bun scripts/generate-props-overview.ts

- name: Ensure working tree is clean
run: |
if ! git diff --quiet; then
echo "Generated files are out of date. Please run the generation scripts and commit the results." >&2
git status --short
Comment on lines +23 to +34

Choose a reason for hiding this comment

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

P1 Badge Avoid non-deterministic diff in generated verification workflow

The verification job always runs scripts/generate-props-overview.ts, which rewrites generated/PROPS_OVERVIEW.md with > Generated at ${new Date().toISOString()} on each invocation. Even when the committed artifacts are up to date, this timestamp changes on CI and git diff --quiet will fail, blocking every PR. The workflow needs to ignore the timestamp, make the generator deterministic, or skip that file entirely so that a clean working tree is possible.

Useful? React with 👍 / 👎.

exit 1
fi
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Repository Guidance

This repository contains the generated props documentation and supporting scripts for the `@tscircuit/props` package. Many files—especially under `docs/` and `generated/`—are produced by scripts inside the `scripts/` directory. Keeping these generated artifacts in sync is critical for ensuring the package consumers receive up-to-date information.

## Required Workflow Before Committing
- Always run the generation scripts and include their results in your commit before opening a pull request or merging changes. Run the scripts with:
```sh
bun scripts/generate-component-types.ts
bun scripts/generate-manual-edits-docs.ts
bun scripts/generate-readme-docs.ts
bun scripts/generate-props-overview.ts
```
- After running the scripts, confirm that `git status` reports a clean working tree (or that you have staged all generated changes) before committing.

Following these steps helps prevent CI failures and ensures generated content stays in sync with the source definitions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,12 @@ export interface PlatformConfig {
>;

footprintFileParserMap?: Record<string, FootprintFileParserEntry>;

simSwitchFrequency?: number | string;
simCloseAt?: number | string;
simOpenAt?: number | string;
simStartClosed?: boolean;
simStartOpen?: boolean;
}
```

Expand Down
8 changes: 7 additions & 1 deletion generated/PROPS_OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @tscircuit/props Overview

> Generated at 2025-10-03T23:04:08.599Z
> Generated at 2025-10-04T18:42:43.137Z
> Latest version: https://github.com/tscircuit/props/blob/main/generated/PROPS_OVERVIEW.md

This document provides an overview of all the prop types available in @tscircuit/props.
Expand Down Expand Up @@ -1070,6 +1070,12 @@ export interface PlatformConfig {
>

footprintFileParserMap?: Record<string, FootprintFileParserEntry>

simSwitchFrequency?: number | string
simCloseAt?: number | string
simOpenAt?: number | string
simStartClosed?: boolean
simStartOpen?: boolean
}


Expand Down
Loading