Skip to content

chore: Upgrade prettier to 2.8.7 #7832

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

Merged
merged 1 commit into from
Apr 13, 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"mocha": "^6.1.4",
"nodemon": "^2.0.16",
"npm-run-all": "^4.1.5",
"prettier": "2.7.1",
"prettier": "2.8.7",
"recast": "^0.20.5",
"replace-in-file": "^4.0.0",
"rimraf": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tracing/idletransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class IdleTransaction extends Transaction {
*/
private _idleTimeoutID: ReturnType<typeof setTimeout> | undefined;

private _finishReason: typeof IDLE_TRANSACTION_FINISH_REASONS[number] = IDLE_TRANSACTION_FINISH_REASONS[4];
private _finishReason: (typeof IDLE_TRANSACTION_FINISH_REASONS)[number] = IDLE_TRANSACTION_FINISH_REASONS[4];

public constructor(
transactionContext: TransactionContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type App from 'next/app';

type AppGetInitialProps = typeof App['getInitialProps'];
type AppGetInitialProps = (typeof App)['getInitialProps'];

/**
* A passthrough function in case this function is used on the clientside. We need to make the returned function async
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
withTracedServerSideDataFetcher,
} from './utils/wrapperUtils';

type AppGetInitialProps = typeof App['getInitialProps'];
type AppGetInitialProps = (typeof App)['getInitialProps'];

/**
* Create a wrapped version of the user's exported `getInitialProps` function in
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/requestdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export type AddRequestDataToEventOptions = {
/** Flags controlling whether each type of data should be added to the event */
include?: {
ip?: boolean;
request?: boolean | Array<typeof DEFAULT_REQUEST_INCLUDES[number]>;
request?: boolean | Array<(typeof DEFAULT_REQUEST_INCLUDES)[number]>;
transaction?: boolean | TransactionNamingScheme;
user?: boolean | Array<typeof DEFAULT_USER_INCLUDES[number]>;
user?: boolean | Array<(typeof DEFAULT_USER_INCLUDES)[number]>;
};
};

Expand Down
2 changes: 1 addition & 1 deletion packages/tracing-internal/src/node/integrations/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { shouldDisableAutoInstrumentation } from './utils/node-utils';
// This allows us to use the same array for both defaults options and the type itself.
// (note `as const` at the end to make it a union of string literal types (i.e. "a" | "b" | ... )
// and not just a string[])
type Operation = typeof OPERATIONS[number];
type Operation = (typeof OPERATIONS)[number];
const OPERATIONS = [
'aggregate', // aggregate(pipeline, options, callback)
'bulkWrite', // bulkWrite(operations, options, callback)
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/instrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ function instrumentDOM(): void {
});
}

let _oldOnErrorHandler: typeof WINDOW['onerror'] | null = null;
let _oldOnErrorHandler: (typeof WINDOW)['onerror'] | null = null;
/** JSDoc */
function instrumentError(): void {
_oldOnErrorHandler = WINDOW.onerror;
Expand All @@ -649,7 +649,7 @@ function instrumentError(): void {
WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;
}

let _oldOnUnhandledRejectionHandler: typeof WINDOW['onunhandledrejection'] | null = null;
let _oldOnUnhandledRejectionHandler: (typeof WINDOW)['onunhandledrejection'] | null = null;
/** JSDoc */
function instrumentUnhandledRejection(): void {
_oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;
Expand Down
6 changes: 3 additions & 3 deletions packages/utils/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { getGlobalSingleton, GLOBAL_OBJ } from './worldwide';
const PREFIX = 'Sentry Logger ';

export const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] as const;
export type ConsoleLevel = typeof CONSOLE_LEVELS[number];
export type ConsoleLevel = (typeof CONSOLE_LEVELS)[number];

type LoggerMethod = (...args: unknown[]) => void;
type LoggerConsoleMethods = Record<typeof CONSOLE_LEVELS[number], LoggerMethod>;
type LoggerConsoleMethods = Record<(typeof CONSOLE_LEVELS)[number], LoggerMethod>;

/** JSDoc */
interface Logger extends LoggerConsoleMethods {
Expand Down Expand Up @@ -47,7 +47,7 @@ export function consoleSandbox<T>(callback: () => T): T {
} finally {
// Revert restoration to wrapped state
Object.keys(wrappedLevels).forEach(level => {
originalConsole[level] = wrappedLevels[level as typeof CONSOLE_LEVELS[number]];
originalConsole[level] = wrappedLevels[level as (typeof CONSOLE_LEVELS)[number]];
});
}
}
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22093,7 +22093,12 @@ prepend-http@^2.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=

[email protected], prettier@^2.5.1:
[email protected]:
version "2.8.7"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==

prettier@^2.5.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
Expand Down