1
0

12 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
3aaecd8877 3.2.0 2024-01-20 02:22:15 +01:00
d8d13c4339 add npm test command 2024-01-20 02:19:22 +01:00
7 changed files with 32 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
name: Publish (main) name: Publish
on: on:
release: release:
types: [published] types: [ published ]
jobs: jobs:
publish: publish:
@@ -28,4 +28,4 @@ jobs:
- name: Publish to GPR - name: Publish to GPR
env: env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 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/ .github/
src/ src/
test/ tests/
.nvmrc .nvmrc
MIGRATION.md MIGRATION.md
tsconfig.json tsconfig.json

View File

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

4
package-lock.json generated
View File

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

View File

@@ -1,11 +1,12 @@
{ {
"name": "@tsndr/cloudflare-worker-router", "name": "@tsndr/cloudflare-worker-router",
"version": "3.1.3", "version": "3.2.3",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",
"scripts": { "scripts": {
"build": "tsc" "build": "tsc",
"test": "jest"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

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