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 compatibility check #1685

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions scripts/cli
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ cmd_check_typescript_compatibility () {
yarn build
cd test/app
rm -rf node_modules
yarn
check_typescript_3_compatibility || fail 'typescript@3.8.2 compatibility broken'
check_typescript_latest_compatibility || fail 'typescript@latest compatibility broken'
}
Expand All @@ -82,11 +83,9 @@ check_typescript_3_compatibility () {

check_typescript_latest_compatibility () {
# Add typescript options only supported in newer versions
sed -i '' '3 i\
"exactOptionalPropertyTypes": true,
' tsconfig.json
perl -i -l -p -e 'print "\"exactOptionalPropertyTypes\": true," if $. == 3' tsconfig.json

yarn add typescript@latest
yarn add --dev typescript@latest
local succeeded=true
if ! yarn compat:tsc; then
succeeded=false
Expand Down