Skip to content

Commit 808ad30

Browse files
chore(release): 1.5.0 [skip ci]
## [1.5.0](v1.4.0...v1.5.0) (2022-12-03) ### 📝 Documentation * **readme:** update sponsors section ([6952f23](6952f23)) ### 🔁 Chore * **deps-dev:** bump @commitlint/cli from 17.0.3 to 17.1.2 ([088f72d](088f72d)) * **deps-dev:** bump @commitlint/cli from 17.1.2 to 17.2.0 ([1609e23](1609e23)) * **deps-dev:** bump @rollup/plugin-node-resolve from 13.3.0 to 14.0.0 ([b0e7950](b0e7950)) * **deps-dev:** bump @rollup/plugin-node-resolve from 14.0.0 to 14.0.1 ([bfbef08](bfbef08)) * **deps-dev:** bump @rollup/plugin-node-resolve from 14.0.1 to 14.1.0 ([96103a8](96103a8)) * **deps-dev:** bump @types/node from 18.11.0 to 18.11.3 ([b23d1ea](b23d1ea)) * **deps-dev:** bump @types/node from 18.11.3 to 18.11.4 ([77292c4](77292c4)) * **deps-dev:** bump @types/node from 18.11.4 to 18.11.5 ([21a4324](21a4324)) * **deps-dev:** bump @types/node from 18.11.5 to 18.11.7 ([b1d44ae](b1d44ae)) * **deps-dev:** bump @types/node from 18.11.7 to 18.11.8 ([8dc09bf](8dc09bf)) * **deps-dev:** bump @types/node from 18.11.8 to 18.11.9 ([794d4db](794d4db)) * **deps-dev:** bump @types/node from 18.11.9 to 18.11.10 ([c899986](c899986)) * **deps-dev:** bump @types/node from 18.7.13 to 18.7.14 ([198feca](198feca)) * **deps-dev:** bump @types/node from 18.7.14 to 18.7.15 ([e2e448c](e2e448c)) * **deps-dev:** bump @types/node from 18.7.15 to 18.7.16 ([e4606be](e4606be)) * **deps-dev:** bump @types/node from 18.7.16 to 18.7.17 ([692bda9](692bda9)) * **deps-dev:** bump @types/node from 18.7.17 to 18.7.18 ([f9b484e](f9b484e)) * **deps-dev:** bump @types/node from 18.7.18 to 18.7.19 ([ed79d09](ed79d09)) * **deps-dev:** bump @types/node from 18.7.19 to 18.7.23 ([6fa8c25](6fa8c25)) * **deps-dev:** bump @types/node from 18.7.23 to 18.8.0 ([b725cf5](b725cf5)) * **deps-dev:** bump @types/node from 18.8.0 to 18.8.2 ([23883f1](23883f1)) * **deps-dev:** bump @types/node from 18.8.2 to 18.8.3 ([b923e45](b923e45)) * **deps-dev:** bump @types/node from 18.8.3 to 18.8.4 ([df12e7e](df12e7e)) * **deps-dev:** bump @types/node from 18.8.4 to 18.8.5 ([8ca6abe](8ca6abe)) * **deps-dev:** bump @types/node from 18.8.5 to 18.11.0 ([c0f0c4e](c0f0c4e)) * **deps-dev:** bump commitlint-config-airlight from 5.0.0 to 5.0.2 ([46685c0](46685c0)) * **deps-dev:** bump eslint from 8.22.0 to 8.23.0 ([3a8ae7b](3a8ae7b)) * **deps-dev:** bump eslint from 8.23.0 to 8.23.1 ([1cc078d](1cc078d)) * **deps-dev:** bump eslint from 8.23.1 to 8.24.0 ([fa75ebc](fa75ebc)) * **deps-dev:** bump eslint from 8.24.0 to 8.25.0 ([ac62d80](ac62d80)) * **deps-dev:** bump eslint from 8.25.0 to 8.26.0 ([f1c4b58](f1c4b58)) * **deps-dev:** bump eslint from 8.26.0 to 8.27.0 ([13ac2fe](13ac2fe)) * **deps-dev:** bump eslint from 8.27.0 to 8.28.0 ([1e8ee3e](1e8ee3e)) * **deps-dev:** bump husky from 8.0.1 to 8.0.2 ([38011bc](38011bc)) * **deps-dev:** bump lint-staged from 13.0.3 to 13.0.4 ([e89a285](e89a285)) * **deps-dev:** bump lint-staged-config-airlight from 3.0.2 to 3.0.4 ([332e090](332e090)) * **deps-dev:** bump prettier from 2.7.1 to 2.8.0 ([53488f9](53488f9)) * **deps-dev:** bump prettier-config-airlight from 1.0.2 to 1.0.5 ([d05b84b](d05b84b)) * **deps-dev:** bump rollup from 2.78.1 to 2.79.0 ([0208105](0208105)) * **deps-dev:** bump rollup from 2.79.0 to 2.79.1 ([f65a82c](f65a82c)) * **deps-dev:** bump rollup-plugin-typescript2 from 0.33.0 to 0.34.0 ([ee4268a](ee4268a)) * **deps-dev:** bump rollup-plugin-typescript2 from 0.34.0 to 0.34.1 ([6081673](6081673)) * **deps-dev:** bump typedoc from 0.23.11 to 0.23.12 ([e324d34](e324d34)) * **deps-dev:** bump typedoc from 0.23.12 to 0.23.13 ([6741495](6741495)) * **deps-dev:** bump typedoc from 0.23.13 to 0.23.14 ([0108de9](0108de9)) * **deps-dev:** bump typedoc from 0.23.14 to 0.23.15 ([825fd6c](825fd6c)) * **deps-dev:** bump typedoc from 0.23.15 to 0.23.16 ([abcc7f7](abcc7f7)) * **deps-dev:** bump typedoc from 0.23.16 to 0.23.17 ([4f3cace](4f3cace)) * **deps-dev:** bump typedoc from 0.23.17 to 0.23.18 ([b89822d](b89822d)) * **deps-dev:** bump typedoc from 0.23.18 to 0.23.19 ([8c26e17](8c26e17)) * **deps-dev:** bump typedoc from 0.23.19 to 0.23.20 ([0992851](0992851)) * **deps-dev:** bump typedoc from 0.23.20 to 0.23.21 ([588f93f](588f93f)) * **deps:** bump minimatch from 3.0.4 to 3.1.2 in /examples/swagger ([490c931](490c931)) ### ✨ Features * update all dependencies and security severity bugs fixed ([72804dd](72804dd))
1 parent 72804dd commit 808ad30

16 files changed

+45
-51
lines changed

cjs/nanoexpress.cjs

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ var analyze = require('@nanoexpress/route-syntax-parser');
1414
var fastDecodeURI = require('fast-decode-uri-component');
1515
var pathToRegexp = require('path-to-regexp');
1616

17-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18-
19-
var uWS__default = /*#__PURE__*/_interopDefaultLegacy(uWS);
20-
var debugLog__default = /*#__PURE__*/_interopDefaultLegacy(debugLog);
21-
var queryParse__default = /*#__PURE__*/_interopDefaultLegacy(queryParse);
22-
var EventsEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventsEmitter);
23-
var analyze__default = /*#__PURE__*/_interopDefaultLegacy(analyze);
24-
var fastDecodeURI__default = /*#__PURE__*/_interopDefaultLegacy(fastDecodeURI);
25-
2617
const request = Symbol('NanoexpressHttpRequestInstance');
2718
const response = Symbol('NanoexpressHttpResponseInstance');
2819
const reqConfig = Symbol('NanoexpressHttpRequestConfig');
@@ -50,9 +41,9 @@ function _gc() {
5041
}
5142
}
5243

53-
const debug = debugLog__default["default"]('nanoexpress');
54-
debugLog__default["default"]('nanoexpress:error');
55-
const warn = debugLog__default["default"]('nanoexpress:warn');
44+
const debug = debugLog('nanoexpress');
45+
debugLog('nanoexpress:error');
46+
const warn = debugLog('nanoexpress:warn');
5647

