Skip to content

Commit

Permalink
chore(deps): update dependency @joshdb/eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
RealShadowNova committed Jan 6, 2023
1 parent 73c5ff2 commit 36b3867
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 42 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"@favware/cliff-jumper": "^1.8.8",
"@favware/npm-deprecate": "^1.0.5",
"@favware/rollup-type-bundler": "^1.0.11",
"@joshdb/eslint-config": "1.1.0-next.7b50e88.0",
"@joshdb/ts-config": "^1.1.0-next.7fbd1fd.0",
"@joshdb/eslint-config": "1.1.0-next.89c3b7b.0",
"@joshdb/ts-config": "1.1.0-next.7fbd1fd.0",
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
Expand Down
44 changes: 22 additions & 22 deletions src/lib/structures/Josh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ import { JoshError, JoshErrorOptions } from './JoshError';
* ```
*/
export class Josh<StoredValue = unknown> {
/**
* The current version of {@link Josh}
* @since 2.0.0
*/
public static version = '[VI]{version}[/VI]';

/**
* This Josh's name. Used for middleware and/or provider information.
* @since 2.0.0
Expand Down Expand Up @@ -110,21 +104,6 @@ export class Josh<StoredValue = unknown> {
}
}

/**
* A static method to create multiple instances of {@link Josh}.
* @since 2.0.0
* @param names The names to give each instance of {@link Josh}
* @param options The options to give all the instances.
* @returns The created instances.
*/
public static multi<Instances extends Record<string, Josh> = Record<string, Josh>>(
names: string[],
options: Omit<Josh.Options, 'name'> = {}
): Instances {
// @ts-expect-error 2345
return names.reduce<Instances>((instances, name) => ({ ...instances, [name]: new Josh({ ...options, name }) }), {});
}

private get providerDataFailedError(): JoshError {
return this.error(Josh.Identifiers.ProviderDataFailed);
}
Expand Down Expand Up @@ -475,7 +454,7 @@ export class Josh<StoredValue = unknown> {
* @since 2.0.0
* @param returnBulkType The return bulk type. Defaults to {@link Bulk.Object}
* @returns The bulk data.
* @example
* ```javascript
* await josh.set('key', 'value');
Expand Down Expand Up @@ -1925,6 +1904,27 @@ export class Josh<StoredValue = unknown> {
private resolvePath(path: Path): string[] {
return Array.isArray(path) ? path : path.replace(/\[/g, '.').replace(/\]/g, '').split('.').filter(Boolean);
}

/**
* The current version of {@link Josh}
* @since 2.0.0
*/
public static version = '[VI]{version}[/VI]';

/**
* A static method to create multiple instances of {@link Josh}.
* @since 2.0.0
* @param names The names to give each instance of {@link Josh}
* @param options The options to give all the instances.
* @returns The created instances.
*/
public static multi<Instances extends Record<string, Josh> = Record<string, Josh>>(
names: string[],
options: Omit<Josh.Options, 'name'> = {}
): Instances {
// @ts-expect-error 2345
return names.reduce<Instances>((instances, name) => ({ ...instances, [name]: new Josh({ ...options, name }) }), {});
}
}

export namespace Josh {
Expand Down
7 changes: 5 additions & 2 deletions tests/lib/structures/Josh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Bulk, Josh, JoshError } from '../../../src';

