Skip to content

Commit d485280

Browse files
committed
add syncpack
1 parent f2559fc commit d485280

File tree

3 files changed

+115
-166
lines changed

3 files changed

+115
-166
lines changed

.syncpackrc.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// @ts-check
2+
3+
/**
4+
* Syncpack configuration file
5+
* Controls version management and package.json formatting across the monorepo
6+
* @see https://github.com/JamieMason/syncpack
7+
* @type {import("syncpack").RcFile}
8+
*/
9+
const config = {
10+
/**
11+
* Glob patterns for package.json files to process
12+
* Includes root, apps, libs, and tools directories
13+
*/
14+
source: ['package.json', 'packages/*/package.json'],
15+
16+
/**
17+
* Fields to sort alphabetically in package.json
18+
*/
19+
sortAz: [
20+
'contributors',
21+
'dependencies',
22+
'devDependencies',
23+
'keywords',
24+
'peerDependencies',
25+
'resolutions',
26+
'scripts',
27+
],
28+
29+
/**
30+
* Fields that should appear first in package.json, in this order
31+
*/
32+
sortFirst: ['name', 'description', 'version', 'author'],
33+
34+
/**
35+
* Version management rules for different package groups
36+
*/
37+
versionGroups: [
38+
{
39+
/** Ignore version syncing for peer dependencies */
40+
label: 'ignore peer dependencies',
41+
packages: ['**'],
42+
dependencyTypes: ['peer'],
43+
isIgnored: true,
44+
},
45+
// {
46+
// /** Align all package versions with those defined in @mono/root */
47+
// packages: ['**'],
48+
// dependencies: ['**'],
49+
// dependencyTypes: ['dev', 'prod', 'overrides', 'resolutions'],
50+
// snapTo: ['client-modules'],
51+
// },
52+
],
53+
};
54+
55+
module.exports = config;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"react-helmet": "6.1.0",
103103
"react-test-renderer": "18.2.0",
104104
"semver": "7.7.1",
105+
"syncpack": "^14.0.0-alpha.10",
105106
"turbo": "^1.1.2",
106107
"typescript": "4.4.2"
107108
},

0 commit comments

Comments
 (0)