Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
upgrade to ClojureScript 1.10.439 (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro authored Nov 4, 2018
1 parent 4ce5942 commit 580bef2
Show file tree
Hide file tree
Showing 11 changed files with 279 additions and 280 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"flowtype/use-flow-type": 2,
"flowtype/valid-syntax": 2,
"flowtype/no-dupe-keys": 2,
"flowtype/no-weak-types": [2, { "mixed": false }],
"flowtype/object-type-delimiter": 2,
"flowtype/require-return-type": [
2,
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.83.0
^0.85.0
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Changes

- Upgrade ClojureScript to version 1.10.339.
- Upgrade ClojureScript to version 1.10.439.
- Upgrade Node.js to version 10.9.0.

### Bug fixes
Expand Down
4 changes: 2 additions & 2 deletions boot.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#http://boot-clj.com
#Thu Oct 20 20:58:15 CEST 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.9.0
BOOT_VERSION=2.7.2
BOOT_CLOJURE_VERSION=1.10.0-beta3
BOOT_VERSION=2.8.2
10 changes: 5 additions & 5 deletions build.boot
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
(def +clojurescript-version+ (or (System/getenv "CANARY_CLOJURESCRIPT_VERSION")
"1.10.339"))
"1.10.439"))

(def +node-version+ (or (System/getenv "BUILD_NODE_VERSION")
"10.9.0"))

