Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 0 additions & 3 deletions src/ast/ast_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use bun_alloc::{AstAlloc, AstVec};
use bun_collections::array_hash_map::{AutoContext, StringContext};
use bun_collections::{ArrayHashMap, StringArrayHashMap, StringHashMap};

use crate::runtime;
use crate::{
CharFreq, ExportsKind, Expr, InlinedEnumValue, LocRef, NamedExport, NamedImport, Part, Range,
Ref, Scope, SlotCounts, StoreStr, Target,
Expand All @@ -23,7 +22,6 @@ pub type TopLevelSymbolToParts = ArrayHashMap<Ref, AstVec<u32>, AutoContext, Ast
pub struct Ast<'a> {
pub approximate_newline_count: usize,
pub has_lazy_export: bool,
pub runtime_imports: runtime::Imports,

pub nested_scope_slot_counts: SlotCounts,

Expand Down Expand Up @@ -111,7 +109,6 @@ impl<'a> Ast<'a> {
Self {
approximate_newline_count: 0,
has_lazy_export: false,
runtime_imports: Default::default(),
nested_scope_slot_counts: SlotCounts::default(),
uses_exports_ref: false,
uses_module_ref: false,
Expand Down
1 change: 0 additions & 1 deletion src/install/PackageManager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ pub enum Subcommand {
#[strum(serialize = "patch-commit")]
PatchCommit,
Outdated,
Pack,
Publish,
Audit,
Info,
Expand Down
42 changes: 1 addition & 41 deletions src/install/PackageManager/CommandLineArguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,21 +374,6 @@ static INFO_PARAMS: &[ParamType] = concat_params![
]
];

static PACK_PARAMS: &[ParamType] = concat_params![
SHARED_PARAMS,
&[
// clap::param!("--filter <STR>... Pack each matching workspace"),
clap::param!(
"--destination <STR> The directory the tarball will be saved in"
),
clap::param!("--filename <STR> The filename of the tarball"),
clap::param!(
"--gzip-level <STR> Specify a custom compression level for gzip. Default is 9."
),
clap::param!("<POS> ... "),
]
];

static PUBLISH_PARAMS: &[ParamType] = concat_params![
SHARED_PARAMS,
&[
Expand Down Expand Up @@ -1025,27 +1010,6 @@ Full documentation is available at <magenta>https://bun.com/docs/cli/outdated<r>
pretty_help(outro_text);
Output::flush();
}
Subcommand::Pack => {
let intro_text = r"
<b>Usage<r>: <b><green>bun pm pack<r> <cyan>[flags]<r>

Create a tarball for the current project.

<b>Flags:<r>";

let outro_text = r"

<b>Examples:<r>
<b><green>bun pm pack<r>

Full documentation is available at <magenta>https://bun.com/docs/cli/pm#pack<r>.
";

pretty_help(intro_text);
clap::simple_help(PACK_PARAMS);
pretty_help(outro_text);
Output::flush();
}
Subcommand::Publish => {
let intro_text = r"
<b>Usage<r>: <b><green>bun publish<r> <cyan>[flags]<r> <blue>[dist]<r>
Expand Down Expand Up @@ -1242,7 +1206,6 @@ Full documentation is available at <magenta>https://bun.com/docs/pm/cli/prune<r>
Subcommand::Patch => PATCH_PARAMS,
Subcommand::PatchCommit => PATCH_COMMIT_PARAMS,
Subcommand::Outdated => OUTDATED_PARAMS,
Subcommand::Pack => PACK_PARAMS,
Subcommand::Publish => PUBLISH_PARAMS,
Subcommand::Why => WHY_PARAMS,
Subcommand::Dedupe => DEDUPE_PARAMS,
Expand Down Expand Up @@ -1422,10 +1385,7 @@ Full documentation is available at <magenta>https://bun.com/docs/pm/cli/prune<r>
cli.dry_run = true;
}

if matches!(
subcommand,
Subcommand::Pack | Subcommand::Pm | Subcommand::Publish
) {
if matches!(subcommand, Subcommand::Pm | Subcommand::Publish) {
if subcommand != Subcommand::Publish {
if let Some(dest) = args.option(b"--destination") {
cli.pack_destination = dest;
Expand Down
6 changes: 0 additions & 6 deletions src/js_parser/p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9410,16 +9410,11 @@ impl<'a, const TYPESCRIPT: bool, const SCAN_ONLY: bool> P<'a, TYPESCRIPT, SCAN_O
self.symbols[self.require_ref.inner_index() as usize].use_count_estimate > 0
};

// Move the
// parser's accumulated runtime-helper refs into the Ast so the linker /
// printer can emit `__require`, `__toESM`, etc. Precompute `require_ref`
// first since it reads `__require` from the same struct we're taking.
let require_ref = self
.runtime_imports
.__require
.to_nullable()
.unwrap_or(self.require_ref);
let runtime_imports = core::mem::take(&mut self.runtime_imports);

if !self.commonjs_named_exports_deoptimized {
self.mark_commonjs_exports_that_ignore_this();
Expand All @@ -9444,7 +9439,6 @@ impl<'a, const TYPESCRIPT: bool, const SCAN_ONLY: bool> P<'a, TYPESCRIPT, SCAN_O
// returned up the `_parse → parse → cache → transpiler` chain (see
// `js_parser::Result` PERF NOTE).
Ok(Box::new(js_ast::Ast {
runtime_imports,
module_scope,
exports_ref: self.exports_ref,
wrapper_ref,
Expand Down
57 changes: 0 additions & 57 deletions src/jsc/bindings/JSCInlines.h

This file was deleted.

4 changes: 0 additions & 4 deletions src/md/autolinks.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
use crate::helpers;
use crate::inlines::EmphDelim;

pub(crate) fn is_list_bullet(c: u8) -> bool {
c == b'-' || c == b'+' || c == b'*'
}

pub(crate) fn is_list_item_mark(c: u8) -> bool {
c == b'-' || c == b'+' || c == b'*' || c == b'.' || c == b')'
}
Expand Down
26 changes: 0 additions & 26 deletions src/md/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,32 +447,6 @@ impl Parser<'_> {
line.r#type = LineType::Atxheader;
line.data = atx_result.level;
line.beg = atx_result.content_beg;

// Trim trailing whitespace
while line.end > line.beg
&& (helpers::is_blank(self.text[(line.end - 1) as usize])
|| self.text[(line.end - 1) as usize] == b'\t')
{
line.end -= 1;
}
// Trim optional closing # sequence
if line.end > line.beg && self.text[(line.end - 1) as usize] == b'#' {
let mut tmp = line.end;
while tmp > line.beg && self.text[(tmp - 1) as usize] == b'#' {
tmp -= 1;
}
// The closing # must be preceded by space (or be the entire content)
if tmp == line.beg || helpers::is_blank(self.text[(tmp - 1) as usize]) {
line.end = tmp;
// Trim trailing whitespace again
while line.end > line.beg
&& helpers::is_blank(self.text[(line.end - 1) as usize])
{
line.end -= 1;
}
}
}

break;
}
}
Expand Down
16 changes: 2 additions & 14 deletions src/md/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use core::mem::{align_of, size_of};

use bun_alloc::AllocError;

use crate::autolinks::is_list_bullet;
use crate::parser::{self, BlockHeader, Parser};
use crate::types::{self, BlockType, Container, VerbatimLine};

Expand Down Expand Up @@ -157,19 +156,8 @@ impl Parser<'_> {

pub(crate) fn is_container_compatible(&self, existing: &Container, new: &Container) -> bool {
let _ = self;
// Same container type
if existing.ch == b'>' && new.ch == b'>' {
return true;
}
// Same list marker type
if existing.ch == new.ch {
return true;
}
// Bullet lists: different bullet chars are compatible
if is_list_bullet(existing.ch) && is_list_bullet(new.ch) {
return false;
}
false
// Two block quotes, or two list items with the same marker.
existing.ch == new.ch
}

pub(crate) fn process_all_blocks(&mut self) -> Result<(), parser::Error> {
Expand Down
Loading
Loading