Unverified Commit a429e04f authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

test(turbopack) migrate api tests, few image tests (#55552)

### What?

PR migrates next-dev's api tests to use next.js integration tests, as well as enabling few more image tests.

Closes WEB-1599
parent deded850
...@@ -486,7 +486,7 @@ dependencies = [ ...@@ -486,7 +486,7 @@ dependencies = [
[[package]] [[package]]
name = "auto-hash-map" name = "auto-hash-map"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"serde", "serde",
] ]
...@@ -4246,7 +4246,7 @@ dependencies = [ ...@@ -4246,7 +4246,7 @@ dependencies = [
[[package]] [[package]]
name = "node-file-trace" name = "node-file-trace"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"serde", "serde",
...@@ -8267,7 +8267,7 @@ dependencies = [ ...@@ -8267,7 +8267,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks" name = "turbo-tasks"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
...@@ -8299,7 +8299,7 @@ dependencies = [ ...@@ -8299,7 +8299,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-build" name = "turbo-tasks-build"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo-lock", "cargo-lock",
...@@ -8311,7 +8311,7 @@ dependencies = [ ...@@ -8311,7 +8311,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-bytes" name = "turbo-tasks-bytes"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
...@@ -8326,7 +8326,7 @@ dependencies = [ ...@@ -8326,7 +8326,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-env" name = "turbo-tasks-env"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dotenvs", "dotenvs",
...@@ -8340,7 +8340,7 @@ dependencies = [ ...@@ -8340,7 +8340,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-fetch" name = "turbo-tasks-fetch"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 1.9.3", "indexmap 1.9.3",
...@@ -8357,7 +8357,7 @@ dependencies = [ ...@@ -8357,7 +8357,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-fs" name = "turbo-tasks-fs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"auto-hash-map", "auto-hash-map",
...@@ -8387,7 +8387,7 @@ dependencies = [ ...@@ -8387,7 +8387,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-hash" name = "turbo-tasks-hash"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"base16", "base16",
"hex", "hex",
...@@ -8399,7 +8399,7 @@ dependencies = [ ...@@ -8399,7 +8399,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-macros" name = "turbo-tasks-macros"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"convert_case 0.6.0", "convert_case 0.6.0",
...@@ -8413,7 +8413,7 @@ dependencies = [ ...@@ -8413,7 +8413,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-macros-shared" name = "turbo-tasks-macros-shared"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
...@@ -8423,7 +8423,7 @@ dependencies = [ ...@@ -8423,7 +8423,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-malloc" name = "turbo-tasks-malloc"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"mimalloc", "mimalloc",
] ]
...@@ -8431,7 +8431,7 @@ dependencies = [ ...@@ -8431,7 +8431,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-memory" name = "turbo-tasks-memory"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"auto-hash-map", "auto-hash-map",
...@@ -8454,7 +8454,7 @@ dependencies = [ ...@@ -8454,7 +8454,7 @@ dependencies = [
[[package]] [[package]]
name = "turbo-tasks-testing" name = "turbo-tasks-testing"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"auto-hash-map", "auto-hash-map",
...@@ -8467,7 +8467,7 @@ dependencies = [ ...@@ -8467,7 +8467,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack" name = "turbopack"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-recursion", "async-recursion",
...@@ -8498,7 +8498,7 @@ dependencies = [ ...@@ -8498,7 +8498,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-bench" name = "turbopack-bench"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chromiumoxide", "chromiumoxide",
...@@ -8528,7 +8528,7 @@ dependencies = [ ...@@ -8528,7 +8528,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-binding" name = "turbopack-binding"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"auto-hash-map", "auto-hash-map",
"mdxjs", "mdxjs",
...@@ -8571,7 +8571,7 @@ dependencies = [ ...@@ -8571,7 +8571,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-build" name = "turbopack-build"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 1.9.3", "indexmap 1.9.3",
...@@ -8593,7 +8593,7 @@ dependencies = [ ...@@ -8593,7 +8593,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-cli-utils" name = "turbopack-cli-utils"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap 4.4.2", "clap 4.4.2",
...@@ -8617,7 +8617,7 @@ dependencies = [ ...@@ -8617,7 +8617,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-core" name = "turbopack-core"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-recursion", "async-recursion",
...@@ -8646,7 +8646,7 @@ dependencies = [ ...@@ -8646,7 +8646,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-create-test-app" name = "turbopack-create-test-app"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap 4.4.2", "clap 4.4.2",
...@@ -8659,7 +8659,7 @@ dependencies = [ ...@@ -8659,7 +8659,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-css" name = "turbopack-css"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
...@@ -8681,7 +8681,7 @@ dependencies = [ ...@@ -8681,7 +8681,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-dev" name = "turbopack-dev"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 1.9.3", "indexmap 1.9.3",
...@@ -8705,7 +8705,7 @@ dependencies = [ ...@@ -8705,7 +8705,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-dev-server" name = "turbopack-dev-server"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-compression", "async-compression",
...@@ -8742,7 +8742,7 @@ dependencies = [ ...@@ -8742,7 +8742,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-ecmascript" name = "turbopack-ecmascript"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
...@@ -8776,7 +8776,7 @@ dependencies = [ ...@@ -8776,7 +8776,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-ecmascript-hmr-protocol" name = "turbopack-ecmascript-hmr-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
...@@ -8787,7 +8787,7 @@ dependencies = [ ...@@ -8787,7 +8787,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-ecmascript-plugins" name = "turbopack-ecmascript-plugins"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
...@@ -8810,7 +8810,7 @@ dependencies = [ ...@@ -8810,7 +8810,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-ecmascript-runtime" name = "turbopack-ecmascript-runtime"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indoc", "indoc",
...@@ -8827,7 +8827,7 @@ dependencies = [ ...@@ -8827,7 +8827,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-env" name = "turbopack-env"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 1.9.3", "indexmap 1.9.3",
...@@ -8843,7 +8843,7 @@ dependencies = [ ...@@ -8843,7 +8843,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-image" name = "turbopack-image"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.21.4", "base64 0.21.4",
...@@ -8863,7 +8863,7 @@ dependencies = [ ...@@ -8863,7 +8863,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-json" name = "turbopack-json"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"serde", "serde",
...@@ -8878,7 +8878,7 @@ dependencies = [ ...@@ -8878,7 +8878,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-mdx" name = "turbopack-mdx"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"mdxjs", "mdxjs",
...@@ -8893,7 +8893,7 @@ dependencies = [ ...@@ -8893,7 +8893,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-node" name = "turbopack-node"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-stream", "async-stream",
...@@ -8928,7 +8928,7 @@ dependencies = [ ...@@ -8928,7 +8928,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-static" name = "turbopack-static"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"serde", "serde",
...@@ -8944,7 +8944,7 @@ dependencies = [ ...@@ -8944,7 +8944,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-swc-utils" name = "turbopack-swc-utils"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"swc_core", "swc_core",
"turbo-tasks", "turbo-tasks",
...@@ -8955,7 +8955,7 @@ dependencies = [ ...@@ -8955,7 +8955,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-test-utils" name = "turbopack-test-utils"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"once_cell", "once_cell",
...@@ -8973,7 +8973,7 @@ dependencies = [ ...@@ -8973,7 +8973,7 @@ dependencies = [
[[package]] [[package]]
name = "turbopack-wasm" name = "turbopack-wasm"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230917.1#26fff7c02657cd006f48631077c705322aefec89" source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230918.2#10799c6a4e57552a58bd57a1f6b4b4e89e249320"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 1.9.3", "indexmap 1.9.3",
......
...@@ -45,11 +45,11 @@ swc_core = { version = "0.83.12", features = [ ...@@ -45,11 +45,11 @@ swc_core = { version = "0.83.12", features = [
testing = { version = "0.34.1" } testing = { version = "0.34.1" }
# Turbo crates # Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230917.1" } turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230918.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros.. # [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-230917.1" } turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230918.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core # [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230917.1" } turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230918.2" }
# General Deps # General Deps
......
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
hello: string
input?: string | string[]
}
export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
res.status(200).json({ hello: 'world', input: req.query.input })
}
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextRequest } from 'next/server'
export const config = {
runtime: 'edge',
}
export default function handler(req: NextRequest) {
const { searchParams } = new URL(req.url)
return new Response(
JSON.stringify({ hello: 'world', input: searchParams.get('input') }),
{
status: 200,
headers: {
'content-type': 'application/json',
},
}
)
}
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
hello: string
input?: string | string[]
}
export default async function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
const innerRes = await fetch(
`http://127.0.0.1:${process.env.PORT}/api/basic?input=test`
)
const json = await innerRes.json()
res.status(200).json(json)
}
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
hello: string
input?: string | string[]
}
export default async function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
const innerRes = await fetch(
`http://[::1]:${process.env.PORT}/api/basic?input=test`
)
const json = await innerRes.json()
res.status(200).json(json)
}
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
hello: string
input?: string | string[]
}
export default async function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
const innerRes = await fetch(
`http://localhost:${process.env.PORT}/api/basic?input=test`
)
const json = await innerRes.json()
res.status(200).json(json)
}
import { useTestHarness, Harness } from '@turbo/pack-test-harness'
export default function Page() {
useTestHarness(runTests)
return <h1>Ready</h1>
}
let once = true
function runTests(harness: Harness) {
if (!once) return
once = false
it('should run a basic API request', async () => {
const res = await fetch('/api/basic?input=test')
const json = await res.json()
expect(json).toEqual({ hello: 'world', input: 'test' })
})
it('should run a basic edge API request', async () => {
const res = await fetch('/api/edge?input=test')
const json = await res.json()
expect(json).toEqual({ hello: 'world', input: 'test' })
})
it('should be able to use PORT and fetch from localhost', async () => {
const res = await fetch('/api/localhost')
const json = await res.json()
expect(json).toEqual({ hello: 'world', input: 'test' })
})
it('should be able to use PORT and fetch from 127.0.0.1', async () => {
const res = await fetch('/api/ipv4')
const json = await res.json()
expect(json).toEqual({ hello: 'world', input: 'test' })
})
it('should be able to use PORT and fetch from [::1]', async () => {
const res = await fetch('/api/ipv6')
const json = await res.json()
expect(json).toEqual({ hello: 'world', input: 'test' })
})
}
warning - [parse] [project]/packages/next/dist/server/web/sandbox/context.js /packages/next/dist/server/web/sandbox/context.js:64:56 lint TP1004 fs.readFile(???*0*) is very dynamic
60 | }
61 | async function loadWasm(wasm) {
62 | const modules = {};
63 | await Promise.all(wasm.map(async (binding)=>{
+ v
64 + const module1 = await WebAssembly.compile(await _fs.promises.readFile(binding.filePath));
+ ^
65 | modules[binding.name] = module1;
66 | }));
67 | return modules;
68 | }
- *0* ???*1*["filePath"]
⚠️ unknown object
- *1* binding
⚠️ pattern without value
\ No newline at end of file
warning - [parse] [project]/packages/next/dist/server/web/sandbox/context.js /packages/next/dist/server/web/sandbox/context.js:355:28 lint TP1004 fs.readFileSync(???*0*, "utf-8") is very dynamic
351 | }
352 | const moduleContext = lazyModuleContext;
353 | const evaluateInContext = (filepath)=>{
354 | if (!moduleContext.paths.has(filepath)) {
+ v
355 + const content = (0, _fs.readFileSync)(filepath, "utf-8");
+ ^
356 | try {
357 | (0, _vm.runInContext)(content, moduleContext.runtime.context, {
358 | filename: filepath
359 | });
- *0* filepath
⚠️ pattern without value
\ No newline at end of file
...@@ -112,6 +112,7 @@ const enabledTests = [ ...@@ -112,6 +112,7 @@ const enabledTests = [
'test/e2e/typescript-version-no-warning/typescript-version-no-warning.test.ts', 'test/e2e/typescript-version-no-warning/typescript-version-no-warning.test.ts',
'test/e2e/typescript-version-warning/typescript-version-warning.test.ts', 'test/e2e/typescript-version-warning/typescript-version-warning.test.ts',
'test/e2e/undici-fetch/index.test.ts', 'test/e2e/undici-fetch/index.test.ts',
'test/integration/api-support/test/index.test.js',
'test/integration/404-page/test/index.test.js', 'test/integration/404-page/test/index.test.js',
'test/integration/404-page-app/test/index.test.js', 'test/integration/404-page-app/test/index.test.js',
'test/integration/404-page-custom-error/test/index.test.js', 'test/integration/404-page-custom-error/test/index.test.js',
...@@ -122,6 +123,8 @@ const enabledTests = [ ...@@ -122,6 +123,8 @@ const enabledTests = [
'test/integration/index-index/test/index.test.js', 'test/integration/index-index/test/index.test.js',
'test/integration/next-image-new/middleware/test/index.test.ts', 'test/integration/next-image-new/middleware/test/index.test.ts',
'test/integration/next-image-new/react-virtualized/test/index.test.ts', 'test/integration/next-image-new/react-virtualized/test/index.test.ts',
'test/integration/next-image-new/typescript/test/index.test.ts',
'test/integration/next-image-new/unoptimized/test/index.test.ts',
'test/integration/revalidate-as-path/test/index.test.js', 'test/integration/revalidate-as-path/test/index.test.js',
'test/integration/rewrites-destination-query-array/test/index.test.js', 'test/integration/rewrites-destination-query-array/test/index.test.js',
'test/integration/root-optional-revalidate/test/index.test.js', 'test/integration/root-optional-revalidate/test/index.test.js',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment