Skip to content

Commit

Permalink
fix: ts-ignoring logger type incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
emmacasolin committed Jul 27, 2022
1 parent c378209 commit 4205327
Show file tree
Hide file tree
Showing 67 changed files with 148 additions and 69 deletions.
130 changes: 69 additions & 61 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
},
"dependencies": {
"@grpc/grpc-js": "1.6.7",
"@matrixai/async-init": "^1.8.1",
"@matrixai/async-locks": "^2.3.1",
"@matrixai/async-init": "^1.8.2",
"@matrixai/async-locks": "^3.1.2",
"@matrixai/db": "^4.0.5",
"@matrixai/errors": "^1.1.1",
"@matrixai/errors": "^1.1.3",
"@matrixai/id": "^3.3.3",
"@matrixai/logger": "^3.0.0",
"@matrixai/resources": "^1.1.3",
"@matrixai/workers": "^1.3.3",
"@matrixai/resources": "^1.1.4",
"@matrixai/workers": "^1.3.6",
"ajv": "^7.0.4",
"bip39": "^3.0.3",
"canonicalize": "^1.0.5",
Expand Down
1 change: 1 addition & 0 deletions src/PolykeyAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ class PolykeyAgent {
},
},
fs,
// @ts-ignore - version of js-logger is incompatible (remove when DB updates to 5.*)
logger: logger.getChild(DB.name),
fresh,
}));
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ async function bootstrapState({
const db = await DB.createDB({
dbPath,
fs,
// @ts-ignore - version of js-logger is incompatible (remove when DB updates to 5.*)
logger: logger.getChild(DB.name),
crypto: {
key: keyManager.dbKey,
Expand Down
5 changes: 3 additions & 2 deletions src/vaults/VaultManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type NotificationsManager from '../notifications/NotificationsManager';
import type ACL from '../acl/ACL';
import type { RemoteInfo } from './VaultInternal';
import type { VaultAction } from './types';
import type { LockRequest } from '@matrixai/async-locks';
import type { MultiLockRequest } from '@matrixai/async-locks';
import path from 'path';
import { PassThrough } from 'readable-stream';
import { EncryptedFS, errors as encryptedFsErrors } from 'encryptedfs';
Expand Down Expand Up @@ -181,6 +181,7 @@ class VaultManager {
efs = await EncryptedFS.createEncryptedFS({
dbPath: this.efsPath,
dbKey: vaultKey,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger: this.logger.getChild('EncryptedFileSystem'),
});
} catch (e) {
Expand Down Expand Up @@ -961,7 +962,7 @@ class VaultManager {
}

// Obtaining locks
const vaultLocks: Array<LockRequest<RWLockWriter>> = vaultIds.map(
const vaultLocks: Array<MultiLockRequest<RWLockWriter>> = vaultIds.map(
(vaultId) => {
return [vaultId.toString(), RWLockWriter, 'read'];
},
Expand Down
1 change: 1 addition & 0 deletions tests/acl/ACL.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe(ACL.name, () => {
const dbPath = `${dataDir}/db`;
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
crypto: {
key: dbKey,
Expand Down
1 change: 1 addition & 0 deletions tests/agent/GRPCClientAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe(GRPCClientAgent.name, () => {
db = await DB.createDB({
dbPath: dbPath,
fs: fs,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger: logger,
crypto: {
key: keyManager.dbKey,
Expand Down
1 change: 1 addition & 0 deletions tests/agent/service/notificationsSend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('notificationsSend', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
acl = await ACL.createACL({
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/agentLockAll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe('agentLockall', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
crypto: {
key: keyManager.dbKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('gestaltsActionsByIdentity', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
acl = await ACL.createACL({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('gestaltsActionsByNode', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
acl = await ACL.createACL({
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/gestaltsDiscoveryByIdentity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('gestaltsDiscoveryByIdentity', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
crypto: {
key: keyManager.dbKey,
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/gestaltsDiscoveryByNode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe('gestaltsDiscoveryByNode', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
crypto: {
key: keyManager.dbKey,
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/gestaltsGestaltGetByIdentity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('gestaltsGestaltGetByIdentity', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
acl = await ACL.createACL({
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/gestaltsGestaltGetByNode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('gestaltsGestaltGetByNode', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
acl = await ACL.createACL({
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/gestaltsGestaltList.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('gestaltsGestaltList', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
acl = await ACL.createACL({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ describe('gestaltsGestaltTrustByIdentity', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
crypto: {
key: keyManager.dbKey,
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/gestaltsGestaltTrustByNode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ describe('gestaltsGestaltTrustByNode', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
crypto: {
key: keyManager.dbKey,
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/identitiesAuthenticate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('identitiesAuthenticate', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
identitiesManager = await IdentitiesManager.createIdentitiesManager({
Expand Down
1 change: 1 addition & 0 deletions tests/client/service/identitiesAuthenticatedGet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('identitiesAuthenticatedGet', () => {
const dbPath = path.join(dataDir, 'db');
db = await DB.createDB({
dbPath,
// @ts-ignore - version of js-logger is incompatible (remove when EFS logger updates to 3.*)
logger,
});
identitiesManager = await IdentitiesManager.createIdentitiesManager({
Expand Down
Loading

0 comments on commit 4205327

Please sign in to comment.