File tree 3 files changed +11
-5
lines changed 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
[ Squint] ( https://github.com/squint-cljs/squint ) : Light-weight ClojureScript dialect
4
4
5
+ ## v0.8.148
6
+
7
+ - Fix [ #669 ] ( https://github.com/squint-cljs/squint/issues/669 ) : munge refer-ed + renamed var
8
+
5
9
## v0.8.147
6
10
7
11
- Fix [ #661 ] ( https://github.com/squint-cljs/squint/issues/661 ) : support ` throw ` in expression position
Original file line number Diff line number Diff line change 584
584
(str " ." suffix)
585
585
" " )))
586
586
(str/join (map (fn [sym]
587
- (statement (str " globalThis." (munge current-ns-name) " ." sym " = " sym)))
587
+ (let [sym (munge sym)]
588
+ (statement (str " globalThis." (munge current-ns-name) " ." sym " = " sym))))
588
589
(map (fn [refer]
589
590
(get rename refer refer))
590
591
refer))))
Original file line number Diff line number Diff line change 1718
1718
(is (and
1719
1719
(str/includes? s " existsSync as exists" )
1720
1720
(str/includes? s " exists(\" README.md\" )" ))))
1721
- (let [s (squint/compile-string " (ns test-namespace (:require [\" some-js-library\" :refer [existsSync] :rename {existsSync exists }])) (exists \" README.md\" )"
1721
+ (let [s (squint/compile-string " (ns test-namespace (:require [\" some-js-library\" :refer [existsSync] :rename {existsSync foo-bar }])) (foo-bar \" README.md\" )"
1722
1722
{:repl true })]
1723
+ (println s)
1723
1724
(is (and
1724
- (str/includes? s " existsSync: exists" )
1725
- (str/includes? s " globalThis.test_namespace.exists(\" README.md\" )" ))))
1725
+ (str/includes? s " existsSync: foo_bar" )
1726
+ (str/includes? s " globalThis.test_namespace.foo_bar(\" README.md\" )" )))
1727
+ (is (not (str/includes? s " foo-bar" ) )))
1726
1728
(testing " alias + refer"
1727
1729
(let [s (squint/compile-string " (ns foo (:require [\" node:fs\" :as \" fs\" :refer [existsSync]]))" )]
1728
1730
(is (and
@@ -2352,7 +2354,6 @@ new Foo();")
2352
2354
:context (if return?
2353
2355
:return
2354
2356
:statement )})]
2355
- (println javascript)
2356
2357
(is (str/includes? pragmas " use client" ))
2357
2358
(is (str/includes? pragmas " // ts-check" ))
2358
2359
(is (not (str/includes? pragmas " ;" )))
You can’t perform that action at this time.
0 commit comments