syncpack 9.8.4 → 9.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +12 -13
  2. package/dist/bin-fix-mismatches/fix-mismatches.js +5 -4
  3. package/dist/bin-format/format.js +3 -3
  4. package/dist/bin-list/list.js +5 -3
  5. package/dist/bin-list-mismatches/list-mismatches.js +9 -8
  6. package/dist/get-context/$R.d.ts +8 -9
  7. package/dist/get-context/$R.js +13 -12
  8. package/dist/get-context/get-config/get-custom-types.js +1 -1
  9. package/dist/get-context/get-config/get-enabled-types.js +3 -3
  10. package/dist/get-context/get-config/index.d.ts +2 -3
  11. package/dist/get-context/get-config/index.js +21 -14
  12. package/dist/get-context/get-config/path-strategy/lib/get-non-empty-string-prop.d.ts +2 -3
  13. package/dist/get-context/get-config/path-strategy/lib/get-non-empty-string-prop.js +6 -4
  14. package/dist/get-context/get-config/path-strategy/name-and-version-props.js +15 -11
  15. package/dist/get-context/get-config/path-strategy/name-and-version-string.js +17 -12
  16. package/dist/get-context/get-config/path-strategy/types.d.ts +3 -4
  17. package/dist/get-context/get-config/path-strategy/version-string.js +17 -12
  18. package/dist/get-context/get-config/path-strategy/versions-by-name.js +10 -12
  19. package/dist/get-context/get-config/schema/index.d.ts +272 -272
  20. package/dist/get-context/get-config/schema/semver-group.d.ts +18 -18
  21. package/dist/get-context/get-config/schema/version-group.d.ts +40 -40
  22. package/dist/get-context/get-groups/base-group.js +1 -1
  23. package/dist/get-context/get-groups/index.d.ts +2 -3
  24. package/dist/get-context/get-groups/index.js +4 -2
  25. package/dist/get-context/get-groups/version-group/index.d.ts +3 -3
  26. package/dist/get-context/get-groups/version-group/index.js +11 -7
  27. package/dist/get-context/get-groups/version-group/instance-group/get-highest-version.d.ts +2 -3
  28. package/dist/get-context/get-groups/version-group/instance-group/get-highest-version.js +5 -5
  29. package/dist/get-context/get-groups/version-group/instance-group/get-lowest-version.d.ts +2 -3
  30. package/dist/get-context/get-groups/version-group/instance-group/get-lowest-version.js +4 -4
  31. package/dist/get-context/get-groups/version-group/instance-group/index.d.ts +8 -9
  32. package/dist/get-context/get-groups/version-group/instance-group/index.js +30 -15
  33. package/dist/get-context/get-package-json-files/get-file-paths.d.ts +2 -3
  34. package/dist/get-context/get-package-json-files/get-file-paths.js +14 -24
  35. package/dist/get-context/get-package-json-files/get-patterns/get-lerna-patterns.d.ts +2 -3
  36. package/dist/get-context/get-package-json-files/get-patterns/get-lerna-patterns.js +6 -5
  37. package/dist/get-context/get-package-json-files/get-patterns/get-pnpm-patterns.d.ts +2 -3
  38. package/dist/get-context/get-package-json-files/get-patterns/get-pnpm-patterns.js +7 -6
  39. package/dist/get-context/get-package-json-files/get-patterns/get-yarn-patterns.d.ts +2 -3
  40. package/dist/get-context/get-package-json-files/get-patterns/get-yarn-patterns.js +7 -6
  41. package/dist/get-context/get-package-json-files/get-patterns/index.d.ts +2 -3
  42. package/dist/get-context/get-package-json-files/get-patterns/index.js +8 -17
  43. package/dist/get-context/get-package-json-files/get-patterns/read-json-safe.d.ts +2 -3
  44. package/dist/get-context/get-package-json-files/get-patterns/read-json-safe.js +6 -9
  45. package/dist/get-context/get-package-json-files/get-patterns/read-yaml-safe.d.ts +2 -3
  46. package/dist/get-context/get-package-json-files/get-patterns/read-yaml-safe.js +4 -3
  47. package/dist/get-context/get-package-json-files/index.d.ts +2 -3
  48. package/dist/get-context/get-package-json-files/index.js +7 -5
  49. package/dist/get-context/get-package-json-files/package-json-file/index.js +7 -5
  50. package/dist/get-context/get-package-json-files/package-json-file/instance.js +5 -5
  51. package/dist/get-context/index.js +9 -6
  52. package/dist/lib/disk.js +1 -1
  53. package/dist/lib/is-semver.js +1 -1
  54. package/dist/lib/log.js +1 -1
  55. package/package.json +17 -18
  56. package/dist/get-context/get-package-json-files/get-patterns/lib/get-array-of-strings.d.ts +0 -1
  57. package/dist/get-context/get-package-json-files/get-patterns/lib/get-array-of-strings.js +0 -8
  58. package/dist/get-context/get-package-json-files/get-patterns/props.d.ts +0 -6
  59. package/dist/get-context/get-package-json-files/get-patterns/props.js +0 -24
