diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
deleted file mode 100644
index 4dfb56d..0000000
--- a/.github/workflows/codeql.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
- push:
- branches: [ "master" ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ "master" ]
- schedule:
- - cron: '26 22 * * 4'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: [ 'javascript' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Use only 'java' to analyze code written in Java, Kotlin or both
- # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
-
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
- # queries: security-extended,security-and-quality
-
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
- # âšī¸ Command-line programs to run using the OS shell.
- # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
- # If the Autobuild fails above, remove it and uncomment the following three lines.
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
- # - run: |
- # echo "Run, Build Application using script"
- # ./location_of_script_within_repo/buildscript.sh
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
- with:
- category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index 7f3f876..a59ba46 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -3,16 +3,15 @@ name: CI
on:
push:
branches: [ master ]
-
pull_request:
branches: [ master ]
- workflow_dispatch: {}
-
jobs:
Job:
name: Node.js
- uses: artusjs/github-actions/.github/workflows/node-test.yml@v1
+ uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
- version: '8, 10, 12, 14, 16, 18'
+ version: '8, 10, 12, 14, 16, 18, 20, 22'
+ secrets:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1612587..a2bf04a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,14 +4,10 @@ on:
push:
branches: [ master ]
- workflow_dispatch: {}
-
jobs:
release:
name: Node.js
- uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
+ uses: eggjs/github-actions/.github/workflows/node-release.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
- with:
- checkTest: false
diff --git a/README.md b/README.md
index 2eb97e9..3530802 100644
--- a/README.md
+++ b/README.md
@@ -3,26 +3,31 @@
Router core component for [Egg.js](https://github.com/eggjs).
> **This repository is a fork of [koa-router](https://github.com/alexmingoia/koa-router).** with some additional features.
-
-> And thanks for the greate work of @alexmingoia and the original team.
+> And thanks for the great work of @alexmingoia and the original team.
## API Reference
-* [egg-router](#module_egg-router)
- * [Router](#exp_module_egg-router--Router) â
- * [new Router([opts])](#new_module_egg-router--Router_new)
- * _instance_
- * [.get|put|post|patch|delete|del](#module_egg-router--Router+get|put|post|patch|delete|del) â Router
- * [.routes](#module_egg-router--Router+routes) â function
- * [.use([path], middleware)](#module_egg-router--Router+use) â Router
- * [.prefix(prefix)](#module_egg-router--Router+prefix) â Router
- * [.allowedMethods([options])](#module_egg-router--Router+allowedMethods) â function
- * [.redirect(source, destination, [code])](#module_egg-router--Router+redirect) â Router
- * [.route(name)](#module_egg-router--Router+route) â Layer | false
- * [.url(name, params, [options])](#module_egg-router--Router+url) â String | Error
- * [.param(param, middleware)](#module_egg-router--Router+param) â Router
- * _static_
- * [.url(path, params)](#module_egg-router--Router.url) â String
+- [@eggjs/router](#eggjsrouter)
+ - [API Reference](#api-reference)
+ - [Router â](#router-)
+ - [new Router(\[opts\])](#new-routeropts)
+ - [router.get|put|post|patch|delete|del â Router](#routergetputpostpatchdeletedel--router)
+ - [Named routes](#named-routes)
+ - [Multiple middleware](#multiple-middleware)
+ - [Nested routers](#nested-routers)
+ - [Router prefixes](#router-prefixes)
+ - [URL parameters](#url-parameters)
+ - [router.routes â function](#routerroutes--function)
+ - [router.use(\[path\], middleware) â Router](#routerusepath-middleware--router)
+ - [router.prefix(prefix) â Router](#routerprefixprefix--router)
+ - [router.allowedMethods(\[options\]) â function](#routerallowedmethodsoptions--function)
+ - [router.redirect(source, destination, \[code\]) â Router](#routerredirectsource-destination-code--router)
+ - [router.route(name) â Layer | false](#routerroutename--layer--false)
+ - [router.url(name, params, \[options\]) â String | Error](#routerurlname-params-options--string--error)
+ - [router.param(param, middleware) â Router](#routerparamparam-middleware--router)
+ - [Router.url(path, params \[, options\]) â String](#routerurlpath-params--options--string)
+ - [Tests](#tests)
+ - [License](#license)
@@ -412,3 +417,7 @@ const url = Router.url('/users/:id', {id: 1}, {query: { active: true }});
## Tests
Run tests using `npm test`.
+
+## License
+
+[MIT](LICENSE)