Skip to content

Commit

Permalink
chore: use Response.redirect
Browse files Browse the repository at this point in the history
chore: bump (dev)Dependencies
  • Loading branch information
JounQin committed Oct 27, 2023
1 parent 1ba3ae0 commit 42c08e4
Show file tree
Hide file tree
Showing 7 changed files with 4,274 additions and 5,368 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ jobs:
strategy:
matrix:
node:
- 14
- 16
- 18
- 20
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]
branches: ['main']
schedule:
- cron: "5 6 * * 5"
- cron: '5 6 * * 5'

jobs:
analyze:
Expand All @@ -20,11 +20,11 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ javascript ]
language: [javascript]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand All @@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
category: '/language:${{ matrix.language }}'
2 changes: 1 addition & 1 deletion .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check Branch
id: branch
Expand Down
8 changes: 1 addition & 7 deletions api/[owner]/[app]/[version].ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export interface DownloadInfo {
download_url: string
}

const REDIRECT = 302
const NOT_FOUND = 404

export const config = {
Expand Down Expand Up @@ -59,10 +58,5 @@ export default async (req: Request): Promise<Response> => {

console.log(`Redirect to ${downloadUrl}`)

return new Response(null, {
status: REDIRECT,
headers: {
Location: downloadUrl,
},
})
return Response.redirect(downloadUrl)
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
"start": "vc dev"
},
"dependencies": {
"@vercel/edge": "^0.3.1"
"@vercel/edge": "^1.1.0"
},
"devDependencies": {
"@1stg/common-config": "^7.2.0",
"@octokit/request": "^6.2.3",
"@types/web": "^0.0.99",
"tsx": "^3.12.6",
"typescript": "^5.0.2",
"vercel": "^28.18.2",
"yarn-deduplicate": "^6.0.1"
"@1stg/common-config": "^9.0.0",
"@octokit/request": "^8.1.4",
"@types/web": "^0.0.119",
"tsx": "^3.14.0",
"typescript": "^5.2.2",
"vercel": "^32.5.0",
"yarn-deduplicate": "^6.0.2"
},
"resolutions": {
"prettier": "^2.8.7"
"prettier": "^2.8.8"
},
"commitlint": {
"extends": "@1stg"
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "@1stg/tsconfig/node16"
"extends": "@1stg/tsconfig/node16",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
Loading

0 comments on commit 42c08e4

Please sign in to comment.