Skip to content

Commit

Permalink
feat(nx-dev): display deprecated schema options last (#14518)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes committed Jan 20, 2023
1 parent f8854d7 commit 7193b85
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

1 comment on commit 7193b85

@vercel
Copy link

@vercel vercel bot commented on 7193b85 Jan 20, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.