Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new wrapper for appRouter and replace rome with biome #72

Merged
merged 7 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Tests
on:
pull_request:
branches:
- main

jobs:
prerelease:
outputs:
version: ${{ steps.version.outputs.version }}
name: Pre release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Get version
id: version
run: echo "::set-output name=version::v0.0.0-ci.${GITHUB_SHA}-$(date +%Y%m%d%H%M%S)"

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install pnpm
run: npm install -g pnpm

- name: Set version
run: |
echo $(jq --arg v "${{ steps.version.outputs.version }}" '(.version) = $v' package.json) > package.json

- name: Install Dependencies
run: pnpm install

- name: Build
run: pnpm run build

- name: Set NPM_TOKEN
run: npm config set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}

- name: Publish ci version
run: npm publish --tag=ci --verbose
1 change: 0 additions & 1 deletion rome.json → biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"formatter": {
"indentStyle": "space",
"indentSize": 2,
"enabled": true,
"lineWidth": 100,
"ignore": ["node_modules", ".next", "dist", ".nuxt", ".contentlayer"]
Expand Down
11 changes: 11 additions & 0 deletions examples/nextjs/app/serverless/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { verifySignatureAppRouter } from "@upstash/qstash/dist/nextjs";
import { NextRequest, NextResponse } from "next/server";

async function handler(_req: NextRequest) {
// simulate work
await new Promise((r) => setTimeout(r, 1000));

console.log("Success");
return NextResponse.json({ name: "John Doe Serverless" });
}
export const POST = verifySignatureAppRouter(handler);
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,25 @@
"fmt": "pnpm rome check . --apply-unsafe && pnpm rome format . --write"
},
"devDependencies": {
"@types/crypto-js": "^4.1.1",
"@biomejs/biome": "^1.3.3",
"@types/crypto-js": "^4.2.0",
"@types/node": "^20.5.7",
"next": "^13.4.19",
"rome": "12.1.3",
"next": "^14.0.2",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
},
"dependencies": {
"crypto-js": "^4.1.1",
"crypto-js": "^4.2.0",
"jose": "^4.14.4"
},
"typesVersions": {
"*": {
".": ["./dist/index.d.ts"],
"nextjs": ["./dist/nextjs.d.ts"]
".": [
"./dist/index.d.ts"
],
"nextjs": [
"./dist/nextjs.d.ts"
]
}
}
}
Loading