From 5cb354c08292e1ba90abdfb4aa92853fb5843d9e Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 28 Feb 2023 10:26:08 +0100 Subject: [PATCH 1/2] refactor: pass down headers --- api/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/index.js b/api/index.js index e86df2d..2739875 100644 --- a/api/index.js +++ b/api/index.js @@ -1,7 +1,7 @@ /* global fetch, Response */ export const config = { - runtime: 'experimental-edge' + runtime: 'edge' } const NODE_ENV = process.env.NODE_ENV @@ -46,8 +46,8 @@ export default async request => { return fetch(`${API_ENDPOINT}?${url.searchParams.toString()}`, { headers: { - 'x-api-key': API_KEY, - accept: request.headers.get('accept') + ...request.headers, + 'x-api-key': API_KEY } }) } From c95ef85d7762c2c00c1c7562963f29bdd9950f8b Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 28 Feb 2023 10:26:14 +0100 Subject: [PATCH 2/2] build: tweaks --- .github/workflows/main.yml | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9231e59..cb887d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,6 @@ jobs: # github-token: ${{ secrets.GITHUB_TOKEN }} - name: Release if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'chore(release):') && !startsWith(github.event.head_commit.message, 'docs:') }} - shell: 'script -q -e -c "bash {0}" > /dev/null' env: CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index d44b10f..862f610 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ ], "scripts": { "clean": "rm -rf node_modules", - "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", + "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", "lint": "standard-markdown README.md && standard", "postrelease": "npm run release:tags && npm run release:github", "prerelease": "npm run update:check && npm run contributors",