From 323408ad6ab522f96f5291898f5ba69bf8da9a33 Mon Sep 17 00:00:00 2001 From: James Harris <3440094+wopian@users.noreply.github.com> Date: Thu, 21 Sep 2023 21:24:04 +0100 Subject: [PATCH] feat: upgrade to ky@1 and remove ky-universal (#267) --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- package.json | 3 +-- pnpm-lock.yaml | 12 +++++++----- src/components/embeds/user/records.ts | 2 +- src/components/embeds/user/stats.ts | 2 +- src/components/embeds/userEmbed.ts | 2 +- src/services/github.ts | 2 +- src/services/steam.ts | 2 +- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7e2ed0c9..424eefe1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,7 +7,7 @@ on: env: FORCE_COLOR: true - NODE_VERSION: 18 + NODE_VERSION: 20 jobs: deploy: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faabac73..621cc3c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: env: FORCE_COLOR: true - NODE_VERSION: 18 + NODE_VERSION: 20 jobs: setup: diff --git a/package.json b/package.json index 2ff2ee7e..ebffb4de 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "discord.js": "14.13.0", "dotenv": "16.3.1", "knex": "2.5.1", - "ky": "0.33.3", - "ky-universal": "0.12.0", + "ky": "1.0.1", "mysql2": "3.6.1", "winston": "3.10.0", "winston-daily-rotate-file": "4.7.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e491df31..a5289bb4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,11 +27,8 @@ dependencies: specifier: 2.5.1 version: 2.5.1(mysql2@3.6.1) ky: - specifier: 0.33.3 - version: 0.33.3 - ky-universal: - specifier: 0.12.0 - version: 0.12.0(ky@0.33.3) + specifier: 1.0.1 + version: 1.0.1 mysql2: specifier: 3.6.1 version: 3.6.1 @@ -3438,6 +3435,11 @@ packages: engines: {node: '>=14.16'} dev: false + /ky@1.0.1: + resolution: {integrity: sha512-UvcwpQO0LOuZwG0Ti3VDo6w57KYt+r4bWEYlNaMt82hgyFtse86QtOGum1RzsZni31FndXQl6NvtDArfunt2JQ==} + engines: {node: '>=18'} + dev: false + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} diff --git a/src/components/embeds/user/records.ts b/src/components/embeds/user/records.ts index 9c272c5c..790021a8 100644 --- a/src/components/embeds/user/records.ts +++ b/src/components/embeds/user/records.ts @@ -6,7 +6,7 @@ import { UserRanking } from '@zeepkist/gtr-api' import { CommandInteraction, EmbedBuilder } from 'discord.js' -import { HTTPError } from 'ky-universal' +import { HTTPError } from 'ky' import { formatOrdinal, log } from '../../../utils/index.js' import { listRecords } from '../../lists/listRecords.js' diff --git a/src/components/embeds/user/stats.ts b/src/components/embeds/user/stats.ts index fa24542a..afe2b479 100644 --- a/src/components/embeds/user/stats.ts +++ b/src/components/embeds/user/stats.ts @@ -8,7 +8,7 @@ import { UserRanking } from '@zeepkist/gtr-api' import { CommandInteraction, EmbedBuilder } from 'discord.js' -import { HTTPError } from 'ky-universal' +import { HTTPError } from 'ky' import { formatOrdinal, diff --git a/src/components/embeds/userEmbed.ts b/src/components/embeds/userEmbed.ts index d5c78152..a188fec2 100644 --- a/src/components/embeds/userEmbed.ts +++ b/src/components/embeds/userEmbed.ts @@ -7,7 +7,7 @@ import { EmbedBuilder, User as DiscordUser } from 'discord.js' -import { HTTPError } from 'ky-universal' +import { HTTPError } from 'ky' import { STEAM_URL, ZEEPKIST_URL } from '../../constants.js' import { getPlayerSummaries } from '../../services/steam.js' diff --git a/src/services/github.ts b/src/services/github.ts index f8bd2765..2ecdca89 100644 --- a/src/services/github.ts +++ b/src/services/github.ts @@ -1,4 +1,4 @@ -import ky from 'ky-universal' +import ky from 'ky' import { GITHUB_API_URL } from '../constants.js' import { GitHubRelease } from '../models/github.js' diff --git a/src/services/steam.ts b/src/services/steam.ts index 3d9913d6..ca925f74 100644 --- a/src/services/steam.ts +++ b/src/services/steam.ts @@ -1,4 +1,4 @@ -import ky from 'ky-universal' +import ky from 'ky' import { STEAM_API_URL } from '../constants.js' import { PlayerSummmary } from '../models/steam.js'