Skip to content

Commit

Permalink
feat(react): support react 18.3.1 (#23166)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->
We currently generate react projects with version 18.2.0


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We generate react projects with version 18.3.1
We migrate existing users to version 18.3.1

This will prepare for the breaking changes coming in React 19


## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
Coly010 committed May 3, 2024
1 parent 2cb62c6 commit e06b787
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 7 deletions.
33 changes: 33 additions & 0 deletions packages/react/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,39 @@
"alwaysAddToPackageJson": false
}
}
},
"19.0.0": {
"version": "19.0.0-beta.12",
"packages": {
"react": {
"version": "18.3.1",
"alwaysAddToPackageJson": false
},
"react-dom": {
"version": "18.3.1",
"alwaysAddToPackageJson": false
},
"react-is": {
"version": "18.3.1",
"alwaysAddToPackageJson": false
},
"@types/react": {
"version": "18.3.1",
"alwaysAddToPackageJson": false
},
"@types/react-dom": {
"version": "18.3.0",
"alwaysAddToPackageJson": false
},
"@types/react-is": {
"version": "18.3.0",
"alwaysAddToPackageJson": false
},
"@testing-library/react": {
"version": "15.0.6",
"alwaysAddToPackageJson": false
}
}
}
}
}
14 changes: 7 additions & 7 deletions packages/react/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ export const nxVersion = require('../../package.json').version;
// Always pull the latest version until we merge rspack plugin into the repo.
export const nxRspackVersion = '*';

export const reactVersion = '18.2.0';
export const reactDomVersion = '18.2.0';
export const reactIsVersion = '18.2.0';
export const reactVersion = '18.3.1';
export const reactDomVersion = '18.3.1';
export const reactIsVersion = '18.3.1';
export const swcLoaderVersion = '0.1.15';
export const babelLoaderVersion = '^9.1.2';
export const typesReactVersion = '18.2.33';
export const typesReactDomVersion = '18.2.14';
export const typesReactIsVersion = '18.2.2';
export const typesReactVersion = '18.3.1';
export const typesReactDomVersion = '18.3.0';
export const typesReactIsVersion = '18.3.0';

export const typesNodeVersion = '18.16.9';

Expand All @@ -29,7 +29,7 @@ export const styledJsxVersion = '5.1.2';

export const reactRouterDomVersion = '6.11.2';

export const testingLibraryReactVersion = '14.0.0';
export const testingLibraryReactVersion = '15.0.6';

export const reduxjsToolkitVersion = '1.9.3';
export const reactReduxVersion = '8.0.5';
Expand Down

0 comments on commit e06b787

Please sign in to comment.