syncpack 10.9.3 → 12.0.0-alpha.0

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 (274) hide show
  1. package/dist/bin-fix-mismatches/fix-mismatches.d.ts +15 -3
  2. package/dist/bin-fix-mismatches/fix-mismatches.js +120 -36
  3. package/dist/bin-fix-mismatches/index.js +12 -32
  4. package/dist/bin-format/format.d.ts +11 -3
  5. package/dist/bin-format/format.js +46 -61
  6. package/dist/bin-format/index.js +11 -31
  7. package/dist/bin-lint/index.js +8 -28
  8. package/dist/bin-lint/lint.d.ts +10 -3
  9. package/dist/bin-lint/lint.js +12 -36
  10. package/dist/bin-lint-semver-ranges/index.js +11 -39
  11. package/dist/bin-lint-semver-ranges/lint-semver-ranges.d.ts +15 -3
  12. package/dist/bin-lint-semver-ranges/lint-semver-ranges.js +94 -35
  13. package/dist/bin-list/index.js +11 -31
  14. package/dist/bin-list/list.d.ts +11 -3
  15. package/dist/bin-list/list.js +121 -35
  16. package/dist/bin-list-mismatches/index.js +11 -31
  17. package/dist/bin-list-mismatches/list-mismatches.d.ts +18 -3
  18. package/dist/bin-list-mismatches/list-mismatches.js +254 -35
  19. package/dist/bin-prompt/index.js +15 -31
  20. package/dist/bin-prompt/prompt.d.ts +10 -3
  21. package/dist/bin-prompt/prompt.js +83 -34
  22. package/dist/bin-set-semver-ranges/index.js +12 -40
  23. package/dist/bin-set-semver-ranges/set-semver-ranges.d.ts +10 -3
  24. package/dist/bin-set-semver-ranges/set-semver-ranges.js +50 -36
  25. package/dist/bin-update/effects.d.ts +45 -5
  26. package/dist/bin-update/effects.js +214 -128
  27. package/dist/bin-update/index.js +4 -27
  28. package/dist/bin-update/update.d.ts +5 -3
  29. package/dist/bin-update/update.js +52 -38
  30. package/dist/bin.js +0 -1
  31. package/dist/config/get-custom-types.d.ts +11 -1
  32. package/dist/config/get-custom-types.js +26 -21
  33. package/dist/config/get-enabled-types.d.ts +10 -6
  34. package/dist/config/get-enabled-types.js +84 -66
  35. package/dist/config/get-indent.js +1 -1
  36. package/dist/config/tag.d.ts +3 -0
  37. package/dist/config/tag.js +5 -0
  38. package/dist/config/types.d.ts +8 -11
  39. package/dist/config/types.js +0 -26
  40. package/dist/constants.d.ts +7 -5
  41. package/dist/constants.js +15 -14
  42. package/dist/create-program/effects.d.ts +51 -29
  43. package/dist/error-handlers/default-error-handlers.d.ts +38 -2
  44. package/dist/error-handlers/default-error-handlers.js +83 -35
  45. package/dist/get-context/index.d.ts +12 -6
  46. package/dist/get-context/index.js +13 -30
  47. package/dist/get-context/lib/key-by.d.ts +6 -0
  48. package/dist/get-context/lib/key-by.js +16 -0
  49. package/dist/get-instances/index.d.ts +14 -0
  50. package/dist/get-instances/index.js +46 -0
  51. package/dist/get-instances/instance.d.ts +25 -0
  52. package/dist/get-instances/instance.js +20 -0
  53. package/dist/get-package-json-files/get-file-paths.d.ts +6 -7
  54. package/dist/get-package-json-files/get-file-paths.js +10 -33
  55. package/dist/get-package-json-files/get-patterns/get-lerna-patterns.d.ts +3 -4
  56. package/dist/get-package-json-files/get-patterns/get-lerna-patterns.js +6 -32
  57. package/dist/get-package-json-files/get-patterns/get-pnpm-patterns.d.ts +3 -4
  58. package/dist/get-package-json-files/get-patterns/get-pnpm-patterns.js +6 -32
  59. package/dist/get-package-json-files/get-patterns/get-yarn-patterns.d.ts +3 -4
  60. package/dist/get-package-json-files/get-patterns/get-yarn-patterns.js +11 -40
  61. package/dist/get-package-json-files/get-patterns/index.d.ts +3 -5
  62. package/dist/get-package-json-files/get-patterns/index.js +6 -33
  63. package/dist/get-package-json-files/index.d.ts +6 -5
  64. package/dist/get-package-json-files/index.js +4 -28
  65. package/dist/get-package-json-files/package-json-file.d.ts +16 -16
  66. package/dist/get-package-json-files/package-json-file.js +13 -18
  67. package/dist/guards/can-add-to-group.d.ts +5 -4
  68. package/dist/guards/can-add-to-group.js +40 -6
  69. package/dist/guards/is-semver.d.ts +1 -1
  70. package/dist/guards/is-semver.js +1 -1
  71. package/dist/guards/is-valid-semver-range.d.ts +1 -1
  72. package/dist/guards/is-valid-semver-range.js +1 -1
  73. package/dist/io/ask-for-choice.d.ts +14 -0
  74. package/dist/io/ask-for-choice.js +22 -0
  75. package/dist/io/ask-for-input.d.ts +13 -0
  76. package/dist/io/ask-for-input.js +19 -0
  77. package/dist/io/exit-if-invalid.d.ts +4 -0
  78. package/dist/io/exit-if-invalid.js +13 -0
  79. package/dist/io/glob-sync.d.ts +11 -0
  80. package/dist/io/glob-sync.js +19 -0
  81. package/dist/io/index.d.ts +28 -0
  82. package/dist/{env/exit-if-invalid.js → io/index.js} +27 -9
  83. package/dist/io/read-config-file-sync.d.ts +7 -0
  84. package/dist/io/read-config-file-sync.js +26 -0
  85. package/dist/io/read-file-sync.d.ts +12 -0
  86. package/dist/io/read-file-sync.js +14 -0
  87. package/dist/io/read-json-file-sync.d.ts +30 -0
  88. package/dist/io/read-json-file-sync.js +25 -0
  89. package/dist/io/read-yaml-file-sync.d.ts +12 -0
  90. package/dist/io/read-yaml-file-sync.js +14 -0
  91. package/dist/io/write-file-sync.d.ts +12 -0
  92. package/dist/io/write-file-sync.js +15 -0
  93. package/dist/{env → io}/write-if-changed.d.ts +4 -4
  94. package/dist/io/write-if-changed.js +45 -0
  95. package/dist/lib/get-group-header.d.ts +10 -0
  96. package/dist/lib/get-group-header.js +31 -0
  97. package/dist/lib/get.d.ts +11 -0
  98. package/dist/lib/get.js +40 -0
  99. package/dist/lib/pad-start.d.ts +1 -0
  100. package/dist/lib/pad-start.js +7 -0
  101. package/dist/lib/ring-buffer.d.ts +10 -0
  102. package/dist/lib/ring-buffer.js +22 -0
  103. package/dist/lib/set-semver-range.d.ts +1 -1
  104. package/dist/lib/set-semver-range.js +7 -11
  105. package/dist/lib/with-logger.d.ts +2 -0
  106. package/dist/lib/with-logger.js +35 -0
  107. package/dist/option.d.ts +0 -1
  108. package/dist/option.js +0 -4
  109. package/dist/report.d.ts +166 -0
  110. package/dist/report.js +67 -0
  111. package/dist/schema.json +392 -0
  112. package/dist/semver-group/create-semver-groups.d.ts +4 -0
  113. package/dist/semver-group/create-semver-groups.js +77 -0
  114. package/dist/semver-group/disabled.d.ts +26 -0
  115. package/dist/semver-group/disabled.js +34 -0
  116. package/dist/semver-group/filtered-out.d.ts +27 -0
  117. package/dist/semver-group/filtered-out.js +40 -0
  118. package/dist/semver-group/ignored.d.ts +22 -0
  119. package/dist/semver-group/ignored.js +30 -0
  120. package/dist/semver-group/index.d.ts +22 -0
  121. package/dist/semver-group/index.js +10 -0
  122. package/dist/semver-group/with-range.d.ts +22 -0
  123. package/dist/semver-group/with-range.js +57 -0
  124. package/dist/specifier/alias.d.ts +15 -0
  125. package/dist/specifier/alias.js +25 -0
  126. package/dist/specifier/base.d.ts +39 -0
  127. package/dist/specifier/base.js +38 -0
  128. package/dist/specifier/delete.d.ts +15 -0
  129. package/dist/specifier/delete.js +16 -0
  130. package/dist/specifier/file.d.ts +6 -0
  131. package/dist/specifier/file.js +12 -0
  132. package/dist/specifier/hosted-git.d.ts +13 -0
  133. package/dist/specifier/hosted-git.js +27 -0
  134. package/dist/specifier/index.d.ts +27 -0
  135. package/dist/specifier/index.js +62 -0
  136. package/dist/specifier/lib/non-semver-error.d.ts +11 -0
  137. package/dist/specifier/lib/non-semver-error.js +10 -0
  138. package/dist/specifier/lib/parse-specifier.d.ts +14 -0
  139. package/dist/specifier/lib/parse-specifier.js +23 -0
  140. package/dist/specifier/lib/specific-registry-result.d.ts +9 -0
  141. package/dist/specifier/lib/specific-registry-result.js +2 -0
  142. package/dist/specifier/range.d.ts +18 -0
  143. package/dist/specifier/range.js +26 -0
  144. package/dist/specifier/tag.d.ts +9 -0
  145. package/dist/specifier/tag.js +15 -0
  146. package/dist/specifier/unsupported.d.ts +5 -0
  147. package/dist/specifier/unsupported.js +12 -0
  148. package/dist/specifier/url.d.ts +6 -0
  149. package/dist/specifier/url.js +13 -0
  150. package/dist/specifier/version.d.ts +18 -0
  151. package/dist/specifier/version.js +26 -0
  152. package/dist/specifier/workspace-protocol.d.ts +17 -0
  153. package/dist/specifier/workspace-protocol.js +38 -0
  154. package/dist/strategy/lib/get-non-empty-string-prop.d.ts +2 -2
  155. package/dist/strategy/lib/get-non-empty-string-prop.js +4 -5
  156. package/dist/strategy/name-and-version-props.d.ts +4 -4
  157. package/dist/strategy/name-and-version-props.js +32 -21
  158. package/dist/strategy/named-version-string.d.ts +4 -4
  159. package/dist/strategy/named-version-string.js +22 -24
  160. package/dist/strategy/unnamed-version-string.d.ts +4 -4
  161. package/dist/strategy/unnamed-version-string.js +20 -21
  162. package/dist/strategy/versions-by-name.d.ts +4 -4
  163. package/dist/strategy/versions-by-name.js +9 -11
  164. package/dist/version-group/banned.d.ts +17 -0
  165. package/dist/version-group/banned.js +32 -0
  166. package/dist/version-group/create-version-groups.d.ts +4 -0
  167. package/dist/version-group/create-version-groups.js +107 -0
  168. package/dist/version-group/filtered-out.d.ts +19 -0
  169. package/dist/version-group/filtered-out.js +34 -0
  170. package/dist/version-group/ignored.d.ts +17 -0
  171. package/dist/version-group/ignored.js +27 -0
  172. package/dist/version-group/index.d.ts +28 -0
  173. package/dist/version-group/index.js +10 -0
  174. package/dist/version-group/lib/get-highest-version.d.ts +6 -0
  175. package/dist/version-group/lib/get-highest-version.js +12 -0
  176. package/dist/version-group/lib/get-lowest-version.d.ts +6 -0
  177. package/dist/version-group/lib/get-lowest-version.js +12 -0
  178. package/dist/version-group/lib/get-preferred-version.d.ts +5 -0
  179. package/dist/{get-version-groups/lib/compare-semver.js → version-group/lib/get-preferred-version.js} +14 -2
  180. package/dist/version-group/lib/group-by.d.ts +5 -0
  181. package/dist/{get-version-groups → version-group}/lib/group-by.js +4 -0
  182. package/dist/version-group/pinned.d.ts +17 -0
  183. package/dist/version-group/pinned.js +30 -0
  184. package/dist/version-group/same-range.d.ts +19 -0
  185. package/dist/version-group/same-range.js +108 -0
  186. package/dist/version-group/snapped-to.d.ts +17 -0
  187. package/dist/version-group/snapped-to.js +83 -0
  188. package/dist/version-group/standard.d.ts +18 -0
  189. package/dist/version-group/standard.js +131 -0
  190. package/package.json +28 -25
  191. package/dist/bin-fix-mismatches/effects.d.ts +0 -2
  192. package/dist/bin-fix-mismatches/effects.js +0 -112
  193. package/dist/bin-format/format-cli.d.ts +0 -4
  194. package/dist/bin-format/format-cli.js +0 -42
  195. package/dist/bin-lint-semver-ranges/effects.d.ts +0 -2
  196. package/dist/bin-lint-semver-ranges/effects.js +0 -70
  197. package/dist/bin-list/effects.d.ts +0 -2
  198. package/dist/bin-list/effects.js +0 -114
  199. package/dist/bin-list-mismatches/effects.d.ts +0 -2
  200. package/dist/bin-list-mismatches/effects.js +0 -136
  201. package/dist/bin-prompt/effects.d.ts +0 -2
  202. package/dist/bin-prompt/effects.js +0 -110
  203. package/dist/bin-set-semver-ranges/effects.d.ts +0 -2
  204. package/dist/bin-set-semver-ranges/effects.js +0 -61
  205. package/dist/config/get-semver-range.d.ts +0 -3
  206. package/dist/config/get-semver-range.js +0 -12
  207. package/dist/create-program/semver-ranges.d.ts +0 -7
  208. package/dist/create-program/semver-ranges.js +0 -55
  209. package/dist/create-program/versions.d.ts +0 -7
  210. package/dist/create-program/versions.js +0 -70
  211. package/dist/env/create-env.d.ts +0 -21
  212. package/dist/env/create-env.js +0 -81
  213. package/dist/env/default-env.d.ts +0 -18
  214. package/dist/env/default-env.js +0 -96
  215. package/dist/env/exit-if-invalid.d.ts +0 -4
  216. package/dist/env/tags.d.ts +0 -58
  217. package/dist/env/tags.js +0 -50
  218. package/dist/env/write-if-changed.js +0 -73
  219. package/dist/error-handlers/create-error-handlers.d.ts +0 -19
  220. package/dist/error-handlers/create-error-handlers.js +0 -57
  221. package/dist/get-package-json-files/get-patterns/read-json-safe.d.ts +0 -23
  222. package/dist/get-package-json-files/get-patterns/read-json-safe.js +0 -43
  223. package/dist/get-semver-groups/filtered-out.d.ts +0 -19
  224. package/dist/get-semver-groups/filtered-out.js +0 -55
  225. package/dist/get-semver-groups/ignored.d.ts +0 -17
  226. package/dist/get-semver-groups/ignored.js +0 -48
  227. package/dist/get-semver-groups/index.d.ts +0 -84
  228. package/dist/get-semver-groups/index.js +0 -139
  229. package/dist/get-semver-groups/with-range.d.ts +0 -18
  230. package/dist/get-semver-groups/with-range.js +0 -79
  231. package/dist/get-version-groups/banned.d.ts +0 -17
  232. package/dist/get-version-groups/banned.js +0 -50
  233. package/dist/get-version-groups/filtered-out.d.ts +0 -19
  234. package/dist/get-version-groups/filtered-out.js +0 -57
  235. package/dist/get-version-groups/ignored.d.ts +0 -17
  236. package/dist/get-version-groups/ignored.js +0 -50
  237. package/dist/get-version-groups/index.d.ts +0 -187
  238. package/dist/get-version-groups/index.js +0 -246
  239. package/dist/get-version-groups/lib/compare-semver.d.ts +0 -1
  240. package/dist/get-version-groups/lib/get-highest-version.d.ts +0 -2
  241. package/dist/get-version-groups/lib/get-highest-version.js +0 -13
  242. package/dist/get-version-groups/lib/get-lowest-version.d.ts +0 -2
  243. package/dist/get-version-groups/lib/get-lowest-version.js +0 -13
  244. package/dist/get-version-groups/lib/get-unique-specifiers.d.ts +0 -2
  245. package/dist/get-version-groups/lib/get-unique-specifiers.js +0 -11
  246. package/dist/get-version-groups/lib/group-by.d.ts +0 -1
  247. package/dist/get-version-groups/pinned.d.ts +0 -17
  248. package/dist/get-version-groups/pinned.js +0 -66
  249. package/dist/get-version-groups/same-range.d.ts +0 -17
  250. package/dist/get-version-groups/same-range.js +0 -73
  251. package/dist/get-version-groups/snapped-to.d.ts +0 -17
  252. package/dist/get-version-groups/snapped-to.js +0 -78
  253. package/dist/get-version-groups/standard.d.ts +0 -18
  254. package/dist/get-version-groups/standard.js +0 -109
  255. package/dist/guards/is-loose-semver.d.ts +0 -2
  256. package/dist/guards/is-loose-semver.js +0 -10
  257. package/dist/instance/create.d.ts +0 -4
  258. package/dist/instance/create.js +0 -142
  259. package/dist/instance/index.d.ts +0 -122
  260. package/dist/instance/index.js +0 -154
  261. package/dist/lib/$R.d.ts +0 -12
  262. package/dist/lib/$R.js +0 -34
  263. package/dist/lib/log-group-header.d.ts +0 -6
  264. package/dist/lib/log-group-header.js +0 -34
  265. package/dist/lib/log-verbose.d.ts +0 -1
  266. package/dist/lib/log-verbose.js +0 -24
  267. package/dist/lib/split-name-and-version.d.ts +0 -5
  268. package/dist/lib/split-name-and-version.js +0 -12
  269. /package/dist/{get-version-groups → version-group}/lib/clean.d.ts +0 -0
  270. /package/dist/{get-version-groups → version-group}/lib/clean.js +0 -0
  271. /package/dist/{get-version-groups → version-group}/lib/delete.d.ts +0 -0
  272. /package/dist/{get-version-groups → version-group}/lib/delete.js +0 -0
  273. /package/dist/{get-version-groups → version-group}/lib/get-range-score.d.ts +0 -0
  274. /package/dist/{get-version-groups → version-group}/lib/get-range-score.js +0 -0
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Specifier = void 0;
4
+ const delete_1 = require("../version-group/lib/delete");
5
+ const alias_1 = require("./alias");
6
+ const delete_2 = require("./delete");
7
+ const file_1 = require("./file");
8
+ const hosted_git_1 = require("./hosted-git");
9
+ const parse_specifier_1 = require("./lib/parse-specifier");
10
+ const range_1 = require("./range");
11
+ const tag_1 = require("./tag");
12
+ const unsupported_1 = require("./unsupported");
13
+ const url_1 = require("./url");
14
+ const version_1 = require("./version");
15
+ const workspace_protocol_1 = require("./workspace-protocol");
16
+ var Specifier;
17
+ (function (Specifier) {
18
+ Specifier.Alias = alias_1.AliasSpecifier;
19
+ Specifier.Delete = delete_2.DeleteSpecifier;
20
+ Specifier.File = file_1.FileSpecifier;
21
+ Specifier.HostedGit = hosted_git_1.HostedGitSpecifier;
22
+ Specifier.Range = range_1.RangeSpecifier;
23
+ Specifier.Tag = tag_1.TagSpecifier;
24
+ Specifier.Unsupported = unsupported_1.UnsupportedSpecifier;
25
+ Specifier.Url = url_1.UrlSpecifier;
26
+ Specifier.Version = version_1.VersionSpecifier;
27
+ Specifier.WorkspaceProtocol = workspace_protocol_1.WorkspaceProtocolSpecifier;
28
+ function create(instance, raw) {
29
+ if (raw === delete_1.DELETE)
30
+ return new Specifier.Delete({ instance, raw });
31
+ if (!raw)
32
+ return new Specifier.Unsupported({ instance, raw });
33
+ try {
34
+ if (raw === 'latest')
35
+ raw = '*';
36
+ const parsed = (0, parse_specifier_1.parseSpecifier)(instance.name, raw, instance.packageJsonFile);
37
+ const type = parsed.type;
38
+ const data = { instance, raw };
39
+ if (type === 'version')
40
+ return new Specifier.Version(data);
41
+ if (type === 'range')
42
+ return new Specifier.Range(data);
43
+ if (type === 'workspaceProtocol')
44
+ return new Specifier.WorkspaceProtocol(data);
45
+ if (type === 'alias')
46
+ return new Specifier.Alias(data);
47
+ if (type === 'file' || type === 'directory')
48
+ return new Specifier.File(data);
49
+ if (type === 'remote')
50
+ return new Specifier.Url(data);
51
+ if (type === 'git')
52
+ return new Specifier.HostedGit(data);
53
+ if (type === 'tag')
54
+ return new Specifier.Tag(data);
55
+ return new Specifier.Unsupported(data);
56
+ }
57
+ catch {
58
+ return new Specifier.Unsupported({ instance, raw });
59
+ }
60
+ }
61
+ Specifier.create = create;
62
+ })(Specifier || (exports.Specifier = Specifier = {}));
@@ -0,0 +1,11 @@
1
+ import { Data, Effect } from 'effect';
2
+ import type { Specifier } from '..';
3
+ declare const NonSemverError_base: new <A extends Record<string, any>>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/dist/declarations/src/Equal").Equal>, {}> extends true ? void : Omit<A, keyof import("effect/dist/declarations/src/Equal").Equal>) => Data.Data<A & {
4
+ readonly _tag: "NonSemverError";
5
+ }>;
6
+ export declare class NonSemverError extends NonSemverError_base<{
7
+ specifier: Specifier.Any;
8
+ }> {
9
+ static asEffect<T>(specifier: Specifier.Any): Effect.Effect<never, NonSemverError, T>;
10
+ }
11
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NonSemverError = void 0;
4
+ const effect_1 = require("effect");
5
+ class NonSemverError extends effect_1.Data.TaggedClass('NonSemverError') {
6
+ static asEffect(specifier) {
7
+ return effect_1.Effect.fail(new NonSemverError({ specifier }));
8
+ }
9
+ }
10
+ exports.NonSemverError = NonSemverError;
@@ -0,0 +1,14 @@
1
+ import npa from 'npm-package-arg';
2
+ import type { PackageJsonFile } from '../../get-package-json-files/package-json-file';
3
+ /** Extends npm/npm-package-arg to support "workspace:*" */
4
+ export interface WorkspaceProtocolResult {
5
+ type: 'workspaceProtocol';
6
+ raw: string;
7
+ name: string | null;
8
+ escapedName: string | null;
9
+ scope: string | null;
10
+ rawSpec: string;
11
+ saveSpec: string;
12
+ }
13
+ export type NpmPackageArgResult = ReturnType<typeof npa.resolve> | WorkspaceProtocolResult;
14
+ export declare function parseSpecifier(name: string, specifier: string, packageJsonFile: PackageJsonFile): NpmPackageArgResult;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseSpecifier = void 0;
7
+ const npm_package_arg_1 = __importDefault(require("npm-package-arg"));
8
+ function parseSpecifier(name, specifier, packageJsonFile) {
9
+ if (specifier === 'workspace:*' || specifier === 'workspace:~') {
10
+ const parsed = npm_package_arg_1.default.resolve(name, packageJsonFile.jsonFile.dirPath, specifier.replace('workspace:', 'file:'));
11
+ return {
12
+ escapedName: parsed.escapedName,
13
+ name: parsed.name,
14
+ raw: parsed.raw.replace('file:', 'workspace:'),
15
+ rawSpec: parsed.rawSpec.replace('file:', 'workspace:'),
16
+ saveSpec: parsed.saveSpec.replace('file:', 'workspace:'),
17
+ scope: parsed.scope,
18
+ type: 'workspaceProtocol',
19
+ };
20
+ }
21
+ return npm_package_arg_1.default.resolve(name, specifier, packageJsonFile.jsonFile.dirPath);
22
+ }
23
+ exports.parseSpecifier = parseSpecifier;
@@ -0,0 +1,9 @@
1
+ import type { RegistryResult } from 'npm-package-arg';
2
+ /**
3
+ * A helper to create specific classes for each of the possible
4
+ * `RegistryResult` types from npm/npm-package-arg. Instead of grouping them
5
+ * together we are being more specific
6
+ */
7
+ export type SpecificRegistryResult<T extends RegistryResult['type'] | 'local'> = Omit<RegistryResult, 'type'> & {
8
+ type: T;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { Effect } from 'effect';
2
+ import { Specifier } from '.';
3
+ import { BaseSpecifier } from './base';
4
+ import { NonSemverError } from './lib/non-semver-error';
5
+ import type { SpecificRegistryResult } from './lib/specific-registry-result';
6
+ type T = SpecificRegistryResult<'range'>;
7
+ /**
8
+ * @example "*"
9
+ * @example "^1.2.3"
10
+ */
11
+ export declare class RangeSpecifier extends BaseSpecifier<T> {
12
+ _tag: string;
13
+ /** Return the semver version including the range */
14
+ getSemver(): Effect.Effect<never, NonSemverError, string>;
15
+ /** Get a new `Specifier` from the given semver version applied to this one */
16
+ setSemver(version: string): Effect.Effect<never, never, Specifier.Any>;
17
+ }
18
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RangeSpecifier = void 0;
4
+ const effect_1 = require("effect");
5
+ const _1 = require(".");
6
+ const base_1 = require("./base");
7
+ const non_semver_error_1 = require("./lib/non-semver-error");
8
+ /**
9
+ * @example "*"
10
+ * @example "^1.2.3"
11
+ */
12
+ class RangeSpecifier extends base_1.BaseSpecifier {
13
+ constructor() {
14
+ super(...arguments);
15
+ this._tag = 'RangeSpecifier';
16
+ }
17
+ /** Return the semver version including the range */
18
+ getSemver() {
19
+ return (0, effect_1.pipe)(this.parse(), effect_1.Effect.mapError(() => new non_semver_error_1.NonSemverError({ specifier: this })), effect_1.Effect.map((parsed) => parsed.fetchSpec));
20
+ }
21
+ /** Get a new `Specifier` from the given semver version applied to this one */
22
+ setSemver(version) {
23
+ return effect_1.Effect.succeed(_1.Specifier.create(this.instance, version));
24
+ }
25
+ }
26
+ exports.RangeSpecifier = RangeSpecifier;
@@ -0,0 +1,9 @@
1
+ import { BaseSpecifier } from './base';
2
+ import type { SpecificRegistryResult } from './lib/specific-registry-result';
3
+ /**
4
+ * @example "latest"
5
+ * @example "made-up-by-some-dev"
6
+ */
7
+ export declare class TagSpecifier extends BaseSpecifier<SpecificRegistryResult<'tag'>> {
8
+ _tag: string;
9
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagSpecifier = void 0;
4
+ const base_1 = require("./base");
5
+ /**
6
+ * @example "latest"
7
+ * @example "made-up-by-some-dev"
8
+ */
9
+ class TagSpecifier extends base_1.BaseSpecifier {
10
+ constructor() {
11
+ super(...arguments);
12
+ this._tag = 'TagSpecifier';
13
+ }
14
+ }
15
+ exports.TagSpecifier = TagSpecifier;
@@ -0,0 +1,5 @@
1
+ import { BaseSpecifier } from './base';
2
+ /** A specifier not supported by the `npm` package manager */
3
+ export declare class UnsupportedSpecifier extends BaseSpecifier<unknown> {
4
+ _tag: string;
5
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnsupportedSpecifier = void 0;
4
+ const base_1 = require("./base");
5
+ /** A specifier not supported by the `npm` package manager */
6
+ class UnsupportedSpecifier extends base_1.BaseSpecifier {
7
+ constructor() {
8
+ super(...arguments);
9
+ this._tag = 'UnsupportedSpecifier';
10
+ }
11
+ }
12
+ exports.UnsupportedSpecifier = UnsupportedSpecifier;
@@ -0,0 +1,6 @@
1
+ import type { URLResult } from 'npm-package-arg';
2
+ import { BaseSpecifier } from './base';
3
+ /** @example "http://x.com/foo.tgz" */
4
+ export declare class UrlSpecifier extends BaseSpecifier<URLResult> {
5
+ _tag: string;
6
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UrlSpecifier = void 0;
4
+ const base_1 = require("./base");
5
+ /** @example "http://x.com/foo.tgz" */
6
+ class UrlSpecifier extends base_1.BaseSpecifier {
7
+ constructor() {
8
+ super(...arguments);
9
+ this._tag = 'UrlSpecifier';
10
+ // @TODO: If file name is semver, return that in getSemver()
11
+ }
12
+ }
13
+ exports.UrlSpecifier = UrlSpecifier;
@@ -0,0 +1,18 @@
1
+ import { Effect } from 'effect';
2
+ import { Specifier } from '.';
3
+ import { BaseSpecifier } from './base';
4
+ import { NonSemverError } from './lib/non-semver-error';
5
+ import type { SpecificRegistryResult } from './lib/specific-registry-result';
6
+ type T = SpecificRegistryResult<'version'>;
7
+ /**
8
+ * An exact semver version
9
+ * @example "1.4.4"
10
+ */
11
+ export declare class VersionSpecifier extends BaseSpecifier<T> {
12
+ _tag: string;
13
+ /** Return the semver version */
14
+ getSemver(): Effect.Effect<never, NonSemverError, string>;
15
+ /** Get a new `Specifier` from the given semver version applied to this one */
16
+ setSemver(version: string): Effect.Effect<never, never, Specifier.Any>;
17
+ }
18
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VersionSpecifier = void 0;
4
+ const effect_1 = require("effect");
5
+ const _1 = require(".");
6
+ const base_1 = require("./base");
7
+ const non_semver_error_1 = require("./lib/non-semver-error");
8
+ /**
9
+ * An exact semver version
10
+ * @example "1.4.4"
11
+ */
12
+ class VersionSpecifier extends base_1.BaseSpecifier {
13
+ constructor() {
14
+ super(...arguments);
15
+ this._tag = 'VersionSpecifier';
16
+ }
17
+ /** Return the semver version */
18
+ getSemver() {
19
+ return (0, effect_1.pipe)(this.parse(), effect_1.Effect.mapError(() => new non_semver_error_1.NonSemverError({ specifier: this })), effect_1.Effect.map((parsed) => parsed.fetchSpec));
20
+ }
21
+ /** Get a new `Specifier` from the given semver version applied to this one */
22
+ setSemver(version) {
23
+ return effect_1.Effect.succeed(_1.Specifier.create(this.instance, version));
24
+ }
25
+ }
26
+ exports.VersionSpecifier = VersionSpecifier;
@@ -0,0 +1,17 @@
1
+ import { Effect } from 'effect';
2
+ import { Specifier } from '.';
3
+ import type { Ctx } from '../get-context';
4
+ import { BaseSpecifier } from './base';
5
+ import type { WorkspaceProtocolResult } from './lib/parse-specifier';
6
+ /** Represents "workspace:*" and "workspace:~" */
7
+ export declare class WorkspaceProtocolSpecifier extends BaseSpecifier<WorkspaceProtocolResult> {
8
+ _tag: string;
9
+ /**
10
+ * Return an equivalent value which actually is semver, so that it can be used
11
+ * with tools which expect values which conform to the spec. This value is
12
+ * used only when sorting versions.
13
+ */
14
+ getSemverEquivalent(ctx: Ctx): Effect.Effect<never, never, string>;
15
+ getSemver(): Effect.Effect<never, never, string>;
16
+ setSemver(version: string): Effect.Effect<never, never, Specifier.Any>;
17
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkspaceProtocolSpecifier = void 0;
4
+ const effect_1 = require("effect");
5
+ const _1 = require(".");
6
+ const base_1 = require("./base");
7
+ /** Represents "workspace:*" and "workspace:~" */
8
+ class WorkspaceProtocolSpecifier extends base_1.BaseSpecifier {
9
+ constructor() {
10
+ super(...arguments);
11
+ this._tag = 'WorkspaceProtocolSpecifier';
12
+ }
13
+ /**
14
+ * Return an equivalent value which actually is semver, so that it can be used
15
+ * with tools which expect values which conform to the spec. This value is
16
+ * used only when sorting versions.
17
+ */
18
+ getSemverEquivalent(ctx) {
19
+ if (this.raw === 'workspace:*') {
20
+ return effect_1.Effect.succeed('*');
21
+ }
22
+ if (this.raw === 'workspace:~') {
23
+ const local = ctx.packageJsonFilesByName[this.instance.name];
24
+ const version = local?.jsonFile?.contents?.version;
25
+ if (version)
26
+ return effect_1.Effect.succeed(`~${version}`);
27
+ }
28
+ return effect_1.Effect.succeed('0.0.0');
29
+ }
30
+ // @TODO: this name is inaccurate, check how it is used and change logic or rename
31
+ getSemver() {
32
+ return effect_1.Effect.succeed(this.raw);
33
+ }
34
+ setSemver(version) {
35
+ return effect_1.Effect.succeed(_1.Specifier.create(this.instance, version));
36
+ }
37
+ }
38
+ exports.WorkspaceProtocolSpecifier = WorkspaceProtocolSpecifier;
@@ -1,3 +1,3 @@
1
- import type { Result } from 'tightrope/result';
1
+ import { Effect } from 'effect';
2
2
  import type { PackageJsonFile } from '../../get-package-json-files/package-json-file';
3
- export declare function getNonEmptyStringProp(propPath: string, file: PackageJsonFile): Result<string>;
3
+ export declare function getNonEmptyStringProp(propPath: string, file: PackageJsonFile): Effect.Effect<never, unknown, string>;
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNonEmptyStringProp = void 0;
4
- const Function_1 = require("@effect/data/Function");
5
- const get_1 = require("tightrope/fn/get");
4
+ const effect_1 = require("effect");
6
5
  const is_non_empty_string_1 = require("tightrope/guard/is-non-empty-string");
7
- const filter_1 = require("tightrope/result/filter");
8
- const map_err_1 = require("tightrope/result/map-err");
6
+ const get_1 = require("../../lib/get");
7
+ const getOptionOfNonEmptyString = effect_1.Option.liftPredicate(is_non_empty_string_1.isNonEmptyString);
9
8
  function getNonEmptyStringProp(propPath, file) {
10
- return (0, Function_1.pipe)((0, get_1.get)(file.contents, ...propPath.split('.')), (0, filter_1.filter)(is_non_empty_string_1.isNonEmptyString, ''), (0, map_err_1.mapErr)(() => new Error(`Failed to get ${propPath} in ${file.shortPath}`)));
9
+ return (0, effect_1.pipe)((0, get_1.get)(file.jsonFile.contents, ...propPath.split('.')), effect_1.Effect.flatMap((value) => getOptionOfNonEmptyString(value)), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`<${file.jsonFile.shortPath}>.${propPath} is not a non-empty string`)));
11
10
  }
12
11
  exports.getNonEmptyStringProp = getNonEmptyStringProp;
@@ -1,12 +1,12 @@
1
- import type { Result } from 'tightrope/result';
1
+ import { Effect } from 'effect';
2
2
  import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
3
- import type { Delete } from '../get-version-groups/lib/delete';
3
+ import type { Delete } from '../version-group/lib/delete';
4
4
  export declare class NameAndVersionPropsStrategy {
5
5
  _tag: string;
6
6
  name: string;
7
7
  path: string;
8
8
  namePath: string;
9
9
  constructor(name: string, path: string, namePath: string);
10
- read(file: PackageJsonFile): Result<[string, string][]>;
11
- write(file: PackageJsonFile, [, version]: [string, string | Delete]): Result<PackageJsonFile>;
10
+ read(file: PackageJsonFile): Effect.Effect<never, never, [string, string][]>;
11
+ write(file: PackageJsonFile, [, version]: [string, string | Delete]): Effect.Effect<never, never, PackageJsonFile>;
12
12
  }
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NameAndVersionPropsStrategy = void 0;
4
- const Function_1 = require("@effect/data/Function");
5
- const get_1 = require("tightrope/fn/get");
6
- const and_then_1 = require("tightrope/result/and-then");
7
- const from_try_1 = require("tightrope/result/from-try");
8
- const map_1 = require("tightrope/result/map");
9
- const tap_1 = require("tightrope/result/tap");
10
- const delete_1 = require("../get-version-groups/lib/delete");
4
+ const effect_1 = require("effect");
5
+ const is_object_1 = require("tightrope/guard/is-object");
6
+ const get_1 = require("../lib/get");
7
+ const delete_1 = require("../version-group/lib/delete");
11
8
  const get_non_empty_string_prop_1 = require("./lib/get-non-empty-string-prop");
9
+ const getOptionOfObject = effect_1.Option.liftPredicate((is_object_1.isObject));
12
10
  class NameAndVersionPropsStrategy {
13
11
  constructor(name, path, namePath) {
14
12
  this._tag = 'name~version';
@@ -17,33 +15,46 @@ class NameAndVersionPropsStrategy {
17
15
  this.namePath = namePath;
18
16
  }
19
17
  read(file) {
20
- const path = this.path;
21
- const namePath = this.namePath;
22
- return (0, Function_1.pipe)(
23
- // get name prop
24
- (0, get_non_empty_string_prop_1.getNonEmptyStringProp)(namePath, file),
18
+ return (0, effect_1.pipe)(effect_1.Effect.Do,
19
+ // get the name prop
20
+ effect_1.Effect.bind('name', () => (0, get_non_empty_string_prop_1.getNonEmptyStringProp)(this.namePath, file)),
25
21
  // add the version prop
26
- (0, and_then_1.andThen)((name) => (0, Function_1.pipe)((0, get_non_empty_string_prop_1.getNonEmptyStringProp)(path, file), (0, map_1.map)((version) => ({ name, version })))),
22
+ effect_1.Effect.bind('version', () => (0, effect_1.pipe)((0, get_non_empty_string_prop_1.getNonEmptyStringProp)(this.path, file),
23
+ /**
24
+ * In order to report an `InstanceReport.MissingLocalVersion`, we need
25
+ * to ensure that a value is returned for `local` package .version
26
+ * properties so we can know that `this.name` is a package developed
27
+ * in this repo but that its version is missing.
28
+ *
29
+ * Not doing this results in the invalid local package being ignored
30
+ * and each installation of it being checked for mismatches amongst
31
+ * themselves.
32
+ */
33
+ this.name === 'local'
34
+ ? effect_1.Effect.catchAll(() => effect_1.Effect.succeed('PACKAGE_JSON_HAS_NO_VERSION'))
35
+ : effect_1.Effect.map(effect_1.identity))),
27
36
  // if both are non empty strings, we can return them
28
- (0, map_1.map)(({ name, version }) => [[name, version]]));
37
+ effect_1.Effect.map(({ name, version }) => [[name, version]]), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`NameAndVersionPropsStrategy#${this.name} found nothing at <${file.jsonFile.shortPath}>.${this.path} & .${this.namePath}`)),
38
+ // if either are invalid, default to empty
39
+ effect_1.Effect.catchAll(() => effect_1.Effect.succeed([])));
29
40
  }
30
41
  write(file, [, version]) {
31
42
  const path = this.path;
32
- const { contents } = file;
43
+ const { contents } = file.jsonFile;
33
44
  const isNestedPath = path.includes('.');
34
45
  const nextValue = version === delete_1.DELETE ? undefined : version;
35
46
  if (isNestedPath) {
36
47
  const fullPath = path.split('.');
37
48
  const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
38
49
  const key = fullPath.slice(-1).join('');
39
- return (0, Function_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), (0, tap_1.tap)((parent) => {
40
- parent[key] = version;
41
- }), (0, map_1.map)(() => file));
50
+ return (0, effect_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), effect_1.Effect.flatMap(getOptionOfObject), effect_1.Effect.flatMap((parent) => effect_1.Effect.try(() => {
51
+ parent[key] = nextValue;
52
+ })), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), effect_1.Effect.catchAll(() => effect_1.Effect.succeed(file)), effect_1.Effect.map(() => file));
42
53
  }
43
54
  else {
44
- return (0, Function_1.pipe)((0, from_try_1.fromTry)(() => {
45
- contents[path] = nextValue;
46
- }), (0, map_1.map)(() => file));
55
+ return (0, effect_1.pipe)(getOptionOfObject(contents), effect_1.Effect.flatMap((parent) => effect_1.Effect.try(() => {
56
+ parent[this.path] = nextValue;
57
+ })), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), effect_1.Effect.catchAll(() => effect_1.Effect.succeed(file)), effect_1.Effect.map(() => file));
47
58
  }
