jsii-diff 1.112.0 → 1.114.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/lib/diagnostics.d.ts +1 -1
- package/lib/diagnostics.js +8 -8
- package/lib/index.js +1 -2
- package/lib/stability.js +1 -2
- package/lib/type-analysis.d.ts +2 -2
- package/lib/type-analysis.js +4 -5
- package/lib/types.d.ts +1 -1
- package/lib/types.js +4 -4
- package/lib/util.d.ts +2 -2
- package/lib/util.js +5 -5
- package/lib/validations.js +20 -21
- package/lib/version.d.ts +1 -1
- package/lib/version.js +2 -2
- package/package.json +9 -8
- package/test/util.js +3 -4
package/lib/diagnostics.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare function hasErrors(diags: Diagnostic[]): boolean;
|
|
|
15
15
|
export declare function onlyErrors(diags: Diagnostic[]): Diagnostic[];
|
|
16
16
|
export declare function onlyWarnings(diags: Diagnostic[]): Diagnostic[];
|
|
17
17
|
export declare const ERROR_CLASSES: readonly ["prod", "non-experimental", "all"];
|
|
18
|
-
export
|
|
18
|
+
export type ErrorClass = (typeof ERROR_CLASSES)[number];
|
|
19
19
|
export declare const ERROR_CLASSES_TO_STABILITIES: Record<ErrorClass, Stability[]>;
|
|
20
20
|
export declare function treatAsError(errorClass: ErrorClass, deprecatedExperimentalErrors?: boolean): Set<Stability>;
|
|
21
21
|
/**
|
package/lib/diagnostics.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ERROR_CLASSES_TO_STABILITIES = exports.ERROR_CLASSES = exports.DiagLevel = void 0;
|
|
4
|
+
exports.formatDiagnostic = formatDiagnostic;
|
|
5
|
+
exports.hasErrors = hasErrors;
|
|
6
|
+
exports.onlyErrors = onlyErrors;
|
|
7
|
+
exports.onlyWarnings = onlyWarnings;
|
|
8
|
+
exports.treatAsError = treatAsError;
|
|
9
|
+
exports.classifyDiagnostics = classifyDiagnostics;
|
|
4
10
|
const spec_1 = require("@jsii/spec");
|
|
5
11
|
var DiagLevel;
|
|
6
12
|
(function (DiagLevel) {
|
|
7
13
|
DiagLevel[DiagLevel["Error"] = 0] = "Error";
|
|
8
14
|
DiagLevel[DiagLevel["Warning"] = 1] = "Warning";
|
|
9
15
|
DiagLevel[DiagLevel["Skipped"] = 2] = "Skipped";
|
|
10
|
-
})(DiagLevel
|
|
16
|
+
})(DiagLevel || (exports.DiagLevel = DiagLevel = {}));
|
|
11
17
|
const LEVEL_PREFIX = {
|
|
12
18
|
[DiagLevel.Error]: 'err ',
|
|
13
19
|
[DiagLevel.Warning]: 'warn',
|
|
@@ -21,19 +27,15 @@ function formatDiagnostic(diag, includeSuppressionKey = false) {
|
|
|
21
27
|
...(includeSuppressionKey ? [`[${diag.suppressionKey}]`] : []),
|
|
22
28
|
].join(' ');
|
|
23
29
|
}
|
|
24
|
-
exports.formatDiagnostic = formatDiagnostic;
|
|
25
30
|
function hasErrors(diags) {
|
|
26
31
|
return diags.some((diag) => diag.level === DiagLevel.Error);
|
|
27
32
|
}
|
|
28
|
-
exports.hasErrors = hasErrors;
|
|
29
33
|
function onlyErrors(diags) {
|
|
30
34
|
return diags.filter((diag) => diag.level === DiagLevel.Error);
|
|
31
35
|
}
|
|
32
|
-
exports.onlyErrors = onlyErrors;
|
|
33
36
|
function onlyWarnings(diags) {
|
|
34
37
|
return diags.filter((diag) => diag.level === DiagLevel.Warning);
|
|
35
38
|
}
|
|
36
|
-
exports.onlyWarnings = onlyWarnings;
|
|
37
39
|
exports.ERROR_CLASSES = ['prod', 'non-experimental', 'all'];
|
|
38
40
|
exports.ERROR_CLASSES_TO_STABILITIES = {
|
|
39
41
|
prod: [spec_1.Stability.Stable, spec_1.Stability.Deprecated],
|
|
@@ -59,7 +61,6 @@ function treatAsError(errorClass, deprecatedExperimentalErrors = false) {
|
|
|
59
61
|
}
|
|
60
62
|
return shouldError;
|
|
61
63
|
}
|
|
62
|
-
exports.treatAsError = treatAsError;
|
|
63
64
|
/**
|
|
64
65
|
* Classify API mismatches into a set of warnings and errors
|
|
65
66
|
*/
|
|
@@ -78,5 +79,4 @@ function classifyDiagnostics(mismatches, shouldError, skipFilter = new Set()) {
|
|
|
78
79
|
return shouldError.has(mis.stability) ? DiagLevel.Error : DiagLevel.Warning;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
exports.classifyDiagnostics = classifyDiagnostics;
|
|
82
82
|
//# sourceMappingURL=diagnostics.js.map
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compareAssemblies =
|
|
3
|
+
exports.compareAssemblies = compareAssemblies;
|
|
4
4
|
const type_comparison_1 = require("./type-comparison");
|
|
5
5
|
/**
|
|
6
6
|
* Compare two assemblies
|
|
@@ -16,5 +16,4 @@ function compareAssemblies(original, updated, options = {}) {
|
|
|
16
16
|
comparison.compare();
|
|
17
17
|
return comparison.mismatches;
|
|
18
18
|
}
|
|
19
|
-
exports.compareAssemblies = compareAssemblies;
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
package/lib/stability.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateStabilities =
|
|
3
|
+
exports.validateStabilities = validateStabilities;
|
|
4
4
|
const spec = require("@jsii/spec");
|
|
5
5
|
function validateStabilities(original, updated, mismatches) {
|
|
6
6
|
// Nothing to do in these cases
|
|
@@ -26,7 +26,6 @@ function validateStabilities(original, updated, mismatches) {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
exports.validateStabilities = validateStabilities;
|
|
30
29
|
function allowedTransitions(start) {
|
|
31
30
|
switch (start) {
|
|
32
31
|
// Experimental can go to stable, external, or be deprecated
|
package/lib/type-analysis.d.ts
CHANGED
|
@@ -29,10 +29,10 @@ export declare function isNominalSuperType(a: reflect.TypeReference, b: reflect.
|
|
|
29
29
|
* type.
|
|
30
30
|
*/
|
|
31
31
|
export declare function isStructuralSuperType(a: reflect.InterfaceType, b: reflect.InterfaceType, updatedSystem: reflect.TypeSystem): Analysis;
|
|
32
|
-
export
|
|
32
|
+
export type Analysis = {
|
|
33
33
|
success: true;
|
|
34
34
|
} | FailedAnalysis;
|
|
35
|
-
export
|
|
35
|
+
export type FailedAnalysis = {
|
|
36
36
|
success: false;
|
|
37
37
|
reasons: string[];
|
|
38
38
|
};
|
package/lib/type-analysis.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isSuperType = isSuperType;
|
|
4
|
+
exports.isNominalSuperType = isNominalSuperType;
|
|
5
|
+
exports.isStructuralSuperType = isStructuralSuperType;
|
|
6
|
+
exports.prependReason = prependReason;
|
|
4
7
|
const util_1 = require("./util");
|
|
5
8
|
/**
|
|
6
9
|
* Check whether A is a supertype of B
|
|
@@ -72,7 +75,6 @@ function isSuperType(a, b, updatedSystem) {
|
|
|
72
75
|
return failure(e.message);
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
|
-
exports.isSuperType = isSuperType;
|
|
76
78
|
/**
|
|
77
79
|
* Find types A and B in the updated type system, and check whether they have a supertype relationship in the type system
|
|
78
80
|
*/
|
|
@@ -111,7 +113,6 @@ function isNominalSuperType(a, b, updatedSystem) {
|
|
|
111
113
|
}
|
|
112
114
|
return failure(`${b.toString()} does not extend ${a.toString()}`);
|
|
113
115
|
}
|
|
114
|
-
exports.isNominalSuperType = isNominalSuperType;
|
|
115
116
|
/**
|
|
116
117
|
* Is struct A a structural supertype of struct B?
|
|
117
118
|
*
|
|
@@ -158,7 +159,6 @@ function isStructuralSuperType(a, b, updatedSystem) {
|
|
|
158
159
|
}
|
|
159
160
|
return { success: true };
|
|
160
161
|
}
|
|
161
|
-
exports.isStructuralSuperType = isStructuralSuperType;
|
|
162
162
|
function failure(...reasons) {
|
|
163
163
|
return { success: false, reasons };
|
|
164
164
|
}
|
|
@@ -168,5 +168,4 @@ function prependReason(analysis, message) {
|
|
|
168
168
|
}
|
|
169
169
|
return failure(message, ...analysis.reasons);
|
|
170
170
|
}
|
|
171
|
-
exports.prependReason = prependReason;
|
|
172
171
|
//# sourceMappingURL=type-analysis.js.map
|
package/lib/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface ApiMismatch {
|
|
|
19
19
|
violationKey: string;
|
|
20
20
|
stability: Stability;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ApiElement = reflect.Type | reflect.TypeMember | reflect.EnumMember;
|
|
23
23
|
export interface ReportOptions {
|
|
24
24
|
ruleKey: string;
|
|
25
25
|
violator: ApiElement;
|
package/lib/types.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Mismatches = void 0;
|
|
4
|
+
exports.apiElementIdentifier = apiElementIdentifier;
|
|
5
|
+
exports.describeType = describeType;
|
|
6
|
+
exports.describeInterfaceType = describeInterfaceType;
|
|
4
7
|
const reflect = require("jsii-reflect");
|
|
5
8
|
class Mismatches {
|
|
6
9
|
constructor(opts) {
|
|
@@ -65,7 +68,6 @@ function apiElementIdentifier(apiElement) {
|
|
|
65
68
|
},
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
|
-
exports.apiElementIdentifier = apiElementIdentifier;
|
|
69
71
|
function describeApiElement(apiElement) {
|
|
70
72
|
return dispatch(apiElement, {
|
|
71
73
|
method() {
|
|
@@ -128,9 +130,7 @@ function describeType(type) {
|
|
|
128
130
|
}
|
|
129
131
|
return 'TYPE';
|
|
130
132
|
}
|
|
131
|
-
exports.describeType = describeType;
|
|
132
133
|
function describeInterfaceType(dataType) {
|
|
133
134
|
return dataType ? 'struct' : 'regular interface';
|
|
134
135
|
}
|
|
135
|
-
exports.describeInterfaceType = describeInterfaceType;
|
|
136
136
|
//# sourceMappingURL=types.js.map
|
package/lib/util.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function inTempDir<T>(block: () => T | Promise<T>): Promise<T>;
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type DownloadFailure = 'no_such_package';
|
|
3
|
+
export type NpmDownloadResult<T> = {
|
|
4
4
|
success: true;
|
|
5
5
|
result: T;
|
|
6
6
|
} | {
|
package/lib/util.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecursionBreaker =
|
|
3
|
+
exports.RecursionBreaker = void 0;
|
|
4
|
+
exports.inTempDir = inTempDir;
|
|
5
|
+
exports.showDownloadFailure = showDownloadFailure;
|
|
6
|
+
exports.downloadNpmPackage = downloadNpmPackage;
|
|
7
|
+
exports.flatMap = flatMap;
|
|
4
8
|
const childProcess = require("child_process");
|
|
5
9
|
const fs = require("fs-extra");
|
|
6
10
|
const log4js = require("log4js");
|
|
@@ -21,7 +25,6 @@ async function inTempDir(block) {
|
|
|
21
25
|
await fs.remove(tmpDir);
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
|
-
exports.inTempDir = inTempDir;
|
|
25
28
|
function showDownloadFailure(f) {
|
|
26
29
|
switch (f) {
|
|
27
30
|
case 'no_such_package':
|
|
@@ -30,7 +33,6 @@ function showDownloadFailure(f) {
|
|
|
30
33
|
return undefined;
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
|
-
exports.showDownloadFailure = showDownloadFailure;
|
|
34
36
|
async function downloadNpmPackage(pkg, block) {
|
|
35
37
|
return inTempDir(async () => {
|
|
36
38
|
LOG.info(`Fetching NPM package ${pkg}`);
|
|
@@ -60,7 +62,6 @@ async function downloadNpmPackage(pkg, block) {
|
|
|
60
62
|
};
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
|
-
exports.downloadNpmPackage = downloadNpmPackage;
|
|
64
65
|
function isSubprocesFailedError(e) {
|
|
65
66
|
return e.code !== undefined && e.cmd !== undefined;
|
|
66
67
|
}
|
|
@@ -92,7 +93,6 @@ function flatMap(xs, fn) {
|
|
|
92
93
|
}
|
|
93
94
|
return ret;
|
|
94
95
|
}
|
|
95
|
-
exports.flatMap = flatMap;
|
|
96
96
|
/**
|
|
97
97
|
* Don't recurse infinitely by guarding a block with `do()`.
|
|
98
98
|
*/
|
package/lib/validations.js
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateBaseTypeAssignability = validateBaseTypeAssignability;
|
|
4
|
+
exports.validateNotMadeAbstract = validateNotMadeAbstract;
|
|
5
|
+
exports.validateSubclassableNotRemoved = validateSubclassableNotRemoved;
|
|
6
|
+
exports.validateStaticSame = validateStaticSame;
|
|
7
|
+
exports.validateAsyncSame = validateAsyncSame;
|
|
8
|
+
exports.validateNotMadeNonVariadic = validateNotMadeNonVariadic;
|
|
9
|
+
exports.validateNoNewAbstractMembers = validateNoNewAbstractMembers;
|
|
10
|
+
exports.validateReturnTypeNotWeakened = validateReturnTypeNotWeakened;
|
|
11
|
+
exports.validateReturnTypeSame = validateReturnTypeSame;
|
|
12
|
+
exports.validatePropertyTypeNotWeakened = validatePropertyTypeNotWeakened;
|
|
13
|
+
exports.validatePropertyTypeSame = validatePropertyTypeSame;
|
|
14
|
+
exports.validateParameterTypeWeakened = validateParameterTypeWeakened;
|
|
15
|
+
exports.validateParameterTypeSame = validateParameterTypeSame;
|
|
16
|
+
exports.validateExistingParams = validateExistingParams;
|
|
17
|
+
exports.validateNoNewRequiredParams = validateNoNewRequiredParams;
|
|
18
|
+
exports.validateMethodCompatible = validateMethodCompatible;
|
|
19
|
+
exports.subclassableType = subclassableType;
|
|
20
|
+
exports.validateNotMadeImmutable = validateNotMadeImmutable;
|
|
21
|
+
exports.memberPairs = memberPairs;
|
|
22
|
+
exports.validateExistingMembers = validateExistingMembers;
|
|
4
23
|
const reflect = require("jsii-reflect");
|
|
5
24
|
const log4js = require("log4js");
|
|
6
25
|
const stability_1 = require("./stability");
|
|
@@ -27,7 +46,6 @@ function validateBaseTypeAssignability(original, updated, mismatches) {
|
|
|
27
46
|
});
|
|
28
47
|
}
|
|
29
48
|
}
|
|
30
|
-
exports.validateBaseTypeAssignability = validateBaseTypeAssignability;
|
|
31
49
|
/**
|
|
32
50
|
* The updated type has not been newly made abstract
|
|
33
51
|
*
|
|
@@ -46,7 +64,6 @@ function validateNotMadeAbstract(original, updated, mismatches) {
|
|
|
46
64
|
});
|
|
47
65
|
}
|
|
48
66
|
}
|
|
49
|
-
exports.validateNotMadeAbstract = validateNotMadeAbstract;
|
|
50
67
|
/**
|
|
51
68
|
* The updated type has not had its @subclassable attribute removed
|
|
52
69
|
*
|
|
@@ -61,7 +78,6 @@ function validateSubclassableNotRemoved(original, updated, mismatches) {
|
|
|
61
78
|
});
|
|
62
79
|
}
|
|
63
80
|
}
|
|
64
|
-
exports.validateSubclassableNotRemoved = validateSubclassableNotRemoved;
|
|
65
81
|
/**
|
|
66
82
|
* Check that the `static`-ness of a member hasn't changed
|
|
67
83
|
*/
|
|
@@ -74,7 +90,6 @@ function validateStaticSame(original, updated, mismatches) {
|
|
|
74
90
|
});
|
|
75
91
|
}
|
|
76
92
|
}
|
|
77
|
-
exports.validateStaticSame = validateStaticSame;
|
|
78
93
|
/**
|
|
79
94
|
* Check that the `async`-ness of a method hasn't changed
|
|
80
95
|
*/
|
|
@@ -89,7 +104,6 @@ function validateAsyncSame(original, updated, mismatches) {
|
|
|
89
104
|
});
|
|
90
105
|
}
|
|
91
106
|
}
|
|
92
|
-
exports.validateAsyncSame = validateAsyncSame;
|
|
93
107
|
/**
|
|
94
108
|
* Once variadic, can never be made non-variadic anymore (because I could always have been passing N+1 arguments)
|
|
95
109
|
*/
|
|
@@ -102,7 +116,6 @@ function validateNotMadeNonVariadic(original, updated, mismatches) {
|
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
118
|
}
|
|
105
|
-
exports.validateNotMadeNonVariadic = validateNotMadeNonVariadic;
|
|
106
119
|
/**
|
|
107
120
|
* Check that no new abstract members were added to a subclassable type
|
|
108
121
|
*
|
|
@@ -122,7 +135,6 @@ function validateNoNewAbstractMembers(original, updated, mismatches) {
|
|
|
122
135
|
}
|
|
123
136
|
}
|
|
124
137
|
}
|
|
125
|
-
exports.validateNoNewAbstractMembers = validateNoNewAbstractMembers;
|
|
126
138
|
/**
|
|
127
139
|
* Validate that a method return type is the same or strengthened
|
|
128
140
|
*
|
|
@@ -144,7 +156,6 @@ function validateReturnTypeNotWeakened(original, updated, mismatches) {
|
|
|
144
156
|
});
|
|
145
157
|
}
|
|
146
158
|
}
|
|
147
|
-
exports.validateReturnTypeNotWeakened = validateReturnTypeNotWeakened;
|
|
148
159
|
/**
|
|
149
160
|
* Validate that a method return type is the exact same
|
|
150
161
|
*
|
|
@@ -161,7 +172,6 @@ function validateReturnTypeSame(original, updated, mismatches) {
|
|
|
161
172
|
});
|
|
162
173
|
}
|
|
163
174
|
}
|
|
164
|
-
exports.validateReturnTypeSame = validateReturnTypeSame;
|
|
165
175
|
/**
|
|
166
176
|
* Validate that a property type is the same or strengthened
|
|
167
177
|
*
|
|
@@ -183,7 +193,6 @@ function validatePropertyTypeNotWeakened(original, updated, mismatches) {
|
|
|
183
193
|
});
|
|
184
194
|
}
|
|
185
195
|
}
|
|
186
|
-
exports.validatePropertyTypeNotWeakened = validatePropertyTypeNotWeakened;
|
|
187
196
|
/**
|
|
188
197
|
* Validate that a property type is the exact same
|
|
189
198
|
*
|
|
@@ -200,7 +209,6 @@ function validatePropertyTypeSame(original, updated, mismatches) {
|
|
|
200
209
|
});
|
|
201
210
|
}
|
|
202
211
|
}
|
|
203
|
-
exports.validatePropertyTypeSame = validatePropertyTypeSame;
|
|
204
212
|
/**
|
|
205
213
|
* Validate that a method return type is the same or weakened
|
|
206
214
|
*
|
|
@@ -225,7 +233,6 @@ function validateParameterTypeWeakened(method, original, updated, mismatches) {
|
|
|
225
233
|
return;
|
|
226
234
|
}
|
|
227
235
|
}
|
|
228
|
-
exports.validateParameterTypeWeakened = validateParameterTypeWeakened;
|
|
229
236
|
/**
|
|
230
237
|
* Validate that a method parameter type is the exact same
|
|
231
238
|
*
|
|
@@ -240,7 +247,6 @@ function validateParameterTypeSame(method, original, updated, mismatches) {
|
|
|
240
247
|
});
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
|
-
exports.validateParameterTypeSame = validateParameterTypeSame;
|
|
244
250
|
function describeOptionalValueMatchingFailure(origType, updatedType, analysis) {
|
|
245
251
|
const origDescr = reflect.OptionalValue.describe(origType);
|
|
246
252
|
const updaDescr = reflect.OptionalValue.describe(updatedType);
|
|
@@ -274,7 +280,6 @@ function validateExistingParams(original, updated, mismatches, validateParam) {
|
|
|
274
280
|
validateParam(param, updatedParam);
|
|
275
281
|
});
|
|
276
282
|
}
|
|
277
|
-
exports.validateExistingParams = validateExistingParams;
|
|
278
283
|
/**
|
|
279
284
|
* Validate that no new required params got added to the end of the method
|
|
280
285
|
*
|
|
@@ -301,7 +306,6 @@ function validateNoNewRequiredParams(original, updated, mismatches) {
|
|
|
301
306
|
}
|
|
302
307
|
});
|
|
303
308
|
}
|
|
304
|
-
exports.validateNoNewRequiredParams = validateNoNewRequiredParams;
|
|
305
309
|
function validateMethodCompatible(original, updated, mismatches) {
|
|
306
310
|
(0, stability_1.validateStabilities)(original, updated, mismatches);
|
|
307
311
|
// Type guards on original are duplicated on updated to help tsc... They are required to be the same type by the declaration.
|
|
@@ -317,14 +321,12 @@ function validateMethodCompatible(original, updated, mismatches) {
|
|
|
317
321
|
});
|
|
318
322
|
validateNoNewRequiredParams(original, updated, mismatches);
|
|
319
323
|
}
|
|
320
|
-
exports.validateMethodCompatible = validateMethodCompatible;
|
|
321
324
|
/**
|
|
322
325
|
* Check if a class/interface has been marked as @subclassable
|
|
323
326
|
*/
|
|
324
327
|
function subclassableType(x) {
|
|
325
328
|
return x.docs.subclassable;
|
|
326
329
|
}
|
|
327
|
-
exports.subclassableType = subclassableType;
|
|
328
330
|
/**
|
|
329
331
|
* Find the indicated parameter with the given index
|
|
330
332
|
*
|
|
@@ -358,7 +360,6 @@ function validateNotMadeImmutable(original, updated, mismatches) {
|
|
|
358
360
|
});
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
|
-
exports.validateNotMadeImmutable = validateNotMadeImmutable;
|
|
362
363
|
function* memberPairs(origClass, xs, updatedClass, mismatches) {
|
|
363
364
|
for (const origMember of xs) {
|
|
364
365
|
LOG.trace(`${origClass.fqn}#${origMember.name}`);
|
|
@@ -388,7 +389,6 @@ function* memberPairs(origClass, xs, updatedClass, mismatches) {
|
|
|
388
389
|
yield [origMember, updatedMember];
|
|
389
390
|
}
|
|
390
391
|
}
|
|
391
|
-
exports.memberPairs = memberPairs;
|
|
392
392
|
/**
|
|
393
393
|
* Whether we are strengthening the postcondition (output type of a method or property)
|
|
394
394
|
*
|
|
@@ -483,5 +483,4 @@ function validateExistingMembers(original, updated, mismatches, validateMember)
|
|
|
483
483
|
validateMember(origMember, updatedMember);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
exports.validateExistingMembers = validateExistingMembers;
|
|
487
486
|
//# sourceMappingURL=validations.js.map
|
package/lib/version.d.ts
CHANGED
package/lib/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Generated at 2025-
|
|
2
|
+
// Generated at 2025-09-04T13:08:56Z by generate.sh
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.VERSION = void 0;
|
|
5
5
|
/** The qualified version number for this JSII compiler. */
|
|
6
|
-
exports.VERSION = '1.
|
|
6
|
+
exports.VERSION = '1.114.1 (build 8a29f60)';
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsii-diff",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.114.1",
|
|
4
4
|
"description": "Assembly comparison for jsii",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"jsii-diff": "bin/jsii-diff"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "bash ./generate.sh && tsc --build &&
|
|
27
|
+
"build": "bash ./generate.sh && tsc --build && yarn lint",
|
|
28
28
|
"watch": "bash ./generate.sh && tsc --build -w",
|
|
29
29
|
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
|
|
30
30
|
"lint:fix": "yarn lint --fix",
|
|
@@ -33,18 +33,19 @@
|
|
|
33
33
|
"package": "package-js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@jsii/check-node": "1.
|
|
37
|
-
"@jsii/spec": "
|
|
36
|
+
"@jsii/check-node": "1.114.1",
|
|
37
|
+
"@jsii/spec": "1.114.1",
|
|
38
38
|
"fs-extra": "^10.1.0",
|
|
39
|
-
"jsii-reflect": "^1.
|
|
39
|
+
"jsii-reflect": "^1.114.1",
|
|
40
40
|
"log4js": "^6.9.1",
|
|
41
|
-
"yargs": "^
|
|
41
|
+
"yargs": "^17.7.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/fs-extra": "^9.0.13",
|
|
45
45
|
"@types/tar-fs": "^2.0.4",
|
|
46
|
+
"@types/yargs": "^17.0.33",
|
|
46
47
|
"jest-expect-message": "^1.1.3",
|
|
47
|
-
"jsii": "^5.
|
|
48
|
-
"jsii-build-tools": "^1.
|
|
48
|
+
"jsii": "^5.9.1",
|
|
49
|
+
"jsii-build-tools": "^1.114.1"
|
|
49
50
|
}
|
|
50
51
|
}
|
package/test/util.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.expectNoError = expectNoError;
|
|
4
|
+
exports.expectError = expectError;
|
|
5
|
+
exports.compare = compare;
|
|
4
6
|
const jsii_1 = require("jsii");
|
|
5
7
|
const reflect = require("jsii-reflect");
|
|
6
8
|
const lib_1 = require("../lib");
|
|
@@ -11,7 +13,6 @@ function expectNoError(original, updated) {
|
|
|
11
13
|
}
|
|
12
14
|
expect(mms.count).toBe(0);
|
|
13
15
|
}
|
|
14
|
-
exports.expectNoError = expectNoError;
|
|
15
16
|
function expectError(error, original, updated) {
|
|
16
17
|
if (error == null) {
|
|
17
18
|
expectNoError(original, updated);
|
|
@@ -24,7 +25,6 @@ function expectError(error, original, updated) {
|
|
|
24
25
|
expect(msgs.join(',')).toMatch(error);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
exports.expectError = expectError;
|
|
28
28
|
function compare(original, updated) {
|
|
29
29
|
const ass1 = (0, jsii_1.sourceToAssemblyHelper)(original);
|
|
30
30
|
const ts1 = new reflect.TypeSystem();
|
|
@@ -34,5 +34,4 @@ function compare(original, updated) {
|
|
|
34
34
|
const updatedAssembly = ts2.addAssembly(new reflect.Assembly(ts2, ass2));
|
|
35
35
|
return (0, lib_1.compareAssemblies)(originalAssembly, updatedAssembly);
|
|
36
36
|
}
|
|
37
|
-
exports.compare = compare;
|
|
38
37
|
//# sourceMappingURL=util.js.map
|