Skip to content

Commit

Permalink
react-sync: cleanup inaccurate peer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Aug 30, 2024
1 parent 3d49428 commit c2b493b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"@opentelemetry/api": "^1.1.0",
"@playwright/test": "^1.41.2",
"babel-plugin-react-compiler": "*",
"react": "19.0.0-rc-7771d3a7-20240827",
"react-dom": "19.0.0-rc-7771d3a7-20240827",
"react": "^18.0.0 || 19.0.0-rc-7771d3a7-20240827",
"react-dom": "^18.0.0 || 19.0.0-rc-7771d3a7-20240827",
"sass": "^1.3.0"
},
"peerDependenciesMeta": {
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const NEXT_PROJECT_ROOT_DIST_CLIENT = path.join(
'client'
)

if (parseInt(React.version) < 19) {
throw new Error('Next.js requires react >= 19.0.0 to be installed.')
if (parseInt(React.version) < 18) {
throw new Error('Next.js requires react >= 18.2.0 to be installed.')
}

export const babelIncludeRegexes: RegExp[] = [
Expand Down
3 changes: 2 additions & 1 deletion run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const exec = promisify(execOrig)
const core = require('@actions/core')
const { getTestFilter } = require('./test/get-test-filter')

// TODO: Base this off of test matrix
// Do not rename or format. sync-react script relies on this line.
// prettier-ignore
const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827";
const nextjsReactPeerVersion = "^18.0.0";

let argv = require('yargs/yargs')(process.argv.slice(2))
.string('type')
Expand Down
3 changes: 2 additions & 1 deletion test/lib/next-modes/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ type OmitFirstArgument<F> = F extends (
? (...args: P) => R
: never

// TODO: Base this off of test matrix
// Do not rename or format. sync-react script relies on this line.
// prettier-ignore
const nextjsReactPeerVersion = "19.0.0-rc-7771d3a7-20240827";
const nextjsReactPeerVersion = "18.0.0";

export class NextInstance {
protected files: FileRef | { [filename: string]: string | FileRef }
Expand Down

0 comments on commit c2b493b

Please sign in to comment.