Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
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
2 changes: 1 addition & 1 deletion src/bun_core/Global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub mod features {
TEXT_LOCKFILE, ISOLATED_BUN_INSTALL, HOISTED_BUN_INSTALL, MACROS, NO_AVX2, NO_AVX,
SHELL, SPAWN, STANDALONE_EXECUTABLE, STANDALONE_SHELL, TODO_PANIC, TRANSPILER_CACHE,
TSCONFIG, TSCONFIG_PATHS, VIRTUAL_MODULES, WORKERS_SPAWNED, WORKERS_TERMINATED,
NAPI_MODULE_REGISTER, EXITED, YAML_PARSE, YARN_MIGRATION, PNPM_MIGRATION,
EXITED, YAML_PARSE, YARN_MIGRATION, PNPM_MIGRATION,
VALKEY,
}
/// dotenv crate calls `bun_core::analytics::Features::dotenv_inc()`.
Expand Down
8 changes: 1 addition & 7 deletions src/bun_core/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,6 @@ impl fmt::Display for Raw<'_> {
f.write_str(unsafe { core::str::from_utf8_unchecked(self.0) })
}
}
/// Shorthand constructor for [`Raw`]. Prefer [`s`] (same thing, shorter name).
#[inline(always)]
pub const fn raw(bytes: &[u8]) -> Raw<'_> {
Raw(bytes)
}

// Canonical `SliceCursor` / `buf_print` / `buf_print_len` live in T0
// `bun_alloc` so that crate can use them too; re-exported here for the
Comment thread
robobun marked this conversation as resolved.
Expand Down Expand Up @@ -3476,8 +3471,7 @@ const fn truncated_hash32_bytes(int: u64) -> [u8; 8] {
]
}

/// Zero-validation `&[u8] -> impl Display` adapter — short alias of [`raw`]
/// for terse call sites (`bun_fmt::s(name)`).
/// Zero-validation `&[u8] -> impl Display` adapter; wraps the bytes in [`Raw`].
#[inline(always)]
pub const fn s(bytes: &[u8]) -> Raw<'_> {
Raw(bytes)
Expand Down
8 changes: 0 additions & 8 deletions src/bun_core/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,14 +1121,6 @@ pub mod time {
}
}

/// `bun.schema`. The full generated API types live in `bun_api` (tier-2);
/// tier-0 cannot depend on that, so expose the one type tier-0 itself owns.
pub mod schema {
pub mod api {
pub use crate::util::StringPointer;
}
}

pub use output as Output;

// `crate::js_lexer` / `crate::js_printer` resolve to fmt.rs's local subsets.
Expand Down
2 changes: 0 additions & 2 deletions src/bundler/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ pub use bun_resolve_builtins::node_builtins::{
// NODE_BUILTINS_MAP removed: dead — `is_node_builtin` (line 142) already delegates to
// `bun_resolve_builtins::Alias::has`; no other reader. See node_builtins.rs header.

pub use bun_options_types::BundlePackage;

// Re-export of `bun_options_types::bundle_enums::ModuleType`.
// Re-exported so `crate::options_impl::ModuleType` and `js_ast::parser::options::ModuleType`
// (which also re-exports the BundleEnums def) are the *same* nominal type — kills the
Expand Down
51 changes: 0 additions & 51 deletions src/bunfig/bunfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,57 +889,6 @@ impl<'a> Parser<'a> {
}
self.ctx.args.entry_points = names;
}

if let Some(expr) = _bun.get(b"packages") {
self.expect(&expr, ExprTag::EObject)?;
let object = expr.data.e_object().expect("infallible: variant checked");
let properties = object.properties.slice();
let mut valid_count: usize = 0;
for prop in properties {
if !matches!(
prop.value
.as_ref()
.expect("infallible: prop has value")
.data,
ExprData::EBoolean(_)
) {
continue;
}
valid_count += 1;
}
self.ctx.debug.package_bundle_map.reserve(
valid_count.saturating_sub(self.ctx.debug.package_bundle_map.len()),
);

for prop in properties {
let ExprData::EBoolean(b) = prop
.value
.as_ref()
.expect("infallible: prop has value")
.data
else {
continue;
};
let key_expr = prop.key.as_ref().expect("infallible: prop has key");
let ExprData::EString(k) = &key_expr.data else {
continue;
};
let path = estring_to_owned(k, self.bump);

if !bun_resolver::is_package_path(&path) {
self.add_error(key_expr.loc, b"Expected package name")?;
}

self.ctx.debug.package_bundle_map.insert(
path,
if b.value {
bun_options_types::BundlePackage::Always
} else {
bun_options_types::BundlePackage::Never
},
);
}
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/http_jsc/websocket_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ impl<const SSL: bool> WebSocket<SSL> {
let error_code = match err {
websocket_deflate::Error::InflateFailed => ErrorCode::InvalidCompressedData,
websocket_deflate::Error::TooLarge => ErrorCode::MessageTooBig,
websocket_deflate::Error::OutOfMemory => ErrorCode::FailedToAllocateMemory,
};
drop(deflate_slot);
self.terminate(error_code);
Expand Down
4 changes: 0 additions & 4 deletions src/http_jsc/websocket_client/WebSocketDeflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ const DEFLATE_TRAILER: [u8; 4] = [0x00, 0x00, 0xff, 0xff];
pub enum DecompressError {
#[error("InflateFailed")]
InflateFailed,
#[error("OutOfMemory")]
OutOfMemory,
#[error("TooLarge")]
TooLarge,
}
Expand All @@ -100,8 +98,6 @@ pub enum DecompressError {
pub enum CompressError {
#[error("DeflateFailed")]
DeflateFailed,
#[error("OutOfMemory")]
OutOfMemory,
}

impl PerMessageDeflate {
Expand Down
3 changes: 1 addition & 2 deletions src/http_types/MimeType.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use bun_core::strings;

// ───────────────────────────────────────────────────────────────────────────
// `Table` (= `mime_type_list_enum::MimeTypeList`). Hand-maintained `&'static
// str` newtype derived from `mime_type_list.txt`; see the note at the top of
// `mime_type_list_enum.rs`.
// str` newtype; see the note at the top of `mime_type_list_enum.rs`.
// ───────────────────────────────────────────────────────────────────────────
pub use super::mime_type_list_enum::MimeTypeList as Table;
use bun_collections::StringHashMap;
Expand Down
4 changes: 0 additions & 4 deletions src/http_types/h2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ pub enum FrameType {
HTTP_FRAME_WINDOW_UPDATE = 0x08,
/// RFC 7540 §6.10: continues a header block fragment.
HTTP_FRAME_CONTINUATION = 0x09,
/// <https://datatracker.ietf.org/doc/html/rfc7838#section-7.2>
HTTP_FRAME_ALTSVC = 0x0A,
/// <https://datatracker.ietf.org/doc/html/rfc8336#section-2>
HTTP_FRAME_ORIGIN = 0x0C,
}

#[repr(u8)]
Expand Down
Loading