Cleanup old node versions
This commit is contained in:
parent
0bc1e5d1ba
commit
1ef67ceae8
|
|
@ -13,7 +13,7 @@
|
|||
"build"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
"node": ">= 14.18.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make clean && make && make pretest && make test",
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
"preversion": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.62",
|
||||
"@types/node": "^18.11.18",
|
||||
"@types/tar-fs": "^2.0.1",
|
||||
"clean-modules": "^2.0.6",
|
||||
"typescript": "^4.8.3"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { access, createWriteStream, existsSync, mkdirSync, symlink } from 'fs';
|
||||
import { IncomingMessage } from 'http';
|
||||
import { access, createWriteStream, existsSync, mkdirSync, symlink } from 'node:fs';
|
||||
import { IncomingMessage } from 'node:http';
|
||||
import LambdaFS from './lambdafs';
|
||||
import { join } from 'path';
|
||||
import { URL } from 'url';
|
||||
import { join } from 'node:path';
|
||||
import { URL } from 'node:url';
|
||||
|
||||
/** Viewport taken from https://github.com/puppeteer/puppeteer/blob/main/docs/api/puppeteer.viewport.md */
|
||||
interface Viewport {
|
||||
|
|
@ -37,7 +37,7 @@ interface Viewport {
|
|||
hasTouch?: boolean;
|
||||
}
|
||||
|
||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
if ( process.env.AWS_EXECUTION_ENV !== undefined && /^AWS_Lambda_nodejs(?:14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
if (process.env.FONTCONFIG_PATH === undefined) {
|
||||
process.env.FONTCONFIG_PATH = '/tmp/aws';
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ class Chromium {
|
|||
LambdaFS.inflate(`${input}/swiftshader.tar.br`),
|
||||
];
|
||||
|
||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
if (process.env.AWS_EXECUTION_ENV !== undefined && /^AWS_Lambda_nodejs(?:14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||
promises.push(LambdaFS.inflate(`${input}/aws.tar.br`));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { createReadStream, createWriteStream, existsSync } from 'fs';
|
||||
import { tmpdir } from 'os';
|
||||
import { basename, join } from 'path';
|
||||
import { createReadStream, createWriteStream, existsSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { basename, join } from 'node:path';
|
||||
import { extract } from 'tar-fs';
|
||||
import { createBrotliDecompress, createUnzip } from 'zlib';
|
||||
import { createBrotliDecompress, createUnzip } from 'node:zlib';
|
||||
|
||||
class LambdaFS {
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue