feat: bump minimum node version to 16 and add tests (#86)

* build: add tests

* build: bump deps

* sigh

* build: install rosetta on m1
This commit is contained in:
Samuel Attard
2023-11-09 10:56:22 -08:00
committed by GitHub
parent 02119d5a83
commit 8e2842b4a3
18 changed files with 3649 additions and 1490 deletions

View File

@@ -3,7 +3,7 @@ import { execFileSync } from 'child_process';
import crypto from 'crypto';
import fs from 'fs-extra';
import path from 'path';
import minimatch from 'minimatch';
import { minimatch } from 'minimatch';
import os from 'os';
import { d } from './debug';
@@ -25,18 +25,15 @@ export type MergeASARsOptions = {
// See: https://github.com/apple-opensource-mirror/llvmCore/blob/0c60489d96c87140db9a6a14c6e82b15f5e5d252/include/llvm/Object/MachOFormat.h#L108-L112
const MACHO_MAGIC = new Set([
// 32-bit Mach-O
0xfeedface,
0xcefaedfe,
0xfeedface, 0xcefaedfe,
// 64-bit Mach-O
0xfeedfacf,
0xcffaedfe,
0xfeedfacf, 0xcffaedfe,
]);
const MACHO_UNIVERSAL_MAGIC = new Set([
// universal
0xcafebabe,
0xbebafeca,
0xcafebabe, 0xbebafeca,
]);
export const detectAsarMode = async (appPath: string) => {