Skip to content
Merged
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
668 changes: 475 additions & 193 deletions Cargo.lock

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,44 @@ deno_media_type = "0.2.1"
deno_terminal = "0.2.0"
deno_error = "0.5.0"

dprint-swc-ext = "0.20.0"
dprint-swc-ext = "0.22.1"
once_cell = "1.19.0"
percent-encoding = "2.3.1"
serde = { version = "1.0.144", features = ["derive"] }
text_lines = { version = "0.6.0", features = ["serialization"] }
url = { version = "2.3.1", features = ["serde"] }
unicode-width = "0.1.13" # 0.1.13 because control characters have a width of 1 there
unicode-width = "0.2.0"

# swc's version bumping is very buggy and there will often be patch versions
# published that break our build, so we pin all swc versions to prevent
# pulling in new versions of swc crates
#
# NOTE: You can automatically update these dependencies by running ./scripts/update_swc_deps.ts
swc_atoms = "=0.6.7"
swc_common = "=0.37.5"
swc_config = { version = "=0.1.15", optional = true }
swc_config_macro = { version = "=0.1.4", optional = true }
swc_ecma_ast = { version = "=0.118.2", features = ["serde-impl"] }
swc_ecma_codegen = { version = "=0.155.1", optional = true }
swc_ecma_codegen_macros = { version = "=0.7.7", optional = true }
swc_ecma_loader = { version = "=0.49.1", optional = true }
swc_ecma_parser = "=0.149.1"
swc_ecma_transforms_base = { version = "=0.145.0", optional = true }
swc_ecma_transforms_classes = { version = "=0.134.0", optional = true }
swc_ecma_transforms_compat = { version = "=0.171.0", optional = true }
swc_ecma_transforms_macros = { version = "=0.5.5", optional = true }
swc_ecma_transforms_optimization = { version = "=0.208.0", optional = true }
swc_ecma_transforms_proposal = { version = "=0.179.0", optional = true }
swc_ecma_transforms_react = { version = "=0.191.0", optional = true }
swc_ecma_transforms_typescript = { version = "=0.198.1", optional = true }
swc_ecma_utils = { version = "=0.134.2", optional = true }
swc_ecma_visit = { version = "=0.104.8", optional = true }
swc_eq_ignore_macros = "=0.1.4"
swc_bundler = { version = "=0.237.0", optional = true }
swc_graph_analyzer = { version = "=0.26.0", optional = true }
swc_macros_common = { version = "=0.3.13", optional = true }
swc_trace_macro = { version = "=0.1.3", optional = true }
swc_visit = { version = "=0.6.2", optional = true }
swc_atoms = "=5.0.0"
swc_common = "=8.0.0"
swc_config = { version = "=2.0.0", optional = true }
swc_config_macro = { version = "=1.0.0", optional = true }
swc_ecma_ast = { version = "=8.0.0", features = ["serde-impl"] }
swc_ecma_codegen = { version = "=8.0.1", optional = true }
swc_ecma_codegen_macros = { version = "=1.0.1", optional = true }
swc_ecma_loader = { version = "=8.0.0", optional = true }
swc_ecma_parser = "=10.0.0"
swc_ecma_transforms_base = { version = "=11.1.1", optional = true }
swc_ecma_transforms_classes = { version = "=11.0.0", optional = true }
swc_ecma_transforms_compat = { version = "=12.0.0", optional = true }
swc_ecma_transforms_macros = { version = "=1.0.0", optional = true }
swc_ecma_transforms_optimization = { version = "=11.0.0", optional = true }
swc_ecma_transforms_proposal = { version = "=11.0.1", optional = true }
swc_ecma_transforms_react = { version = "=12.0.0", optional = true }
swc_ecma_transforms_typescript = { version = "=12.0.0", optional = true }
swc_ecma_utils = { version = "=11.0.0", optional = true }
swc_ecma_visit = { version = "=8.0.0", optional = true }
swc_eq_ignore_macros = "=1.0.0"
swc_bundler = { version = "=11.0.0", optional = true }
swc_graph_analyzer = { version = "=8.0.0", optional = true }
swc_macros_common = { version = "=1.0.0", optional = true }
swc_trace_macro = { version = "=2.0.0", optional = true }
swc_visit = { version = "=2.0.0", optional = true }
swc_visit_macros = { version = "=0.5.13", optional = true }
# just for error handling
sourcemap = { version = "9.0.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.82.0"
channel = "1.85.0"
components = ["clippy", "rustfmt"]
profile = "minimal"
10 changes: 5 additions & 5 deletions src/cjs_parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use serde::Deserialize;
use serde::Serialize;

use crate::swc::ast::*;
use crate::swc::atoms::JsWord;
use crate::swc::visit::noop_visit_type;
use crate::swc::visit::Visit;
use crate::swc::visit::VisitWith;
use crate::swc::atoms::Atom;
use crate::swc::ecma_visit::noop_visit_type;
use crate::swc::ecma_visit::Visit;
use crate::swc::ecma_visit::VisitWith;
use crate::ParsedSource;
use crate::ProgramRef;

Expand Down Expand Up @@ -88,7 +88,7 @@ impl CjsVisitor {
fn get_member_require_value(
&self,
member: &MemberExpr,
key: &JsWord,
key: &Atom,
) -> Option<String> {
let obj_ident = member.obj.as_ident()?;
let require_value = self.var_assignments.get(&*obj_ident.sym).cloned()?;
Expand Down
Loading
Loading