@@ -6,17 +6,17 @@ export declare const ignored: z.ZodObject<{
6
6
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
7
7
  packages: z.ZodArray<z.ZodString, "many">;
8
8
  }, "strict", z.ZodTypeAny, {
9
- dependencyTypes?: string[] | undefined;
10
- label?: string | undefined;
11
9
  dependencies: string[];
12
10
  packages: string[];
13
11
  isIgnored: true;
14
- }, {
15
12
  dependencyTypes?: string[] | undefined;
16
13
  label?: string | undefined;
14
+ }, {
17
15
  dependencies: string[];
18
16
  packages: string[];
19
17
  isIgnored: true;
18
+ dependencyTypes?: string[] | undefined;
19
+ label?: string | undefined;
20
20
  }>;
21
21
  export declare const withRange: z.ZodObject<{
22
22
  range: z.ZodEnum<["*", "", ">", ">=", ".x", "<", "<=", "^", "~"]>;
@@ -25,17 +25,17 @@ export declare const withRange: z.ZodObject<{
25
25
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
26
26
  packages: z.ZodArray<z.ZodString, "many">;
27
27
  }, "strict", z.ZodTypeAny, {
28
- dependencyTypes?: string[] | undefined;
29
- label?: string | undefined;
30
28
  dependencies: string[];
31
29
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
32
30
  packages: string[];
33
- }, {
34
31
  dependencyTypes?: string[] | undefined;
35
32
  label?: string | undefined;
33
+ }, {
36
34
  dependencies: string[];
37
35
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
38
36
  packages: string[];
37
+ dependencyTypes?: string[] | undefined;
38
+ label?: string | undefined;
39
39
  }>;
40
40
  export declare const base: z.ZodObject<{
41
41
  range: z.ZodEnum<["*", "", ">", ">=", ".x", "<", "<=", "^", "~"]>;
@@ -45,19 +45,19 @@ export declare const base: z.ZodObject<{
45
45
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
46
46
  packages: z.ZodArray<z.ZodString, "many">;
47
47
  }, "strict", z.ZodTypeAny, {
48
- dependencyTypes?: string[] | undefined;
49
- label?: string | undefined;
50
48
  isDefault: true;
51
49
  dependencies: string[];
52
50
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
53
51
  packages: string[];
54
- }, {
55
52
  dependencyTypes?: string[] | undefined;
56
53
  label?: string | undefined;
54
+ }, {
57
55
  isDefault: true;
58
56
  dependencies: string[];
59
57
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
60
58
  packages: string[];
59
+ dependencyTypes?: string[] | undefined;
60
+ label?: string | undefined;
61
61
  }>;
62
62
  export declare const any: z.ZodUnion<[z.ZodObject<{
63
63
  isIgnored: z.ZodLiteral<true>;
@@ -66,17 +66,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
66
66
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
67
67
  packages: z.ZodArray<z.ZodString, "many">;
68
68
  }, "strict", z.ZodTypeAny, {
69
- dependencyTypes?: string[] | undefined;
70
- label?: string | undefined;
71
69
  dependencies: string[];
72
70
  packages: string[];
73
71
  isIgnored: true;
74
- }, {
75
72
  dependencyTypes?: string[] | undefined;
76
73
  label?: string | undefined;
74
+ }, {
77
75
  dependencies: string[];
78
76
  packages: string[];
79
77
  isIgnored: true;
78
+ dependencyTypes?: string[] | undefined;
79
+ label?: string | undefined;
80
80
  }>, z.ZodObject<{
81
81
  range: z.ZodEnum<["*", "", ">", ">=", ".x", "<", "<=", "^", "~"]>;
82
82
  dependencies: z.ZodArray<z.ZodString, "many">;
@@ -84,17 +84,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
84
84
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
85
85
  packages: z.ZodArray<z.ZodString, "many">;
86
86
  }, "strict", z.ZodTypeAny, {
87
- dependencyTypes?: string[] | undefined;
88
- label?: string | undefined;
89
87
  dependencies: string[];
90
88
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
91
89
  packages: string[];
92
- }, {
93
90
  dependencyTypes?: string[] | undefined;
94
91
  label?: string | undefined;
92
+ }, {
95
93
  dependencies: string[];
96
94
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
97
95
  packages: string[];
96
+ dependencyTypes?: string[] | undefined;
97
+ label?: string | undefined;
98
98
  }>, z.ZodObject<{
99
99
  range: z.ZodEnum<["*", "", ">", ">=", ".x", "<", "<=", "^", "~"]>;
100
100
  isDefault: z.ZodLiteral<true>;
@@ -103,17 +103,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
103
103
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
104
104
  packages: z.ZodArray<z.ZodString, "many">;
105
105
  }, "strict", z.ZodTypeAny, {
106
- dependencyTypes?: string[] | undefined;
107
- label?: string | undefined;
108
106
  isDefault: true;
109
107
  dependencies: string[];
110
108
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
111
109
  packages: string[];
112
- }, {
113
110
  dependencyTypes?: string[] | undefined;
114
111
  label?: string | undefined;
112
+ }, {
115
113
  isDefault: true;
116
114
  dependencies: string[];
117
115
  range: "" | "*" | ">" | ">=" | ".x" | "<" | "<=" | "^" | "~";
118
116
  packages: string[];
117
+ dependencyTypes?: string[] | undefined;
118
+ label?: string | undefined;
119
119
  }>]>;
@@ -6,17 +6,17 @@ export declare const standard: z.ZodObject<{
6
6
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
7
7
  packages: z.ZodArray<z.ZodString, "many">;
8
8
  }, "strict", z.ZodTypeAny, {
9
- dependencyTypes?: string[] | undefined;
10
- label?: string | undefined;
11
9
  dependencies: string[];
12
10
  packages: string[];
13
11
  preferVersion: "highestSemver" | "lowestSemver";
14
- }, {
15
12
  dependencyTypes?: string[] | undefined;
16
13
  label?: string | undefined;
17
- preferVersion?: "highestSemver" | "lowestSemver" | undefined;
14
+ }, {
18
15
  dependencies: string[];
19
16
  packages: string[];
17
+ preferVersion?: "highestSemver" | "lowestSemver" | undefined;
18
+ dependencyTypes?: string[] | undefined;
19
+ label?: string | undefined;
20
20
  }>;
21
21
  export declare const banned: z.ZodObject<{
22
22
  isBanned: z.ZodLiteral<true>;
@@ -25,17 +25,17 @@ export declare const banned: z.ZodObject<{
25
25
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
26
26
  packages: z.ZodArray<z.ZodString, "many">;
27
27
  }, "strict", z.ZodTypeAny, {
28
- dependencyTypes?: string[] | undefined;
29
- label?: string | undefined;
30
28
  dependencies: string[];
31
29
  packages: string[];
32
30
  isBanned: true;
33
- }, {
34
31
  dependencyTypes?: string[] | undefined;
35
32
  label?: string | undefined;
33
+ }, {
36
34
  dependencies: string[];
37
35
  packages: string[];
38
36
  isBanned: true;
37
+ dependencyTypes?: string[] | undefined;
38
+ label?: string | undefined;
39
39
  }>;
40
40
  export declare const ignored: z.ZodObject<{
41
41
  isIgnored: z.ZodLiteral<true>;
@@ -44,17 +44,17 @@ export declare const ignored: z.ZodObject<{
44
44
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
45
45
  packages: z.ZodArray<z.ZodString, "many">;
46
46
  }, "strict", z.ZodTypeAny, {
47
- dependencyTypes?: string[] | undefined;
48
- label?: string | undefined;
49
47
  dependencies: string[];
50
48
  packages: string[];
51
49
  isIgnored: true;
52
- }, {
53
50
  dependencyTypes?: string[] | undefined;
54
51
  label?: string | undefined;
52
+ }, {
55
53
  dependencies: string[];
56
54
  packages: string[];
57
55
  isIgnored: true;
56
+ dependencyTypes?: string[] | undefined;
57
+ label?: string | undefined;
58
58
  }>;
59
59
  export declare const pinned: z.ZodObject<{
60
60
  pinVersion: z.ZodString;
@@ -63,17 +63,17 @@ export declare const pinned: z.ZodObject<{
63
63
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
64
64
  packages: z.ZodArray<z.ZodString, "many">;
65
65
  }, "strict", z.ZodTypeAny, {
66
- dependencyTypes?: string[] | undefined;
67
- label?: string | undefined;
68
66
  dependencies: string[];
69
67
  packages: string[];
70
68
  pinVersion: string;
71
- }, {
72
69
  dependencyTypes?: string[] | undefined;
73
70
  label?: string | undefined;
71
+ }, {
74
72
  dependencies: string[];
75
73
  packages: string[];
76
74
  pinVersion: string;
75
+ dependencyTypes?: string[] | undefined;
76
+ label?: string | undefined;
77
77
  }>;
78
78
  export declare const snappedTo: z.ZodObject<{
79
79
  snapTo: z.ZodArray<z.ZodString, "many">;
@@ -82,17 +82,17 @@ export declare const snappedTo: z.ZodObject<{
82
82
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
83
83
  packages: z.ZodArray<z.ZodString, "many">;
84
84
  }, "strict", z.ZodTypeAny, {
85
- dependencyTypes?: string[] | undefined;
86
- label?: string | undefined;
87
85
  dependencies: string[];
88
86
  packages: string[];
89
87
  snapTo: string[];
90
- }, {
91
88
  dependencyTypes?: string[] | undefined;
92
89
  label?: string | undefined;
90
+ }, {
93
91
  dependencies: string[];
94
92
  packages: string[];
95
93
  snapTo: string[];
94
+ dependencyTypes?: string[] | undefined;
95
+ label?: string | undefined;
96
96
  }>;
97
97
  export declare const defaultGroup: z.ZodObject<{
98
98
  isDefault: z.ZodLiteral<true>;
@@ -102,19 +102,19 @@ export declare const defaultGroup: z.ZodObject<{
102
102
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
103
103
  packages: z.ZodArray<z.ZodString, "many">;
104
104
  }, "strict", z.ZodTypeAny, {
105
- dependencyTypes?: string[] | undefined;
106
- label?: string | undefined;
107
105
  isDefault: true;
108
106
  dependencies: string[];
109
107
  packages: string[];
110
108
  preferVersion: "highestSemver" | "lowestSemver";
111
- }, {
112
109
  dependencyTypes?: string[] | undefined;
113
110
  label?: string | undefined;
114
- preferVersion?: "highestSemver" | "lowestSemver" | undefined;
111
+ }, {
115
112
  isDefault: true;
116
113
  dependencies: string[];
117
114
  packages: string[];
115
+ preferVersion?: "highestSemver" | "lowestSemver" | undefined;
116
+ dependencyTypes?: string[] | undefined;
117
+ label?: string | undefined;
118
118
  }>;
119
119
  export declare const any: z.ZodUnion<[z.ZodObject<{
120
120
  preferVersion: z.ZodDefault<z.ZodOptional<z.ZodEnum<["highestSemver", "lowestSemver"]>>>;
@@ -123,17 +123,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
123
123
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
124
124
  packages: z.ZodArray<z.ZodString, "many">;
125
125
  }, "strict", z.ZodTypeAny, {
126
- dependencyTypes?: string[] | undefined;
127
- label?: string | undefined;
128
126
  dependencies: string[];
129
127
  packages: string[];
130
128
  preferVersion: "highestSemver" | "lowestSemver";
131
- }, {
132
129
  dependencyTypes?: string[] | undefined;
133
130
  label?: string | undefined;
134
- preferVersion?: "highestSemver" | "lowestSemver" | undefined;
131
+ }, {
135
132
  dependencies: string[];
136
133
  packages: string[];
134
+ preferVersion?: "highestSemver" | "lowestSemver" | undefined;
135
+ dependencyTypes?: string[] | undefined;
136
+ label?: string | undefined;
137
137
  }>, z.ZodObject<{
138
138
  isBanned: z.ZodLiteral<true>;
139
139
  dependencies: z.ZodArray<z.ZodString, "many">;
@@ -141,17 +141,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
141
141
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
142
142
  packages: z.ZodArray<z.ZodString, "many">;
143
143
  }, "strict", z.ZodTypeAny, {
144
- dependencyTypes?: string[] | undefined;
145
- label?: string | undefined;
146
144
  dependencies: string[];
147
145
  packages: string[];
148
146
  isBanned: true;
149
- }, {
150
147
  dependencyTypes?: string[] | undefined;
151
148
  label?: string | undefined;
149
+ }, {
152
150
  dependencies: string[];
153
151
  packages: string[];
154
152
  isBanned: true;
153
+ dependencyTypes?: string[] | undefined;
154
+ label?: string | undefined;
155
155
  }>, z.ZodObject<{
156
156
  isIgnored: z.ZodLiteral<true>;
157
157
  dependencies: z.ZodArray<z.ZodString, "many">;
@@ -159,17 +159,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
159
159
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
160
160
  packages: z.ZodArray<z.ZodString, "many">;
161
161
  }, "strict", z.ZodTypeAny, {
162
- dependencyTypes?: string[] | undefined;
163
- label?: string | undefined;
164
162
  dependencies: string[];
165
163
  packages: string[];
166
164
  isIgnored: true;
167
- }, {
168
165
  dependencyTypes?: string[] | undefined;
169
166
  label?: string | undefined;
167
+ }, {
170
168
  dependencies: string[];
171
169
  packages: string[];
172
170
  isIgnored: true;
171
+ dependencyTypes?: string[] | undefined;
172
+ label?: string | undefined;
173
173
  }>, z.ZodObject<{
174
174
  pinVersion: z.ZodString;
175
175
  dependencies: z.ZodArray<z.ZodString, "many">;
@@ -177,17 +177,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
177
177
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
178
178
  packages: z.ZodArray<z.ZodString, "many">;
179
179
  }, "strict", z.ZodTypeAny, {
180
- dependencyTypes?: string[] | undefined;
181
- label?: string | undefined;
182
180
  dependencies: string[];
183
181
  packages: string[];
184
182
  pinVersion: string;
185
- }, {
186
183
  dependencyTypes?: string[] | undefined;
187
184
  label?: string | undefined;
185
+ }, {
188
186
  dependencies: string[];
189
187
  packages: string[];
190
188
  pinVersion: string;
189
+ dependencyTypes?: string[] | undefined;
190
+ label?: string | undefined;
191
191
  }>, z.ZodObject<{
192
192
  snapTo: z.ZodArray<z.ZodString, "many">;
193
193
  dependencies: z.ZodArray<z.ZodString, "many">;
@@ -195,17 +195,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
195
195
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
196
196
  packages: z.ZodArray<z.ZodString, "many">;
197
197
  }, "strict", z.ZodTypeAny, {
198
- dependencyTypes?: string[] | undefined;
199
- label?: string | undefined;
200
198
  dependencies: string[];
201
199
  packages: string[];
202
200
  snapTo: string[];
203
- }, {
204
201
  dependencyTypes?: string[] | undefined;
205
202
  label?: string | undefined;
203
+ }, {
206
204
  dependencies: string[];
207
205
  packages: string[];
208
206
  snapTo: string[];
207
+ dependencyTypes?: string[] | undefined;
208
+ label?: string | undefined;
209
209
  }>, z.ZodObject<{
210
210
  isDefault: z.ZodLiteral<true>;
211
211
  preferVersion: z.ZodDefault<z.ZodOptional<z.ZodEnum<["highestSemver", "lowestSemver"]>>>;
@@ -214,17 +214,17 @@ export declare const any: z.ZodUnion<[z.ZodObject<{
214
214
  label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
215
215
  packages: z.ZodArray<z.ZodString, "many">;
216
216
  }, "strict", z.ZodTypeAny, {
217
- dependencyTypes?: string[] | undefined;
218
- label?: string | undefined;
219
217
  isDefault: true;
220
218
  dependencies: string[];
221
219
  packages: string[];
222
220
  preferVersion: "highestSemver" | "lowestSemver";
223
- }, {
224
221
  dependencyTypes?: string[] | undefined;
225
222
  label?: string | undefined;
226
- preferVersion?: "highestSemver" | "lowestSemver" | undefined;
223
+ }, {
227
224
  isDefault: true;
228
225
  dependencies: string[];
229
226
  packages: string[];
227
+ preferVersion?: "highestSemver" | "lowestSemver" | undefined;
228
+ dependencyTypes?: string[] | undefined;
229
+ label?: string | undefined;
230
230
  }>]>;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BaseGroup = void 0;
7
- const is_non_empty_array_1 = require("expect-more/dist/is-non-empty-array");
8
7
  const minimatch_1 = __importDefault(require("minimatch"));
8
+ const is_non_empty_array_1 = require("tightrope/guard/is-non-empty-array");
9
9
  class BaseGroup {
10
10
  constructor(config, group, packageJsonFiles) {
11
11
  this.groupConfig = group;
@@ -1,5 +1,4 @@
1
- import { R } from '@mobily/ts-belt';
2
- import { BaseError } from '../../lib/error';
1
+ import type { Result } from 'tightrope/result';
3
2
  import type { Syncpack } from '../../types';
4
3
  import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
5
4
  import { SemverGroup } from './semver-group';
@@ -8,5 +7,5 @@ interface GroupsByPropName {
8
7
  semverGroups: SemverGroup[];
9
8
  versionGroups: VersionGroup[];
10
9
  }
11
- export declare function getGroups(config: Syncpack.Config.Private, packageJsonFiles: PackageJsonFile[]): R.Result<GroupsByPropName, BaseError>;
10
+ export declare function getGroups(config: Syncpack.Config.Private, packageJsonFiles: PackageJsonFile[]): Result<GroupsByPropName>;
12
11
  export {};
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getGroups = void 0;
4
- const ts_belt_1 = require("@mobily/ts-belt");
4
+ const pipe_1 = require("tightrope/fn/pipe");
5
+ const from_try_1 = require("tightrope/result/from-try");
6
+ const map_err_1 = require("tightrope/result/map-err");
5
7
  const error_1 = require("../../lib/error");
6
8
  const log_1 = require("../../lib/log");
7
9
  const sort_by_name_1 = require("../../lib/sort-by-name");
@@ -9,7 +11,7 @@ const semver_group_1 = require("./semver-group");
9
11
  const version_group_1 = require("./version-group");
10
12
  function getGroups(config, packageJsonFiles) {
11
13
  const ERR_CREATING_GROUPS = 'Error creating semver and version groups';
12
- return (0, ts_belt_1.pipe)(ts_belt_1.R.fromExecution(() => unsafeGetGroups(config, packageJsonFiles)), ts_belt_1.R.mapError(error_1.BaseError.map(ERR_CREATING_GROUPS)));
14
+ return (0, pipe_1.pipe)((0, from_try_1.fromTry)(() => unsafeGetGroups(config, packageJsonFiles)), (0, map_err_1.mapErr)(error_1.BaseError.map(ERR_CREATING_GROUPS)));
13
15
  }
14
16
  exports.getGroups = getGroups;
15
17
  function unsafeGetGroups(config, packageJsonFiles) {
@@ -1,4 +1,4 @@
1
- import { O } from '@mobily/ts-belt';
1
+ import type { Option } from 'tightrope/option';
2
2
  import type { Syncpack } from '../../../types';
3
3
  import { BaseGroup } from '../base-group';
4
4
  import { InstanceGroup } from './instance-group';
@@ -6,10 +6,10 @@ export declare class VersionGroup extends BaseGroup<Syncpack.Config.VersionGroup
6
6
  isBanned(): boolean;
7
7
  isIgnored(): boolean;
8
8
  hasSnappedToPackages(): boolean;
9
- getSnappedToPackages(): O.Option<string[]>;
9
+ getSnappedToPackages(): Option<string[]>;
10
10
  getAllInstanceGroups(): InstanceGroup[];
11
11
  getInvalidInstanceGroups(): InstanceGroup[];
12
- getPinnedVersion(): O.Option<string>;
12
+ getPinnedVersion(): Option<string>;
13
13
  /** Is `pinVersion` defined and this group does not match that version? */
14
14
  isUnpinned(): boolean;
15
15
  }
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VersionGroup = void 0;
4
- const ts_belt_1 = require("@mobily/ts-belt");
5
- const expect_more_1 = require("expect-more");
6
- const is_non_empty_string_1 = require("expect-more/dist/is-non-empty-string");
4
+ const pipe_1 = require("tightrope/fn/pipe");
5
+ const is_array_of_strings_1 = require("tightrope/guard/is-array-of-strings");
6
+ const is_non_empty_string_1 = require("tightrope/guard/is-non-empty-string");
7
+ const from_guard_1 = require("tightrope/option/from-guard");
8
+ const is_some_1 = require("tightrope/option/is-some");
9
+ const map_1 = require("tightrope/option/map");
10
+ const unwrap_or_1 = require("tightrope/option/unwrap-or");
7
11
  const base_group_1 = require("../base-group");
8
12
  const instance_group_1 = require("./instance-group");
9
13
  class VersionGroup extends base_group_1.BaseGroup {
@@ -14,10 +18,10 @@ class VersionGroup extends base_group_1.BaseGroup {
14
18
  return this.groupConfig.isIgnored === true;
15
19
  }
16
20
  hasSnappedToPackages() {
17
- return ts_belt_1.O.isSome(this.getSnappedToPackages());
21
+ return (0, is_some_1.isSome)(this.getSnappedToPackages());
18
22
  }
19
23
  getSnappedToPackages() {
20
- return ts_belt_1.O.fromPredicate(this.groupConfig.snapTo, expect_more_1.isArrayOfStrings);
24
+ return (0, from_guard_1.fromGuard)(is_array_of_strings_1.isArrayOfStrings, this.groupConfig.snapTo);
21
25
  }
22
26
  getAllInstanceGroups() {
23
27
  return Object.entries(this.instancesByName).map(([name, instances]) => new instance_group_1.InstanceGroup(this, name, instances));
@@ -26,11 +30,11 @@ class VersionGroup extends base_group_1.BaseGroup {
26
30
  return this.getAllInstanceGroups().filter((group) => group.isInvalid());
27
31
  }
28
32
  getPinnedVersion() {
29
- return ts_belt_1.O.fromPredicate(this.groupConfig.pinVersion, is_non_empty_string_1.isNonEmptyString);
33
+ return (0, from_guard_1.fromGuard)(is_non_empty_string_1.isNonEmptyString, this.groupConfig.pinVersion);
30
34
  }
31
35
  /** Is `pinVersion` defined and this group does not match that version? */
32
36
  isUnpinned() {
33
- return (0, ts_belt_1.pipe)(this.getPinnedVersion(), ts_belt_1.O.map((pinVersion) => this.instances.some((o) => o.version !== pinVersion)), ts_belt_1.O.getWithDefault(false));
37
+ return (0, pipe_1.pipe)(this.getPinnedVersion(), (0, map_1.map)((pinVersion) => this.instances.some((o) => o.version !== pinVersion)), (0, unwrap_or_1.unwrapOr)(false));
34
38
  }
35
39
  }
36
40
  exports.VersionGroup = VersionGroup;
@@ -1,3 +1,2 @@
1
- import { R } from '@mobily/ts-belt';
2
- import { BaseError } from '../../../../lib/error';
3
- export declare function getHighestVersion(versions: string[]): R.Result<string, BaseError>;
1
+ import type { Result } from 'tightrope/result';
2
+ export declare function getHighestVersion(versions: string[]): Result<string>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getHighestVersion = void 0;
4
- const ts_belt_1 = require("@mobily/ts-belt");
4
+ const result_1 = require("tightrope/result");
5
5
  const error_1 = require("../../../../lib/error");
6
6
  const clean_1 = require("./lib/clean");
7
7
  const compare_semver_1 = require("./lib/compare-semver");
@@ -12,11 +12,11 @@ function getHighestVersion(versions) {
12
12
  switch ((0, compare_semver_1.compareGt)(withRange, highest?.semver)) {
13
13
  // highest possible, quit early
14
14
  case '*': {
15
- return ts_belt_1.R.Ok(withRange);
15
+ return new result_1.Ok(withRange);
16
16
  }
17
17
  // impossible to know how the user wants to resolve unsupported versions
18
18
  case 'invalid': {
19
- return ts_belt_1.R.Error(new error_1.BaseError(`"${withRange}" is not supported`));
19
+ return new result_1.Err(new error_1.BaseError(`"${withRange}" is not supported`));
20
20
  }
21
21
  // we found a new highest version
22
22
  case 'gt': {
@@ -33,8 +33,8 @@ function getHighestVersion(versions) {
33
33
  }
34
34
  }
35
35
  return highest && highest.withRange
36
- ? ts_belt_1.R.Ok(highest.withRange)
37
- : ts_belt_1.R.Error(new error_1.BaseError(`getHighestVersion(): did not return a version`));
36
+ ? new result_1.Ok(highest.withRange)
37
+ : new result_1.Err(new error_1.BaseError(`getHighestVersion(): did not return a version`));
38
38
  }
39
39
  exports.getHighestVersion = getHighestVersion;
40
40
  function newHighestVersion(withRange) {
@@ -1,3 +1,2 @@
1
- import { R } from '@mobily/ts-belt';
2
- import { BaseError } from '../../../../lib/error';
3
- export declare function getLowestVersion(versions: string[]): R.Result<string, BaseError>;
1
+ import type { Result } from 'tightrope/result';
2
+ export declare function getLowestVersion(versions: string[]): Result<string>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLowestVersion = void 0;
4
- const ts_belt_1 = require("@mobily/ts-belt");
4
+ const result_1 = require("tightrope/result");
5
5
  const error_1 = require("../../../../lib/error");
6
6
  const clean_1 = require("./lib/clean");
7
7
  const compare_semver_1 = require("./lib/compare-semver");
@@ -18,7 +18,7 @@ function getLowestVersion(versions) {
18
18
  }
19
19
  // impossible to know how the user wants to resolve unsupported versions
20
20
  case 'invalid': {
21
- return ts_belt_1.R.Error(new error_1.BaseError(`"${withRange}" is not supported`));
21
+ return new result_1.Err(new error_1.BaseError(`"${withRange}" is not supported`));
22
22
  }
23
23
  // we found a new lowest version
24
24
  case 'lt': {
@@ -35,8 +35,8 @@ function getLowestVersion(versions) {
35
35
  }
36
36
  }
37
37
  return lowest && lowest.withRange
38
- ? ts_belt_1.R.Ok(lowest.withRange)
39
- : ts_belt_1.R.Error(new error_1.BaseError(`getLowestVersion(): did not return a version`));
38
+ ? new result_1.Ok(lowest.withRange)
39
+ : new result_1.Err(new error_1.BaseError(`getLowestVersion(): did not return a version`));
40
40
  }
41
41
  exports.getLowestVersion = getLowestVersion;
42
42
  function newLowestVersion(withRange) {
@@ -1,6 +1,5 @@
1
- import { O, R } from '@mobily/ts-belt';
1
+ import type { Result } from 'tightrope/result';
2
2
  import type { VersionGroup } from '..';
3
- import { BaseError } from '../../../../lib/error';
4
3
  import type { Instance } from '../../../get-package-json-files/package-json-file/instance';
5
4
  export declare const DELETE: unique symbol;
6
5
  export type Delete = typeof DELETE;
@@ -17,19 +16,19 @@ export declare class InstanceGroup {
17
16
  getUniqueVersions(): string[];
18
17
  hasMismatchingVersions(): boolean;
19
18
  isInvalid(): boolean;
20
- getExpectedVersion(): R.Result<string | Delete, BaseError>;
19
+ getExpectedVersion(): Result<string | Delete>;
21
20
  /** If all versions are valid semver, return the newest one */
22
- getHighestVersion(): R.Result<string, BaseError>;
21
+ getHighestVersion(): Result<string>;
23
22
  /** If all versions are valid semver, return the lowest one */
24
- getLowestVersion(): R.Result<string, BaseError>;
23
+ getLowestVersion(): Result<string>;
25
24
  /** Get the first version matched by the `snapTo` packages */
26
- getSnappedVersion(): R.Result<string, BaseError>;
25
+ getSnappedVersion(): Result<string>;
27
26
  /** Is `snapTo` defined and this group does not match that version? */
28
- isUnsnapped(): R.Result<boolean, BaseError>;
27
+ isUnsnapped(): Result<boolean>;
29
28
  /** Get version of dependency which is developed in this monorepo */
30
- getWorkspaceVersion(): R.Result<string, BaseError>;
29
+ getWorkspaceVersion(): Result<string>;
31
30
  /** Find instance of this dependency which is developed in this monorepo */
32
- getWorkspaceInstance(): O.Option<Instance>;
31
+ getWorkspaceInstance(): Result<Instance>;
33
32
  /** Is an instance of this dependency developed in this monorepo? */
34
33
  hasWorkspaceInstance(): boolean;
35
34
  }