Skip to content

Commit

Permalink
Merge branch 'yj/try-ci-test' of https://github.com/hardfist/next.js
Browse files Browse the repository at this point in the history
…into yj/try-ci-test
  • Loading branch information
SyMind committed Jan 27, 2025
2 parents 04f64a5 + 1f0c4da commit 0f65b52
Show file tree
Hide file tree
Showing 516 changed files with 7,972 additions and 6,594 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"files": ["packages/**"],
"excludedFiles": [
"packages/next/taskfile*.js",
"packages/next/next-runtime.webpack-config.js"
"packages/next/next_runtime.config.js"
],
"rules": {
"no-shadow": ["error", { "builtinGlobals": false }],
Expand Down
3 changes: 2 additions & 1 deletion .github/labeler.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
],
"CI approved": [
{ "type": "user", "pattern": "SukkaW" },
{ "type": "user", "pattern": "vercel-release-bot" }
{ "type": "user", "pattern": "vercel-release-bot" },
{ "type": "user", "pattern": "raunofreiberg" }
],
"created-by: Next.js team": [
{ "type": "user", "pattern": "acdlite" },
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -576,42 +576,42 @@ jobs:
# needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

# uses: ./.github/workflows/build_reusable.yml
# with:
# nodeVersion: 18.18.2
# afterBuild: __NEXT_EXPERIMENTAL_PPR=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" node run-tests.js --timings -c ${TEST_CONCURRENCY} --type integration
# stepName: 'test-ppr-integration'
# secrets: inherit
# uses: ./.github/workflows/build_reusable.yml
# with:
# nodeVersion: 18.18.2
# afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" node run-tests.js --timings -c ${TEST_CONCURRENCY} --type integration
# stepName: 'test-ppr-integration'
# secrets: inherit

# test-ppr-dev:
# name: test ppr dev
# needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

# strategy:
# fail-fast: false
# matrix:
# group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
# uses: ./.github/workflows/build_reusable.yml
# with:
# afterBuild: __NEXT_EXPERIMENTAL_PPR=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=dev node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type development
# stepName: 'test-ppr-dev-${{ matrix.group }}'
# secrets: inherit
# strategy:
# fail-fast: false
# matrix:
# group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
# uses: ./.github/workflows/build_reusable.yml
# with:
# afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=dev node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type development
# stepName: 'test-ppr-dev-${{ matrix.group }}'
# secrets: inherit

# test-ppr-prod:
# name: test ppr prod
# needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

# strategy:
# fail-fast: false
# matrix:
# group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
# uses: ./.github/workflows/build_reusable.yml
# with:
# afterBuild: __NEXT_EXPERIMENTAL_PPR=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=start node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type production
# stepName: 'test-ppr-prod-${{ matrix.group }}'
# secrets: inherit
# strategy:
# fail-fast: false
# matrix:
# group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
# uses: ./.github/workflows/build_reusable.yml
# with:
# afterBuild: __NEXT_EXPERIMENTAL_PPR=true __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY=true NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" NEXT_TEST_MODE=start node run-tests.js --timings -g ${{ matrix.group }} -c ${TEST_CONCURRENCY} --type production
# stepName: 'test-ppr-prod-${{ matrix.group }}'
# secrets: inherit

# report-test-results-to-datadog:
# needs: [
Expand Down
39 changes: 25 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ testing = { version = "5.0.0" }
browserslist-rs = { version = "0.16.0" }
miette = { version = "5.10.0", features = ["fancy"] }
mdxjs = "0.2.15"
modularize_imports = { version = "0.70.1" }
styled_components = { version = "0.98.1" }
styled_jsx = { version = "0.75.1" }
swc_emotion = { version = "0.74.1" }
modularize_imports = { version = "0.71.0" }
styled_components = { version = "0.99.0" }
styled_jsx = { version = "0.76.0" }
swc_emotion = { version = "0.75.0" }
swc_relay = { version = "0.46.1" }

# General Deps
Expand Down
2 changes: 1 addition & 1 deletion contributing/core/vscode-debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ To see the changes you make to the Next.js codebase during development, you can

When developing/debugging Next.js, you can set breakpoints anywhere in the `packages/next` source code that will stop the debugger at certain locations so you can examine the behavior. Read more about [breakpoints in the VS Code documentation](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_breakpoints).

To ensure that the original names are displayed in the "Variables" section, build the Next.js source code with `NEXT_SERVER_EVAL_SOURCE_MAPS=1`. This is automatically applied when using `pnpm dev`.
To ensure that the original names are displayed in the "Variables" section, build the Next.js source code with `NEXT_SERVER_NO_MANGLE=1`. This is automatically applied when using `pnpm dev`.
4 changes: 2 additions & 2 deletions crates/napi/src/next_api/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ pub async fn project_get_source_for_asset(
bail!("Cannot find source for asset {}", file_path);
};

Ok(Some(source_content.content().to_str()?.to_string()))
Ok(Some(source_content.content().to_str()?.into_owned()))
})
.await
.map_err(|e| napi::Error::from_reason(PrettyPrintError(&e).to_string()))?;
Expand All @@ -1313,7 +1313,7 @@ pub async fn project_get_source_map(
return Ok(None);
};

