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
|
@@ -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;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { VersionGroupConfig } from '../config/types';
|
|
3
|
-
import type { Instance } from '../get-instances/instance';
|
|
4
|
-
import { Report } from '../report';
|
|
5
|
-
declare const BannedVersionGroup_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import type { VersionGroupConfig } from '../config/types.js';
|
|
3
|
+
import type { Instance } from '../get-instances/instance.js';
|
|
4
|
+
import { Report } from '../report.js';
|
|
5
|
+
declare const BannedVersionGroup_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> & {
|
|
6
6
|
readonly _tag: "Banned";
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export declare class BannedVersionGroup extends BannedVersionGroup_base<{
|
|
9
9
|
config: VersionGroupConfig.Banned;
|
|
10
10
|
instances: Instance[];
|
|
@@ -12,6 +12,6 @@ export declare class BannedVersionGroup extends BannedVersionGroup_base<{
|
|
|
12
12
|
groupType: string;
|
|
13
13
|
constructor(config: VersionGroupConfig.Banned);
|
|
14
14
|
canAdd(_: Instance): boolean;
|
|
15
|
-
inspectAll(): Effect.Effect<
|
|
15
|
+
inspectAll(): Effect.Effect<Report.Version.Group[]>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const delete_1 = require("./lib/delete");
|
|
8
|
-
const group_by_1 = require("./lib/group-by");
|
|
9
|
-
class BannedVersionGroup extends effect_1.Data.TaggedClass('Banned') {
|
|
1
|
+
import { Data, Effect } from 'effect';
|
|
2
|
+
import { Report } from '../report.js';
|
|
3
|
+
import { Specifier } from '../specifier/index.js';
|
|
4
|
+
import { DELETE } from './lib/delete.js';
|
|
5
|
+
import { groupBy } from './lib/group-by.js';
|
|
6
|
+
export class BannedVersionGroup extends Data.TaggedClass('Banned') {
|
|
10
7
|
groupType = 'versionGroup';
|
|
11
8
|
constructor(config) {
|
|
12
9
|
super({
|
|
@@ -18,13 +15,12 @@ class BannedVersionGroup extends effect_1.Data.TaggedClass('Banned') {
|
|
|
18
15
|
return true;
|
|
19
16
|
}
|
|
20
17
|
inspectAll() {
|
|
21
|
-
return
|
|
18
|
+
return Effect.succeed(Object.entries(groupBy('name', this.instances)).map(([name, instances]) => ({
|
|
22
19
|
name,
|
|
23
20
|
reports: instances.map((instance) =>
|
|
24
21
|
// ✘ package should not be used
|
|
25
22
|
// ✓ is a mismatch we can auto-fix
|
|
26
|
-
new
|
|
23
|
+
new Report.Banned(Specifier.create(instance, DELETE))),
|
|
27
24
|
})));
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
exports.BannedVersionGroup = BannedVersionGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
export declare function createVersionGroups(ctx: Ctx): Effect.Effect<
|
|
2
|
+
import type { Ctx } from '../get-context/index.js';
|
|
3
|
+
import { VersionGroup } from './index.js';
|
|
4
|
+
export declare function createVersionGroups(ctx: Ctx): Effect.Effect<VersionGroup.Any[], VersionGroup.ConfigError>;
|
|
@@ -1,50 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const snapped_to_1 = require("./snapped-to");
|
|
16
|
-
const standard_1 = require("./standard");
|
|
17
|
-
function createVersionGroups(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 { BannedVersionGroup } from './banned.js';
|
|
7
|
+
import { FilteredOutVersionGroup } from './filtered-out.js';
|
|
8
|
+
import { IgnoredVersionGroup } from './ignored.js';
|
|
9
|
+
import { VersionGroup } from './index.js';
|
|
10
|
+
import { PinnedVersionGroup } from './pinned.js';
|
|
11
|
+
import { SameRangeVersionGroup } from './same-range.js';
|
|
12
|
+
import { SnappedToVersionGroup } from './snapped-to.js';
|
|
13
|
+
import { StandardVersionGroup } from './standard.js';
|
|
14
|
+
export function createVersionGroups(ctx) {
|
|
18
15
|
const { rcFile } = ctx.config;
|
|
19
16
|
const versionGroups = [
|
|
20
|
-
|
|
17
|
+
Effect.succeed(new FilteredOutVersionGroup(ctx)),
|
|
21
18
|
];
|
|
22
|
-
if (
|
|
19
|
+
if (isNonEmptyArray(rcFile.versionGroups)) {
|
|
23
20
|
rcFile.versionGroups.forEach((config) => {
|
|
24
|
-
if (!
|
|
25
|
-
return versionGroups.push(
|
|
21
|
+
if (!isObject(config)) {
|
|
22
|
+
return versionGroups.push(Effect.fail(new VersionGroup.ConfigError({
|
|
26
23
|
config,
|
|
27
24
|
error: 'config is not an object',
|
|
28
25
|
})));
|
|
29
26
|
}
|
|
30
27
|
const mutuallyExclusiveProps = ['isBanned', 'isIgnored', 'pinVersion', 'snapTo', 'policy'].filter((prop) => Boolean(config[prop]));
|
|
31
28
|
if (mutuallyExclusiveProps.length > 1) {
|
|
32
|
-
return versionGroups.push(
|
|
29
|
+
return versionGroups.push(Effect.fail(new VersionGroup.ConfigError({
|
|
33
30
|
config,
|
|
34
31
|
error: `it's unclear what kind of version group you want, as it contains both ${mutuallyExclusiveProps.join(' and ')}`,
|
|
35
32
|
})));
|
|
36
33
|
}
|
|
37
|
-
const label =
|
|
38
|
-
const dependencyTypes =
|
|
34
|
+
const label = isNonEmptyString(config.label) ? config.label : '';
|
|
35
|
+
const dependencyTypes = isArrayOfStrings(config.dependencyTypes)
|
|
39
36
|
? config.dependencyTypes
|
|
40
37
|
: ['**'];
|
|
41
|
-
const dependencies =
|
|
42
|
-
const packages =
|
|
43
|
-
const specifierTypes =
|
|
38
|
+
const dependencies = isArrayOfStrings(config.dependencies) ? config.dependencies : ['**'];
|
|
39
|
+
const packages = isArrayOfStrings(config.packages) ? config.packages : ['**'];
|
|
40
|
+
const specifierTypes = isArrayOfStrings(config.specifierTypes)
|
|
44
41
|
? config.specifierTypes
|
|
45
42
|
: ['**'];
|
|
46
43
|
if (config.isBanned === true) {
|
|
47
|
-
versionGroups.push(
|
|
44
|
+
versionGroups.push(Effect.succeed(new BannedVersionGroup({
|
|
48
45
|
dependencies,
|
|
49
46
|
dependencyTypes,
|
|
50
47
|
specifierTypes,
|
|
@@ -54,7 +51,7 @@ function createVersionGroups(ctx) {
|
|
|
54
51
|
})));
|
|
55
52
|
}
|
|
56
53
|
else if (config.isIgnored === true) {
|
|
57
|
-
versionGroups.push(
|
|
54
|
+
versionGroups.push(Effect.succeed(new IgnoredVersionGroup({
|
|
58
55
|
dependencies,
|
|
59
56
|
dependencyTypes,
|
|
60
57
|
specifierTypes,
|
|
@@ -63,8 +60,8 @@ function createVersionGroups(ctx) {
|
|
|
63
60
|
packages,
|
|
64
61
|
})));
|
|
65
62
|
}
|
|
66
|
-
else if (
|
|
67
|
-
versionGroups.push(
|
|
63
|
+
else if (isNonEmptyString(config.pinVersion)) {
|
|
64
|
+
versionGroups.push(Effect.succeed(new PinnedVersionGroup({
|
|
68
65
|
dependencies,
|
|
69
66
|
dependencyTypes,
|
|
70
67
|
specifierTypes,
|
|
@@ -73,8 +70,8 @@ function createVersionGroups(ctx) {
|
|
|
73
70
|
pinVersion: config.pinVersion,
|
|
74
71
|
})));
|
|
75
72
|
}
|
|
76
|
-
else if (
|
|
77
|
-
versionGroups.push(
|
|
73
|
+
else if (isArrayOfStrings(config.snapTo)) {
|
|
74
|
+
versionGroups.push(Effect.succeed(new SnappedToVersionGroup({
|
|
78
75
|
dependencies,
|
|
79
76
|
dependencyTypes,
|
|
80
77
|
specifierTypes,
|
|
@@ -84,7 +81,7 @@ function createVersionGroups(ctx) {
|
|
|
84
81
|
})));
|
|
85
82
|
}
|
|
86
83
|
else if (config.policy === 'sameRange') {
|
|
87
|
-
versionGroups.push(
|
|
84
|
+
versionGroups.push(Effect.succeed(new SameRangeVersionGroup(ctx, {
|
|
88
85
|
dependencies,
|
|
89
86
|
dependencyTypes,
|
|
90
87
|
specifierTypes,
|
|
@@ -94,7 +91,7 @@ function createVersionGroups(ctx) {
|
|
|
94
91
|
})));
|
|
95
92
|
}
|
|
96
93
|
else {
|
|
97
|
-
versionGroups.push(
|
|
94
|
+
versionGroups.push(Effect.succeed(new StandardVersionGroup(false, {
|
|
98
95
|
dependencies,
|
|
99
96
|
dependencyTypes,
|
|
100
97
|
specifierTypes,
|
|
@@ -105,7 +102,7 @@ function createVersionGroups(ctx) {
|
|
|
105
102
|
}
|
|
106
103
|
});
|
|
107
104
|
}
|
|
108
|
-
versionGroups.push(
|
|
105
|
+
versionGroups.push(Effect.succeed(new StandardVersionGroup(true, {
|
|
109
106
|
dependencies: ['**'],
|
|
110
107
|
dependencyTypes: ['**'],
|
|
111
108
|
specifierTypes: ['**'],
|
|
@@ -113,6 +110,5 @@ function createVersionGroups(ctx) {
|
|
|
113
110
|
packages: ['**'],
|
|
114
111
|
preferVersion: 'highestSemver',
|
|
115
112
|
})));
|
|
116
|
-
return
|
|
113
|
+
return Effect.all(versionGroups);
|
|
117
114
|
}
|
|
118
|
-
exports.createVersionGroups = createVersionGroups;
|