Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"
members = [
"src/opaque",
"src/analytics",
"src/api",
"src/base64",
"src/bundler",
"src/collections",
Expand Down Expand Up @@ -360,7 +359,6 @@ itoa = "1"
lol_html = { path = "vendor/lolhtml" }
bun_opaque = { path = "src/opaque" }
bun_analytics = { path = "src/analytics" }
bun_api = { path = "src/api" }
bun_base64 = { path = "src/base64" }
bun_bundler = { path = "src/bundler" }
bun_collections = { path = "src/collections" }
Expand Down
15 changes: 0 additions & 15 deletions src/api/Cargo.toml

This file was deleted.

61 changes: 0 additions & 61 deletions src/api/lib.rs

This file was deleted.

6 changes: 2 additions & 4 deletions src/ast/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// REFACTOR_BUN_AST: this module holds only the data-shaped runtime pieces
// that the AST crate (and `bun_js_printer::Options`) need:
// `Runtime::source_code`, `Imports`, `ReplaceableExport*`, `ServerComponentsMode`.
// The `Features` struct (carries `&mut RuntimeTranspilerCache`) and
// `Fallback` HTML rendering (needs `bun_options_types::schema`, `bun_io`,
// `bun_base64`) live in `bun_js_parser::parser::Runtime` to avoid the
// `bun_options_types → bun_ast → bun_options_types` cycle.
// The `Features` struct (carries `&mut RuntimeTranspilerCache`) lives in
// `bun_js_parser::parser::Runtime`.

use bun_collections::StringArrayHashMap;

Expand Down
4 changes: 0 additions & 4 deletions src/ast/target.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! Bundle target platform.
//!
//! Data-only enum + pure predicates. `to_api()` / `from(api::Target)` live in
//! `bun_options_types::TargetExt` (would back-edge into the schema crate).

use enum_map::Enum;

Expand Down Expand Up @@ -34,7 +31,6 @@ impl Target {
pub const MAP: __ComptimeStringMap_TARGET_MAP = __ComptimeStringMap_TARGET_MAP(());

// `from_js` lives in bundler_jsc as an extension trait — see PORTING.md.
// `to_api`/`from(api)` live in `bun_options_types::TargetExt`.

#[inline]
pub fn is_server_side(self) -> bool {
Expand Down
4 changes: 2 additions & 2 deletions src/bun.js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ pub(crate) fn apply_standalone_runtime_flags(
b: &mut bun_bundler::Transpiler,
graph: &StandaloneModuleGraph,
) {
use bun_options_types::schema::api::DotEnvBehavior;
use bun_dotenv::DotEnvBehavior;
let disable_env = graph.flags.contains(GraphFlags::DISABLE_DEFAULT_ENV_FILES);
b.options.env.disable_default_env_files = disable_env;
b.options.env.behavior = if disable_env {
DotEnvBehavior::disable
DotEnvBehavior::Disable
} else {
DotEnvBehavior::LoadAllWithoutInlining
};
Expand Down
8 changes: 3 additions & 5 deletions src/bun_core/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3041,11 +3041,9 @@ macro_rules! __runtime_embed_impl {
// `StringPointer` stays here as the layered #[repr(C)] ABI type re-exported by
// `bun_string` et al.

/// `bun.schema.api.StringPointer` — `(offset, length)` span into an external
/// buffer. Canonical definition; re-exported by `bun_string`, `bun_http_types`,
/// and `bun_url` (formerly each had a structurally-identical copy). Layout MUST
/// match `extern struct { offset: u32, length: u32 }` — C++ (`WebCore::FetchHeaders`)
/// and on-disk formats (lockfile, npm manifest cache) read it directly.
/// `(offset, length)` span into an external buffer. Layout MUST match
/// `struct { uint32_t offset, length; }` — C++ (`WebCore::FetchHeaders`) and
/// on-disk formats (lockfile, npm manifest cache) read it directly.
#[repr(C)]
#[derive(Clone, Copy, Default, Debug, PartialEq, Eq)]
pub struct StringPointer {
Expand Down
9 changes: 1 addition & 8 deletions src/bundler/ParseTask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2425,14 +2425,7 @@ pub mod parse_worker {

let output_format = topts.output_format;

// D042: `crate::options::jsx::Pragma` IS `bun_js_parser::options::JSX::Pragma`
// (both re-export `bun_options_types::jsx::Pragma`). `to_parser_jsx_pragma`
// applies the `_None → Automatic` runtime fold the old `From` bridge did so
// parser-side `== Automatic` checks keep their semantics.
let mut opts = ParserOptions::init(
crate::transpiler::to_parser_jsx_pragma(task.jsx.clone()),
loader,
);
let mut opts = ParserOptions::init(task.jsx.clone(), loader);
opts.bundle = true;
opts.warn_about_unbundled_modules = false;
// `AllowUnresolved` is the same nominal type on
Expand Down
1 change: 0 additions & 1 deletion src/bundler/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ pub mod options {
pub use super::output_file::Value as OutputFileValue;
/// `options.Format` — many ported call-sites spell this `OutputFormat`.
pub use bun_options_types::Format as OutputFormat;
pub use bun_options_types::schema::api::DotEnvBehavior as EnvBehavior;

/// Output kind of a build artifact (`OutputFile.output_kind`).
///
Expand Down
Loading