Skip to content

Commit 1a9a163

Browse files
committed
chore: update
1 parent ae4c74a commit 1a9a163

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

crates/jsshaker/src/builtins/globals/constants.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl Builtins<'_> {
122122
});
123123

124124
// Debug helpers (non-standard)
125-
#[cfg(debug_assertions)]
125+
// #[cfg(debug_assertions)]
126126
init_map!(self.globals, {
127127
"$$DEBUG$$" => factory.implemented_builtin_fn(
128128
"$$DEBUG$$",
@@ -131,6 +131,13 @@ impl Builtins<'_> {
131131
analyzer.factory.undefined
132132
},
133133
),
134+
"$$DEBUGV$$" => factory.implemented_builtin_fn(
135+
"$$DEBUGV$$",
136+
|analyzer, _dep, _this, args| {
137+
println!("DebugV: {:#?}", args.get(analyzer, 0).value);
138+
analyzer.factory.undefined
139+
},
140+
),
134141
"$$TRACE$$" => factory.implemented_builtin_fn(
135142
"$$TRACE$$",
136143
|analyzer, _dep, _this, args| {

crates/jsshaker/src/entity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111

1212
#[derive(Debug, Clone, Copy)]
1313
pub struct Entity<'a> {
14-
value: Value<'a>,
14+
pub value: Value<'a>,
1515
dep: Option<Dep<'a>>,
1616
}
1717

crates/jsshaker/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ fn main() {
195195
}
196196
output_path
197197
},
198-
PathBuf::from,
198+
|output| {
199+
if output == "." { (&args.path).into() } else { output.into() }
200+
},
199201
);
200202

201203
let mut output_file = match File::create(&output_path) {

0 commit comments

Comments
 (0)