Skip to content

Commit

Permalink
feat(nx-dev): display deprecated schema options last
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes committed Jan 20, 2023
1 parent 61f7a9a commit 94897fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions nx-dev/feature-package-schema-viewer/src/lib/schema-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,28 @@ function getViewModel(
}

function extractPropertiesByImportance(properties: PropertyModel[]): {
required: PropertyModel[];
deprecated: PropertyModel[];
important: PropertyModel[];
internal: PropertyModel[];
required: PropertyModel[];
rest: PropertyModel[];
} {
const result: {
required: PropertyModel[];
deprecated: PropertyModel[];
important: PropertyModel[];
internal: PropertyModel[];
required: PropertyModel[];
rest: PropertyModel[];
} = {
required: [],
deprecated: [],
important: [],
internal: [],
required: [],
rest: [],
};
for (const property of properties) {
if (property.isRequired) {
result.required.push(property);
if (isPropertyDeprecated(property.initialSchema)) {
result.deprecated.push(property);
continue;
}
if (
Expand Down Expand Up @@ -158,6 +161,7 @@ export function SchemaViewer({
...categorizedProperties.important,
...categorizedProperties.rest,
...categorizedProperties.internal,
...categorizedProperties.deprecated,
]);

const additionalProperties = new Array<JSX.Element>();
Expand Down

0 comments on commit 94897fd

Please sign in to comment.