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