Erik Arvidsson
0a3a5e72f2
Chunks and value instances can never be of type/kind Value ( #1628 )
2016-05-25 09:26:55 -07:00
Dan Willhite
ed7d9629b8
Merge pull request #1624 from willhite/js
...
Enable database authorization on JS dataspecs.
2016-05-24 17:54:48 -07:00
Dan Willhite
0a2dd97d4a
Enable database authorization on JS dataspecs.
...
Accomplished by forwarding query params specified on database spec to
remote server api.
Fixes #1595
2016-05-24 17:47:46 -07:00
cmasone-attic
8dfbe399a3
When decoding a Chunk, re-use the hash in the decoded Value ( #1616 )
...
This should mean that we calculate the hash of read Values only one,
when pulling the chunk out of storage. It means we need to be careful
about making sure that we actually do calculate hashes of chunks we
read, or that we get the hash from a trusted place.
2016-05-24 17:16:16 -07:00
Aaron Boodman
68b1b88a69
js/json-convert: encode field names ( #1620 )
2016-05-24 16:47:22 -07:00
Ben Kalman
0c4ab7f8eb
Change Promise detection in walk so that node 5 works ( #1625 )
2016-05-24 16:35:33 -07:00
Mike Gray
61848137ad
increasing the mocha timeout so travis builds fail less ( #1622 )
2016-05-24 14:49:31 -07:00
Mike Gray
cfb2725323
implement indexedSequence and list diff for Go ( #1613 )
2016-05-24 14:18:51 -07:00
Aaron Boodman
43d991495c
noms/js: export isSubtype ( #1617 )
2016-05-24 11:55:19 -07:00
Ben Kalman
e34551cd54
Standardise database/dataset accessors as database() and dataset() ( #1607 )
...
In JS they are either set() or store(). In Go they are either Dataset()
Store(), or Database().
2016-05-24 10:25:16 -07:00
Erik Arvidsson
d8c7936e8d
Restrict names of structs ( #1612 )
...
Struct names must be of the form `^[a-zA-Z][a-zA-Z0-9_]*$`
Fixes #1402
2016-05-23 18:11:26 -07:00
Erik Arvidsson
eb0e960e3c
Restrict dataset ID names ( #1611 )
...
A dataset must be of the form `^[a-zA-Z0-9\-_/]+$`
Towards #1402
2016-05-23 17:45:10 -07:00
Erik Arvidsson
a84ecf41eb
Fix code review issues
2016-05-23 16:51:45 -07:00
Erik Arvidsson
48b9256202
Limit struct field names to ascii identifiers
...
This is a revert of the previous revert e832dbbdb1 .
Towards #1402
2016-05-23 16:50:41 -07:00
Aaron Boodman
77de0b0e54
Introduce js/json-convert.js ( #1601 )
2016-05-23 15:07:35 -07:00
Ben Kalman
56c7f44aa9
Make JS walk() return value mean "skip" not "recurse" ( #1604 )
...
This is consistent with Go Walk(), and it's arguably less surprising
than returning undefined implies false.
2016-05-23 14:32:45 -07:00
Erik Arvidsson
6aa35802e8
Declare NodeJS version dependency for NOMS
...
Fixes #1057
2016-05-23 13:51:53 -07:00
Erik Arvidsson
859eca4650
Increment JS version
2016-05-20 19:18:32 -07:00
Erik Arvidsson
3ae55e01ec
JS: Rename RefValue to Ref
2016-05-20 19:18:32 -07:00
Erik Arvidsson
7d8eea4a07
JS: Rename Ref to Hash
2016-05-20 19:18:32 -07:00
Mike Gray
214c76687b
porting edit-distance and tests from js to go ( #1559 )
2016-05-20 20:43:56 -04:00
Ben Kalman
c97c9ac78b
Export makeUnionType in noms.js ( #1567 )
2016-05-20 16:44:06 -07:00
Erik Arvidsson
c6fa8b1029
Rename valueOrPrimite to Value ( #1566 )
...
This renames Value to ValueBase, valueOrPrimite to Value and make Value the default export.
Fixes #1528
2016-05-20 16:39:30 -07:00
Ben Kalman
01a50e9541
Change the async "newList" and friends to sync "new List" constructors ( #1554 )
...
Friends: List, Set, Map, Blob, and Commit. This lets us remove a lot of
Promise and async/await bloat.
2016-05-20 15:01:55 -07:00
cmasone-attic
dc07bca3d4
Merge pull request #1555 from cmasone-attic/dbcleanup
...
JS: make sure we call close() on Database most of the time
2016-05-20 08:18:53 -07:00
Mike Gray
ade84de2da
implementing map/set/orderedSequence diff ( #1521 )
...
resolving a portion of issue #1075
2016-05-20 09:20:01 -04:00
Chris Masone
917a4d8564
JS: make sure we call close() on Database most of the time
...
Other than DatasetSpec::value(), this should close all Database
instances that we create. I'm not sure how to deal with that one
case, though.
2016-05-19 16:49:54 -07:00
Rafael Weinstein
0e87d9f409
goPath ( #1546 )
...
Implement Go Path
2016-05-19 13:56:18 -07:00
Erik Arvidsson
cd64ee5047
Update clients to 32.2 ( #1545 )
...
This updates the clients to use Foo instead of NomsFoo
2016-05-19 11:38:00 -07:00
Rafael Weinstein
4389605e47
Struct diff ( #1548 )
...
StructDiff
2016-05-19 11:09:26 -07:00
Erik Arvidsson
f653a20511
Make Splore Great Again! ( #1541 )
2016-05-18 17:57:57 -07:00
Ben Kalman
7f56776a8b
Add dist back to .flowconfig ( #1544 )
2016-05-18 17:51:56 -07:00
Ben Kalman
65f4ae358c
Make sequence chunker function return (meta tuple, collection) pair ( #1540 )
...
Both Go and JS. Currently they return (any, value), but it's useful to
have the more specific return type.
2016-05-18 16:01:13 -07:00
Erik Arvidsson
778acf8454
Make OrderedPutCache throw in browsers ( #1539 )
...
This is a stop gap to ensure that the browser version does not depend
on nodejs modules.
Fixes #1531
2016-05-18 15:28:09 -07:00
Erik Arvidsson
d67d1fb924
Make Map use Array<[K, V]> instead of Array<K | V> ( #1538 )
2016-05-18 15:16:08 -07:00
Rafael Weinstein
4d47b9cf18
jsPath ( #1527 )
2016-05-18 14:35:26 -07:00
Erik Arvidsson
643c12172b
Noms data structure names ( #1525 )
...
* Change to default exports
* Rename NomsX to X in (Blob, List, Map, Set)
* Increment version
2016-05-18 09:26:36 -07:00
Erik Arvidsson
17a78061c0
Struct subtype ( #1524 )
...
* Subtype checking for structs
Towards #1491
2016-05-18 09:06:53 -07:00
Erik Arvidsson
df1c91843d
JS: No need to compute the union type in decode ( #1523 )
...
* JS: No need to compute the union type in decode
Instead trust that the serialization is correct
Towards #1491
2016-05-17 15:39:18 -07:00
Erik Arvidsson
653aa41776
Go: Dynamic types for Data structure API ( #1516 )
2016-05-17 15:02:53 -07:00
Chris Masone
41d5ff8063
JS: add http idle timeout
...
Node's http.ClientRequest supports setting an idle-timeout, so
just go ahead and do that. Setting to 2 minutes to match Go.
Fixes #1414
2016-05-17 14:11:34 -07:00
Erik Arvidsson
d125446955
Clear dist before publish ( #1480 )
...
This is so that we do not keep old files around.
Fixes #1380
2016-05-16 19:13:44 -07:00
cmasone-attic
e0eb7bc297
JS: back BatchStore's put-cache with tingodb ( #1479 )
...
* JS: back BatchStore's put-cache with tingodb
tingodb is a pure-JS, file-backed mongodb-api-compatible database.
Before this patch, BatchStore was caching all pending chunks in memory,
which seems unlikely to scale. Putting them in a tingodb spills them to
disk as needed, though we can still iterate them in put-order when it's
time to send them.
Fixes #1349
2016-05-16 14:38:25 -07:00
Erik Arvidsson
5db7fe8285
JS: Update the collection/struct API to compute the type. ( #1502 )
...
When you create or modify a data structure we now compute the type
based on the type of the values in the data structure.
Towards #1491
2016-05-16 10:58:50 -07:00
Ben Kalman
5caad77f81
js/walk: allow callback to return boolean in addition to Promise ( #1511 )
2016-05-16 10:52:31 -07:00
Erik Arvidsson
2883609860
Update makeUnionType type to flatten and remove duplicates ( #1492 )
...
makeUnionType now flattens and removes duplicate types. With this
change makeUnionType might no longer actually create a union
type in the case there is only one type in the union.
Towards #1491
2016-05-13 09:21:03 -07:00
Erik Arvidsson
58464baef9
Total ordering of values ( #1475 )
...
This allows having a set/map of heterogenous elements/keys. To support
this we have to be able to have a total ordering for all noms values.
The ordering is false < true < -999 < 0 < 999 < "" < "a" < "z" < Hash
In other words, Bool < Number < String < * and for comparing non
primitives we compare the hash of the object.
Fixes #1104
Fixes #1312
2016-05-12 10:35:56 -07:00
Erik Arvidsson
e832dbbdb1
Revert "Limit struct field names to ascii identifiers" ( #1483 )
2016-05-11 16:19:57 -07:00
Erik Arvidsson
5e09379d57
Limit struct field names to ascii identifiers ( #1469 )
...
[a-zA-Z][a-zA-Z0-9_]*
Towards #1402
2016-05-11 15:49:03 -07:00
Erik Arvidsson
acec0ffa4e
Micro optimize Buzhash ( #1482 )
...
- All bitwise operators already return int32 (or uint32) so we can remove the `| 0`
- Inline constants that are only used once
Towards #1465
2016-05-11 15:17:12 -07:00