-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Fix docs:api
silent crash
#3808
Conversation
The problemThe problem started after merging #3219 yarn docs:api
yarn run v1.22.15
$ yarn docs:api:build
$ cross-env BABEL_ENV=development babel-node -i "/node_modules/(?!@mui)/" -x .ts,.tsx,.js ./docs/scripts/api/buildApi.ts
[BABEL] Note: The code generator has deoptimised the styling of /tmp/mui/node_modules/typescript/lib/typescript.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /tmp/mui/node_modules/lodash/lodash.js as it exceeds the max of 500KB.
Built API docs for GridApi
Built JSON file for GridSelectionApi
Built JSON file for GridFilterApi
Built JSON file for GridSortApi
Built JSON file for GridPaginationApi
Built JSON file for GridCsvExportApi
Built JSON file for GridScrollApi
Done in 66.00s.
CircleCI received exit code 0 Output from CI from previous commit yarn run v1.22.15
$ yarn docs:api:build
$ cross-env BABEL_ENV=development babel-node -i "/node_modules/(?!@mui)/" -x .ts,.tsx,.js ./docs/scripts/api/buildApi.ts
[BABEL] Note: The code generator has deoptimised the styling of /tmp/mui/node_modules/typescript/lib/typescript.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /tmp/mui/node_modules/lodash/lodash.js as it exceeds the max of 500KB.
Built API docs for GridApi
Built JSON file for GridSelectionApi
Built JSON file for GridFilterApi
Built JSON file for GridSortApi
Built JSON file for GridPaginationApi
Built JSON file for GridCsvExportApi
Built JSON file for GridScrollApi
Built JSON file for GridEditRowApi
Built JSON file for GridRowGroupingApi
Built JSON file for GridColumnPinningApi
Built JSON file for GridPrintExportApi
Built JSON file for GridDisableVirtualizationApi
Built API docs for GridCellParams
Built API docs for GridRowParams
Built API docs for GridColDef
Built API docs for GridCsvExportOptions
Built API docs for GridPrintExportOptions
Built API docs for GridFilterModel
Built API docs for GridFilterItem
Built API docs for GridFilterOperator
Built API docs for DataGrid
Built API docs for DataGridPro
Built events file
Done in 84.60s. The problem seems to be with parsing interface symbol for
The fixI've tried to fix it like this: diff --git a/packages/grid/_modules_/grid/models/api/index.ts b/packages/grid/_modules_/grid/models/api/index.ts
index 6d7b53c64..a05256371 100644
--- a/packages/grid/_modules_/grid/models/api/index.ts
+++ b/packages/grid/_modules_/grid/models/api/index.ts
@@ -25,5 +25,5 @@ export * from './gridScrollApi';
export * from './gridColumnPinningApi';
export * from './gridVirtualScrollerApi';
-export type { GridEditingApi };
+export type { GridEditingApi } from './gridEditingApi';
export type GridEditRowApi = GridEditingApi; It does not throw the error anymore, but it modifies diff --git a/scripts/x-data-grid.exports.json b/scripts/x-data-grid.exports.json
index 22c2bf742..a28ba7b68 100644
--- a/scripts/x-data-grid.exports.json
+++ b/scripts/x-data-grid.exports.json
@@ -65,7 +65,6 @@
{ "name": "GridCellClassFn", "kind": "TypeAlias" },
{ "name": "GridCellClassNamePropType", "kind": "TypeAlias" },
{ "name": "GridCellEditCommitParams", "kind": "Interface" },
- { "name": "GridCellEditingApi", "kind": "Interface" },
{ "name": "GridCellEventLookup", "kind": "Interface" },
{ "name": "GridCellIdentifier", "kind": "TypeAlias" },
{ "name": "GridCellIndexCoordinates", "kind": "Interface" },
@@ -160,11 +159,11 @@
{ "name": "GridEditCellProps", "kind": "Interface" },
{ "name": "GridEditCellPropsParams", "kind": "Interface" },
{ "name": "GridEditCellValueParams", "kind": "Interface" },
- { "name": "GridEditingApi", "kind": "Interface" },
- { "name": "GridEditingSharedApi", "kind": "Interface" },
+ { "name": "GridEditingApi", "kind": "ExportSpecifier" },
{ "name": "GridEditInputCell", "kind": "ExportSpecifier" },
{ "name": "GridEditMode", "kind": "TypeAlias" },
{ "name": "GridEditModes", "kind": "Enum" },
+ { "name": "GridEditRowApi", "kind": "TypeAlias" },
{ "name": "GridEditRowProps", "kind": "TypeAlias" },
{ "name": "GridEditRowsModel", "kind": "TypeAlias" },
{ "name": "gridEditRowsStateSelector", "kind": "Variable" },
@@ -297,7 +296,6 @@
{ "name": "GridRowCount", "kind": "ExportSpecifier" },
{ "name": "gridRowCountSelector", "kind": "Variable" },
{ "name": "GridRowData", "kind": "TypeAlias" },
- { "name": "GridRowEditingApi", "kind": "Interface" },
{ "name": "GridRowEntry", "kind": "TypeAlias" },
{ "name": "GridRowEventLookup", "kind": "Interface" }, I'm not sure if it's correct though. @m4theushw can you take a look? Does this output make sense to you? |
To be more specific
It looks okay. We only need to make sure that |
These are the results for the performance tests:
|
docs:api
silent crashdocs:api
silent crash
I've noticed that
yarn docs:api
doesn't update API docs in #3807It builds only part of the API and the silently crashes, here's the output:
I'll work on it to make sure: