syncpack 12.2.0 → 12.3.1
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.
- package/README.md +5 -5
- package/dist/bin-fix-mismatches/fix-mismatches.d.ts +9 -9
- package/dist/bin-fix-mismatches/fix-mismatches.js +43 -54
- package/dist/bin-fix-mismatches/index.js +26 -31
- package/dist/bin-format/format.d.ts +6 -4
- package/dist/bin-format/format.js +78 -53
- package/dist/bin-format/index.js +20 -25
- package/dist/bin-lint/index.js +15 -20
- package/dist/bin-lint/lint.d.ts +4 -4
- package/dist/bin-lint/lint.js +51 -19
- package/dist/bin-lint-semver-ranges/index.js +24 -29
- package/dist/bin-lint-semver-ranges/lint-semver-ranges.d.ts +8 -8
- package/dist/bin-lint-semver-ranges/lint-semver-ranges.js +34 -44
- package/dist/bin-list/index.js +24 -29
- package/dist/bin-list/list.d.ts +7 -7
- package/dist/bin-list/list.js +55 -64
- package/dist/bin-list-mismatches/index.js +24 -29
- package/dist/bin-list-mismatches/list-mismatches.d.ts +10 -10
- package/dist/bin-list-mismatches/list-mismatches.js +62 -70
- package/dist/bin-prompt/index.js +26 -31
- package/dist/bin-prompt/prompt.d.ts +4 -4
- package/dist/bin-prompt/prompt.js +41 -48
- package/dist/bin-set-semver-ranges/index.js +26 -31
- package/dist/bin-set-semver-ranges/set-semver-ranges.d.ts +4 -4
- package/dist/bin-set-semver-ranges/set-semver-ranges.js +26 -30
- package/dist/bin-update/effects.d.ts +18 -18
- package/dist/bin-update/effects.js +77 -106
- package/dist/bin-update/index.js +23 -28
- package/dist/bin-update/update.d.ts +5 -5
- package/dist/bin-update/update.js +37 -45
- package/dist/bin.js +8 -5
- package/dist/config/get-custom-types.d.ts +9 -9
- package/dist/config/get-custom-types.js +22 -27
- package/dist/config/get-enabled-types.d.ts +8 -8
- package/dist/config/get-enabled-types.js +42 -48
- package/dist/config/get-filter.d.ts +1 -1
- package/dist/config/get-filter.js +6 -9
- package/dist/config/get-indent.d.ts +1 -1
- package/dist/config/get-indent.js +6 -9
- package/dist/config/get-sort-az.d.ts +1 -1
- package/dist/config/get-sort-az.js +6 -17
- package/dist/config/get-sort-exports.d.ts +2 -0
- package/dist/config/get-sort-exports.js +8 -0
- package/dist/config/get-sort-first.d.ts +1 -1
- package/dist/config/get-sort-first.js +6 -8
- package/dist/config/get-source.d.ts +1 -1
- package/dist/config/get-source.js +4 -8
- package/dist/config/tag.d.ts +1 -1
- package/dist/config/tag.js +2 -5
- package/dist/config/types.d.ts +16 -5
- package/dist/config/types.js +1 -2
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +25 -10
- package/dist/error-handlers/default-error-handlers.d.ts +10 -10
- package/dist/error-handlers/default-error-handlers.js +55 -61
- package/dist/get-context/index.d.ts +5 -5
- package/dist/get-context/index.js +13 -17
- package/dist/get-context/lib/key-by.js +1 -5
- package/dist/get-instances/index.d.ts +7 -7
- package/dist/get-instances/index.js +19 -23
- package/dist/get-instances/instance.d.ts +7 -7
- package/dist/get-instances/instance.js +4 -8
- package/dist/get-package-json-files/get-file-paths.d.ts +7 -7
- package/dist/get-package-json-files/get-file-paths.js +10 -15
- package/dist/get-package-json-files/get-patterns/get-lerna-patterns.d.ts +2 -2
- package/dist/get-package-json-files/get-patterns/get-lerna-patterns.js +8 -12
- package/dist/get-package-json-files/get-patterns/get-pnpm-patterns.d.ts +2 -2
- package/dist/get-package-json-files/get-patterns/get-pnpm-patterns.js +8 -12
- package/dist/get-package-json-files/get-patterns/get-yarn-patterns.d.ts +2 -2
- package/dist/get-package-json-files/get-patterns/get-yarn-patterns.js +14 -18
- package/dist/get-package-json-files/get-patterns/index.d.ts +3 -3
- package/dist/get-package-json-files/get-patterns/index.js +11 -15
- package/dist/get-package-json-files/index.d.ts +8 -8
- package/dist/get-package-json-files/index.js +6 -10
- package/dist/get-package-json-files/package-json-file.d.ts +6 -6
- package/dist/get-package-json-files/package-json-file.js +8 -12
- package/dist/guards/can-add-to-group.d.ts +4 -4
- package/dist/guards/can-add-to-group.js +10 -14
- package/dist/guards/is-semver.js +3 -7
- package/dist/guards/is-valid-semver-range.d.ts +1 -1
- package/dist/guards/is-valid-semver-range.js +12 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/io/ask-for-choice.d.ts +5 -5
- package/dist/io/ask-for-choice.js +5 -9
- package/dist/io/ask-for-input.d.ts +5 -5
- package/dist/io/ask-for-input.js +5 -9
- package/dist/io/exit-if-invalid.d.ts +3 -3
- package/dist/io/exit-if-invalid.js +5 -9
- package/dist/io/glob-sync.d.ts +5 -5
- package/dist/io/glob-sync.js +4 -9
- package/dist/io/index.d.ts +8 -8
- package/dist/io/index.js +12 -38
- package/dist/io/read-config-file.d.ts +7 -0
- package/dist/io/read-config-file.js +22 -0
- package/dist/io/read-file-sync.d.ts +5 -5
- package/dist/io/read-file-sync.js +4 -9
- package/dist/io/read-json-file-sync.d.ts +8 -8
- package/dist/io/read-json-file-sync.js +10 -16
- package/dist/io/read-yaml-file-sync.d.ts +5 -5
- package/dist/io/read-yaml-file-sync.js +4 -8
- package/dist/io/to-json.d.ts +9 -0
- package/dist/io/to-json.js +29 -0
- package/dist/io/write-file-sync.d.ts +5 -5
- package/dist/io/write-file-sync.js +5 -10
- package/dist/io/write-if-changed.d.ts +4 -10
- package/dist/io/write-if-changed.js +9 -44
- package/dist/lib/format-repository-url.js +1 -5
- package/dist/lib/get-group-header.d.ts +2 -2
- package/dist/lib/get-group-header.js +4 -12
- package/dist/lib/get.d.ts +10 -10
- package/dist/lib/get.js +15 -19
- package/dist/lib/pad-start.js +1 -5
- package/dist/lib/ring-buffer.js +1 -5
- package/dist/lib/set-semver-range.d.ts +1 -1
- package/dist/lib/set-semver-range.js +8 -12
- package/dist/lib/show-help-on-error.js +3 -10
- package/dist/lib/sort-by-name.js +1 -5
- package/dist/lib/with-logger.d.ts +1 -1
- package/dist/lib/with-logger.js +17 -24
- package/dist/option.d.ts +1 -1
- package/dist/option.js +8 -14
- package/dist/report.d.ts +2 -2
- package/dist/report.js +2 -5
- package/dist/schema.json +24 -0
- package/dist/semver-group/create-semver-groups.d.ts +3 -3
- package/dist/semver-group/create-semver-groups.js +28 -32
- package/dist/semver-group/disabled.d.ts +11 -11
- package/dist/semver-group/disabled.js +6 -10
- package/dist/semver-group/filtered-out.d.ts +12 -12
- package/dist/semver-group/filtered-out.js +8 -12
- package/dist/semver-group/ignored.d.ts +11 -11
- package/dist/semver-group/ignored.js +6 -10
- package/dist/semver-group/index.d.ts +6 -7
- package/dist/semver-group/index.js +4 -7
- package/dist/semver-group/with-range.d.ts +11 -11
- package/dist/semver-group/with-range.js +13 -17
- package/dist/specifier/alias.d.ts +5 -5
- package/dist/specifier/alias.js +9 -13
- package/dist/specifier/base.d.ts +7 -7
- package/dist/specifier/base.js +9 -13
- package/dist/specifier/delete.d.ts +5 -5
- package/dist/specifier/delete.js +5 -9
- package/dist/specifier/exact.d.ts +6 -6
- package/dist/specifier/exact.js +7 -11
- package/dist/specifier/file.d.ts +1 -1
- package/dist/specifier/file.js +2 -6
- package/dist/specifier/hosted-git.d.ts +5 -5
- package/dist/specifier/hosted-git.js +9 -13
- package/dist/specifier/index.d.ts +13 -13
- package/dist/specifier/index.js +28 -31
- package/dist/specifier/latest.d.ts +6 -6
- package/dist/specifier/latest.js +7 -11
- package/dist/specifier/lib/non-semver-error.d.ts +5 -5
- package/dist/specifier/lib/non-semver-error.js +3 -7
- package/dist/specifier/lib/parse-specifier.d.ts +1 -1
- package/dist/specifier/lib/parse-specifier.js +4 -11
- package/dist/specifier/lib/specific-registry-result.js +1 -2
- package/dist/specifier/range.d.ts +6 -6
- package/dist/specifier/range.js +7 -11
- package/dist/specifier/tag.d.ts +2 -2
- package/dist/specifier/tag.js +2 -6
- package/dist/specifier/unsupported.d.ts +1 -1
- package/dist/specifier/unsupported.js +2 -6
- package/dist/specifier/url.d.ts +1 -1
- package/dist/specifier/url.js +2 -6
- package/dist/specifier/workspace-protocol.d.ts +7 -7
- package/dist/specifier/workspace-protocol.js +9 -13
- package/dist/strategy/lib/get-non-empty-string-prop.d.ts +2 -2
- package/dist/strategy/lib/get-non-empty-string-prop.js +6 -10
- package/dist/strategy/name-and-version-props.d.ts +4 -4
- package/dist/strategy/name-and-version-props.js +19 -23
- package/dist/strategy/named-version-string.d.ts +4 -4
- package/dist/strategy/named-version-string.js +20 -24
- package/dist/strategy/unnamed-version-string.d.ts +4 -4
- package/dist/strategy/unnamed-version-string.js +17 -21
- package/dist/strategy/versions-by-name.d.ts +4 -4
- package/dist/strategy/versions-by-name.js +11 -15
- package/dist/version-group/banned.d.ts +7 -7
- package/dist/version-group/banned.js +8 -12
- package/dist/version-group/create-version-groups.d.ts +3 -3
- package/dist/version-group/create-version-groups.js +34 -38
- package/dist/version-group/filtered-out.d.ts +8 -8
- package/dist/version-group/filtered-out.js +8 -12
- package/dist/version-group/ignored.d.ts +7 -7
- package/dist/version-group/ignored.js +6 -10
- package/dist/version-group/index.d.ts +9 -10
- package/dist/version-group/index.js +4 -7
- package/dist/version-group/lib/clean.js +4 -11
- package/dist/version-group/lib/delete.js +1 -4
- package/dist/version-group/lib/get-highest-version.d.ts +2 -2
- package/dist/version-group/lib/get-highest-version.js +3 -7
- package/dist/version-group/lib/get-lowest-version.d.ts +2 -2
- package/dist/version-group/lib/get-lowest-version.js +3 -7
- package/dist/version-group/lib/get-preferred-version.d.ts +4 -4
- package/dist/version-group/lib/get-preferred-version.js +17 -24
- package/dist/version-group/lib/get-range-score.js +13 -17
- package/dist/version-group/lib/group-by.js +1 -5
- package/dist/version-group/pinned.d.ts +7 -7
- package/dist/version-group/pinned.js +8 -12
- package/dist/version-group/same-range.d.ts +8 -8
- package/dist/version-group/same-range.js +23 -30
- package/dist/version-group/snapped-to.d.ts +7 -7
- package/dist/version-group/snapped-to.js +20 -24
- package/dist/version-group/standard.d.ts +7 -7
- package/dist/version-group/standard.js +29 -33
- package/package.json +30 -37
- package/dist/io/read-config-file-sync.d.ts +0 -7
- package/dist/io/read-config-file-sync.js +0 -26
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.NonSemverError = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
class NonSemverError extends effect_1.Data.TaggedClass('NonSemverError') {
|
|
1
|
+
import { Data, Effect } from 'effect';
|
|
2
|
+
export class NonSemverError extends Data.TaggedClass('NonSemverError') {
|
|
6
3
|
static asEffect(specifier) {
|
|
7
|
-
return
|
|
4
|
+
return Effect.fail(new NonSemverError({ specifier }));
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.NonSemverError = NonSemverError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import npa from 'npm-package-arg';
|
|
2
|
-
import type { PackageJsonFile } from '../../get-package-json-files/package-json-file';
|
|
2
|
+
import type { PackageJsonFile } from '../../get-package-json-files/package-json-file.js';
|
|
3
3
|
/** Extends npm/npm-package-arg to support "workspace:*" */
|
|
4
4
|
export interface WorkspaceProtocolResult {
|
|
5
5
|
type: 'workspaceProtocol';
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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) {
|
|
1
|
+
import npa from 'npm-package-arg';
|
|
2
|
+
export function parseSpecifier(name, specifier, packageJsonFile) {
|
|
9
3
|
if (specifier === 'workspace:*' || specifier === 'workspace:~' || specifier === 'workspace:^') {
|
|
10
|
-
const parsed =
|
|
4
|
+
const parsed = npa.resolve(name, packageJsonFile.jsonFile.dirPath, specifier.replace('workspace:', 'file:'));
|
|
11
5
|
return {
|
|
12
6
|
escapedName: parsed.escapedName,
|
|
13
7
|
name: parsed.name,
|
|
@@ -18,6 +12,5 @@ function parseSpecifier(name, specifier, packageJsonFile) {
|
|
|
18
12
|
type: 'workspaceProtocol',
|
|
19
13
|
};
|
|
20
14
|
}
|
|
21
|
-
return
|
|
15
|
+
return npa.resolve(name, specifier, packageJsonFile.jsonFile.dirPath);
|
|
22
16
|
}
|
|
23
|
-
exports.parseSpecifier = parseSpecifier;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { NonSemverError } from './lib/non-semver-error';
|
|
5
|
-
import type { SpecificRegistryResult } from './lib/specific-registry-result';
|
|
2
|
+
import { BaseSpecifier } from './base.js';
|
|
3
|
+
import { Specifier } from './index.js';
|
|
4
|
+
import { NonSemverError } from './lib/non-semver-error.js';
|
|
5
|
+
import type { SpecificRegistryResult } from './lib/specific-registry-result.js';
|
|
6
6
|
type T = SpecificRegistryResult<'range'>;
|
|
7
7
|
/**
|
|
8
8
|
* @example "^1.2.3"
|
|
@@ -12,8 +12,8 @@ export declare class RangeSpecifier extends BaseSpecifier<T> {
|
|
|
12
12
|
/** The public name referenced in config */
|
|
13
13
|
name: "range";
|
|
14
14
|
/** Return the semver version including the range */
|
|
15
|
-
getSemver(): Effect.Effect<
|
|
15
|
+
getSemver(): Effect.Effect<string, NonSemverError>;
|
|
16
16
|
/** Get a new `Specifier` from the given semver version applied to this one */
|
|
17
|
-
setSemver(version: string): Effect.Effect<
|
|
17
|
+
setSemver(version: string): Effect.Effect<Specifier.Any>;
|
|
18
18
|
}
|
|
19
19
|
export {};
|
package/dist/specifier/range.js
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
const base_1 = require("./base");
|
|
7
|
-
const non_semver_error_1 = require("./lib/non-semver-error");
|
|
1
|
+
import { Effect, pipe } from 'effect';
|
|
2
|
+
import { BaseSpecifier } from './base.js';
|
|
3
|
+
import { Specifier } from './index.js';
|
|
4
|
+
import { NonSemverError } from './lib/non-semver-error.js';
|
|
8
5
|
/**
|
|
9
6
|
* @example "^1.2.3"
|
|
10
7
|
*/
|
|
11
|
-
class RangeSpecifier extends
|
|
8
|
+
export class RangeSpecifier extends BaseSpecifier {
|
|
12
9
|
_tag = 'Range';
|
|
13
10
|
/** The public name referenced in config */
|
|
14
11
|
name = 'range';
|
|
15
12
|
/** Return the semver version including the range */
|
|
16
13
|
getSemver() {
|
|
17
|
-
return
|
|
14
|
+
return pipe(this.parse(), Effect.mapError(() => new NonSemverError({ specifier: this })), Effect.map((parsed) => parsed.fetchSpec));
|
|
18
15
|
}
|
|
19
16
|
/** Get a new `Specifier` from the given semver version applied to this one */
|
|
20
17
|
setSemver(version) {
|
|
21
|
-
return
|
|
18
|
+
return Effect.succeed(Specifier.create(this.instance, version));
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.RangeSpecifier = RangeSpecifier;
|
package/dist/specifier/tag.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseSpecifier } from './base';
|
|
2
|
-
import type { SpecificRegistryResult } from './lib/specific-registry-result';
|
|
1
|
+
import { BaseSpecifier } from './base.js';
|
|
2
|
+
import type { SpecificRegistryResult } from './lib/specific-registry-result.js';
|
|
3
3
|
/**
|
|
4
4
|
* @example "latest"
|
|
5
5
|
* @example "made-up-by-some-dev"
|
package/dist/specifier/tag.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TagSpecifier = void 0;
|
|
4
|
-
const base_1 = require("./base");
|
|
1
|
+
import { BaseSpecifier } from './base.js';
|
|
5
2
|
/**
|
|
6
3
|
* @example "latest"
|
|
7
4
|
* @example "made-up-by-some-dev"
|
|
8
5
|
*/
|
|
9
|
-
class TagSpecifier extends
|
|
6
|
+
export class TagSpecifier extends BaseSpecifier {
|
|
10
7
|
_tag = 'Tag';
|
|
11
8
|
/** The public name referenced in config */
|
|
12
9
|
name = 'tag';
|
|
13
10
|
}
|
|
14
|
-
exports.TagSpecifier = TagSpecifier;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnsupportedSpecifier = void 0;
|
|
4
|
-
const base_1 = require("./base");
|
|
1
|
+
import { BaseSpecifier } from './base.js';
|
|
5
2
|
/** A specifier not supported by the `npm` package manager */
|
|
6
|
-
class UnsupportedSpecifier extends
|
|
3
|
+
export class UnsupportedSpecifier extends BaseSpecifier {
|
|
7
4
|
_tag = 'Unsupported';
|
|
8
5
|
/** The public name referenced in config */
|
|
9
6
|
name = 'unsupported';
|
|
10
7
|
}
|
|
11
|
-
exports.UnsupportedSpecifier = UnsupportedSpecifier;
|
package/dist/specifier/url.d.ts
CHANGED
package/dist/specifier/url.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UrlSpecifier = void 0;
|
|
4
|
-
const base_1 = require("./base");
|
|
1
|
+
import { BaseSpecifier } from './base.js';
|
|
5
2
|
/** @example "http://x.com/foo.tgz" */
|
|
6
|
-
class UrlSpecifier extends
|
|
3
|
+
export class UrlSpecifier extends BaseSpecifier {
|
|
7
4
|
_tag = 'Url';
|
|
8
5
|
/** The public name referenced in config */
|
|
9
6
|
name = 'url';
|
|
10
7
|
}
|
|
11
|
-
exports.UrlSpecifier = UrlSpecifier;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import type { WorkspaceProtocolResult } from './lib/parse-specifier';
|
|
2
|
+
import type { Ctx } from '../get-context/index.js';
|
|
3
|
+
import { BaseSpecifier } from './base.js';
|
|
4
|
+
import { Specifier } from './index.js';
|
|
5
|
+
import type { WorkspaceProtocolResult } from './lib/parse-specifier.js';
|
|
6
6
|
/** Represents "workspace:*" and "workspace:~" */
|
|
7
7
|
export declare class WorkspaceProtocolSpecifier extends BaseSpecifier<WorkspaceProtocolResult> {
|
|
8
8
|
_tag: string;
|
|
@@ -13,7 +13,7 @@ export declare class WorkspaceProtocolSpecifier extends BaseSpecifier<WorkspaceP
|
|
|
13
13
|
* with tools which expect values which conform to the spec. This value is
|
|
14
14
|
* used only when sorting versions.
|
|
15
15
|
*/
|
|
16
|
-
getSemverEquivalent(ctx: Ctx): Effect.Effect<
|
|
17
|
-
getSemver(): Effect.Effect<
|
|
18
|
-
setSemver(version: string): Effect.Effect<
|
|
16
|
+
getSemverEquivalent(ctx: Ctx): Effect.Effect<string>;
|
|
17
|
+
getSemver(): Effect.Effect<string>;
|
|
18
|
+
setSemver(version: string): Effect.Effect<Specifier.Any>;
|
|
19
19
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
const base_1 = require("./base");
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { BaseSpecifier } from './base.js';
|
|
3
|
+
import { Specifier } from './index.js';
|
|
7
4
|
/** Represents "workspace:*" and "workspace:~" */
|
|
8
|
-
class WorkspaceProtocolSpecifier extends
|
|
5
|
+
export class WorkspaceProtocolSpecifier extends BaseSpecifier {
|
|
9
6
|
_tag = 'WorkspaceProtocol';
|
|
10
7
|
/** The public name referenced in config */
|
|
11
8
|
name = 'workspace-protocol';
|
|
@@ -16,23 +13,22 @@ class WorkspaceProtocolSpecifier extends base_1.BaseSpecifier {
|
|
|
16
13
|
*/
|
|
17
14
|
getSemverEquivalent(ctx) {
|
|
18
15
|
if (this.raw === 'workspace:*') {
|
|
19
|
-
return
|
|
16
|
+
return Effect.succeed('*');
|
|
20
17
|
}
|
|
21
18
|
if (this.raw === 'workspace:~' || this.raw === 'workspace:^') {
|
|
22
19
|
const range = this.raw.replace('workspace:', '');
|
|
23
20
|
const local = ctx.packageJsonFilesByName[this.instance.name];
|
|
24
21
|
const version = local?.jsonFile?.contents?.version;
|
|
25
22
|
if (version)
|
|
26
|
-
return
|
|
23
|
+
return Effect.succeed(`${range}${version}`);
|
|
27
24
|
}
|
|
28
|
-
return
|
|
25
|
+
return Effect.succeed('0.0.0');
|
|
29
26
|
}
|
|
30
27
|
// @TODO: this name is inaccurate, check how it is used and change logic or rename
|
|
31
28
|
getSemver() {
|
|
32
|
-
return
|
|
29
|
+
return Effect.succeed(this.raw);
|
|
33
30
|
}
|
|
34
31
|
setSemver(version) {
|
|
35
|
-
return
|
|
32
|
+
return Effect.succeed(Specifier.create(this.instance, version));
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
|
-
exports.WorkspaceProtocolSpecifier = WorkspaceProtocolSpecifier;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import type { PackageJsonFile } from '../../get-package-json-files/package-json-file';
|
|
3
|
-
export declare function getNonEmptyStringProp(propPath: string, file: PackageJsonFile): Effect.Effect<
|
|
2
|
+
import type { PackageJsonFile } from '../../get-package-json-files/package-json-file.js';
|
|
3
|
+
export declare function getNonEmptyStringProp(propPath: string, file: PackageJsonFile): Effect.Effect<string, unknown>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const getOptionOfNonEmptyString = effect_1.Option.liftPredicate(is_non_empty_string_1.isNonEmptyString);
|
|
8
|
-
function getNonEmptyStringProp(propPath, file) {
|
|
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`)));
|
|
1
|
+
import { Effect, Option, pipe } from 'effect';
|
|
2
|
+
import { isNonEmptyString } from 'tightrope/guard/is-non-empty-string.js';
|
|
3
|
+
import { get } from '../../lib/get.js';
|
|
4
|
+
const getOptionOfNonEmptyString = Option.liftPredicate(isNonEmptyString);
|
|
5
|
+
export function getNonEmptyStringProp(propPath, file) {
|
|
6
|
+
return pipe(get(file.jsonFile.contents, ...propPath.split('.')), Effect.flatMap((value) => getOptionOfNonEmptyString(value)), Effect.tapError(() => Effect.logDebug(`<${file.jsonFile.shortPath}>.${propPath} is not a non-empty string`)));
|
|
10
7
|
}
|
|
11
|
-
exports.getNonEmptyStringProp = getNonEmptyStringProp;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
|
|
3
|
-
import type { Delete } from '../version-group/lib/delete';
|
|
2
|
+
import type { PackageJsonFile } from '../get-package-json-files/package-json-file.js';
|
|
3
|
+
import type { Delete } from '../version-group/lib/delete.js';
|
|
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): Effect.Effect<
|
|
11
|
-
write(file: PackageJsonFile, [, version]: [string, string | Delete]): Effect.Effect<
|
|
10
|
+
read(file: PackageJsonFile): Effect.Effect<[string, string][]>;
|
|
11
|
+
write(file: PackageJsonFile, [, version]: [string, string | Delete]): Effect.Effect<PackageJsonFile>;
|
|
12
12
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
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));
|
|
10
|
-
class NameAndVersionPropsStrategy {
|
|
1
|
+
import { Effect, identity, Option, pipe } from 'effect';
|
|
2
|
+
import { isObject } from 'tightrope/guard/is-object.js';
|
|
3
|
+
import { get } from '../lib/get.js';
|
|
4
|
+
import { DELETE } from '../version-group/lib/delete.js';
|
|
5
|
+
import { getNonEmptyStringProp } from './lib/get-non-empty-string-prop.js';
|
|
6
|
+
const getOptionOfObject = Option.liftPredicate((isObject));
|
|
7
|
+
export class NameAndVersionPropsStrategy {
|
|
11
8
|
_tag = 'name~version';
|
|
12
9
|
name;
|
|
13
10
|
path;
|
|
@@ -18,11 +15,11 @@ class NameAndVersionPropsStrategy {
|
|
|
18
15
|
this.namePath = namePath;
|
|
19
16
|
}
|
|
20
17
|
read(file) {
|
|
21
|
-
return
|
|
18
|
+
return pipe(Effect.Do,
|
|
22
19
|
// get the name prop
|
|
23
|
-
|
|
20
|
+
Effect.bind('name', () => getNonEmptyStringProp(this.namePath, file)),
|
|
24
21
|
// add the version prop
|
|
25
|
-
|
|
22
|
+
Effect.bind('version', () => pipe(getNonEmptyStringProp(this.path, file),
|
|
26
23
|
/**
|
|
27
24
|
* In order to report a `MissingLocalVersion`, we need to ensure that
|
|
28
25
|
* a value is returned for `local` package .version properties so we
|
|
@@ -34,31 +31,30 @@ class NameAndVersionPropsStrategy {
|
|
|
34
31
|
* themselves.
|
|
35
32
|
*/
|
|
36
33
|
this.name === 'local'
|
|
37
|
-
?
|
|
38
|
-
:
|
|
34
|
+
? Effect.catchAll(() => Effect.succeed('PACKAGE_JSON_HAS_NO_VERSION'))
|
|
35
|
+
: Effect.map(identity))),
|
|
39
36
|
// if both are non empty strings, we can return them
|
|
40
|
-
|
|
37
|
+
Effect.map(({ name, version }) => [[name, version]]), Effect.tapError(() => Effect.logDebug(`NameAndVersionPropsStrategy#${this.name} found nothing at <${file.jsonFile.shortPath}>.${this.path} & .${this.namePath}`)),
|
|
41
38
|
// if either are invalid, default to empty
|
|
42
|
-
|
|
39
|
+
Effect.catchAll(() => Effect.succeed([])));
|
|
43
40
|
}
|
|
44
41
|
write(file, [, version]) {
|
|
45
42
|
const path = this.path;
|
|
46
43
|
const { contents } = file.jsonFile;
|
|
47
44
|
const isNestedPath = path.includes('.');
|
|
48
|
-
const nextValue = version ===
|
|
45
|
+
const nextValue = version === DELETE ? undefined : version;
|
|
49
46
|
if (isNestedPath) {
|
|
50
47
|
const fullPath = path.split('.');
|
|
51
48
|
const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
|
|
52
49
|
const key = fullPath.slice(-1).join('');
|
|
53
|
-
return
|
|
50
|
+
return pipe(get(contents, ...pathToParent.split('.')), Effect.flatMap(getOptionOfObject), Effect.flatMap((parent) => Effect.try(() => {
|
|
54
51
|
parent[key] = nextValue;
|
|
55
|
-
})),
|
|
52
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
56
53
|
}
|
|
57
54
|
else {
|
|
58
|
-
return
|
|
55
|
+
return pipe(getOptionOfObject(contents), Effect.flatMap((parent) => Effect.try(() => {
|
|
59
56
|
parent[this.path] = nextValue;
|
|
60
|
-
})),
|
|
57
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
61
58
|
}
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
|
-
exports.NameAndVersionPropsStrategy = NameAndVersionPropsStrategy;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
|
|
3
|
-
import type { Delete } from '../version-group/lib/delete';
|
|
2
|
+
import type { PackageJsonFile } from '../get-package-json-files/package-json-file.js';
|
|
3
|
+
import type { Delete } from '../version-group/lib/delete.js';
|
|
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): Effect.Effect<
|
|
10
|
-
write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Effect.Effect<
|
|
9
|
+
read(file: PackageJsonFile): Effect.Effect<[string, string][]>;
|
|
10
|
+
write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Effect.Effect<PackageJsonFile>;
|
|
11
11
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
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));
|
|
12
|
-
class NamedVersionStringStrategy {
|
|
1
|
+
import { Effect, Option, pipe } from 'effect';
|
|
2
|
+
import { isNonEmptyObject } from 'tightrope/guard/is-non-empty-object.js';
|
|
3
|
+
import { isNonEmptyString } from 'tightrope/guard/is-non-empty-string.js';
|
|
4
|
+
import { get } from '../lib/get.js';
|
|
5
|
+
import { DELETE } from '../version-group/lib/delete.js';
|
|
6
|
+
import { getNonEmptyStringProp } from './lib/get-non-empty-string-prop.js';
|
|
7
|
+
const getOptionOfNonEmptyString = Option.liftPredicate(isNonEmptyString);
|
|
8
|
+
const getOptionOfNonEmptyObject = Option.liftPredicate((isNonEmptyObject));
|
|
9
|
+
export class NamedVersionStringStrategy {
|
|
13
10
|
_tag = 'name@version';
|
|
14
11
|
name;
|
|
15
12
|
path;
|
|
@@ -19,35 +16,34 @@ class NamedVersionStringStrategy {
|
|
|
19
16
|
}
|
|
20
17
|
read(file) {
|
|
21
18
|
const path = this.path;
|
|
22
|
-
return
|
|
19
|
+
return pipe(
|
|
23
20
|
// get version prop
|
|
24
|
-
|
|
21
|
+
getNonEmptyStringProp(path, file),
|
|
25
22
|
// if it is a non empty string, we can read it
|
|
26
|
-
|
|
23
|
+
Effect.map((value) => value.split(/@(.*)/)),
|
|
27
24
|
// check the string was properly formed
|
|
28
|
-
|
|
25
|
+
Effect.flatMap(([name, version]) => Effect.all([getOptionOfNonEmptyString(name), getOptionOfNonEmptyString(version)])),
|
|
29
26
|
// return an array of one entry if valid
|
|
30
|
-
|
|
27
|
+
Effect.map(([name, version]) => [[name, version]]), Effect.tapError(() => Effect.logDebug(`NamedVersionStringStrategy#${this.name} found nothing at <${file.jsonFile.shortPath}>.${this.path}`)),
|
|
31
28
|
// if value is invalid, default to empty
|
|
32
|
-
|
|
29
|
+
Effect.catchAll(() => Effect.succeed([])));
|
|
33
30
|
}
|
|
34
31
|
write(file, [name, version]) {
|
|
35
32
|
const { contents } = file.jsonFile;
|
|
36
33
|
const isNestedPath = this.path.includes('.');
|
|
37
|
-
const nextValue = version ===
|
|
34
|
+
const nextValue = version === DELETE ? undefined : `${name}@${version}`;
|
|
38
35
|
if (isNestedPath) {
|
|
39
36
|
const fullPath = this.path.split('.');
|
|
40
37
|
const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
|
|
41
38
|
const key = fullPath.slice(-1).join('');
|
|
42
|
-
return
|
|
39
|
+
return pipe(get(contents, ...pathToParent.split('.')), Effect.flatMap(getOptionOfNonEmptyObject), Effect.flatMap((parent) => Effect.try(() => {
|
|
43
40
|
parent[key] = nextValue;
|
|
44
|
-
})),
|
|
41
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
45
42
|
}
|
|
46
43
|
else {
|
|
47
|
-
return
|
|
44
|
+
return pipe(getOptionOfNonEmptyObject(contents), Effect.flatMap((parent) => Effect.try(() => {
|
|
48
45
|
parent[this.path] = nextValue;
|
|
49
|
-
})),
|
|
46
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
|
-
exports.NamedVersionStringStrategy = NamedVersionStringStrategy;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
|
|
3
|
-
import type { Delete } from '../version-group/lib/delete';
|
|
2
|
+
import type { PackageJsonFile } from '../get-package-json-files/package-json-file.js';
|
|
3
|
+
import type { Delete } from '../version-group/lib/delete.js';
|
|
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): Effect.Effect<
|
|
10
|
-
write(file: PackageJsonFile, [, version]: [string, string | Delete]): Effect.Effect<
|
|
9
|
+
read(file: PackageJsonFile): Effect.Effect<[string, string][]>;
|
|
10
|
+
write(file: PackageJsonFile, [, version]: [string, string | Delete]): Effect.Effect<PackageJsonFile>;
|
|
11
11
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const get_non_empty_string_prop_1 = require("./lib/get-non-empty-string-prop");
|
|
9
|
-
const getOptionOfNonEmptyObject = effect_1.Option.liftPredicate((is_non_empty_object_1.isNonEmptyObject));
|
|
10
|
-
class UnnamedVersionStringStrategy {
|
|
1
|
+
import { Effect, Option, pipe } from 'effect';
|
|
2
|
+
import { isNonEmptyObject } from 'tightrope/guard/is-non-empty-object.js';
|
|
3
|
+
import { get } from '../lib/get.js';
|
|
4
|
+
import { DELETE } from '../version-group/lib/delete.js';
|
|
5
|
+
import { getNonEmptyStringProp } from './lib/get-non-empty-string-prop.js';
|
|
6
|
+
const getOptionOfNonEmptyObject = Option.liftPredicate((isNonEmptyObject));
|
|
7
|
+
export class UnnamedVersionStringStrategy {
|
|
11
8
|
_tag = 'version';
|
|
12
9
|
name;
|
|
13
10
|
path;
|
|
@@ -16,34 +13,33 @@ class UnnamedVersionStringStrategy {
|
|
|
16
13
|
this.path = path;
|
|
17
14
|
}
|
|
18
15
|
read(file) {
|
|
19
|
-
return
|
|
16
|
+
return pipe(
|
|
20
17
|
// get version prop
|
|
21
|
-
|
|
18
|
+
getNonEmptyStringProp(this.path, file),
|
|
22
19
|
// if it is a non empty string, we can read it
|
|
23
|
-
|
|
20
|
+
Effect.map((version) => {
|
|
24
21
|
const name = this.path.split('.').slice(-1).join('');
|
|
25
22
|
return [[name, version]];
|
|
26
|
-
}),
|
|
23
|
+
}), Effect.tapError(() => Effect.logDebug(`UnnamedVersionStringStrategy#${this.name} found nothing at <${file.jsonFile.shortPath}>.${this.path}`)),
|
|
27
24
|
// if value is invalid, default to empty
|
|
28
|
-
|
|
25
|
+
Effect.catchAll(() => Effect.succeed([])));
|
|
29
26
|
}
|
|
30
27
|
write(file, [, version]) {
|
|
31
28
|
const { contents } = file.jsonFile;
|
|
32
29
|
const isNestedPath = this.path.includes('.');
|
|
33
|
-
const nextValue = version ===
|
|
30
|
+
const nextValue = version === DELETE ? undefined : version;
|
|
34
31
|
if (isNestedPath) {
|
|
35
32
|
const fullPath = this.path.split('.');
|
|
36
33
|
const pathToParent = fullPath.slice(0, fullPath.length - 1).join('.');
|
|
37
34
|
const key = fullPath.slice(-1).join('');
|
|
38
|
-
return
|
|
35
|
+
return pipe(get(contents, ...pathToParent.split('.')), Effect.flatMap(getOptionOfNonEmptyObject), Effect.flatMap((parent) => Effect.try(() => {
|
|
39
36
|
parent[key] = nextValue;
|
|
40
|
-
})),
|
|
37
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
41
38
|
}
|
|
42
39
|
else {
|
|
43
|
-
return
|
|
40
|
+
return pipe(getOptionOfNonEmptyObject(contents), Effect.flatMap((parent) => Effect.try(() => {
|
|
44
41
|
parent[this.path] = nextValue;
|
|
45
|
-
})),
|
|
42
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
|
-
exports.UnnamedVersionStringStrategy = UnnamedVersionStringStrategy;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import type { PackageJsonFile } from '../get-package-json-files/package-json-file';
|
|
3
|
-
import type { Delete } from '../version-group/lib/delete';
|
|
2
|
+
import type { PackageJsonFile } from '../get-package-json-files/package-json-file.js';
|
|
3
|
+
import type { Delete } from '../version-group/lib/delete.js';
|
|
4
4
|
export declare class VersionsByNameStrategy {
|
|
5
5
|
_tag: string;
|
|
6
6
|
name: string;
|
|
7
7
|
path: string;
|
|
8
8
|
constructor(name: string, path: string);
|
|
9
|
-
read(file: PackageJsonFile): Effect.Effect<
|
|
10
|
-
write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Effect.Effect<
|
|
9
|
+
read(file: PackageJsonFile): Effect.Effect<[string, string][]>;
|
|
10
|
+
write(file: PackageJsonFile, [name, version]: [string, string | Delete]): Effect.Effect<PackageJsonFile>;
|
|
11
11
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const delete_1 = require("../version-group/lib/delete");
|
|
8
|
-
const getOptionOfNonEmptyObject = effect_1.Option.liftPredicate((is_non_empty_object_1.isNonEmptyObject));
|
|
9
|
-
class VersionsByNameStrategy {
|
|
1
|
+
import { Effect, Option, pipe } from 'effect';
|
|
2
|
+
import { isNonEmptyObject } from 'tightrope/guard/is-non-empty-object.js';
|
|
3
|
+
import { get } from '../lib/get.js';
|
|
4
|
+
import { DELETE } from '../version-group/lib/delete.js';
|
|
5
|
+
const getOptionOfNonEmptyObject = Option.liftPredicate((isNonEmptyObject));
|
|
6
|
+
export class VersionsByNameStrategy {
|
|
10
7
|
_tag = 'versionsByName';
|
|
11
8
|
name;
|
|
12
9
|
path;
|
|
@@ -15,15 +12,14 @@ class VersionsByNameStrategy {
|
|
|
15
12
|
this.path = path;
|
|
16
13
|
}
|
|
17
14
|
read(file) {
|
|
18
|
-
return
|
|
15
|
+
return pipe(get(file.jsonFile.contents, ...this.path.split('.')), Effect.flatMap((value) => getOptionOfNonEmptyObject(value)), Effect.map((obj) => Object.entries(obj)), Effect.tapError(() => Effect.logDebug(`VersionsByNameStrategy#${this.name} found nothing at <${file.jsonFile.shortPath}>.${this.path}`)),
|
|
19
16
|
// if value is invalid, default to empty
|
|
20
|
-
|
|
17
|
+
Effect.catchAll(() => Effect.succeed([])));
|
|
21
18
|
}
|
|
22
19
|
write(file, [name, version]) {
|
|
23
|
-
const nextValue = version ===
|
|
24
|
-
return
|
|
20
|
+
const nextValue = version === DELETE ? undefined : version;
|
|
21
|
+
return pipe(get(file.jsonFile.contents, ...this.path.split('.')), Effect.flatMap(getOptionOfNonEmptyObject), Effect.flatMap((parent) => Effect.try(() => {
|
|
25
22
|
parent[name] = nextValue;
|
|
26
|
-
})),
|
|
23
|
+
})), Effect.tapError(() => Effect.logDebug(`strategy ${this._tag} with name ${this.name} failed to write to <${file.jsonFile.shortPath}>.${this.path}.${name}`)), Effect.catchAll(() => Effect.succeed(file)), Effect.map(() => file));
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
exports.VersionsByNameStrategy = VersionsByNameStrategy;
|