• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

share / sharedb / 751 / 1
95%
master: 97%

Build:
Build:
LAST BUILD BRANCH: typescript
DEFAULT BRANCH: master
Ran 29 Jun 2018 04:56PM UTC
Files 20
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jun 2018 04:55PM UTC coverage: 96.55% (+0.06%) from 96.492%
751.1

Pull #220

travis-ci

web-flow
Add support for fetching a particular version of a snapshot

This change follows on from discussion in [this issue][1]. Its primary
aim is to allow clients to fetch an historical version of a document
(a snapshot), by providing either:

  - a version `number`, or
  - a desired `Date`

The entry-point for this feature is added to the `Connection` class,
deliberately separate from the `Doc`, because `Doc` is concerned with
"live" document actions such as subscribing and submitting ops,
whereas fetching an historical version of a document should not be
associated with these ideas.

The feature is called with:

```javascript
connection.getSnapshot(collection, id, version, callback): void;
```

The details of the interface are detailed in the README, and in the
code documentation.

This change includes support for projections, and use of the
`readSnapshots` middleware. It also hooks into `Connection`'s
`hasPending` method.

Performance optimisations are deemed out-of-scope for this change (see
the [issue][1] for more details).

Note that this change also adds a development dependency on [`lolex`][2]
which is used for mocking the time.

[1]: https://github.com/share/sharedb/issues/218
[2]: https://github.com/sinonjs/lolex
Pull Request #220: Add support for fetching a particular version of a snapshot

1056 of 1252 branches covered (84.35%)

2211 of 2290 relevant lines covered (96.55%)

131.87 hits per line

Source Files on job 751.1
  • Tree
  • List 0
  • Changed 14
  • Source Changed 5
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 745
  • Travis Job 751.1
  • cb6da2d5 on github
  • Prev Job for on get-snapshot (#741.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc