syncpack 12.0.1 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin-fix-mismatches/fix-mismatches.js +8 -19
- package/dist/bin-fix-mismatches/index.js +1 -1
- package/dist/bin-format/index.js +1 -1
- package/dist/bin-lint/index.js +1 -1
- package/dist/bin-lint-semver-ranges/index.js +1 -1
- package/dist/bin-lint-semver-ranges/lint-semver-ranges.js +5 -5
- package/dist/bin-list/index.js +1 -1
- package/dist/bin-list/list.d.ts +2 -0
- package/dist/bin-list/list.js +76 -48
- package/dist/bin-list-mismatches/index.js +1 -1
- package/dist/bin-list-mismatches/list-mismatches.d.ts +4 -5
- package/dist/bin-list-mismatches/list-mismatches.js +185 -220
- package/dist/bin-prompt/prompt.js +7 -3
- package/dist/bin-set-semver-ranges/index.js +1 -1
- package/dist/config/get-custom-types.js +2 -1
- package/dist/config/types.d.ts +4 -5
- package/dist/constants.d.ts +39 -8
- package/dist/constants.js +31 -0
- package/dist/io/index.d.ts +2 -2
- package/dist/io/index.js +1 -1
- package/dist/io/read-config-file-sync.js +1 -1
- package/dist/option.d.ts +1 -1
- package/dist/report.d.ts +64 -99
- package/dist/report.js +81 -16
- package/dist/schema.json +75 -74
- package/dist/semver-group/disabled.js +1 -3
- package/dist/semver-group/filtered-out.js +1 -3
- package/dist/semver-group/ignored.js +1 -3
- package/dist/semver-group/index.d.ts +1 -2
- package/dist/semver-group/with-range.js +4 -12
- package/dist/specifier/index.d.ts +1 -2
- package/dist/specifier/lib/parse-specifier.js +1 -1
- package/dist/specifier/workspace-protocol.js +3 -2
- package/dist/strategy/name-and-version-props.js +4 -4
- package/dist/version-group/banned.js +1 -3
- package/dist/version-group/filtered-out.js +1 -1
- package/dist/version-group/ignored.js +1 -1
- package/dist/version-group/index.d.ts +1 -2
- package/dist/version-group/pinned.js +2 -2
- package/dist/version-group/same-range.js +5 -10
- package/dist/version-group/snapped-to.js +7 -17
- package/dist/version-group/standard.js +38 -49
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ const is_non_empty_object_1 = require("tightrope/guard/is-non-empty-object");
|
|
|
7
7
|
const read_json_file_sync_1 = require("./read-json-file-sync");
|
|
8
8
|
const getOptionOfNonEmptyObject = effect_1.Option.liftPredicate((is_non_empty_object_1.isNonEmptyObject));
|
|
9
9
|
function readConfigFileSync(io, configPath) {
|
|
10
|
-
return (0, effect_1.pipe)(effect_1.Effect.try(() => io.cosmiconfig.
|
|
10
|
+
return (0, effect_1.pipe)(effect_1.Effect.try(() => io.cosmiconfig.cosmiconfig('syncpack')), effect_1.Effect.flatMap((client) => effect_1.Effect.tryPromise(() => (configPath ? client.load(configPath) : client.search()))), effect_1.Effect.flatMap((result) => result !== null ? getValueFromCosmiconfig(result) : findConfigInPackageJson(io)), effect_1.Effect.tap((config) => effect_1.Effect.logDebug(`config file found: ${JSON.stringify(config)}`)), effect_1.Effect.tapError(() => effect_1.Effect.logDebug('no config file found, will use defaults')), effect_1.Effect.catchAll(() => effect_1.Effect.succeed({})));
|
|
11
11
|
}
|
|
12
12
|
exports.readConfigFileSync = readConfigFileSync;
|
|
13
13
|
/**
|
package/dist/option.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const option: {
|
|
2
2
|
readonly config: readonly ["-c, --config <path>", "path to a syncpack config file"];
|
|
3
3
|
readonly filter: readonly ["-f, --filter [pattern]", string];
|
|
4
|
-
readonly indent: readonly ["-i, --indent [value]",
|
|
4
|
+
readonly indent: readonly ["-i, --indent [value]", `override indentation. defaults to "${string}"`];
|
|
5
5
|
readonly source: readonly ["-s, --source [pattern]", "glob pattern for package.json files to read from", typeof collect, string[]];
|
|
6
6
|
readonly types: readonly ["-t, --types <names>", string];
|
|
7
7
|
};
|
package/dist/report.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Data } from 'effect';
|
|
2
|
-
import type { Union } from 'ts-toolbelt';
|
|
3
1
|
import type { Instance } from './get-instances/instance';
|
|
4
2
|
import type { Specifier } from './specifier';
|
|
5
3
|
export declare namespace Report {
|
|
4
|
+
export type Any = Semver.Any | Version.Any;
|
|
6
5
|
export namespace Semver {
|
|
7
|
-
type Any =
|
|
6
|
+
type Any = Report.Semver.Invalid.Any | Report.Semver.Valid.Any;
|
|
8
7
|
namespace Valid {
|
|
9
|
-
type Any =
|
|
8
|
+
type Any = Report.Disabled | Report.FilteredOut | Report.Ignored | Report.Valid;
|
|
10
9
|
}
|
|
11
10
|
namespace Invalid {
|
|
12
|
-
type Any =
|
|
11
|
+
type Any = Report.Semver.Fixable.Any | Report.Semver.Unfixable.Any;
|
|
13
12
|
}
|
|
14
13
|
namespace Fixable {
|
|
15
14
|
type Any = Report.SemverRangeMismatch;
|
|
@@ -23,144 +22,110 @@ export declare namespace Report {
|
|
|
23
22
|
name: string;
|
|
24
23
|
reports: Report.Version.Any[];
|
|
25
24
|
}
|
|
26
|
-
type Any =
|
|
25
|
+
type Any = Report.Version.Invalid.Any | Report.Version.Valid.Any;
|
|
27
26
|
namespace Valid {
|
|
28
|
-
type Any =
|
|
27
|
+
type Any = Report.Disabled | Report.FilteredOut | Report.Ignored | Report.Valid;
|
|
29
28
|
}
|
|
30
29
|
namespace Invalid {
|
|
31
|
-
type Any =
|
|
30
|
+
type Any = Report.Version.Fixable.Any | Report.Version.Unfixable.Any;
|
|
32
31
|
}
|
|
33
32
|
namespace Fixable {
|
|
34
|
-
type Any =
|
|
33
|
+
type Any = Report.Banned | Report.HighestSemverMismatch | Report.LocalPackageMismatch | Report.LowestSemverMismatch | Report.PinnedMismatch | Report.SemverRangeMismatch | Report.SnappedToMismatch;
|
|
35
34
|
}
|
|
36
35
|
namespace Unfixable {
|
|
37
|
-
type Any =
|
|
36
|
+
type Any = Report.MissingLocalVersion | Report.MissingSnappedToMismatch | Report.UnsupportedMismatch | Report.SameRangeMismatch;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
readonly
|
|
42
|
-
|
|
43
|
-
/** Semver Groups are disabled by default */
|
|
44
|
-
export class Disabled extends Disabled_base<{
|
|
39
|
+
class Excluded {
|
|
40
|
+
readonly _tagGroup = "Excluded";
|
|
41
|
+
readonly isInvalid = false;
|
|
45
42
|
readonly instance: Instance;
|
|
46
|
-
|
|
43
|
+
constructor(instance: Instance);
|
|
44
|
+
}
|
|
45
|
+
class Unfixable {
|
|
46
|
+
readonly _tagGroup = "Unfixable";
|
|
47
|
+
readonly isInvalid = true;
|
|
48
|
+
readonly unfixable: Instance;
|
|
49
|
+
constructor(unfixable: Instance);
|
|
50
|
+
}
|
|
51
|
+
class Fixable {
|
|
52
|
+
readonly _tagGroup = "Fixable";
|
|
53
|
+
readonly isInvalid = true;
|
|
54
|
+
readonly fixable: Specifier.Any;
|
|
55
|
+
constructor(fixable: Specifier.Any);
|
|
56
|
+
}
|
|
57
|
+
/** Semver Groups are disabled by default */
|
|
58
|
+
export class Disabled extends Excluded {
|
|
59
|
+
readonly _tag = "Disabled";
|
|
47
60
|
}
|
|
48
|
-
const FilteredOut_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
49
|
-
readonly _tag: "FilteredOut";
|
|
50
|
-
}>;
|
|
51
61
|
/** Has a name which does not match the `--filter` RegExp */
|
|
52
|
-
export class FilteredOut extends
|
|
53
|
-
readonly
|
|
54
|
-
}> {
|
|
62
|
+
export class FilteredOut extends Excluded {
|
|
63
|
+
readonly _tag = "FilteredOut";
|
|
55
64
|
}
|
|
56
|
-
const Ignored_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
57
|
-
readonly _tag: "Ignored";
|
|
58
|
-
}>;
|
|
59
65
|
/** Is in an ignored version group */
|
|
60
|
-
export class Ignored extends
|
|
61
|
-
readonly
|
|
62
|
-
}> {
|
|
66
|
+
export class Ignored extends Excluded {
|
|
67
|
+
readonly _tag = "Ignored";
|
|
63
68
|
}
|
|
64
|
-
const Valid_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
65
|
-
readonly _tag: "Valid";
|
|
66
|
-
}>;
|
|
67
69
|
/** Version satisfies the rules of its version group */
|
|
68
|
-
export class Valid
|
|
70
|
+
export class Valid {
|
|
71
|
+
readonly _tag = "Valid";
|
|
72
|
+
readonly _tagGroup = "Valid";
|
|
73
|
+
readonly isInvalid = false;
|
|
69
74
|
readonly specifier: Specifier.Any;
|
|
70
|
-
|
|
75
|
+
constructor(specifier: Specifier.Any);
|
|
71
76
|
}
|
|
72
|
-
const Banned_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
73
|
-
readonly _tag: "Banned";
|
|
74
|
-
}>;
|
|
75
77
|
/** Must be removed */
|
|
76
|
-
export class Banned extends
|
|
77
|
-
readonly
|
|
78
|
-
}> {
|
|
78
|
+
export class Banned extends Fixable {
|
|
79
|
+
readonly _tag = "Banned";
|
|
79
80
|
}
|
|
80
|
-
const HighestSemverMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
81
|
-
readonly _tag: "HighestSemverMismatch";
|
|
82
|
-
}>;
|
|
83
81
|
/** Version mismatches and should use a higher version found on another */
|
|
84
|
-
export class HighestSemverMismatch extends
|
|
85
|
-
readonly
|
|
86
|
-
}> {
|
|
82
|
+
export class HighestSemverMismatch extends Fixable {
|
|
83
|
+
readonly _tag = "HighestSemverMismatch";
|
|
87
84
|
}
|
|
88
|
-
const LocalPackageMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
89
|
-
readonly _tag: "LocalPackageMismatch";
|
|
90
|
-
}>;
|
|
91
85
|
/** Version mismatches the `.version` of the package developed in this repo */
|
|
92
|
-
export class LocalPackageMismatch extends
|
|
93
|
-
readonly
|
|
86
|
+
export class LocalPackageMismatch extends Fixable {
|
|
87
|
+
readonly _tag = "LocalPackageMismatch";
|
|
94
88
|
readonly localInstance: Instance;
|
|
95
|
-
|
|
89
|
+
constructor(fixable: Specifier.Any, localInstance: Instance);
|
|
96
90
|
}
|
|
97
|
-
const LowestSemverMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
98
|
-
readonly _tag: "LowestSemverMismatch";
|
|
99
|
-
}>;
|
|
100
91
|
/** Version mismatches and should use a lower version found on another */
|
|
101
|
-
export class LowestSemverMismatch extends
|
|
102
|
-
readonly
|
|
103
|
-
}> {
|
|
92
|
+
export class LowestSemverMismatch extends Fixable {
|
|
93
|
+
readonly _tag = "LowestSemverMismatch";
|
|
104
94
|
}
|
|
105
|
-
const PinnedMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
106
|
-
readonly _tag: "PinnedMismatch";
|
|
107
|
-
}>;
|
|
108
95
|
/** Version is not identical to the `pinVersion` of its Pinned version group */
|
|
109
|
-
export class PinnedMismatch extends
|
|
110
|
-
readonly
|
|
111
|
-
}> {
|
|
96
|
+
export class PinnedMismatch extends Fixable {
|
|
97
|
+
readonly _tag = "PinnedMismatch";
|
|
112
98
|
}
|
|
113
|
-
const SemverRangeMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
114
|
-
readonly _tag: "SemverRangeMismatch";
|
|
115
|
-
}>;
|
|
116
99
|
/** Version is identical but the semver range does not match its semver group */
|
|
117
|
-
export class SemverRangeMismatch extends
|
|
118
|
-
readonly
|
|
119
|
-
}> {
|
|
100
|
+
export class SemverRangeMismatch extends Fixable {
|
|
101
|
+
readonly _tag = "SemverRangeMismatch";
|
|
120
102
|
}
|
|
121
|
-
const SnappedToMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
122
|
-
readonly _tag: "SnappedToMismatch";
|
|
123
|
-
}>;
|
|
124
103
|
/** Version mismatches the version used by the packages in the `snapTo` array */
|
|
125
|
-
export class SnappedToMismatch extends
|
|
126
|
-
readonly
|
|
104
|
+
export class SnappedToMismatch extends Fixable {
|
|
105
|
+
readonly _tag = "SnappedToMismatch";
|
|
127
106
|
readonly localInstance: Instance;
|
|
128
|
-
|
|
107
|
+
constructor(fixable: Specifier.Any, localInstance: Instance);
|
|
129
108
|
}
|
|
130
|
-
const MissingLocalVersion_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
131
|
-
readonly _tag: "MissingLocalVersion";
|
|
132
|
-
}>;
|
|
133
109
|
/** Dependency should match a local package.json which is missing a .version */
|
|
134
|
-
export class MissingLocalVersion extends
|
|
110
|
+
export class MissingLocalVersion extends Unfixable {
|
|
111
|
+
readonly _tag = "MissingLocalVersion";
|
|
135
112
|
readonly localInstance: Instance;
|
|
136
|
-
|
|
137
|
-
}> {
|
|
113
|
+
constructor(unfixable: Instance, localInstance: Instance);
|
|
138
114
|
}
|
|
139
|
-
const MissingSnappedToMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
140
|
-
readonly _tag: "MissingSnappedToMismatch";
|
|
141
|
-
}>;
|
|
142
115
|
/** Dependency is not present in any of the packages in the `snapTo` array */
|
|
143
|
-
export class MissingSnappedToMismatch extends
|
|
144
|
-
readonly
|
|
145
|
-
}> {
|
|
116
|
+
export class MissingSnappedToMismatch extends Unfixable {
|
|
117
|
+
readonly _tag = "MissingSnappedToMismatch";
|
|
146
118
|
}
|
|
147
|
-
const SameRangeMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
148
|
-
readonly _tag: "SameRangeMismatch";
|
|
149
|
-
}>;
|
|
150
119
|
/** Specifier does not cover the specifiers of every other instance in this group */
|
|
151
|
-
export class SameRangeMismatch extends
|
|
152
|
-
readonly
|
|
120
|
+
export class SameRangeMismatch extends Unfixable {
|
|
121
|
+
readonly _tag = "SameRangeMismatch";
|
|
153
122
|
/** the raw specifiers which this instance's specifier did not cover */
|
|
154
123
|
readonly mismatches: string[];
|
|
155
|
-
|
|
124
|
+
constructor(unfixable: Instance, mismatches: string[]);
|
|
156
125
|
}
|
|
157
|
-
const UnsupportedMismatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => Data.Data<Readonly<A> & {
|
|
158
|
-
readonly _tag: "UnsupportedMismatch";
|
|
159
|
-
}>;
|
|
160
126
|
/** Version mismatches and is not semver, syncpack cannot guess what to do */
|
|
161
|
-
export class UnsupportedMismatch extends
|
|
162
|
-
readonly
|
|
163
|
-
}> {
|
|
127
|
+
export class UnsupportedMismatch extends Unfixable {
|
|
128
|
+
readonly _tag = "UnsupportedMismatch";
|
|
164
129
|
}
|
|
165
130
|
export {};
|
|
166
131
|
}
|
package/dist/report.js
CHANGED
|
@@ -1,67 +1,132 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Report = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
4
|
var Report;
|
|
6
5
|
(function (Report) {
|
|
6
|
+
class Excluded {
|
|
7
|
+
_tagGroup = 'Excluded';
|
|
8
|
+
isInvalid = false;
|
|
9
|
+
instance;
|
|
10
|
+
constructor(instance) {
|
|
11
|
+
this.instance = instance;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
class Unfixable {
|
|
15
|
+
_tagGroup = 'Unfixable';
|
|
16
|
+
isInvalid = true;
|
|
17
|
+
unfixable;
|
|
18
|
+
constructor(unfixable) {
|
|
19
|
+
this.unfixable = unfixable;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class Fixable {
|
|
23
|
+
_tagGroup = 'Fixable';
|
|
24
|
+
isInvalid = true;
|
|
25
|
+
fixable;
|
|
26
|
+
constructor(fixable) {
|
|
27
|
+
this.fixable = fixable;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
7
30
|
/** Semver Groups are disabled by default */
|
|
8
|
-
class Disabled extends
|
|
31
|
+
class Disabled extends Excluded {
|
|
32
|
+
_tag = 'Disabled';
|
|
9
33
|
}
|
|
10
34
|
Report.Disabled = Disabled;
|
|
11
35
|
/** Has a name which does not match the `--filter` RegExp */
|
|
12
|
-
class FilteredOut extends
|
|
36
|
+
class FilteredOut extends Excluded {
|
|
37
|
+
_tag = 'FilteredOut';
|
|
13
38
|
}
|
|
14
39
|
Report.FilteredOut = FilteredOut;
|
|
15
40
|
/** Is in an ignored version group */
|
|
16
|
-
class Ignored extends
|
|
41
|
+
class Ignored extends Excluded {
|
|
42
|
+
_tag = 'Ignored';
|
|
17
43
|
}
|
|
18
44
|
Report.Ignored = Ignored;
|
|
19
45
|
/** Version satisfies the rules of its version group */
|
|
20
|
-
class Valid
|
|
46
|
+
class Valid {
|
|
47
|
+
_tag = 'Valid';
|
|
48
|
+
_tagGroup = 'Valid';
|
|
49
|
+
isInvalid = false;
|
|
50
|
+
specifier;
|
|
51
|
+
constructor(specifier) {
|
|
52
|
+
this.specifier = specifier;
|
|
53
|
+
}
|
|
21
54
|
}
|
|
22
55
|
Report.Valid = Valid;
|
|
23
56
|
/** Must be removed */
|
|
24
|
-
class Banned extends
|
|
57
|
+
class Banned extends Fixable {
|
|
58
|
+
_tag = 'Banned';
|
|
25
59
|
}
|
|
26
60
|
Report.Banned = Banned;
|
|
27
61
|
/** Version mismatches and should use a higher version found on another */
|
|
28
|
-
class HighestSemverMismatch extends
|
|
62
|
+
class HighestSemverMismatch extends Fixable {
|
|
63
|
+
_tag = 'HighestSemverMismatch';
|
|
29
64
|
}
|
|
30
65
|
Report.HighestSemverMismatch = HighestSemverMismatch;
|
|
31
66
|
/** Version mismatches the `.version` of the package developed in this repo */
|
|
32
|
-
class LocalPackageMismatch extends
|
|
67
|
+
class LocalPackageMismatch extends Fixable {
|
|
68
|
+
_tag = 'LocalPackageMismatch';
|
|
69
|
+
localInstance;
|
|
70
|
+
constructor(fixable, localInstance) {
|
|
71
|
+
super(fixable);
|
|
72
|
+
this.localInstance = localInstance;
|
|
73
|
+
}
|
|
33
74
|
}
|
|
34
75
|
Report.LocalPackageMismatch = LocalPackageMismatch;
|
|
35
76
|
/** Version mismatches and should use a lower version found on another */
|
|
36
|
-
class LowestSemverMismatch extends
|
|
77
|
+
class LowestSemverMismatch extends Fixable {
|
|
78
|
+
_tag = 'LowestSemverMismatch';
|
|
37
79
|
}
|
|
38
80
|
Report.LowestSemverMismatch = LowestSemverMismatch;
|
|
39
81
|
/** Version is not identical to the `pinVersion` of its Pinned version group */
|
|
40
|
-
class PinnedMismatch extends
|
|
82
|
+
class PinnedMismatch extends Fixable {
|
|
83
|
+
_tag = 'PinnedMismatch';
|
|
41
84
|
}
|
|
42
85
|
Report.PinnedMismatch = PinnedMismatch;
|
|
43
86
|
/** Version is identical but the semver range does not match its semver group */
|
|
44
|
-
class SemverRangeMismatch extends
|
|
87
|
+
class SemverRangeMismatch extends Fixable {
|
|
88
|
+
_tag = 'SemverRangeMismatch';
|
|
45
89
|
}
|
|
46
90
|
Report.SemverRangeMismatch = SemverRangeMismatch;
|
|
47
91
|
/** Version mismatches the version used by the packages in the `snapTo` array */
|
|
48
|
-
class SnappedToMismatch extends
|
|
92
|
+
class SnappedToMismatch extends Fixable {
|
|
93
|
+
_tag = 'SnappedToMismatch';
|
|
94
|
+
localInstance;
|
|
95
|
+
constructor(fixable, localInstance) {
|
|
96
|
+
super(fixable);
|
|
97
|
+
this.localInstance = localInstance;
|
|
98
|
+
}
|
|
49
99
|
}
|
|
50
100
|
Report.SnappedToMismatch = SnappedToMismatch;
|
|
51
101
|
/** Dependency should match a local package.json which is missing a .version */
|
|
52
|
-
class MissingLocalVersion extends
|
|
102
|
+
class MissingLocalVersion extends Unfixable {
|
|
103
|
+
_tag = 'MissingLocalVersion';
|
|
104
|
+
localInstance;
|
|
105
|
+
constructor(unfixable, localInstance) {
|
|
106
|
+
super(unfixable);
|
|
107
|
+
this.localInstance = localInstance;
|
|
108
|
+
}
|
|
53
109
|
}
|
|
54
110
|
Report.MissingLocalVersion = MissingLocalVersion;
|
|
55
111
|
/** Dependency is not present in any of the packages in the `snapTo` array */
|
|
56
|
-
class MissingSnappedToMismatch extends
|
|
112
|
+
class MissingSnappedToMismatch extends Unfixable {
|
|
113
|
+
_tag = 'MissingSnappedToMismatch';
|
|
57
114
|
}
|
|
58
115
|
Report.MissingSnappedToMismatch = MissingSnappedToMismatch;
|
|
59
116
|
/** Specifier does not cover the specifiers of every other instance in this group */
|
|
60
|
-
class SameRangeMismatch extends
|
|
117
|
+
class SameRangeMismatch extends Unfixable {
|
|
118
|
+
_tag = 'SameRangeMismatch';
|
|
119
|
+
/** the raw specifiers which this instance's specifier did not cover */
|
|
120
|
+
mismatches;
|
|
121
|
+
constructor(unfixable, mismatches) {
|
|
122
|
+
super(unfixable);
|
|
123
|
+
this.mismatches = mismatches;
|
|
124
|
+
}
|
|
61
125
|
}
|
|
62
126
|
Report.SameRangeMismatch = SameRangeMismatch;
|
|
63
127
|
/** Version mismatches and is not semver, syncpack cannot guess what to do */
|
|
64
|
-
class UnsupportedMismatch extends
|
|
128
|
+
class UnsupportedMismatch extends Unfixable {
|
|
129
|
+
_tag = 'UnsupportedMismatch';
|
|
65
130
|
}
|
|
66
131
|
Report.UnsupportedMismatch = UnsupportedMismatch;
|
|
67
132
|
})(Report || (exports.Report = Report = {}));
|