Skip to content

Commit

Permalink
apply prettier changes
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao committed Jan 17, 2025
1 parent 1b04111 commit 7f0fc11
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Secret {
}

export function makeSecret(s: string) {
return new Secret(s) as any as string;
return (new Secret(s) as any) as string;
}

export function isSecret(s: string) {
Expand Down Expand Up @@ -64,10 +64,10 @@ export function parseNotarizationInfo(info: string): NotarizationInfo {
}
};
matchToProperty('uuid', /\n *RequestUUID: (.+?)\n/);
matchToProperty('date', /\n *Date: (.+?)\n/, (d) => new Date(d));
matchToProperty('date', /\n *Date: (.+?)\n/, d => new Date(d));
matchToProperty('status', /\n *Status: (.+?)\n/);
matchToProperty('logFileUrl', /\n *LogFileURL: (.+?)\n/);
matchToProperty('statusCode', /\n *Status Code: (.+?)\n/, (n) => parseInt(n, 10) as any);
matchToProperty('statusCode', /\n *Status Code: (.+?)\n/, n => parseInt(n, 10) as any);
matchToProperty('statusMessage', /\n *Status Message: (.+?)\n/);

if (out.logFileUrl === '(null)') {
Expand All @@ -78,5 +78,5 @@ export function parseNotarizationInfo(info: string): NotarizationInfo {
}

export function delay(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
return new Promise(resolve => setTimeout(resolve, ms));
}
2 changes: 1 addition & 1 deletion src/notarytool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function isNotaryToolAvailable(notarytoolPath?: string) {

export async function notarizeAndWaitForNotaryTool(opts: NotarizeOptions) {
d('starting notarize process for app:', opts.appPath);
return await withTempDir(async (dir) => {
return await withTempDir(async dir => {
const fileExt = path.extname(opts.appPath);
let filePath;
if (fileExt === '.dmg' || fileExt === '.pkg') {
Expand Down
6 changes: 3 additions & 3 deletions src/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const spawn = (
'spawning cmd:',
cmd,
'args:',
args.map((arg) => (isSecret(arg) ? '*********' : arg)),
args.map(arg => (isSecret(arg) ? '*********' : arg)),
'opts:',
opts,
);
Expand All @@ -28,10 +28,10 @@ export const spawn = (
child.stdout!.on('data', dataHandler);
child.stderr!.on('data', dataHandler);
return new Promise<SpawnResult>((resolve, reject) => {
child.on('error', (err) => {
child.on('error', err => {
reject(err);
});
child.on('exit', (code) => {
child.on('exit', code => {
d(`cmd ${cmd} terminated with code: ${code}`);
resolve({
code,
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ export interface NotaryToolNotarizeAppOptions {
* Options for notarizing your Electron app with `notarytool`.
* @category Core
*/
export type NotarizeOptions = NotaryToolNotarizeAppOptions & NotaryToolCredentials;
export type NotarizeOptions = NotaryToolNotarizeAppOptions & NotaryToolCredentials;

0 comments on commit 7f0fc11

Please sign in to comment.