Unverified Commit 83ff3d48 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: run NFT unit test (#83233)

Port the unit tests from https://github.com/vercel/nft/tree/941be1cb3b9d38fbc99a8a6f07af568a64ed0f12/test/unit
parent 1482af89
...@@ -227,7 +227,7 @@ jobs: ...@@ -227,7 +227,7 @@ jobs:
- name: Install node-file-trace test dependencies - name: Install node-file-trace test dependencies
if: ${{ inputs.needsNextest == 'yes' }} if: ${{ inputs.needsNextest == 'yes' }}
working-directory: turbopack/crates/turbopack/tests/node-file-trace working-directory: turbopack/crates/turbopack-tracing/tests/node-file-trace
run: pnpm install -r --side-effects-cache false run: pnpm install -r --side-effects-cache false
- run: ANALYZE=1 pnpm build - run: ANALYZE=1 pnpm build
......
...@@ -71,6 +71,8 @@ test/e2e/async-modules/amp-validator-wasm.js ...@@ -71,6 +71,8 @@ test/e2e/async-modules/amp-validator-wasm.js
/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/* /turbopack/crates/turbopack-tests/tests/snapshot/source_maps/*
/turbopack/crates/turbopack-tests/tests/**/output* /turbopack/crates/turbopack-tests/tests/**/output*
/turbopack/crates/turbopack-tests/tests/**/static /turbopack/crates/turbopack-tests/tests/**/static
/turbopack/crates/turbopack-tracing/tests/node-file-trace/test/unit/syntax-err/input.js
/turbopack/crates/turbopack-tracing/tests/node-file-trace/test/unit/tsx/lib.tsx
/apps/docs/.source/* /apps/docs/.source/*
...@@ -84,7 +86,6 @@ test/integration/edge-runtime-configurable-guards/node_modules/lib ...@@ -84,7 +86,6 @@ test/integration/edge-runtime-configurable-guards/node_modules/lib
test/production/app-dir/symbolic-file-links/src/i18n.ts test/production/app-dir/symbolic-file-links/src/i18n.ts
test/production/app-dir/symbolic-file-links/src/app/layout.tsx test/production/app-dir/symbolic-file-links/src/app/layout.tsx
test/production/app-dir/symbolic-file-links/src/app/page.tsx test/production/app-dir/symbolic-file-links/src/app/page.tsx
turbopack/crates/turbopack/tests/node-file-trace/integration/pnpm/node_modules/foo turbopack/crates/turbopack-tracing/tests/node-file-trace/integration/pnpm/node_modules/*
turbopack/crates/turbopack/tests/node-file-trace/integration/pnpm/node_modules/.pnpm/foo@2.1.0/node_modules/lodash-pnpm-test turbopack/crates/turbopack-tracing/tests/node-file-trace/integration/symlink-to-file/linked.js
turbopack/crates/turbopack/tests/node-file-trace/integration/symlink-to-file/linked.js
turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/node_modules/component turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/node_modules/component
...@@ -9467,12 +9467,8 @@ name = "turbopack" ...@@ -9467,12 +9467,8 @@ name = "turbopack"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"codspeed-criterion-compat",
"difference",
"either", "either",
"regex", "regex",
"rstest",
"rstest_reuse",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"serde", "serde",
"serde_json", "serde_json",
...@@ -9486,7 +9482,6 @@ dependencies = [ ...@@ -9486,7 +9482,6 @@ dependencies = [
"turbo-tasks-env", "turbo-tasks-env",
"turbo-tasks-fs", "turbo-tasks-fs",
"turbo-tasks-hash", "turbo-tasks-hash",
"turbo-tasks-malloc",
"turbopack-core", "turbopack-core",
"turbopack-css", "turbopack-css",
"turbopack-ecmascript", "turbopack-ecmascript",
...@@ -10078,6 +10073,29 @@ dependencies = [ ...@@ -10078,6 +10073,29 @@ dependencies = [
"turbo-tasks-malloc", "turbo-tasks-malloc",
] ]
[[package]]
name = "turbopack-tracing"
version = "0.1.0"
dependencies = [
"anyhow",
"codspeed-criterion-compat",
"difference",
"regex",
"rstest",
"rstest_reuse",
"serde",
"serde_json",
"tokio",
"turbo-rcstr",
"turbo-tasks",
"turbo-tasks-backend",
"turbo-tasks-fs",
"turbo-tasks-malloc",
"turbopack",
"turbopack-core",
"turbopack-resolve",
]
[[package]] [[package]]
name = "turbopack-wasm" name = "turbopack-wasm"
version = "0.1.0" version = "0.1.0"
......
[package]
name = "turbopack-tracing"
version = "0.1.0"
description = "TBD"
license = "MIT"
edition = "2024"
autobenches = false
[lib]
bench = false
[features]
test_persistent_cache = []
bench_against_node_nft = []
[lints]
workspace = true
[dependencies]
turbopack = { workspace = true }
[dev-dependencies]
anyhow = { workspace = true }
regex = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
turbo-rcstr = { workspace = true }
turbo-tasks = { workspace = true }
turbo-tasks-fs = { workspace = true }
turbo-tasks-malloc = { workspace = true, default-features = false }
turbo-tasks-backend = { workspace = true }
turbopack-core = { workspace = true }
turbopack-resolve = { workspace = true }
criterion = { workspace = true, features = ["async_tokio"] }
difference = "2.0"
rstest = { workspace = true }
rstest_reuse = "0.5.0"
tokio = { workspace = true }
[[bench]]
name = "mod"
harness = false
#![feature(box_patterns)]
#![feature(trivial_bounds)]
#![feature(min_specialization)]
#![feature(map_try_insert)]
#![feature(hash_set_entry)]
#![recursion_limit = "256"]
#![feature(arbitrary_self_types)]
#![feature(arbitrary_self_types_pointers)]
...@@ -3,3 +3,4 @@ dist ...@@ -3,3 +3,4 @@ dist
integration/**/dist integration/**/dist
!integration/**/node_modules !integration/**/node_modules
!integration/**/.pnpm
This diff is collapsed.
This diff is collapsed.
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