Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ jobs:
- setup_node_modules
- run: node ./scripts/tasks/flow-ci


yarn_flags:
docker: *docker
environment: *environment

steps:
- checkout
- setup_node_modules
- run: yarn flags

scrape_warning_messages:
docker: *docker
environment: *environment
Expand Down Expand Up @@ -400,6 +410,11 @@ workflows:
build_and_test:
unless: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- yarn_flags:
filters:
branches:
ignore:
- builds/facebook-www
- yarn_flow:
filters:
branches:
Expand Down
14 changes: 9 additions & 5 deletions scripts/flags/flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,15 @@ for (const flag of allFlagsUniqueFlags) {
let sorted = table;
if (isDiff || argv.sort) {
const sortChannel = argToHeader(isDiff ? argv.diff[0] : argv.sort);
sorted = Object.fromEntries(
Object.entries(table).sort(([, rowA], [, rowB]) =>
rowB[sortChannel].toString().localeCompare(rowA[sortChannel])
)
);
const sortBy =
sortChannel === 'flag'
? ([flagA], [flagB]) => {
return flagA.localeCompare(flagB);
}
: ([, rowA], [, rowB]) => {
return rowB[sortChannel].toString().localeCompare(rowA[sortChannel]);
};
sorted = Object.fromEntries(Object.entries(table).sort(sortBy));
}

if (argv.csv) {
Expand Down