From ce207c2791fb4685f11cd87c4255c80891726bec Mon Sep 17 00:00:00 2001 From: Wei He Date: Sat, 23 Nov 2024 18:08:26 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20Improve=20config=20error=20loggi?= =?UTF-8?q?ng=20(#396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/short-ghosts-train.md | 5 +++++ .github/workflows/auto-tag.yml | 2 +- common/renderCard.ts | 3 ++- package.json | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/short-ghosts-train.md diff --git a/.changeset/short-ghosts-train.md b/.changeset/short-ghosts-train.md new file mode 100644 index 00000000..f7264ac6 --- /dev/null +++ b/.changeset/short-ghosts-train.md @@ -0,0 +1,5 @@ +--- +"socialify": patch +--- + +Improve config error logging diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 1869f441..4bc3b369 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -45,7 +45,7 @@ jobs: tag_name: v${{ steps.get_version.outputs.version }} name: Release v${{ steps.get_version.outputs.version }} body: | - [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) + https://github.com/${{ github.repository }}/commit/${{ github.sha }} See [CHANGELOG.md](./CHANGELOG.md) for details. draft: false diff --git a/common/renderCard.ts b/common/renderCard.ts index 36158eed..9cb7ad94 100644 --- a/common/renderCard.ts +++ b/common/renderCard.ts @@ -129,7 +129,8 @@ export async function getCardConfig(query: QueryType) { const config = mergeConfig(repository, query) - if (!config) throw Error('Configuration failed to generate') + if (!config) + throw Error(`[${query._owner}/${query._name}] Failed to generate config.`) return config } diff --git a/package.json b/package.json index 1cc2422b..d5827b1a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,9 @@ "postinstall": "cp ./node_modules/yoga-wasm-web/dist/yoga.wasm ./public/yoga.wasm; cp ./node_modules/@resvg/resvg-wasm/index_bg.wasm ./public/resvg_bg.wasm", "prepare": "is-ci || husky" }, + "engines": { + "node": "22" + }, "dependencies": { "@resvg/resvg-wasm": "^2.6.2", "autoprefixer": "^10.4.20",