jsii 5.9.9 → 5.9.11-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/SUPPORT.md CHANGED
@@ -1,10 +1,10 @@
1
- ## Maintenance & Support Policy
1
+ # Maintenance & Support Policy
2
2
 
3
3
  This document describes the Maintenance & Support Policy applicable to releases
4
4
  of the `jsii` compiler ([`npm:jsii`](https://npmjs.com/packages/jsii)) with
5
5
  versions `5.0.x` and newer.
6
6
 
7
- ### Versioning Scheme
7
+ ## Versioning Scheme
8
8
 
9
9
  In-scope `jsii` release lines use the same `major.minor` version as the
10
10
  TypeScript compiler ([`npm:typescript`](https://npmjs.com/packages/typescript))
@@ -12,7 +12,7 @@ they are built with. This means that `jsii@5.0.x` is built on top of
12
12
  `typescript@5.0.x`.
13
13
 
14
14
  Since the `typescript` package does not follow [Semantic Versioning][semver],
15
- the `jsii` package does not eiher. The `typescript` compiler guarantees no
15
+ the `jsii` package does not either. The `typescript` compiler guarantees no
16
16
  breaking change is introduced within a given `major.minor` release line, and
17
17
  `jsii` upholds the same guarantee. As a consequence, users are advised to use
18
18
  `~` ranges (also referred to as minor-pinned ranges) when declaring dependencies
@@ -24,7 +24,7 @@ is issued).
24
24
 
25
25
  [semver]: https://semver.org
26
26
 
27
- ### Release Lines Lifecycle Stages
27
+ ## Release Lines Lifecycle Stages
28
28
 
29
29
  This Maintenance & Support Policy assigns one of the following lifecycle stages
30
30
  to each in-scope `jsii` release line in existence:
@@ -33,7 +33,7 @@ to each in-scope `jsii` release line in existence:
33
33
  the release under active development, receiving new features, bug fixes and
34
34
  security updates.
35
35
 
36
- 1. **Maintenace**: Release lines in **Maintenance** stage are no longer
36
+ 1. **Maintenance**: Release lines in **Maintenance** stage are no longer
37
37
  considered in active development, and no new features will be added to these.
38
38
  They however continue to receive bug fixes and security updates. Users can
39
39
  continue to use release lines in **Maintenance** stage indefinitely, but we
@@ -47,7 +47,7 @@ to each in-scope `jsii` release line in existence:
47
47
  changes in newer releases at any time. Users are advised to migrate away from
48
48
  **End-of-Support** release lines at the earliest convenience.
49
49
 
50
- ### Stage Transitions
50
+ ## Stage Transitions
51
51
 
52
52
  ```mermaid
53
53
  ---
@@ -66,7 +66,7 @@ stateDiagram-v2
66
66
 
67
67
  Whenever a new release line is started (typically with a new `x.y.0` release,
68
68
  excluding pre-releases), it becomes **Current** and the release line it replaced
69
- immediately enters the **Maintenace** stage.
69
+ immediately enters the **Maintenance** stage.
70
70
 
71
71
  Releases stay in the **Maintenance** stage for a minimum of 6 months before they
72
72
  reach **End-of-Support**.
@@ -74,7 +74,7 @@ reach **End-of-Support**.
74
74
  Once a release line has reached **End-of-Support**, it remains in this stage
75
75
  indefinitely.
76
76
 
77
- ### Timelines & Communication
77
+ ## Timelines & Communication
78
78
 
79
79
  The `typescript` compiler maintainers start a new release line on a quarterly
80
80
  basis, and users should expect the `jsii` compiler maintainers to do the same.
@@ -99,7 +99,7 @@ manifest document.
99
99
  The current status of `jsii` compiler release lines is also documented on the
100
100
  [repository's `README.md` document][readme].
101
101
 
102
- ### Modification
102
+ ## Modification
103
103
 
104
104
  The maintainers of the jsii project reserve the right to modify this Maintenance
105
105
  and Support Policy as necessary. Updates will be proposed by way of a pull
@@ -108,13 +108,13 @@ timeline of release lines will be broadly announced to the community via
108
108
  established communication channels (such as the `cdk.dev` Slack), and will
109
109
  remain open for the community to comment on for a minimum of 15 days.
110
110
 
111
- Community members are welcome to propose changes to the support and maintenace
111
+ Community members are welcome to propose changes to the support and maintenance
112
112
  policy through the same process.
113
113
 
114
- ### Derogation
114
+ ## Derogation
115
115
 
116
116
  Under _exceptional_ circumstances, the project maintainers may elect to derogate
117
- from this Support & Maintenance Policy. In cases where the decisision to
117
+ from this Support & Maintenance Policy. In cases where the decision to
118
118
  derogate extends supplemental maintenance & support coverage for a release line,
119
119
  the increased coverage will be documented in the
120
120
  [repository's `README.md` document][readme].
package/lib/assembler.js CHANGED
@@ -183,7 +183,7 @@ class Assembler {
183
183
  jsiiVersion,
184
184
  bin: this.projectInfo.bin,
185
185
  fingerprint: '<TBD>',
186
- usedFeatures: this.usedFeatures.size > 0 ? Array.from(this.usedFeatures) : undefined,
186
+ usedFeatures: _assemblyFeatures(this.usedFeatures), // might be appended later
187
187
  };
188
188
  if (this.deprecatedRemover) {
189
189
  this._diagnostics.push(...this.deprecatedRemover.removeFrom(assembly));
@@ -203,6 +203,13 @@ class Assembler {
203
203
  }
204
204
  const validator = new validator_1.Validator(this.projectInfo, assembly);
205
205
  const validationResult = validator.emit();
206
+ // Inject detected features
207
+ if (validationResult.usedFeatures) {
208
+ for (const item of validationResult.usedFeatures) {
209
+ this.usedFeatures.add(item);
210
+ }
211
+ assembly.usedFeatures = _assemblyFeatures(this.usedFeatures);
212
+ }
206
213
  if (!validationResult.emitSkipped) {
207
214
  const zipped = (0, spec_1.writeAssembly)(this.projectInfo.projectRoot, _fingerprint(assembly), {
208
215
  compress: this.compressAssembly ?? false,
@@ -218,6 +225,9 @@ class Assembler {
218
225
  finally {
219
226
  this._afterEmit();
220
227
  }
228
+ function _assemblyFeatures(usedFeatures) {
229
+ return usedFeatures.size > 0 ? Array.from(usedFeatures).sort() : undefined;
230
+ }
221
231
  function _loadReadme() {
222
232
  // Search for `README.md` in a case-insensitive way
223
233
  const fileName = fs