Repository navigation
Expand file tree
/
Copy path.syncpackrc.js
More file actions
97 lines (95 loc) · 2.49 KB
/
Copy path.syncpackrc.js
File metadata and controls
97 lines (95 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// @ts-check
/** @type {import("syncpack").RcFile} */
const config = {
versionGroups: [
{
// Use workspace protocol for internal @thdk packages
dependencies: ['@thdk/**'],
dependencyTypes: ['prod', 'dev', 'peer'],
pinVersion: 'workspace:*',
},
{
// A published plugin's `nx` / `@nx/*` peer range is an author-controlled
// compatibility contract — don't align its version to the workspace's nx.
dependencies: ['@nx/**', 'nx'],
dependencyTypes: ['peer'],
isIgnored: true,
},
{
label:
'@nx/* packages are only allowed in root and custom nx plugins, not in any other libs/apps',
dependencies: ['@nx/**', 'nx'],
packages: [
'!@thdk/source',
'!@thdk/nx-terraform',
'!@thdk/nx-pnpm-deploy',
'!@thdk/scripts',
'!@thdk/nx-ts',
'!@thdk/nx-claude',
],
isBanned: true,
},
],
semverGroups: [
{
// A published plugin's `nx` / `@nx/*` peer range is a deliberate compatibility
// contract (e.g. ">=23.1.0 <25.0.0"); leave it under author control rather than
// forcing "^" or aligning it to the workspace's own nx version.
dependencies: ['@nx/**', 'nx'],
dependencyTypes: ['peer'],
isIgnored: true,
},
{
// Published packages (consumed by other repos) must not pin their runtime deps
// to exact versions — use "^". Only prod deps ship, so dev/peer are excluded:
// devDeps are stripped on publish, and peer ranges (e.g. react ">=19.0.0") are
// deliberately permissive and must not be narrowed.
range: '^',
dependencyTypes: ['prod'],
dependencies: ['**'],
packages: [
'@thdk/lib-c',
'@thdk/nx-claude',
'@thdk/react-components-css-vite',
],
},
// all other dependencies should be locked to the exact same version
{
range: '',
dependencyTypes: [
'dev',
'prod',
'resolutions',
'overrides',
'pnpmOverrides',
'local',
],
},
],
sortFirst: [
'name',
'description',
'version',
'private',
'author',
'license',
'type',
'main',
'module',
'types',
'exports',
'nx',
'scripts',
],
sortAz: [
'contributors',
'dependencies',
'devDependencies',
'keywords',
'peerDependencies',
'scripts',
],
sortExports: ['types', 'development', 'import', 'require', 'default'],
sortPackages: true,
};
module.exports = config;