We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pnpm-workspace.yaml
1 parent c7b09ad commit e84f668Copy full SHA for e84f668
src/io/pnpmWorkspaces.ts
@@ -59,13 +59,22 @@ export async function writePnpmWorkspace(
59
if (!Object.keys(versions).length)
60
return
61
62
+ let changed = false
63
+
64
if (catalogName === 'default') {
- pkg.raw.catalog = versions
65
+ if (JSON.stringify(pkg.raw.catalog) !== JSON.stringify(versions)) {
66
+ pkg.raw.catalog = versions
67
+ changed = true
68
+ }
69
}
70
else {
71
pkg.raw.catalogs ??= {}
- pkg.raw.catalogs[catalogName] = versions
72
+ if (pkg.raw.catalogs[catalogName] !== versions) {
73
+ pkg.raw.catalogs[catalogName] = versions
74
75
76
77
- await fs.writeFile(pkg.filepath, YAML.dump(pkg.raw), 'utf-8')
78
+ if (changed)
79
+ await fs.writeFile(pkg.filepath, YAML.dump(pkg.raw), 'utf-8')
80
0 commit comments