Add tests for HMR (#49206)
This adds tests for Turbopack HMR as part of the Next.js turbo integration test suite.
This commit is contained in:
parent
c9d87eec7c
commit
6a3f96e6b3
61 changed files with 470 additions and 140 deletions
1
packages/next-swc/crates/next-dev-tests/.gitignore
vendored
Normal file
1
packages/next-swc/crates/next-dev-tests/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tests/temp
|
|
@ -7,8 +7,10 @@ declare global {
|
||||||
// We need to extract only the call signature as `autoReady(jest.describe)` drops all the other properties
|
// We need to extract only the call signature as `autoReady(jest.describe)` drops all the other properties
|
||||||
var describe: AutoReady<typeof jest.describe>
|
var describe: AutoReady<typeof jest.describe>
|
||||||
var it: AutoReady<typeof jest.it>
|
var it: AutoReady<typeof jest.it>
|
||||||
var READY: (arg: string) => void
|
var TURBOPACK_READY: (arg: string) => void
|
||||||
|
var TURBOPACK_CHANGE_FILE: (arg: string) => void
|
||||||
var nsObj: (obj: any) => any
|
var nsObj: (obj: any) => any
|
||||||
|
var __turbopackFileChanged: (id: string, error: Error) => void
|
||||||
|
|
||||||
interface Window {
|
interface Window {
|
||||||
NEXT_HYDRATED?: boolean
|
NEXT_HYDRATED?: boolean
|
||||||
|
@ -62,8 +64,8 @@ function markReady() {
|
||||||
isReady = true
|
isReady = true
|
||||||
requestIdleCallback(
|
requestIdleCallback(
|
||||||
() => {
|
() => {
|
||||||
if (typeof READY === 'function') {
|
if (typeof TURBOPACK_READY === 'function') {
|
||||||
READY('')
|
TURBOPACK_READY('')
|
||||||
} else {
|
} else {
|
||||||
console.info(
|
console.info(
|
||||||
'%cTurbopack tests:',
|
'%cTurbopack tests:',
|
||||||
|
@ -83,16 +85,28 @@ export function wait(ms: number): Promise<void> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async function waitForPath(contentWindow: Window, path: string): Promise<void> {
|
export async function waitForCondition(
|
||||||
|
predicate: () => boolean,
|
||||||
|
timeout: number | null = null
|
||||||
|
): Promise<void> {
|
||||||
|
const start = Date.now()
|
||||||
while (true) {
|
while (true) {
|
||||||
if (contentWindow.location.pathname === path) {
|
if (predicate()) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
await wait(1)
|
await wait(1)
|
||||||
|
|
||||||
|
if (timeout != null && Date.now() - start > timeout) {
|
||||||
|
throw new Error('Timed out waiting for condition')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function waitForPath(contentWindow: Window, path: string): Promise<void> {
|
||||||
|
return waitForCondition(() => contentWindow.location.pathname === path)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a new page in an iframe and waits for it to load.
|
* Loads a new page in an iframe and waits for it to load.
|
||||||
*/
|
*/
|
||||||
|
@ -210,3 +224,41 @@ export function markAsHydrated() {
|
||||||
window.onNextHydrated()
|
window.onNextHydrated()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fileChangedResolvers: Map<
|
||||||
|
string,
|
||||||
|
{ resolve: (value: unknown) => void; reject: (error: Error) => void }
|
||||||
|
> = new Map()
|
||||||
|
|
||||||
|
globalThis.__turbopackFileChanged = (id: string, error?: Error) => {
|
||||||
|
const resolver = fileChangedResolvers.get(id)
|
||||||
|
if (resolver == null) {
|
||||||
|
throw new Error(`No resolver found for id ${id}`)
|
||||||
|
} else if (error != null) {
|
||||||
|
resolver.reject(error)
|
||||||
|
} else {
|
||||||
|
resolver.resolve(null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function unsafeUniqueId(): string {
|
||||||
|
const LENGTH = 10
|
||||||
|
const BASE = 16
|
||||||
|
return Math.floor(Math.random() * Math.pow(BASE, LENGTH))
|
||||||
|
.toString(BASE)
|
||||||
|
.slice(0, LENGTH)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function changeFile(
|
||||||
|
path: string,
|
||||||
|
find: string,
|
||||||
|
replaceWith: string
|
||||||
|
) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const id = unsafeUniqueId()
|
||||||
|
|
||||||
|
fileChangedResolvers.set(id, { resolve, reject })
|
||||||
|
|
||||||
|
TURBOPACK_CHANGE_FILE(JSON.stringify({ path, id, find, replaceWith }))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ use chromiumoxide::{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
error::CdpError::Ws,
|
error::CdpError::Ws,
|
||||||
|
Page,
|
||||||
};
|
};
|
||||||
use dunce::canonicalize;
|
use dunce::canonicalize;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
|
@ -49,7 +50,7 @@ use turbo_binding::{
|
||||||
},
|
},
|
||||||
tasks_fs::{DiskFileSystemVc, FileSystem, FileSystemPathVc},
|
tasks_fs::{DiskFileSystemVc, FileSystem, FileSystemPathVc},
|
||||||
tasks_memory::MemoryBackend,
|
tasks_memory::MemoryBackend,
|
||||||
tasks_testing::retry::retry_async,
|
tasks_testing::retry::{retry, retry_async},
|
||||||
},
|
},
|
||||||
turbopack::{
|
turbopack::{
|
||||||
core::issue::{
|
core::issue::{
|
||||||
|
@ -65,6 +66,12 @@ fn register() {
|
||||||
include!(concat!(env!("OUT_DIR"), "/register_test_integration.rs"));
|
include!(concat!(env!("OUT_DIR"), "/register_test_integration.rs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
struct JsResult {
|
||||||
|
uncaught_exceptions: Vec<String>,
|
||||||
|
run_result: JestRunResult,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
struct JestRunResult {
|
struct JestRunResult {
|
||||||
|
@ -124,7 +131,17 @@ fn test(resource: PathBuf) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let run_result = run_async_test(run_test(resource));
|
let JsResult {
|
||||||
|
uncaught_exceptions,
|
||||||
|
run_result,
|
||||||
|
} = run_async_test(run_test(resource));
|
||||||
|
|
||||||
|
if !uncaught_exceptions.is_empty() {
|
||||||
|
panic!(
|
||||||
|
"Uncaught exception(s) in test:\n{}",
|
||||||
|
uncaught_exceptions.join("\n")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
!run_result.test_results.is_empty(),
|
!run_result.test_results.is_empty(),
|
||||||
|
@ -157,7 +174,11 @@ fn test(resource: PathBuf) {
|
||||||
#[should_panic]
|
#[should_panic]
|
||||||
fn test_skipped_fails(resource: PathBuf) {
|
fn test_skipped_fails(resource: PathBuf) {
|
||||||
let resource = resource.parent().unwrap().to_path_buf();
|
let resource = resource.parent().unwrap().to_path_buf();
|
||||||
let run_result = run_async_test(run_test(resource));
|
let JsResult {
|
||||||
|
// Ignore uncaught exceptions for skipped tests.
|
||||||
|
uncaught_exceptions: _,
|
||||||
|
run_result,
|
||||||
|
} = run_async_test(run_test(resource));
|
||||||
|
|
||||||
// Assert that this skipped test itself has at least one browser test which
|
// Assert that this skipped test itself has at least one browser test which
|
||||||
// fails.
|
// fails.
|
||||||
|
@ -172,7 +193,28 @@ fn test_skipped_fails(resource: PathBuf) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn run_test(resource: PathBuf) -> JestRunResult {
|
fn copy_recursive(from: &Path, to: &Path) -> std::io::Result<()> {
|
||||||
|
let from = canonicalize(from)?;
|
||||||
|
let to = canonicalize(to)?;
|
||||||
|
let mut entries = vec![];
|
||||||
|
for entry in from.read_dir()? {
|
||||||
|
let entry = entry?;
|
||||||
|
let path = entry.path();
|
||||||
|
let to_path = to.join(path.file_name().unwrap());
|
||||||
|
if path.is_dir() {
|
||||||
|
std::fs::create_dir_all(&to_path)?;
|
||||||
|
entries.push((path, to_path));
|
||||||
|
} else {
|
||||||
|
std::fs::copy(&path, &to_path)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (from, to) in entries {
|
||||||
|
copy_recursive(&from, &to)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn run_test(resource: PathBuf) -> JsResult {
|
||||||
register();
|
register();
|
||||||
|
|
||||||
let resource = canonicalize(resource).unwrap();
|
let resource = canonicalize(resource).unwrap();
|
||||||
|
@ -184,6 +226,21 @@ async fn run_test(resource: PathBuf) -> JestRunResult {
|
||||||
);
|
);
|
||||||
|
|
||||||
let package_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
let package_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
|
let tests_dir = package_root.join("tests");
|
||||||
|
let integration_tests_dir = tests_dir.join("integration");
|
||||||
|
let resource_temp: PathBuf = tests_dir.join("temp").join(
|
||||||
|
resource
|
||||||
|
.strip_prefix(integration_tests_dir)
|
||||||
|
.expect("resource path must be within the integration tests directory"),
|
||||||
|
);
|
||||||
|
|
||||||
|
// We don't care about errors when removing the previous temp directory.
|
||||||
|
// It can still exist if we crashed during a previous test run.
|
||||||
|
let _ = std::fs::remove_dir_all(&resource_temp);
|
||||||
|
std::fs::create_dir_all(&resource_temp).expect("failed to create temporary directory");
|
||||||
|
copy_recursive(&resource, &resource_temp)
|
||||||
|
.expect("failed to copy test files to temporary directory");
|
||||||
|
|
||||||
let cargo_workspace_root = canonicalize(package_root)
|
let cargo_workspace_root = canonicalize(package_root)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.parent()
|
.parent()
|
||||||
|
@ -192,12 +249,12 @@ async fn run_test(resource: PathBuf) -> JestRunResult {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.to_path_buf();
|
.to_path_buf();
|
||||||
|
|
||||||
let test_dir = resource.to_path_buf();
|
let test_dir = resource_temp.to_path_buf();
|
||||||
let workspace_root = cargo_workspace_root.parent().unwrap().parent().unwrap();
|
let workspace_root = cargo_workspace_root.parent().unwrap().parent().unwrap();
|
||||||
let project_dir = test_dir.join("input");
|
let project_dir = test_dir.join("input");
|
||||||
let requested_addr = get_free_local_addr().unwrap();
|
let requested_addr = get_free_local_addr().unwrap();
|
||||||
|
|
||||||
let mock_dir = resource.join("__httpmock__");
|
let mock_dir = resource_temp.join("__httpmock__");
|
||||||
let mock_server_future = get_mock_server_future(&mock_dir);
|
let mock_server_future = get_mock_server_future(&mock_dir);
|
||||||
|
|
||||||
let (issue_tx, mut issue_rx) = unbounded_channel();
|
let (issue_tx, mut issue_rx) = unbounded_channel();
|
||||||
|
@ -248,7 +305,7 @@ async fn run_test(resource: PathBuf) -> JestRunResult {
|
||||||
let result = tokio::select! {
|
let result = tokio::select! {
|
||||||
// Poll the mock_server first to add the env var
|
// Poll the mock_server first to add the env var
|
||||||
_ = mock_server_future => panic!("Never resolves"),
|
_ = mock_server_future => panic!("Never resolves"),
|
||||||
r = run_browser(local_addr) => r.expect("error while running browser"),
|
r = run_browser(local_addr, &project_dir) => r.expect("error while running browser"),
|
||||||
_ = server.future => panic!("Never resolves"),
|
_ = server.future => panic!("Never resolves"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -257,7 +314,7 @@ async fn run_test(resource: PathBuf) -> JestRunResult {
|
||||||
let task = tt.spawn_once_task(async move {
|
let task = tt.spawn_once_task(async move {
|
||||||
let issues_fs = DiskFileSystemVc::new(
|
let issues_fs = DiskFileSystemVc::new(
|
||||||
"issues".to_string(),
|
"issues".to_string(),
|
||||||
test_dir.join("issues").to_string_lossy().to_string(),
|
resource.join("issues").to_string_lossy().to_string(),
|
||||||
)
|
)
|
||||||
.as_file_system();
|
.as_file_system();
|
||||||
|
|
||||||
|
@ -277,6 +334,16 @@ async fn run_test(resource: PathBuf) -> JestRunResult {
|
||||||
});
|
});
|
||||||
tt.wait_task_completion(task, true).await.unwrap();
|
tt.wait_task_completion(task, true).await.unwrap();
|
||||||
|
|
||||||
|
// This sometimes fails for the following test:
|
||||||
|
// test_tests__integration__next__webpack_loaders__no_options__input
|
||||||
|
retry(
|
||||||
|
(),
|
||||||
|
|()| std::fs::remove_dir_all(&resource_temp),
|
||||||
|
3,
|
||||||
|
Duration::from_millis(100),
|
||||||
|
)
|
||||||
|
.expect("failed to remove temporary directory");
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +385,16 @@ async fn create_browser(is_debugging: bool) -> Result<(Browser, JoinSet<()>)> {
|
||||||
Ok((browser, set))
|
Ok((browser, set))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
const TURBOPACK_READY_BINDING: &str = "TURBOPACK_READY";
|
||||||
|
const TURBOPACK_DONE_BINDING: &str = "TURBOPACK_DONE";
|
||||||
|
const TURBOPACK_CHANGE_FILE_BINDING: &str = "TURBOPACK_CHANGE_FILE";
|
||||||
|
const BINDINGS: [&str; 3] = [
|
||||||
|
TURBOPACK_READY_BINDING,
|
||||||
|
TURBOPACK_DONE_BINDING,
|
||||||
|
TURBOPACK_CHANGE_FILE_BINDING,
|
||||||
|
];
|
||||||
|
|
||||||
|
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?;
|
let (browser, mut handle) = create_browser(is_debugging).await?;
|
||||||
|
|
||||||
|
@ -334,7 +410,9 @@ async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
||||||
.await
|
.await
|
||||||
.context("Failed to create new browser page")?;
|
.context("Failed to create new browser page")?;
|
||||||
|
|
||||||
page.execute(AddBindingParams::new("READY")).await?;
|
for binding in BINDINGS {
|
||||||
|
page.execute(AddBindingParams::new(binding)).await?;
|
||||||
|
}
|
||||||
|
|
||||||
let mut errors = page
|
let mut errors = page
|
||||||
.event_listener::<EventExceptionThrown>()
|
.event_listener::<EventExceptionThrown>()
|
||||||
|
@ -365,7 +443,7 @@ async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
||||||
|
|
||||||
if is_debugging {
|
if is_debugging {
|
||||||
let _ = page.evaluate(
|
let _ = page.evaluate(
|
||||||
r#"console.info("%cTurbopack tests:", "font-weight: bold;", "Waiting for READY to be signaled by page...");"#,
|
r#"console.info("%cTurbopack tests:", "font-weight: bold;", "Waiting for TURBOPACK_READY to be signaled by page...");"#,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
@ -374,6 +452,7 @@ async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
||||||
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();
|
||||||
let mut network_next = network_response_events.next();
|
let mut network_next = network_response_events.next();
|
||||||
|
let mut uncaught_exceptions = vec![];
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
|
@ -413,10 +492,7 @@ async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
||||||
let message = message.trim_end();
|
let message = message.trim_end();
|
||||||
if !is_debugging {
|
if !is_debugging {
|
||||||
if !expected_error {
|
if !expected_error {
|
||||||
return Err(anyhow!(
|
uncaught_exceptions.push(message.to_string());
|
||||||
"Exception throw in page: {}",
|
|
||||||
message
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
} else if expected_error {
|
} else if expected_error {
|
||||||
println!("Exception throw in page:\n{}", message);
|
println!("Exception throw in page:\n{}", message);
|
||||||
|
@ -429,19 +505,12 @@ async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
||||||
errors_next = errors.next();
|
errors_next = errors.next();
|
||||||
}
|
}
|
||||||
event = &mut bindings_next => {
|
event = &mut bindings_next => {
|
||||||
if event.is_some() {
|
if let Some(event) = event {
|
||||||
if is_debugging {
|
if let Some(run_result) = handle_binding(&page, &*event, project_dir, is_debugging).await? {
|
||||||
let run_tests_msg =
|
return Ok(JsResult {
|
||||||
"Entering debug mode. Run `await __jest__.run()` in the browser console to run tests.";
|
uncaught_exceptions,
|
||||||
println!("\n\n{}", run_tests_msg);
|
run_result,
|
||||||
page.evaluate(format!(
|
});
|
||||||
r#"console.info("%cTurbopack tests:", "font-weight: bold;", "{}");"#,
|
|
||||||
run_tests_msg
|
|
||||||
))
|
|
||||||
.await?;
|
|
||||||
} else {
|
|
||||||
let value = page.evaluate("__jest__.run()").await?.into_value()?;
|
|
||||||
return Ok(value);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Err(anyhow!("Binding events channel ended unexpectedly"));
|
return Err(anyhow!("Binding events channel ended unexpectedly"));
|
||||||
|
@ -465,7 +534,7 @@ async fn run_browser(addr: SocketAddr) -> Result<JestRunResult> {
|
||||||
}
|
}
|
||||||
() = tokio::time::sleep(Duration::from_secs(60)) => {
|
() = tokio::time::sleep(Duration::from_secs(60)) => {
|
||||||
if !is_debugging {
|
if !is_debugging {
|
||||||
return Err(anyhow!("Test timeout while waiting for READY"));
|
return Err(anyhow!("Test timeout while waiting for TURBOPACK_READY"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -499,6 +568,87 @@ async fn get_mock_server_future(mock_dir: &Path) -> Result<(), String> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn handle_binding(
|
||||||
|
page: &Page,
|
||||||
|
event: &EventBindingCalled,
|
||||||
|
project_dir: &Path,
|
||||||
|
is_debugging: bool,
|
||||||
|
) -> Result<Option<JestRunResult>, anyhow::Error> {
|
||||||
|
match event.name.as_str() {
|
||||||
|
TURBOPACK_READY_BINDING => {
|
||||||
|
if is_debugging {
|
||||||
|
let run_tests_msg = "Entering debug mode. Run `await __jest__.run()` in the \
|
||||||
|
browser console to run tests.";
|
||||||
|
println!("\n\n{}", run_tests_msg);
|
||||||
|
page.evaluate(format!(
|
||||||
|
r#"console.info("%cTurbopack tests:", "font-weight: bold;", "{}");"#,
|
||||||
|
run_tests_msg
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
} else {
|
||||||
|
page.evaluate_expression(
|
||||||
|
"(() => { __jest__.run().then((runResult) => \
|
||||||
|
TURBOPACK_DONE(JSON.stringify(runResult))) })()",
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TURBOPACK_DONE_BINDING => {
|
||||||
|
let run_result: JestRunResult = serde_json::from_str(&event.payload)?;
|
||||||
|
return Ok(Some(run_result));
|
||||||
|
}
|
||||||
|
TURBOPACK_CHANGE_FILE_BINDING => {
|
||||||
|
let change_file: ChangeFileCommand = serde_json::from_str(&event.payload)?;
|
||||||
|
let path = Path::new(&change_file.path);
|
||||||
|
|
||||||
|
// Ensure `change_file.path` can't escape the project directory.
|
||||||
|
let path = path
|
||||||
|
.components()
|
||||||
|
.filter(|c| match c {
|
||||||
|
std::path::Component::Normal(_) => true,
|
||||||
|
_ => false,
|
||||||
|
})
|
||||||
|
.collect::<std::path::PathBuf>();
|
||||||
|
|
||||||
|
let path: PathBuf = project_dir.join(path);
|
||||||
|
|
||||||
|
let mut file_contents = std::fs::read_to_string(&path)?;
|
||||||
|
if !file_contents.contains(&change_file.find) {
|
||||||
|
page.evaluate(format!(
|
||||||
|
"__turbopackFileChanged({}, new Error({}));",
|
||||||
|
serde_json::to_string(&change_file.id)?,
|
||||||
|
serde_json::to_string(&format!(
|
||||||
|
"TURBOPACK_CHANGE_FILE: file {} does not contain {}",
|
||||||
|
path.display(),
|
||||||
|
&change_file.find
|
||||||
|
))?
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
} else {
|
||||||
|
file_contents = file_contents.replace(&change_file.find, &change_file.replace_with);
|
||||||
|
std::fs::write(&path, file_contents)?;
|
||||||
|
|
||||||
|
page.evaluate(format!(
|
||||||
|
"__turbopackFileChanged({});",
|
||||||
|
serde_json::to_string(&change_file.id)?
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
};
|
||||||
|
Ok(None)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
struct ChangeFileCommand {
|
||||||
|
path: String,
|
||||||
|
id: String,
|
||||||
|
find: String,
|
||||||
|
replace_with: String,
|
||||||
|
}
|
||||||
|
|
||||||
#[turbo_tasks::value(shared)]
|
#[turbo_tasks::value(shared)]
|
||||||
struct TestIssueReporter {
|
struct TestIssueReporter {
|
||||||
#[turbo_tasks(trace_ignore, debug_ignore)]
|
#[turbo_tasks(trace_ignore, debug_ignore)]
|
||||||
|
|
|
@ -69,7 +69,8 @@ function runTests(harness: Harness, iframe: HTMLIFrameElement) {
|
||||||
TIMEOUT
|
TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
it(
|
// TODO(WEB-980) Fix this test once we no longer throw an error when rendering a 404 page.
|
||||||
|
it.skip(
|
||||||
'navigates to the segment 404 page',
|
'navigates to the segment 404 page',
|
||||||
async () => {
|
async () => {
|
||||||
await harness.load(iframe, '/link-segment')
|
await harness.load(iframe, '/link-segment')
|
||||||
|
@ -91,7 +92,8 @@ function runTests(harness: Harness, iframe: HTMLIFrameElement) {
|
||||||
TIMEOUT
|
TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
it(
|
// TODO(WEB-980) Fix this test once we no longer throw an error when rendering a 404 page.
|
||||||
|
it.skip(
|
||||||
'renders a segment 404 page',
|
'renders a segment 404 page',
|
||||||
async () => {
|
async () => {
|
||||||
await harness.load(iframe, '/segment')
|
await harness.load(iframe, '/segment')
|
||||||
|
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-627/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route-WEB-627/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /api/test",
|
description: "Next.js App Route /api/test",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-627/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route-WEB-627/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /api/test",
|
description: "Next.js App Route /api/test",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route-WEB-869/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /[slug]",
|
description: "Next.js App Route /[slug]",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route-WEB-869/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /[slug]",
|
description: "Next.js App Route /[slug]",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /api/crypto",
|
description: "Next.js App Route /api/crypto",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /[slug]",
|
description: "Next.js App Route /[slug]",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /api/crypto",
|
description: "Next.js App Route /api/crypto",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/route/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Route /[slug]",
|
description: "Next.js App Route /[slug]",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app/action.tsx",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/use-server/input/app/action.tsx",
|
||||||
category: "unsupported",
|
category: "unsupported",
|
||||||
title: "Server actions (\"use server\") are not yet supported in Turbopack",
|
title: "Server actions (\"use server\") are not yet supported in Turbopack",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/use-server/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Page Route /",
|
description: "Next.js App Page Route /",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app/action.tsx",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/use-server/input/app/action.tsx",
|
||||||
category: "unsupported",
|
category: "unsupported",
|
||||||
title: "Server actions (\"use server\") are not yet supported in Turbopack",
|
title: "Server actions (\"use server\") are not yet supported in Turbopack",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/app/use-server/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Page Route /",
|
description: "Next.js App Page Route /",
|
||||||
},
|
},
|
|
@ -3,7 +3,7 @@ PlainIssue {
|
||||||
context: "[root of the server]/broken",
|
context: "[root of the server]/broken",
|
||||||
category: "rendering",
|
category: "rendering",
|
||||||
title: "Error during SSR Rendering",
|
title: "Error during SSR Rendering",
|
||||||
description: "Error: Broken page (expected error)\n\nDebug info:\n- Error: Broken page (expected error)\n at Page (packages/next-swc/crates/next-dev-tests/tests/integration/next/error/ssr/input/pages/broken.tsx:2:9)\n 1 | export default function Page() {\n | v\n 2 + throw new Error('Broken page (expected error)')\n | ^\n 3 | }\n 4 | \n ",
|
description: "Error: Broken page (expected error)\n\nDebug info:\n- Error: Broken page (expected error)\n at Page (packages/next-swc/crates/next-dev-tests/tests/temp/next/error/ssr/input/pages/broken.tsx:2:9)\n 1 | export default function Page() {\n | v\n 2 + throw new Error('Broken page (expected error)')\n | ^\n 3 | }\n 4 | \n ",
|
||||||
detail: "",
|
detail: "",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: None,
|
source: None,
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/error/ssr/input/pages/broken.tsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/error/ssr/input/pages/broken.tsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve module \"fail\"",
|
description: "unable to resolve module \"fail\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 2,
|
line: 2,
|
||||||
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve module \"fail\"",
|
description: "unable to resolve module \"fail\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/node_modules/package/cjs/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 2,
|
line: 2,
|
||||||
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/cjs-in-esm/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/cjs-in-esm/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve module \"fail\"",
|
description: "unable to resolve module \"fail\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 2,
|
line: 2,
|
||||||
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Page Route /",
|
description: "Next.js App Page Route /",
|
||||||
},
|
},
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve module \"fail\"",
|
description: "unable to resolve module \"fail\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: module \"fail\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/node_modules/package/cjs/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/node_modules/package/cjs/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 2,
|
line: 2,
|
||||||
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/externals/server-component-externals/input/app",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/externals/server-component-externals/input/app",
|
||||||
),
|
),
|
||||||
description: "Next.js App Page Route /",
|
description: "Next.js App Page Route /",
|
||||||
},
|
},
|
|
@ -0,0 +1,43 @@
|
||||||
|
import { useRef } from 'react'
|
||||||
|
import { Harness, useTestHarness } from '@turbo/pack-test-harness'
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
const iframeRef = useRef<HTMLIFrameElement | null>(null)
|
||||||
|
|
||||||
|
useTestHarness((harness) => runTests(harness, iframeRef.current!))
|
||||||
|
|
||||||
|
return (
|
||||||
|
<iframe style={{ width: 800, height: 600 }} src="/page" ref={iframeRef} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTests(harness: Harness, iframe: HTMLIFrameElement) {
|
||||||
|
// These tests requires a longer timeout because we're rendering another page as well.
|
||||||
|
const TIMEOUT = 20000
|
||||||
|
|
||||||
|
it(
|
||||||
|
'updates the page without reloading',
|
||||||
|
async () => {
|
||||||
|
await harness.waitForLoaded(iframe)
|
||||||
|
await harness.waitForHydration(iframe, '/page')
|
||||||
|
|
||||||
|
iframe.contentWindow!.__NEXT_TEST_HMR = true
|
||||||
|
|
||||||
|
let element = iframe.contentDocument!.getElementById('element')!
|
||||||
|
expect(element).not.toBeNull()
|
||||||
|
expect(getComputedStyle(element).color).toBe('rgb(255, 0, 0)')
|
||||||
|
console.log(getComputedStyle(element).color)
|
||||||
|
|
||||||
|
await harness.changeFile('pages/page.module.css', 'red', 'blue')
|
||||||
|
await harness.waitForCondition(
|
||||||
|
() => getComputedStyle(element).color === 'rgb(0, 0, 255)'
|
||||||
|
)
|
||||||
|
|
||||||
|
console.log(getComputedStyle(element).color)
|
||||||
|
|
||||||
|
// Make sure the page didn't reload.
|
||||||
|
expect(iframe.contentWindow!.__NEXT_TEST_HMR).toBe(true)
|
||||||
|
},
|
||||||
|
TIMEOUT
|
||||||
|
)
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
.page {
|
||||||
|
color: red;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { useTestHarness } from '@turbo/pack-test-harness'
|
||||||
|
import styles from './page.module.css'
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
useTestHarness((harness) => harness.markAsHydrated())
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div id="element" className={styles.page}>
|
||||||
|
Hello Worls
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
import { useRef } from 'react'
|
||||||
|
import { Harness, useTestHarness } from '@turbo/pack-test-harness'
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
const iframeRef = useRef<HTMLIFrameElement | null>(null)
|
||||||
|
|
||||||
|
useTestHarness((harness) => runTests(harness, iframeRef.current!))
|
||||||
|
|
||||||
|
return (
|
||||||
|
<iframe style={{ width: 800, height: 600 }} src="/page" ref={iframeRef} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function waitForMutations(node: Node) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const observer = new MutationObserver((mutations) => {
|
||||||
|
resolve(mutations)
|
||||||
|
observer.disconnect()
|
||||||
|
})
|
||||||
|
observer.observe(node, {
|
||||||
|
attributes: true,
|
||||||
|
childList: true,
|
||||||
|
subtree: true,
|
||||||
|
characterData: true,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTests(harness: Harness, iframe: HTMLIFrameElement) {
|
||||||
|
// These tests requires a longer timeout because we're rendering another page as well.
|
||||||
|
const TIMEOUT = 20000
|
||||||
|
|
||||||
|
it(
|
||||||
|
'updates the page without reloading',
|
||||||
|
async () => {
|
||||||
|
await harness.waitForLoaded(iframe)
|
||||||
|
await harness.waitForHydration(iframe, '/page')
|
||||||
|
|
||||||
|
iframe.contentWindow!.__NEXT_TEST_HMR = true
|
||||||
|
|
||||||
|
let replacement = iframe.contentDocument!.getElementById('replacement')!
|
||||||
|
expect(replacement).not.toBeNull()
|
||||||
|
expect(replacement.textContent).toBe('World')
|
||||||
|
|
||||||
|
await Promise.all([
|
||||||
|
harness.changeFile('pages/page.tsx', 'World', 'Next.js'),
|
||||||
|
waitForMutations(replacement),
|
||||||
|
])
|
||||||
|
|
||||||
|
expect(replacement.textContent).toBe('Next.js')
|
||||||
|
// Make sure the page didn't reload.
|
||||||
|
expect(iframe.contentWindow!.__NEXT_TEST_HMR).toBe(true)
|
||||||
|
},
|
||||||
|
TIMEOUT
|
||||||
|
)
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { useTestHarness } from '@turbo/pack-test-harness'
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
useTestHarness((harness) => harness.markAsHydrated())
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
Hello <span id="replacement">World</span>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/public/broken.svg",
|
||||||
category: "image",
|
category: "image",
|
||||||
title: "Processing image failed",
|
title: "Processing image failed",
|
||||||
description: "Input image is not valid utf-8\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 0",
|
description: "Input image is not valid utf-8\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 0",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.jpeg",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/public/broken.jpeg",
|
||||||
category: "image",
|
category: "image",
|
||||||
title: "Processing image failed",
|
title: "Processing image failed",
|
||||||
description: "unable to decode image data\n\nCaused by:\n- failed to fill whole buffer",
|
description: "unable to decode image data\n\nCaused by:\n- failed to fill whole buffer",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.jpeg",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/public/broken.jpeg",
|
||||||
category: "image",
|
category: "image",
|
||||||
title: "Processing image failed",
|
title: "Processing image failed",
|
||||||
description: "unable to decode image data\n\nCaused by:\n- failed to fill whole buffer",
|
description: "unable to decode image data\n\nCaused by:\n- failed to fill whole buffer",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/public/broken.svg",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/public/broken.svg",
|
||||||
category: "image",
|
category: "image",
|
||||||
title: "Processing image failed",
|
title: "Processing image failed",
|
||||||
description: "Input image is not valid utf-8\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 0",
|
description: "Input image is not valid utf-8\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 0",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/basic/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/basic/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/image/remotepattern/input/pages/invalid.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/image/remotepattern/input/pages/invalid.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/pages/index.jsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/pages/index.jsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
||||||
|
@ -38,7 +38,7 @@ PlainIssue {
|
||||||
},
|
},
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/styles/globals.css",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/styles/globals.css",
|
||||||
),
|
),
|
||||||
description: "PostCSS processing",
|
description: "PostCSS processing",
|
||||||
},
|
},
|
|
@ -26,13 +26,13 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/pages/index.jsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/pages/index.jsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/styles/globals.css",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/styles/globals.css",
|
||||||
),
|
),
|
||||||
description: "PostCSS processing",
|
description: "PostCSS processing",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/pages/index.jsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/pages/index.jsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
||||||
|
@ -38,7 +38,7 @@ PlainIssue {
|
||||||
},
|
},
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/styles/globals.css",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/styles/globals.css",
|
||||||
),
|
),
|
||||||
description: "PostCSS processing",
|
description: "PostCSS processing",
|
||||||
},
|
},
|
|
@ -26,13 +26,13 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/pages/index.jsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/pages/index.jsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/styles/globals.css",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/styles/globals.css",
|
||||||
),
|
),
|
||||||
description: "PostCSS processing",
|
description: "PostCSS processing",
|
||||||
},
|
},
|
|
@ -26,7 +26,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/pages/index.jsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/pages/index.jsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
||||||
|
@ -38,7 +38,7 @@ PlainIssue {
|
||||||
},
|
},
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/styles/globals.css",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/styles/globals.css",
|
||||||
),
|
),
|
||||||
description: "PostCSS processing",
|
description: "PostCSS processing",
|
||||||
},
|
},
|
|
@ -26,13 +26,13 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/pages/index.jsx",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/pages/index.jsx",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/tailwind/basic/input/styles/globals.css",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/tailwind/basic/input/styles/globals.css",
|
||||||
),
|
),
|
||||||
description: "PostCSS processing",
|
description: "PostCSS processing",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Warning!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
description: "Error: Warning!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Error!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
description: "Error: Error!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Warning!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
description: "Error: Warning!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Error!",
|
description: "Error: Error!",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Error!",
|
description: "Error: Error!",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Warning!",
|
description: "Error: Warning!",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Warning!",
|
description: "Error: Warning!",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
|
||||||
category: "loaders",
|
category: "loaders",
|
||||||
title: "Issue while running loader",
|
title: "Issue while running loader",
|
||||||
description: "Error: Error!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
description: "Error: Error!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:49:31)",
|
||||||
|
@ -12,7 +12,7 @@ PlainIssue {
|
||||||
[
|
[
|
||||||
PlainIssueProcessingPathItem {
|
PlainIssueProcessingPathItem {
|
||||||
context: Some(
|
context: Some(
|
||||||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
"[project]/packages/next-swc/crates/next-dev-tests/tests/temp/next/webpack-loaders/emitted-errors/input/pages/index.js",
|
||||||
),
|
),
|
||||||
description: "Next.js pages directory",
|
description: "Next.js pages directory",
|
||||||
},
|
},
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/comptime/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/comptime/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve relative \"./not-existing-file\"",
|
description: "unable to resolve relative \"./not-existing-file\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./not-existing-file\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/comptime/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./not-existing-file\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/comptime/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/comptime/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/comptime/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 3,
|
line: 3,
|
|
@ -1,6 +1,6 @@
|
||||||
it('should throw a good error when parsing file fails', async () => {
|
it('should throw a good error when parsing file fails', async () => {
|
||||||
await expect(import('./broken')).rejects.toMatchObject({
|
await expect(import('./broken')).rejects.toMatchObject({
|
||||||
message:
|
message:
|
||||||
"Could not parse module '[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js'",
|
"Could not parse module '[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/error/input/broken.js'",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/error/input/broken.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/error/input/broken.js",
|
||||||
category: "parse",
|
category: "parse",
|
||||||
title: "Reading source code for parsing failed",
|
title: "Reading source code for parsing failed",
|
||||||
description: "An unexpected error happened while trying to read the source code to parse: failed to convert rope into string\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 1",
|
description: "An unexpected error happened while trying to read the source code to parse: failed to convert rope into string\n\nCaused by:\n- invalid utf-8 sequence of 1 bytes from index 1",
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/node-default-import/input/node_modules/esm-package/invalid-exports.cjs",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/node-default-import/input/node_modules/esm-package/invalid-exports.cjs",
|
||||||
category: "module type",
|
category: "module type",
|
||||||
title: "Specified module format (CommonJs) is not matching the module format of the source code (EcmaScript Modules)",
|
title: "Specified module format (CommonJs) is not matching the module format of the source code (EcmaScript Modules)",
|
||||||
description: "The CommonJs module format was specified in the package.json that is affecting this source file or by using an special extension, but Ecmascript import/export syntax is used in the source code.\nThe module was automatically converted to an EcmaScript module, but that is in conflict with the specified module format. Either change the \"type\" field in the package.json or replace EcmaScript import/export syntax with CommonJs syntas in the source file.\nIn some cases EcmaScript import/export syntax is added by an transform and isn't actually part of the source code. In these cases revisit transformation options to inject the correct syntax.",
|
description: "The CommonJs module format was specified in the package.json that is affecting this source file or by using an special extension, but Ecmascript import/export syntax is used in the source code.\nThe module was automatically converted to an EcmaScript module, but that is in conflict with the specified module format. Either change the \"type\" field in the package.json or replace EcmaScript import/export syntax with CommonJs syntas in the source file.\nIn some cases EcmaScript import/export syntax is added by an transform and isn't actually part of the source code. In these cases revisit transformation options to inject the correct syntax.",
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/basic/node-default-import/input/node_modules/esm-package/invalid-exports.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/basic/node-default-import/input/node_modules/esm-package/invalid-exports.js",
|
||||||
category: "module type",
|
category: "module type",
|
||||||
title: "Specified module format (EcmaScript Modules) is not matching the module format of the source code (CommonJs)",
|
title: "Specified module format (EcmaScript Modules) is not matching the module format of the source code (CommonJs)",
|
||||||
description: "The EcmaScript module format was specified in the package.json that is affecting this source file or by using an special extension, but it looks like that CommonJs syntax is used in the source code.\nExports made by CommonJs syntax will lead to a runtime error, since the module is in EcmaScript mode. Either change the \"type\" field in the package.json or replace CommonJs syntax with EcmaScript import/export syntax in the source file.",
|
description: "The EcmaScript module format was specified in the package.json that is affecting this source file or by using an special extension, but it looks like that CommonJs syntax is used in the source code.\nExports made by CommonJs syntax will lead to a runtime error, since the module is in EcmaScript mode. Either change the \"type\" field in the package.json or replace CommonJs syntax with EcmaScript import/export syntax in the source file.",
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/sass/warning/input",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/sass/warning/input",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Unsupported Sass request: ./styles.sass",
|
title: "Unsupported Sass request: ./styles.sass",
|
||||||
description: "Turbopack does not yet support importing Sass modules.",
|
description: "Turbopack does not yet support importing Sass modules.",
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/turbopack/sass/warning/input",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/turbopack/sass/warning/input",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Unsupported Sass request: ./styles.scss",
|
title: "Unsupported Sass request: ./styles.scss",
|
||||||
description: "Turbopack does not yet support importing Sass modules.",
|
description: "Turbopack does not yet support importing Sass modules.",
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/context-weak/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/context-weak/input/index.js",
|
||||||
category: "parse",
|
category: "parse",
|
||||||
title: "error TP1007 require.context(\".\", false, /two/, \"weak\") is not statically analyze-able: require.context() only supports 1-3 arguments (mode is not supported)",
|
title: "error TP1007 require.context(\".\", false, /two/, \"weak\") is not statically analyze-able: require.context() only supports 1-3 arguments (mode is not supported)",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -9,7 +9,7 @@ PlainIssue {
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/context-weak/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/context-weak/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 1,
|
line: 1,
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/context-weak/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/context-weak/input/index.js",
|
||||||
category: "parse",
|
category: "parse",
|
||||||
title: "error TP1007 require.context(\".\", false, /.+/, \"weak\") is not statically analyze-able: require.context() only supports 1-3 arguments (mode is not supported)",
|
title: "error TP1007 require.context(\".\", false, /.+/, \"weak\") is not statically analyze-able: require.context() only supports 1-3 arguments (mode is not supported)",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -9,7 +9,7 @@ PlainIssue {
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/context-weak/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/context-weak/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 19,
|
line: 19,
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/context-weak/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/context-weak/input/index.js",
|
||||||
category: "parse",
|
category: "parse",
|
||||||
title: "error TP1007 require.context(\".\", true, /.+/, \"weak\") is not statically analyze-able: require.context() only supports 1-3 arguments (mode is not supported)",
|
title: "error TP1007 require.context(\".\", true, /.+/, \"weak\") is not statically analyze-able: require.context() only supports 1-3 arguments (mode is not supported)",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -9,7 +9,7 @@ PlainIssue {
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/context-weak/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/context-weak/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 25,
|
line: 25,
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving EcmaScript Modules request",
|
title: "Error resolving EcmaScript Modules request",
|
||||||
description: "unable to resolve relative \"./empty?import2-in-chunk1\"",
|
description: "unable to resolve relative \"./empty?import2-in-chunk1\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?import2-in-chunk1\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js\nType of request: EcmaScript Modules request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?import2-in-chunk1\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js\nType of request: EcmaScript Modules request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 114,
|
line: 114,
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving EcmaScript Modules request",
|
title: "Error resolving EcmaScript Modules request",
|
||||||
description: "unable to resolve relative \"./empty?import1-in-chunk1\"",
|
description: "unable to resolve relative \"./empty?import1-in-chunk1\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?import1-in-chunk1\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js\nType of request: EcmaScript Modules request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?import1-in-chunk1\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js\nType of request: EcmaScript Modules request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 110,
|
line: 110,
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving EcmaScript Modules request",
|
title: "Error resolving EcmaScript Modules request",
|
||||||
description: "unable to resolve relative \"./empty?import3-in-chunk2\"",
|
description: "unable to resolve relative \"./empty?import3-in-chunk2\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?import3-in-chunk2\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js\nType of request: EcmaScript Modules request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?import3-in-chunk2\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js\nType of request: EcmaScript Modules request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/named-chunks/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 124,
|
line: 124,
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/parsing/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/parsing/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve relative \"./empty?require.ensure:test\"",
|
description: "unable to resolve relative \"./empty?require.ensure:test\"",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?require.ensure:test\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/parsing/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: relative \"./empty?require.ensure:test\"\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/parsing/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/parsing/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/parsing/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 29,
|
line: 29,
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve dynamic",
|
description: "unable to resolve dynamic",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: dynamic\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: dynamic\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 13,
|
line: 13,
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
||||||
category: "parse",
|
category: "parse",
|
||||||
title: "lint TP1002 require([\"./b\"]) is very dynamic",
|
title: "lint TP1002 require([\"./b\"]) is very dynamic",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -9,7 +9,7 @@ PlainIssue {
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies-context/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 13,
|
line: 13,
|
|
@ -1,15 +1,15 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Error,
|
severity: Error,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
||||||
category: "resolve",
|
category: "resolve",
|
||||||
title: "Error resolving commonjs request",
|
title: "Error resolving commonjs request",
|
||||||
description: "unable to resolve dynamic",
|
description: "unable to resolve dynamic",
|
||||||
detail: "It was not possible to find the requested file.\nParsed request as written in source code: dynamic\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
detail: "It was not possible to find the requested file.\nParsed request as written in source code: dynamic\nPath where resolving has started: [project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies/input/index.js\nType of request: commonjs request\nImport map: No import map entry\n",
|
||||||
documentation_link: "",
|
documentation_link: "",
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 5,
|
line: 5,
|
|
@ -1,6 +1,6 @@
|
||||||
PlainIssue {
|
PlainIssue {
|
||||||
severity: Warning,
|
severity: Warning,
|
||||||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
||||||
category: "parse",
|
category: "parse",
|
||||||
title: "lint TP1002 require([\"./c\"]) is very dynamic",
|
title: "lint TP1002 require([\"./c\"]) is very dynamic",
|
||||||
description: "",
|
description: "",
|
||||||
|
@ -9,7 +9,7 @@ PlainIssue {
|
||||||
source: Some(
|
source: Some(
|
||||||
PlainIssueSource {
|
PlainIssueSource {
|
||||||
asset: PlainAsset {
|
asset: PlainAsset {
|
||||||
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
ident: "[project]/packages/next-swc/crates/next-dev-tests/tests/temp/webpack/chunks/__skipped__/weak-dependencies/input/index.js",
|
||||||
},
|
},
|
||||||
start: SourcePos {
|
start: SourcePos {
|
||||||
line: 5,
|
line: 5,
|
Loading…
Reference in a new issue