Skip to content

Commit

Permalink
Move yauzl to dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
kewisch committed Jun 13, 2024
1 parent 38eeea5 commit eddffb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/scriptutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import { Octokit } from "@octokit/core";
import fetch from 'node-fetch';
import yauzl from 'yauzl-promise';
import fs from "fs/promises";
import fsc from "fs";
import path from "path";
Expand Down Expand Up @@ -64,6 +63,11 @@ async function get_latest_main(outFile) {
}

let buffer = Buffer.from(await response.arrayBuffer());

// Yauzl has been difficult due to the native bindings for crc32.
// Import ad-hoc to make GitHub Actions work.
let yauzl = await import("yauzl-promise");

let archive = await yauzl.fromBuffer(buffer);

let entry;
Expand Down

0 comments on commit eddffb1

Please sign in to comment.