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

build: update prettier to 3.4.2 #221

Merged
merged 1 commit into from
Dec 12, 2024
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build": "tsc",
"build:docs": "npx typedoc",
"lint": "prettier --check \"src/**/*.ts\"",
"prettier:write": "prettier --write \"src/**/*.ts\"",
"prepare": "yarn build",
"test": "jest"
},
Expand All @@ -37,7 +38,7 @@
"@types/node": "^13.7.7",
"@types/promise-retry": "^1.1.3",
"jest": "^29.0.0",
"prettier": "^1.18.2",
"prettier": "^3.4.2",
"ts-jest": "^29.0.0",
"typedoc": "~0.25.13",
"typedoc-plugin-missing-exports": "^2.2.0",
Expand Down
8 changes: 4 additions & 4 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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 @@ -63,10 +63,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 @@ -77,5 +77,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: NotaryToolStartOptions) {
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
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2062,10 +2062,10 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"

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

pretty-format@^29.0.0, pretty-format@^29.3.1:
version "29.3.1"
Expand Down
Loading