From 381ca1a7488ba505f9e970ceb42ebc5c36e0c978 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 31 Aug 2023 11:17:25 -0700 Subject: [PATCH] chore: fix lint and add lint to CI job (#79) --- .circleci/config.yml | 1 + package.json | 1 + src/asar-utils.ts | 11 +++++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a9eb8f9..48e46f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,7 @@ workflows: override-ci-command: yarn install --frozen-lockfile --ignore-engines test-steps: - run: yarn build + - run: yarn lint - run: yarn test use-test-steps: true matrix: diff --git a/package.json b/package.json index fb76241..32fed1d 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "scripts": { "build": "tsc && tsc -p tsconfig.esm.json", "lint": "prettier --check \"src/**/*.ts\"", + "prettier:write": "prettier --write \"src/**/*.ts\"", "prepublishOnly": "npm run build", "test": "exit 0", "prepare": "husky install" diff --git a/src/asar-utils.ts b/src/asar-utils.ts index 792f04b..65a95cf 100644 --- a/src/asar-utils.ts +++ b/src/asar-utils.ts @@ -34,9 +34,9 @@ const MACHO_MAGIC = new Set([ ]); const MACHO_UNIVERSAL_MAGIC = new Set([ - // universal - 0xcafebabe, - 0xbebafeca, + // universal + 0xcafebabe, + 0xbebafeca, ]); export const detectAsarMode = async (appPath: string) => { @@ -153,7 +153,10 @@ export const mergeASARs = async ({ continue; } - if (MACHO_UNIVERSAL_MAGIC.has(x64Content.readUInt32LE(0)) && MACHO_UNIVERSAL_MAGIC.has(arm64Content.readUInt32LE(0))) { + if ( + MACHO_UNIVERSAL_MAGIC.has(x64Content.readUInt32LE(0)) && + MACHO_UNIVERSAL_MAGIC.has(arm64Content.readUInt32LE(0)) + ) { continue; }