UNPKG

3.37 kBMarkdownView Raw
1# CHANGELOG
2
3## 0.5.9
4
5GUN 0.3 -> 0.4 -> 0.5 Migration Guide:
6`gun.back` -> `gun.back()`;
7`gun.get(key, cb)` -> cb(err, data) -> cb(at) at.err, at.put;
8`gun.map(cb)` -> `gun.map().on(cb)`;
9`gun.init` -> deprecated;
10`gun.put(data, cb)` -> cb(err, ok) -> cb(ack) ack.err, ack.ok;
11`gun.get(key)` global/absolute -> `gun.back(-1).get(key)`;
12`gun.key(key)` -> temporarily broken;
13
14## 0.3.7
15
16 - Catch localStorage errors.
17
18## 0.3.6
19
20 - Fixed S3 typo.
21
22## 0.3.5
23
24 - Fixed server push.
25
26## 0.3.4
27
28 - Breaking Change! `list.set(item)` returns the item's chain now, not the list chain.
29 - Client and Server GUN servers are now more up to spec, trimmed excess HTTP/REST header data.
30 - Gun.is.lex added.
31
32## 0.3.3
33
34- You can now link nodes natively, `gun.get('mark').path('owner').put(gun.get('cat'))`!
35- Sets (or tables, collections, lists) are now easily done with `gun.get('users').set(gun.get('person/mark'))`.
36
37## 0.3.2
38
39Bug fixes.
40
41## 0.3.1
42
43Bug fixes.
44
45## 0.3
46
47Migration Guide! Migrate by changing `.attach(` to `.wsp(` on your server if you have one with gun. Remove `.set()` (delete it), and change `.set($DATA)` (where you call set with something) to `.path('I' + Date.now() + 'R' + Gun.text.random(5)).put($DATA)`. If you have NodeJS style callbacks in your `.get` (which documentation previously recommended that you shouldn't) they previous took `err, graph` and now they take `err, node` (which means now using callback style is fine to use). Inside of `.not()` no longer use `return` or `this`, instead (probably) use `gun` and no `return`. If you are a module developer, use `opt.wire` now instead of `opt.hooks` and message Mark since he needs to talk to you since the wire protocol has changed.
48
49- Server side default `.wsp()` renamed from `.attach()`.
50- `.set()` deprecated because it did a bunch of random inconsistent things. Its useful behavior has now become implicit (see below) or can be done explicitly.
51- `.not()` it was previously common to `return` the chain inside of .not, beware that if you have code like `gun.get(key).not(function(){ return this.put({}).key(key) }).val()` cause `.val()` to be triggered twice (this is intentional, because it funnels two separate chains together) which previously didn't happen. To fix this, just don't return the chain.
52- `.put()` and `.path()` do implicit `.init()` by default, turn on explicit behavior with `Gun({init: true})`.
53- `.get(soul, cb)` cb is called back with `err, node` rather than `err, graph`.
54- Options `opt.wire` renamed from `opt.hooks`.
55- `.val()` when called empty automatically cleanly logs for convenience purposes.
56- `.init()` added.
57- `Gun.is.val` renamed from `Gun.is.value`.
58- `Gun.is.rel` renamed from `Gun.is.soul`.
59- `Gun.is.node.soul` renamed from `Gun.is.soul.on`.
60- `Gun.union.ify` renamed from `Gun.union.pseudo`.
61- `Gun.union.HAM` renamed from `Gun.HAM`.
62- `Gun.HAM` is now the actual HAM function for conflict resolution.
63- `Gun._.state` renamed from `Gun._.HAM`.
64- Maximum Callstack Exceeded is less problematic now, unless you intentionally choke the thread. #95
65- Putting a regex or Date or NaN is actually detected and causes an error now while before it was silent. #122 #123
66- `.on()` gets called when a key is later newly made while before it did not. #116
67- `.val()` should not ever get called with a relation alone (internals should resolve it), this is fixed. #132