@ApplyMiddlewareOptions({ name: 'test' })
class TestMiddleware<StoredValue = unknown> extends JoshMiddleware<NonNullObject, StoredValue> {
public static errorCount: 0 | 1 | 2 = 0;
public static deleteData = false;
public version: Semver = { major: 2, minor: 0, patch: 0 };

public override run<P extends Payload>(payload: P): P {
if (payload.trigger === Trigger.PostProvider) {
if (TestMiddleware.errorCount === 1) {
Expand Down Expand Up @@ -40,6 +39,10 @@ class TestMiddleware<StoredValue = unknown> extends JoshMiddleware<NonNullObject
public fetchVersion() {
return this.version;
}

public static errorCount: 0 | 1 | 2 = 0;

public static deleteData = false;
}

describe('Josh', () => {
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ __metadata:
"@favware/npm-deprecate": ^1.0.5
"@favware/rollup-type-bundler": ^1.0.11
"@joshdb/auto-ensure": 1.1.0-pr-125.c8affcc.0
"@joshdb/eslint-config": 1.1.0-next.7b50e88.0
"@joshdb/eslint-config": 1.1.0-next.89c3b7b.0
"@joshdb/map": 1.1.0-next.debaead.0
"@joshdb/provider": 2.0.0-next.7b50e88.0
"@joshdb/ts-config": ^1.1.0-next.7fbd1fd.0
"@joshdb/ts-config": 1.1.0-next.7fbd1fd.0
"@sapphire/utilities": ^3.11.0
"@types/node": ^18.11.9
"@typescript-eslint/eslint-plugin": ^5.42.1
Expand All @@ -568,19 +568,19 @@ __metadata:
languageName: unknown
linkType: soft

"@joshdb/eslint-config@npm:1.1.0-next.7b50e88.0":
version: 1.1.0-next.7b50e88.0
resolution: "@joshdb/eslint-config@npm:1.1.0-next.7b50e88.0"
"@joshdb/eslint-config@npm:1.1.0-next.89c3b7b.0":
version: 1.1.0-next.89c3b7b.0
resolution: "@joshdb/eslint-config@npm:1.1.0-next.89c3b7b.0"
dependencies:
"@sapphire/eslint-config": ^4.3.8
"@typescript-eslint/eslint-plugin": ^5.47.0
"@typescript-eslint/parser": ^5.47.0
eslint: ^8.30.0
"@typescript-eslint/eslint-plugin": ^5.47.1
"@typescript-eslint/parser": ^5.47.1
eslint: ^8.31.0
eslint-config-prettier: ^8.5.0
eslint-plugin-prettier: ^4.2.1
prettier: ^2.8.1
typescript: ^4.9.4
checksum: 34517fc0ac46d847785f367cdc3134af9bf0fc47c64ac24daaf8be07de8e763e8cb7accd30b3b464d3907585b03b620cfe511f3b55c57b17cd6f12be61f10b2e
checksum: 26589472310479e9ec0c0aff769ad59cff646c1b28ea406f5e8359821d86eac9e78fa3715917209b3255f89fcdf45c8e3f1d0fb12aca82fcf09cc5067ee6eda0
languageName: node
linkType: hard

Expand Down Expand Up @@ -613,12 +613,12 @@ __metadata:
languageName: node
linkType: hard

"@joshdb/ts-config@npm:^1.1.0-next.7fbd1fd.0":
version: 1.1.0-pr-130.c8671cc.0
resolution: "@joshdb/ts-config@npm:1.1.0-pr-130.c8671cc.0"
"@joshdb/ts-config@npm:1.1.0-next.7fbd1fd.0":
version: 1.1.0-next.7fbd1fd.0
resolution: "@joshdb/ts-config@npm:1.1.0-next.7fbd1fd.0"
dependencies:
"@sapphire/ts-config": ^3.3.4
checksum: cc0a9a86db7c18d0d161dddaca5cd281b66db7758d6b09310299e11ab45c001d95123276aed7e29f2c4426309d4d5616dae11bafdf1be815beb778f285f384e7
checksum: 844fdfef6157a56e2b500065b3795e37f5606a91182e52078e543820554fc55b4da22b724d4da6b7f83612d0bae25daa737fae7d59557ebabe88c14194ba1d23
languageName: node
linkType: hard

Expand Down Expand Up @@ -877,7 +877,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^5.33.1, @typescript-eslint/eslint-plugin@npm:^5.42.1, @typescript-eslint/eslint-plugin@npm:^5.47.0":
"@typescript-eslint/eslint-plugin@npm:^5.33.1, @typescript-eslint/eslint-plugin@npm:^5.42.1, @typescript-eslint/eslint-plugin@npm:^5.47.1":
version: 5.48.0
resolution: "@typescript-eslint/eslint-plugin@npm:5.48.0"
dependencies:
Expand All @@ -900,7 +900,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^5.33.1, @typescript-eslint/parser@npm:^5.42.1, @typescript-eslint/parser@npm:^5.47.0":
"@typescript-eslint/parser@npm:^5.33.1, @typescript-eslint/parser@npm:^5.42.1, @typescript-eslint/parser@npm:^5.47.1":
version: 5.48.0
resolution: "@typescript-eslint/parser@npm:5.48.0"
dependencies:
Expand Down Expand Up @@ -2055,7 +2055,7 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:^8.22.0, eslint@npm:^8.30.0":
"eslint@npm:^8.22.0, eslint@npm:^8.30.0, eslint@npm:^8.31.0":
version: 8.31.0
resolution: "eslint@npm:8.31.0"
dependencies:
Expand Down

0 comments on commit 36b3867

Please sign in to comment.