Skip to content

Commit

Permalink
[WTF-1922]: Fix react and @types/react package mismatch in PWT (#97)
Browse files Browse the repository at this point in the history
## Checklist

-   Contains unit tests ✅ 
-   Contains breaking changes ❌
-   Compatible with: MX 🔟
-   Did you update version and changelog? ✅ 
-   PR title properly formatted (`[XX-000]: description`)? ✅ 

## This PR contains

-   [ ] Bug fix
-   [ ] Feature
-   [ ] Refactor
-   [ ] Documentation
-   [x] Other (describe)

## What is the purpose of this PR?

The purpose of the changes is to fix the compilation error due to a
version mismatch among the dependencies.

## Relevant changes

The Yeoman Generator for scaffolding a pluggable widget has been
adjusted to include `@types/react` package with `18.2.79`. Related unit
tests are also adjusted in accordance with the changes.
  • Loading branch information
weirdwater authored Jul 9, 2024
2 parents d187897 + 7adf7cb commit eb18a7f
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 29 deletions.
4 changes: 4 additions & 0 deletions packages/generator-widget/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the default overrides (and resolutions) for generated widgets to ensure consistent React types with `@mendix/pluggable-widgets-tools`. This fixes errors like "_Type Element is not assignable to type ReactElement_".

## [10.7.2] - 2024-03-07

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@

},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@

},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",
"@types/react": "^18.2.0",
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@

},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",<% if (isLanguageTS) { %>
"@types/react": "^18.2.0",<% } %>
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",<% if (isLanguageTS) { %>
"@types/react": "^18.2.0",<% } %>
"react-native": "0.72.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
"classnames": "^2.2.6"
},
"resolutions": {
"react": "18.2.0",
"react": "^18.2.0",<% if (isLanguageTS) { %>
"@types/react": "^18.2.0",<% } %>
"react-native": "0.72.7"
},
"overrides": {
"react": "18.2.0",
"react": "^18.2.0",<% if (isLanguageTS) { %>
"@types/react": "^18.2.0",<% } %>
"react-native": "0.72.7"
}
}
2 changes: 1 addition & 1 deletion packages/pluggable-widgets-tools/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eb18a7f

Please sign in to comment.