syncpack 9.1.2 → 9.3.2
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 +1 -1
- package/dist/bin-lint-semver-ranges/lint-semver-ranges.js +4 -4
- package/dist/bin-list/list.js +9 -5
- package/dist/bin-list-mismatches/list-mismatches.js +4 -4
- package/dist/bin-set-semver-ranges/set-semver-ranges.js +1 -1
- package/dist/get-context/get-config/schema/base-group.d.ts +1 -0
- package/dist/get-context/get-config/schema/base-group.js +1 -0
- package/dist/get-context/get-config/schema/index.d.ts +214 -78
- package/dist/get-context/get-config/schema/semver-group.d.ts +30 -12
- package/dist/get-context/get-config/schema/version-group.d.ts +34 -4
- package/dist/lib/log.d.ts +4 -2
- package/dist/lib/log.js +23 -14
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ exports.__esModule = true;
|
|
|
3
3
|
exports.fixMismatches = void 0;
|
|
4
4
|
var expect_more_1 = require("expect-more");
|
|
5
5
|
function fixMismatches(ctx) {
|
|
6
|
-
ctx.versionGroups.
|
|
6
|
+
ctx.versionGroups.forEach(function (versionGroup) {
|
|
7
7
|
var invalidGroups = versionGroup.getInvalidInstanceGroups();
|
|
8
8
|
// Nothing to do if there are no mismatches
|
|
9
9
|
if (invalidGroups.length === 0)
|
|
@@ -51,19 +51,19 @@ var chalk_1 = __importDefault(require("chalk"));
|
|
|
51
51
|
var constants_1 = require("../constants");
|
|
52
52
|
var log = __importStar(require("../lib/log"));
|
|
53
53
|
function lintSemverRanges(ctx) {
|
|
54
|
-
ctx.semverGroups.
|
|
54
|
+
var hasUserGroups = ctx.semverGroups.length > 1;
|
|
55
|
+
ctx.semverGroups.forEach(function (semverGroup, i) {
|
|
55
56
|
// Nothing to do if there are no mismatches
|
|
56
57
|
if (!semverGroup.hasMismatches())
|
|
57
58
|
return;
|
|
58
59
|
// Record that this project has mismatches, so that eg. the CLI can exit
|
|
59
60
|
// with the correct status code.
|
|
60
61
|
ctx.isInvalid = true;
|
|
62
|
+
// Annotate each group
|
|
63
|
+
hasUserGroups && log.semverGroupHeader(semverGroup, i);
|
|
61
64
|
// Log each group which has mismatches
|
|
62
65
|
semverGroup.getMismatches().forEach(function (_a) {
|
|
63
66
|
var _b = __read(_a, 2), name = _b[0], mismatches = _b[1];
|
|
64
|
-
// Annotate user-defined version groups
|
|
65
|
-
if (!semverGroup.isDefault)
|
|
66
|
-
log.semverGroupHeader(i);
|
|
67
67
|
// Log the dependency name
|
|
68
68
|
log.invalid(name);
|
|
69
69
|
// Log each of the dependencies mismatches
|
package/dist/bin-list/list.js
CHANGED
|
@@ -35,11 +35,15 @@ var chalk_1 = __importDefault(require("chalk"));
|
|
|
35
35
|
var constants_1 = require("../constants");
|
|
36
36
|
var log = __importStar(require("../lib/log"));
|
|
37
37
|
function list(ctx) {
|
|
38
|
-
ctx.versionGroups.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
var hasUserGroups = ctx.versionGroups.length > 1;
|
|
39
|
+
ctx.versionGroups.forEach(function (versionGroup, i) {
|
|
40
|
+
var instanceGroups = versionGroup.getAllInstanceGroups();
|
|
41
|
+
// Nothing to do if empty
|
|
42
|
+
if (instanceGroups.length === 0)
|
|
43
|
+
return;
|
|
44
|
+
// Annotate each group
|
|
45
|
+
hasUserGroups && log.versionGroupHeader(versionGroup, i);
|
|
46
|
+
instanceGroups.forEach(function (instanceGroup) {
|
|
43
47
|
// Record that this project has mismatches, so that eg. the CLI can exit
|
|
44
48
|
// with the correct status code.
|
|
45
49
|
if (instanceGroup.isInvalid())
|
|
@@ -34,7 +34,8 @@ exports.listMismatches = void 0;
|
|
|
34
34
|
var chalk_1 = __importDefault(require("chalk"));
|
|
35
35
|
var log = __importStar(require("../lib/log"));
|
|
36
36
|
function listMismatches(ctx) {
|
|
37
|
-
ctx.versionGroups.
|
|
37
|
+
var hasUserGroups = ctx.versionGroups.length > 1;
|
|
38
|
+
ctx.versionGroups.forEach(function (versionGroup, i) {
|
|
38
39
|
var invalidGroups = versionGroup.getInvalidInstanceGroups();
|
|
39
40
|
// Nothing to do if there are no mismatches
|
|
40
41
|
if (invalidGroups.length === 0)
|
|
@@ -42,9 +43,8 @@ function listMismatches(ctx) {
|
|
|
42
43
|
// Record that this project has mismatches, so that eg. the CLI can exit
|
|
43
44
|
// with the correct status code.
|
|
44
45
|
ctx.isInvalid = true;
|
|
45
|
-
// Annotate
|
|
46
|
-
|
|
47
|
-
log.versionGroupHeader(i);
|
|
46
|
+
// Annotate each group
|
|
47
|
+
hasUserGroups && log.versionGroupHeader(versionGroup, i);
|
|
48
48
|
// Log the mismatches
|
|
49
49
|
invalidGroups.forEach(function (instanceGroup) {
|
|
50
50
|
if (versionGroup.isBanned())
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
exports.setSemverRanges = void 0;
|
|
4
4
|
var setSemverRanges = function (ctx) {
|
|
5
|
-
ctx.semverGroups.
|
|
5
|
+
ctx.semverGroups.forEach(function (semverGroup) {
|
|
6
6
|
semverGroup.instances.forEach(function (instance) {
|
|
7
7
|
instance.setVersion(semverGroup.getExpectedVersion(instance));
|
|
8
8
|
});
|
|
@@ -5,5 +5,6 @@ var zod_1 = require("zod");
|
|
|
5
5
|
exports.baseGroupFields = {
|
|
6
6
|
dependencies: zod_1.z.array(zod_1.z.string()).min(1),
|
|
7
7
|
dependencyTypes: zod_1.z.array(zod_1.z.string())["default"]([]),
|
|
8
|
+
label: zod_1.z.string()["default"](''),
|
|
8
9
|
packages: zod_1.z.array(zod_1.z.string()).min(1)
|
|
9
10
|
};
|