Skip to content

Commit a6127c4

Browse files
committed
Version 1.2.8
1 parent d7a94ca commit a6127c4

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1.2.7
1+
# 1.2.8
22

33
- Data retracted incorrectly in CLJS #404
44

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The intention with DataScript is to be a basic building block in client-side app
1818
## Latest version [![Build Status](https://travis-ci.org/tonsky/datascript.svg?branch=master)](https://travis-ci.org/tonsky/datascript)
1919

2020
```clj
21-
[datascript "1.2.7"]
21+
[datascript "1.2.8"]
2222
```
2323

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

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

172172
or as a CommonJS module ([npm page](https://www.npmjs.org/package/datascript)):

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(def version "1.2.7")
1+
(def version "1.2.8")
22

33
(defproject datascript (str version (System/getenv "DATASCRIPT_CLASSIFIER"))
44
:description "An implementation of Datomic in-memory database and Datalog query engine in ClojureScript"

release-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "datascript",
3-
"version": "1.2.7",
3+
"version": "1.2.8",
44
"description": "Immutable in-memory triplestore with Datalog queries",
55
"homepage": "https://github.com/tonsky/datascript",
66
"author": "Nikita Prokopov (https://github.com/tonsky)",

release-js/wrapper.prefix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Datascript v1.2.7
2+
* Datascript v1.2.8
33
*
44
* Copyright 2014-2021 Nikita Prokopov
55
*

src/datascript/db.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@
352352
#?@(:clj [(instance? Comparable x) (.compareTo ^Comparable x y)]
353353
:cljs [(satisfies? IComparable x) (-compare x y)])
354354
(not (class-identical? x y)) (class-compare x y)
355-
#?@(:cljs [(or (string? x) (array? x) (true? x) (false? x)) (garray/defaultCompare x y)])
355+
#?@(:cljs [(or (number? x) (string? x) (array? x) (true? x) (false? x)) (garray/defaultCompare x y)])
356356
:else (- (hash x) (hash y)))
357357
(catch #?(:clj ClassCastException :cljs js/Error) e
358358
(if (not (class-identical? x y))

test/datascript/test/transact.cljc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,11 @@
441441
(vec (d/datoms db' :avet :index {:map 3} 1 )))))
442442
))
443443

444+
(deftest test-compare-numbers-js-404
445+
(let [db (d/db-with (d/empty-db) [{:num 42.5}])
446+
db' (d/db-with db [[:db/retract 1 :num 42]])]
447+
(is (= #{[1 :num 42.5]} (tdc/all-datoms db')))))
448+
444449
(deftest test-transitive-type-compare-386
445450
(let [txs [[{:block/uid "2LB4tlJGy"}]
446451
[{:block/uid "2ON453J0Z"}]

0 commit comments

Comments
 (0)