diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index d73bf7a4bff31..850fa9397a828 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -375,7 +375,7 @@ jobs: run: node scripts/normalize-version-bump.js - name: Build - run: turbo run build-wasm -vvv --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }} --features tracing/release_max_level_info + run: turbo run build-wasm -vvv --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }} - name: Add target to folder name run: '[[ -d "packages/next-swc/crates/wasm/pkg" ]] && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-${{ matrix.target }} || ls packages/next-swc/crates/wasm' diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 39ad25d75f8d9..d600acfe5b27f 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -190,7 +190,7 @@ jobs: uses: ./.github/workflows/build_reusable.yml with: - afterBuild: rustup target add wasm32-unknown-unknown && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && node ./scripts/normalize-version-bump.js && turbo run build-wasm -- --target nodejs --features tracing/release_max_level_info && git checkout . && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-nodejs && node ./scripts/setup-wasm.mjs && NEXT_TEST_MODE=start TEST_WASM=true node run-tests.js test/production/pages-dir/production/test/index.test.ts test/e2e/streaming-ssr/index.test.ts + afterBuild: rustup target add wasm32-unknown-unknown && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && node ./scripts/normalize-version-bump.js && turbo run build-wasm -- --target nodejs && git checkout . && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-nodejs && node ./scripts/setup-wasm.mjs && NEXT_TEST_MODE=start TEST_WASM=true node run-tests.js test/production/pages-dir/production/test/index.test.ts test/e2e/streaming-ssr/index.test.ts stepName: 'test-next-swc-wasm' secrets: inherit diff --git a/Cargo.lock b/Cargo.lock index b96faaef70bed..1978410bb3b1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -863,15 +863,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "cobs" version = "0.2.3" @@ -1412,7 +1403,7 @@ dependencies = [ "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core", ] [[package]] @@ -1791,7 +1782,7 @@ checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "windows-sys 0.48.0", ] @@ -2479,15 +2470,6 @@ dependencies = [ "libc", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - [[package]] name = "interpolate_name" version = "0.2.4" @@ -3307,20 +3289,8 @@ dependencies = [ name = "next-build" version = "0.1.0" dependencies = [ - "anyhow", - "async-recursion", - "base64 0.21.4", "console-subscriber", - "dunce", - "indexmap 1.9.3", - "indoc", - "mime_guess", "next-core", - "serde", - "serde_json", - "tokio", - "tracing", - "tracing-subscriber", "turbo-tasks", "turbopack-binding", "vergen 7.5.1", @@ -3335,13 +3305,11 @@ dependencies = [ "async-recursion", "async-trait", "base64 0.21.4", - "const_format", "futures", "indexmap 1.9.3", "indoc", "lazy-regex", "lazy_static", - "mime", "mime_guess", "next-custom-transforms", "once_cell", @@ -3361,15 +3329,11 @@ dependencies = [ name = "next-custom-transforms" version = "0.0.0" dependencies = [ - "anyhow", "chrono", - "convert_case 0.5.0", "easy-error", "either", "fxhash", "hex", - "lazy_static", - "lightningcss", "once_cell", "pathdiff", "preset_env_base", @@ -3403,14 +3367,12 @@ dependencies = [ "next-build", "next-core", "next-custom-transforms", - "once_cell", "serde", "serde_json", "shadow-rs", "tokio", "tracing", "tracing-chrome", - "tracing-futures", "tracing-subscriber", "turbo-tasks", "turbopack-binding", @@ -3756,22 +3718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "instant", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -3782,7 +3729,7 @@ checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "smallvec", "windows-targets 0.48.1", ] @@ -4396,12 +4343,6 @@ dependencies = [ "swc_ecma_visit", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.3.5" @@ -6861,7 +6802,7 @@ checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if 1.0.0", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall", "rustix 0.38.31", "windows-sys 0.48.0", ] @@ -8543,14 +8484,9 @@ dependencies = [ "getrandom", "js-sys", "next-custom-transforms", - "once_cell", - "parking_lot_core 0.8.0", - "path-clean 0.1.0", - "serde", "serde-wasm-bindgen", "serde_json", "swc_core", - "tracing", "turbopack-binding", "wasm-bindgen", "wasm-bindgen-futures", diff --git a/packages/next-swc/crates/napi/Cargo.toml b/packages/next-swc/crates/napi/Cargo.toml index e0c3689dbb4e1..fbb633aa73c33 100644 --- a/packages/next-swc/crates/napi/Cargo.toml +++ b/packages/next-swc/crates/napi/Cargo.toml @@ -72,12 +72,10 @@ napi = { version = "2", default-features = false, features = [ napi-derive = "2" next-custom-transforms = { workspace = true } -once_cell = { workspace = true } serde = "1" serde_json = "1" shadow-rs = { workspace = true } tracing = { workspace = true } -tracing-futures = "0.2.5" tracing-subscriber = { workspace = true } tracing-chrome = "0.5.0" url = {workspace = true} diff --git a/packages/next-swc/crates/next-build/Cargo.toml b/packages/next-swc/crates/next-build/Cargo.toml index 8cbad90621279..86cf1769c6719 100644 --- a/packages/next-swc/crates/next-build/Cargo.toml +++ b/packages/next-swc/crates/next-build/Cargo.toml @@ -10,11 +10,6 @@ autobenches = false bench = false [features] -tokio_console = [ - "dep:console-subscriber", - "tokio/tracing", - "turbo-tasks/tokio_tracing", -] serializable = [] profile = [] @@ -22,20 +17,8 @@ profile = [] workspace = true [dependencies] -anyhow = { workspace = true } -async-recursion = { workspace = true } console-subscriber = { workspace = true, optional = true } -dunce = { workspace = true } next-core = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } -indoc = { workspace = true } -indexmap = { workspace = true } -mime_guess = "2.0.4" -base64 = "0.21.0" turbopack-binding = { workspace = true, features = [ "__turbo_tasks", diff --git a/packages/next-swc/crates/next-core/Cargo.toml b/packages/next-swc/crates/next-core/Cargo.toml index 1009dd70db8e2..7903941f1165a 100644 --- a/packages/next-swc/crates/next-core/Cargo.toml +++ b/packages/next-swc/crates/next-core/Cargo.toml @@ -16,7 +16,6 @@ anyhow = { workspace = true } async-recursion = { workspace = true } async-trait = { workspace = true } base64 = "0.21.0" -const_format = "0.2.30" lazy-regex = "3.0.1" next-custom-transforms = { workspace = true } once_cell = { workspace = true } @@ -25,7 +24,6 @@ regex = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } indexmap = { workspace = true, features = ["serde"] } -mime = { workspace = true } mime_guess = "2.0.4" indoc = { workspace = true } allsorts = { workspace = true } diff --git a/packages/next-swc/crates/next-custom-transforms/Cargo.toml b/packages/next-swc/crates/next-custom-transforms/Cargo.toml index 6e382f4975e90..2f65671fd49e7 100644 --- a/packages/next-swc/crates/next-custom-transforms/Cargo.toml +++ b/packages/next-swc/crates/next-custom-transforms/Cargo.toml @@ -12,7 +12,6 @@ workspace = true [dependencies] chrono = "0.4" -convert_case = "0.5.0" easy-error = "1.0.0" either = "1" fxhash = "0.2.1" @@ -25,9 +24,6 @@ serde = { workspace = true } serde_json = { workspace = true, features = ["preserve_order"] } sha1 = "0.10.1" tracing = { version = "0.1.37" } -anyhow = { workspace = true } -lazy_static = { workspace = true } -lightningcss = {workspace = true} turbopack-binding = { workspace = true, features = [ "__swc_core", diff --git a/packages/next-swc/crates/wasm/Cargo.toml b/packages/next-swc/crates/wasm/Cargo.toml index 8b0bbb1ab0c5a..bc3bf0bc680c1 100644 --- a/packages/next-swc/crates/wasm/Cargo.toml +++ b/packages/next-swc/crates/wasm/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] default = ["swc_v1"] swc_v1 = [] -plugin = ["getrandom/js", "turbopack-binding/__swc_core_binding_wasm_plugin"] +plugin = ["turbopack-binding/__swc_core_binding_wasm_plugin"] [lints] workspace = true @@ -20,12 +20,7 @@ workspace = true anyhow = "1.0.66" console_error_panic_hook = "0.1.6" next-custom-transforms = { workspace = true } -once_cell = { workspace = true } -parking_lot_core = "=0.8.0" -path-clean = "0.1" -serde = { version = "1", features = ["derive"] } serde_json = "1" -tracing = { version = "0.1.37" } wasm-bindgen = { version = "0.2", features = ["enable-interning"] } wasm-bindgen-futures = "0.4.8" getrandom = { version = "0.2.9", default-features = false, features = ["js"] }