48
59
  }
49
60
  }
@@ -1,11 +1,11 @@
1
- import type { Result } from 'tightrope/result';
1
+ import { Effect } from 'effect';
2
2
  import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
3
- import type { Delete } from '../get-version-groups/lib/delete';
3
+ import type { Delete } from '../version-group/lib/delete';
4
4
  export declare class NamedVersionStringStrategy {
5
5
  _tag: string;
6
6
  name: string;
7
7
  path: string;
8
8
  constructor(name: string, path: string);
9
- read(file: PackageJsonFile): Result<[string, string][]>;
10
- write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Result<PackageJsonFile>;
9
+ read(file: PackageJsonFile): Effect.Effect<never, never, [string, string][]>;
10
+ write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Effect.Effect<never, never, PackageJsonFile>;
11
11
  }
@@ -1,16 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NamedVersionStringStrategy = void 0;
4
- const Function_1 = require("@effect/data/Function");
5
- const get_1 = require("tightrope/fn/get");
4
+ const effect_1 = require("effect");
5
+ const is_non_empty_object_1 = require("tightrope/guard/is-non-empty-object");
6
6
  const is_non_empty_string_1 = require("tightrope/guard/is-non-empty-string");
7
- const result_1 = require("tightrope/result");
8
- const and_then_1 = require("tightrope/result/and-then");
9
- const from_try_1 = require("tightrope/result/from-try");
10
- const map_1 = require("tightrope/result/map");
11
- const tap_1 = require("tightrope/result/tap");
12
- const delete_1 = require("../get-version-groups/lib/delete");
7
+ const get_1 = require("../lib/get");
8
+ const delete_1 = require("../version-group/lib/delete");
13
9
  const get_non_empty_string_prop_1 = require("./lib/get-non-empty-string-prop");
