Skip to content

Commit

Permalink
feat: add support for nodejs18.x
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed Nov 25, 2022
1 parent db94ec3 commit fac651c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -19,6 +19,7 @@ Serverless plugin to allow middleware handlers configured directly in serverless
- [x] nodejs12.x (both Javascript and Typescript)
- [x] nodejs14.x (both Javascript and Typescript)
- [x] nodejs16.x (both Javascript and Typescript)
- [x] nodejs18.x (both Javascript and Typescript)
- [ ] dotnetcore2.1
- [ ] java8
- [ ] java11
Expand Down Expand Up @@ -61,7 +62,7 @@ For example:
```yaml
provider:
name: aws
runtime: nodejs16.x
runtime: nodejs18.x

functions:
myFunction:
Expand Down Expand Up @@ -119,7 +120,7 @@ For example:

provider:
name: aws
runtime: nodejs16.x
runtime: nodejs18.x

functions:
myFunction:
Expand All @@ -144,7 +145,7 @@ For example:

provider:
name: aws
runtime: nodejs16.x
runtime: nodejs18.x

custom:
middleware:
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Expand Up @@ -195,6 +195,7 @@ class Middleware {
case 'nodejs12.x':
case 'nodejs14.x':
case 'nodejs16.x':
case 'nodejs18.x':
return this.getNodeExtension(handlers);
// TODO add other runtimes
default:
Expand Down
2 changes: 1 addition & 1 deletion test/utils/configUtils.js
Expand Up @@ -21,7 +21,7 @@ function getServerlessConfig(serverlessOverrides = {}) {
servicePath: serverless.config.servicePath,
},
service: {
provider: serverless.service.provider || { stage: '', region: '', runtime: 'nodejs16.x' },
provider: serverless.service.provider || { stage: '', region: '', runtime: 'nodejs18.x' },
defaults: serverless.service.defaults || { stage: '', region: '' },
service: 'middleware-test',
custom: serverless.service.custom,
Expand Down

0 comments on commit fac651c

Please sign in to comment.