Ok(Some(map.to_rope().await?.to_str()?.to_string()))
Ok(Some(map.to_rope().await?.to_str()?.into_owned()))
})
.await
.map_err(|e| napi::Error::from_reason(PrettyPrintError(&e).to_string()))?;
Expand Down
26 changes: 16 additions & 10 deletions crates/napi/src/next_api/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
collections::HashMap, env, future::Future, ops::Deref, path::PathBuf, sync::Arc, time::Duration,
collections::HashMap, future::Future, ops::Deref, path::PathBuf, sync::Arc, time::Duration,
};

use anyhow::{anyhow, Context, Result};
Expand All @@ -12,7 +12,9 @@ use serde::Serialize;
use turbo_tasks::{
trace::TraceRawVcs, OperationVc, ReadRef, TaskId, TryJoinIterExt, TurboTasks, UpdateInfo, Vc,
};
use turbo_tasks_backend::{default_backing_storage, DefaultBackingStorage};
use turbo_tasks_backend::{
default_backing_storage, noop_backing_storage, DefaultBackingStorage, NoopBackingStorage,
};
use turbo_tasks_fs::FileContent;
use turbopack_core::{
diagnostics::{Diagnostic, DiagnosticContextExt, PlainDiagnostic},
Expand All @@ -25,7 +27,7 @@ use crate::util::log_internal_error_and_inform;

#[derive(Clone)]
pub enum NextTurboTasks {
Memory(Arc<TurboTasks<turbo_tasks_memory::MemoryBackend>>),
Memory(Arc<TurboTasks<turbo_tasks_backend::TurboTasksBackend<NoopBackingStorage>>>),
PersistentCaching(
Arc<TurboTasks<turbo_tasks_backend::TurboTasksBackend<DefaultBackingStorage>>>,
),
Expand Down Expand Up @@ -108,7 +110,7 @@ impl NextTurboTasks {

pub fn memory_backend(&self) -> Option<&turbo_tasks_memory::MemoryBackend> {
match self {
NextTurboTasks::Memory(turbo_tasks) => Some(turbo_tasks.backend()),
NextTurboTasks::Memory(_) => None,
NextTurboTasks::PersistentCaching(_) => None,
}
}
Expand All @@ -124,7 +126,7 @@ impl NextTurboTasks {
pub fn create_turbo_tasks(
output_path: PathBuf,
persistent_caching: bool,
memory_limit: usize,
_memory_limit: usize,
) -> Result<NextTurboTasks> {
Ok(if persistent_caching {
let dirty_suffix = if crate::build::GIT_CLEAN
Expand Down Expand Up @@ -162,11 +164,15 @@ pub fn create_turbo_tasks(
),
))
} else {
let mut backend = turbo_tasks_memory::MemoryBackend::new(memory_limit);
if env::var_os("NEXT_TURBOPACK_PRINT_TASK_INVALIDATION").is_some() {
backend.print_task_invalidation(true);
}
NextTurboTasks::Memory(TurboTasks::new(backend))
NextTurboTasks::Memory(TurboTasks::new(
turbo_tasks_backend::TurboTasksBackend::new(
turbo_tasks_backend::BackendOptions {
storage_mode: None,
..Default::default()
},
noop_backing_storage(),
),
))
})
}

Expand Down
1 change: 1 addition & 0 deletions crates/next-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ turbo-rcstr = { workspace = true }
turbo-tasks = { workspace = true }
turbo-tasks-env = { workspace = true }
turbo-tasks-fs = { workspace = true }
turbo-tasks-hash = { workspace = true }
turbo-tasks-memory = { workspace = true }
turbopack = { workspace = true }
turbopack-browser = { workspace = true }
Expand Down
Loading

0 comments on commit 0f65b52

Please sign in to comment.