10
+ const getOptionOfNonEmptyString = effect_1.Option.liftPredicate(is_non_empty_string_1.isNonEmptyString);
11
+ const getOptionOfNonEmptyObject = effect_1.Option.liftPredicate((is_non_empty_object_1.isNonEmptyObject));
14
12
  class NamedVersionStringStrategy {
15
13
  constructor(name, path) {
16
14
  this._tag = 'name@version';
@@ -19,34 +17,34 @@ class NamedVersionStringStrategy {
19
17
  }
20
18
  read(file) {
21
19
  const path = this.path;
22
- return (0, Function_1.pipe)(
20
+ return (0, effect_1.pipe)(
23
21
  // get version prop
24
22
  (0, get_non_empty_string_prop_1.getNonEmptyStringProp)(path, file),
25
23
  // if it is a non empty string, we can read it
26
- (0, and_then_1.andThen)((value) => {
27
- const [name, version] = value.split(/@(.*)/);
28
- return (0, is_non_empty_string_1.isNonEmptyString)(name) && (0, is_non_empty_string_1.isNonEmptyString)(version)
29
- ? new result_1.Ok([[name, version]])
30
- : new result_1.Err(new Error(`Strategy<name@version> failed to get ${path} in ${file.shortPath}`));
31
- }));
24
+ effect_1.Effect.map((value) => value.split(/@(.*)/)),
25
+ // check the string was properly formed
26
+ effect_1.Effect.flatMap(([name, version]) => effect_1.Effect.all([getOptionOfNonEmptyString(name), getOptionOfNonEmptyString(version)])),
27
+ // return an array of one entry if valid
28
+ effect_1.Effect.map(([name, version]) => [[name, version]]), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`NamedVersionStringStrategy#${this.name} found nothing at <${file.jsonFile.shortPath}>.${this.path}`)),
29
+ // if value is invalid, default to empty
30
+ effect_1.Effect.catchAll(() => effect_1.Effect.succeed([])));
32
31
  }
