Commit Graph

152 Commits

Author SHA1 Message Date
Erik Arvidsson f2a83346ca JS: Change hash function to sha512
For browser support we use npm amscrypto.js-sha512. For node we use its
builtin crypto module.
2016-07-12 13:59:09 -07:00
Rafael Weinstein 94a27139c7 bump noms npm version & update codec-perf-rig numbers (#2016) 2016-07-11 16:54:12 -07:00
Mike Gray b6f19dfea5 number encoding (#1845)
Moved to encoding Values of type Number as 2 varints.
2016-07-11 12:08:56 -07:00
Ben Kalman c7b67ab50a Noms JS version 49.1 --> 49.2 from last patch (#1990) 2016-07-08 10:39:47 -07:00
Erik Arvidsson 983fa59090 Samples js shared 2 (#1973)
* Revert "Revert "Share node_modules for samples/js" (#1967)"

This reverts commit 7bb1623e99.

* Add parent directory to the PATH

* Change run-all-js-tests to run samples/js before samples/js/**

* Fix a temporary comment
2016-07-05 16:25:21 -07:00
Erik Arvidsson 0a502c3ee4 Fix some js tests (#1932) 2016-06-29 15:57:53 -07:00
Ben Kalman 3d75150b2e Noms version 48.0.0 --> 49.0.0 (#1902) 2016-06-24 12:33:43 -07:00
Erik Arvidsson ebd9a88d23 JS: Fix http batch store (#1885)
There were a few issues here:

1. The version header was not always passed to fetch
2. HTTP headers are case insensitive and Node an Fetch uses lower case.
3. The old code used a Map instead of an object as map. Node and Fetch
   uses an object as map. Now we just pass along the response headers.

Fixes #1881
Closes #1880 (which this is partially based in)
2016-06-23 17:41:56 +08:00
Erik Arvidsson e3b52ba2c6 Increment JS SDK version (#1879) 2016-06-23 13:42:35 +08:00
Rafael Weinstein 62dcc6f377 Split node & browser Uint8Array usage (#1811)
Split node & browser Uint8Array usage
2016-06-14 12:28:28 -07:00
Rafael Weinstein 8eda6fcea6 Revert "JS: Split BinaryNomsWriter into Node+Browser (#1773)" (#1781)
This reverts commit 5cb7a5db28.
2016-06-10 10:54:03 -07:00
Erik Arvidsson 5cb7a5db28 JS: Split BinaryNomsWriter into Node+Browser (#1773)
This is because on Node we can write UTF8 directly to a buffer
2016-06-09 17:21:11 -07:00
Rafael Weinstein dc137a337d export newStructWithType (#1766) 2016-06-08 18:52:49 -07:00
Erik Arvidsson 99f757f823 Align js api (#1756)
* JS: remove -> delete

* JS: Set insert -> add

* JS: List remove(start, end) -> remove(idx)

* JS: Increment to 46

Fixes #1750
Fixes #1751
Fixes #1752
2016-06-08 15:20:52 -07:00
Erik Arvidsson abbd0cfb1e JS: Make Structs use arrays (#1743)
...instead of objects as maps.

Fixes #1715
2016-06-07 15:59:27 -07:00
Erik Arvidsson 4af0ca1efb Fix issue with in browser Hash (#1738)
Also, make Hash not copy the bytes.
2016-06-06 17:11:34 -07:00
Erik Arvidsson e4b7d13416 Add license field to all the package.json file (#1742)
Issue #1307
2016-06-06 16:56:10 -07:00
Erik Arvidsson 1e84c47082 JS: Make Hash store the digest internally (#1704)
Now that we are using a binary serialization it makes more sense to
have Hash work with the digest and only compute the sha1 string when
needed.

Fixes #1685
2016-06-03 16:34:35 -07:00
Erik Arvidsson 1b6ef9ceee Rename Parent<> to Cycle<> (#1718) 2016-06-03 10:31:27 -07:00
Erik Arvidsson d6537c74c5 Update clients to use latest eslint (#1699)
And fix new errors that were found.

This also adds tools/run-all-js-tests.py which runs `npm install`
and `npm test` in all directories containing a package.json file.
2016-06-02 09:41:32 -07:00
Rafael Weinstein 143d570960 Binary encoding (#1679)
Noms format is now binary encoded.
2016-05-31 16:13:51 -07:00
Ben Kalman b79f5b0a04 Implement JS BlobReader.seek (#1673) 2016-05-27 18:39:59 -07:00
Erik Arvidsson dbd4c572df Add ListBuilder (#1669)
A ListBuilder allows creating large lists efficiently
2016-05-27 14:49:22 -07:00
Aaron Boodman db9bb15786 Remove es6 support from js sdk (#1668)
We're not using it, and it just makes compiles slower
2016-05-27 14:08:48 -07:00
Aaron Boodman 18838b7c2a js sdk: expose type.describe() for convenience (#1667) 2016-05-27 14:08:34 -07:00
Erik Arvidsson f52a062f81 Increment version (#1664) 2016-05-27 11:24:16 -07:00
Ben Kalman 5792f901c6 Use native browser fetch if available (#1655) 2016-05-27 10:40:20 -07:00
Erik Arvidsson d2880c5d2a Export escapeStructField (#1654) 2016-05-26 17:01:54 -07:00
Dan Willhite e271576f06 Forward all query parameters when calling remote server api. 2016-05-25 17:34:49 -07:00
Erik Arvidsson 998b7a9df0 Update flow to 0.25 (#1619) 2016-05-25 10:30:17 -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
Aaron Boodman 68b1b88a69 js/json-convert: encode field names (#1620) 2016-05-24 16:47:22 -07:00
Mike Gray 61848137ad increasing the mocha timeout so travis builds fail less (#1622) 2016-05-24 14:49:31 -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 a84ecf41eb Fix code review issues 2016-05-23 16:51:45 -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
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
Erik Arvidsson f653a20511 Make Splore Great Again! (#1541) 2016-05-18 17:57:57 -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 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 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