From 638aa5356e0fd38af4de6532a03c18dc90813723 Mon Sep 17 00:00:00 2001 From: imed jaberi Date: Wed, 18 Sep 2024 01:04:46 +0100 Subject: [PATCH] 13.1.0 --- lib/layer.js | 1 + package.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/layer.js b/lib/layer.js index 06f2ed6..8482ea6 100644 --- a/lib/layer.js +++ b/lib/layer.js @@ -231,6 +231,7 @@ module.exports = class Layer { function safeDecodeURIComponent(text) { try { + // TODO: take a look on `safeDecodeURIComponent` if we use it only with route params let's remove the `replace` method otherwise make it flexible. // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#decoding_query_parameters_from_a_url return decodeURIComponent(text.replace(/\+/g, ' ')); } catch { diff --git a/package.json b/package.json index c4cde2e..7497b66 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@koa/router", "description": "Router middleware for koa. Maintained by Forward Email and Lad.", - "version": "13.0.0", + "version": "13.1.0", "author": "Alex Mingoia ", "bugs": { "url": "https://github.com/koajs/router/issues", @@ -68,7 +68,7 @@ "docs": "NODE_ENV=test jsdoc2md -t ./lib/API_tpl.hbs --src ./lib/*.js >| API.md", "lint": "xo --fix && remark . -qfo && fixpack", "prepare": "husky install", - "prextest": "npm run lint", + "pretest": "npm run lint", "test": "mocha test/**/*.js", "test:watch": "mocha test/**/*.js --watch" }