Skip to content

Commit

Permalink
Version 1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Aug 24, 2021
1 parent d7a94ca commit a6127c4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 1.2.7
# 1.2.8

- Data retracted incorrectly in CLJS #404

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The intention with DataScript is to be a basic building block in client-side app
## Latest version [![Build Status](https://travis-ci.org/tonsky/datascript.svg?branch=master)](https://travis-ci.org/tonsky/datascript)

```clj
[datascript "1.2.7"]
[datascript "1.2.8"]
```

## Support us
Expand Down Expand Up @@ -166,7 +166,7 @@ For more examples, see [our acceptance test suite](test/datascript/test/).
DataScript can be used from any JS engine without additional dependencies:

```html
<script src="https://github.com/tonsky/datascript/releases/download/1.2.7/datascript-1.2.7.min.js"></script>
<script src="https://github.com/tonsky/datascript/releases/download/1.2.8/datascript-1.2.8.min.js"></script>
```

or as a CommonJS module ([npm page](https://www.npmjs.org/package/datascript)):
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(def version "1.2.7")
(def version "1.2.8")

(defproject datascript (str version (System/getenv "DATASCRIPT_CLASSIFIER"))
:description "An implementation of Datomic in-memory database and Datalog query engine in ClojureScript"
Expand Down
2 changes: 1 addition & 1 deletion release-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datascript",
"version": "1.2.7",
"version": "1.2.8",
"description": "Immutable in-memory triplestore with Datalog queries",
"homepage": "https://github.com/tonsky/datascript",
"author": "Nikita Prokopov (https://github.com/tonsky)",
Expand Down
2 changes: 1 addition & 1 deletion release-js/wrapper.prefix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Datascript v1.2.7
* Datascript v1.2.8
*
* Copyright 2014-2021 Nikita Prokopov
*
Expand Down
2 changes: 1 addition & 1 deletion src/datascript/db.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
#?@(:clj [(instance? Comparable x) (.compareTo ^Comparable x y)]
:cljs [(satisfies? IComparable x) (-compare x y)])
(not (class-identical? x y)) (class-compare x y)
#?@(:cljs [(or (string? x) (array? x) (true? x) (false? x)) (garray/defaultCompare x y)])
#?@(:cljs [(or (number? x) (string? x) (array? x) (true? x) (false? x)) (garray/defaultCompare x y)])
:else (- (hash x) (hash y)))
(catch #?(:clj ClassCastException :cljs js/Error) e
(if (not (class-identical? x y))
Expand Down
5 changes: 5 additions & 0 deletions test/datascript/test/transact.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@
(vec (d/datoms db' :avet :index {:map 3} 1 )))))
))

(deftest test-compare-numbers-js-404
(let [db (d/db-with (d/empty-db) [{:num 42.5}])
db' (d/db-with db [[:db/retract 1 :num 42]])]
(is (= #{[1 :num 42.5]} (tdc/all-datoms db')))))

(deftest test-transitive-type-compare-386
(let [txs [[{:block/uid "2LB4tlJGy"}]
[{:block/uid "2ON453J0Z"}]
Expand Down

0 comments on commit a6127c4

Please sign in to comment.