Skip to content

Commit 7445527

Browse files
fix(deps): update joshdb dependencies (#341)
1 parent 0708b6f commit 7445527

File tree

9 files changed

+271
-310
lines changed

9 files changed

+271
-310
lines changed

.github/workflows/auto-deprecate.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- name: Checkout Project
1515
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
16-
- name: Use Node.js v16
16+
- name: Use Node.js v20
1717
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
1818
with:
19-
node-version: 16
19+
vnode-version: 20
2020
cache: yarn
2121
registry-url: https://registry.npmjs.org/
2222
- name: Install Dependencies

.github/workflows/continuous-integration.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
1616
- name: Add ESLint Problem Matcher
1717
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
18-
- name: Use Node.js v16
18+
- name: Use Node.js v20
1919
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
2020
with:
21-
node-version: 16
21+
vnode-version: 20
2222
cache: yarn
2323
registry-url: https://registry.yarnpkg.com
2424
- name: Install Dependencies
@@ -34,10 +34,10 @@ jobs:
3434
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
3535
- name: Add TypeScript Problem Matcher
3636
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
37-
- name: Use Node.js v16
37+
- name: Use Node.js v20
3838
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
3939
with:
40-
node-version: 16
40+
vnode-version: 20
4141
cache: yarn
4242
registry-url: https://registry.yarnpkg.com
4343
- name: Install Dependencies
@@ -52,10 +52,10 @@ jobs:
5252
steps:
5353
- name: Checkout Project
5454
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
55-
- name: Use Node.js v16
55+
- name: Use Node.js v20
5656
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
5757
with:
58-
node-version: 16
58+
vnode-version: 20
5959
cache: yarn
6060
registry-url: https://registry.yarnpkg.com/
6161
- name: Install Dependencies
@@ -69,10 +69,10 @@ jobs:
6969
steps:
7070
- name: Checkout Project
7171
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
72-
- name: Use Node.js v16
72+
- name: Use Node.js v20
7373
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
7474
with:
75-
node-version: 16
75+
vnode-version: 20
7676
cache: yarn
7777
registry-url: https://registry.yarnpkg.com
7878
- name: Install Dependencies

.github/workflows/documentation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ jobs:
4646
steps:
4747
- name: Checkout Project
4848
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
49-
- name: Use Node.js v16
49+
- name: Use Node.js v20
5050
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
5151
with:
52-
node-version: 16
52+
vnode-version: 20
5353
cache: yarn
5454
registry-url: https://registry.npmjs.org/
5555
- name: Install Dependencies

.vscode/settings.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"editor.insertSpaces": true,
88
"editor.detectIndentation": false,
99
"editor.codeActionsOnSave": {
10-
"source.fixAll": true,
11-
"source.fixAll.eslint": true,
12-
"source.organizeImports": true
10+
"source.fixAll": "explicit",
11+
"source.fixAll.eslint": "explicit",
12+
"source.organizeImports": "explicit"
1313
},
1414
"files.eol": "\n",
1515
"typescript.tsdk": "node_modules/typescript/lib"

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
"postpack": "pinst --enable"
3535
},
3636
"dependencies": {
37-
"@joshdb/auto-ensure": "2.0.0-next.4c9b27e.0",
38-
"@joshdb/map": "2.0.0-next.782d01a.0",
39-
"@joshdb/provider": "2.0.0-next.a699598.0",
37+
"@joshdb/auto-ensure": "2.0.0-next.7b68fa9.0",
38+
"@joshdb/map": "2.0.0-next.00a4b62.0",
39+
"@joshdb/provider": "2.0.0-next.b88aca0.0",
4040
"@sapphire/utilities": "^3.15.3"
4141
},
4242
"devDependencies": {
4343
"@commitlint/cli": "^19.2.2",
4444
"@commitlint/config-conventional": "^19.2.2",
4545
"@favware/cliff-jumper": "^3.0.2",
4646
"@favware/npm-deprecate": "^1.0.7",
47-
"@joshdb/eslint-config": "1.1.0-next.038104a.0",
48-
"@joshdb/prettier-config": "1.1.0-next.038104a.0",
49-
"@joshdb/ts-config": "1.1.0-next.038104a.0",
47+
"@joshdb/eslint-config": "2.0.0-next.b88aca0.0",
48+
"@joshdb/prettier-config": "2.0.0-next.b88aca0.0",
49+
"@joshdb/ts-config": "2.0.0-next.b88aca0.0",
5050
"@types/node": "^20.10.6",
5151
"@typescript-eslint/eslint-plugin": "^7.7.0",
5252
"@typescript-eslint/parser": "^7.7.0",
@@ -75,7 +75,7 @@
7575
"!dist/*.tsbuildinfo"
7676
],
7777
"engines": {
78-
"node": ">=16",
78+
"node": ">=20",
7979
"npm": ">=6"
8080
},
8181
"keywords": [],

