syncpack 12.3.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/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 -6
- package/dist/bin-format/format.js +27 -32
- 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 +28 -35
- 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 -10
- package/dist/config/get-indent.d.ts +1 -1
- package/dist/config/get-indent.js +6 -10
- package/dist/config/get-sort-az.d.ts +1 -1
- package/dist/config/get-sort-az.js +6 -10
- package/dist/config/get-sort-exports.d.ts +1 -1
- package/dist/config/get-sort-exports.js +6 -10
- package/dist/config/get-sort-first.d.ts +1 -1
- package/dist/config/get-sort-first.js +6 -10
- 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 +2 -5
- package/dist/config/types.js +1 -2
- package/dist/constants.js +7 -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 +2 -2
- package/dist/io/to-json.js +8 -12
- 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 -4
- package/dist/io/write-if-changed.js +9 -16
- 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/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
package/dist/option.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.option = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const constants_1 = require("./constants");
|
|
9
|
-
exports.option = {
|
|
1
|
+
import chalk from 'chalk-template';
|
|
2
|
+
import { DEFAULT_CONFIG } from './constants.js';
|
|
3
|
+
export const option = {
|
|
10
4
|
config: ['-c, --config <path>', 'path to a syncpack config file'],
|
|
11
5
|
filter: [
|
|
12
6
|
'-f, --filter [pattern]',
|
|
13
|
-
|
|
7
|
+
chalk `only include dependencies whose {yellow name} matches this regex`,
|
|
14
8
|
],
|
|
15
|
-
indent: ['-i, --indent [value]', `override indentation. defaults to "${
|
|
9
|
+
indent: ['-i, --indent [value]', `override indentation. defaults to "${DEFAULT_CONFIG.indent}"`],
|
|
16
10
|
source: [
|
|
17
11
|
'-s, --source [pattern]',
|
|
18
12
|
'glob pattern for package.json files to read from',
|
|
@@ -20,12 +14,12 @@ exports.option = {
|
|
|
20
14
|
[],
|
|
21
15
|
],
|
|
22
16
|
specs: [
|
|
23
|
-
'-
|
|
24
|
-
|
|
17
|
+
'-S, --specs <names>',
|
|
18
|
+
chalk `only include dependencies whose version specifier match these types (eg. {yellow specs=latest,range,workspace-protocol})`,
|
|
25
19
|
],
|
|
26
20
|
types: [
|
|
27
21
|
'-t, --types <names>',
|
|
28
|
-
|
|
22
|
+
chalk `only include dependencies matching these types (eg. {yellow types=dev,prod,myCustomType})`,
|
|
29
23
|
],
|
|
30
24
|
};
|
|
31
25
|
function collect(value, previous) {
|
package/dist/report.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Instance } from './get-instances/instance';
|
|
2
|
-
import type { Specifier } from './specifier';
|
|
1
|
+
import type { Instance } from './get-instances/instance.js';
|
|
2
|
+
import type { Specifier } from './specifier/index.js';
|
|
3
3
|
export declare namespace Report {
|
|
4
4
|
export type Any = Semver.Any | Version.Any;
|
|
5
5
|
export namespace Semver {
|
package/dist/report.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Report = void 0;
|
|
4
|
-
var Report;
|
|
1
|
+
export var Report;
|
|
5
2
|
(function (Report) {
|
|
6
3
|
class Excluded {
|
|
7
4
|
_tagGroup = 'Excluded';
|
|
@@ -129,4 +126,4 @@ var Report;
|
|
|
129
126
|
_tag = 'UnsupportedMismatch';
|
|
130
127
|
}
|
|
131
128
|
Report.UnsupportedMismatch = UnsupportedMismatch;
|
|
132
|
-
})(Report || (
|
|
129
|
+
})(Report || (Report = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
export declare function createSemverGroups(ctx: Ctx): Effect.Effect<
|
|
2
|
+
import type { Ctx } from '../get-context/index.js';
|
|
3
|
+
import { SemverGroup } from './index.js';
|
|
4
|
+
export declare function createSemverGroups(ctx: Ctx): Effect.Effect<SemverGroup.Any[], SemverGroup.ConfigError>;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const ignored_1 = require("./ignored");
|
|
14
|
-
const with_range_1 = require("./with-range");
|
|
15
|
-
function createSemverGroups(ctx) {
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { isArrayOfStrings } from 'tightrope/guard/is-array-of-strings.js';
|
|
3
|
+
import { isNonEmptyArray } from 'tightrope/guard/is-non-empty-array.js';
|
|
4
|
+
import { isNonEmptyString } from 'tightrope/guard/is-non-empty-string.js';
|
|
5
|
+
import { isObject } from 'tightrope/guard/is-object.js';
|
|
6
|
+
import { isValidSemverRange } from '../guards/is-valid-semver-range.js';
|
|
7
|
+
import { DisabledSemverGroup } from './disabled.js';
|
|
8
|
+
import { FilteredOutSemverGroup } from './filtered-out.js';
|
|
9
|
+
import { IgnoredSemverGroup } from './ignored.js';
|
|
10
|
+
import { SemverGroup } from './index.js';
|
|
11
|
+
import { WithRangeSemverGroup } from './with-range.js';
|
|
12
|
+
export function createSemverGroups(ctx) {
|
|
16
13
|
const { rcFile } = ctx.config;
|
|
17
14
|
const semverGroups = [
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Effect.succeed(new FilteredOutSemverGroup(ctx)),
|
|
16
|
+
Effect.succeed(new WithRangeSemverGroup(false, {
|
|
20
17
|
dependencies: ['**'],
|
|
21
18
|
dependencyTypes: ['local'],
|
|
22
19
|
label: 'the version property of package.json files must always be exact',
|
|
@@ -24,32 +21,32 @@ function createSemverGroups(ctx) {
|
|
|
24
21
|
range: '',
|
|
25
22
|
})),
|
|
26
23
|
];
|
|
27
|
-
if (
|
|
24
|
+
if (isNonEmptyArray(rcFile.semverGroups)) {
|
|
28
25
|
rcFile.semverGroups.forEach((config) => {
|
|
29
|
-
if (!
|
|
30
|
-
return semverGroups.push(
|
|
26
|
+
if (!isObject(config)) {
|
|
27
|
+
return semverGroups.push(Effect.fail(new SemverGroup.ConfigError({
|
|
31
28
|
config,
|
|
32
29
|
error: 'config is not an object',
|
|
33
30
|
})));
|
|
34
31
|
}
|
|
35
32
|
const mutuallyExclusiveProps = ['isIgnored', 'range'].filter((prop) => Boolean(config[prop]));
|
|
36
33
|
if (mutuallyExclusiveProps.length > 1) {
|
|
37
|
-
return semverGroups.push(
|
|
34
|
+
return semverGroups.push(Effect.fail(new SemverGroup.ConfigError({
|
|
38
35
|
config,
|
|
39
36
|
error: `it's unclear what kind of semver group you want, as it contains both ${mutuallyExclusiveProps.join(' and ')}`,
|
|
40
37
|
})));
|
|
41
38
|
}
|
|
42
|
-
const label =
|
|
43
|
-
const dependencyTypes =
|
|
39
|
+
const label = isNonEmptyString(config.label) ? config.label : '';
|
|
40
|
+
const dependencyTypes = isArrayOfStrings(config.dependencyTypes)
|
|
44
41
|
? config.dependencyTypes
|
|
45
42
|
: ['**'];
|
|
46
|
-
const dependencies =
|
|
47
|
-
const packages =
|
|
48
|
-
const specifierTypes =
|
|
43
|
+
const dependencies = isArrayOfStrings(config.dependencies) ? config.dependencies : ['**'];
|
|
44
|
+
const packages = isArrayOfStrings(config.packages) ? config.packages : ['**'];
|
|
45
|
+
const specifierTypes = isArrayOfStrings(config.specifierTypes)
|
|
49
46
|
? config.specifierTypes
|
|
50
47
|
: ['**'];
|
|
51
48
|
if (config.isIgnored === true) {
|
|
52
|
-
semverGroups.push(
|
|
49
|
+
semverGroups.push(Effect.succeed(new IgnoredSemverGroup({
|
|
53
50
|
dependencies,
|
|
54
51
|
dependencyTypes,
|
|
55
52
|
specifierTypes,
|
|
@@ -58,8 +55,8 @@ function createSemverGroups(ctx) {
|
|
|
58
55
|
packages,
|
|
59
56
|
})));
|
|
60
57
|
}
|
|
61
|
-
else if (
|
|
62
|
-
semverGroups.push(
|
|
58
|
+
else if (isValidSemverRange(config.range)) {
|
|
59
|
+
semverGroups.push(Effect.succeed(new WithRangeSemverGroup(false, {
|
|
63
60
|
dependencies,
|
|
64
61
|
dependencyTypes,
|
|
65
62
|
specifierTypes,
|
|
@@ -70,7 +67,7 @@ function createSemverGroups(ctx) {
|
|
|
70
67
|
}
|
|
71
68
|
});
|
|
72
69
|
}
|
|
73
|
-
semverGroups.push(
|
|
70
|
+
semverGroups.push(Effect.succeed(new DisabledSemverGroup(true, {
|
|
74
71
|
dependencies: ['**'],
|
|
75
72
|
dependencyTypes: ['**'],
|
|
76
73
|
specifierTypes: ['**'],
|
|
@@ -78,6 +75,5 @@ function createSemverGroups(ctx) {
|
|
|
78
75
|
packages: ['**'],
|
|
79
76
|
isDisabled: true,
|
|
80
77
|
})));
|
|
81
|
-
return
|
|
78
|
+
return Effect.all(semverGroups);
|
|
82
79
|
}
|
|
83
|
-
exports.createSemverGroups = createSemverGroups;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { SemverGroupConfig } from '../config/types';
|
|
3
|
-
import type { Instance } from '../get-instances/instance';
|
|
4
|
-
import { Report } from '../report';
|
|
5
|
-
import type { Specifier } from '../specifier';
|
|
6
|
-
import type { NonSemverError } from '../specifier/lib/non-semver-error';
|
|
7
|
-
declare const DisabledSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import type { SemverGroupConfig } from '../config/types.js';
|
|
3
|
+
import type { Instance } from '../get-instances/instance.js';
|
|
4
|
+
import { Report } from '../report.js';
|
|
5
|
+
import type { Specifier } from '../specifier/index.js';
|
|
6
|
+
import type { NonSemverError } from '../specifier/lib/non-semver-error.js';
|
|
7
|
+
declare const DisabledSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
|
|
8
8
|
readonly _tag: "Disabled";
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
/**
|
|
11
11
|
* Semver groups are disabled by default and, when that's the case, every
|
|
12
12
|
* instance is assigned to this group. This group will allow anything.
|
|
@@ -19,8 +19,8 @@ export declare class DisabledSemverGroup extends DisabledSemverGroup_base<{
|
|
|
19
19
|
groupType: string;
|
|
20
20
|
constructor(isCatchAll: boolean, config: SemverGroupConfig.Disabled);
|
|
21
21
|
canAdd(_: Instance): boolean;
|
|
22
|
-
getFixed(specifier: Specifier.Any): Effect.Effect<
|
|
23
|
-
inspectAll(): Effect.Effect<
|
|
24
|
-
inspect(instance: Instance): Effect.Effect<
|
|
22
|
+
getFixed(specifier: Specifier.Any): Effect.Effect<Specifier.Any, NonSemverError>;
|
|
23
|
+
inspectAll(): Effect.Effect<Report.Disabled[], never, never>;
|
|
24
|
+
inspect(instance: Instance): Effect.Effect<Report.Disabled>;
|
|
25
25
|
}
|
|
26
26
|
export {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DisabledSemverGroup = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
const report_1 = require("../report");
|
|
1
|
+
import { Data, Effect } from 'effect';
|
|
2
|
+
import { Report } from '../report.js';
|
|
6
3
|
/**
|
|
7
4
|
* Semver groups are disabled by default and, when that's the case, every
|
|
8
5
|
* instance is assigned to this group. This group will allow anything.
|
|
9
6
|
*/
|
|
10
|
-
class DisabledSemverGroup extends
|
|
7
|
+
export class DisabledSemverGroup extends Data.TaggedClass('Disabled') {
|
|
11
8
|
groupType = 'semverGroup';
|
|
12
9
|
constructor(isCatchAll, config) {
|
|
13
10
|
super({
|
|
@@ -20,13 +17,12 @@ class DisabledSemverGroup extends effect_1.Data.TaggedClass('Disabled') {
|
|
|
20
17
|
return true;
|
|
21
18
|
}
|
|
22
19
|
getFixed(specifier) {
|
|
23
|
-
return
|
|
20
|
+
return Effect.succeed(specifier);
|
|
24
21
|
}
|
|
25
22
|
inspectAll() {
|
|
26
|
-
return
|
|
23
|
+
return Effect.all(this.instances.map((instance) => this.inspect(instance)));
|
|
27
24
|
}
|
|
28
25
|
inspect(instance) {
|
|
29
|
-
return
|
|
26
|
+
return Effect.succeed(new Report.Disabled(instance));
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
|
-
exports.DisabledSemverGroup = DisabledSemverGroup;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { GroupConfig } from '../config/types';
|
|
3
|
-
import type { Ctx } from '../get-context';
|
|
4
|
-
import type { Instance } from '../get-instances/instance';
|
|
5
|
-
import { Report } from '../report';
|
|
6
|
-
import type { Specifier } from '../specifier';
|
|
7
|
-
import type { NonSemverError } from '../specifier/lib/non-semver-error';
|
|
8
|
-
declare const FilteredOutSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import type { GroupConfig } from '../config/types.js';
|
|
3
|
+
import type { Ctx } from '../get-context/index.js';
|
|
4
|
+
import type { Instance } from '../get-instances/instance.js';
|
|
5
|
+
import { Report } from '../report.js';
|
|
6
|
+
import type { Specifier } from '../specifier/index.js';
|
|
7
|
+
import type { NonSemverError } from '../specifier/lib/non-semver-error.js';
|
|
8
|
+
declare const FilteredOutSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
|
|
9
9
|
readonly _tag: "FilteredOut";
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
/**
|
|
12
12
|
* Instances which do not match a given `--filter` option are assigned to this
|
|
13
13
|
* group and nothing will be changed.
|
|
@@ -20,8 +20,8 @@ export declare class FilteredOutSemverGroup extends FilteredOutSemverGroup_base<
|
|
|
20
20
|
groupType: string;
|
|
21
21
|
constructor(ctx: Ctx);
|
|
22
22
|
canAdd(instance: Instance): boolean;
|
|
23
|
-
getFixed(specifier: Specifier.Any): Effect.Effect<
|
|
24
|
-
inspectAll(): Effect.Effect<
|
|
25
|
-
inspect(instance: Instance): Effect.Effect<
|
|
23
|
+
getFixed(specifier: Specifier.Any): Effect.Effect<Specifier.Any, NonSemverError>;
|
|
24
|
+
inspectAll(): Effect.Effect<Report.FilteredOut[], never, never>;
|
|
25
|
+
inspect(instance: Instance): Effect.Effect<Report.FilteredOut>;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
const get_filter_1 = require("../config/get-filter");
|
|
6
|
-
const report_1 = require("../report");
|
|
1
|
+
import { Data, Effect } from 'effect';
|
|
2
|
+
import { getFilter } from '../config/get-filter.js';
|
|
3
|
+
import { Report } from '../report.js';
|
|
7
4
|
/**
|
|
8
5
|
* Instances which do not match a given `--filter` option are assigned to this
|
|
9
6
|
* group and nothing will be changed.
|
|
10
7
|
*/
|
|
11
|
-
class FilteredOutSemverGroup extends
|
|
8
|
+
export class FilteredOutSemverGroup extends Data.TaggedClass('FilteredOut') {
|
|
12
9
|
groupType = 'semverGroup';
|
|
13
10
|
constructor(ctx) {
|
|
14
11
|
super({
|
|
@@ -18,7 +15,7 @@ class FilteredOutSemverGroup extends effect_1.Data.TaggedClass('FilteredOut') {
|
|
|
18
15
|
label: 'Filtered out',
|
|
19
16
|
packages: ['**'],
|
|
20
17
|
},
|
|
21
|
-
filter:
|
|
18
|
+
filter: getFilter(ctx.config),
|
|
22
19
|
instances: [],
|
|
23
20
|
});
|
|
24
21
|
}
|
|
@@ -26,13 +23,12 @@ class FilteredOutSemverGroup extends effect_1.Data.TaggedClass('FilteredOut') {
|
|
|
26
23
|
return instance.name.search(new RegExp(this.filter)) === -1;
|
|
27
24
|
}
|
|
28
25
|
getFixed(specifier) {
|
|
29
|
-
return
|
|
26
|
+
return Effect.succeed(specifier);
|
|
30
27
|
}
|
|
31
28
|
inspectAll() {
|
|
32
|
-
return
|
|
29
|
+
return Effect.all(this.instances.map((instance) => this.inspect(instance)));
|
|
33
30
|
}
|
|
34
31
|
inspect(instance) {
|
|
35
|
-
return
|
|
32
|
+
return Effect.succeed(new Report.FilteredOut(instance));
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
|
-
exports.FilteredOutSemverGroup = FilteredOutSemverGroup;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { SemverGroupConfig } from '../config/types';
|
|
3
|
-
import type { Instance } from '../get-instances/instance';
|
|
4
|
-
import { Report } from '../report';
|
|
5
|
-
import type { Specifier } from '../specifier';
|
|
6
|
-
import type { NonSemverError } from '../specifier/lib/non-semver-error';
|
|
7
|
-
declare const IgnoredSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import type { SemverGroupConfig } from '../config/types.js';
|
|
3
|
+
import type { Instance } from '../get-instances/instance.js';
|
|
4
|
+
import { Report } from '../report.js';
|
|
5
|
+
import type { Specifier } from '../specifier/index.js';
|
|
6
|
+
import type { NonSemverError } from '../specifier/lib/non-semver-error.js';
|
|
7
|
+
declare const IgnoredSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
|
|
8
8
|
readonly _tag: "Ignored";
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
/** Every instance in this group is ignored and nothing will be changed */
|
|
11
11
|
export declare class IgnoredSemverGroup extends IgnoredSemverGroup_base<{
|
|
12
12
|
config: SemverGroupConfig.Ignored;
|
|
@@ -15,8 +15,8 @@ export declare class IgnoredSemverGroup extends IgnoredSemverGroup_base<{
|
|
|
15
15
|
groupType: string;
|
|
16
16
|
constructor(config: SemverGroupConfig.Ignored);
|
|
17
17
|
canAdd(_: Instance): boolean;
|
|
18
|
-
getFixed(specifier: Specifier.Any): Effect.Effect<
|
|
19
|
-
inspectAll(): Effect.Effect<
|
|
20
|
-
inspect(instance: Instance): Effect.Effect<
|
|
18
|
+
getFixed(specifier: Specifier.Any): Effect.Effect<Specifier.Any, NonSemverError>;
|
|
19
|
+
inspectAll(): Effect.Effect<Report.Ignored[], never, never>;
|
|
20
|
+
inspect(instance: Instance): Effect.Effect<Report.Ignored>;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.IgnoredSemverGroup = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
const report_1 = require("../report");
|
|
1
|
+
import { Data, Effect } from 'effect';
|
|
2
|
+
import { Report } from '../report.js';
|
|
6
3
|
/** Every instance in this group is ignored and nothing will be changed */
|
|
7
|
-
class IgnoredSemverGroup extends
|
|
4
|
+
export class IgnoredSemverGroup extends Data.TaggedClass('Ignored') {
|
|
8
5
|
groupType = 'semverGroup';
|
|
9
6
|
constructor(config) {
|
|
10
7
|
super({
|
|
@@ -16,13 +13,12 @@ class IgnoredSemverGroup extends effect_1.Data.TaggedClass('Ignored') {
|
|
|
16
13
|
return true;
|
|
17
14
|
}
|
|
18
15
|
getFixed(specifier) {
|
|
19
|
-
return
|
|
16
|
+
return Effect.succeed(specifier);
|
|
20
17
|
}
|
|
21
18
|
inspectAll() {
|
|
22
|
-
return
|
|
19
|
+
return Effect.all(this.instances.map((instance) => this.inspect(instance)));
|
|
23
20
|
}
|
|
24
21
|
inspect(instance) {
|
|
25
|
-
return
|
|
22
|
+
return Effect.succeed(new Report.Ignored(instance));
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
|
-
exports.IgnoredSemverGroup = IgnoredSemverGroup;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { WithRangeSemverGroup } from './with-range';
|
|
1
|
+
import type { DisabledSemverGroup } from './disabled.js';
|
|
2
|
+
import type { FilteredOutSemverGroup } from './filtered-out.js';
|
|
3
|
+
import type { IgnoredSemverGroup } from './ignored.js';
|
|
4
|
+
import type { WithRangeSemverGroup } from './with-range.js';
|
|
6
5
|
export declare namespace SemverGroup {
|
|
7
6
|
export type Disabled = DisabledSemverGroup;
|
|
8
7
|
export type FilteredOut = FilteredOutSemverGroup;
|
|
9
8
|
export type Ignored = IgnoredSemverGroup;
|
|
10
9
|
export type WithRange = WithRangeSemverGroup;
|
|
11
10
|
export type Any = Disabled | FilteredOut | Ignored | WithRange;
|
|
12
|
-
const ConfigError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<
|
|
11
|
+
const ConfigError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
|
|
13
12
|
readonly _tag: "SemverGroupConfigError";
|
|
14
|
-
}
|
|
13
|
+
};
|
|
15
14
|
export class ConfigError extends ConfigError_base<{
|
|
16
15
|
readonly config: unknown;
|
|
17
16
|
readonly error: string;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.SemverGroup = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
var SemverGroup;
|
|
1
|
+
import { Data } from 'effect';
|
|
2
|
+
export var SemverGroup;
|
|
6
3
|
(function (SemverGroup) {
|
|
7
|
-
class ConfigError extends
|
|
4
|
+
class ConfigError extends Data.TaggedClass('SemverGroupConfigError') {
|
|
8
5
|
}
|
|
9
6
|
SemverGroup.ConfigError = ConfigError;
|
|
10
|
-
})(SemverGroup || (
|
|
7
|
+
})(SemverGroup || (SemverGroup = {}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { SemverGroupConfig } from '../config/types';
|
|
3
|
-
import type { Instance } from '../get-instances/instance';
|
|
4
|
-
import { Report } from '../report';
|
|
5
|
-
import { Specifier } from '../specifier';
|
|
6
|
-
import type { NonSemverError } from '../specifier/lib/non-semver-error';
|
|
7
|
-
declare const WithRangeSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import type { SemverGroupConfig } from '../config/types.js';
|
|
3
|
+
import type { Instance } from '../get-instances/instance.js';
|
|
4
|
+
import { Report } from '../report.js';
|
|
5
|
+
import { Specifier } from '../specifier/index.js';
|
|
6
|
+
import type { NonSemverError } from '../specifier/lib/non-semver-error.js';
|
|
7
|
+
declare const WithRangeSemverGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
|
|
8
8
|
readonly _tag: "WithRange";
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export declare class WithRangeSemverGroup extends WithRangeSemverGroup_base<{
|
|
11
11
|
config: SemverGroupConfig.WithRange;
|
|
12
12
|
instances: Instance[];
|
|
@@ -15,8 +15,8 @@ export declare class WithRangeSemverGroup extends WithRangeSemverGroup_base<{
|
|
|
15
15
|
groupType: string;
|
|
16
16
|
constructor(isCatchAll: boolean, config: SemverGroupConfig.WithRange);
|
|
17
17
|
canAdd(_: Instance): boolean;
|
|
18
|
-
getFixed(specifier: Specifier.Any): Effect.Effect<
|
|
19
|
-
inspectAll(): Effect.Effect<
|
|
20
|
-
inspect(instance: Instance): Effect.Effect<
|
|
18
|
+
getFixed(specifier: Specifier.Any): Effect.Effect<Specifier.Any, NonSemverError>;
|
|
19
|
+
inspectAll(): Effect.Effect<(Report.SemverRangeMismatch | Report.UnsupportedMismatch | Report.Valid)[], never, never>;
|
|
20
|
+
inspect(instance: Instance): Effect.Effect<Report.UnsupportedMismatch | Report.SemverRangeMismatch | Report.Valid>;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const report_1 = require("../report");
|
|
7
|
-
const specifier_1 = require("../specifier");
|
|
8
|
-
class WithRangeSemverGroup extends effect_1.Data.TaggedClass('WithRange') {
|
|
1
|
+
import { Data, Effect, pipe } from 'effect';
|
|
2
|
+
import { setSemverRange } from '../lib/set-semver-range.js';
|
|
3
|
+
import { Report } from '../report.js';
|
|
4
|
+
import { Specifier } from '../specifier/index.js';
|
|
5
|
+
export class WithRangeSemverGroup extends Data.TaggedClass('WithRange') {
|
|
9
6
|
groupType = 'semverGroup';
|
|
10
7
|
constructor(isCatchAll, config) {
|
|
11
8
|
super({
|
|
@@ -19,31 +16,30 @@ class WithRangeSemverGroup extends effect_1.Data.TaggedClass('WithRange') {
|
|
|
19
16
|
return true;
|
|
20
17
|
}
|
|
21
18
|
getFixed(specifier) {
|
|
22
|
-
return
|
|
19
|
+
return pipe(specifier.getSemver(), Effect.map((semver) => setSemverRange(this.config.range, semver)), Effect.flatMap((nextSemver) => specifier.setSemver(nextSemver)));
|
|
23
20
|
}
|
|
24
21
|
inspectAll() {
|
|
25
|
-
return
|
|
22
|
+
return Effect.all(this.instances.map((instance) => this.inspect(instance)));
|
|
26
23
|
}
|
|
27
24
|
inspect(instance) {
|
|
28
|
-
const current =
|
|
29
|
-
return
|
|
25
|
+
const current = Specifier.create(instance, instance.rawSpecifier.raw);
|
|
26
|
+
return pipe(this.getFixed(current), Effect.match({
|
|
30
27
|
// if range is fixable
|
|
31
28
|
onSuccess: (valid) =>
|
|
32
29
|
// if it is pinned and matches its pin
|
|
33
30
|
instance.versionGroup._tag === 'Pinned' &&
|
|
34
31
|
instance.rawSpecifier.raw === instance.versionGroup.config.pinVersion
|
|
35
32
|
? // the pinned version takes precendence and is a match
|
|
36
|
-
new
|
|
33
|
+
new Report.Valid(current)
|
|
37
34
|
: // if it is already like this on disk
|
|
38
35
|
instance.rawSpecifier.raw === valid.raw
|
|
39
36
|
? // it is a match
|
|
40
|
-
new
|
|
37
|
+
new Report.Valid(current)
|
|
41
38
|
: // it is a mismatch and should be this one
|
|
42
|
-
new
|
|
39
|
+
new Report.SemverRangeMismatch(valid),
|
|
43
40
|
// if range is NOT fixable, it is a mismatch we can't auto-fix
|
|
44
41
|
// as it seems to not be semver
|
|
45
|
-
onFailure: () => new
|
|
42
|
+
onFailure: () => new Report.UnsupportedMismatch(instance),
|
|
46
43
|
}));
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
|
-
exports.WithRangeSemverGroup = WithRangeSemverGroup;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
import type { AliasResult } from 'npm-package-arg';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { NonSemverError } from './lib/non-semver-error';
|
|
3
|
+
import { BaseSpecifier } from './base.js';
|
|
4
|
+
import { Specifier } from './index.js';
|
|
5
|
+
import { NonSemverError } from './lib/non-semver-error.js';
|
|
6
6
|
type T = AliasResult;
|
|
7
7
|
/** @example "npm:imageoptim-cli@3.1.7" */
|
|
8
8
|
export declare class AliasSpecifier extends BaseSpecifier<T> {
|
|
@@ -10,8 +10,8 @@ export declare class AliasSpecifier extends BaseSpecifier<T> {
|
|
|
10
10
|
/** The public name referenced in config */
|
|
11
11
|
name: "alias";
|
|
12
12
|
/** Return the version portion if it is valid semver */
|
|
13
|
-
getSemver(): Effect.Effect<
|
|
13
|
+
getSemver(): Effect.Effect<string, NonSemverError>;
|
|
14
14
|
/** Get a new `Specifier` from the given semver version applied to this one */
|
|
15
|
-
setSemver(version: string): Effect.Effect<
|
|
15
|
+
setSemver(version: string): Effect.Effect<Specifier.Any, NonSemverError>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
package/dist/specifier/alias.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
|
/** @example "npm:imageoptim-cli@3.1.7" */
|
|
9
|
-
class AliasSpecifier extends
|
|
6
|
+
export class AliasSpecifier extends BaseSpecifier {
|
|
10
7
|
_tag = 'Alias';
|
|
11
8
|
/** The public name referenced in config */
|
|
12
9
|
name = 'alias';
|
|
13
10
|
/** Return the version portion if it is valid semver */
|
|
14
11
|
getSemver() {
|
|
15
|
-
return
|
|
16
|
-
?
|
|
17
|
-
:
|
|
12
|
+
return pipe(this.parse(), Effect.mapError(() => new NonSemverError({ specifier: this })), Effect.map((parsed) => parsed.subSpec), Effect.flatMap((subSpec) => ['range', 'version'].includes(subSpec.type) && subSpec.fetchSpec !== null
|
|
13
|
+
? Effect.succeed(subSpec.fetchSpec)
|
|
14
|
+
: NonSemverError.asEffect(this)));
|
|
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 pipe(this.parse(), Effect.mapError(() => new NonSemverError({ specifier: this })), Effect.map((parsed) => parsed.subSpec), Effect.map((subSpec) => subSpec.name || ''), Effect.map((name) => `npm:${name}@${version}`), Effect.map((raw) => Specifier.create(this.instance, raw)));
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.AliasSpecifier = AliasSpecifier;
|
package/dist/specifier/base.d.ts
CHANGED
|
@@ -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 { NpmPackageArgResult } from './lib/parse-specifier';
|
|
2
|
+
import type { Instance } from '../get-instances/instance.js';
|
|
3
|
+
import { Specifier } from './index.js';
|
|
4
|
+
import { NonSemverError } from './lib/non-semver-error.js';
|
|
5
|
+
import type { NpmPackageArgResult } from './lib/parse-specifier.js';
|
|
6
6
|
export declare class BaseSpecifier<T extends NpmPackageArgResult | unknown> {
|
|
7
7
|
/** should be overridden by sub classes */
|
|
8
8
|
_tag: string;
|
|
@@ -31,11 +31,11 @@ export declare class BaseSpecifier<T extends NpmPackageArgResult | unknown> {
|
|
|
31
31
|
* Parse the raw version specifier using
|
|
32
32
|
* https://github.com/npm/npm-package-arg
|
|
33
33
|
*/
|
|
34
|
-
protected parse(): Effect.Effect<
|
|
34
|
+
protected parse(): Effect.Effect<T, unknown>;
|
|
35
35
|
/** Return the version portion if it is valid semver */
|
|
36
|
-
getSemver(this: Specifier.Any): Effect.Effect<
|
|
36
|
+
getSemver(this: Specifier.Any): Effect.Effect<string, NonSemverError>;
|
|
37
37
|
/** Get a new `Specifier` from the given semver version applied to this one */
|
|
38
|
-
setSemver(this: Specifier.Any, _version: string): Effect.Effect<
|
|
38
|
+
setSemver(this: Specifier.Any, _version: string): Effect.Effect<Specifier.Any, NonSemverError>;
|
|
39
39
|
/** Apply the given specifier to a new one with this instance bound to it */
|
|
40
40
|
replaceWith<T extends Specifier.Any>(specifier: T): T;
|
|
41
41
|
}
|