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 SWC and React versions for 14-2-1 branch #73791

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
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
475 changes: 73 additions & 402 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ ${ENDGROUP}`)
// a starter Next.js install to re-use to speed up tests
// to avoid having to run yarn each time
console.log(`${GROUP}Creating Next.js install for isolated tests`)
const reactVersion = process.env.NEXT_TEST_REACT_VERSION || 'latest'
const reactVersion = process.env.NEXT_TEST_REACT_VERSION || '^18.2.0'
const { installDir, pkgPaths, tmpRepoDir } = await createNextInstall({
parentSpan: mockSpan(),
dependencies: {
Expand Down
20 changes: 10 additions & 10 deletions scripts/install-native.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ import fsp from 'fs/promises'
name: 'dummy-package',
version: '1.0.0',
optionalDependencies: {
'@next/swc-darwin-arm64': 'canary',
'@next/swc-darwin-x64': 'canary',
'@next/swc-linux-arm64-gnu': 'canary',
'@next/swc-linux-arm64-musl': 'canary',
'@next/swc-linux-x64-gnu': 'canary',
'@next/swc-linux-x64-musl': 'canary',
'@next/swc-win32-arm64-msvc': 'canary',
'@next/swc-win32-ia32-msvc': 'canary',
'@next/swc-win32-x64-msvc': 'canary',
'@next/swc-darwin-arm64': nextVersion,
'@next/swc-darwin-x64': nextVersion,
'@next/swc-linux-arm64-gnu': nextVersion,
'@next/swc-linux-arm64-musl': nextVersion,
'@next/swc-linux-x64-gnu': nextVersion,
'@next/swc-linux-x64-musl': nextVersion,
'@next/swc-win32-arm64-msvc': nextVersion,
'@next/swc-win32-ia32-msvc': nextVersion,
'@next/swc-win32-x64-msvc': nextVersion,
},
packageManager,
}
fs.writeFileSync(path.join(tmpdir, 'package.json'), JSON.stringify(pkgJson))
fs.writeFileSync(path.join(tmpdir, '.npmrc'), 'node-linker=hoisted')

let { stdout } = await execa('pnpm', ['add', 'next@canary'], {
let { stdout } = await execa('pnpm', ['add', `next@${nextVersion}`], {
cwd: tmpdir,
})
console.log(stdout)
Expand Down
4 changes: 2 additions & 2 deletions test/.stats-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"license": "MIT",
"dependencies": {
"next": "latest",
"react": "latest",
"react-dom": "latest"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"engines": {
"node": ">=18.17.0",
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/ReactRefresh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe('ReactRefresh app', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe.skip('ReactRefreshLogBox scss app', () => {
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
sass: 'latest',
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe.skip('ReactRefreshLogBox app', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/ReactRefreshModule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe('ReactRefreshModule app', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ describe('ReactRefreshRegression app', () => {
'styled-components': '5.1.0',
'@next/mdx': 'canary',
'@mdx-js/loader': '0.18.0',
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/ReactRefreshRequire.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe('ReactRefreshRequire app', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/component-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe('Component Stack in error overlay', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'component-stack')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/editor-links.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('Error overlay - editor links', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/error-message-url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe('Error overlay - error message urls', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/error-recovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe.each(['default', 'turbo'])('Error recovery app %s', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/hydration-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe('Error overlay for hydration errors', () => {
const { next, isTurbopack } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/invalid-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe('Error Overlay invalid imports', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
'server-only': 'latest',
'client-only': 'latest',
},
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/rsc-build-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe('Error overlay - RSC build errors', () => {
const { next, isTurbopack } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'rsc-build-errors')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance-app/server-components.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe('Error Overlay for server components', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/acceptance/hydration-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe('Error overlay for hydration errors', () => {
const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe('Error Overlay for server components compiler errors in pages', () => {
const { next } = nextTestSetup({
files: {},
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
skipStart: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ createNextDescribe(
dependencies: {
mobx: '6.3.7',
typescript: 'latest',
'@types/react': 'latest',
'@types/react': '^18.2.0',
'@types/node': 'latest',
'mobx-react': '7.2.1',
},
Expand Down
2 changes: 1 addition & 1 deletion test/development/correct-tsconfig-defaults/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('correct tsconfig.json defaults', () => {
skipStart: true,
dependencies: {
typescript: 'latest',
'@types/react': 'latest',
'@types/react': '^18.2.0',
'@types/node': 'latest',
},
})
Expand Down
2 changes: 1 addition & 1 deletion test/development/jsconfig-path-reloading/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('jsconfig-path-reloading', () => {
},
dependencies: {
typescript: 'latest',
'@types/react': 'latest',
'@types/react': '^18.2.0',
'@types/node': 'latest',
},
})
Expand Down
4 changes: 2 additions & 2 deletions test/development/next-font/deprecated-package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ createNextDescribe(
'pages/index.js': '',
},
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
'@next/font': 'canary',
},
skipStart: true,
Expand Down
2 changes: 1 addition & 1 deletion test/development/tsconfig-path-reloading/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('tsconfig-path-reloading', () => {
},
dependencies: {
typescript: 'latest',
'@types/react': 'latest',
'@types/react': '^18.2.0',
'@types/node': 'latest',
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ createNextDescribe(
files: join(__dirname, 'safe-origins'),
skipDeployment: true,
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
'server-only': 'latest',
},
// An arbitrary & random port.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ createNextDescribe(
files: join(__dirname, 'unsafe-origins'),
skipDeployment: true,
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
'server-only': 'latest',
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/actions/app-action-export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ createNextDescribe(
skipStart: true,
skipDeployment: true,
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
'server-only': 'latest',
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/actions/app-action-form-state.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ createNextDescribe(
{
files: __dirname,
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
},
},
({ next }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ createNextDescribe(
{
files: __dirname,
dependencies: {
react: 'latest',
react: '^18.2.0',
nanoid: 'latest',
'react-dom': 'latest',
'react-dom': '^18.2.0',
'server-only': 'latest',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ createNextDescribe(
files: __dirname,
skipDeployment: true,
dependencies: {
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
'server-only': 'latest',
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/actions/app-action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ createNextDescribe(
{
files: __dirname,
dependencies: {
react: 'latest',
react: '^18.2.0',
nanoid: 'latest',
'react-dom': 'latest',
'react-dom': '^18.2.0',
'server-only': 'latest',
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/app-css-pageextensions/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ createNextDescribe(
skipDeployment: true,
dependencies: {
'@picocss/pico': '1.5.7',
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
sass: 'latest',
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/app-css/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ createNextDescribe(
skipDeployment: true,
dependencies: {
'@picocss/pico': '1.5.7',
react: 'latest',
'react-dom': 'latest',
react: '^18.2.0',
'react-dom': '^18.2.0',
sass: 'latest',
'@next/mdx': 'canary',
},
Expand Down
Loading
Loading