Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mono - updating xo, @types/node, and webpack modules to latest #795

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"clean": "rm -rf node_modules && rm -rf yarn.lock && yarn workspaces run clean"
},
"dependencies": {
"@types/node": "^18.15.11"
"@types/node": "^20.1.0",
"webpack": "^5.82.0"
},
"devDependencies": {
"ava": "^5.2.0",
"c8": "^7.13.0",
"xo": "^0.54.1"
"xo": "^0.54.2"
}
}
3 changes: 2 additions & 1 deletion packages/compress-brotli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"xo": {
"rules": {
"unicorn/prefer-module": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/consistent-type-definitions": 0,
"ava/no-ignored-test-files": [
Expand Down Expand Up @@ -64,7 +65,7 @@
"tsd": "^0.28.1",
"typescript": "^5.0.3",
"webpack": "^5.77.0",
"xo": "^0.53.1"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
2 changes: 1 addition & 1 deletion packages/compress-gzip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"ts-node": "^10.9.1",
"tsd": "^0.28.1",
"typescript": "^5.0.3",
"xo": "^0.53.1"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
2 changes: 1 addition & 1 deletion packages/etcd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"tsd": "^0.28.1",
"typescript": "^5.0.4",
"webpack": "^5.79.0",
"xo": "^0.54.1"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
3 changes: 2 additions & 1 deletion packages/keyv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"rules": {
"unicorn/prefer-module": 0,
"unicorn/prefer-node-protocol": 0,
"unicorn/no-typeof-undefined": 0,
"@typescript-eslint/consistent-type-definitions": 0
}
},
Expand Down Expand Up @@ -47,7 +48,7 @@
"timekeeper": "^2.2.0",
"tsd": "^0.28.1",
"typescript": "^5.0.3",
"xo": "^0.53.1"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
3 changes: 2 additions & 1 deletion packages/mongo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"unicorn/no-array-reduce": 0,
"unicorn/prefer-object-from-entries": 0,
"unicorn/prefer-node-protocol": 0,
"@typescript-eslint/consistent-type-imports": 0,
"ava/no-ignored-test-files": [
"error",
{
Expand Down Expand Up @@ -74,7 +75,7 @@
"ts-node": "^10.8.2",
"tsd": "^0.20.0",
"typescript": "^4.6.4",
"xo": "^0.48.0"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
8 changes: 4 additions & 4 deletions packages/mongo/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {EventEmitter} from 'events';
import GridFSBucket from 'mongodb';
import {Store, StoredData} from 'keyv';
import type GridFSBucket from 'mongodb';
import {type Store, type StoredData} from 'keyv';

declare class KeyvMongo<Value=any> extends EventEmitter implements Store<Value> {
readonly ttlSupport: false;
Expand All @@ -27,7 +27,7 @@ declare class KeyvMongo<Value=any> extends EventEmitter implements Store<Value>
export = KeyvMongo;

declare namespace KeyvMongo {
interface Options {
type Options = {
url?: string | undefined;
collection?: string | undefined;
namespace?: string | undefined;
Expand All @@ -36,5 +36,5 @@ declare namespace KeyvMongo {
useGridFS?: boolean | undefined;
uri?: string | undefined;
dialect?: string | undefined;
}
};
}
8 changes: 2 additions & 6 deletions packages/mongo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class KeyvMongo extends EventEmitter {
stream.on('error', () => resolve());

stream.on('end', () => {
resp = Buffer.concat(resp).toString('utf-8');
resp = Buffer.concat(resp).toString('utf8');
resolve(resp);
});

Expand Down Expand Up @@ -181,11 +181,7 @@ class KeyvMongo extends EventEmitter {
for (const key of keys) {
const rowIndex = values.findIndex(row => row.key === key);

if (rowIndex > -1) {
results[i] = values[rowIndex].value;
} else {
results[i] = undefined;
}
results[i] = rowIndex > -1 ? values[rowIndex].value : undefined;

i++;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/offline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"ts-node": "^10.9.1",
"tsd": "^0.28.1",
"typescript": "^5.0.3",
"xo": "^0.53.1"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
2 changes: 1 addition & 1 deletion packages/redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"ts-node": "^10.9.1",
"tsd": "^0.28.1",
"typescript": "^5.0.3",
"xo": "^0.53.1"
"xo": "^0.54.2"
},
"tsd": {
"directory": "test"
Expand Down
2 changes: 1 addition & 1 deletion packages/redis/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class KeyvRedis extends EventEmitter {
}

set(key, value, ttl) {
if (typeof value === 'undefined') {
if (value === undefined) {
return Promise.resolve(undefined);
}

Expand Down