Unverified Commit 6b0a6f0c authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

add turbopack integration tests to CI (#50904)

### What?

* enable turbopack tests in new CI
* split pre-build step into native and JS builds to allow to start
native tests faster
* update swc_core to sync with turbo
* update turbopack

### Why?

Running our test suite is still important as long we don't have the full
integration test suite enabled.

### Turbopack updates

* https://github.com/vercel/turbo/pull/5215 <!-- OJ Kwon - ci(workflow):
upload benchmark results to datadog -->
* https://github.com/vercel/turbo/pull/5239 <!-- OJ Kwon -
fix(swc_plugin): use shared runtime -->
* https://github.com/vercel/turbo/pull/3090 <!-- CHEN Yuan - Docs: prior
to run testcases, add guides to install dependencies for testcases. -->
* https://github.com/vercel/turbo/pull/5264 <!-- Tobias Koppers - update
test runner -->

---------
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent b870bf22
...@@ -5,5 +5,5 @@ filter = "package(next-dev-tests)" ...@@ -5,5 +5,5 @@ filter = "package(next-dev-tests)"
leak-timeout = "500ms" leak-timeout = "500ms"
retries = 2 retries = 2
slow-timeout = "60s" slow-timeout = "60s"
threads-required = 2 threads-required = 4
failure-output = "immediate-final" failure-output = "immediate-final"
\ No newline at end of file
...@@ -28,14 +28,23 @@ env: ...@@ -28,14 +28,23 @@ env:
NEXT_TEST_JOB: 1 NEXT_TEST_JOB: 1
jobs: jobs:
build: build-native:
name: build name: build-native
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with:
skipInstallBuild: 'yes'
secrets: inherit
build-next:
name: build-next
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
secrets: inherit secrets: inherit
lint: lint:
name: lint name: lint
needs: ['build'] needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
...@@ -44,7 +53,7 @@ jobs: ...@@ -44,7 +53,7 @@ jobs:
check-types-precompiled: check-types-precompiled:
name: types and precompiled name: types and precompiled
needs: ['build'] needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
...@@ -54,29 +63,56 @@ jobs: ...@@ -54,29 +63,56 @@ jobs:
test-cargo-unit: test-cargo-unit:
name: test cargo unit name: test cargo unit
needs: ['build'] needs: ['build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
skipForDocsOnly: 'yes' skipForDocsOnly: 'yes'
needsRust: 'yes'
skipInstallBuild: 'yes' skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: turbo run test-cargo-unit afterBuild: turbo run test-cargo-unit
secrets: inherit secrets: inherit
test-cargo-integration:
name: test cargo integration
needs: ['build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsNextest: 'yes'
needsRust: 'yes'
skipNativeBuild: 'yes'
afterBuild: xvfb-run turbo run test-cargo-integration
test-cargo-bench:
name: test cargo benchmarks
needs: ['build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipNativeBuild: 'yes'
afterBuild: xvfb-run turbo run test-cargo-bench
rust-check: rust-check:
name: rust check name: rust check
needs: ['build'] needs: ['build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
skipForDocsOnly: 'yes' skipForDocsOnly: 'yes'
needsRust: 'yes'
skipInstallBuild: 'yes' skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: turbo run rust-check afterBuild: turbo run rust-check
secrets: inherit secrets: inherit
test-turbopack-dev: test-turbopack-dev:
name: test turbopack dev name: test turbopack dev
needs: ['build'] needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
skipForDocsOnly: 'yes' skipForDocsOnly: 'yes'
...@@ -85,8 +121,7 @@ jobs: ...@@ -85,8 +121,7 @@ jobs:
test-next-swc-wasm: test-next-swc-wasm:
name: test next-swc wasm name: test next-swc wasm
needs: ['build'] needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
skipForDocsOnly: 'yes' skipForDocsOnly: 'yes'
...@@ -95,7 +130,7 @@ jobs: ...@@ -95,7 +130,7 @@ jobs:
test-dev: test-dev:
name: test dev name: test dev
needs: ['build'] needs: ['build-native', 'build-next']
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
...@@ -109,7 +144,7 @@ jobs: ...@@ -109,7 +144,7 @@ jobs:
test-prod: test-prod:
name: test prod name: test prod
needs: ['build'] needs: ['build-native', 'build-next']
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
...@@ -123,7 +158,7 @@ jobs: ...@@ -123,7 +158,7 @@ jobs:
test-integration: test-integration:
name: test integration name: test integration
needs: ['build'] needs: ['build-native', 'build-next']
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
...@@ -138,7 +173,7 @@ jobs: ...@@ -138,7 +173,7 @@ jobs:
test-firefox-safari: test-firefox-safari:
name: test firefox and safari name: test firefox and safari
needs: ['build'] needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
...@@ -149,13 +184,16 @@ jobs: ...@@ -149,13 +184,16 @@ jobs:
tests-pass: tests-pass:
needs: needs:
[ [
'build', 'build-native',
'build-next',
'lint', 'lint',
'check-types-precompiled', 'check-types-precompiled',
'test-dev', 'test-dev',
'test-prod', 'test-prod',
'test-integration', 'test-integration',
'test-cargo-unit', 'test-cargo-unit',
'test-cargo-integration',
'test-cargo-bench',
'rust-check', 'rust-check',
'test-next-swc-wasm', 'test-next-swc-wasm',
'test-turbopack-dev', 'test-turbopack-dev',
......
...@@ -11,6 +11,10 @@ on: ...@@ -11,6 +11,10 @@ on:
required: false required: false
description: 'whether to skip pnpm install && pnpm build' description: 'whether to skip pnpm install && pnpm build'
type: string type: string
skipNativeBuild:
required: false
description: 'whether to skip building native modules'
type: string
skipForDocsOnly: skipForDocsOnly:
required: false required: false
description: 'skip for docs only changes' description: 'skip for docs only changes'
...@@ -19,6 +23,10 @@ on: ...@@ -19,6 +23,10 @@ on:
required: false required: false
description: 'version of Node.js to use' description: 'version of Node.js to use'
type: string type: string
needsRust:
required: false
description: 'if rust is needed'
type: string
needsNextest: needsNextest:
required: false required: false
description: 'if nextest rust dep is needed' description: 'if nextest rust dep is needed'
...@@ -67,6 +75,7 @@ jobs: ...@@ -67,6 +75,7 @@ jobs:
# local action -> needs to run after checkout # local action -> needs to run after checkout
- name: Install Rust - name: Install Rust
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
with: with:
components: rustfmt, clippy components: rustfmt, clippy
...@@ -75,11 +84,15 @@ jobs: ...@@ -75,11 +84,15 @@ jobs:
uses: taiki-e/install-action@nextest uses: taiki-e/install-action@nextest
- run: rustc --version - run: rustc --version
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
- run: npm i -g yarn "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}" - run: npm i -g yarn "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}"
# clean up any previous artifacts to avoid hitting disk space limits # clean up any previous artifacts to avoid hitting disk space limits
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target && cargo clean - run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target
- run: cargo clean
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
- run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT - run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT
name: check docs only change name: check docs only change
...@@ -90,6 +103,7 @@ jobs: ...@@ -90,6 +103,7 @@ jobs:
name: normalize versions name: normalize versions
- run: turbo run build-native-release --summarize -- --target x86_64-unknown-linux-gnu - run: turbo run build-native-release --summarize -- --target x86_64-unknown-linux-gnu
if: ${{ inputs.skipNativeBuild != 'yes' }}
- name: Upload next-swc artifact - name: Upload next-swc artifact
if: ${{ inputs.uploadSwcArtifact == 'yes' }} if: ${{ inputs.uploadSwcArtifact == 'yes' }}
......
This diff is collapsed.
...@@ -38,15 +38,15 @@ next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-tran ...@@ -38,15 +38,15 @@ next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-tran
# SWC crates # SWC crates
# Keep consistent with preset_env_base through swc_core # Keep consistent with preset_env_base through swc_core
swc_core = { version = "0.76.41" } swc_core = { version = "0.76.46" }
testing = { version = "0.33.13" } testing = { version = "0.33.13" }
# Turbo crates # Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230608.1" } turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230612.1" }
# [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-230608.1" } turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230612.1" }
# [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-230608.1" } turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230612.1" }
# General Deps # General Deps
...@@ -56,12 +56,12 @@ turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack ...@@ -56,12 +56,12 @@ turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack
# and some aren't buildable with rustls. # and some aren't buildable with rustls.
reqwest = { version = "0.11.14", default-features = false } reqwest = { version = "0.11.14", default-features = false }
chromiumoxide = { version = "0.4.0", features = [ chromiumoxide = { version = "0.5.0", features = [
"tokio-runtime", "tokio-runtime",
], default-features = false } ], default-features = false }
# For matching on errors from chromiumoxide. Keep in # For matching on errors from chromiumoxide. Keep in
# sync with chromiumoxide's tungstenite requirement. # sync with chromiumoxide's tungstenite requirement.
tungstenite = "0.17.3" tungstenite = "0.18.0"
# flate2_zlib requires zlib, use flate2_rust # flate2_zlib requires zlib, use flate2_rust
allsorts = { version = "0.14.0", default_features = false, features = [ allsorts = { version = "0.14.0", default_features = false, features = [
......
/* __next_internal_action_entry_do_not_use__ $$ACTION_1,$$ACTION_3 */ import __create_action_proxy__ from "private-next-rsc-action-proxy"; /* __next_internal_action_entry_do_not_use__ $$ACTION_1,$$ACTION_3 */ import __create_action_proxy__ from "private-next-rsc-action-proxy";
import deleteFromDb from 'db'; import deleteFromDb from 'db';
const v1 = 'v1'; const v1 = 'v1';
export function Item({ id1 , id2 }) { export function Item({ id1, id2 }) {
const v2 = id2; const v2 = id2;
return <> return <>
......
/* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ import __create_action_proxy__ from "private-next-rsc-action-proxy"; /* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ import __create_action_proxy__ from "private-next-rsc-action-proxy";
export function Item({ value }) { export function Item({ value }) {
return <> return <>
<Button action={$$ACTION_0 = async (...args)=>$$ACTION_1.apply(null, ($$ACTION_0.$$bound || []).concat(args)), __create_action_proxy__("188d5d945750dc32e2c842b93c75a65763d4a922", [ <Button action={$$ACTION_0 = async (...args)=>$$ACTION_1.apply(null, ($$ACTION_0.$$bound || []).concat(args)), __create_action_proxy__("188d5d945750dc32e2c842b93c75a65763d4a922", [
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
"check": "tsc --noEmit" "check": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1", "@vercel/turbopack-ecmascript-runtime": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230612.1",
"@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230608.1", "@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230612.1",
"anser": "^2.1.1", "anser": "^2.1.1",
"css.escape": "^1.5.1", "css.escape": "^1.5.1",
"next": "*", "next": "*",
......
...@@ -37,6 +37,7 @@ rand = { workspace = true } ...@@ -37,6 +37,7 @@ rand = { workspace = true }
regex = { workspace = true } regex = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tempdir = "0.3.7"
testing = { workspace = true } testing = { workspace = true }
tokio = { workspace = true, features = ["full"] } tokio = { workspace = true, features = ["full"] }
# For matching on errors from chromiumoxide. Keep in # For matching on errors from chromiumoxide. Keep in
......
...@@ -35,6 +35,7 @@ use next_dev::{EntryRequest, NextDevServerBuilder}; ...@@ -35,6 +35,7 @@ use next_dev::{EntryRequest, NextDevServerBuilder};
use owo_colors::OwoColorize; use owo_colors::OwoColorize;
use regex::{Captures, Regex, Replacer}; use regex::{Captures, Regex, Replacer};
use serde::Deserialize; use serde::Deserialize;
use tempdir::TempDir;
use tokio::{ use tokio::{
net::TcpSocket, net::TcpSocket,
sync::mpsc::{unbounded_channel, UnboundedSender}, sync::mpsc::{unbounded_channel, UnboundedSender},
...@@ -351,8 +352,11 @@ async fn run_test(resource: PathBuf) -> JsResult { ...@@ -351,8 +352,11 @@ async fn run_test(resource: PathBuf) -> JsResult {
result result
} }
async fn create_browser(is_debugging: bool) -> Result<(Browser, JoinSet<()>)> { async fn create_browser(is_debugging: bool) -> Result<(Browser, TempDir, JoinSet<()>)> {
let mut config_builder = BrowserConfig::builder(); let mut config_builder = BrowserConfig::builder();
config_builder = config_builder.no_sandbox();
let tmp = TempDir::new("chromiumoxid").unwrap();
config_builder = config_builder.user_data_dir(&tmp);
if is_debugging { if is_debugging {
config_builder = config_builder config_builder = config_builder
.with_head() .with_head()
...@@ -386,7 +390,7 @@ async fn create_browser(is_debugging: bool) -> Result<(Browser, JoinSet<()>)> { ...@@ -386,7 +390,7 @@ async fn create_browser(is_debugging: bool) -> Result<(Browser, JoinSet<()>)> {
} }
}); });
Ok((browser, set)) Ok((browser, tmp, set))
} }
const TURBOPACK_READY_BINDING: &str = "TURBOPACK_READY"; const TURBOPACK_READY_BINDING: &str = "TURBOPACK_READY";
...@@ -400,8 +404,10 @@ const BINDINGS: [&str; 3] = [ ...@@ -400,8 +404,10 @@ const BINDINGS: [&str; 3] = [
async fn run_browser(addr: SocketAddr, project_dir: &Path) -> Result<JsResult> { async fn run_browser(addr: SocketAddr, project_dir: &Path) -> Result<JsResult> {
let is_debugging = *DEBUG_BROWSER; let is_debugging = *DEBUG_BROWSER;
let (browser, mut handle) = create_browser(is_debugging).await?; println!("starting browser...");
let (browser, _tmp, mut handle) = create_browser(is_debugging).await?;
println!("open about:blank...");
// `browser.new_page()` opens a tab, navigates to the destination, and waits for // `browser.new_page()` opens a tab, navigates to the destination, and waits for
// the page to load. chromiumoxide/Chrome DevTools Protocol has been flakey, // the page to load. chromiumoxide/Chrome DevTools Protocol has been flakey,
// returning `ChannelSendError`s (WEB-259). Retry if necessary. // returning `ChannelSendError`s (WEB-259). Retry if necessary.
...@@ -435,10 +441,12 @@ async fn run_browser(addr: SocketAddr, project_dir: &Path) -> Result<JsResult> { ...@@ -435,10 +441,12 @@ async fn run_browser(addr: SocketAddr, project_dir: &Path) -> Result<JsResult> {
.await .await
.context("Unable to listen to response received events")?; .context("Unable to listen to response received events")?;
println!("start navigating to http://{addr}...");
page.evaluate_expression(format!("window.location='http://{addr}'")) page.evaluate_expression(format!("window.location='http://{addr}'"))
.await .await
.context("Unable to evaluate javascript to naviagate to target page")?; .context("Unable to evaluate javascript to naviagate to target page")?;
println!("waiting for navigation...");
// Wait for the next network response event // Wait for the next network response event
// This is the HTML page that we're testing // This is the HTML page that we're testing
network_response_events.next().await.context( network_response_events.next().await.context(
...@@ -452,6 +460,7 @@ async fn run_browser(addr: SocketAddr, project_dir: &Path) -> Result<JsResult> { ...@@ -452,6 +460,7 @@ async fn run_browser(addr: SocketAddr, project_dir: &Path) -> Result<JsResult> {
.await; .await;
} }
println!("finished navigation to http://{addr}");
let mut errors_next = errors.next(); let mut errors_next = errors.next();
let mut bindings_next = binding_events.next(); let mut bindings_next = binding_events.next();
let mut console_next = console_events.next(); let mut console_next = console_events.next();
......
...@@ -14,7 +14,7 @@ function runTests() { ...@@ -14,7 +14,7 @@ function runTests() {
expect(interNoArgs).toEqual({ expect(interNoArgs).toEqual({
className: 'className__inter_34ab8b4d__7bdff866', className: 'className__inter_34ab8b4d__7bdff866',
style: { style: {
fontFamily: "'__Inter_34ab8b'", fontFamily: "'__Inter_34ab8b', '__Inter_Fallback_34ab8b'",
fontStyle: 'normal', fontStyle: 'normal',
}, },
}) })
......
...@@ -17,7 +17,7 @@ function runTests() { ...@@ -17,7 +17,7 @@ function runTests() {
expect(interNoArgs).toEqual({ expect(interNoArgs).toEqual({
className: 'className__inter_34ab8b4d__7bdff866', className: 'className__inter_34ab8b4d__7bdff866',
style: { style: {
fontFamily: "'__Inter_34ab8b'", fontFamily: "'__Inter_34ab8b', '__Inter_Fallback_34ab8b'",
fontStyle: 'normal', fontStyle: 'normal',
}, },
}) })
...@@ -26,7 +26,9 @@ function runTests() { ...@@ -26,7 +26,9 @@ function runTests() {
it('includes a rule styling the exported className', async () => { it('includes a rule styling the exported className', async () => {
const matchingRule = await getRuleMatchingClassName(interNoArgs.className) const matchingRule = await getRuleMatchingClassName(interNoArgs.className)
expect(matchingRule).toBeTruthy() expect(matchingRule).toBeTruthy()
expect(matchingRule.style.fontFamily).toEqual('__Inter_34ab8b') expect(matchingRule.style.fontFamily).toEqual(
'__Inter_34ab8b, __Inter_Fallback_34ab8b'
)
expect(matchingRule.style.fontStyle).toEqual('normal') expect(matchingRule.style.fontStyle).toEqual('normal')
}) })
...@@ -34,7 +36,7 @@ function runTests() { ...@@ -34,7 +36,7 @@ function runTests() {
expect(interWithVariableName).toEqual({ expect(interWithVariableName).toEqual({
className: 'className__inter_c6e282f1__e152ac0c', className: 'className__inter_c6e282f1__e152ac0c',
style: { style: {
fontFamily: "'__Inter_c6e282'", fontFamily: "'__Inter_c6e282', '__Inter_Fallback_c6e282'",
fontStyle: 'normal', fontStyle: 'normal',
}, },
variable: 'variable__inter_c6e282f1__e152ac0c', variable: 'variable__inter_c6e282f1__e152ac0c',
...@@ -44,7 +46,7 @@ function runTests() { ...@@ -44,7 +46,7 @@ function runTests() {
interWithVariableName.variable interWithVariableName.variable
) )
expect(matchingRule.styleMap.get('--my-font').toString().trim()).toBe( expect(matchingRule.styleMap.get('--my-font').toString().trim()).toBe(
'"__Inter_c6e282"' '"__Inter_c6e282", "__Inter_Fallback_c6e282"'
) )
}) })
} }
......
...@@ -11,5 +11,5 @@ bench = false ...@@ -11,5 +11,5 @@ bench = false
[dependencies] [dependencies]
rustc-hash = { workspace = true } rustc-hash = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true, features = ["preserve_order"] }
swc_core = { workspace = true } swc_core = { workspace = true }
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
"build-wasm": "wasm-pack build crates/wasm --scope=next", "build-wasm": "wasm-pack build crates/wasm --scope=next",
"cache-build-native": "echo $(ls native)", "cache-build-native": "echo $(ls native)",
"rust-check": "cd ../../; cargo fmt -- --check && cargo clippy --all -- -D warnings -A deprecated && cargo check -p next-dev --no-default-features --features cli,custom_allocator,rustls-tls,__internal_nextjs_integration_test && rm -rf target", "rust-check": "cd ../../; cargo fmt -- --check && cargo clippy --all -- -D warnings -A deprecated && cargo check -p next-dev --no-default-features --features cli,custom_allocator,rustls-tls,__internal_nextjs_integration_test && rm -rf target",
"test-cargo-unit": "cargo test --workspace --exclude next-dev-tests" "test-cargo-unit": "cargo test --workspace --exclude next-dev-tests",
"test-cargo-integration": "cross-env CARGO_PROFILE_RELEASE_LTO=false cargo nextest run -p next-dev-tests --release --no-fail-fast",
"test-cargo-bench": "cross-env CARGO_PROFILE_RELEASE_LTO=false TURBOPACK_BENCH_COUNTS=10 TURBOPACK_BENCH_CACHED=1 TURBOPACK_BENCH_PROGRESS=1 cargo test --benches -p next-dev --release --no-fail-fast"
}, },
"napi": { "napi": {
"name": "next-swc", "name": "next-swc",
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@napi-rs/cli": "2.14.7" "@napi-rs/cli": "2.14.7",
"cross-env": "6.0.3"
} }
} }
...@@ -968,8 +968,10 @@ importers: ...@@ -968,8 +968,10 @@ importers:
packages/next-swc: packages/next-swc:
specifiers: specifiers:
'@napi-rs/cli': 2.14.7 '@napi-rs/cli': 2.14.7
cross-env: 6.0.3
devDependencies: devDependencies:
'@napi-rs/cli': 2.14.7 '@napi-rs/cli': 2.14.7
cross-env: 6.0.3
packages/next-swc/crates/next-core/js: packages/next-swc/crates/next-core/js:
specifiers: specifiers:
...@@ -978,8 +980,8 @@ importers: ...@@ -978,8 +980,8 @@ importers:
'@types/react': 18.2.7 '@types/react': 18.2.7
'@types/react-dom': 18.2.4 '@types/react-dom': 18.2.4
'@vercel/ncc': ^0.36.0 '@vercel/ncc': ^0.36.0
'@vercel/turbopack-ecmascript-runtime': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1 '@vercel/turbopack-ecmascript-runtime': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230612.1
'@vercel/turbopack-node': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230608.1 '@vercel/turbopack-node': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230612.1
anser: ^2.1.1 anser: ^2.1.1
css.escape: ^1.5.1 css.escape: ^1.5.1
find-up: ^6.3.0 find-up: ^6.3.0
...@@ -991,8 +993,8 @@ importers: ...@@ -991,8 +993,8 @@ importers:
stacktrace-parser: ^0.1.10 stacktrace-parser: ^0.1.10
strip-ansi: ^7.0.1 strip-ansi: ^7.0.1
dependencies: dependencies:
'@vercel/turbopack-ecmascript-runtime': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1_react-refresh@0.12.0' '@vercel/turbopack-ecmascript-runtime': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230612.1_react-refresh@0.12.0'
'@vercel/turbopack-node': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230608.1' '@vercel/turbopack-node': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230612.1'
anser: 2.1.1 anser: 2.1.1
css.escape: 1.5.1 css.escape: 1.5.1
next: link:../../../../next next: link:../../../../next
...@@ -6110,7 +6112,7 @@ packages: ...@@ -6110,7 +6112,7 @@ packages:
dependencies: dependencies:
'@mdx-js/mdx': 2.2.1 '@mdx-js/mdx': 2.2.1
source-map: 0.7.3 source-map: 0.7.3
webpack: 5.86.0 webpack: 5.86.0_@swc+core@1.3.55
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
...@@ -6784,7 +6786,6 @@ packages: ...@@ -6784,7 +6786,6 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-darwin-x64/1.3.55: /@swc/core-darwin-x64/1.3.55:
...@@ -6793,7 +6794,6 @@ packages: ...@@ -6793,7 +6794,6 @@ packages:
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-linux-arm-gnueabihf/1.3.55: /@swc/core-linux-arm-gnueabihf/1.3.55:
...@@ -6802,7 +6802,6 @@ packages: ...@@ -6802,7 +6802,6 @@ packages:
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-linux-arm64-gnu/1.3.55: /@swc/core-linux-arm64-gnu/1.3.55:
...@@ -6811,7 +6810,6 @@ packages: ...@@ -6811,7 +6810,6 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-linux-arm64-musl/1.3.55: /@swc/core-linux-arm64-musl/1.3.55:
...@@ -6820,7 +6818,6 @@ packages: ...@@ -6820,7 +6818,6 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-linux-x64-gnu/1.3.55: /@swc/core-linux-x64-gnu/1.3.55:
...@@ -6829,7 +6826,6 @@ packages: ...@@ -6829,7 +6826,6 @@ packages:
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-linux-x64-musl/1.3.55: /@swc/core-linux-x64-musl/1.3.55:
...@@ -6838,7 +6834,6 @@ packages: ...@@ -6838,7 +6834,6 @@ packages:
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-win32-arm64-msvc/1.3.55: /@swc/core-win32-arm64-msvc/1.3.55:
...@@ -6847,7 +6842,6 @@ packages: ...@@ -6847,7 +6842,6 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-win32-ia32-msvc/1.3.55: /@swc/core-win32-ia32-msvc/1.3.55:
...@@ -6856,7 +6850,6 @@ packages: ...@@ -6856,7 +6850,6 @@ packages:
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core-win32-x64-msvc/1.3.55: /@swc/core-win32-x64-msvc/1.3.55:
...@@ -6865,7 +6858,6 @@ packages: ...@@ -6865,7 +6858,6 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@swc/core/1.3.55_@swc+helpers@0.5.1: /@swc/core/1.3.55_@swc+helpers@0.5.1:
...@@ -6890,7 +6882,6 @@ packages: ...@@ -6890,7 +6882,6 @@ packages:
'@swc/core-win32-arm64-msvc': 1.3.55 '@swc/core-win32-arm64-msvc': 1.3.55
'@swc/core-win32-ia32-msvc': 1.3.55 '@swc/core-win32-ia32-msvc': 1.3.55
'@swc/core-win32-x64-msvc': 1.3.55 '@swc/core-win32-x64-msvc': 1.3.55
dev: true
/@swc/helpers/0.4.14: /@swc/helpers/0.4.14:
resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==}
...@@ -23779,7 +23770,6 @@ packages: ...@@ -23779,7 +23770,6 @@ packages:
serialize-javascript: 6.0.1 serialize-javascript: 6.0.1
terser: 5.17.7 terser: 5.17.7
webpack: 5.86.0_@swc+core@1.3.55 webpack: 5.86.0_@swc+core@1.3.55
dev: true
/terser/5.10.0: /terser/5.10.0:
resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==} resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==}
...@@ -25137,7 +25127,6 @@ packages: ...@@ -25137,7 +25127,6 @@ packages:
- '@swc/core' - '@swc/core'
- esbuild - esbuild
- uglify-js - uglify-js
dev: true
/websocket-driver/0.7.3: /websocket-driver/0.7.3:
resolution: {integrity: sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==} resolution: {integrity: sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==}
...@@ -25542,9 +25531,9 @@ packages: ...@@ -25542,9 +25531,9 @@ packages:
/zwitch/2.0.4: /zwitch/2.0.4:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
'@gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1_react-refresh@0.12.0': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230612.1_react-refresh@0.12.0':
resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1} resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230612.1}
id: '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1' id: '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230612.1'
name: '@vercel/turbopack-ecmascript-runtime' name: '@vercel/turbopack-ecmascript-runtime'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
...@@ -25555,8 +25544,8 @@ packages: ...@@ -25555,8 +25544,8 @@ packages:
- webpack - webpack
dev: false dev: false
'@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230608.1': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230612.1':
resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230608.1} resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230612.1}
name: '@vercel/turbopack-node' name: '@vercel/turbopack-node'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
"typescript": {}, "typescript": {},
"rust-check": {}, "rust-check": {},
"test-cargo-unit": {}, "test-cargo-unit": {},
"test-cargo-integration": {},
"test-cargo-bench": {},
"//#get-test-timings": { "//#get-test-timings": {
"inputs": ["run-tests.js"], "inputs": ["run-tests.js"],
"outputs": ["test-timings.json"] "outputs": ["test-timings.json"]
......
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