Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add lint to test job #79

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 7 additions & 4 deletions src/asar-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
}

Expand Down