Skip to content
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

fix: typesVersions not respecting outDir from tsconfig file #1238

Merged

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Aug 12, 2024

Fixes #1234

Also fixes an issue related the .type-compat output path that was discovered when adding tests. When getting outdir from the program, this might be either a relative or absolute path. Previously the code assumed it was always relative which is not correct. This led to absolute paths being used for the .type-compat dir and in the post processing; ultimately leading to a compilation failure. The fix is to ensure outdir & .type-compat are normalized to a relative path.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mrgrain mrgrain force-pushed the mrgrain/fix/downleveled-types-version-ignores-outdir branch from 2428b6e to 70c4778 Compare August 13, 2024 12:12
@mrgrain mrgrain force-pushed the mrgrain/fix/downleveled-types-version-ignores-outdir branch from 70c4778 to 4f22c75 Compare August 13, 2024 12:25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes! We did not have any tests for this before 🙈

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Aug 13, 2024
Merged via the queue into main with commit 072239b Aug 13, 2024
74 checks passed
@aws-cdk-automation aws-cdk-automation deleted the mrgrain/fix/downleveled-types-version-ignores-outdir branch August 13, 2024 15:44
aws-cdk-automation pushed a commit that referenced this pull request Aug 13, 2024
Fixes #1234

Also fixes an issue related the `.type-compat` output path that was
discovered when adding tests. When getting `outdir` from the program,
this might be either a relative or absolute path. Previously the code
assumed it was always relative which is not correct. This led to
absolute paths being used for the `.type-compat` dir and in the post
processing; ultimately leading to a compilation failure. The fix is to
ensure `outdir` & `.type-compat` are normalized to a relative path.

---

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 072239b)
@aws-cdk-automation
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
maintenance/v5.3

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 Aug 13, 2024
…1238) (#1243)

# Backport

This will backport the following commits from `main` to
`maintenance/v5.3`:
- [fix: typesVersions not respecting outDir from tsconfig file
(#1238)](#1238)

<!--- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BYO tsconfig - typesVersions not respecting outDir in tsconfig file
3 participants