jsii-diff 1.70.0 → 1.72.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.
@@ -32,10 +32,10 @@ class AssemblyComparison {
32
32
  */
33
33
  load(original, updated) {
34
34
  /* eslint-disable prettier/prettier */
35
- for (const [origClass, updatedClass] of this.typePairs(original.classes, updated)) {
35
+ for (const [origClass, updatedClass] of this.typePairs(original.allClasses, updated)) {
36
36
  this.types.set(origClass.fqn, new ComparableClassType(this, origClass, updatedClass));
37
37
  }
38
- for (const [origIface, updatedIface] of this.typePairs(original.interfaces, updated)) {
38
+ for (const [origIface, updatedIface] of this.typePairs(original.allInterfaces, updated)) {
39
39
  if (origIface.datatype !== updatedIface.datatype) {
40
40
  this.mismatches.report({
41
41
  ruleKey: 'iface-type',
@@ -48,7 +48,7 @@ class AssemblyComparison {
48
48
  ? new ComparableStructType(this, origIface, updatedIface)
49
49
  : new ComparableInterfaceType(this, origIface, updatedIface));
50
50
  }
51
- for (const [origEnum, updatedEnum] of this.typePairs(original.enums, updated)) {
51
+ for (const [origEnum, updatedEnum] of this.typePairs(original.allEnums, updated)) {
52
52
  this.types.set(origEnum.fqn, new ComparableEnumType(this, origEnum, updatedEnum));
53
53
  }
54
54
  /* eslint-enable prettier/prettier */
@@ -57,6 +57,7 @@ class AssemblyComparison {
57
57
  * Perform the comparison for all loaded types
58
58
  */
59
59
  compare() {
60
+ LOG.debug(`Comparing ${this.comparableTypes.length} types`);
60
61
  this.comparableTypes.forEach((t) => t.markTypeRoles());
61
62
  this.comparableTypes.forEach((t) => t.compare());
62
63
  }
@@ -207,6 +208,7 @@ class ComparableReferenceType extends ComparableType {
207
208
  * Compare members of the reference types
208
209
  */
209
210
  compare() {
211
+ LOG.debug(`Reference type ${this.oldType.fqn}`);
210
212
  (0, stability_1.validateStabilities)(this.oldType, this.newType, this.mismatches);
211
213
  (0, validations_1.validateBaseTypeAssignability)(this.oldType, this.newType, this.mismatches);
212
214
  (0, validations_1.validateSubclassableNotRemoved)(this.oldType, this.newType, this.mismatches);
@@ -346,6 +348,7 @@ exports.ComparableInterfaceType = ComparableInterfaceType;
346
348
  */
347
349
  class ComparableStructType extends ComparableType {
348
350
  compare() {
351
+ LOG.debug(`Struct type ${this.oldType.fqn}`);
349
352
  (0, stability_1.validateStabilities)(this.oldType, this.newType, this.mismatches);
350
353
  (0, validations_1.validateBaseTypeAssignability)(this.oldType, this.newType, this.mismatches);
351
354
  this.validateNoPropertiesRemoved();
@@ -424,6 +427,7 @@ class ComparableEnumType extends ComparableType {
424
427
  * Perform comparisons on enum members
425
428
  */
426
429
  compare() {
430
+ LOG.debug(`Enum type ${this.oldType.fqn}`);
427
431
  (0, stability_1.validateStabilities)(this.oldType, this.newType, this.mismatches);
428
432
  (0, validations_1.validateExistingMembers)(this.oldType, this.newType, this.mismatches, (oldMember, newMember) => {
429
433
  (0, stability_1.validateStabilities)(oldMember, newMember, this.mismatches);
package/lib/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** The qualified version number for this JSII compiler. */
2
- export declare const VERSION = "1.70.0 (build 03c2f6f)";
2
+ export declare const VERSION = "1.72.0 (build 4b8828b)";
3
3
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- // Generated at 2022-10-19T17:18:34Z by generate.sh
2
+ // Generated at 2022-12-05T11:41:52Z 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.70.0 (build 03c2f6f)';
6
+ exports.VERSION = '1.72.0 (build 4b8828b)';
7
7
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsii-diff",
3
- "version": "1.70.0",
3
+ "version": "1.72.0",
4
4
  "description": "Assembly comparison for jsii",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -33,18 +33,18 @@
33
33
  "package": "package-js"
34
34
  },
35
35
  "dependencies": {
36
- "@jsii/check-node": "1.70.0",
37
- "@jsii/spec": "^1.70.0",
36
+ "@jsii/check-node": "1.72.0",
37
+ "@jsii/spec": "^1.72.0",
38
38
  "fs-extra": "^10.1.0",
39
- "jsii-reflect": "^1.70.0",
40
- "log4js": "^6.7.0",
39
+ "jsii-reflect": "^1.72.0",
40
+ "log4js": "^6.7.1",
41
41
  "yargs": "^16.2.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/fs-extra": "^9.0.13",
45
45
  "@types/tar-fs": "^2.0.1",
46
46
  "jest-expect-message": "^1.1.3",
47
- "jsii": "^1.70.0",
48
- "jsii-build-tools": "^1.70.0"
47
+ "jsii": "^1.72.0",
48
+ "jsii-build-tools": "^1.72.0"
49
49
  }
50
50
  }
@@ -539,4 +539,12 @@ test.each([
539
539
  ${usageDecl}
540
540
  }
541
541
  `));
542
+ // ----------------------------------------------------------------------
543
+ test('will find mismatches in submodules', () => (0, util_1.expectError)(/number is not assignable to string/, {
544
+ 'index.ts': 'export * as submodule from "./subdir"',
545
+ 'subdir/index.ts': 'export class Foo { public static readonly PROP = "abc"; }',
546
+ }, {
547
+ 'index.ts': 'export * as submodule from "./subdir"',
548
+ 'subdir/index.ts': 'export class Foo { public static readonly PROP = 42; }',
549
+ }));
542
550
  //# sourceMappingURL=classes.test.js.map
package/test/util.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { MultipleSourceFiles } from 'jsii';
1
2
  import { Mismatches } from '../lib/types';
2
- export declare function expectNoError(original: string, updated: string): void;
3
- export declare function expectError(error: RegExp | undefined, original: string, updated: string): void;
4
- export declare function compare(original: string, updated: string): Mismatches;
3
+ export declare function expectNoError(original: string | MultipleSourceFiles, updated: string | MultipleSourceFiles): void;
4
+ export declare function expectError(error: RegExp | undefined, original: string | MultipleSourceFiles, updated: string | MultipleSourceFiles): void;
5
+ export declare function compare(original: string | MultipleSourceFiles, updated: string | MultipleSourceFiles): Mismatches;
5
6
  //# sourceMappingURL=util.d.ts.map