Skip to content

Commit ab21322

Browse files
sevenbitbyteAlan Msevenbitbyte
authored
Dep deprecations (#63)
* use latest crypto * version bump * change deprecated dependencies * update joi * deep-set to lodash.set --------- Co-authored-by: Alan M <alanm@dev1.lxd> Co-authored-by: sevenbitbyte <code@nullagent.com>
1 parent 46ff69d commit ab21322

25 files changed

Lines changed: 32 additions & 29 deletions

examples/test-peer-party-service.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ExampleService extends Dataparty.IService {
1818
this.addEndpoint(Dataparty.endpoint_paths.secureecho)
1919
this.addEndpoint(Dataparty.endpoint_paths.identity)
2020
this.addEndpoint(Dataparty.endpoint_paths.version)
21+
22+
this.addSchema(Path.join(__dirname, './party/schema/user.js'))
2123
}
2224

2325
}

examples/test-service-node-host.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function main(){
8080

8181
console.log('started')
8282

83-
//process.exit()
83+
process.exit()
8484
}
8585

8686

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@dataparty/api",
33
"private": false,
4-
"version": "1.2.20",
4+
"version": "1.2.21",
55
"main": "dist/dataparty.js",
66
"frontend": "dist/dataparty-browser.js",
77
"backend": "dist/dataparty.js",
@@ -62,9 +62,8 @@
6262
"@dataparty/crypto": "1.0.3",
6363
"@dataparty/tasker": "^0.0.2",
6464
"@diva.exchange/i2p-sam": "^4.1.8",
65-
"@hapi/joi": "^17.1.1",
6665
"@markwylde/liferaft": "^1.3.4",
67-
"@zeit/ncc": "^0.22.3",
66+
"@vercel/ncc": "^0.36.1",
6867
"ajv": "6.9.1",
6968
"axios": "^0.27.2",
7069
"bleno": "npm:@abandonware/bleno@^0.5.1-4",
@@ -80,11 +79,12 @@
8079
"express": "^4.17.1",
8180
"express-list-routes": "^0.1.4",
8281
"git-repo-info": "^2.1.1",
82+
"joi": "^17.9.1",
8383
"joi-objectid": "^4.0.2",
8484
"jshashes": "^1.0.8",
8585
"jsonpath-plus": "^0.20.1",
8686
"last-eventemitter": "^1.1.1",
87-
"lodash": "^4.17.4",
87+
"lodash": "^4.17.21",
8888
"lokijs": "1.5.6",
8989
"mkdirp": "^0.5.1",
9090
"moment": "^2.29.4",

src/comms/host/host-protocol-scheme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const Joi = require('@hapi/joi')
1+
const Joi = require('joi')
22
Joi.objectId = require('joi-objectid')(Joi)
33

44
const ID_SCHEME = Joi.alternatives().try(Joi.string(), Joi.number())

src/comms/peer-comms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const HttpMocks = require('node-mocks-http')
55
const SocketOp = require('./op/socket-op')
66
const ISocketComms = require('./isocket-comms')
77

8-
const Joi = require('@hapi/joi')
8+
const Joi = require('joi')
99
const HostOp = require('./host/host-op')
1010
const HostProtocolScheme = require('./host/host-protocol-scheme')
1111

src/config/json-file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const fs = require('fs')
44
const Path = require('path')
55
const mkdirp = require('mkdirp')
6-
const deepSet = require('deep-set')
6+
const deepSet = require('lodash').set
77
const reach = require('../utils/reach')
88
const logger = require('debug')('dataparty.config.json-file')
99

src/config/local-storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const deepSet = require('deep-set')
3+
const deepSet = require('lodash').set
44
const reach = require('../utils/reach')
55
const logger = require('debug')('dataparty.config.local-storage');
66

src/config/memory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const deepSet = require('deep-set')
3+
const deepSet = require('lodash').set
44
const reach = require('../utils/reach')
55
const logger = require('debug')('dataparty.config.memory');
66

src/party/idocument.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ class IDocument extends EventEmitter {
176176

177177
const rawDocuments = (await party.create(type, data))
178178

179-
debug('hydrating', rawDocuments)
180-
return (await party.factory.hydrate(rawDocuments))[0]
179+
debug('hydrating', rawDocuments)
180+
return (await party.factory.hydrate(rawDocuments))[0]
181181

182182
/*const docs = (await party.find()
183183
.type(rawDocument.$meta.type)

src/party/iparty.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class IParty {
7777
async createDocument(type, data, id){
7878
let Type = this.factory.getFactory(type)
7979

80+
8081
return await Type.create(this, {data, type, id})
8182
}
8283

0 commit comments

Comments
 (0)