Commit Graph

584 Commits

Author SHA1 Message Date
Ben Kalman
3c764c1eb5 Remove JS SDK, examples, and tools (#3293) 2017-03-27 15:54:39 -07:00
Erik Arvidsson
046d842181 Update to Jest 19 (#3226) 2017-02-24 12:46:17 -08:00
Ben Kalman
88c24324e4 Upgrade all extra JS and samples to Flow 0.39 (#3211) 2017-02-21 17:14:22 -08:00
Ben Kalman
9617c5c12a Make AsyncIterator a type, upgrade flow to 0.39 (#3209) 2017-02-21 14:03:26 -08:00
Erik Arvidsson
651c140472 Add missing content type header to writeValue (#3169)
When we do a writeValue we do a POST with a request body of some binary
data. Some clients (RN) do not set the content-type header which then
leads to failure on our server.
2017-02-10 11:29:47 -08:00
Erik Arvidsson
27c539ebd4 Update to use eslint-config-noms@1.2.0 (#3151) 2017-02-07 09:57:27 -08:00
Erik Arvidsson
f40c941dc9 Update eslint-config-noms to enforce comma-spacing (#3149) 2017-02-06 17:08:58 -08:00
Erik Arvidsson
8378d4952e Jest (#3145)
This changes to use Jest. Benefits of jest is parallel tests and jest can run the minimal set of tests that are affected by a change (by looking at dependencies).

The main work was to disentangle our cyclic dependencies. To do this I had to remove some runtime assertions in encode value as well as expose the values of a struct without going through a struct mirror.
2017-02-06 15:13:53 -08:00
Ben Kalman
1379fe7cb7 Pass fetch options through to updateRoot (#3140) 2017-01-31 17:24:33 -08:00
Erik Arvidsson
8b7c9742a4 Remove our custom copy-flow-files (#3139)
It was using a file watcher which was causing us to run out of inodes
on our Jenkins build. Instead, use flow-copy-source which does the
same copying without a file wathcer (we no longer used the --watch flag
anyway).
2017-01-31 14:46:32 -08:00
Erik Arvidsson
f66a0e8a89 Update to Flow 0.38 (#3136) 2017-01-31 13:39:31 -08:00
Ben Kalman
aa583fa510 Guard JS http-batch-store accessing deleted chunk (#3134)
Workaround for https://github.com/attic-labs/noms/issues/3133.
2017-01-31 11:36:27 -08:00
Ben Kalman
8d0cd2c109 Noms JS version 69.3.0 (#3125) 2017-01-27 16:54:23 -08:00
Ben Kalman
3528196f53 Pass the fetchOptions to writeBatch in HttpBatchStore (#3124)
This allows JS to make authenticated writes to Noms.
2017-01-27 16:32:39 -08:00
Rafael Weinstein
a34a444f42 Fix cache/value store caching (#3111)
* Fixes a long standing bug in which the RemoteBatchStore is accidentally caching all chunks
* ValueStore's value cache now stores `Promise<?Value>` so that concurrent `readValues` of the same value can share a single decoding
* Removes the debug-only chunk hash check which keeps tripping up perf investigations
2017-01-25 14:41:15 -08:00
Rafael Weinstein
edf8b55f26 dont use read ahead for map.first/last (#3110) 2017-01-24 13:12:09 -08:00
Aaron Boodman
7e5af655e7 bump version because of format version change (#3107) 2017-01-23 15:50:32 -08:00
Mike Gray
c7ae4b31fe Fix warning of unmet peer dependency (#3105) 2017-01-23 17:39:46 -05:00
cmasone-attic
6e72c137a2 Make database root a Map<String, Ref<Value>> (#3093)
Since the head of each dataset can have an arbitrarily complex
type, type accretion leads the Datasets map at the root of the
DB to become very large. This type info isn't really very useful
at that level either. So, get rid of it by making this map be
from String -> Ref<Value>.

Fixes #2869
2017-01-22 11:17:17 -08:00
Erik Arvidsson
d4132e9e6c Use cp instead of ln (#3100) 2017-01-20 18:41:56 -08:00
Erik Arvidsson
e90bfcbd2a Switch to Yarn (#3092)
brew install yarn
2017-01-20 11:42:32 -08:00
Erik Arvidsson
6fd186d060 Update to a newer documentationjs (#3088) 2017-01-19 11:38:16 -08:00
Aaron Boodman
801dde854a Remove all the old js samples. They are no longer needed. (#3086) 2017-01-18 21:24:34 -08:00
Aaron Boodman
a5a11f5345 Bump Noms JS SDK version to 68.3.0 for perf improvements (#3085) 2017-01-18 17:40:05 -08:00
Rafael Weinstein
86e812a5db (JS) Don't preload iterators (#3078)
dont preload iterators
2017-01-17 13:49:22 -08:00
Erik Arvidsson
2dfb4040b7 Update to Flow 0.36 (#3079) 2017-01-17 11:56:20 -08:00
Rafael Weinstein
759c36c96f Walk avoids blobs (#3074) 2017-01-13 16:32:40 -08:00
Rafael Weinstein
760e7f9945 (JS) Implement parallel walk io (#3070)
(JS) Implement parallel walk io
2017-01-12 15:57:02 -08:00
Erik Arvidsson
554d4da885 Upgrade to use latest webpack-config (#3066) 2017-01-11 18:47:22 -08:00
Erik Arvidsson
15f188ac2c webpack-config: Pick up noms version next (#3065)
Make sure we replace process.env.NOMS_VERSION_NEXT for webpack builds
2017-01-11 17:58:23 -08:00
Erik Arvidsson
2f6f760658 Work around environment variable issue. (#3061)
We are using babel-plugin-transform-inline-environment-variables which
replaces `process.env.FOO` with the value of the `FOO` environment
variable at compile time.

However, due to our pipeline we end with something like:

```js
var NAME = 'NOMS_VERSION_NEXT';
process.env[NAME]
```

which does not get replaced in development mode. If it was a const the
transformer could replace it but var bindings can change.
2017-01-11 15:08:04 -08:00
Aaron Boodman
c885ace18f Bump js package again. (#3056)
I had already used 66 in a previous commit that was reverted.
2017-01-10 18:09:50 -08:00
Aaron Boodman
377e730bd2 Bump js package version because of noms format change. (#3055) 2017-01-10 15:53:22 -08:00
Rafael Weinstein
01303a828d go read ahead (#3046) 2017-01-10 15:28:26 -08:00
Aaron Boodman
c5805766f5 Enable v8 by default (#3045) 2017-01-10 14:43:55 -08:00
Aaron Boodman
a09ef6fb44 Revert "Introduce noms version 8. Use it to guard type simplification." (#3043) 2017-01-09 16:30:25 -08:00
Aaron Boodman
a4ffa5ba9b Introduce noms version 8. Use it to guard type simplification. (#3035)
Introduce noms version 8. Use it to guard type simplification.
2017-01-06 17:32:32 -08:00
Ben Kalman
528355c9be Write sequence read-ahead cache to correct index (#3025) 2017-01-06 09:52:47 +11:00
Erik Arvidsson
1e0a698781 Type accretion for struct fields should use equal (#3029)
We used to use isSubtype but we should just create a more specific type
when we can.

Fixes #2993
2017-01-05 13:57:42 -08:00
Aaron Boodman
5617c15489 Add support for IsSubtype(T, A|B|...) (#3024) 2017-01-04 21:55:36 -08:00
cmasone-attic
cf452aab07 JS: ValueStore writes chunks only when referenced (#3021)
The old strategy for writing values was to recursively encode them,
putting the resulting chunks into a BatchStore from the bottom up as
they were generated.

The new strategy tries to keep chunks from the same 'level' of a
graph together by caching chunks as they're encoded and only writing
them once they're referenced by some other value. When a collection
is written, the graph representing it is encoded recursively, and
chunks are generated bottom-up. The new strategy should, in practice,
mean that the children of a given parent node in this graph will be
cached until that parent gets written, and then they'll get written
all at once.
2017-01-04 15:05:46 -08:00
Rafael Weinstein
e025471eab Remember hints for written chunks (#3017)
Prior to this patch, ValueStore only kept a record of where referenced Refs originally reside in from chunks read from the server. This ignored the case of a client doing subsequent commits with the same ValueStore (for example, writing multiple states of a map). This was resulting in the server being forced to load a ton of chunks to validate.
2017-01-04 13:58:44 -08:00
Ben Kalman
129b07818a Noms JS version 65.5.0 (#3011) 2017-01-04 14:18:40 +11:00
Ben Kalman
be2e714545 Implement @at in JS paths (#3010) 2017-01-04 11:58:08 +11:00
Ben Kalman
9b149516ef Implement JS Map and Set at() (#3009) 2017-01-04 11:31:09 +11:00
Ben Kalman
f83e5b5b9c Refactor JS path code and implement @type (#3003)
This brings it much closer to the Go implementation, and eventually
implementing the @at annotation.
2017-01-04 09:32:07 +11:00
Rafael Weinstein
e0d8445ccd Js sequence refactor (#2998)
Removes IndexedSequence and OrderedSequence. What remain are MetaSequence and each of the leaf sequences which directly inherit from Sequence.
2017-01-03 14:03:17 -08:00
Erik Arvidsson
ed1e386e24 JS: Make equals and compare exit early if === (#2951) 2016-12-22 13:38:57 -08:00
Rafael Weinstein
206eb6a38d Remove import of isPrimitiveKind 2016-12-20 17:04:56 -08:00
Rafael Weinstein
cb3390924f Remove unnecessary invariants (#2966)
Remove unnecessary invariants
2016-12-20 15:52:26 -08:00