1
0

10 Commits

Author SHA1 Message Date
e04bcfb395 3.2.3 2024-01-20 23:32:28 +01:00
f2ba5f5bc5 update npmignore 2024-01-20 23:32:17 +01:00
306c046adb update test 2024-01-20 02:49:45 +01:00
2dab64be19 rename job 2024-01-20 02:37:12 +01:00
175deddc9c fix import 2024-01-20 02:36:32 +01:00
ff638ad04f add testing github action 2024-01-20 02:35:06 +01:00
b118c28dc7 3.2.2 2024-01-20 02:28:22 +01:00
9451f466fc move test file to tests directory 2024-01-20 02:27:50 +01:00
71fcd6c3c0 3.2.1 2024-01-20 02:25:07 +01:00
e55392d890 remove connect and trace method 2024-01-20 02:24:38 +01:00
7 changed files with 30 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
name: Publish (main)
name: Publish
on:
release:
types: [published]
types: [ published ]
jobs:
publish:
@@ -28,4 +28,4 @@ jobs:
- name: Publish to GPR
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npm publish --tag latest --access public
run: npm publish --tag latest --access public

21
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: latest
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test

View File

@@ -1,6 +1,6 @@
.github/
src/
test/
tests/
.nvmrc
MIGRATION.md
tsconfig.json

View File

@@ -240,7 +240,6 @@ Key | Type | Default Value
### Supported Methods
- `router.any(url, [...handlers])`
- `router.connect(url, [...handlers])`
- `router.delete(url, [...handlers])`
- `router.get(url, [...handlers])`
- `router.head(url, [...handlers])`
@@ -248,7 +247,6 @@ Key | Type | Default Value
- `router.patch(url, [...handlers])`
- `router.post(url, [...handlers])`
- `router.put(url, [...handlers])`
- `router.trace(url, [...handlers])`
#### `url` (string)
@@ -410,4 +408,4 @@ export default {
return router.handle(request, env, ctx)
}
}
```
```

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@tsndr/cloudflare-worker-router",
"version": "3.2.0",
"version": "3.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@tsndr/cloudflare-worker-router",
"version": "3.2.0",
"version": "3.2.3",
"license": "MIT",
"devDependencies": {
"@cloudflare/workers-types": "^4.20231025.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@tsndr/cloudflare-worker-router",
"version": "3.2.0",
"version": "3.2.3",
"description": "",
"main": "index.js",
"types": "index.d.ts",

View File

@@ -1,5 +1,5 @@
import { describe, expect, test } from '@jest/globals'
import { Router } from '.'
import { Router } from '../src/index'
describe('Router', () => {
test('use', async () => {