jsii 5.9.44 → 6.0.0-dev.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/README.md +73 -289
- package/lib/assembler.js +95 -46
- package/lib/assembler.js.map +1 -1
- package/lib/case.js +13 -10
- package/lib/case.js.map +1 -1
- package/lib/common/find-utils.js +35 -2
- package/lib/common/find-utils.js.map +1 -1
- package/lib/common/symbol-id.js +39 -7
- package/lib/common/symbol-id.js.map +1 -1
- package/lib/compiler.js +51 -8
- package/lib/compiler.js.map +1 -1
- package/lib/directives.js +48 -16
- package/lib/directives.js.map +1 -1
- package/lib/docs.js +36 -4
- package/lib/docs.js.map +1 -1
- package/lib/helpers.js +38 -4
- package/lib/helpers.js.map +1 -1
- package/lib/jsii-diagnostic.js +524 -497
- package/lib/jsii-diagnostic.js.map +1 -1
- package/lib/literate.js +35 -2
- package/lib/literate.js.map +1 -1
- package/lib/main.js +40 -7
- package/lib/main.js.map +1 -1
- package/lib/project-info.d.ts +1 -1
- package/lib/project-info.js +41 -11
- package/lib/project-info.js.map +1 -1
- package/lib/support.js +7 -4
- package/lib/support.js.map +1 -1
- package/lib/transforms/deprecated-remover.js +65 -23
- package/lib/transforms/deprecated-remover.js.map +1 -1
- package/lib/transforms/deprecation-warnings.js +50 -10
- package/lib/transforms/deprecation-warnings.js.map +1 -1
- package/lib/transforms/runtime-info.js +36 -2
- package/lib/transforms/runtime-info.js.map +1 -1
- package/lib/tsconfig/compiler-options.js +40 -5
- package/lib/tsconfig/compiler-options.js.map +1 -1
- package/lib/tsconfig/rulesets/configurable-options.js +10 -1
- package/lib/tsconfig/rulesets/configurable-options.js.map +1 -1
- package/lib/tsconfig/rulesets/deprecated-options.js +16 -1
- package/lib/tsconfig/rulesets/deprecated-options.js.map +1 -1
- package/lib/tsconfig/rulesets/generated.public.js +7 -2
- package/lib/tsconfig/rulesets/generated.public.js.map +1 -1
- package/lib/tsconfig/rulesets/jsii-configured-options.js +0 -1
- package/lib/tsconfig/rulesets/jsii-configured-options.js.map +1 -1
- package/lib/tsconfig/rulesets/minimal.public.js +4 -1
- package/lib/tsconfig/rulesets/minimal.public.js.map +1 -1
- package/lib/tsconfig/rulesets/strict.public.js +12 -9
- package/lib/tsconfig/rulesets/strict.public.js.map +1 -1
- package/lib/tsconfig/tsconfig-validator.js +9 -3
- package/lib/tsconfig/tsconfig-validator.js.map +1 -1
- package/lib/tsconfig/validator.d.ts +5 -0
- package/lib/tsconfig/validator.js +26 -16
- package/lib/tsconfig/validator.js.map +1 -1
- package/lib/type-analysis.js +39 -3
- package/lib/type-analysis.js.map +1 -1
- package/lib/type-reference.js +34 -1
- package/lib/type-reference.js.map +1 -1
- package/lib/type-tracker.js +35 -4
- package/lib/type-tracker.js.map +1 -1
- package/lib/type-visitor.js +34 -1
- package/lib/type-visitor.js.map +1 -1
- package/lib/utils.js +37 -2
- package/lib/utils.js.map +1 -1
- package/lib/validator.js +49 -11
- package/lib/validator.js.map +1 -1
- package/lib/version.d.ts +3 -3
- package/lib/version.js +2 -2
- package/lib/version.js.map +1 -1
- package/lib/warnings.js +34 -1
- package/lib/warnings.js.map +1 -1
- package/package.json +7 -8
- package/releases.json +3 -2
package/lib/warnings.js
CHANGED
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.silencedWarnings = void 0;
|
|
4
37
|
exports.parseWarningCodes = parseWarningCodes;
|
|
5
38
|
exports.isSilenced = isSilenced;
|
|
6
|
-
const ts = require("typescript");
|
|
39
|
+
const ts = __importStar(require("typescript"));
|
|
7
40
|
const directives_1 = require("./directives");
|
|
8
41
|
const jsii_diagnostic_1 = require("./jsii-diagnostic");
|
|
9
42
|
/**
|
package/lib/warnings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warnings.js","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"warnings.js","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,8CAsBC;AAKD,gCAWC;AAxDD,+CAAiC;AAEjC,6CAA0C;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kBAAkB,CAAC,UAAU,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,kBAAkB,CAAC,UAA0B;IACpD,IAAI,UAAU,CAAC,IAAI,IAAI,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QACxD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,2EAA2E;IAC3E,4EAA4E;IAC5E,4EAA4E;IAC5E,6EAA6E;IAC7E,oCAAoC;IACpC,MAAM,kBAAkB,GAAiD,EAAU,CAAC,kBAAkB,CAAC;IACvG,IAAI,OAAO,GAAwB,kBAAkB,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACzF,OAAO,OAAO,EAAE,CAAC;QACf,MAAM,UAAU,GAAG,uBAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACpD,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,YAAY,EAAE,CAAC;YAC3C,IAAI,CAAC;gBACH,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC1D,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,wBAAwB;YAC1B,CAAC;QACH,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAC3B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import * as ts from 'typescript';\n\nimport { Directives } from './directives';\nimport { Code, JsiiDiagnostic } from './jsii-diagnostic';\n\n/**\n * Set of silenced warning codes (numeric JSII codes).\n */\nexport const silencedWarnings = new Set<number>();\n\n/**\n * Parse a user-provided warning identifier into numeric JSII codes.\n * Accepts: \"JSII5019\", \"5019\", or a diagnostic name / partial name.\n *\n * A name containing `/` must match a full diagnostic name exactly.\n * A name without `/` matches any diagnostic whose category or specific\n * name equals the input (e.g. \"reserved-word\" or \"language-compatibility\").\n */\nexport function parseWarningCodes(input: string): number[] {\n // JSII<number> format\n const jsiiMatch = /^JSII(\\d+)$/i.exec(input);\n if (jsiiMatch) {\n return [parseInt(jsiiMatch[1], 10)];\n }\n\n // Plain number\n const num = parseInt(input, 10);\n if (String(num) === input) {\n return [num];\n }\n\n // Name-based lookup\n const matches = Code.lookupByPartialName(input);\n if (matches.length > 0) {\n return matches.map((c) => c.code);\n }\n\n throw new Error(\n `Unknown warning \"${input}\". Expected a JSII code (e.g. JSII5018), a number (e.g. 5018), or a diagnostic name (e.g. reserved-word, language-compatibility/reserved-word, language-compatibility).`,\n );\n}\n\n/**\n * Check if a diagnostic is a silenced warning (globally or inline).\n */\nexport function isSilenced(diagnostic: ts.Diagnostic): boolean {\n if (diagnostic.category !== ts.DiagnosticCategory.Warning) {\n return false;\n }\n if (!JsiiDiagnostic.isJsiiDiagnostic(diagnostic)) {\n return false;\n }\n if (silencedWarnings.has(diagnostic.jsiiCode)) {\n return true;\n }\n return isInlineSuppressed(diagnostic);\n}\n\n/**\n * Check if a diagnostic is suppressed inline via a `@jsii suppress` directive.\n *\n * Diagnostics reference a source position (typically the name identifier of a\n * declaration), but JSDoc tags are attached to the enclosing declaration node,\n * not the identifier. We therefore start at the token at the diagnostic\n * position and walk up the AST, checking each ancestor for `@jsii suppress`\n * directives. This means a directive on a class suppresses matching warnings\n * on all its members.\n */\nfunction isInlineSuppressed(diagnostic: JsiiDiagnostic): boolean {\n if (diagnostic.file == null || diagnostic.start == null) {\n return false;\n }\n\n // `getTokenAtPosition` is exported from the `typescript` module but is not\n // included in the public type declarations. It has been stable since TS 2.0\n // and is used extensively by the language service. We cast through `any` to\n // access it. Internally it descends through `node.getChildren()` to find the\n // deepest node at a given position.\n const getTokenAtPosition: (sf: ts.SourceFile, pos: number) => ts.Node = (ts as any).getTokenAtPosition;\n let current: ts.Node | undefined = getTokenAtPosition(diagnostic.file, diagnostic.start);\n while (current) {\n const directives = Directives.of(current, () => {});\n for (const code of directives.suppressions) {\n try {\n if (parseWarningCodes(code).includes(diagnostic.jsiiCode)) {\n return true;\n }\n } catch {\n // Unknown code — ignore\n }\n }\n current = current.parent;\n }\n return false;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"build": "projen build",
|
|
10
10
|
"clobber": "projen clobber",
|
|
11
11
|
"compile": "projen compile",
|
|
12
|
-
"contributors:update": "projen contributors:update",
|
|
13
12
|
"default": "projen default",
|
|
14
13
|
"eject": "projen eject",
|
|
15
14
|
"eslint": "projen eslint",
|
|
@@ -45,7 +44,6 @@
|
|
|
45
44
|
"@types/tar": "^6.1.13",
|
|
46
45
|
"@typescript-eslint/eslint-plugin": "^8",
|
|
47
46
|
"@typescript-eslint/parser": "^8",
|
|
48
|
-
"all-contributors-cli": "^6.26.1",
|
|
49
47
|
"clone": "^2.1.2",
|
|
50
48
|
"constructs": "^10.0.0",
|
|
51
49
|
"eslint": "^9",
|
|
@@ -63,13 +61,13 @@
|
|
|
63
61
|
"npm-check-updates": "^20",
|
|
64
62
|
"prettier": "^2.8.8",
|
|
65
63
|
"projen": "^0.99.70",
|
|
66
|
-
"tar": "^7.5.
|
|
64
|
+
"tar": "^7.5.16",
|
|
67
65
|
"ts-jest": "^29.4.11",
|
|
68
66
|
"ts-node": "^10.9.2"
|
|
69
67
|
},
|
|
70
68
|
"dependencies": {
|
|
71
|
-
"@jsii/check-node": "1.
|
|
72
|
-
"@jsii/spec": "1.
|
|
69
|
+
"@jsii/check-node": "1.133.0",
|
|
70
|
+
"@jsii/spec": "1.133.0",
|
|
73
71
|
"case": "^1.6.3",
|
|
74
72
|
"chalk": "^4",
|
|
75
73
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -78,7 +76,7 @@
|
|
|
78
76
|
"semver-intersect": "^1.5.0",
|
|
79
77
|
"sort-json": "^2.0.1",
|
|
80
78
|
"spdx-license-list": "^6.11.0",
|
|
81
|
-
"typescript": "~
|
|
79
|
+
"typescript": "~6.0",
|
|
82
80
|
"yargs": "^17.7.2"
|
|
83
81
|
},
|
|
84
82
|
"engines": {
|
|
@@ -97,7 +95,7 @@
|
|
|
97
95
|
"publishConfig": {
|
|
98
96
|
"access": "public"
|
|
99
97
|
},
|
|
100
|
-
"version": "
|
|
98
|
+
"version": "6.0.0-dev.0",
|
|
101
99
|
"packageManager": "yarn@4.13.0",
|
|
102
100
|
"types": "lib/index.d.ts",
|
|
103
101
|
"exports": {
|
|
@@ -106,5 +104,6 @@
|
|
|
106
104
|
"./package.json": "./package.json",
|
|
107
105
|
"./common": "./lib/common/index.js"
|
|
108
106
|
},
|
|
109
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"yarn projen\"."
|
|
107
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"yarn projen\".",
|
|
108
|
+
"stableVersion": "0.0.0"
|
|
110
109
|
}
|
package/releases.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"current": "
|
|
2
|
+
"current": "6.0",
|
|
3
3
|
"maintenance": {
|
|
4
4
|
"5.0": "2024-01-31T00:00:00.000Z",
|
|
5
5
|
"5.1": "2024-02-28T00:00:00.000Z",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"5.5": "2025-05-15T00:00:00.000Z",
|
|
10
10
|
"5.6": "2025-07-01T00:00:00.000Z",
|
|
11
11
|
"5.7": "2025-09-15T00:00:00.000Z",
|
|
12
|
-
"5.8": "2026-02-15T00:00:00.000Z"
|
|
12
|
+
"5.8": "2026-02-15T00:00:00.000Z",
|
|
13
|
+
"5.9": "2027-01-01T00:00:00.000Z"
|
|
13
14
|
},
|
|
14
15
|
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"yarn projen\"."
|
|
15
16
|
}
|