diff --git a/.gitignore b/.gitignore index 450897ac..9283ed7f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ perf release-js/datascript*.js release-js/npm-* web/target-cljs +release.clj diff --git a/CHANGELOG.md b/CHANGELOG.md index b61a8b1c..93b0f3a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.11.0 + +- Fixed `init_db` in js (issue #73) +- Preliminary work for Clojure port (PR #70, #71) +- [ BREAKING ] DS now requires CLJS 0.0-3196 or later + # 0.10.0 - New parser for query and rules diff --git a/README.md b/README.md index cc3e34d9..53d071fa 100644 --- a/README.md +++ b/README.md @@ -46,11 +46,13 @@ For more examples, see [our acceptance test suite](test/datascript/test/). ```clj :dependencies [ - [org.clojure/clojurescript "0.0-2985"] - [datascript "0.10.0"] + [org.clojure/clojurescript "0.0-3211"] + [datascript "0.11.0"] ] ``` +_Note:_ DataScript 0.11.0 and later will only work with CLJS 0.0-3196 and later + ```clj (require '[datascript :as d]) @@ -119,11 +121,9 @@ For more examples, see [our acceptance test suite](test/datascript/test/). DataScript can be used from any JS engine without additional dependencies: ``` - + ``` -[Download datascript-0.10.0.min.js](https://github.com/tonsky/datascript/releases/download/0.10.0/datascript-0.10.0.min.js), 69k gzipped. - or as a CommonJS module ([npm page](https://www.npmjs.org/package/datascript)): ``` diff --git a/project.clj b/project.clj index cd80775c..292eb32d 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject datascript "0.10.0" +(defproject datascript "0.11.0" :description "An implementation of Datomic in-memory database and Datalog query engine in ClojureScript" :license {:name "Eclipse" :url "http://www.eclipse.org/legal/epl-v10.html"} diff --git a/release-js/package.json b/release-js/package.json index 33526919..e54f446d 100644 --- a/release-js/package.json +++ b/release-js/package.json @@ -1,6 +1,6 @@ { "name": "datascript", - "version": "0.10.0", + "version": "0.11.0", "description": "Immutable in-memory triplestore with Datalog queries", "homepage": "https://github.com/tonsky/datascript", "author": "Nikita Prokopov (https://github.com/tonsky)", @@ -18,6 +18,7 @@ "Nikita Prokopov (https://github.com/tonsky)", "David Thomas Hume (https://github.com/dthume)", "montyxcantsin (https://github.com/montyxcantsin)", + "Ben Fleis (https://github.com/benfleis)", "Gijs Stuurman (https://github.com/thegeez)", "Yevgeny Armor (https://github.com/izirku)", "Kevin Lynagh (https://github.com/lynaghk)", diff --git a/release-js/wrapper.prefix b/release-js/wrapper.prefix index df615323..4da85691 100644 --- a/release-js/wrapper.prefix +++ b/release-js/wrapper.prefix @@ -1,5 +1,5 @@ /** - * Datascript v0.10.0 + * Datascript v0.11.0 * * Copyright 2014-2015 Nikita Prokopov * diff --git a/src/datascript/core.cljc b/src/datascript/core.cljc index 1b797250..cf329fc7 100644 --- a/src/datascript/core.cljc +++ b/src/datascript/core.cljc @@ -90,23 +90,10 @@ ;; fast versions without nil checks -;; see http://dev.clojure.org/jira/browse/CLJS-892 -(defn- compare-keywords-quick [a b] - (cond - (identical? (.-fqn a) (.-fqn b)) 0 - (and (not (.-ns a)) (.-ns b)) -1 - (.-ns a) (if-not (.-ns b) - 1 - (let [nsc (garray/defaultCompare (.-ns a) (.-ns b))] - (if (zero? nsc) - (garray/defaultCompare (.-name a) (.-name b)) - nsc))) - :default (garray/defaultCompare (.-name a) (.-name b)))) - (defn- cmp-attr-quick [a1 a2] ;; either both are keywords or both are strings (if (keyword? a1) - (compare-keywords-quick a1 a2) + (-compare a1 a2) (garray/defaultCompare a1 a2))) (defn- cmp-val-quick [o1 o2]