Skip to content

Commit 8f757e4

Browse files
authored
chore(release): 1.99.0 (#4528)
See [CHANGELOG](https://github.com/aws/jsii/blob/bump/1.99.0/CHANGELOG.md)
2 parents 00b106d + 63f24d7 commit 8f757e4

File tree

51 files changed

+2100
-1631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2100
-1631
lines changed

.github/workflows/docker-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
debian:
2525
- 'bullseye' # 11
2626
- 'bookworm' # 12
27-
node: ['18', '20', '22']
27+
node: ['18', '20', '22'] # STOP! Before adding anything here, check our maintenance policy in the README
2828
exclude:
2929
# We publish bullseye only with Node >= 20
3030
- debian: 'bullseye'

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.99.0](https://github.com/aws/jsii/compare/v1.98.0...v1.99.0) (2024-06-03)
6+
7+
8+
### Bug Fixes
9+
10+
* **jsii-config:** update jsii-config and docs with latest settings ([#4515](https://github.com/aws/jsii/issues/4515)) ([6e00874](https://github.com/aws/jsii/commit/6e00874c9a70890b9291a4fa534eb497e7a186f9))
11+
512
## [1.98.0](https://github.com/aws/jsii/compare/v1.97.0...v1.98.0) (2024-04-30)
613

714

gh-pages/content/specification/2-type-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Typescript allows grouping declarations together in _namespaces_, which are inte
325325
_Submodules_ names are the fully qualified name of the namespace from the package's root (if a package `foo` defines a
326326
namespace `ns1`, which itself contains `ns2`, the submodule for `ns2` will be named `foo.ns1.ns2`).
327327

328-
_Submodules_ are delcared in the _jsii_ assembly under the `submodules` key. This is also where specific
328+
_Submodules_ are declared in the _jsii_ assembly under the `submodules` key. This is also where specific
329329
[configuration](#submodule-configuration) is registered, if different from the parent submodule or package.
330330

331331
_Submodules_ are hierarchical, and their fully qualified name is representative of the relationship. For example the

gh-pages/content/specification/3-kernel-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Sometimes, the _host_ app will extend a _jsii_ class and implement new _jsii_ in
246246
original type. Such interfaces must be declared by providing their _jsii_ fully qualified name as an entry in the
247247
`interfaces` list.
248248

249-
Providing interfaces in this list that are implicitly present from another delcaration (either because they are already
249+
Providing interfaces in this list that are implicitly present from another declaration (either because they are already
250250
implemented by the class denoted by the `fqn` field, or because another entry in the `interfaces` list extends it) is
251251
valid, but not necessary. The `@jsii/kernel` is responsible for correctly handling redundant declarations.
252252

gh-pages/content/user-guides/lib-author/configuration/index.md

Lines changed: 96 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ optional in the standard [package.json schema] are required by `jsii`.
1717
For example, Maven Central requires packages to carry [sufficient metadata], such as _developer information_ and
1818
_license_, in order to be valid for publishing.
1919

20-
| Field | Required | Extensions |
21-
| ------------ |:-------------------------------:| -------------------------------- |
20+
| Field | Required | Extensions |
21+
| ------------ | :-----------------------------: | -------------------------------- |
2222
| `author` | :octicons-check-circle-fill-24: | `author.organization` |
2323
| `license` | :octicons-check-circle-fill-24: | |
2424
| `main` | :octicons-check-circle-fill-24: | |
@@ -135,32 +135,20 @@ package maintainer, the generic interpretation for those on packages is:
135135
In order to configure the behavior of `jsii`, the `package.json` file must include a `jsii` section that can contain the
136136
following entries:
137137

138-
| Field | Type | Required | Default |
139-
| ------------------- | ----------------------- |:-------------------------------:| ------------------------------------ |
140-
| `excludeTypescript` | `#!ts string[]` | | _none_ |
141-
| `metadata` | `#!ts object` | | _none_ |
142-
| `projectReferences` | `#!ts boolean` | | `#!ts true` |
143-
| `targets` | `#!ts object` | :octicons-check-circle-fill-24: | |
144-
| `tsc` | `#!ts object` | | `#!ts { outDir: '.', rootDir: '.' }` |
145-
| `versionFormat` | `#!ts 'short' | 'full'` | | `#!ts 'full'` |
138+
| Field | Type | Required | Default | Supported versions |
139+
| ------------------- | ------------------------------------------------- | :-----------------------------: | ------------------------------------ | ------------------ |
140+
| `excludeTypescript` | `#!ts string[]` | | _none_ | _all_ |
141+
| `metadata` | `#!ts object` | | _none_ | _all_ |
142+
| `projectReferences` | `#!ts boolean` | | `#!ts true` | _all_ |
143+
| `targets` | `#!ts object` | :octicons-check-circle-fill-24: | | _all_ |
144+
| `tsc` | `#!ts object` | | `#!ts { outDir: '.', rootDir: '.' }` | _all_ |
145+
| `tsconfig` | `#!ts string` | | _none_ | `>= 5.2` |
146+
| `validateTsconfig` | `#!ts 'strict' | 'generated' | 'minimal' | 'off'` | | _none_ | `>= 5.2` |
147+
| `versionFormat` | `#!ts 'short' | 'full'` | | `#!ts 'full'` | _all_ |
146148

147-
### `excludeTypescript`
149+
### Language targets
148150

149-
By default, `jsii` will include _all_ `*.ts` files (except `.d.ts` files) in the `TypeScript` compiler input. This can
150-
be problematic for example when the package's build or test procedure generates `.ts` files that cannot be compiled with
151-
`jsii`'s compiler settings.
152-
153-
The `excludeTypescript` configuration accepts a list of glob patterns. Files matching any of those patterns will be
154-
excluded from the `TypeScript` compiler input.
155-
156-
### `metadata`
157-
158-
The `metadata` section can be used to record additional metadata as key-value pairs that will be recorded as-is into the
159-
`.jsii` assembly file. That metadata can later be inspected using [`jsii-reflect`][jsii-reflect] utilities, for example.
160-
161-
[jsii-reflect]: https://github.com/aws/jsii/tree/main/packages/jsii-reflect
162-
163-
### `targets`
151+
#### `targets`
164152

165153
The `targets` section is where `jsii` packages define which target languages they support. This provides the package
166154
generators with the additional information they require in order to name generated artifacts. Configuration is provided
@@ -173,7 +161,31 @@ The specific configuration accepted for each supported language is presented in
173161
- [:octicons-book-24: Java Target](targets/java.md)
174162
- [:octicons-book-24: Python Target](targets/python.md)
175163

176-
### `tsc`
164+
### Typescript configuration
165+
166+
By default, `jsii` generates a `tsconfig.json` for you, using best practice settings that are optimized for
167+
widespread support and backwards compatibility. Use the `excludeTypescript` and `tsc` settings to configure
168+
some supported typescript compiler options.
169+
170+
You may want to customize the typescript configuration even further. In this case, use the `tsconfig` setting
171+
to instruct the jsii compiler to use user-owned typescript configuration file. Such a user-provider tsconfig must
172+
follow certain rules to be a valid config for use with jsii. These rules are enforced via the `validateTsconfig`
173+
setting. You may choose the level of validation to match your use case.
174+
175+
!!! info
176+
Using a user-provider tsconfig and configuration via `excludeTypescript` and `tsc` are mutually exclusive.
177+
Specifically when using a user-provided tsconfig, any other configuration settings will be ignored.
178+
179+
#### `excludeTypescript`
180+
181+
By default, `jsii` will include _all_ `*.ts` files (except `.d.ts` files) in the `TypeScript` compiler input. This can
182+
be problematic for example when the package's build or test procedure generates `.ts` files that cannot be compiled with
183+
`jsii`'s compiler settings.
184+
185+
The `excludeTypescript` configuration accepts a list of glob patterns. Files matching any of those patterns will be
186+
excluded from the `TypeScript` compiler input.
187+
188+
#### `tsc`
177189

178190
In order to the generated `javascript` can be properly loaded by the `jsii` runtimes, `jsii` generates a
179191
[`tsconfig.json`] file with fixed settings at the beginning of the compilation pass. Certain configuration options can
@@ -188,11 +200,11 @@ are set in the `jsii.tsc` section of the `package.json` file, but use the same n
188200
- `forceConsistentCasingInFileNames` - if `true`, will make the `TypeScript` compiler care about the casing of files
189201
specified in `import` statements. This is helpful if you're developing on a filesystem that is case-insensitive
190202
(Mac/Win), but building/deploying on a filesystem that is case-sensitive (Linux).
191-
- `declarationMap`, `inlineSourceMap`, `inlineSources`, and `sourceMap` allow confifuring the source map generation.
203+
- `declarationMap`, `inlineSourceMap`, `inlineSources`, and `sourceMap` allow configuring the source map generation.
192204
This option can be useful to finely control your local development experience (for example, by enabling
193205
`declarationMap`), or to optimize the emitted code size (by disabling source maps entirely).
194-
+ if any of these options is specified, the source map configuration will exactly match what is being provided here
195-
+ If none are specified, the default settings will be used: `#!ts { inlineSourceMap: true, inlineSources: true }`
206+
- if any of these options is specified, the source map configuration will exactly match what is being provided here
207+
- If none are specified, the default settings will be used: `#!ts { inlineSourceMap: true, inlineSources: true }`
196208
- `types` allows limiting which visible type libraries get loaded in the global scope by the typescript compiler. By
197209
default, all visible `@types/*` packages will be loaded, which can be undesirable (in particular in monorepos, where
198210
some type libraries are not compatible with the TypeScript compiler version that `jsii` uses). The value specified
@@ -204,7 +216,59 @@ Refer to the [TypeScript compiler options reference][ts-options] for more inform
204216
[`tsconfig.json`]: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
205217
[ts-options]: https://www.typescriptlang.org/docs/handbook/compiler-options.html
206218

207-
### `versionFormat`
219+
#### `tsconfig`
220+
221+
_Available from jsii >= 5.2_
222+
223+
!!! warn
224+
:test_tube: This features is experimental. Behavior may change as bugs are addressed, and requirements are clarified
225+
through early adopters. Use at your own risk, and please any [report bugs].
226+
227+
Provide this setting, to use a user-provided typescript configuration with `jsii`. Set to the name of the tsconfig
228+
file that should be used. Usually this will be `"tsconfig.json"`, but can be set to any filename.
229+
The provided tsconfig is subject to validation rules, see below for more details.
230+
231+
```json
232+
{
233+
"jsii": {
234+
"tsconfig": "tsconfig.json"
235+
}
236+
}
237+
```
238+
239+
#### `validateTsconfig`
240+
241+
_Available from jsii >= 5.2_
242+
243+
!!! warn
244+
:test_tube: This features is experimental. Behavior may change as bugs are addressed, and requirements are clarified
245+
through early adopters. Use at your own risk, and please any [report bugs].
246+
247+
A user-provider typescript config must follow certain rules to be a valid config for use with jsii.
248+
By default the tsconfig is validated against the `strict` rule set.
249+
If needed, you can change the level of enforcement with the `validateTsconfig` setting.
250+
251+
--8<-- "partials/tsconfig-rulesets.md"
252+
253+
```json
254+
{
255+
"jsii": {
256+
"tsconfig": "tsconfig.json",
257+
"validateTsconfig": "generated" // ensure user tsconfig is similar to jsii-generated tsconfig
258+
}
259+
}
260+
```
261+
262+
### Metadata
263+
264+
#### `metadata`
265+
266+
The `metadata` section can be used to record additional metadata as key-value pairs that will be recorded as-is into the
267+
`.jsii` assembly file. That metadata can later be inspected using [`jsii-reflect`][jsii-reflect] utilities, for example.
268+
269+
[jsii-reflect]: https://github.com/aws/jsii/tree/main/packages/jsii-reflect
270+
271+
#### `versionFormat`
208272

209273
Determines the format of the `jsii` toolchain version string that will be included in the `.jsii` assembly file's
210274
`jsiiVersion` attribute.
@@ -270,3 +334,4 @@ modules, **must** also be referenced in the [`bundledDependencies`][npm-bundled]
270334
within the NPM package.
271335

272336
[npm-bundled]: https://docs.npmjs.com/files/package.json#bundleddependencies
337+
[report bugs]: https://github.com/aws/jsii/issues/new/choose

gh-pages/content/user-guides/lib-author/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ must be available. Current `node` runtime versions support status is as follows:
1414
When developing _jsii modules_, the SDK for each desired target language must be available for `jsii-pacmak` to be able
1515
to produce releasable artifacts.
1616

17-
| Language/Platform | SDK Requirement |
18-
| ----------------- | ---------------------------- |
19-
| .NET | .NET ≥ 6.0 |
20-
| Go | Go ≥ 1.18 |
21-
| Java | JDK ≥ 8 *and* Maven ≥ 3.6 |
22-
| Python | Python ≥ 3.8 |
23-
17+
| Language/Platform | SDK Requirement |
18+
| ----------------- | ------------------------- |
19+
| .NET | .NET ≥ 6.0 |
20+
| Go | Go ≥ 1.18 |
21+
| Java | JDK ≥ 8 _and_ Maven ≥ 3.6 |
22+
| Python | Python ≥ 3.8 |
2423

2524
## :octicons-desktop-download-24: Download Locations
2625

2726
This table provides typical download locations for the prerequisites mentioned in this document. Most of these tools can
2827
also be installed using traditional package managers (standard for the operating system and platform).
2928

3029
| Tool | Description | Location |
31-
| --------------- | ---------------------------------------- | ------------------------|
30+
| --------------- | ---------------------------------------- | ----------------------- |
3231
| .NET | Official Microsoft .NET SDK distribution | [Download][dl-dotnet] |
3332
| Amazon Corretto | Amazon's free OpenJDK distribution | [Download][dl-corretto] |
3433
| Go | Official Go distribution | [Download][dl-go] |
35-
| OpenJDK | Oracle OpenJDK distribution | [Download][dl-openjdk] |
3634
| Maven | Official Maven distribution | [Download][dl-mvn] |
37-
| Node | Official NodeJS distribution | [Download][dl-node] |
35+
| Node | Official Node.js distribution | [Download][dl-node] |
36+
| OpenJDK | Oracle OpenJDK distribution | [Download][dl-openjdk] |
37+
| Python | Official Python distribution | [Download][dl-python] |
3838

3939
[dl-dotnet]: https://dotnet.microsoft.com/download
4040
[dl-go]: https://golang.org/dl/

gh-pages/content/user-guides/lib-author/toolchain/jsii.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ reserved words in an identifier.
5959

6060
[report bugs]: https://github.com/aws/jsii/issues/new/choose
6161

62+
#### `--tsconfig`, `--validate-tsconfig` _(available from jsii >= 5.2)_
63+
64+
By default, jsii will generate a `tsconfig.json` for you, using best practice
65+
settings that are optimized for widespread support and backwards compatibility.
66+
In some situations it can be useful to provide a custom typescript
67+
configuration file to compile the jsii project.
68+
69+
Use the `--tsconfig` option to provide a path the config file, usually this
70+
will be `--tsconfig=tsconfig.json`.
71+
72+
A user-provider typescript config must follow certain rules to be a valid
73+
config for use with jsii. These rules are enforced by the `--validate-tsconfig`
74+
option. You may choose the level of validation to suit your use case.
75+
76+
--8<-- "partials/tsconfig-rulesets.md"
77+
6278
#### `--strip-deprecated`
6379

6480
The `--strip-deprecated` option modifies the compilation flow such that all
@@ -105,4 +121,4 @@ or `quiet` to either fail at runtime or silence these warnings, respectively.
105121
By default, this is set to `warn`.
106122

107123
The `JSII_DEPRECATED` environment variable is respected only on modules compiled
108-
with the `--add-deprecated-warnings` flag.
124+
with the `--add-deprecated-warnings` flag.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
| Rule set | Description |
2+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3+
| `strict` :star: | (Default) Validates the provided config against a strict rule set designed for widespread support and backwards-compatibility. |
4+
| `generated` | Enforces a tsconfig as if it were generated by jsii. Use this to stay compatible with the generated config, but have full ownership over the file. |
5+
| `minimal` :warning: | Only reject options that are known to be incompatible with jsii. This rule set is likely to be incomplete and new rules will be added without notice as incompatibilities are discovered. |
6+
| `off` :warning: | Disables all config validation, including options that are known to be incompatible with jsii. Intended for experimentation only. Use at your own risk. |
7+
8+
:star: Recommended setting\
9+
:warning: Resulting jsii assembly/package may be incompatible with wider ecosystem
10+
11+
There is currently no easy way to inspect these rule sets, however detailed error messages are returned if a provided tsconfig fails validation.

gh-pages/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mkdocs~=1.6.0
22
mkdocs-awesome-pages-plugin~=2.9.2
3-
mkdocs-material~=9.5.20
3+
mkdocs-material~=9.5.25
44
mkdocs-git-revision-date-plugin~=0.3.2

jest.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function overriddenConfig(overrides) {
6464
]);
6565

6666
// TypeScript appears to choke if we do the "as any" in the same
67-
// expression as the key access, so we delcare surrogate varibales...
67+
// expression as the key access, so we declare surrogate variables...
6868
for (const key of Array.from(allKeys).sort()) {
6969
const originalValue = original[key];
7070
const overrideValue = override[key];

0 commit comments

Comments
 (0)