-
Notifications
You must be signed in to change notification settings - Fork 246
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
ability to override default settings of generated tsconfig.json #2071
Comments
I have this idea where I'd like to allow folks to own their |
Also see #1644 |
We'd like to see this implemented to be able to resolve the referenced issue in the 'projen' project. |
Currently there's need to include (quite ugly) script to beginning of |
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
This issue is now closed. Comments on closed issues are hard for our team to see. |
This feature is no available as preview in jsii@5.4.16-dev.3 Pending beta testing, I expect this to be released next week and backported to all currently supported version lines (5.3.x and 5.2.x). Documentation and website updates are also underway. |
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)
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)
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)
This is now releases as an experimental feature on jsii >= 5.2 Documentation: |
🚀 Feature Request
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
Description
Currently Jsii only allows outDir and rootDir fields to be modified in jsii.tsc section, it should consider additional fields which can be configured. I am running into few issues which are caused due to default settings of tsconfig. It should take additional fields into consideration as well
Proposed Solution
The text was updated successfully, but these errors were encountered: