Commit Graph

1901 Commits

Author SHA1 Message Date
Aaron Boodman
0decfbdee6 Introduce clients/fs: beginning of a filesystem importer 2016-04-13 15:23:34 -07:00
Ben Kalman
66e60150f1 Lower random map diff test size even more, to 50 (#1225) 2016-04-12 17:00:31 -07:00
Ben Kalman
927459c3fd Fix Splore form (#1223) 2016-04-12 16:37:53 -07:00
Erik Arvidsson
726235fdd1 Splore: Fix bug with unions (#1224) 2016-04-12 16:35:55 -07:00
Ben Kalman
7c253e272e Lower random map diff test size (#1221) 2016-04-12 15:59:28 -07:00
Ben Kalman
3cdf75d6d0 Implement Set/Map diff (#1139) 2016-04-12 14:58:39 -07:00
Erik Arvidsson
3cb7f804fd Auto deply JS SDK 2016-04-11 18:14:40 -07:00
Erik Arvidsson
3b76423cd0 Auto deploy JS (#1215)
Trying to use the version in package.json again

Issue #1200
2016-04-11 18:05:00 -07:00
Ben Kalman
b0b4fc6d00 Implement noms-view and splore-view (a splore compatible with noms-view) (#1194)
* Implement noms-view and make splore compatible

* Comments

* npm test

* Fewer changes to readme/build/etc

* comment in noms_view.go

* More updates

* Typo
2016-04-11 17:57:44 -07:00
Rafael Weinstein
eb0c9b6c39 Merge pull request #1213 from rafael-atticlabs/removeSetTargetValue
Remove Ref.SetTargetValue
2016-04-11 17:39:41 -07:00
Erik Arvidsson
fd10c789d6 Auto deploy JS SDK (#1214)
Use rev-list instead?

Issue #1200
2016-04-11 17:36:31 -07:00
Rafael Weinstein
4006746b21 Remove Ref.SetTargetValue 2016-04-11 17:25:56 -07:00
Rafael Weinstein
8315071088 Merge pull request #1199 from rafael-atticlabs/writeValueReturnsRefBase
(Go) WriteValue returns RefBase, (JS) writeValue returns RefValue
2016-04-11 17:16:06 -07:00
Rafael Weinstein
1676707906 WriteValue returns RefBase 2016-04-11 17:09:25 -07:00
Erik Arvidsson
9748e720ae Aut deploy JS SDK (#1211)
npm publish if the version has changed

Issue #1200
2016-04-11 17:06:59 -07:00
Erik Arvidsson
3758d0e6d9 Auto deploy JS SDK (#1210)
When the version in js/package.json is updated, publish a new version.

This does not yet do the actual publish. If this works it will be
updated in a later commit.

Issue #1200
2016-04-11 16:58:59 -07:00
Erik Arvidsson
a6cd5b9838 Revert "Auto deploy Noms JS SDK (#1208)"
This reverts commit af72024d35.

The computed version number is not good because `git log` does not
contain the full history so the number of rows is wrong.
2016-04-11 16:37:48 -07:00
Erik Arvidsson
af72024d35 Auto deploy Noms JS SDK (#1208)
This computes a new version based on the number of changes to the
js directory.

This does not yet actually publish the new version. I need to see how
Travis behaves before I can do that.

Towards #1200
2016-04-11 16:28:32 -07:00
Erik Arvidsson
1b7cf1d2bb Fix package.json version 2016-04-11 15:21:14 -07:00
Erik Arvidsson
65206c8336 defToNoms (#1204)
This is a convenience function for creating deeply nested Noms structures.
2016-04-11 15:19:37 -07:00
Erik Arvidsson
bfc7a5d88e JS: Remove makePrimitiveType (#1206)
type.js no longer exports makePrimitiveType. It is recommended to use
the type constants directly. There are a few cases where we had a
NomsKind and needed a Type. For those cases there is now a
getPrimitiveType but it is not exported by noms.

Fixes #1168
2016-04-11 15:00:39 -07:00
Erik Arvidsson
72fe7d2860 JS: Reduce map size in test (#1207)
BuildMap keeps timing out. This changes the size from 5k to 1k.

Fixes #1142
2016-04-11 14:27:25 -07:00
Erik Arvidsson
33cbf99ec4 Add more detailed error information when writing the wrong type (#1202) 2016-04-11 12:10:52 -07:00
Erik Arvidsson
5c705d42c2 JS Codegen: Do not export typeForT (#1197)
Issue #1081
2016-04-11 10:34:23 -07:00
Rafael Weinstein
7f06df15e3 Revert "typeOfBlob -> blobType, +refOfBlobType"
This reverts commit c5667dcbc3.
2016-04-10 11:40:25 -07:00
Rafael Weinstein
a74ddd4032 Merge pull request #1198 from rafael-atticlabs/blobType
typeForBlob -> blobType, +refOfBlobType
2016-04-10 11:09:39 -07:00
Rafael Weinstein
c5667dcbc3 typeOfBlob -> blobType, +refOfBlobType 2016-04-10 11:08:34 -07:00
Erik Arvidsson
9e4266871e JS CodeGen: Add newSetOfT etc (#1195)
* JS CodeGen: Add newSetOfT etc

This generates convenience functions for new list/set/map.

Issue #1081
2016-04-08 15:01:08 -07:00
Erik Arvidsson
c2d1edc436 Fix compare/equal/less on booleans (#1191)
The codegen tests were hitting this not implemented path.
2016-04-08 14:07:53 -07:00
Erik Arvidsson
e59dfacf1b JS codegen: Add test for recursive type (#1190)
To make this work we also have to export the noms `Type` for types
defined in the package.

Issue #1081
2016-04-08 09:51:49 -07:00
Erik Arvidsson
b79d89963f JS codegen: Add tests and make more things work (#1182)
Now the generated code is tested and most things work.



To generate a .noms.js file use the codegen go binary



Things that are not complete/needs improvements include:

- Recursive structs

- Structs with annonymous unions

- Enum -- constants for the values



Issue #1081
2016-04-07 14:11:40 -07:00
Erik Arvidsson
b85ce637b5 Noms SDK: Export primitive types (#1189) 2016-04-07 11:41:41 -07:00
Erik Arvidsson
0dcb9c35c7 Noms SDK: Export blobType and inc version (#1187) 2016-04-07 11:02:18 -07:00
Erik Arvidsson
b6eeef0250 Export BlobWriter and inc version 2016-04-06 20:03:23 -07:00
Erik Arvidsson
be436da066 Noms SDK export newBlob 2016-04-06 16:54:17 -07:00
Erik Arvidsson
d81902c245 Run go generate to make the tests pass 2016-04-06 14:05:31 -07:00
Erik Arvidsson
26e747a20e Noms SDK: Export createStructClass and increment version 2016-04-06 13:58:42 -07:00
Erik Arvidsson
5f39931ef3 Disable eslint for codegen
And fix double quotes.
2016-04-06 13:56:36 -07:00
Erik Arvidsson
ea51e1ccfc Handle imports in js codegen
Issue #1081
2016-04-06 11:46:13 -07:00
Erik Arvidsson
1014573c7e Codegen for enum types
This generates a flow type for enums:

```noms
enum Handedness {
  right
  left
  switch
}
```

Generates

```js
type E =
  0 |  // right
  1 |  // left
  2;  // switch
```

Issue #1081
2016-04-05 15:12:04 -07:00
Erik Arvidsson
d1a6fbe0c7 Codegen for flow struct types.
This generates the a flow interface for structs defined in noms files

Issue #1157
Issue #1081
2016-04-05 14:19:08 -07:00
Erik Arvidsson
8385227847 Add type validation
* Add type validation

This is not yet hooked up to the different APIs

Towards #1078
2016-04-05 13:56:00 -07:00
cmasone-attic
10cd596685 Merge pull request #1174 from cmasone-attic/remove_reachable
Refactor DataStore Copy methods into functions
2016-04-05 06:59:27 -07:00
Chris Masone
1d857a4686 Refactor DataStore Copy methods into functions
This patch removes the special RemoteDataStore implementation of
CopyReachableChunksP, as this is seldom-used and adds complexity
that stands in the way of Issue 654
2016-04-04 15:23:43 -07:00
Ben Kalman
f27f9b36bb Remove async-test.js
Its 'instanceof Promise' check was broken because of a babel Promise

polyfill; but mocha supports async style tests natively now anyway.
2016-04-01 18:01:34 -07:00
Erik Arvidsson
65c923a4f8 Merge pull request #1161 from arv/js-dynamic-struct
JS: Dynamically create a class per struct
2016-04-01 09:44:54 -07:00
Erik Arvidsson
2031372212 JS: Dynamically create a class per struct
The decoder now generates a class for a struct. Given:

```noms
struct MyStruct {
  x: Int8
  s: optional String
}
```

the generated class looks something like this:

```js
class MyStruct extends Struct {
  get x(): int8 { ... }
  setX(value: int8): MyStruct { ... }
  get s(): ?string { ... }
  setS(value: ?string): MyStruct { ... }
}
```

The base class `Struct` has nothing on it (except chunks). It
usefull in cases where a generic struct is wanted.

To reflect on Structs we introduce StructMirror.

This also means that Commit is now a real ~~boy~~type.

This does not yet handle Defs.

Towards #1157
2016-04-01 09:37:58 -07:00
Ben Kalman
c8660c3d0c Merge pull request #1163 from kalman/splore-blobs
Update Splore to recognise NomsBlob
2016-03-31 15:33:28 -07:00
Benjamin Kalman
e42f018d29 Update Splore to recognise NomsBlob 2016-03-31 15:31:38 -07:00
Erik Arvidsson
c336ccb60c Merge pull request #1158 from arv/inc-noms-version
Prepare Noms JS SDK v6.1.0
2016-03-30 13:34:37 -07:00