Skip to content

Commit

Permalink
Update lots of deps (some biome lint change)
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Oct 12, 2024
1 parent e579e48 commit fd5b762
Show file tree
Hide file tree
Showing 13 changed files with 786 additions and 688 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
},
"dependencies": {
"@oldschoolgg/toolkit": "git+https://github.com/oldschoolgg/toolkit.git#8686dc639154c528ce739c440554bc0c46c8ae79",
"@prisma/client": "^5.17.0",
"@prisma/client": "^5.20.0",
"@sapphire/ratelimits": "^2.4.9",
"@sapphire/snowflake": "^3.5.3",
"@sapphire/time-utilities": "^1.6.0",
"@sapphire/timer-manager": "^1.0.2",
"@sentry/node": "^8.15.0",
"@sentry/node": "^8.34.0",
"ascii-table3": "^0.9.0",
"bufferutil": "^4.0.8",
"discord.js": "^14.16.2",
"discord.js": "^14.16.3",
"dotenv": "^16.4.5",
"e": "0.2.33",
"exit-hook": "^4.0.0",
Expand All @@ -64,34 +64,34 @@
"node-fetch": "^2.6.7",
"oldschooljs": "git+https://github.com/oldschoolgg/oldschooljs.git#50fff6e124d20f8118bcc09dad385046119a9175",
"p-queue": "^6.6.2",
"piscina": "^4.6.1",
"piscina": "^4.7.0",
"postgres": "^3.4.4",
"random-js": "^2.1.0",
"remeda": "^2.7.0",
"remeda": "^2.15.0",
"simple-statistics": "^7.8.3",
"skia-canvas": "^1.0.2",
"sonic-boom": "^4.0.1",
"sonic-boom": "^4.1.0",
"zlib-sync": "^0.1.9",
"zod": "^3.23.8"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@biomejs/biome": "^1.9.3",
"@types/lodash": "^4.14.195",
"@types/node": "^20.14.9",
"@types/node-cron": "^3.0.7",
"@types/node-fetch": "^2.6.1",
"@vitest/coverage-v8": "^2.1.2",
"concurrently": "^8.2.2",
"dpdm": "^3.14.0",
"esbuild": "0.21.5",
"esbuild": "0.24.0",
"fast-glob": "^3.3.2",
"google-auth-library": "^9.14.1",
"google-spreadsheet": "^4.1.4",
"nodemon": "^3.1.4",
"prettier": "^3.3.2",
"prisma": "^5.17.0",
"nodemon": "^3.1.7",
"prettier": "^3.3.3",
"prisma": "^5.20.0",
"spritesmith": "^3.4.1",
"tsx": "^4.16.2",
"tsx": "^4.19.1",
"typescript": "^5.5.3",
"vitest": "^2.1.2"
},
Expand All @@ -100,6 +100,6 @@
},
"packageManager": "[email protected]",
"resolutions": {
"esbuild": "0.21.5"
"esbuild": "0.24.0"
}
}
6 changes: 3 additions & 3 deletions src/lib/bankImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ export class BankImageTask {
const searchQuery = flags.get('search') as string | undefined;
const filterInput = flags.get('filter');
const filter = flags.get('search')
? filterableTypes.find(type => type.aliases.some(alias => filterInput === alias)) ?? null
? (filterableTypes.find(type => type.aliases.some(alias => filterInput === alias)) ?? null)
: null;
if (filter || searchQuery) {
for (const [item] of bank.items()) {
Expand All @@ -720,9 +720,9 @@ export class BankImageTask {
const favorites = user?.user.favoriteItems;
const weightings = user?.user.bank_sort_weightings as ItemBank;
const perkTier = user ? user.perkTier() : 0;
const defaultSort: BankSortMethod = perkTier < PerkTier.Two ? 'value' : user?.bankSortMethod ?? 'value';
const defaultSort: BankSortMethod = perkTier < PerkTier.Two ? 'value' : (user?.bankSortMethod ?? 'value');
const sortInput = flags.get('sort');
const sort = sortInput ? BankSortMethods.find(s => s === sortInput) ?? defaultSort : defaultSort;
const sort = sortInput ? (BankSortMethods.find(s => s === sortInput) ?? defaultSort) : defaultSort;

items.sort(sorts[sort]);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/data/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ export function getCollectionItems(
_clName = category;
_items = uniqueArr(
Object.values(entries.activities)
.map(e => [...new Set([...e.items, ...(allItems ? e.allItems ?? [] : [])])])
.map(e => [...new Set([...e.items, ...(allItems ? (e.allItems ?? []) : [])])])
.flat(2)
);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/simulation/toa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ export async function toaStartCommand(
user,
await getMinigameScore(user.id, 'tombs_of_amascut'),
raidLevel,
solo ? 1 : teamSize ?? 5,
solo ? 1 : (teamSize ?? 5),
Time.Hour,
1
);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/tickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ WHERE bitfield && '{2,3,4,5,6,7,8,12,21,24}'::int[] AND user_stats."last_daily_t

const storeHarvestablePlant = patch.lastPlanted;
const planted = storeHarvestablePlant
? Farming.Plants.find(plants => stringMatches(plants.name, storeHarvestablePlant)) ??
? (Farming.Plants.find(plants => stringMatches(plants.name, storeHarvestablePlant)) ??
Farming.Plants.find(
plants =>
stringMatches(plants.name, storeHarvestablePlant) ||
stringMatches(plants.name.split(' ')[0], storeHarvestablePlant)
)
))
: null;
const difference = now - patch.plantTime;
if (!planted) continue;
Expand Down
3 changes: 1 addition & 2 deletions src/lib/util/calcWildyPkChance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ export function calcWildyPKChance(
}${deathChanceFromGear.toFixed(
2
)}x from wildy gear (weight 60% magic, 40% ranged, 20% melee), ${hasSupplies}x from anti-pk supplies, ${hasOverheads}x from overhead prayers, ${(
(100 - evasionReduction) /
100
(100 - evasionReduction) / 100
).toFixed(2)}x from risky Wilderness experience, ${wildyMultiMultiplier}x from being in${
wildyMultiMultiplier === 1 ? ' no' : ''
} multi)`;
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ LIMIT 20;
};
}>) => {
const user = await mUserFetch(userID);
const guild = guildID ? globalClient.guilds.cache.get(guildID.toString()) ?? null : null;
const guild = guildID ? (globalClient.guilds.cache.get(guildID.toString()) ?? null) : null;
if (options.server) {
if (options.server.channel) {
return handleChannelEnable(user, guild, channelID, options.server.channel.choice);
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/commands/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const statsCommand: OSBMahojiCommand = {
type: options.type,
virtualLevels: Boolean(options.virtual)
});
const postfix = options.type === 'seasonal' ? 'Shattered Relics Leagues' : options.type ?? null;
const postfix = options.type === 'seasonal' ? 'Shattered Relics Leagues' : (options.type ?? null);
return {
embeds: [
statsEmbed({
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/lib/abstracted_commands/slayerShopCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function slayerShopBuyCommand({
if (buyableObj.haveOne && user.allItemsOwned.has(buyableObj.item)) {
return `You already own a ${buyableObj.name}`;
}
const qty = buyableObj.haveOne ? 1 : quantity ?? 1;
const qty = buyableObj.haveOne ? 1 : (quantity ?? 1);
const cost = qty * buyableObj.slayerPointCost;
if (user.user.slayer_points >= cost) {
try {
Expand Down
14 changes: 7 additions & 7 deletions src/mahoji/lib/abstracted_commands/slayerTaskCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,25 +256,25 @@ export async function slayerNewTaskCommand({
// Contains (if matched) the slayer master requested, falling back on saved default, if they have requirements
const slayerMaster =
slayerMasterOverride && has99SlayerCape
? slayerMasters.find(m => m.aliases.some(alias => stringMatches(alias, slayerMasterOverride))) ?? null
? (slayerMasters.find(m => m.aliases.some(alias => stringMatches(alias, slayerMasterOverride))) ?? null)
: slayerMasterOverride
? slayerMasters
? (slayerMasters
.filter(m => userCanUseMaster(user, m))
.find(m => m.aliases.some(alias => stringMatches(alias, slayerMasterOverride))) ?? null
.find(m => m.aliases.some(alias => stringMatches(alias, slayerMasterOverride))) ?? null)
: rememberedSlayerMaster
? slayerMasters
? (slayerMasters
.filter(m => userCanUseMaster(user, m))
.find(m => m.aliases.some(alias => stringMatches(alias, rememberedSlayerMaster))) ??
proposedDefaultMaster
proposedDefaultMaster)
: proposedDefaultMaster;

// Contains (if matched) the requested Slayer Master regardless of requirements.
const matchedSlayerMaster = slayerMasterOverride
? slayerMasters.find(
? (slayerMasters.find(
m =>
stringMatches(m.name, slayerMasterOverride) ||
m.aliases.some(alias => stringMatches(alias, slayerMasterOverride))
) ?? null
) ?? null)
: null;

// Special handling for Turael skip
Expand Down
4 changes: 2 additions & 2 deletions src/mahoji/lib/bingo/BingoManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ export class BingoManager {
teams: teams.map((team, index) => ({
...team,
trophy: this.isGlobal
? BingoTrophies.filter(
? (BingoTrophies.filter(
t =>
index < 3 ||
team.tilesCompletedCount >= t.guaranteedAt ||
100 - t.percentile <=
ss.quantileRank(tilesCompletedCounts, team.tilesCompletedCount) * 100
)[0] ?? null
)[0] ?? null)
: null,
rank: index + 1
}))
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/minions/monsterActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export function doMonsterTrip(data: newOptions) {
});

const superiorTable = slayerContext.hasSuperiorsUnlocked && monster.superior ? monster.superior : undefined;
const isInCatacombs = (!usingCannon ? monster.existsInCatacombs ?? undefined : undefined) && !isInWilderness;
const isInCatacombs = (!usingCannon ? (monster.existsInCatacombs ?? undefined) : undefined) && !isInWilderness;

const hasRingOfWealthI = gearBank.gear.wildy.hasEquipped('Ring of wealth (i)') && isInWilderness;
if (hasRingOfWealthI) {
Expand Down
Loading

0 comments on commit fd5b762

Please sign in to comment.