You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
failures:
---- tests::test_resolver_package_json_bad_main stdout ----
thread 'tests::test_resolver_package_json_bad_main' panicked at tests/mod.rs:90:50:
called `Result::unwrap()` on an `Err` value: NotFound("node:http")stack backtrace: 0: rust_begin_unwind at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5 1: core::panicking::panic_fmt at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14 2: core::result::unwrap_failed at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5 3: core::result::Result<T,E>::unwrap at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1073:23 4: mod::tests::test_resolver_package_json_bad_main at ./tests/mod.rs:90:19 5: mod::tests::test_resolver_package_json_bad_main::{{closure}} at ./tests/mod.rs:79:45 6: core::ops::function::FnOnce::call_once at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5 7: core::ops::function::FnOnce::call_once at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5note: Some details are omitted, run with `RUST_BACKTRACE=full`for a verbose backtrace.
In the result,it can clearly see that oxc-resolver has converted #http to node:http based on the imports field.
I personally suggest that you need to compare whether the source in ast is consistent with the returned result, and if not, you need to replace it with the result of the resolver.
rolldown current result
entry.mjs
// do not replace the imports filedsimport{defaultasfs}from"#fs";import{defaultashttp}from"#http";// entry.jsfs.readFileSync();http.createServer();
The text was updated successfully, but these errors were encountered:
in esbuild repo
https://github.com/evanw/esbuild/blob/main/internal/bundler_tests/bundler_packagejson_test.go#L2878
in rolldown esbuild test package_json case
https://github.com/rolldown/rolldown/tree/main/crates/rolldown/tests/esbuild/packagejson/.test_package_json_subpath_import_node_builtin_issue3485
oxc-resolver test unit case
terminal output
In the result,it can clearly see that oxc-resolver has converted #http to node:http based on the imports field.
I personally suggest that you need to compare whether the source in ast is consistent with the returned result, and if not, you need to replace it with the result of the resolver.
rolldown current result
entry.mjs
The text was updated successfully, but these errors were encountered: