jsii-diff 1.35.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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,2 @@
1
+ jsii
2
+ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
package/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # jsii-diff
2
+
3
+ __jsii-diff__ compares two jsii assemblies for compatibility.
4
+
5
+ In the future, it will be able to do generic comparisons, but for
6
+ now it will compare assemblies for API compatibility, and exit
7
+ with a non-zero exit code if any **stable** APIs have had incompatible
8
+ changes.
9
+
10
+ API items that have no stability are treated as **stable**. To treat
11
+ unmarked API items as experimental, pass the `--default-experimental` flag.
12
+
13
+ ## Usage
14
+
15
+ To compare two JSII packages:
16
+
17
+ jsii-diff <old> [new]
18
+
19
+ Packages can be identified by either:
20
+
21
+ * **A path**, in which case it should be the path to a JSII package directory,
22
+ or to a `.jsii` file.
23
+ * **An NPM package specifier** of the form `npm:[<package>[@version]]`, in
24
+ which case the indicated version is downloaded and used. If `@version` is
25
+ left out, the latest version will be used. If `package` is left out,
26
+ the assembly name of `.jsii` in the current directory will be used.
27
+
28
+ To compare current package against latest published NPM release:
29
+
30
+ jsii-diff npm:
31
+
32
+ ## Details
33
+
34
+ __jsii-diff__ will assert that code written against version **A** of a library
35
+ will still typecheck when compiled against version **B** of that library. It
36
+ does this by verifying the following properties:
37
+
38
+ - Any type (class/interface/enum) in **A** must also exist in **B**.
39
+ - Enums have only added members.
40
+ - Classes and interfaces have only added members, or modified existing
41
+ members in an allowed way.
42
+ - Property types are the same or have been strengthened (see below).
43
+ - Methods have only added optional arguments, existing argument types have
44
+ only been weakened, and the return type has only been strengthened (see below).
45
+
46
+ ### Strengthening and weakening
47
+
48
+ - *Strengthening* a type refers to *excluding* more possible values. Changing
49
+ a field from `optional` to `required`, or changing a type from `any` to
50
+ `string` are examples of strengthening.
51
+
52
+ - As the opposite of strengthening, *weakening* refers to *allowing* more
53
+ possible values. Changing a field from `required` to `optional`, or
54
+ changing a type to a superclass or interface are examples of weakening.
55
+
56
+ An API can change in the following way without breaking its consumer:
57
+
58
+ - It can *weaken* its input (require *less* from the caller); and
59
+ - It can *strengthen* its output (guarantee *more* to the caller).
60
+
61
+ ### Struct types
62
+
63
+ Structs (interfaces consisting completely of `readonly` properties) are
64
+ treated as bags of data. Their API compatibility will be evaluated depending
65
+ on whether they appear in input or output position of operations.
66
+
67
+ - Structs are *weakened* if all types of all of its properties are weakened.
68
+ Normally removing properties would also be considered weakening, but
69
+ because that may cause references to the fields in existing code bases to
70
+ become undefined (which is not allowed in most programming languages) we
71
+ disallow removing properties.
72
+ - Structs are *strengthened* if all types of all of its properties are
73
+ strengthened, or if fields are added.
74
+
75
+ __jsii-diff__ will check the evolution of structs against their position
76
+ in an operation, similar to other types. Input structs may be weakened,
77
+ and output structs may be strengthened.
78
+
79
+ ### Reference types
80
+
81
+ Classes and non-struct interface types are considered "reference types". By
82
+ default we treat them as being the result of a function call:
83
+
84
+ * Class instances are the return values calling their constructors.
85
+ * Interfaces are only ever implemented by objects returned from the framework,
86
+ or returned by factory functions.
87
+
88
+ This means their evolution falls under the rules of "strengthening": they
89
+ may only add fields, never take any away or make them optional.
90
+
91
+ #### `@subclassable`
92
+
93
+ Some classes or interfaces may be intended to be implemented by consumers.
94
+ Those should be marked with the docstring tag `@subclassable`.
95
+
96
+ This will effectively cause changes against those types to be checked against
97
+ the rules for weakening as well (i.e., no new (abstract) fields or members
98
+ added). This is necessary because otherwise any existing implementor of that
99
+ interface would be broken, since they wouldn't be implementing the new
100
+ abstract members yet.
101
+
102
+ `@subclassable` is not the default since most interfaces are not intended
103
+ for subclassing, but treating them as such would limit the evolvability of
104
+ libraries too much.
105
+
106
+ ## License
107
+
108
+ __jsii-diff__ is distributed under the
109
+ [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
110
+
111
+ See [LICENSE](./LICENSE) and [NOTICE](./NOTICE) for more information.
package/bin/jsii-diff ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('./jsii-diff.js');
@@ -0,0 +1 @@
1
+ import '@jsii/check-node/run';
@@ -0,0 +1,230 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@jsii/check-node/run");
4
+ const spec = require("@jsii/spec");
5
+ const fs = require("fs-extra");
6
+ const reflect = require("jsii-reflect");
7
+ const log4js = require("log4js");
8
+ const yargs = require("yargs");
9
+ const lib_1 = require("../lib");
10
+ const diagnostics_1 = require("../lib/diagnostics");
11
+ const util_1 = require("../lib/util");
12
+ const version_1 = require("../lib/version");
13
+ const LOG = log4js.getLogger('jsii-diff');
14
+ async function main() {
15
+ const argv = yargs
16
+ .env('JSII_DIFF')
17
+ .option('verbose', {
18
+ alias: 'v',
19
+ type: 'count',
20
+ desc: 'Increase the verbosity of output',
21
+ global: true,
22
+ })
23
+ .option('default-stability', {
24
+ alias: 's',
25
+ type: 'string',
26
+ choices: ['experimental', 'stable'],
27
+ desc: 'Treat unmarked APIs as',
28
+ default: 'stable',
29
+ })
30
+ .option('experimental-errors', {
31
+ alias: 'e',
32
+ type: 'boolean',
33
+ default: false,
34
+ desc: 'Error on experimental API changes',
35
+ })
36
+ .option('ignore-file', {
37
+ alias: 'i',
38
+ type: 'string',
39
+ desc: 'Ignore API changes with keys from file (file may be missing)',
40
+ })
41
+ .option('keys', {
42
+ alias: 'k',
43
+ type: 'boolean',
44
+ default: false,
45
+ desc: 'Show diagnostic suppression keys',
46
+ })
47
+ .option('validate', {
48
+ alias: 'd',
49
+ type: 'boolean',
50
+ default: false,
51
+ desc: 'Validate the assemblies that are being loaded',
52
+ })
53
+ .usage('$0 <original> [updated]', 'Compare two JSII assemblies.', (args) => args
54
+ .positional('original', {
55
+ description: 'Original assembly (file, package or "npm:package@version")',
56
+ type: 'string',
57
+ })
58
+ .positional('updated', {
59
+ description: 'New assembly (file, package or "npm:package@version")',
60
+ type: 'string',
61
+ default: '.',
62
+ }))
63
+ .help()
64
+ .version(version_1.VERSION).argv;
65
+ configureLog4js(argv.verbose);
66
+ LOG.debug(`Loading original assembly from ${argv.original}`);
67
+ const loadOriginal = await loadAssembly(argv.original, argv);
68
+ if (!loadOriginal.success) {
69
+ process.stderr.write(`Could not load '${loadOriginal.resolved}': ${util_1.showDownloadFailure(loadOriginal.reason)}. Skipping analysis\n`);
70
+ return 0;
71
+ }
72
+ LOG.debug(`Loading updated assembly from ${argv.updated}`);
73
+ const loadUpdated = await loadAssembly(argv.updated, argv);
74
+ if (!loadUpdated.success) {
75
+ process.stderr.write(`Could not load '${loadUpdated.resolved}': ${util_1.showDownloadFailure(loadUpdated.reason)}. Skipping analysis\n`);
76
+ return 0;
77
+ }
78
+ const original = loadOriginal.assembly;
79
+ const updated = loadUpdated.assembly;
80
+ if (original.name !== updated.name) {
81
+ process.stderr.write(`Look like different assemblies: '${original.name}' vs '${updated.name}'. Comparing is probably pointless...\n`);
82
+ }
83
+ LOG.info('Starting analysis');
84
+ const mismatches = lib_1.compareAssemblies(original, updated, {
85
+ defaultExperimental: argv['default-stability'] === 'experimental',
86
+ });
87
+ LOG.info(`Found ${mismatches.count} issues`);
88
+ if (mismatches.count > 0) {
89
+ const diags = diagnostics_1.classifyDiagnostics(mismatches, argv['experimental-errors'], await loadFilter(argv['ignore-file']));
90
+ process.stderr.write(`Original assembly: ${original.name}@${original.version}\n`);
91
+ process.stderr.write(`Updated assembly: ${updated.name}@${updated.version}\n`);
92
+ process.stderr.write('API elements with incompatible changes:\n');
93
+ for (const diag of diags) {
94
+ process.stderr.write(`${diagnostics_1.formatDiagnostic(diag, argv.keys)}\n`);
95
+ }
96
+ return diagnostics_1.hasErrors(diags) ? 1 : 0;
97
+ }
98
+ return 0;
99
+ }
100
+ // Allow both npm:<package> (legacy) and npm://<package> (looks better)
101
+ const NPM_REGEX = /^npm:(\/\/)?/;
102
+ /**
103
+ * Load the indicated assembly from the given name
104
+ *
105
+ * Supports downloading from NPM as well as from file or directory.
106
+ */
107
+ async function loadAssembly(requested, options) {
108
+ let resolved = requested;
109
+ try {
110
+ if (NPM_REGEX.exec(requested)) {
111
+ let pkg = requested.replace(NPM_REGEX, '');
112
+ if (!pkg) {
113
+ pkg = await loadPackageNameFromAssembly(options);
114
+ }
115
+ resolved = `npm://${pkg}`;
116
+ if (!pkg.includes('@', 1)) {
117
+ resolved += '@latest';
118
+ }
119
+ const download = await util_1.downloadNpmPackage(pkg, (f) => loadFromFilesystem(f, options));
120
+ if (download.success) {
121
+ return {
122
+ requested,
123
+ resolved,
124
+ success: true,
125
+ assembly: download.result,
126
+ };
127
+ }
128
+ return { requested, resolved, success: false, reason: download.reason };
129
+ }
130
+ // We don't accept failure loading from the filesystem
131
+ return {
132
+ requested,
133
+ resolved,
134
+ success: true,
135
+ assembly: await loadFromFilesystem(requested, options),
136
+ };
137
+ }
138
+ catch (e) {
139
+ // Prepend information about which assembly we've failed to load
140
+ //
141
+ // Look at the type of error. If it has a lot of lines (like validation errors
142
+ // tend to do) log everything to the debug log and only show a couple
143
+ const maxLines = 3;
144
+ const messageWithContext = `Error loading assembly '${resolved}': ${e.message}`;
145
+ const errorLines = messageWithContext.split('\n');
146
+ if (errorLines.length < maxLines) {
147
+ throw new Error(messageWithContext);
148
+ }
149
+ for (const line of errorLines) {
150
+ LOG.info(line);
151
+ }
152
+ throw new Error([...errorLines.slice(0, maxLines), '...'].join('\n'));
153
+ }
154
+ }
155
+ async function loadPackageNameFromAssembly(options) {
156
+ const JSII_ASSEMBLY_FILE = '.jsii';
157
+ if (!(await fs.pathExists(JSII_ASSEMBLY_FILE))) {
158
+ throw new Error(`No NPM package name given and no ${JSII_ASSEMBLY_FILE} file in the current directory. Please specify a package name.`);
159
+ }
160
+ const contents = await fs.readJSON(JSII_ASSEMBLY_FILE, { encoding: 'utf-8' });
161
+ const module = options.validate
162
+ ? spec.validateAssembly(contents)
163
+ : contents;
164
+ if (!module.name) {
165
+ throw new Error(`Could not find package in ${JSII_ASSEMBLY_FILE}`);
166
+ }
167
+ return module.name;
168
+ }
169
+ async function loadFromFilesystem(name, options) {
170
+ const stat = await fs.stat(name);
171
+ const ts = new reflect.TypeSystem();
172
+ if (stat.isDirectory()) {
173
+ return ts.loadModule(name, options);
174
+ }
175
+ return ts.loadFile(name, options);
176
+ }
177
+ main()
178
+ .then((n) => {
179
+ process.exit(n);
180
+ })
181
+ .catch((e) => {
182
+ console.error(e);
183
+ process.exit(100);
184
+ });
185
+ function configureLog4js(verbosity) {
186
+ log4js.configure({
187
+ appenders: {
188
+ console: {
189
+ type: 'stderr',
190
+ layout: { type: 'colored' },
191
+ },
192
+ },
193
+ categories: {
194
+ default: { appenders: ['console'], level: _logLevel() },
195
+ },
196
+ });
197
+ function _logLevel() {
198
+ switch (verbosity) {
199
+ case 0:
200
+ return 'WARN';
201
+ case 1:
202
+ return 'INFO';
203
+ case 2:
204
+ return 'DEBUG';
205
+ case 3:
206
+ return 'TRACE';
207
+ default:
208
+ return 'ALL';
209
+ }
210
+ }
211
+ }
212
+ async function loadFilter(filterFilename) {
213
+ if (!filterFilename) {
214
+ return new Set();
215
+ }
216
+ try {
217
+ return new Set((await fs.readFile(filterFilename, { encoding: 'utf-8' }))
218
+ .split('\n')
219
+ .map((x) => x.trim())
220
+ .filter((x) => !x.startsWith('#')));
221
+ }
222
+ catch (e) {
223
+ if (e.code !== 'ENOENT') {
224
+ throw e;
225
+ }
226
+ LOG.debug(`No such file: ${filterFilename}`);
227
+ return new Set();
228
+ }
229
+ }
230
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNpaS1kaWZmLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsianNpaS1kaWZmLnRzIl0sIm5hbWVzIjpbXSwibWF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G4gICAgICBjYXNlIDA6XG4gICAgICAgIHJldHVybiAnV0FSTic7XG4gICAgICBjYXNlIDE6XG4gICAgICAgIHJldHVybiAnSU5GTyc7XG4gICAgICBjYXNlIDI6XG4gICAgICAgIHJldHVybiAnREVCVUcnO1xuICAgICAgY2FzZSAzOlxuICAgICAgICByZXR1cm4gJ1RSQUNFJztcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHJldHVybiAnQUxMJztcbiAgICB9XG4gIH1cbn1cblxuYXN5bmMgZnVuY3Rpb24gbG9hZEZpbHRlcihmaWx0ZXJGaWxlbmFtZT86IHN0cmluZyk6IFByb21pc2U8U2V0PHN0cmluZz4+IHtcbiAgaWYgKCFmaWx0ZXJGaWxlbmFtZSkge1xuICAgIHJldHVybiBuZXcgU2V0KCk7XG4gIH1cblxuICB0cnkge1xuICAgIHJldHVybiBuZXcgU2V0KFxuICAgICAgKGF3YWl0IGZzLnJlYWRGaWxlKGZpbHRlckZpbGVuYW1lLCB7IGVuY29kaW5nOiAndXRmLTgnIH0pKVxuICAgICAgICAuc3BsaXQoJ1xcbicpXG4gICAgICAgIC5tYXAoKHgpID0+IHgudHJpbSgpKVxuICAgICAgICAuZmlsdGVyKCh4KSA9PiAheC5zdGFydHNXaXRoKCcjJykpLFxuICAgICk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBpZiAoZS5jb2RlICE9PSAnRU5PRU5UJykge1xuICAgICAgdGhyb3cgZTtcbiAgICB9XG4gICAgTE9HLmRlYnVnKGBObyBzdWNoIGZpbGU6ICR7ZmlsdGVyRmlsZW5hbWV9YCk7XG4gICAgcmV0dXJuIG5ldyBTZXQoKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,17 @@
1
+ import { Mismatches } from './types';
2
+ export declare enum DiagLevel {
3
+ Error = 0,
4
+ Warning = 1,
5
+ Skipped = 2
6
+ }
7
+ export interface Diagnostic {
8
+ level: DiagLevel;
9
+ message: string;
10
+ suppressionKey: string;
11
+ }
12
+ export declare function formatDiagnostic(diag: Diagnostic, includeSuppressionKey?: boolean): string;
13
+ export declare function hasErrors(diags: Diagnostic[]): boolean;
14
+ /**
15
+ * Classify API mismatches into a set of warnings and errors
16
+ */
17
+ export declare function classifyDiagnostics(mismatches: Mismatches, experimentalErrors: boolean, skipFilter: Set<string>): Diagnostic[];