node 18 on lambda support
This commit is contained in:
parent
f599eeede1
commit
e0b050dacf
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
|
||||
- name: Install Packages
|
||||
run: npm install
|
||||
|
|
@ -42,6 +42,7 @@ jobs:
|
|||
version:
|
||||
- 14
|
||||
- 16
|
||||
- 18
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
|
|
|||
|
|
@ -37,3 +37,14 @@ Resources:
|
|||
- AWSLambdaBasicExecutionRole
|
||||
- AWSXRayDaemonWriteAccess
|
||||
Tracing: Active
|
||||
node18:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Layers:
|
||||
- !Ref layer
|
||||
Handler: handlers/index.handler
|
||||
Runtime: nodejs18.x
|
||||
Policies:
|
||||
- AWSLambdaBasicExecutionRole
|
||||
- AWSXRayDaemonWriteAccess
|
||||
Tracing: Active
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ interface Viewport {
|
|||
hasTouch?: boolean;
|
||||
}
|
||||
|
||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
if (process.env.FONTCONFIG_PATH === undefined) {
|
||||
process.env.FONTCONFIG_PATH = '/tmp/aws';
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ class Chromium {
|
|||
LambdaFS.inflate(`${input}/swiftshader.tar.br`),
|
||||
];
|
||||
|
||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
promises.push(LambdaFS.inflate(`${input}/aws.tar.br`));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue