[EngSys] upgrade dev dependency `prettier` to 3.3.3 (#30429)
There's some behavior change that adds parentheses for nullish coalescing in ternary. So we will need to re-format our code base. - remove prettier from packages that don't need them since we run the vendored version via dev-tool
This commit is contained in:
Родитель
70ea132759
Коммит
1b71788c5c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -59,7 +59,7 @@
|
|||
"express": "^4.19.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"minimist": "^1.2.8",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"rollup": "^4.0.0",
|
||||
"rollup-plugin-polyfill-node": "^0.13.0",
|
||||
"rollup-plugin-visualizer": "^5.9.3",
|
||||
|
|
|
@ -170,7 +170,7 @@ export function sourcemaps() {
|
|||
} catch (e) {
|
||||
// eslint-disable-next-line no-inner-declarations
|
||||
function toString(error: unknown): string {
|
||||
return error instanceof Error ? error.stack ?? error.toString() : JSON.stringify(error);
|
||||
return error instanceof Error ? (error.stack ?? error.toString()) : JSON.stringify(error);
|
||||
}
|
||||
this.warn({ message: toString(e), id });
|
||||
return null;
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-plugin-markdown": "^5.0.0",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"source-map-support": "^0.5.9",
|
||||
"vitest": "^1.4.0",
|
||||
|
|
|
@ -52,7 +52,9 @@ export const stripPath = (pathOrFileName: string): string =>
|
|||
* @return true if the package has "type": "module"; false otherwise.
|
||||
*/
|
||||
export function isEsmPackage(filePath: string): boolean {
|
||||
const packageJsonPath = filePath.endsWith("package.json") ? filePath : path.join(path.dirname(filePath), "package.json");
|
||||
const packageJsonPath = filePath.endsWith("package.json")
|
||||
? filePath
|
||||
: path.join(path.dirname(filePath), "package.json");
|
||||
try {
|
||||
statSync(filePath);
|
||||
const packageJsonContent = readFileSync(packageJsonPath, "utf-8");
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
"devDependencies": {
|
||||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.50.0",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"rimraf": "^5.0.0",
|
||||
"typescript": "~5.5.3"
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"homepage": "https://github.com/Azure/azure-sdk-for-js#readme",
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.3",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"semver": "^7.5.4",
|
||||
"yargs": "^17.7.2",
|
||||
"@azure-tools/eng-package-utils": "file:../eng-package-utils"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"eslint": "^8.19.0",
|
||||
"jest": "^29.2.1",
|
||||
"metro-react-native-babel-preset": "0.73.8",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"react-test-renderer": "18.2.0",
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"@types/react": "^18.0.17",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@vitejs/plugin-react": "^2.0.1",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.54.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.0.7"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@azure/api-management-custom-widgets-tools": "^1.0.0-beta.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.54.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.0.7"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.0.3",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.54.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.0.7"
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
"@vitest/coverage-istanbul": "^1.4.0",
|
||||
"eslint": "^8.57.0",
|
||||
"magic-string": "^0.30.8",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^4.14.0",
|
||||
"tshy": "^1.17.0",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"@types/react": "^18.0.17",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@vitejs/plugin-react": "^2.0.1",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.54.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.0.7"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@azure/api-management-custom-widgets-tools": "^1.0.0-beta.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.54.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.0.7"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.0.3",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.54.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.0.7"
|
||||
|
|
|
@ -61,13 +61,13 @@ const envSetupForPlayback: Record<string, string> = {
|
|||
|
||||
const fakeToken = generateToken();
|
||||
const dispatcherEndpoint: string = !isPlaybackMode()
|
||||
? env["DISPATCHER_ENDPOINT"] ?? envSetupForPlayback["DISPATCHER_ENDPOINT"]
|
||||
? (env["DISPATCHER_ENDPOINT"] ?? envSetupForPlayback["DISPATCHER_ENDPOINT"])
|
||||
: envSetupForPlayback["DISPATCHER_ENDPOINT"];
|
||||
const serviceBusConnectionString: string = !isPlaybackMode()
|
||||
? env["SERVICEBUS_STRING"] ?? envSetupForPlayback["DISPATCHER_ENDPOINT"]
|
||||
? (env["SERVICEBUS_STRING"] ?? envSetupForPlayback["DISPATCHER_ENDPOINT"])
|
||||
: envSetupForPlayback["SERVICEBUS_STRING"];
|
||||
export const fileSourceUrl: string = !isPlaybackMode()
|
||||
? env["FILE_SOURCE_URL"] ?? envSetupForPlayback["DISPATCHER_ENDPOINT"]
|
||||
? (env["FILE_SOURCE_URL"] ?? envSetupForPlayback["DISPATCHER_ENDPOINT"])
|
||||
: envSetupForPlayback["FILE_SOURCE_URL"];
|
||||
|
||||
export const dispatcherCallback: string = dispatcherEndpoint + "/api/servicebuscallback/events";
|
||||
|
|
|
@ -21,7 +21,7 @@ export function createRestError(
|
|||
const message =
|
||||
typeof messageOrResponse === "string"
|
||||
? messageOrResponse
|
||||
: internalError.message ?? `Unexpected status code: ${resp.status}`;
|
||||
: (internalError.message ?? `Unexpected status code: ${resp.status}`);
|
||||
return new RestError(message, {
|
||||
statusCode: statusCodeToNumber(resp.status),
|
||||
code: internalError.code,
|
||||
|
|
|
@ -23,7 +23,7 @@ export function createRestError(
|
|||
const message =
|
||||
typeof messageOrResponse === "string"
|
||||
? messageOrResponse
|
||||
: internalError.message ?? `Unexpected status code: ${resp.status}`;
|
||||
: (internalError.message ?? `Unexpected status code: ${resp.status}`);
|
||||
return new RestError(message, {
|
||||
statusCode: statusCodeToNumber(resp.status),
|
||||
code: internalError.code,
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
"@microsoft/api-extractor": "^7.40.3",
|
||||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.55.0",
|
||||
"prettier": "^3.2.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"mkdirp": "^3.0.1",
|
||||
"typescript": "~5.5.3",
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
"@microsoft/api-extractor": "^7.40.3",
|
||||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.55.0",
|
||||
"prettier": "^3.2.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"mkdirp": "^3.0.1",
|
||||
"typescript": "~5.5.3",
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
"magic-string": "~0.30.10",
|
||||
"mocha": "^10.0.0",
|
||||
"nyc": "^17.0.0",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier": "^3.3.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^4.0.0",
|
||||
"sinon": "^17.0.0",
|
||||
|
|
|
@ -101,7 +101,7 @@ export function createModelFromSchema(
|
|||
...baseResult,
|
||||
documents: hasDocuments
|
||||
? baseResult.documents?.map(toDocument)
|
||||
: baseResult.documents ?? [],
|
||||
: (baseResult.documents ?? []),
|
||||
};
|
||||
|
||||
function toDocument(document: AnalyzedDocument): unknown {
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
"@microsoft/api-extractor": "^7.40.3",
|
||||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.55.0",
|
||||
"prettier": "^3.2.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"mkdirp": "^3.0.1",
|
||||
"typescript": "~5.4.5",
|
||||
|
|
|
@ -190,7 +190,7 @@ export class OpenAIClient {
|
|||
inputOptions?: GetAudioTranslationOptions,
|
||||
): Promise<AudioResult<Format>> {
|
||||
const options =
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
|
||||
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
|
||||
this.setModel(deploymentName, options);
|
||||
if (response_format === undefined) {
|
||||
|
@ -235,7 +235,7 @@ export class OpenAIClient {
|
|||
inputOptions?: GetAudioTranscriptionOptions,
|
||||
): Promise<AudioResult<Format>> {
|
||||
const options =
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
|
||||
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
|
||||
this.setModel(deploymentName, options);
|
||||
if (response_format === undefined) {
|
||||
|
|
|
@ -100,7 +100,7 @@ export async function getAudioTranscription<Format extends AudioResultFormat>(
|
|||
inputOptions?: GetAudioTranscriptionOptions,
|
||||
): Promise<AudioResult<Format>> {
|
||||
const options =
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
|
||||
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
|
||||
const { abortSignal, onResponse, requestOptions, tracingOptions, ...rest } = options;
|
||||
const { body, status } = await context
|
||||
|
@ -166,7 +166,7 @@ export async function getAudioTranslation<Format extends AudioResultFormat>(
|
|||
inputOptions?: GetAudioTranslationOptions,
|
||||
): Promise<AudioResult<Format>> {
|
||||
const options =
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
|
||||
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
|
||||
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
|
||||
const { abortSignal, onResponse, requestOptions, tracingOptions, ...rest } = options;
|
||||
const { body, status } = await context
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
"karma": "^6.2.0",
|
||||
"nyc": "^17.0.0",
|
||||
"ts-node": "^10.0.0",
|
||||
"prettier": "^3.2.5",
|
||||
"tshy": "1.15.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче