New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lambda-lambda-lambda/router

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lambda-lambda-lambda/router - npm Package Compare versions

Comparing version
0.8.6
to
0.8.7
+72
eslint.config.js
const {defineConfig} = require('eslint/config');
module.exports = defineConfig([
{
languageOptions: {
globals: {
es6: true,
node: true
},
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module'
}
},
rules: {
'array-bracket-spacing': [
2,
'never'
],
'block-scoped-var': 2,
'brace-style': [
2,
'1tbs'
],
'camelcase': 1,
'computed-property-spacing': [
2,
'never'
],
'curly': 2,
'eol-last': 2,
'eqeqeq': [
2,
'smart'
],
'max-depth': [
1,
3
],
'new-cap': 0,
'no-extend-native': 2,
'no-mixed-spaces-and-tabs': 2,
'no-trailing-spaces': 2,
'no-unused-vars': 0,
'no-use-before-define': [
2,
'nofunc'
],
'object-curly-spacing': [
2,
'never'
],
'quotes': [
2,
'single',
'avoid-escape'
],
'semi': [
2,
'always'
],
'keyword-spacing': [
2,
{
'before': true,
'after': true
}
],
'space-unary-ops': 2
}
}
]);
+6
-1

@@ -73,4 +73,9 @@ # Changelog

## [0.8.6] - 2025-17-08
## [0.8.6] - 2025-08-17
- Upgraded outdated NPM packages
## [0.8.7] - 2025-09-21
- Support `async` use in default() route
- Replaced ESLint deprecated release
+1
-1
MIT License
Copyright (c) 2021-2023 Marc S. Brooks (https://mbrooks.info)
Copyright (c) 2021-2025 Marc S. Brooks (https://mbrooks.info)

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "@lambda-lambda-lambda/router",
"description": "AWS CloudFront Lambda@Edge serverless application router.",
"version": "0.8.6",
"version": "0.8.7",
"main": "src/Router.js",

@@ -37,3 +37,3 @@ "scripts": {

"clone": "^2.1.2",
"eslint": "^8.57.1",
"eslint": "^9.36.0",
"jsdoc": "^4.0.4",

@@ -40,0 +40,0 @@ "mocha": "^10.8.2",

# L³ router
[![npm version](https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter.svg)](https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter) [![](https://img.shields.io/npm/dm/@lambda-lambda-lambda/router.svg)](https://www.npmjs.com/package/@lambda-lambda-lambda/router) [![Build Status](https://img.shields.io/github/actions/workflow/status/lambda-lambda-lambda/router/.github%2Fworkflows%2Fci.yml)](https://github.com/lambda-lambda-lambda/router/actions) [![Coverage](https://coveralls.io/repos/lambda-lambda-lambda/router/badge.svg?branch=master)](https://coveralls.io/r/lambda-lambda-lambda/router?branch=master) [![Install size](https://packagephobia.com/badge?p=@lambda-lambda-lambda/router)](https://packagephobia.com/result?p=@lambda-lambda-lambda/router)
[![npm version](https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter.svg)](https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter) [![](https://img.shields.io/npm/dm/@lambda-lambda-lambda/router.svg)](https://www.npmjs.com/package/@lambda-lambda-lambda/router) [![Build Status](https://img.shields.io/github/actions/workflow/status/lambda-lambda-lambda/router/.github%2Fworkflows%2Fci.yml)](https://github.com/lambda-lambda-lambda/router/actions) [![Coverage](https://coveralls.io/repos/lambda-lambda-lambda/router/badge.svg?branch=master)](https://coveralls.io/r/lambda-lambda-lambda/router?branch=master) [![Install size](https://packagephobia.com/badge?p=@lambda-lambda-lambda/router)](https://packagephobia.com/result?p=@lambda-lambda-lambda/router) [![NO AI](https://raw.githubusercontent.com/nuxy/no-ai-badge/master/badge.svg)](https://github.com/nuxy/no-ai-badge)

@@ -62,2 +62,12 @@ AWS [CloudFront Lambda@Edge](https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html) serverless application router.

## AWS changes starting in Node.js 24 (CloudWatch warning)
Going forward, it is recommended that you build your L³ application using `async` handlers in anticipation of the AWS changes below.
> AWS Lambda plans to remove support for callback-based function handlers starting with Node.js 24. You will need to update this function to use an async handler to use Node.js 24 or later. For more information and to provide feedback on this change, see aws/aws-lambda-nodejs-runtime-interface-client#137
While backwards compatibity will be supported for older Node.js releases this support **will eventually be phased out** with the deprecation of `nodejs22.x` (Apr 30, 2027).
See [AWS Node.js Supported Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported) for support information.
## Versioning

@@ -64,0 +74,0 @@

@@ -7,3 +7,3 @@ # Security Policy

| ------- | ------------------ |
| 0.7.x | :white_check_mark: |
| 0.7.x | :x: |
| 0.8.x | :white_check_mark: |

@@ -10,0 +10,0 @@

@@ -5,3 +5,3 @@ /**

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -23,2 +23,3 @@ * http://www.opensource.org/licenses/mit-license.php

const {
isAsyncFunc,
isPromise,

@@ -194,6 +195,12 @@ isValidFunc,

if (isValidFunc(route)) {
const func = (req, res, next) => {
route(req, res, next);
};
let func = route;
if (isAsyncFunc(route) === false) {
// Construct synchronous function.
func = (req, res, next) => {
route(req, res, next);
};
}
setFuncName(func, 'fallback');

@@ -200,0 +207,0 @@

@@ -5,3 +5,3 @@ /**

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -8,0 +8,0 @@ * http://www.opensource.org/licenses/mit-license.php

@@ -5,3 +5,3 @@ /**

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -8,0 +8,0 @@ * http://www.opensource.org/licenses/mit-license.php

@@ -5,3 +5,3 @@ /**

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -8,0 +8,0 @@ * http://www.opensource.org/licenses/mit-license.php

@@ -7,3 +7,3 @@ /** @module router/Route */

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -10,0 +10,0 @@ * http://www.opensource.org/licenses/mit-license.php

@@ -5,3 +5,3 @@ /**

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -8,0 +8,0 @@ * http://www.opensource.org/licenses/mit-license.php

@@ -7,3 +7,3 @@ /** @module router/Utils */

*
* Copyright 2021-2023, Marc S. Brooks (https://mbrooks.info)
* Copyright 2021-2025, Marc S. Brooks (https://mbrooks.info)
* Licensed under the MIT license:

@@ -10,0 +10,0 @@ * http://www.opensource.org/licenses/mit-license.php