mirror of https://github.com/espruino/BangleApps
Support nodejs 18
parent
a9583f8f6e
commit
cfa615e352
|
@ -16,6 +16,9 @@
|
|||
|
||||
import fs from "node:fs/promises";
|
||||
|
||||
// Nodejs v18 compatibility (v18 is end-of-life in april 2025)
|
||||
if(!("crypto" in globalThis)) globalThis.crypto = (await import("node:crypto")).webcrypto;
|
||||
|
||||
const lintRule = process.argv[2];
|
||||
if (!lintRule) {
|
||||
throw new Error(
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
import fs from "node:fs/promises";
|
||||
|
||||
// Nodejs v18 compatibility (v18 is end-of-life in april 2025)
|
||||
if(!("crypto" in globalThis)) globalThis.crypto = (await import("node:crypto")).webcrypto;
|
||||
|
||||
const exemptionsFilePath = "../apps/lint_exemptions.js";
|
||||
|
||||
const exemptions = (await import(exemptionsFilePath)).default;
|
||||
|
|
Loading…
Reference in New Issue