diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d3ef3b4..daac05b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -26,9 +26,9 @@ jobs: - name: "prepare modules" run: > mkdir -p ~/.config/calcit/modules/ && cd ~/.config/calcit/modules/ - && git clone https://github.com/calcit-lang/memof.git - && git clone https://github.com/calcit-lang/lilac.git - && git clone https://github.com/calcit-lang/calcit-test.git + && git clone https://github.com/calcit-lang/memof.git --branch=0.0.7 + && git clone https://github.com/calcit-lang/lilac.git --branch=0.1.5 + && git clone https://github.com/calcit-lang/calcit-test.git --branch=0.0.3 - name: "load deps" run: yarn diff --git a/calcit.cirru b/calcit.cirru index 6357278..9574ec6 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -538,7 +538,7 @@ |r $ {} (:type :leaf) (:text ||=) (:by |root) (:at 1504774121421) |v $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} - |T $ {} (:type :leaf) (:text |escape) (:by |rJoDgvdeG) (:at 1615285474956) + |T $ {} (:type :leaf) (:text |.escape) (:by |rJoDgvdeG) (:at 1623693894637) |j $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} |T $ {} (:type :leaf) (:text |cond) (:by |root) (:at 1508599040218) @@ -1104,7 +1104,7 @@ |T $ {} (:type :leaf) (:text |x) (:by |root) (:at 1504774121421) |v $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} - |T $ {} (:type :leaf) (:text |substr) (:by |rJoDgvdeG) (:at 1612762043536) + |T $ {} (:type :leaf) (:text |&str:slice) (:by |rJoDgvdeG) (:at 1623693561429) |j $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} |T $ {} (:type :leaf) (:text |turn-string) (:by |rJoDgvdeG) (:at 1612762046832) @@ -2572,7 +2572,7 @@ |j $ {} (:type :leaf) (:text |println) (:by |root) (:at 1504774121421) |r $ {} (:type :leaf) (:text |op) (:by |root) (:at 1504774121421) |v $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1584720061550) (:text |op-data) - |L $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1584720208804) (:text |;) + |L $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623599499802) (:text |;) |x $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} |T $ {} (:type :leaf) (:text |let) (:by |root) (:at 1504774121421) @@ -2947,7 +2947,7 @@ |T $ {} (:type :leaf) (:text |->) (:by |root) (:at 1504774121421) |n $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1620232997811) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1620232997811) (:text |set->list) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693653303) (:text |.to-list) |j $ {} (:type :expr) (:by |root) (:at 1513782825167) :data $ {} |D $ {} (:type :leaf) (:text |filter) (:by |root) (:at 1513782826536) @@ -3109,7 +3109,7 @@ |T $ {} (:type :leaf) (:text |turn-keyword) (:by |rJoDgvdeG) (:at 1610189334191) |j $ {} (:type :expr) (:by |root) (:at 1513783794332) :data $ {} - |D $ {} (:type :leaf) (:text |substr) (:by |rJoDgvdeG) (:at 1610189337928) + |D $ {} (:type :leaf) (:text |&str:slice) (:by |rJoDgvdeG) (:at 1623693552430) |T $ {} (:type :expr) (:by |root) (:at 1513783787120) :data $ {} |T $ {} (:type :leaf) (:text |turn-string) (:by |rJoDgvdeG) (:at 1610188492570) @@ -8109,7 +8109,7 @@ |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610203915704) (:text |[]) |r $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610203915704) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610203915704) (:text |reverse) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693595033) (:text |.reverse) |v $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610203915704) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610203915704) (:text |map) @@ -8670,9 +8670,9 @@ :data $ {} |T $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1615282272526) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282276201) (:text |relevant-record?) - |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282276522) (:text |x) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693512551) (:text |.matches?) |r $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282286494) (:text |schema/Component) + |v $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693490954) (:text |x) |D $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282394918) (:text |if) |L $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1615282395333) :data $ {} @@ -8695,9 +8695,9 @@ |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610204173379) (:text |x) |P $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1615300167942) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615300172486) (:text |relevant-record?) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693524664) (:text |.matches?) |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615300173274) (:text |x) - |r $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615300179540) (:text |schema/Effect) + |b $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693521540) (:text |schema/Effect) |element? $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} |T $ {} (:type :leaf) (:text |defn) (:by |root) (:at 1504774121421) @@ -8714,9 +8714,9 @@ |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610189563418) (:text |x) |f $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1615282580662) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282584454) (:text |relevant-record?) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693510668) (:text |.matches?) |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282585004) (:text |x) - |r $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282587661) (:text |schema/Element) + |b $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693505819) (:text |schema/Element) |p $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1615282775914) (:text |false) :proc $ {} (:type :expr) (:by nil) (:at 1504774121421) :data $ {} @@ -10380,10 +10380,7 @@ |D $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619539924081) (:text |->) |L $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1619539924816) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619539924816) (:text |set->list) - |H $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1619539928971) - :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619539928971) (:text |to-pairs) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693621484) (:text |.to-list) |F $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1619539932087) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619539932087) (:text |either) @@ -10856,12 +10853,9 @@ |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610193202421) (:text |first) |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610193202421) (:text |y) |D $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619540233043) (:text |->) - |L $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1619540233943) - :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619540233943) (:text |set->list) |H $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1619540283177) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619540283177) (:text |to-pairs) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693634596) (:text |.to-list) |F $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1619540286780) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1619540286780) (:text |either) @@ -11206,7 +11200,7 @@ :data $ {} |T $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610030745111) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610030751527) (:text |quote-replace) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693450692) (:text |quasiquote) |j $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610030752742) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610030757397) (:text |defn) @@ -11264,7 +11258,7 @@ |j $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610030933840) (:text |body) |r $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610030935487) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610030983721) (:text |quote-replace) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693577109) (:text |quasiquote) |j $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610030953478) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610030954673) (:text |echo) @@ -11732,7 +11726,7 @@ |r $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610031795966) (:text |0) |yT $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1610031797072) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1610031803875) (:text |quote-replace) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693459981) (:text |quasiquote) |j $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1611826117097) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1611826117097) (:text |defn) @@ -11851,7 +11845,7 @@ |r $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1612711003106) (:text |0) |yT $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1612711003106) :data $ {} - |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1612711003106) (:text |quote-replace) + |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1623693443366) (:text |quasiquote) |j $ {} (:type :expr) (:by |rJoDgvdeG) (:at 1612711003106) :data $ {} |T $ {} (:type :leaf) (:by |rJoDgvdeG) (:at 1612711003106) (:text |defn) @@ -12295,4 +12289,4 @@ :init-fn |respo.main/main! :compact-output? true :storage-key |calcit.cirru - :version |0.14.27 + :version |0.14.28 diff --git a/compact.cirru b/compact.cirru index dbb2f66..5d432f3 100644 --- a/compact.cirru +++ b/compact.cirru @@ -2,7 +2,7 @@ {} (:package |respo) :configs $ {} (:init-fn |respo.main/main!) (:reload-fn |respo.main/reload!) :modules $ [] |memof/compact.cirru |lilac/compact.cirru |calcit-test/compact.cirru - :version |0.14.27 + :version |0.14.28 :files $ {} |respo.app.style.widget $ {} :ns $ quote @@ -92,7 +92,7 @@ v $ last entry str prop->attr $ turn-string k - , |= $ escape + , |= $ .escape cond = k :style style->string v @@ -173,7 +173,7 @@ str |on $ turn-string x |event->string $ quote defn event->string (x) - substr (turn-string x) 3 + &str:slice (turn-string x) 3 |dashed->camel $ quote defn dashed->camel (x) .!replace x dashed-letter-pattern $ fn (cc pos prop) @@ -469,7 +469,7 @@ k $ get pair 0 v $ get pair 1 not $ starts-with? (turn-string k) "\"on-" - set->list + .to-list sort $ fn (x y) compare-xy (first x) (first y) |pick-event $ quote @@ -488,7 +488,7 @@ k $ get pair 0 v $ get pair 1 [] - turn-keyword $ substr (turn-string k) 3 + turn-keyword $ &str:slice (turn-string k) 3 , v pairs-map |val-exists? $ quote @@ -1191,7 +1191,7 @@ {} (:class-name |task-list) (:style style-list) -> tasks either $ [] - reverse + .reverse map $ fn (task) let task-id $ :id task @@ -1289,13 +1289,13 @@ true false |component? $ quote defn component? (x) - if (record? x) (relevant-record? x schema/Component) false + if (record? x) (.matches? schema/Component x) false |effect? $ quote defn effect? (x) - and (record? x) (relevant-record? x schema/Effect) + and (record? x) (.matches? schema/Effect x) |element? $ quote defn element? (x) - if (record? x) (relevant-record? x schema/Element) false + if (record? x) (.matches? schema/Element x) false :proc $ quote () |respo.app.comp.task $ {} :ns $ quote @@ -1527,8 +1527,7 @@ attrs $ pick-attrs props styles $ -> either (:style props) ({}) - to-pairs - set->list + .to-list sort $ fn (x y) compare-xy (first x) (first y) event $ pick-event props @@ -1594,8 +1593,7 @@ attrs $ pick-attrs props styles $ -> props (:style) either $ {} - to-pairs - set->list + .to-list sort $ fn (x y) compare-xy (first x) (first y) event $ pick-event props @@ -1645,7 +1643,7 @@ let args-var $ gensym "\"args" params-var $ gensym "\"params" - quote-replace $ defn ~effect-name ~args + quasiquote $ defn ~effect-name ~args %{} schema/Effect :name $ ~ (turn-keyword effect-name) :coord $ [] @@ -1653,7 +1651,7 @@ :method $ fn (~args-var ~params-var) let[] ~args ~args-var $ let[] ~params ~params-var ~@ $ if (empty? body) - quote-replace $ echo "\"WARNING:" ~effect-name "\"lack code for handling effects!" + quasiquote $ echo "\"WARNING:" ~effect-name "\"lack code for handling effects!" , body |list-> $ quote defn list-> (props children) (create-list-element :div props children) @@ -1720,7 +1718,7 @@ assert "\"expected symbol" $ symbol? x assert "\"expected params" $ list? params assert "\"expected some result" $ > (count body) 0 - quote-replace $ defn ~x ~params ~@body + quasiquote $ defn ~x ~params ~@body |h1 $ quote defn h1 (props & children) create-element :h1 props & $ map children confirm-child @@ -1738,7 +1736,7 @@ assert "\"expected symbol of comp-name" $ symbol? comp-name assert "\"expected list for params" $ list? params assert "\"some component retured" $ &> (count body) 0 - quote-replace $ defn ~comp-name (~ params) + quasiquote $ defn ~comp-name (~ params) extract-effects-list $ %{} schema/Component :effects $ [] :name $ ~ (turn-keyword comp-name) diff --git a/main.js b/main.js index f81c19f..3ca97c3 100644 --- a/main.js +++ b/main.js @@ -1,10 +1,10 @@ -import { main_BANG_ } from "./js-out/respo.main.js" +import { main_$x_ } from "./js-out/respo.main.js" -main_BANG_() +main_$x_() if (import.meta.hot) { import.meta.hot.accept('./js-out/respo.main.js', (main) => { - main.reload_BANG_() + main.reload_$x_() }) } diff --git a/package.json b/package.json index f7d0fb3..45e6fc3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "version": "0.14.27", + "version": "0.14.28", "dependencies": { - "@calcit/procs": "^0.3.37" + "@calcit/procs": "^0.4.0-a3" }, "scripts": { "test": "cr --once --emit-js --init-fn=respo.test.main/main! && target=node entry=./test.js yarn webpack && node js-out/bundle.js" diff --git a/test.js b/test.js index 1701a02..e88d8dc 100644 --- a/test.js +++ b/test.js @@ -1,10 +1,10 @@ -import { main_BANG_ } from "./js-out/respo.test.main.js" +import { main_$x_ } from "./js-out/respo.test.main.js" -main_BANG_() +main_$x_() if (import.meta.hot) { import.meta.hot.accept('./js-out/respo.test.main.js', (main) => { - main.reload_BANG_() + main.reload_$x_() }) } diff --git a/yarn.lock b/yarn.lock index 664ed69..63a7195 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@calcit/procs@^0.3.37": - version "0.3.37" - resolved "https://registry.npmjs.org/@calcit/procs/-/procs-0.3.37.tgz#71c746f7ba3f2411624f2c64f6bad9e3099fa336" - integrity sha512-BpUCnFibBLbxdAZGrxAOIHCi3w7MkYvufKyDaeHDxw3UlNeEpXjmYJaEZ47p8wdvolOGncSq9xcq6uJTN4KGeg== +"@calcit/procs@^0.4.0-a3": + version "0.4.0-a3" + resolved "https://registry.npmjs.org/@calcit/procs/-/procs-0.4.0-a3.tgz#fbc9e85b3dc256bb701b20d502576dcf6d796d5e" + integrity sha512-8bbzcba6gCAPimsMTsknz3aDKPRas3DRynmtAXarsFJU7EOxXV0hFgd77FlmX3wawQNaqYVyB+mrNdIzI4Z/WA== dependencies: "@calcit/ternary-tree" "0.0.13" "@cirru/parser.ts" "^0.0.3" @@ -615,9 +615,9 @@ pkg-dir@^4.2.0: find-up "^4.0.0" postcss@^8.3.0: - version "8.3.2" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.3.2.tgz#ed3ec489f5428af5740cd6effcc216b4d455ee64" - integrity sha512-y1FK/AWdZlBF5lusS5j5l4/vF67+vQZt1SXPVJ32y1kRGDQyrs1zk32hG1cInRTu14P0V+orPz+ifwW/7rR4bg== + version "8.3.4" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.3.4.tgz#41ece1c43f2f7c74dc7d90144047ce052757b822" + integrity sha512-/tZY0PXExXXnNhKv3TOvZAOUYRyuqcCbBm2c17YMDK0PlVII3K7/LKdt3ScHL+hhouddjUWi+1sKDf9xXW+8YA== dependencies: colorette "^1.2.2" nanoid "^3.1.23"