-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pin @types/prettier on JsiiProject (#1855)
Addresses the issue described in aws/aws-cdk#20319 --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
4 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,6 +339,15 @@ export class JsiiProject extends TypeScriptProject { | |
if (this.npmignore) { | ||
this.npmignore.readonly = false; | ||
} | ||
|
||
// jsii relies on typescript < 4.0, which causes build errors | ||
// since @types/[email protected] only supports typescript >= 4.2. | ||
// add a yarn resolution to fix this. this should have no effect if | ||
// @types/prettier is not a transitive dependency or if a package manager | ||
// besides yarn is being used | ||
this.package.addField("resolutions", { | ||
"@types/prettier": "2.6.0", | ||
}); | ||
} | ||
|
||
/** | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.