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

Update to turbopack-240215.5 #62119

Merged
merged 3 commits into from
Feb 16, 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
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ swc_core = { version = "0.90.8", features = [
testing = { version = "0.35.18" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240215.4" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240215.5" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240215.4" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240215.5" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240215.4" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240215.5" }

# General Deps

Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"@types/ws": "8.2.0",
"@vercel/ncc": "0.34.0",
"@vercel/nft": "0.26.4",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240215.4",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240215.5",
"acorn": "8.5.0",
"amphtml-validator": "1.0.35",
"anser": "1.4.9",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ exports[`ReactRefreshLogBox app turbo boundaries 1`] = `
| ^"
`;

exports[`ReactRefreshLogBox app turbo conversion to class component (1) 1`] = `
"Child.js (4:11) @ ClickCount.render

2 | export default class ClickCount extends Component {
3 | render() {
> 4 | throw new Error()
| ^
5 | }
6 | }"
`;

exports[`ReactRefreshLogBox app turbo logbox: anchors links in error messages 1`] = `"Error: end http://nextjs.org"`;

exports[`ReactRefreshLogBox app turbo logbox: anchors links in error messages 2`] = `"http://nextjs.org/"`;
Expand Down
22 changes: 18 additions & 4 deletions test/development/acceptance-app/rsc-build-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sandbox } from 'development-sandbox'
import { outdent } from 'outdent'

describe('Error overlay - RSC build errors', () => {
const { next } = nextTestSetup({
const { next, isTurbopack } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'rsc-build-errors')),
dependencies: {
react: 'latest',
Expand Down Expand Up @@ -223,9 +223,23 @@ describe('Error overlay - RSC build errors', () => {
await next.patchFile(file, uncomment)

expect(await session.hasRedbox()).toBe(true)
expect(await session.getRedboxSource()).toInclude(
`You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.`
)
if (isTurbopack) {
expect(await session.getRedboxSource()).toMatchInlineSnapshot(`
"./app/server-with-errors/client-only-in-server/client-only-lib.js:1:1
Parsing ecmascript source code failed
> 1 | import 'client-only'
| ^^^^^^^^^^^^^^^^^^^^
2 |
3 | export default function ClientOnlyLib() {
4 | return 'client-only-lib'

You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.\\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\\n\\n"
`)
} else {
expect(await session.getRedboxSource()).toInclude(
`You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.`
)
}

await cleanup()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ exports[`ReactRefreshLogBox default should strip whitespace correctly with newli

exports[`ReactRefreshLogBox turbo boundaries 1`] = `null`;

exports[`ReactRefreshLogBox turbo conversion to class component (1) 1`] = `null`;

exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 1`] = `"Error: end http://nextjs.org"`;

exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 2`] = `"http://nextjs.org/"`;
Expand Down
9 changes: 4 additions & 5 deletions test/turbopack-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -927,16 +927,14 @@
"ReactRefreshLogBox app turbo Should not show __webpack_exports__ when exporting anonymous arrow function",
"ReactRefreshLogBox app turbo Unhandled errors and rejections opens up in the minimized state",
"ReactRefreshLogBox app turbo boundaries",
"ReactRefreshLogBox app turbo conversion to class component (1)",
"ReactRefreshLogBox app turbo logbox: anchors links in error messages",
"ReactRefreshLogBox app turbo module init error not shown",
"ReactRefreshLogBox app turbo server component can recover from error thrown in the module",
"ReactRefreshLogBox app turbo should strip whitespace correctly with newline",
"ReactRefreshLogBox app turbo unterminated JSX"
],
"failed": [
"ReactRefreshLogBox app turbo conversion to class component (1)",
"ReactRefreshLogBox app turbo css syntax errors"
],
"failed": ["ReactRefreshLogBox app turbo css syntax errors"],
"pending": [
"ReactRefreshLogBox app default Call stack count is correct for client error",
"ReactRefreshLogBox app default Call stack count is correct for server error",
Expand Down Expand Up @@ -1279,6 +1277,7 @@
"test/development/acceptance/ReactRefreshLogBox.test.ts": {
"passed": [
"ReactRefreshLogBox turbo boundaries",
"ReactRefreshLogBox turbo conversion to class component (1)",
"ReactRefreshLogBox turbo logbox: anchors links in error messages",
"ReactRefreshLogBox turbo module init error not shown",
"ReactRefreshLogBox turbo non-Error errors are handled properly",
Expand All @@ -1298,7 +1297,7 @@
"ReactRefreshLogBox default unterminated JSX",
"ReactRefreshLogBox turbo internal package errors"
],
"flakey": ["ReactRefreshLogBox turbo conversion to class component (1)"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to update the build-turbopack-manifest for this

"flakey": [],
"runtimeError": false
},
"test/development/acceptance/ReactRefreshLogBoxMisc.test.ts": {
Expand Down