33
32
  write(file, [name, version]) {
34
- const { contents } = file;
35
- const path = this.path;
36
- const isNestedPath = path.includes('.');
33
+ const { contents } = file.jsonFile;
34
+ const isNestedPath = this.path.includes('.');
37
35
  const nextValue = version === delete_1.DELETE ? undefined : `${name}@${version}`;
38
36
  if (isNestedPath) {
39
- const fullPath = path.split('.');
37
+ const fullPath = this.path.split('.');
40
38
  const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
41
39
  const key = fullPath.slice(-1).join('');
42
- return (0, Function_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), (0, tap_1.tap)((parent) => {
40
+ return (0, effect_1.pipe)((0, get_1.get)(contents, ...pathToParent.split('.')), effect_1.Effect.flatMap(getOptionOfNonEmptyObject), effect_1.Effect.flatMap((parent) => effect_1.Effect.try(() => {
43
41
  parent[key] = nextValue;
44
- }), (0, map_1.map)(() => file));
42
+ })), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), effect_1.Effect.catchAll(() => effect_1.Effect.succeed(file)), effect_1.Effect.map(() => file));
45
43
  }
46
44
  else {
47
- return (0, Function_1.pipe)((0, from_try_1.fromTry)(() => {
48
- contents[path] = nextValue;
49
- }), (0, map_1.map)(() => file));
45
+ return (0, effect_1.pipe)(getOptionOfNonEmptyObject(contents), effect_1.Effect.flatMap((parent) => effect_1.Effect.try(() => {
46
+ parent[this.path] = nextValue;
47
+ })), effect_1.Effect.tapError(() => effect_1.Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), effect_1.Effect.catchAll(() => effect_1.Effect.succeed(file)), effect_1.Effect.map(() => file));
50
48
  }
51
49
  }
52
50
  }
@@ -1,11 +1,11 @@
1
- import type { Result } from 'tightrope/result';
1
+ import { Effect } from 'effect';
2
2
  import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
3
- import type { Delete } from '../get-version-groups/lib/delete';
3
+ import type { Delete } from '../version-group/lib/delete';
4
4
  export declare class UnnamedVersionStringStrategy {
5
5
  _tag: string;
6
6
  name: string;
7
7
  path: string;
8
8
  constructor(name: string, path: string);
9
- read(file: PackageJsonFile): Result<[string, string][]>;
10
- write(file: PackageJsonFile, [, version]: [string, string | Delete]): Result<PackageJsonFile>;
9
+ read(file: PackageJsonFile): Effect.Effect<never, never, [string, string][]>;
10
+ write(file: PackageJsonFile, [, version]: [string, string | Delete]): Effect.Effect<never, never, PackageJsonFile>;
11
11
  }