src/lib/structures/Josh.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
} from '@joshdb/provider';
1515
import type { Awaitable, NonNullObject, Primitive } from '@sapphire/utilities';
1616
import { isFunction, isPrimitive } from '@sapphire/utilities';
17-
import process from 'process';
1817
import { JoshError, type JoshErrorOptions } from './JoshError';
1918

2019
/**
@@ -1595,8 +1594,8 @@ export class Josh<StoredValue = unknown> {
15951594
* ```
15961595
*/
15971596
public async random(options?: Josh.RandomOptions): Promise<StoredValue[] | null> {
1598-
const { count = 1, duplicates = true } = options ?? {};
1599-
let payload: Payload.Random<StoredValue> = { method: Method.Random, errors: [], trigger: Trigger.PreProvider, count, duplicates };
1597+
const { count = 1, unique = false } = options ?? {};
1598+
let payload: Payload.Random<StoredValue> = { method: Method.Random, errors: [], trigger: Trigger.PreProvider, count, unique };
16001599

16011600
for (const middleware of Array.from(this.middlewares.values())) {
16021601
await middleware.run(payload);
@@ -1649,8 +1648,8 @@ export class Josh<StoredValue = unknown> {
16491648
* ```
16501649
*/
16511650
public async randomKey(options?: Josh.RandomOptions): Promise<string[] | null> {
1652-
const { count = 1, duplicates = true } = options ?? {};
1653-
let payload: Payload.RandomKey = { method: Method.RandomKey, errors: [], trigger: Trigger.PreProvider, count, duplicates };
1651+
const { count = 1, unique = false } = options ?? {};
1652+
let payload: Payload.RandomKey = { method: Method.RandomKey, errors: [], trigger: Trigger.PreProvider, count, unique };
16541653

16551654
for (const middleware of Array.from(this.middlewares.values())) {
16561655
await middleware.run(payload);
@@ -2509,10 +2508,10 @@ export namespace Josh {
25092508
count?: number;
25102509

25112510
/**
2512-
* Whether to allow duplicates.
2511+
* Whether the values should be unique.
25132512
* @since 2.0.0
25142513
*/
2515-
duplicates?: boolean;
2514+
unique?: boolean;
25162515
}
25172516

25182517
export enum ErrorBehavior {

tsup.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig({
1111
minify: false,
1212
skipNodeModulesBundle: true,
1313
sourcemap: true,
14-
target: 'es2021',
14+
target: 'es2022',
1515
tsconfig: relative(__dirname, resolve(process.cwd(), 'src', 'tsconfig.json')),
1616
keepNames: true,
1717
esbuildPlugins: [esbuildPluginPolyfillNode({ globals: { process: true } })],

vitest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ export default defineConfig({
1515
}
1616
},
1717
esbuild: {
18-
target: 'es2021'
18+
target: 'es2022'
1919
}
2020
});

0 commit comments

Comments
 (0)