File tree Expand file tree Collapse file tree 5 files changed +27
-10
lines changed
Expand file tree Collapse file tree 5 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 22
33## master
44
5+ * [ #45 ] ( https://github.com/clojure-emacs/clj-suitable/issues/45 ) : don't exclude enumerable properties from ` Object ` .
6+
57## 0.6.1 (2023-11-07)
68
79- [ #44 ] ( https://github.com/clojure-emacs/clj-suitable/pull/44 ) : More robust completion for referred keywords. If a given namespace is
Original file line number Diff line number Diff line change 1313 lein with-profile -user clean
1414
1515test : clean
16- clojure -A :test:$(VERSION ) -d src/test
16+ clojure -M :test:test-runner: $(VERSION )
1717
1818kondo :
1919 clojure -M:dev-figwheel:fig-repl:dev-shadow:test:kondo
Original file line number Diff line number Diff line change 4444 :main-opts [" -m" " figwheel.main" " -b" " fig" ]
4545 :extra-deps {com.bhauman/figwheel-main {:mvn/version " 0.2.18" }}}
4646
47- ; ; tests
4847 :test {:extra-paths [" src/test" " resources" ]
49- :extra-deps {com.cognitect/test-runner {:git/url " https://github.com/cognitect-labs/test-runner.git"
50- :sha " 209b64504cb3bd3b99ecfec7937b358a879f55c1" }
51- cider/cider-nrepl {:mvn/version " 0.32.0" }
48+ :extra-deps {cider/cider-nrepl {:mvn/version " 0.32.0" }
5249 cider/piggieback {:mvn/version " 0.5.3" }}
53- :jvm-opts [" -Dclojure.main.report=stderr" ]
54- :main-opts [" -m" " cognitect.test-runner" " -d" " src/test" ]}
50+ :jvm-opts [" -Dclojure.main.report=stderr" ]}
51+
52+ :test-runner {:extra-deps {com.cognitect/test-runner {:git/url " https://github.com/cognitect-labs/test-runner.git"
53+ :sha " 209b64504cb3bd3b99ecfec7937b358a879f55c1" }}
54+ :main-opts [" -m" " cognitect.test-runner" " -d" " src/test" ]}
5555
5656 ; ; build a jar, https://juxt.pro/blog/posts/pack-maven.html
5757 :pack {:extra-deps {pack/pack.alpha {:git/url " https://github.com/juxt/pack.alpha.git"
Original file line number Diff line number Diff line change 2828 (for [[i {:keys [_obj props]}] (map-indexed vector (properties-by-prototype js-obj))
2929 key (js-keys props)
3030 :when (and (not (get @seen key))
31- (not (oget (oget props key) " enumerable" ))
31+ (if (or (= " [object String]" (js/Object.prototype.toString.call js-obj))
32+ (js/Array.isArray js-obj))
33+ (not (oget (oget props key) " enumerable" ))
34+ true )
3235 (or (empty? prefix)
3336 (starts-with? key prefix)))]
3437 (let [prop (oget props key)]
Original file line number Diff line number Diff line change 105105 (is (= [{:ns " js/Object" , :candidate " .keys" :type " function" }] candidates)
106106 (pr-str response))))
107107
108- (testing " make sure that enumerable items are filtered out"
108+ (testing " enumerable items are filtered out"
109109 (are [context candidates] (= candidates
110110 (let [response (message {:op " complete"
111111 :ns " cljs.user"
116116 [{:candidate " .-length" , :ns " (js/String \" abc\" )" , :type " var" }]
117117
118118 " (-> (js/String \" abc\" ) __prefix__)"
119- [{:candidate " .-length" , :ns " (-> (js/String \" abc\" ))" , :type " var" }]))))
119+ [{:candidate " .-length" , :ns " (-> (js/String \" abc\" ))" , :type " var" }]
120+
121+ " (__prefix__ #js [1 2 3])"
122+ []
123+
124+ " (__prefix__ (array 1 2 3))"
125+ [{:candidate " .-length" , :ns " (array 1 2 3)" , :type " var" }]
126+
127+ " (__prefix__ (js/Array. 1 2 3))"
128+ [{:candidate " .-length" , :ns " (js/Array. 1 2 3)" , :type " var" }]
129+
130+ " (__prefix__ (js/Set. (js/Array. 1 2 3)))"
131+ [{:candidate " .-size" , :ns " (js/Set. (js/Array. 1 2 3))" , :type " var" }]))))
120132
121133(deftest node-env?
122134 (is (false ? (sut/node-env? nil )))
You can’t perform that action at this time.
0 commit comments