From de0f23f2564a7b4921c647ccce3a6d09f9156cde Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 2 May 2023 13:19:37 +0000 Subject: [PATCH 1/5] test error handling for image processing --- .../next/image/basic/input/pages/index.js | 41 +++++++++++++++--- .../next/image/basic/input/public/broken.svg | Bin 0 -> 4289 bytes .../issues/Processing image failed-ba2031.txt | 27 ++++++++++++ .../issues/Processing image failed-d388f6.txt | 14 ++++++ .../issues/Processing image failed-e65ac3.txt | 21 +++++++++ 5 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-ba2031.txt create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-d388f6.txt create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-e65ac3.txt diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js index 38c717c027958..2308698b6f36b 100644 --- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js @@ -2,6 +2,7 @@ import Image from 'next/image' import { img } from '../components/img' import broken from '../public/broken.jpeg' import svg from '../public/test.svg' +import brokenSvg from '../public/broken.svg' import { useEffect } from 'react' export default function Home() { @@ -25,6 +26,17 @@ export default function Home() { width="116" height="100" />, + test imported broken image, + test imported broken svg image, ] } @@ -40,9 +52,11 @@ function runTests() { expect(svg).toHaveProperty('height', 400) }) - it('should not return image size for broken images', function () { - expect(broken).toHaveProperty('width', 0) - expect(broken).toHaveProperty('height', 0) + it('should return fake image size for broken images', function () { + expect(broken).toHaveProperty('width', 100) + expect(broken).toHaveProperty('height', 100) + expect(brokenSvg).toHaveProperty('width', 100) + expect(brokenSvg).toHaveProperty('height', 100) }) it('should have blur placeholder', function () { @@ -60,10 +74,13 @@ function runTests() { expect(svg).toHaveProperty('blurHeight', 0) }) - it('should not have blur placeholder for broken images', function () { - expect(broken).toHaveProperty('blurDataURL', null) - expect(broken).toHaveProperty('blurWidth', 0) - expect(broken).toHaveProperty('blurHeight', 0) + it('should have fake blur placeholder for broken images', function () { + expect(broken).toHaveProperty( + 'blurDataURL', + expect.stringContaining('data:') + ) + expect(broken).toHaveProperty('blurWidth', 1) + expect(broken).toHaveProperty('blurHeight', 1) }) it('should link to imported image', function () { @@ -80,4 +97,14 @@ function runTests() { const img = document.querySelector('#local') expect(img.src).toContain('triangle-black') }) + + it('should link to imported broken image', function () { + const img = document.querySelector('#broken') + expect(img.src).toContain(encodeURIComponent('_next/static/assets')) + }) + + it('should link to imported broken svg image', function () { + const img = document.querySelector('#broken-svg') + expect(img.src).toContain('_next/static/assets') + }) } diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg new file mode 100644 index 0000000000000000000000000000000000000000..351730591885f2b53625436ec159381ba160f355 GIT binary patch literal 4289 zcmV;y5I*mTP)l0mEZN9sR?#93H|9Gm1J(5QTx6h0YKO2nIz3G6aY~2op%iW6vMosdS}syXsc; zeN@$aYn|0qeeSvY+`H@Sv+q9NKG)oxW`~(A1KizzoOfT+MqAz;NE>F>4on7in^~*7 z@5#GQX~LR)gqqpWz#+ivz=&oar7d}PAWfLrK%hVHH1H}g&di49+pBcZ)Faf)<^nr_ zmw;B_IpAO2{eoOOmLi%~p=LG>nc6O3CSbs4fW5$ccmGw6-AfHksZcXB;8fs6U;xk_ zs``Y#Q-RyO2`|1`z1;D@W?+-Mzg1jeWw;QW=8@`fZqVyfVa@2iUY%uDK3o0^}x%>^d1G=>+a8I-RCsW6bcRI^a)^%yMMpR zwo6d(;n8M@^EQjg{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*@`4=Ax}@4nxk<>8{lq~ zSDDHS;6i|5I(kw1!)CS^#d;s|l=!@+m)$*0bxedbunT3VN4}IV3e}F#!mFf;(H8!n z7QTU;u+Fe8c^mScN2DmTT3Sh3=!2fuV&6ncek-_;i(+-d;O$5XyOFzX$pz=wY^_(HtW=<#JVu+iP0M4`ka;=F69UuA-PhN~(b zRbft4ox#TSLgsAbaOFK$ z#<{mg)f6cTrtJ~5fm5~kPek&nDhw55o{a+jlj&X$Eo8}U4F7*DeBX_BE@?$dzPDPL zLGHtdI@1XF53~#!eVt`~wI88(zov6*7%3m43XiU+T_IQIqczA(lU9;e>5;C|(?#|} zd+hZ_=q8|}iW}R3My3OoRjHKALc7gWk(P+oAOBPb3aYleMA$7Yu0pR#NbuEF+}yQA z?cM_37qi_F=yg_ww%1f4b9Egkr`EDMmO>Hfxpb%JTFbkHz4a>G*m2?5;~0Hggxt#2|tr=a`z;POg74L z%lqc1Rc;K|$W*j=oQ2R`h!x*O^t(^Wl{-U+3-5SYia16qfDfV|!D(ny$YYVybSfIf zqtFu6&N{g9X_fbY$%fvQnPuAE&rl%Xq$=AviU<|xE*t3%3|x*9o6Zma+kt`;6X=cv jT?+g~Z#v!pc;Np4bU(8uEXQNW00000NkvXXu0mjf+-xTf literal 0 HcmV?d00001 diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-ba2031.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-ba2031.txt new file mode 100644 index 0000000000000..6df83c62b52d2 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-ba2031.txt @@ -0,0 +1,27 @@ +PlainIssue { + severity: Error, + context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg", + category: "image", + title: "Processing image failed", + description: "Input image is not valid utf-8\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 0", + detail: "", + documentation_link: "", + source: None, + sub_issues: [], + processing_path: Some( + [ + PlainIssueProcessingPathItem { + context: Some( + "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js", + ), + description: "Next.js pages directory", + }, + PlainIssueProcessingPathItem { + context: Some( + "[next]/entry/server-renderer.tsx", + ), + description: "server-side rendering /", + }, + ], + ), +} \ No newline at end of file diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-d388f6.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-d388f6.txt new file mode 100644 index 0000000000000..0099f39aaffe8 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-d388f6.txt @@ -0,0 +1,14 @@ +PlainIssue { + severity: Error, + context: "[root of the server]/_next/static/assets/11d09843b5b83333.jpeg", + category: "image", + title: "Processing image failed", + description: "unable to decode image data\n\nCaused by:\n- failed to fill whole buffer", + detail: "", + documentation_link: "", + source: None, + sub_issues: [], + processing_path: Some( + [], + ), +} \ No newline at end of file diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-e65ac3.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-e65ac3.txt new file mode 100644 index 0000000000000..629b743fecdfe --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/issues/Processing image failed-e65ac3.txt @@ -0,0 +1,21 @@ +PlainIssue { + severity: Error, + context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg", + category: "image", + title: "Processing image failed", + description: "Input image is not valid utf-8\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 0", + detail: "", + documentation_link: "", + source: None, + sub_issues: [], + processing_path: Some( + [ + PlainIssueProcessingPathItem { + context: Some( + "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js", + ), + description: "Next.js pages directory", + }, + ], + ), +} \ No newline at end of file From 634f2e9f9a866c693b5d63f87cd4071024074b5f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 2 May 2023 13:27:58 +0000 Subject: [PATCH 2/5] add test case for parsing errors --- .../turbopack/basic/error/input/broken.js | Bin 0 -> 3 bytes .../turbopack/basic/error/input/index.js | 6 ++++++ ...ding source code for parsing failed-6c806a.txt | 14 ++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/index.js create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js new file mode 100644 index 0000000000000000000000000000000000000000..2d547a5bddc4cc19c39231b1218f0abb46b00a69 GIT binary patch literal 3 KcmZSh{~rJY00I91 literal 0 HcmV?d00001 diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/index.js b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/index.js new file mode 100644 index 0000000000000..cf5052a14f396 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/index.js @@ -0,0 +1,6 @@ +it('should throw a good error when parsing file fails', async () => { + await expect(import('./broken')).rejects.toMatchObject({ + message: + "Could not parse module '[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js'", + }) +}) diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt new file mode 100644 index 0000000000000..1ee04e83ab314 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt @@ -0,0 +1,14 @@ +PlainIssue { + severity: Error, + context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js", + category: "parse", + title: "Reading source code for parsing failed", + description: "An unexpected error happened while trying to read the source source to parse: failed to convert rope into string\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 1", + detail: "", + documentation_link: "", + source: None, + sub_issues: [], + processing_path: Some( + [], + ), +} \ No newline at end of file From 1d351e59d04cbfb758a90e9f5b1ef97cb0c41b1a Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 2 May 2023 13:59:07 +0000 Subject: [PATCH 3/5] ignore broken file from prettier --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 8f620ce2ae63c..edcab939ce4c2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -21,6 +21,7 @@ packages/next/src/bundles/webpack/packages/lazy-compilation-*.js packages/next-swc/crates/**/tests/**/output* packages/next-swc/crates/core/tests/loader/issue-32553/input.js +packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js packages/next-swc/native/**/* packages/next-codemod/transforms/__testfixtures__/** From fc7f144fb1e90aed09b5c9fce174bc1be6c806e5 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 2 May 2023 14:44:24 +0000 Subject: [PATCH 4/5] update turbopack --- Cargo.lock | 66 +++++++++---------- Cargo.toml | 6 +- .../next-swc/crates/next-core/js/package.json | 4 +- pnpm-lock.yaml | 33 +++------- 4 files changed, 48 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1492fc4cf4f3b..e0a216447b48a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,7 +400,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "serde", ] @@ -3413,7 +3413,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "serde", @@ -6980,7 +6980,7 @@ dependencies = [ [[package]] name = "turbo-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "auto-hash-map", "mdxjs", @@ -7020,7 +7020,7 @@ dependencies = [ [[package]] name = "turbo-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "mimalloc", ] @@ -7028,7 +7028,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "auto-hash-map", @@ -7058,7 +7058,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "cargo-lock", @@ -7070,7 +7070,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "bytes", @@ -7085,7 +7085,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "dotenvy", @@ -7099,7 +7099,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "indexmap", @@ -7116,7 +7116,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "auto-hash-map", @@ -7145,7 +7145,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "base16", "hex", @@ -7157,7 +7157,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7171,7 +7171,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "proc-macro2", "quote", @@ -7181,7 +7181,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "auto-hash-map", @@ -7203,7 +7203,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "auto-hash-map", @@ -7215,7 +7215,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "async-recursion", @@ -7244,7 +7244,7 @@ dependencies = [ [[package]] name = "turbopack-bench" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "chromiumoxide", @@ -7274,7 +7274,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "clap 4.1.11", @@ -7291,7 +7291,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "async-trait", @@ -7318,7 +7318,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "clap 4.1.11", @@ -7331,7 +7331,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "async-trait", @@ -7353,7 +7353,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "indexmap", @@ -7374,7 +7374,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "async-compression", @@ -7408,7 +7408,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "async-trait", @@ -7444,7 +7444,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "serde", @@ -7458,7 +7458,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "indexmap", @@ -7474,7 +7474,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "base64 0.21.0", @@ -7494,7 +7494,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "serde", @@ -7509,7 +7509,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "mdxjs", @@ -7524,7 +7524,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "async-stream", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "serde", @@ -7574,7 +7574,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "swc_core", "turbo-tasks", @@ -7585,7 +7585,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.1#d8ae01ed467b9cbead909875582af9de9284d4d9" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230502.3#ac765e7cdf021dfbb5650f0e9e54e0dbc17df65a" dependencies = [ "anyhow", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 25ed18f8ceabc..c025eeb7e2e07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,11 +42,11 @@ swc_relay = { version = "0.2.7" } testing = { version = "0.33.6" } # Turbo crates -turbo-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230502.1" } +turbo-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230502.3" } # [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-230502.1" } +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230502.3" } # [TODO]: need to refactor embed_directory! macro usage in next-core -turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230502.1" } +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230502.3" } # General Deps diff --git a/packages/next-swc/crates/next-core/js/package.json b/packages/next-swc/crates/next-core/js/package.json index b5cae31c8077e..0781a08aa142f 100644 --- a/packages/next-swc/crates/next-core/js/package.json +++ b/packages/next-swc/crates/next-core/js/package.json @@ -10,8 +10,8 @@ "check": "tsc --noEmit" }, "dependencies": { - "@vercel/turbopack-dev": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.1", - "@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.1", + "@vercel/turbopack-dev": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.3", + "@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.3", "anser": "^2.1.1", "css.escape": "^1.5.1", "next": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf1097294aae9..e2061ea4061f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1020,8 +1020,8 @@ importers: '@types/react': 18.0.37 '@types/react-dom': 18.0.11 '@vercel/ncc': ^0.36.0 - '@vercel/turbopack-dev': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.1 - '@vercel/turbopack-node': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.1 + '@vercel/turbopack-dev': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.3 + '@vercel/turbopack-node': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.3 anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 @@ -1033,8 +1033,8 @@ importers: stacktrace-parser: ^0.1.10 strip-ansi: ^7.0.1 dependencies: - '@vercel/turbopack-dev': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.1_react-refresh@0.12.0' - '@vercel/turbopack-node': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.1' + '@vercel/turbopack-dev': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.3_react-refresh@0.12.0' + '@vercel/turbopack-node': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.3' anser: 2.1.1 css.escape: 1.5.1 next: link:../../../../next @@ -6004,7 +6004,7 @@ packages: dependencies: '@mdx-js/mdx': 2.2.1 source-map: 0.7.3 - webpack: 5.74.0 + webpack: 5.74.0_@swc+core@1.3.55 transitivePeerDependencies: - supports-color @@ -6674,7 +6674,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-darwin-x64/1.3.55: @@ -6683,7 +6682,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm-gnueabihf/1.3.55: @@ -6692,7 +6690,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-gnu/1.3.55: @@ -6701,7 +6698,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-musl/1.3.55: @@ -6710,7 +6706,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-gnu/1.3.55: @@ -6719,7 +6714,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-musl/1.3.55: @@ -6728,7 +6722,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-win32-arm64-msvc/1.3.55: @@ -6737,7 +6730,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-ia32-msvc/1.3.55: @@ -6746,7 +6738,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-x64-msvc/1.3.55: @@ -6755,7 +6746,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core/1.3.55_@swc+helpers@0.5.1: @@ -6780,7 +6770,6 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.55 '@swc/core-win32-ia32-msvc': 1.3.55 '@swc/core-win32-x64-msvc': 1.3.55 - dev: true /@swc/helpers/0.4.14: resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} @@ -23793,7 +23782,6 @@ packages: source-map: 0.6.1 terser: 5.14.1 webpack: 5.74.0_@swc+core@1.3.55 - dev: true /terser-webpack-plugin/5.2.4_webpack@5.74.0: resolution: {integrity: sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==} @@ -25199,7 +25187,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: true /websocket-driver/0.7.3: resolution: {integrity: sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==} @@ -25605,9 +25592,9 @@ packages: /zwitch/2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.1_react-refresh@0.12.0': - resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.1} - id: '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.1' + '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.3_react-refresh@0.12.0': + resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.3} + id: '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230502.3' name: '@vercel/turbopack-dev' version: 0.0.0 dependencies: @@ -25617,8 +25604,8 @@ packages: - webpack dev: false - '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.1': - resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.1} + '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.3': + resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230502.3} name: '@vercel/turbopack-node' version: 0.0.0 dependencies: From 4bf896aedc9981dadc074ffce035cd378bd59f81 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 2 May 2023 19:03:35 +0000 Subject: [PATCH 5/5] update snapshot --- ...6a.txt => Reading source code for parsing failed-d130ed.txt} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/{Reading source code for parsing failed-6c806a.txt => Reading source code for parsing failed-d130ed.txt} (76%) diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-d130ed.txt similarity index 76% rename from packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt rename to packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-d130ed.txt index 1ee04e83ab314..c813ac281b169 100644 --- a/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-6c806a.txt +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/issues/Reading source code for parsing failed-d130ed.txt @@ -3,7 +3,7 @@ PlainIssue { context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js", category: "parse", title: "Reading source code for parsing failed", - description: "An unexpected error happened while trying to read the source source to parse: failed to convert rope into string\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 1", + description: "An unexpected error happened while trying to read the source code to parse: failed to convert rope into string\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 1", detail: "", documentation_link: "", source: None,