5748
const lastDeps = [];
5849
const callbacks = [];
@@ -332,7 +323,7 @@ class HttpRequest {
332323
if (options.enableExpressCompatibility && query) {
333324
this.originalUrl += `?${query}`;
334325
}
335-
this.query = queryParse__default["default"](query);
326+
this.query = queryParse(query);
336327
if (this.method === 'POST' || this.method === 'PUT') {
337328
this.stream = new stream.Readable({ read() { } });
338329
this[reqEvents] = null;
@@ -959,7 +950,7 @@ class RouteEngine {
959950
route.path = slashify(route.path);
960951
route.originalUrl = slashify(route.originalUrl);
961952
}
962-
route.path = fastDecodeURI__default["default"](route.path);
953+
route.path = fastDecodeURI(route.path);
963954
if (route.baseUrl === '*') {
964955
route.all = true;
965956
}
@@ -987,7 +978,7 @@ class RouteEngine {
987978
route.async = route.handler.constructor.name === 'AsyncFunction';
988979
route.await = route.handler.toString().includes('await');
989980
route.legacy = route.handler.toString().includes('next(');
990-
route.analyzeBlocks = analyze__default["default"](route.handler);
981+
route.analyzeBlocks = analyze(route.handler);
991982
const usedBlocks = iterateBlocks(route.analyzeBlocks);
992983
if (route.legacy) {
993984
if (config.enableExpressCompatibility) {
@@ -1235,6 +1226,15 @@ class Router {
12351226
}
12361227

12371228
class App extends Router {
1229+
get https() {
1230+
return this._options.https !== undefined;
1231+
}
1232+
get _console() {
1233+
return this._options.console || console;
1234+
}
1235+
get raw() {
1236+
return this._app;
1237+
}
12381238
constructor(options, app) {
12391239
super();
12401240
this._options = options;
@@ -1259,15 +1259,6 @@ class App extends Router {
12591259
this._instance = {};
12601260
return this;
12611261
}
1262-
get https() {
1263-
return this._options.https !== undefined;
1264-
}
1265-
get _console() {
1266-
return this._options.console || console;
1267-
}
1268-
get raw() {
1269-
return this._app;
1270-
}
12711262
setNotFoundHandler(handler) {
12721263
this.defaultRoute = handler;
12731264
return this;
@@ -1488,7 +1479,7 @@ class App extends Router {
14881479
const { _console } = this;
14891480
if (token) {
14901481
const _debugContext = 'debug' in _console ? _console : console;
1491-
uWS__default["default"].us_listen_socket_close(token);
1482+
uWS.us_listen_socket_close(token);
14921483
this._instance[id] = null;
14931484
_debugContext.debug('[Server]: stopped successfully');
14941485
_gc();
@@ -1522,7 +1513,7 @@ function exposeWebsocket(handler, options = {}) {
15221513
const secWsKey = req.getHeader('sec-websocket-key');
15231514
const secWsProtocol = req.getHeader('sec-websocket-protocol');
15241515
const secWsExtensions = req.getHeader('sec-websocket-extensions');
1525-
const events = new EventsEmitter__default["default"]();
1516+
const events = new EventsEmitter();
15261517
res.on = events.on.bind(events);
15271518
res.once = events.once.bind(events);
15281519
res.off = events.off.bind(events);
@@ -1577,21 +1568,21 @@ const nanoexpress = (options = {
15771568
}) => {
15781569
let app;
15791570
if (options.https) {
1580-
app = uWS__default["default"].SSLApp(options.https);
1571+
app = uWS.SSLApp(options.https);
15811572
}
15821573
else if (options.http) {
1583-
app = uWS__default["default"].App(options.http);
1574+
app = uWS.App(options.http);
15841575
}
15851576
else {
1586-
app = uWS__default["default"].App();
1577+
app = uWS.App();
15871578
}
15881579
return new App(options, app);
15891580
};
15901581
nanoexpress.Router = Router;
15911582
nanoexpress.App = App;
15921583
nanoexpress.exposeWebsocket = exposeWebsocket;
15931584

1594-
exports["default"] = nanoexpress;
1585+
exports.default = nanoexpress;
15951586
exports.useCallback = useCallback;
15961587
exports.useEffect = useEffect;
15971588
exports.useMemo = useMemo;

cjs/nanoexpress.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/nanoexpress.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/nanoexpress.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nanoexpress/ultimate",
33
"type": "module",
4-
"version": "1.4.0",
4+
"version": "1.5.0",
55
"description": "Ultimate solution based on nanoexpress and best-practices",
66
"main": "cjs/nanoexpress.js",
77
"module": "esm/nanoexpress.js",

typings/helpers/mime.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ declare const mimes: {
167167
zip: string;
168168
default: string;
169169
};
170-
declare type valueof<T> = T[keyof T];
170+
type valueof<T> = T[keyof T];
171171
declare const getMime: (path: string) => valueof<typeof mimes> | undefined;
172172
export { getMime, mimes };
173173
//# sourceMappingURL=mime.d.ts.map

typings/helpers/mime.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typings/hooks/manager.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export declare type Dependencies = Array<string | number | boolean>;
1+
export type Dependencies = Array<string | number | boolean>;
22
declare const register: (runValue?: boolean, returnValue?: boolean) => (callback: (...args: any[]) => any, dependencies: Dependencies) => (() => any) | any;
33
declare const unregister: () => void;
44
export { register, unregister };

typings/hooks/manager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typings/polyfills/http-request.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference types="node" />
2+
/// <reference types="node" />
23
import { EventEmitter } from 'events';
34
import { Readable, Writable } from 'stream';
45
import { HttpRequest as uWS_HttpRequest, HttpResponse as uWS_HttpResponse } from 'uWebSockets.js';

typings/polyfills/http-request.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typings/polyfills/http-response.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/// <reference types="node" />
2+
/// <reference types="node" />
3+
/// <reference types="node" />
24
import { EventEmitter } from 'events';
35
import { ReadStream } from 'fs';
46
import uWS, { RecognizedString } from 'uWebSockets.js';

typings/polyfills/http-response.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)