Skip to content

Commit 02e73ef

Browse files
bloveclaude
andcommitted
fix(react): export the two types the public signatures name
CI caught what my local runs did not: `public-api-forgotten-exports` failed on `PretableFormulaEscapeInput` and `DataHonestyInput`. Both appear in public signatures — the first as the predicate's argument, the second dragged in by making `resolveDataScope` public — and neither was exported, so a consumer could name the function but not its parameter type. Worth recording why it reached CI at all: I had been verifying with `pnpm --filter @pretable/react test`, which does not include `scripts/__tests__/`. That directory is where this repo keeps its packaging and public-surface guards, and the root `pnpm test` is what runs them. `api:check` passes either way — api-extractor emits ae-forgotten-export as a WARNING, and the script test is the thing that fails closed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 3021d3e commit 02e73ef

4 files changed

Lines changed: 32 additions & 6 deletions

File tree

‎packages/react/react.api.md‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ export type CreateLocalRowModelWithDefaultIdOptions<TColumns> = (TColumns extend
155155
readonly getRowId?: undefined;
156156
}> : never;
157157

158+
// @public
159+
export interface DataHonestyInput {
160+
// (undocumented)
161+
isGrouped: boolean;
162+
// (undocumented)
163+
loadedRowCount: number;
164+
// (undocumented)
165+
matchingTotal: PretableMatchingTotal;
166+
// (undocumented)
167+
visibleRowCount: number;
168+
}
169+
158170
// @public
159171
export function defaultCoerceForCopy(value: unknown): string;
160172

@@ -1067,8 +1079,14 @@ interface PretableFormatInput<TRow extends object, TValue = unknown, TColumn = u
10671079
export { PretableFormatInput as PretableCoreFormatInput }
10681080
export { PretableFormatInput }
10691081

1070-
// Warning: (ae-forgotten-export) The symbol "PretableFormulaEscapeInput" needs to be exported by the entry point index.d.ts
1071-
//
1082+
// @public
1083+
export interface PretableFormulaEscapeInput {
1084+
// (undocumented)
1085+
columnId: string;
1086+
raw: unknown;
1087+
type: ColumnType | undefined;
1088+
}
1089+
10721090
// @public
10731091
export type PretableFormulaEscapePredicate = (value: string, input: PretableFormulaEscapeInput) => boolean;
10741092

@@ -2364,8 +2382,6 @@ export interface RejectedPasteCell<TRowId extends PretableRowId = PretableRowId>
23642382
rowId: TRowId;
23652383
}
23662384

2367-
// Warning: (ae-forgotten-export) The symbol "DataHonestyInput" needs to be exported by the entry point index.d.ts
2368-
//
23692385
// @public
23702386
export function resolveDataScope(input: Pick<DataHonestyInput, "loadedRowCount" | "matchingTotal">, processing: PretableProcessingOptions | undefined): "all" | "loaded";
23712387

‎packages/react/src/csv.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ function isProvablyNotAFormula(raw: unknown): boolean {
6666
);
6767
}
6868

69-
/** Context a formula-escape predicate is given about the cell it is judging. */
69+
/**
70+
* Context a formula-escape predicate is given about the cell it is judging.
71+
*
72+
* @public
73+
*/
7074
export interface PretableFormulaEscapeInput {
7175
/** The column's declared type, if it has one. */
7276
type: ColumnType | undefined;

‎packages/react/src/data-scope.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import type {
55

66
import { warnOnce } from "./dev-warn";
77

8-
/** The snapshot fields these rules read. Structural so tests can pass literals. */
8+
/**
9+
* The snapshot fields these rules read. Structural so tests can pass literals.
10+
*
11+
* @public
12+
*/
913
export interface DataHonestyInput {
1014
visibleRowCount: number;
1115
isGrouped: boolean;

‎packages/react/src/public_api.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@ export type {
131131
PretableCsvFile,
132132
PretableCsvOptions,
133133
PretableExportScope,
134+
PretableFormulaEscapeInput,
134135
PretableFormulaEscapePredicate,
135136
SerializeCsvArgs,
136137
} from "./csv";
137138
export { resolveDataScope } from "./data-scope";
139+
export type { DataHonestyInput } from "./data-scope";
138140
export { buildExportFileName, defaultSaveFile, toCsvBlob } from "./save-file";
139141
export type { BuildExportFileNameArgs, SaveFileOptions } from "./save-file";
140142

0 commit comments

Comments
 (0)