Skip to content

Commit 9f644bb

Browse files
authored
Merge pull request #4868 from VisActor/fix/github_release_ci_build_error
Fix/GitHub release ci build error
2 parents 92cf38b + 4c29365 commit 9f644bb

39 files changed

Lines changed: 426 additions & 210 deletions

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,21 @@ jobs:
5454
- name: Build packages
5555
env:
5656
NODE_OPTIONS: "--max_old_space_size=4096"
57-
run: node common/scripts/install-run-rush.js build --only tag:package
57+
NO_EMIT_ON_ERROR: "true"
58+
run: |
59+
# 设置环境变量确保错误信息完整输出
60+
export NODE_OPTIONS="--max_old_space_size=4096"
61+
export NO_EMIT_ON_ERROR="true"
62+
# 运行构建,并将输出保存到文件
63+
node common/scripts/install-run-rush.js build --only tag:package 2>&1 | tee build.log || {
64+
echo "=== Build failed, showing last 1000 lines of build.log ==="
65+
tail -n 1000 build.log
66+
echo "=== Full error details ==="
67+
# 尝试从日志中提取错误信息
68+
grep -A 50 "TypeScript Compilation Errors" build.log || true
69+
grep -A 50 "Build Error" build.log || true
70+
exit 1
71+
}
5872
5973
# - name: Run Bugserver
6074
# working-directory: ./packages/vtable

packages/openinula-vtable/src/components/pivot/pivot-dimension.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { BaseComponentProps } from '../base-component';
22
import { createComponent } from '../base-component';
3-
import type { IRowDimension, IColumnDimension } from '@visactor/vtable';
3+
import type { TYPES } from '@visactor/vtable';
4+
type IRowDimension = TYPES.IRowDimension;
5+
type IColumnDimension = TYPES.IColumnDimension;
46

57
export type RowPivotDimensionProps = IRowDimension & BaseComponentProps;
68
export type ColumnPivotDimensionProps = IColumnDimension & BaseComponentProps;

packages/openinula-vtable/src/containers/withContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ export default function withContainer<Props extends ContainerProps, CompProps>(
4141
</div>
4242
);
4343
});
44-
Cls.displayName = name || Comp.name;
44+
(Cls as any).displayName = name || Comp.name;
4545
return Cls;
4646
}

packages/openinula-vtable/src/context/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function withTableInstance<T>(Component: typeof Inula.Component) {
2020
</TableContext.Consumer>
2121
);
2222
});
23-
Com.displayName = Component.name;
23+
(Com as any).displayName = Component.name;
2424
return Com;
2525
}
2626

packages/openinula-vtable/src/tables/base-table.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface BaseTableProps extends EventsProps {
5050
onError?: (err: Error) => void;
5151
}
5252

53-
type Props = Inula.PropsWithChildren<BaseTableProps>;
53+
type Props = BaseTableProps & { children?: Inula.InulaNode };
5454

5555
const notOptionKeys = [
5656
...INULA_PRIVATE_PROPS,
@@ -204,9 +204,12 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
204204
!isEqual(eventsBinded.current.records, props.records, { skipFunction: skipFunctionDiff })
205205
) {
206206
eventsBinded.current = props;
207-
tableContext.current.table.setRecords(props.records as any[], {
208-
restoreHierarchyState: props.option.restoreHierarchyState
209-
});
207+
tableContext.current.table.setRecords(
208+
props.records as any[],
209+
{
210+
restoreHierarchyState: props.option.restoreHierarchyState
211+
} as any
212+
);
210213
handleTableRender();
211214
}
212215
return;
@@ -229,7 +232,7 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
229232
prevRecords.current = props.records;
230233
tableContext.current.table.setRecords(props.records, {
231234
restoreHierarchyState: props.option?.restoreHierarchyState
232-
});
235+
} as any);
233236
handleTableRender();
234237
}
235238
// tableContext.current = {
@@ -255,7 +258,7 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
255258
<RootTableContext.Provider value={tableContext.current}>
256259
{toArray(props.children).map((child: Inula.InulaNode, index: number) => {
257260
if (typeof child === 'string') {
258-
return;
261+
return null;
259262
}
260263

261264
const childId = getComponentId(child, index);
@@ -295,6 +298,6 @@ export const createTable = <T extends Props>(componentName: string, type?: strin
295298
}
296299
return props;
297300
});
298-
Com.displayName = componentName;
301+
(Com as any).displayName = componentName;
299302
return Com;
300303
};

packages/openinula-vtable/src/tables/list-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export interface ListTableProps
77
extends Omit<BaseTableProps, 'records' | 'type'>,
88
Omit<ListTableConstructorOptions, 'container'> {}
99

10-
export const ListTable = createTable<Inula.PropsWithChildren<ListTableProps>>('ListTable', 'list-table');
10+
export const ListTable = createTable<ListTableProps & { children?: Inula.InulaNode }>('ListTable', 'list-table');

packages/openinula-vtable/src/tables/pivot-chart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { createTable } from './base-table';
66

77
export interface PivotChartProps
88
extends Omit<BaseTableProps, 'records' | 'type'>,
9-
Omit<PivotChartConstructorOptions, 'container'> {}
9+
Omit<PivotChartConstructorOptions, 'container' | 'records'> {}
1010

11-
export const PivotChart = createTable<Inula.PropsWithChildren<PivotChartProps>>('PivotChart', 'pivot-chart');
11+
export const PivotChart = createTable<PivotChartProps & { children?: Inula.InulaNode }>('PivotChart', 'pivot-chart');
1212

1313
export function registerChartModule(name: string, chart: any) {
1414
VTable.register.chartModule(name, chart);

packages/openinula-vtable/src/tables/pivot-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export interface PivotTableProps
77
extends Omit<BaseTableProps, 'records' | 'type'>,
88
Omit<PivotTableConstructorOptions, 'container'> {}
99

10-
export const PivotTable = createTable<Inula.PropsWithChildren<PivotTableProps>>('PivotTable', 'pivot-table');
10+
export const PivotTable = createTable<PivotTableProps & { children?: Inula.InulaNode }>('PivotTable', 'pivot-table');

packages/react-vtable/src/containers/withContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function withContainer<Props extends ContainerProps, CompProps>(
1212
name = 'TableContainer',
1313
getProps?: (props: any) => CompProps
1414
) {
15-
const Cls = React.forwardRef<any, CompProps & Props>((props: CompProps & Props, ref) => {
15+
const Cls = React.forwardRef<any, any>((props: any, ref) => {
1616
const container = useRef();
1717
const [inited, setInited] = useState(false);
1818
const { className, style, width, ...options } = props;

packages/react-vtable/src/context/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const TableContext = React.createContext<TableContextType>(null);
1111
TableContext.displayName = 'TableContext';
1212

1313
export function withTableInstance<T>(Component: typeof React.Component) {
14-
const Com = React.forwardRef<any, T>((props: T, ref) => {
14+
const Com = React.forwardRef<any, any>((props: any, ref) => {
1515
return (
1616
<TableContext.Consumer>
1717
{(ctx: TableContextType) => <Component ref={ref} table={ctx.table} {...props} />}

0 commit comments

Comments
 (0)