(set-env!
:source-paths #{"src/cljs/snapshot"}
:asset-paths #{"src/js" "src/cljs/bundled"}
:dependencies (into [['org.clojure/clojure "1.9.0"]
:dependencies (into [['org.clojure/clojure "1.10.0-beta3"]
['org.clojure/clojurescript +clojurescript-version+]]
'[[org.clojure/tools.reader "1.3.0"]
'[[org.clojure/tools.reader "1.3.2"]
[com.cognitect/transit-cljs "0.8.256"]
[malabarba/lazy-map "1.3"]
[fipp "0.6.12"]
[fipp "0.6.14"]
[org.clojure/test.check "0.10.0-alpha3" :scope "test"]
[com.cognitect/transit-clj "0.8.313" :scope "test"]
[com.cemerick/piggieback "0.2.2" :scope "test"]
[adzerk/boot-cljs "2.1.4" :scope "test"]
[adzerk/boot-cljs "2.1.5" :scope "test"]
[crisptrutski/boot-cljs-test "0.3.5-SNAPSHOT" :scope "test"]
[org.clojure/tools.nrepl "0.2.13" :scope "test"]
[weasel "0.7.0" :scope "test"]
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"chalk": "^2.4.1",
"cross-env": "5.2.0",
"death": "^1.1.0",
"eslint": "5.7.0",
"eslint": "5.8.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-plugin-babel": "5.2.1",
"eslint-plugin-flowtype": "3.0.0",
"eslint-plugin-flowtype": "3.2.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-react": "7.11.1",
"flow-bin": "0.83.0",
"flow-bin": "0.85.0",
"google-closure-compiler-js": "20170910.0.1",
"jest-cli": "23.6.0",
"jszip": "github:anmonteiro/jszip#patch-1",
Expand All @@ -79,7 +79,7 @@
"rollup-plugin-commonjs": "9.2.0",
"rollup-plugin-node-resolve": "3.4.0",
"rollup-plugin-replace": "2.1.0",
"webpack": "^4.22.0",
"webpack": "^4.24.0",
"webpack-cli": "^3.1.2",
"which-promise": "^1.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions src/cljs/snapshot/lumo/repl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
(defmacro dir
"Prints a sorted directory of public vars in a namespace"
[nsname]
`(lumo.repl/dir* '~nsname))
`(#'lumo.repl/dir* '~nsname))

(defmacro doc
"Prints documentation for a var or special form given its name"
[name]
`(lumo.repl/doc* '~name))
`(#'lumo.repl/doc* '~name))

(defmacro source
"Prints the source code for the given symbol, if it can find it.
Expand All @@ -17,7 +17,7 @@
Example: (source filter)"
[n]
`(lumo.repl/source* '~n))
`(#'lumo.repl/source* '~n))

(defmacro ^:private with-err-str
"Evaluates exprs in a context in which *print-err-fn* is bound to .append
Expand Down
4 changes: 2 additions & 2 deletions src/test/lumo/lumo/build_api_tests.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@
;; wasn't processed by Closure
(is (not (fs/existsSync (path/join out "node_modules/react/react.js"))))
(is (fs/existsSync (path/join out "emit_node_requires_test/core.js")))
(is (true? (boolean (re-find #"emit_node_requires_test\.core\.node\$module\$react_dom_BSLASH_\$server = require\('react-dom/server'\);"
(is (true? (boolean (re-find #"emit_node_requires_test\.core\.node\$module\$react_dom\$server = require\('react-dom/server'\);"
(slurp (path/join out "emit_node_requires_test/core.js"))))))
(is (true? (boolean (re-find #"emit_node_requires_test\.core\.node\$module\$react_dom_BSLASH_\$server\.renderToString"
(is (true? (boolean (re-find #"emit_node_requires_test\.core\.node\$module\$react_dom\$server\.renderToString"
(slurp (path/join out "emit_node_requires_test/core.js"))))))
(is (empty? @ws))))
(testing "Node native modules, CLJS-2218"
Expand Down
54 changes: 27 additions & 27 deletions src/test/lumo/lumo/repl_tests.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@
(use-fixtures :once test-util/with-lumo-globals test-util/with-cache))

(deftest test-is-readable?
(is (nil? (lumo/is-readable? "(")))
(is (= (lumo/is-readable? "(+ 1 2)") ""))
(is (= (lumo/is-readable? "(+ 1 2) :foo") " :foo"))
(is (nil? (lumo/is-readable? "")))
(is (= (lumo/is-readable? ")") "")))
(is (nil? (#'lumo/is-readable? "(")))
(is (= (#'lumo/is-readable? "(+ 1 2)") ""))
(is (= (#'lumo/is-readable? "(+ 1 2) :foo") " :foo"))
(is (nil? (#'lumo/is-readable? "")))
(is (= (#'lumo/is-readable? ")") "")))

(deftest test-form-start
(is (= (lumo/form-start "( )" 2) 0))
(is (= (lumo/form-start "(let [a 1\nb 2])" 13) 5))
(is (= (lumo/form-start "#{1 2 3}" 7) 1))
(is (= (lumo/form-start "(+ 1 2" 5) nil))
(is (= (lumo/form-start "(let [a 1\n b 2\n c 3]" 29) 5))
(is (= (lumo/form-start "(())" 3) 0)))
(is (= (#'lumo/form-start "( )" 2) 0))
(is (= (#'lumo/form-start "(let [a 1\nb 2])" 13) 5))
(is (= (#'lumo/form-start "#{1 2 3}" 7) 1))
(is (= (#'lumo/form-start "(+ 1 2" 5) nil))
(is (= (#'lumo/form-start "(let [a 1\n b 2\n c 3]" 29) 5))
(is (= (#'lumo/form-start "(())" 3) 0)))

(deftest test-get-highlight-coords
(is (= (js->clj (lumo/get-highlight-coordinates #js ["(+ 1 2)"] 6)) [0 0]))
(is (= (js->clj (lumo/get-highlight-coordinates #js ["(+ 1 2"] 5)) [-1 -1]))
(is (= (js->clj (lumo/get-highlight-coordinates #js ["(+ 1 2" ")"] 0)) [0 1]))
(is (= (js->clj (lumo/get-highlight-coordinates
(is (= (js->clj (#'lumo/get-highlight-coordinates #js ["(+ 1 2)"] 6)) [0 0]))
(is (= (js->clj (#'lumo/get-highlight-coordinates #js ["(+ 1 2"] 5)) [-1 -1]))
(is (= (js->clj (#'lumo/get-highlight-coordinates #js ["(+ 1 2" ")"] 0)) [0 1]))
(is (= (js->clj (#'lumo/get-highlight-coordinates
#js ["(let [a 1" " b 2" " c 3]"] 9))
[5 2]))
(is (= (js->clj (lumo/get-highlight-coordinates #js ["(let [a 1)"] 9)) [-1 -1]))
(is (= (js->clj (lumo/get-highlight-coordinates #js ["(let [a 1])"] 9)) [5 0]))
(is (= (js->clj (lumo/get-highlight-coordinates
(is (= (js->clj (#'lumo/get-highlight-coordinates #js ["(let [a 1)"] 9)) [-1 -1]))
(is (= (js->clj (#'lumo/get-highlight-coordinates #js ["(let [a 1])"] 9)) [5 0]))
(is (= (js->clj (#'lumo/get-highlight-coordinates
#js ["(let [a 1" "" " b 2" " c 3]"] 9))
[5 3]))
(is (= (js->clj (lumo/get-highlight-coordinates #js ["(())"] 3)) [0 0])))
(is (= (js->clj (#'lumo/get-highlight-coordinates #js ["(())"] 3)) [0 0])))

(defn is-completion [i o]
(lumo/get-completions i
Expand All @@ -62,10 +62,10 @@
(when test-util/lumo-env?
(deftest test-get-completions
(testing "corner cases"
(is-completion "(" (mapv #(str "(" %) (lumo/completion-candidates true nil)))
(is-completion "" (lumo/completion-candidates false nil)))
(is-completion "(" (mapv #(str "(" %) (#'lumo/completion-candidates true nil)))
(is-completion "" (#'lumo/completion-candidates false nil)))
(testing "keyword completions"
(is-completion ":" lumo/keyword-completions)
(is-completion ":" @#'lumo/keyword-completions)
(is-completion ":a" [":added" ":arglists" ":args" ":as" ":author"])
(is-completion ":ref" [":refer" ":refer-clojure" ":refer-macros"]))
(testing "aliased namespaces completions"
Expand Down Expand Up @@ -119,16 +119,16 @@
(testing "namespace fully qualified completion"
(s/def ::a-spec string?)
(is-contains-completion ":lumo.repl-tests/" ":lumo.repl-tests/a-spec")
(reset! s/registry-ref {}))
(reset! @#'s/registry-ref {}))
(with-redefs [lumo/current-alias-map (constantly '{common lumo.common})]
(testing "namespace fully qualified completion - alias"
(s/def ::common/a-spec string?)
(is-contains-completion "::common/" "::common/a-spec")
(reset! s/registry-ref {})))
(reset! @#'s/registry-ref {})))
(testing "arbitrary fully qualified keyword"
(s/def :arbitrary/a-spec string?)
(is-contains-completion ":arbitrary/" ":arbitrary/a-spec")
(reset! s/registry-ref {})))
(reset! @#'s/registry-ref {})))
(testing "prefix filtering"
(with-redefs [lumo/get-namespace (fn []
'{:defs {red6hlolli {:name cljs.user/red6hlolli}}})]
Expand Down Expand Up @@ -164,8 +164,8 @@


(deftest test-root-resource
(is (= (lumo/root-resource 'foo-bar-baz) "/foo_bar_baz"))
(is (= (lumo/root-resource 'foo.bar.baz) "/foo/bar/baz")))
(is (= (#'lumo/root-resource 'foo-bar-baz) "/foo_bar_baz"))
(is (= (#'lumo/root-resource 'foo.bar.baz) "/foo/bar/baz")))

(deftest test-get-arglists
(is (= (lumo/get-arglists "whatever") nil))
Expand Down
2 changes: 1 addition & 1 deletion src/test/lumo/lumo/test_util.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
(-> cljs-core-macros-cache-path
read-file-sync
common/transit-json->cljs))
(reset! lumo.repl/st @st)
(reset! @#'lumo.repl/st @st)
(env/with-compiler-env st
(f))))

Expand Down
Loading

0 comments on commit 580bef2

Please sign in to comment.