From b4fbc3b41ec0264b6cfa8171b5c68f79f695424d Mon Sep 17 00:00:00 2001 From: Ryan Lee Date: Tue, 6 Jun 2023 16:05:06 -0400 Subject: [PATCH 1/2] chore: sort sync package json deps --- cli/sync.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/sync.ts b/cli/sync.ts index db458f984..cfa05824f 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -71,6 +71,13 @@ async function runSync({ delete packageJson.dependencies[packageName] } } + packageJson.dependencies = Object.keys(packageJson.dependencies).sort().reduce( + (obj, key) => { + obj[key] = packageJson.dependencies[key] + return obj + }, + {} as Record, + ) }) } From 1ab060b45e8c34646ad41b07df16574b854f9951 Mon Sep 17 00:00:00 2001 From: Ryan Lee Date: Wed, 7 Jun 2023 13:00:10 -0400 Subject: [PATCH 2/2] comments --- cli/sync.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cli/sync.ts b/cli/sync.ts index cfa05824f..5c2e94ce4 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -71,13 +71,8 @@ async function runSync({ delete packageJson.dependencies[packageName] } } - packageJson.dependencies = Object.keys(packageJson.dependencies).sort().reduce( - (obj, key) => { - obj[key] = packageJson.dependencies[key] - return obj - }, - {} as Record, - ) + + packageJson.dependencies = Object.fromEntries(Object.entries(packageJson.dependencies).sort()) }) }