Commit Graph

466 Commits

Author SHA1 Message Date
Erik Arvidsson 601db6bd89 Change type of callback for List/Set/Map forEach (#2562)
No need to restrict what type of promise the callback returns
2016-09-14 11:56:40 -07:00
Erik Arvidsson 8fbcb58ca7 Add jsdoc/godoc for List (#2554)
Towards #2297
2016-09-14 11:16:42 -07:00
Erik Arvidsson 68b3de35bf More jsdoc for value (#2555)
Towards #2297
2016-09-14 10:59:22 -07:00
Erik Arvidsson 679305dad3 Add jsdoc/godoc for Hash and Value (#2553)
Towards #2297
2016-09-13 17:55:19 -07:00
Erik Arvidsson 435b675c3f Update to a newer version of documentation.js (#2552)
To pick up a bug fix related to sorting
2016-09-12 16:51:56 -07:00
Erik Arvidsson 0b2eb226bc Generate js docs in /js/ (#2543)
Also keep the hash when redirecting

Towards #2532
2016-09-12 13:11:57 -07:00
Erik Arvidsson d3198b9ba3 Update to latest documentation.js (#2540)
This picks up my commits to discover all exported bindings as well as
sorting the docs alphabetically.

Towards #1471
2016-09-09 14:01:27 -07:00
Erik Arvidsson c1ed55e009 Fix JSDoc (#2539) 2016-09-09 11:32:24 -07:00
Erik Arvidsson e070500f20 Fix lint error (#2537)
The line length exceeded 100 cols
2016-09-09 09:05:42 -07:00
Erik Arvidsson 59b17762fe Update JSDoc 2016-09-08 18:45:38 -07:00
Erik Arvidsson 70004e1699 Let splore use versioned URLs too (#2530) 2016-09-07 18:05:14 -07:00
Erik Arvidsson dbe0556c63 Rename files to their hashes when staging (#2515)
This add two keyword arguments to the GlobCopier:
- rename - if True, will rename the files to include their hash
- index_file - if present, then the paths in this file here will be
  updated to the renamed paths.
2016-09-07 13:34:14 -07:00
Erik Arvidsson 061f7694ad JS: Fix subtype issue with unions as elem types (#2518)
For compound types (List, Set, Map, Ref) the concrete type may be a
union. If that is the case all the types in the union must be a
subtype of the concrete type's element type.

`C<T | V>` is a subtype of `C<S>` iff T is a subtype of S and V is a
subtype of S.
2016-09-06 13:38:51 -07:00
Erik Arvidsson fd4c52acef stage.py: import os too (#2514) 2016-09-02 14:00:15 -07:00
Erik Arvidsson 893d0fa360 stage.py needs to import sys before using it (#2513)
Also changes the tabs to spaces. Thanks pylint.
2016-09-02 13:38:43 -07:00
Erik Arvidsson f465b0bd3c Fix import of noms.staging in stage.py (#2510)
Also fix unit test that was not updated when the functions were
renamed.
2016-09-02 13:09:07 -07:00
Erik Arvidsson b9f15526ba JS Docs: Redirect to versioned sub directory (#2503) 2016-09-01 16:10:38 -07:00
Ben Kalman 6393e7c6e7 Fix "and and" comment from last patch (#2500) 2016-09-01 13:39:08 -07:00
Ben Kalman b734a80cb1 Improvements to the perf viewer (#2499)
* Increase number of results to 20.
* See newer results at the end of the graph, not start.
* Make point radius show standard deviation to scale.
* Try not to draw datasets over each other.
* Invert light colours to make them darker.
2016-09-01 13:36:53 -07:00
Ben Kalman d1c90d11cd Add prepublish step to perf/viewer so that out.js gets built (#2496) 2016-09-01 10:33:03 -07:00
Erik Arvidsson b857b95bb4 Drive js docs from npm script (#2486)
Turns out that documentationjs reads the babelrc file from js/noms
which leads to us having to do npm install in js/noms. Therefore
putting the dev deps in there and running the script from there
makes things cleaner.

It also allows doing:

  npm run build-docs

Towards #1471
2016-08-31 16:57:31 -07:00
Ben Kalman 815ca1586f Add perf build.py and util (#2487) 2016-08-31 16:50:34 -07:00
Ben Kalman 1e8ae3f214 Make perf viewer point radius show standard deviation (#2485) 2016-08-31 16:42:59 -07:00
Ben Kalman 70c43f4e28 Add stage.py for perf viewer (#2478) 2016-08-31 14:29:17 -07:00
Ben Kalman b5098227b8 Add a perf viewer (#2434)
This is a web page which renders a graph of the data generated by perf
suite tests.
2016-08-30 16:11:21 -07:00
Erik Arvidsson 103078b366 Move samples/js/perf to js/perf (#2426) 2016-08-23 17:51:27 -07:00
Erik Arvidsson 5f9c3af12d Move jsmodules/* to js/ (#2424) 2016-08-23 17:01:54 -07:00
Erik Arvidsson d06c3ec8fe Move /js/ into /js/noms/ (#2423) 2016-08-23 16:04:00 -07:00
Erik Arvidsson d0d1d31efb JS: Fix OrderedPutCache for browser (#2398)
Fixes #2395
2016-08-22 14:45:23 -07:00
Erik Arvidsson 0d2c4fd56d Revert "Move noms/samples/js/perf to noms/js/perf" (#2400) 2016-08-22 13:57:41 -07:00
LIMSUNG GUK 0c99f194d2 Add config files for js/perf/ 2016-08-20 20:56:47 +09:00
LIMSUNG GUK 89fb45553b Move sample/js/*-perf-rig to js/perf/ 2016-08-18 18:33:19 +09:00
Erik Arvidsson f5433ec1b7 JS: Do not shadow struct properties (#2378)
When we create JS struct classes we no longer creates properties for
`chunks`, `hash` or `type` (nor for `toString`, `hashOwnProperty` etc)

If you are using structs with field names that clashes with these then
use a `StructMirror`.

Fixes #2332
2016-08-16 15:12:34 -07:00
Ben Kalman 1e511a61c6 Let Splore open a noms path (#2356)
Currently Splore can only open a database (db=) or a hash (hash=). This
removes the hash and replaces it with the much more general path (p=).

For example, what used to be:
  ?db=http://demo.noms.io&hash=abcd
is now:
  ?db=http://demo.noms.io&p=#abcd

and of course more complex paths work, like:
  ?db=http://demo.noms.io&p=#abcd.field[42].name

I've exposed getHashOfValue in noms.js.
2016-08-12 16:47:26 -07:00
Ben Kalman 0d6bd01810 Port PathSpec implementation to JS (#2335)
This is a breaking change to the JS API. HashSpec and parseObjectSpec
have been removed in favour of PathSpec, and parse errors now throw
SyntaxError instead of silently failing (this matches JSON.parse).
2016-08-11 15:29:27 -07:00
Erik Arvidsson 226a0471f3 JS: Fix browser version of encodeUtf8 (#2339)
When we switched to big endian we forgot to update this.

Fixes #2338
2016-08-11 12:01:01 -07:00
Erik Arvidsson 6178251012 Update to Flow 0.30.0 (#2337)
This requires all parameterized types to have type params. Fortunately
one can use `T<any>` which has the same behavior as the old `T` syntax.

We should tighten the types further after this but this unblocks us.

Fixes #2301
2016-08-11 11:27:41 -07:00
Ben Kalman 630d3a29cc Port AbsolutePath implementation to JS (#2325) 2016-08-10 13:44:08 -07:00
Ben Kalman f7bf38bbd1 Port path implementation to JS (#2317)
JS had an incomplete implementation, most notably missing: string
parsing, hash # syntax, and support for hash indices.
2016-08-09 17:12:08 -07:00
Erik Arvidsson da1c278264 JS: Safari 9 support (#2295)
- Lower case header names in fetch function
- fetchUint8Array should return an Uint8Array and not an ArrayBuffer
- Safari does not have slice on typed arrays

Fixes #2265
2016-08-09 13:36:19 -07:00
Ben Kalman e50f773ec6 Use a non-nil ValueReader in sequenceChunker.Done (#2273)
Fixes https://github.com/attic-labs/noms/issues/2220.
2016-08-05 14:22:39 -07:00
Erik Arvidsson 27c687adf3 JS: Partial fix for Safari (#2288)
getAllResponseHeaders may contain empty rows
2016-08-05 14:15:37 -07:00
Erik Arvidsson 35955c06d9 JS: Fix encoding bugs related to signed varints (#2267)
The library that we were using multiplied (and divided) by 2 to
do the zigzag encoding. However, if we are already close to the
precision limit then we lose precision and the encoding/decoding
does not round trip.

Instead, we split the float64 into two Uint32 numbers and do the
operations on those.

Also, the code that split a float64 into base and exp was not shifting
enough, it was shifting until float64(maxInt64) when we need to shift
until less than max safe int (according to float64)

Fixes #2104
Fixes #2234
2016-08-05 11:45:29 -07:00
Benjamin Kalman 31790e8f37 Bump JS to v56.2.0 to pick up img change 2016-08-04 14:47:39 -07:00
Ben Kalman 0ed95244a5 Fix image in JS (#2277) 2016-08-04 14:45:46 -07:00
Adam Leventhal 117eafebbc add Blob.Splice() (#2242) 2016-08-02 16:58:41 -07:00
Erik Arvidsson 7c068f311a Update README.md (#2248) 2016-08-02 14:02:30 -07:00
Erik Arvidsson 0d402acc9b Add README.md to js/ (#2211)
This is what gets shown on npmjs.org and other tools indexing npm
modules.
2016-07-30 13:11:42 -07:00
Adam Leventhal e920c12c1c Fix cyclic type nondeterminism (#2147) (#2148) 2016-07-29 21:35:17 -07:00
Rafael Weinstein 3d86ddb33a Fix IndexedSequenceDiff bug when entire subtree is added / removed (#2197)
IndexedSequenceDiff special cases the situation when an entire subtree was added or removed, but got its math wrong.
2016-07-29 13:22:39 -07:00