Skip to content

Commit

Permalink
Merge branch 'master' into mocha-playwright-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn authored Nov 22, 2023
2 parents f83f2a2 + 741fcc1 commit e23b4e1
Show file tree
Hide file tree
Showing 27 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion bin/build-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function buildCSS() {
}

function buildJekyll(path) {
// Dont rebuild on website artifacts being written
// Don't rebuild on website artifacts being written
if (path && /^_site/.test(path.relative)) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2014-04-01-pouchdb-2.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ This release contains a database migration, which means that once you upgrade yo
* Improve error reporting from replicator ([#1714](http://github.com/daleharvey/pouchdb/issues/1714))
* Switch to readAsArrayBuffer for IE binary support ([#1667](http://github.com/daleharvey/pouchdb/issues/1667))
* Add `npm run shell` for quick shell experimenting ([#1610](http://github.com/daleharvey/pouchdb/issues/1610))
* Ensure we dont lose data when browsers upgrade from WebSQL to IDB ([#1289](http://github.com/daleharvey/pouchdb/issues/1289))
* Ensure we don't lose data when browsers upgrade from WebSQL to IDB ([#1289](http://github.com/daleharvey/pouchdb/issues/1289))

###### [Complete list of changes](https://github.com/daleharvey/pouchdb/compare/2.0.1...2.1.0)
4 changes: 2 additions & 2 deletions docs/_posts/2014-11-27-testing-pouchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If I had one complaint about Mocha, it would be I often find myself seeing `does

Our tests run on every check-in and PR on [Travis CI](travis-ci.org). Travis an amazing platform; it was easy to get up and running and has been incredibly stable. PouchDB would be nowhere near the state it is today without it.

However, we are beginning to outgrow Travis's free open-source capacity, and the paid options are prohibitively expensive. So we are beginning to look around for self-hosted alternatives, albiet without a lot of options.
However, we are beginning to outgrow Travis's free open-source capacity, and the paid options are prohibitively expensive. So we are beginning to look around for self-hosted alternatives, albeit without a lot of options.

[Travis is open-source](https://github.com/travis-ci/travis-ci), however it is not a well-setup project for self-hosting – there isn't so much as a README to get started with. We previously used [Jenkins](http://jenkins-ci.org/), however I found it a huge maintenance burden. It's very possible someone with more experience in Jenkins could do a better job, though, and I am also keeping an eye on [Strider](http://stridercd.com/) as a possible alternative.

Expand All @@ -47,7 +47,7 @@ We are also finding some platforms (particularly iPhone and Internet Explorer) w

Before settling on Selenium, I had previously tried out [Testling](https://ci.testling.com/), and similiarly to Tape it was very easy to get started but opinionated. It was also broken on OSX with pull requests containing fixes that hadn't been touched for months. Selenium had the advantage that it was very widely used, and new frameworks or platforms are likely to have WebDriver support early on.

I have however found Selenium as a project fustrating to use, from the first time visiting [http://www.seleniumhq.org/](http://www.seleniumhq.org/) to understanding what I needed to download and write a first test that started a browser, it was an unclear and confusing process. Even today getting ChromeDriver started correctly gets me confused, also the download cost of 30MB for what is mostly a proxy server is an annoyance.
I have however found Selenium as a project frustrating to use, from the first time visiting [http://www.seleniumhq.org/](http://www.seleniumhq.org/) to understanding what I needed to download and write a first test that started a browser, it was an unclear and confusing process. Even today getting ChromeDriver started correctly gets me confused, also the download cost of 30MB for what is mostly a proxy server is an annoyance.

I would love to see a project wrap up Selenium / ChromeDriver and possibly Cordova / Appium into a nice, well-documented module that installs and boots your browser(ish) platform of choice, ready to be driven by Selenium tests.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ changes.on('change', function(change) {
db.put({_id: 'doc', foo: 'bar'});
```

This test looks fine however inside `changes.cancel()` we may be doing some processing that happens asynchronously, specifically we may be aborting a HTTP request that we haven't processed the reply of yet and as we process the reply the next test may have started. This type of issue is extremely problematic as it can lead to unexpected behavour in tests that are not the cause of the problem.
This test looks fine however inside `changes.cancel()` we may be doing some processing that happens asynchronously, specifically we may be aborting a HTTP request that we haven't processed the reply of yet and as we process the reply the next test may have started. This type of issue is extremely problematic as it can lead to unexpected behaviour in tests that are not the cause of the problem.

In PouchDB we fix this with:

Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2015-02-03-fix-up-look-sharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Calvin did the base work for this a long time ago, however we now officially sup

### Docs property in change events - [#3358](https://github.com/pouchdb/pouchdb/pull/3358)

A lot of developers wanted to know what documents were being referred to when they recieved a change event. Gregor from hood.ie implemented a new `docs` property in the change event, so you know exactly what documents have changed.
A lot of developers wanted to know what documents were being referred to when they received a change event. Gregor from hood.ie implemented a new `docs` property in the change event, so you know exactly what documents have changed.

### local_seq now deprecated - [#3367](https://github.com/pouchdb/pouchdb/issues/3367)

Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2015-05-07-pouchdb-3.5.0-vote-for-pouchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Do you support better documentation for PouchDB users? Do you value faster CORS
### Bugfixes

* Fallback to the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) where XMLHTTPRequest does not exist (e.g. in Service Workers) ([#3678](https://github.com/pouchdb/pouchdb/pull/3678))
* Stop triggering unneccesary OPTIONS requests during CORS replication ([#3573](https://github.com/pouchdb/pouchdb/issues/3573))
* Stop triggering unnecessary OPTIONS requests during CORS replication ([#3573](https://github.com/pouchdb/pouchdb/issues/3573))
* Multitudes of documentation fixes
* Fix es3ify behavior with dependencies ([#3688](https://github.com/pouchdb/pouchdb/issues/3688))
* Add source maps to dev environment ([#3731](https://github.com/pouchdb/pouchdb/pull/3731))
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ replication.on('paused', doneFun);
* Fix attachment length for stubs ([#3963](https://github.com/pouchdb/pouchdb/issues/3963))
* Reduce the number of checkpoint mismatches ([#4009](https://github.com/pouchdb/pouchdb/issues/4009))
* Fallback from checkpoint mismatch correctly (less replication start from the beginning) ([#3999](https://github.com/pouchdb/pouchdb/issues/3999))
* Dont fail replication when attachment request fails ([#4021](https://github.com/pouchdb/pouchdb/issues/4021))
* Don't fail replication when attachment request fails ([#4021](https://github.com/pouchdb/pouchdb/issues/4021))
* Fix check for `localStorage` in Safari private mode ([#4070](https://github.com/pouchdb/pouchdb/issues/4070))
### Coverage improvements
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2015-11-03-cover-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We have had issues in the past with how to manage npm dependencies. Version rang
### Bugfixes

* Explain http error caused by checking for `_bulk_get` ([#4435](http://github.com/pouchdb/pouchdb/issues/4435))
* Dont create a database just to delete it ([#4467](http://github.com/pouchdb/pouchdb/issues/4467))
* Don't create a database just to delete it ([#4467](http://github.com/pouchdb/pouchdb/issues/4467))
* Add friendly err msg to common leveldown err ([#4447](http://github.com/pouchdb/pouchdb/issues/4447))
* Avoid empty bulkGet() ([#4474](http://github.com/pouchdb/pouchdb/issues/4474))
* Fix http url with port 80 ([#247](https://github.com/pouchdb/express-pouchdb/issues/247))
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Assuming the dump file is hosted on our web site, we can then load it using `db.
if (err.name !== 'not_found') {
throw err;
}
// we got a 404, so the local docuent doesn't exist. so let's preload!
// we got a 404, so the local document doesn't exist. so let's preload!
return db.load('turtles.txt').then(function () {
// create the local document to note that we've preloaded
return db.put({_id: '_local/preloaded'});
Expand Down
6 changes: 3 additions & 3 deletions docs/_posts/2016-06-06-pouchdb-5.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ This API was not removed, but will log a warning if you try to use it.
* ([#3923](https://github.com/pouchdb/pouchdb/issues/3923)) - Add ability to set url as prefix
* ([#4922](https://github.com/pouchdb/pouchdb/issues/4922)) - Do not call 'destroyed' twice for http instances
* ([#3609](https://github.com/pouchdb/pouchdb/issues/3609)) - opts.view implies filter=_view
* ([#4444](https://github.com/pouchdb/pouchdb/issues/4444)) - Dont leak event emitters
* ([#4444](https://github.com/pouchdb/pouchdb/issues/4444)) - Don't leak event emitters
* ([#5197](https://github.com/pouchdb/pouchdb/issues/5197)) - detect WebSQL invalid on WKWebView
* ([#5200](https://github.com/pouchdb/pouchdb/issues/5200)) - Don't clone special objects like Workers
* ([#5196](https://github.com/pouchdb/pouchdb/issues/5196)) - fix excessively long replication loop
Expand Down Expand Up @@ -122,8 +122,8 @@ This API was not removed, but will log a warning if you try to use it.
### Testing

* ([#4575](https://github.com/pouchdb/pouchdb/issues/4575)) - Fix tests against CouchDB master
* ([#5260](https://github.com/pouchdb/pouchdb/issues/5260)) - Catches unhandle rejections in tests
* ([#2426](https://github.com/pouchdb/pouchdb/issues/2426)) - Add test to ensure doc_ids dont prevent replication
* ([#5260](https://github.com/pouchdb/pouchdb/issues/5260)) - Catches unhandled rejections in tests
* ([#2426](https://github.com/pouchdb/pouchdb/issues/2426)) - Add test to ensure doc_ids don't prevent replication
* ([#4767](https://github.com/pouchdb/pouchdb/issues/4767)) - 100% code coverage
* ([#5186](https://github.com/pouchdb/pouchdb/issues/5186)) - build in Node 5, test in other Nodes

Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2018-01-23-pouchdb-6.4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Currently it looks likely that we will remove our [Promise Polyfill](https://git

## Other Changes

- [#7019](https://github.com/pouchdb/pouchdb/issues/7019) - Dont crash on empty HTTP requests
- [#7019](https://github.com/pouchdb/pouchdb/issues/7019) - Don't crash on empty HTTP requests
- [#7008](https://github.com/pouchdb/pouchdb/issues/7008) - Add Glitch bug helper
- [#6954](https://github.com/pouchdb/pouchdb/issues/6954) - Fix hang when storage quota is exceeded
- [#6958](https://github.com/pouchdb/pouchdb/issues/6958) - Fix PouchDB find with zero values
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2018-06-21-pouchdb-7.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ As promised back in January it is time to drop WebSQL from our default builds. T

## Removed WebSQL

[#6943](https://github.com/pouchdb/pouchdb/issues/6943) - The WebSQL adapter is still available to [download and use](https://github.com/pouchdb/pouchdb/releases/tag/7.0.0), it will no longer be available as part of a default PouchDB build and will eventually be moved to the [pouchdb-community repo](https://github.com/pouchdb-community). If you need to migrate your users from WebSQL to IndexeDB then there is some advice available in our [previous release post]({{ site.baseurl }}/2018/01/23/pouchdb-6.4.2.html).
[#6943](https://github.com/pouchdb/pouchdb/issues/6943) - The WebSQL adapter is still available to [download and use](https://github.com/pouchdb/pouchdb/releases/tag/7.0.0), it will no longer be available as part of a default PouchDB build and will eventually be moved to the [pouchdb-community repo](https://github.com/pouchdb-community). If you need to migrate your users from WebSQL to IndexedDB then there is some advice available in our [previous release post]({{ site.baseurl }}/2018/01/23/pouchdb-6.4.2.html).

## Removed Promise Polyfill

Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2022-04-13-pouchdb-7.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ In Github we have enabled:

### Other changes

* [1ba87970](https://github.com/pouchdb/pouchdb/commit/1ba879709fdf6306dc3f8e9d2d67f4060ade6e50) ([#8167](https://github.com/pouchdb/pouchdb/issues/8167)) - Revert Jekyll to 3.9.0 to be able to build doumentation (+ doc updates)
* [1ba87970](https://github.com/pouchdb/pouchdb/commit/1ba879709fdf6306dc3f8e9d2d67f4060ade6e50) ([#8167](https://github.com/pouchdb/pouchdb/issues/8167)) - Revert Jekyll to 3.9.0 to be able to build documentation (+ doc updates)
* [dfdb55e6](https://github.com/pouchdb/pouchdb/commit/dfdb55e604c9fc87c835d1b7a7f698cca5204fe2) ([#8219](https://github.com/pouchdb/pouchdb/issues/8219)) - Update stale bot configuration
* [1a48c541](https://github.com/pouchdb/pouchdb/commit/1a48c5413c14db65f4e485bee60170bd943ad6b3) Upgrade eslint ecmaVersion to 8
* [1d8d7500](https://github.com/pouchdb/pouchdb/commit/1d8d750059d63ba7dc7171bd256098a3f3c18492) Update issue template's adapters
Expand Down
2 changes: 1 addition & 1 deletion docs/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ npm install --save-exact pouchdb-utils
### sublevel-pouchdb

Fork of [level-sublevel](https://github.com/dominictarr/level-sublevel)
with ony the subset of the API that PouchDB uses.
with only the subset of the API that PouchDB uses.

#### Example usage

Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ PouchDB is now installed in your app and ready to use! (In production, you shoul
The rest of the work will be done inside `app.js`. We will start by creating a database to enter your todos. To create a database simply instantiate a new PouchDB object with the name of the database:

{% highlight js %}
// EDITING STARTS HERE (you dont need to edit anything above this line)
// EDITING STARTS HERE (you don't need to edit anything above this line)

var db = new PouchDB('todos');
var remoteCouch = false;
Expand Down Expand Up @@ -100,7 +100,7 @@ Once you have included this code, you should be able to refresh the page to see

{% include anchor.html class="h3" title="Update the UI" hash="update_the_ui" %}

We dont want to refresh the page to see new items. More typically you would update the UI manually when you write data to it, however, in PouchDB you may be syncing data remotely, so you want to make sure you update whenever the remote data changes. To do this we will call `db.changes` which subscribes to updates to the database, wherever they come from. You can enter this code between the `remoteCouch` and `addTodo` declaration:
We don't want to refresh the page to see new items. More typically you would update the UI manually when you write data to it, however, in PouchDB you may be syncing data remotely, so you want to make sure you update whenever the remote data changes. To do this we will call `db.changes` which subscribes to updates to the database, wherever they come from. You can enter this code between the `remoteCouch` and `addTodo` declaration:

{% highlight js %}
var remoteCouch = false;
Expand All @@ -127,7 +127,7 @@ function checkboxChanged(todo, event) {
}
{% endhighlight %}

This is similar to creating a document, however the document must also contain a `_rev` field (in addition to `_id`), otherwise the write will be rejected. This ensures that you dont accidently overwrite changes to a document.
This is similar to creating a document, however the document must also contain a `_rev` field (in addition to `_id`), otherwise the write will be rejected. This ensures that you don't accidently overwrite changes to a document.

You can test that this works by checking a todo item and refreshing the page. It should stay checked.

Expand Down Expand Up @@ -189,7 +189,7 @@ You can check that CORS is now enabled by visiting [http://localhost:5984/_utils
Now we will have the todo list sync. Back in `app.js` we need to specify the address of the remote database. Remember to replace `user`, `pass` and `myname.example.com` with the credentials of your own CouchDB instance:

{% highlight js %}
// EDITING STARTS HERE (you dont need to edit anything above this line)
// EDITING STARTS HERE (you don't need to edit anything above this line)

var db = new PouchDB('todos');
var remoteCouch = 'http://user:[email protected]/todos';
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-adapter-idb/src/allDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import runBatchedCursor from './runBatchedCursor';
import getAll from './getAll';

function allDocsKeys(keys, docStore, onBatch) {
// It's not guaranted to be returned in right order
// It's not guaranteed to be returned in right order
var valuesBatch = new Array(keys.length);
var count = 0;
keys.forEach(function (key, index) {
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-adapter-indexeddb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This is highly unlikely to be fixed in the future by PouchDB, as it would requir

### Mango Queries with `partial_filter_selector`

Mango indexes with a `partial_filter_selector` are using map-reduce views. Simually to the `idb`-adabter. All performance gains of native IndexedDB indexes will be lost.
Mango indexes with a `partial_filter_selector` are using map-reduce views. All performance gains of native IndexedDB indexes will be lost.

Also ordering is CouchDB combatible.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { collectConflicts } from 'pouchdb-merge';
import { DOC_STORE, processAttachment } from './util';

function allDocsKeys(keys, docStore, allDocsInner) {
// It's not guaranted to be returned in right order
// It's not guaranteed to be returned in right order
var valuesBatch = new Array(keys.length);
var count = 0;
keys.forEach(function (key, index) {
Expand Down Expand Up @@ -77,7 +77,7 @@ export default function (txn, metadata, opts, callback) {
return callback(txn.error);
}

// TODO: Weird hack, I dont like it
// TODO: Weird hack, I don't like it
if (opts.limit === 0) {
var returnVal = {
total_rows: metadata.doc_count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var COUCH_COLLATE_HI = '\uffff'; // actually used as {"\uffff": {}}

// Adapted from: https://www.w3.org/TR/IndexedDB/#compare-two-keys
// Importantly, *there is no upper bound possible* in idb. The ideal data
// structure an infintely deep array:
// structure an infinitely deep array:
// var IDB_COLLATE_HI = []; IDB_COLLATE_HI.push(IDB_COLLATE_HI)
// But IDBKeyRange is not a fan of shenanigans, so I've just gone with 12 layers
// because it looks nice and surely that's enough!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function needsSanitise(name, isPath) {
// Very high level rules for valid JS names are:
// - First character cannot start with a number
// - Otherwise all characters must be be a-z, A-Z, 0-9, or $.
// - Underscores (_) are encoded even though legal, to avoid collsions with
// - Underscores (_) are encoded even though legal, to avoid collisions with
// encoded illegal characters
// - We allow . unless the name represents a single field, as that represents
// a deep index path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var requireLeveldown = function () {
'specify another storage backend using the \'db\' option'
].join(' '));
} else if (err.message && err.message.match('Module version mismatch')) {
// handle common user enviornment error
// handle common user environment error
return new Error([
err.message,
'This generally implies that leveldown was built with a different',
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-checkpointer/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var CHECKPOINT_VERSION = 1;
var REPLICATOR = "pouchdb";
// This is an arbitrary number to limit the
// amount of replication history we save in the checkpoint.
// If we save too much, the checkpoing docs will become very big,
// If we save too much, the checkpoint docs will become very big,
// if we save fewer, we'll run a greater risk of having to
// read all the changes from 0 when checkpoint PUTs fail
// CouchDB 2.0 has a more involved history pruning,
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-core/src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ class AbstractPouchDB extends EventEmitter {
});
}).bind(this);

// TODO: I dont like this, it forces an extra read for every
// TODO: I don't like this, it forces an extra read for every
// attachment read and enforces a confusing api between
// adapter.js and the adapter implementation
this.getAttachment = adapterFun('getAttachment', function (docId, attachmentId, opts, callback) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { clone } from 'pouchdb-utils';

// we restucture the supplied JSON considerably, because the official
// we restructure the supplied JSON considerably, because the official
// Mango API is very particular about a lot of this stuff, but we like
// to be liberal with what we accept in order to prevent mental
// breakdowns in our users
Expand Down
Loading

0 comments on commit e23b4e1

Please sign in to comment.