-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update order-properties to use sort-package-json (#55)
closes: #31 ### What - Replaced the `order-properties` sorting algorithm to use [sort-package-json](https://github.com/keithamus/sort-package-json). - Changed the type of `options` from an `Array<string>` to ```tsx { order?: "legacy" | "sort-package-json" | Array<string> } ``` - defaulted the sort order to `legacy` - Add additional testing to test options: "legacy" | "sort-package-json" . ### Callouts #### Option: `order: Array<string>` Previously, any property that was not provided in the `order: Array<string>` collection was ignored by the sort algorithm. Now that we are using `sort-package-json`, [a property that is not provided in the `order: Array<string>` will be sorted by the `defaultSortOrder` provided by the library.](https://github.com/keithamus/sort-package-json#optionssortorder) #### Sort-package-json version the latest version of sort-package-json is [an esm module](https://github.com/keithamus/sort-package-json/blob/main/package.json#L20) so I opted to use an earlier version to avoid heavy refactorign. This package can be bumped when #33 is merged. --------- Co-authored-by: Josh Goldberg <[email protected]>
- Loading branch information
1 parent
10c03c2
commit 6857660
Showing
5 changed files
with
695 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.