Skip to content

Commit

Permalink
chore(release): publish v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FeathersJS-Offline committed Dec 10, 2020
1 parent 74bd88f commit d9545d6
Show file tree
Hide file tree
Showing 14 changed files with 84 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [11.x]
node-version: [11.x, 12.x, 13.x]

steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.4.0](https://github.com/mhillerstrom/feathersjs-offline/compare/v0.3.0...v0.4.0) (2020-12-10)

**Note:** Version bump only for package feathersjs-offline





# [0.3.0](https://github.com/mhillerstrom/feathersjs-offline/compare/v0.2.0...v0.3.0) (2020-12-10)

**Note:** Version bump only for package feathersjs-offline
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
"packages/*"
],
"version": "0.3.0",
"version": "0.4.0",
"useWorkspaces": false,
"command": {
"bootstrap": {
Expand Down
8 changes: 8 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.4.0](http://github.com/feathersjs-offline/owndata-ownnet/packages/client/compare/v0.3.0...v0.4.0) (2020-12-10)

**Note:** Version bump only for package @feathersjs-offline/client





# [0.3.0](http://github.com/feathersjs-offline/owndata-ownnet/packages/client/compare/v0.2.0...v0.3.0) (2020-12-10)

**Note:** Version bump only for package @feathersjs-offline/client
Expand Down
51 changes: 31 additions & 20 deletions packages/client/dist/feathersjs-offline-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/client/dist/feathersjs-offline-client.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/client/dist/feathersjs-offline-client.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@feathersjs-offline/client",
"version": "0.3.0",
"version": "0.4.0",
"description": "Client part of implementation of the own-data / own-net principles for supporting offline-first functionality for Feathers (mobile) applications.",
"keywords": [
"feathers",
Expand Down
39 changes: 20 additions & 19 deletions packages/client/src/own-common/own-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class OwnClass extends AdapterService {

async find (params) {
debug(`Calling find(${JSON.stringify(params)}})`);
debug(` rows=${JSON.stringify(await this.getEntries())}`);
return this._find(params);
}

Expand Down Expand Up @@ -274,27 +275,27 @@ class OwnClass extends AdapterService {
if (res) {
this.remoteService.create(res, clone(params))
.then(async rres => {
await self._removeQueuedEvent('_create0', queueId, newData, newData.updatedAt);
await to(self._removeQueuedEvent('_create0', queueId, newData, newData.updatedAt));
await self._patchIfNotRemoved(rres[self.id], rres);

// Ok, we have connection - empty queue if we have any items queued
self.allowInternalProcessing('_create0');
await self._processQueuedEvents();
await to( self._processQueuedEvents() );
})
.catch(async rerr => {
if (rerr.name !== 'Timeout') {
// Let's silently ignore missing connection to server -
// we'll catch-up next time we get a connection
// In all other cases do the following:
await self._removeQueuedEvent('_create1', queueId, rerr.message/*newData*/, newData.updatedAt);
await self.localService.remove(res[self.id], params);
await to(self._removeQueuedEvent('_create1', queueId, rerr.message/*newData*/, newData.updatedAt));
await to(self.localService.remove(res[self.id], params));
}

self.allowInternalProcessing('_create1');
});
}
else {
await this._removeQueuedEvent('_create2', queueId, newData, newData.updatedAt);
await to(this._removeQueuedEvent('_create2', queueId, newData, newData.updatedAt));
this.allowInternalProcessing('_create2');
throw err;
}
Expand Down Expand Up @@ -348,11 +349,11 @@ class OwnClass extends AdapterService {
if (!err) {
this.remoteService.update(id, res, clone(params))
.then(async rres => {
await self._removeQueuedEvent('_update0', queueId, newData, res.updatedAt);
await to(self._removeQueuedEvent('_update0', queueId, newData, res.updatedAt));
await self._patchIfNotRemoved(rres[self.id], rres)

self.allowInternalProcessing('_update0');
await self._processQueuedEvents();
await to( self._processQueuedEvents() );
})
.catch(async rerr => {
if (rerr.name === 'Timeout') {
Expand All @@ -361,14 +362,14 @@ class OwnClass extends AdapterService {
// We'll catch-up next time we get a connection
} else {
debug(`_update ERROR: ${rerr.name}, ${rerr.message}`);
await self._removeQueuedEvent('_update1', queueId, newData, res.updatedAt);
await self.localService.patch(id, beforeRecord);
await to(self._removeQueuedEvent('_update1', queueId, newData, res.updatedAt));
await to(self.localService.patch(id, beforeRecord));
}
self.allowInternalProcessing('_update1');
});
}
else {
await this._removeQueuedEvent('_update2', queueId, newData, newData.updatedAt);
await to(this._removeQueuedEvent('_update2', queueId, newData, newData.updatedAt));
this.allowInternalProcessing('_update2');
throw err;
}
Expand Down Expand Up @@ -429,11 +430,11 @@ class OwnClass extends AdapterService {
if (res) {
this.remoteService.patch(id, res, clone(params))
.then(async rres => {
await self._removeQueuedEvent('_patch0', queueId, rres, res.updatedAt)
await self._patchIfNotRemoved(rres[self.id], rres)
await to(self._removeQueuedEvent('_patch0', queueId, rres, res.updatedAt));
await self._patchIfNotRemoved(rres[self.id], rres);

self.allowInternalProcessing('_patch0');
await self._processQueuedEvents();
await to( self._processQueuedEvents() );
})
.catch(async rerr => {
if (rerr.name === 'Timeout') {
Expand All @@ -442,14 +443,14 @@ class OwnClass extends AdapterService {
// We'll catch-up next time we get a connection
} else {
debug(`_patch ERROR: ${rerr.name}, ${rerr.message}`);
await self._removeQueuedEvent('_patch1', queueId, newData, res.updatedAt);
await self.localService.patch(id, beforeRecord);
await to(self._removeQueuedEvent('_patch1', queueId, newData, res.updatedAt));
await to(self.localService.patch(id, beforeRecord));
}
self.allowInternalProcessing('_patch1');
});
}
else {
await this._removeQueuedEvent('_patch2', queueId, newData, newData.updatedAt);
await to(this._removeQueuedEvent('_patch2', queueId, newData, newData.updatedAt));
this.allowInternalProcessing('_patch2');
throw err;
}
Expand Down Expand Up @@ -518,7 +519,7 @@ class OwnClass extends AdapterService {
.then(async rres => {
await to(self._removeQueuedEvent('_remove0', queueId, beforeRecord, null));
self.allowInternalProcessing('_remove0');
await self._processQueuedEvents();
await to( self._processQueuedEvents() );
})
.catch(async rerr => {
if (rerr.name === 'Timeout') {
Expand All @@ -530,15 +531,15 @@ class OwnClass extends AdapterService {
// so we choose to silently ignore this situation
// } else {
// We have to restore the record to the local DB
await self._removeQueuedEvent('_remove1', queueId, beforeRecord, null);
await to(self._removeQueuedEvent('_remove1', queueId, beforeRecord, null));
await to(self.localService.create(beforeRecord, null));
// }
}
self.allowInternalProcessing('_remove1');
});
}
else {
await this._removeQueuedEvent('_remove2', queueId, beforeRecord, null);
await to(this._removeQueuedEvent('_remove2', queueId, beforeRecord, null));
this.allowInternalProcessing('_remove2');
throw err;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/own-common/helpers/fail-count-hook.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import errors from '@feathersjs/errors';
const errors = require('@feathersjs/errors');

/**
* This sets up a before hook for a given method in a given service. The hook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const failCountHook = require('./fail-count-hook');
const clone = require('./clone');
const delay = require('./delay');
const assertDeepEqualExcept = require('./assert-deep-equal-except');
import errors from '@feathersjs/errors';
const errors = require('@feathersjs/errors');

const sampleLen = 5; // Size of test database (backend)

Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/own-common/helpers/setup-hooks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import errors from '@feathersjs/errors';
const errors = require('@feathersjs/errors');

/**
* This sets up a before (and error) hook for all functions for a given service. The hook
Expand Down
8 changes: 8 additions & 0 deletions packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.4.0](http://github.com/feathersjs-offline/owndata-ownnet/packages/server/compare/v0.3.0...v0.4.0) (2020-12-10)

**Note:** Version bump only for package @feathersjs-offline/server





# [0.3.0](http://github.com/feathersjs-offline/owndata-ownnet/packages/server/compare/v0.2.0...v0.3.0) (2020-12-10)

**Note:** Version bump only for package @feathersjs-offline/server
Expand Down
Loading

0 comments on commit d9545d6

Please sign in to comment.