Skip to content

Commit 6db692b

Browse files
authored
build: update prettier to 3.4.2 (#221)
1 parent 45230c6 commit 6db692b

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"build": "tsc",
1919
"build:docs": "npx typedoc",
2020
"lint": "prettier --check \"src/**/*.ts\"",
21+
"prettier:write": "prettier --write \"src/**/*.ts\"",
2122
"prepare": "yarn build",
2223
"test": "jest"
2324
},
@@ -37,7 +38,7 @@
3738
"@types/node": "^13.7.7",
3839
"@types/promise-retry": "^1.1.3",
3940
"jest": "^29.0.0",
40-
"prettier": "^1.18.2",
41+
"prettier": "^3.4.2",
4142
"ts-jest": "^29.0.0",
4243
"typedoc": "~0.25.13",
4344
"typedoc-plugin-missing-exports": "^2.2.0",

src/helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Secret {
3333
}
3434

3535
export function makeSecret(s: string) {
36-
return (new Secret(s) as any) as string;
36+
return new Secret(s) as any as string;
3737
}
3838

3939
export function isSecret(s: string) {
@@ -63,10 +63,10 @@ export function parseNotarizationInfo(info: string): NotarizationInfo {
6363
}
6464
};
6565
matchToProperty('uuid', /\n *RequestUUID: (.+?)\n/);
66-
matchToProperty('date', /\n *Date: (.+?)\n/, d => new Date(d));
66+
matchToProperty('date', /\n *Date: (.+?)\n/, (d) => new Date(d));
6767
matchToProperty('status', /\n *Status: (.+?)\n/);
6868
matchToProperty('logFileUrl', /\n *LogFileURL: (.+?)\n/);
69-
matchToProperty('statusCode', /\n *Status Code: (.+?)\n/, n => parseInt(n, 10) as any);
69+
matchToProperty('statusCode', /\n *Status Code: (.+?)\n/, (n) => parseInt(n, 10) as any);
7070
matchToProperty('statusMessage', /\n *Status Message: (.+?)\n/);
7171

7272
if (out.logFileUrl === '(null)') {
@@ -77,5 +77,5 @@ export function parseNotarizationInfo(info: string): NotarizationInfo {
7777
}
7878

7979
export function delay(ms: number): Promise<void> {
80-
return new Promise(resolve => setTimeout(resolve, ms));
80+
return new Promise((resolve) => setTimeout(resolve, ms));
8181
}

src/notarytool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function isNotaryToolAvailable(notarytoolPath?: string) {
7272

7373
export async function notarizeAndWaitForNotaryTool(opts: NotaryToolStartOptions) {
7474
d('starting notarize process for app:', opts.appPath);
75-
return await withTempDir(async dir => {
75+
return await withTempDir(async (dir) => {
7676
const fileExt = path.extname(opts.appPath);
7777
let filePath;
7878
if (fileExt === '.dmg' || fileExt === '.pkg') {

src/spawn.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const spawn = (
1818
'spawning cmd:',
1919
cmd,
2020
'args:',
21-
args.map(arg => (isSecret(arg) ? '*********' : arg)),
21+
args.map((arg) => (isSecret(arg) ? '*********' : arg)),
2222
'opts:',
2323
opts,
2424
);
@@ -28,10 +28,10 @@ export const spawn = (
2828
child.stdout!.on('data', dataHandler);
2929
child.stderr!.on('data', dataHandler);
3030
return new Promise<SpawnResult>((resolve, reject) => {
31-
child.on('error', err => {
31+
child.on('error', (err) => {
3232
reject(err);
3333
});
34-
child.on('exit', code => {
34+
child.on('exit', (code) => {
3535
d(`cmd ${cmd} terminated with code: ${code}`);
3636
resolve({
3737
code,

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,10 +2062,10 @@ pkg-dir@^4.2.0:
20622062
dependencies:
20632063
find-up "^4.0.0"
20642064

2065-
prettier@^1.18.2:
2066-
version "1.19.1"
2067-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
2068-
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
2065+
prettier@^3.4.2:
2066+
version "3.4.2"
2067+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f"
2068+
integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==
20692069

20702070
pretty-format@^29.0.0, pretty-format@^29.3.1:
20712071
version "29.3.1"

0 commit comments

Comments
 (0)