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

feat: hono adapter #10

Merged
merged 19 commits into from
Jul 12, 2024
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
5 changes: 2 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": [
"@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest"
},
"ignorePatterns": ["playground/**"],
"rules": {
"no-unused-labels": 0,
"@typescript-eslint/ban-ts-comment": 0,
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ jobs:
- name: Build
run: pnpm run build

- name: Run CI tests
- name: Run lint
run: pnpm run lint

- name: Run typecheck
run: pnpm run test:typecheck

- name: Run tests
run: pnpm run test
3 changes: 3 additions & 0 deletions .idea/universal-handler.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"dev:hattip": "hattip serve ./playground/hattip-entry.ts --client",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"build": "pnpm run -r build",
"test": "pnpm run -r test"
"test": "pnpm run -r --sequential test",
"test:typecheck": "pnpm run -r test:typecheck"
},
"keywords": [],
"author": "",
Expand Down Expand Up @@ -50,5 +51,10 @@
"tsx": "^4.16.2",
"vite": "^5.3.3"
},
"pnpm": {
"overrides": {
"@universal-middleware/core": "link:./packages/core"
}
},
"packageManager": "[email protected]"
}
Binary file removed packages/.DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/adapter-express/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"imports": {
"@universal-middleware/tests": "../tests/dist",
"mri": "npm:mri",
"zx": "npm:zx",
"wait-port": "npm:wait-port"
}
}
140 changes: 15 additions & 125 deletions packages/adapter-express/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions packages/adapter-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"files": [
"dist"
],
"types": "./config.d.ts",
"exports": {
".": "./dist/index.js"
},
Expand All @@ -29,19 +28,19 @@
"release:minor": "LANG=en_US release-me minor",
"release:commit": "LANG=en_US release-me commit"
},
"dependencies": {
"@universal-middleware/core": "^0.1.1"
},
"devDependencies": {
"@brillout/release-me": "^0.3.9",
"@types/node": "^20.14.10",
"@universal-middleware/tests": "workspace:*",
"express": "^4.19.2",
"helmet": "^7.1.0",
"mri": "^1.2.0",
"readable-stream": "^4.5.2",
"rimraf": "^6.0.0",
"tsup": "^8.1.0",
"tsx": "^4.16.2",
"typescript": "^5.5.3",
"vitest": "^2.0.2",
"wait-port": "^1.1.0",
"zx": "^8.1.4"
"vitest": "^2.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/adapter-express/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
Awaitable,
UniversalHandler,
UniversalMiddleware,
} from "./types.js";
} from "@universal-middleware/core";

export const contextSymbol = Symbol("unContext");
export const requestSymbol = Symbol("unRequest");
Expand Down
Loading