From d37dae8cdd4cc79031802a2ece7955e052adb888 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 21 Nov 2024 11:45:53 -0800 Subject: [PATCH 1/2] test: remove unused index.test-d.ts file --- test/index.test-d.ts | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 test/index.test-d.ts diff --git a/test/index.test-d.ts b/test/index.test-d.ts deleted file mode 100644 index 6646534..0000000 --- a/test/index.test-d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as asar from '..'; -import * as fs from 'fs'; -import * as crypto from 'crypto'; -import { expectType } from 'tsd'; - -await asar.createPackage('bin', 'tmp/foo.asar'); -await asar.createPackageWithOptions('bin', 'tmp/foo.asar', { - dot: true, - globOptions: { - debug: true, - }, - transform: (filePath: string) => { - if (process.env.TRANSFORM_ASAR) { - return crypto - .createCipheriv('aes-256-cbc', crypto.randomBytes(32), crypto.randomBytes(16)) - .setAutoPadding(true) - .setEncoding('base64'); - } - }, -}); -await asar.createPackageFromFiles('bin', 'tmp/foo.asar', ['bin/asar.js']); -const stat = fs.statSync('bin/asar.js'); -await asar.createPackageFromFiles('bin', 'tmp/foo.asar', ['bin/asar.js'], { - 'bin/asar.js': { - type: 'file', - stat, - }, -}); - -expectType(asar.statFile('tmp/foo.asar', 'bin/asar.js')); -expectType(asar.statFile('tmp/foo.asar', 'bin/asar.js', false)); - -expectType(asar.listPackage('tmp/foo.asar')); -expectType(asar.listPackage('tmp/foo.asar', { isPack: true })); - -expectType(asar.extractFile('tmp/foo.asar', 'bin/asar.js')); - -asar.extractAll('tmp/foo.asar', 'tmp'); - -expectType(asar.uncache('tmp/foo.asar')); - -asar.uncacheAll(); From 6ddac6057d8ec164ecad426bdcabf35f629879a2 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 21 Nov 2024 11:51:57 -0800 Subject: [PATCH 2/2] build: remove prettier pattern with no matches --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1f0af2..3ca3ad5 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec", "test": "yarn lint && yarn mocha", "lint": "yarn prettier:check", - "prettier": "prettier \"src/**/*.ts\" \"test/**/*.ts\" \"test/**/*.js\"", + "prettier": "prettier \"src/**/*.ts\" \"test/**/*.js\"", "prettier:check": "yarn prettier --check", "prettier:write": "yarn prettier --write", "prepare": "tsc"