Skip to content

Commit 9d4f371

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent db882d9 commit 9d4f371

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/sync-component-exports.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@ const preservedExports = Object.fromEntries(
99
Object.entries(packageJson.exports || {}).filter(([subpath]) => !subpath.startsWith('./components/'))
1010
)
1111

12-
packageJson.exports = {
12+
const nextExports = {
1313
...preservedExports,
1414
...componentExports
1515
}
1616

17+
if (JSON.stringify(packageJson.exports || {}) === JSON.stringify(nextExports)) {
18+
console.log('package.json exports are already in sync')
19+
process.exit(0)
20+
}
21+
22+
packageJson.exports = nextExports
23+
1724
writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`)

0 commit comments

Comments
 (0)