Skip to content

Commit

Permalink
chore: update to react v18 and react-scripts v5 (#126)
Browse files Browse the repository at this point in the history
This updates react-scripts in the various starter apps in order to resolve an issue with hot reloading while working locally.

These changes include:
- update react-scripts to v5; upgrade react to v18
- update yarn.lock after version changes
- increment package versions in changeset

References:
- facebook/create-react-app#11771
- https://stackoverflow.com/a/70452191/656011
  • Loading branch information
ericrallen authored Apr 4, 2022
1 parent 56ced43 commit 58a9034
Show file tree
Hide file tree
Showing 17 changed files with 4,217 additions and 5,520 deletions.
7 changes: 7 additions & 0 deletions .changeset/cuddly-pugs-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@datadog/create-app': major
'@datadog/ui-extensions-react': minor
'@datadog/ui-extensions-sdk': minor
---

Upgrade to react-scripts v5
6 changes: 3 additions & 3 deletions examples/custom-widget-with-1st-party-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"dependencies": {
"@datadog/ui-extensions-react": "0.30.1",
"@datadog/ui-extensions-sdk": "0.30.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@types/node": "^14.14.14",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
"typescript": "^4.5.4"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/custom-widget-with-3rd-party-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"dependencies": {
"@datadog/ui-extensions-react": "0.30.1",
"@datadog/ui-extensions-sdk": "0.30.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"react": "18.0.0",
"react-dom": "18.0.0"
},
"devDependencies": {
"@types/node": "^14.14.14",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
"typescript": "^4.5.4"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/geomap/datadog-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"@types/react-dom": "^17.0.0",
"milligram": "^1.4.1",
"pigeon-maps": "^0.19.7",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-scripts": "5.0.0",
"typeface-roboto": "^1.1.13",
"typescript": "^4.1.3"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/random-dog/dog-image-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"milligram": "^1.4.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"typeface-roboto": "^1.1.13",
"typescript": "^4.1.3"
},
Expand Down
12 changes: 6 additions & 6 deletions examples/redis/datadog-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"dependencies": {
"@datadog/ui-extensions-react": "0.30.1",
"@datadog/ui-extensions-sdk": "0.30.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^14.0.4",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-hook-form": "^7.19.5",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
"web-vitals": "^1.0.1"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/sentiment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"@datadog/ui-extensions-react": "0.30.1",
"@datadog/ui-extensions-sdk": "0.30.1",
"milligram": "^1.4.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"typeface-roboto": "^1.1.13"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/starter-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"milligram": "^1.4.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"typeface-roboto": "^1.1.13",
"typescript": "^4.1.3"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/stream/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@types/react": "^17.0.21",
"@types/react-dom": "^17.0.0",
"bootstrap": "^5.1.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"typeface-roboto": "^1.1.13",
"typescript": "^4.4.3"
},
Expand Down
10 changes: 5 additions & 5 deletions examples/stream/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/react": "^12.1.0",
"@testing-library/user-event": "^13.2.1",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^14.0.4",
"@types/bootstrap": "^5.0.17",
"@types/node": "^16.9.1",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"bootstrap": "^5.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"typescript": "^4.1.2"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-no-storage": "1.0.2",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-testing-library": "3.10.2",
"lerna": "4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/create-app/src/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"milligram": "^1.4.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"typeface-roboto": "^1.1.13",
"typescript": "^4.5.4"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/framepost/__tests__/child.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { setImmediate } from 'timers';

import {
MessageAPIVersion,
MessageType,
Expand Down
2 changes: 2 additions & 0 deletions packages/framepost/__tests__/parent.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { setImmediate } from 'timers';

import {
MessageAPIVersion,
MessageType,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-extensions-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/jest": "^26.0.23",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"jest": "26.6.0",
"react-test-renderer": "17.0.2",
"react-test-renderer": "18.0.0",
"ts-jest": "^26.5.5",
"ts-loader": "^9.1.1",
"webpack": "^5.35.1",
Expand All @@ -38,7 +38,7 @@
},
"peerDependencies": {
"@datadog/ui-extensions-sdk": "0.30.1",
"react": "^17.0.2"
"react": "^18.0.0"
},
"typedocMain": "src/index.ts"
}
2 changes: 2 additions & 0 deletions packages/ui-extensions-sdk/src/utils/testUtils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { setImmediate } from 'timers';

import { ColorTheme, EventType, FeatureType, RequestType } from '../constants';
import {
Context,
Expand Down
Loading

0 comments on commit 58a9034

Please sign in to comment.