New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: user-provided TypeScript config #931
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mrgrain
force-pushed
the
mrgrain/custom-tsconfig
branch
2 times, most recently
from
May 2, 2024 09:22
d9ff279
to
21c115f
Compare
otaviomacedo
reviewed
May 3, 2024
mrgrain
force-pushed
the
mrgrain/custom-tsconfig
branch
4 times, most recently
from
May 13, 2024 09:57
a8eabc3
to
38b6016
Compare
mrgrain
changed the title
feat: bring-your-own TypeScript config
feat: user provided TypeScript config
May 13, 2024
mrgrain
changed the title
feat: user provided TypeScript config
feat: user-provided TypeScript config
May 13, 2024
mrgrain
force-pushed
the
mrgrain/custom-tsconfig
branch
4 times, most recently
from
May 13, 2024 16:53
78f1672
to
502f639
Compare
rix0rrr
reviewed
May 14, 2024
mrgrain
force-pushed
the
mrgrain/custom-tsconfig
branch
from
May 14, 2024 09:55
6e2310c
to
b6106c8
Compare
mrgrain
force-pushed
the
mrgrain/custom-tsconfig
branch
from
May 14, 2024 11:18
b6106c8
to
592aedf
Compare
rix0rrr
approved these changes
May 14, 2024
6 tasks
aws-cdk-automation
pushed a commit
that referenced
this pull request
May 16, 2024
This PR introduces support for user-provided TypeScript configs through new options to the CLI, the programmatic API and the `jsii` config section in `package.json` respectively: | CLI | package.json | Programmatic API | Description | |-----|--------------|-------------------|-------------| | `-c`, `--tsconfig` | `jsii.tsconfig` | `typeScriptConfig` | Use this typescript configuration file to compile the jsii project. | | `--validate-tsconfig` | `jsii.validateTsConfig` | `validateTypeScriptConfig` | Validate the provided typescript configuration file against a set of rules.| The following validation rule sets are available: | Rule set | Description | |---------|-------------| | **strict** ⭐ | Validates the provided config against a strict rule set designed for maximum backwards-compatibility. | | **generated** | Enforces a config as created by `--generate-tsconfig`. Use this to stay compatible with the generated config, but have full ownership over the file. | | **minimal** | Only enforce 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 emerge. | | **off** 🧪 | Disables all config validation, including options that are known to be incompatible with jsii. Intended for experimentation only. Use at your own risk. | Resolves aws/jsii#2071 --- ## Refactors Mostly changed the compiler by moving some code around or into new locations to be reused. Specifically the generated config was created in multiple places without re-use. With this PR, loading or building the tsconfig now happens once in the constructor and this config is used through out. ## Testing strategy Compiler changes are covered by existing test cases. Added property-based tests for the new config validator. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit 14a51b9)
aws-cdk-automation
pushed a commit
that referenced
this pull request
May 16, 2024
This PR introduces support for user-provided TypeScript configs through new options to the CLI, the programmatic API and the `jsii` config section in `package.json` respectively: | CLI | package.json | Programmatic API | Description | |-----|--------------|-------------------|-------------| | `-c`, `--tsconfig` | `jsii.tsconfig` | `typeScriptConfig` | Use this typescript configuration file to compile the jsii project. | | `--validate-tsconfig` | `jsii.validateTsConfig` | `validateTypeScriptConfig` | Validate the provided typescript configuration file against a set of rules.| The following validation rule sets are available: | Rule set | Description | |---------|-------------| | **strict** ⭐ | Validates the provided config against a strict rule set designed for maximum backwards-compatibility. | | **generated** | Enforces a config as created by `--generate-tsconfig`. Use this to stay compatible with the generated config, but have full ownership over the file. | | **minimal** | Only enforce 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 emerge. | | **off** 🧪 | Disables all config validation, including options that are known to be incompatible with jsii. Intended for experimentation only. Use at your own risk. | Resolves aws/jsii#2071 --- ## Refactors Mostly changed the compiler by moving some code around or into new locations to be reused. Specifically the generated config was created in multiple places without re-use. With this PR, loading or building the tsconfig now happens once in the constructor and this config is used through out. ## Testing strategy Compiler changes are covered by existing test cases. Added property-based tests for the new config validator. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit 14a51b9)
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
aws-cdk-automation
pushed a commit
that referenced
this pull request
May 16, 2024
This PR introduces support for user-provided TypeScript configs through new options to the CLI, the programmatic API and the `jsii` config section in `package.json` respectively: | CLI | package.json | Programmatic API | Description | |-----|--------------|-------------------|-------------| | `-c`, `--tsconfig` | `jsii.tsconfig` | `typeScriptConfig` | Use this typescript configuration file to compile the jsii project. | | `--validate-tsconfig` | `jsii.validateTsConfig` | `validateTypeScriptConfig` | Validate the provided typescript configuration file against a set of rules.| The following validation rule sets are available: | Rule set | Description | |---------|-------------| | **strict** ⭐ | Validates the provided config against a strict rule set designed for maximum backwards-compatibility. | | **generated** | Enforces a config as created by `--generate-tsconfig`. Use this to stay compatible with the generated config, but have full ownership over the file. | | **minimal** | Only enforce 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 emerge. | | **off** 🧪 | Disables all config validation, including options that are known to be incompatible with jsii. Intended for experimentation only. Use at your own risk. | Resolves aws/jsii#2071 --- ## Refactors Mostly changed the compiler by moving some code around or into new locations to be reused. Specifically the generated config was created in multiple places without re-use. With this PR, loading or building the tsconfig now happens once in the constructor and this config is used through out. ## Testing strategy Compiler changes are covered by existing test cases. Added property-based tests for the new config validator. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit 14a51b9)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 16, 2024
# Backport This will backport the following commits from `main` to `maintenance/v5.2`: - [feat: user-provided TypeScript config (#931)](#931) <!--- Backport version: 9.5.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 16, 2024
# Backport This will backport the following commits from `main` to `maintenance/v5.3`: - [feat: user-provided TypeScript config (#931)](#931) <!--- Backport version: 9.5.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces support for user-provided TypeScript configs through new options to the CLI, the programmatic API and the
jsii
config section inpackage.json
respectively:-c
,--tsconfig
jsii.tsconfig
typeScriptConfig
--validate-tsconfig
jsii.validateTsconfig
validateTypeScriptConfig
The following validation rule sets are available:
--generate-tsconfig
. Use this to stay compatible with the generated config, but have full ownership over the file.Resolves aws/jsii#2071
Refactors
Mostly changed the compiler by moving some code around or into new locations to be reused. Specifically the generated config was created in multiple places without re-use. With this PR, loading or building the tsconfig now happens once in the constructor and this config is used through out.
Testing strategy
Compiler changes are covered by existing test cases.
Added property-based tests for the new config validator.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.