Skip to content

Commit 1c328c2

Browse files
authored
Update prettier dev-dependency to v2.5.1 in Communication (Azure#19489)
* Format communication-chat * Format communcation-common * Format communication-identity * Format communication-network-traversal * Format communication-phone-numbers * Format communication-short-codes * Format communication-sms * Rush update * rush update and format on communication-sms
1 parent 617f612 commit 1c328c2

File tree

105 files changed

+831
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+831
-833
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-chat/karma.conf.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const {
55
jsonRecordingFilterFunction,
66
isPlaybackMode,
77
isSoftRecordMode,
8-
isRecordMode
8+
isRecordMode,
99
} = require("@azure-tools/test-recorder");
1010

11-
module.exports = function(config) {
11+
module.exports = function (config) {
1212
config.set({
1313
// base path that will be used to resolve all patterns (eg. files, exclude)
1414
basePath: "./",
@@ -29,7 +29,7 @@ module.exports = function(config) {
2929
"karma-sourcemap-loader",
3030
"karma-junit-reporter",
3131
"karma-json-to-file-reporter",
32-
"karma-json-preprocessor"
32+
"karma-json-preprocessor",
3333
],
3434

3535
// list of files / patterns to load in the browser
@@ -44,7 +44,7 @@ module.exports = function(config) {
4444
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
4545
preprocessors: {
4646
"**/*.js": ["sourcemap", "env"],
47-
"recordings/browsers/**/*.json": ["json"]
47+
"recordings/browsers/**/*.json": ["json"],
4848
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
4949
// Preprocess source file to calculate code coverage, however this will make source file unreadable
5050
//"dist-test/index.browser.js": ["coverage"]
@@ -67,8 +67,8 @@ module.exports = function(config) {
6767
{ type: "json", subdir: ".", file: "coverage.json" },
6868
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
6969
{ type: "html", subdir: "html" },
70-
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }
71-
]
70+
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" },
71+
],
7272
},
7373

7474
junitReporter: {
@@ -78,12 +78,12 @@ module.exports = function(config) {
7878
useBrowserName: false, // add browser name to report and classes names
7979
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
8080
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
81-
properties: {} // key value pair of properties to add to the <properties> section of the report
81+
properties: {}, // key value pair of properties to add to the <properties> section of the report
8282
},
8383

8484
jsonToFileReporter: {
8585
filter: jsonRecordingFilterFunction,
86-
outputPath: "."
86+
outputPath: ".",
8787
},
8888

8989
// web server port
@@ -107,8 +107,8 @@ module.exports = function(config) {
107107
customLaunchers: {
108108
HeadlessChrome: {
109109
base: "ChromeHeadless",
110-
flags: ["--no-sandbox"]
111-
}
110+
flags: ["--no-sandbox"],
111+
},
112112
},
113113

114114
// Continuous Integration mode
@@ -123,15 +123,15 @@ module.exports = function(config) {
123123
browserDisconnectTimeout: 10000,
124124
browserDisconnectTolerance: 3,
125125
browserConsoleLogOptions: {
126-
terminal: !isRecordMode()
126+
terminal: !isRecordMode(),
127127
},
128128

129129
client: {
130130
mocha: {
131131
// change Karma's debug.html to the mocha web reporter
132132
reporter: "html",
133-
timeout: "600000"
134-
}
135-
}
133+
timeout: "600000",
134+
},
135+
},
136136
});
137137
};

sdk/communication/communication-chat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"mocha-junit-reporter": "^2.0.0",
114114
"mocha": "^7.1.1",
115115
"nyc": "^15.0.0",
116-
"prettier": "^1.16.4",
116+
"prettier": "^2.5.1",
117117
"rimraf": "^3.0.0",
118118
"rollup-plugin-sourcemaps": "^0.4.2",
119119
"rollup-plugin-shim": "^1.0.0",

sdk/communication/communication-chat/rollup.base.config.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ export function nodeConfig(test = false) {
3030
values: {
3131
// replace dynamic checks with if (true) since this is for node only.
3232
// Allows rollup's dead code elimination to be more aggressive.
33-
"if (isNode)": "if (true)"
34-
}
33+
"if (isNode)": "if (true)",
34+
},
3535
}),
3636
nodeResolve({ preferBuiltins: true }),
3737
json(),
38-
cjs()
39-
]
38+
cjs(),
39+
],
4040
};
4141

4242
if (test) {
@@ -45,7 +45,7 @@ export function nodeConfig(test = false) {
4545
"dist-esm/test/public/*.spec.js",
4646
"dist-esm/test/internal/*.spec.js",
4747
"dist-esm/test/public/node/*.spec.js",
48-
"dist-esm/test/internal/node/*.spec.js"
48+
"dist-esm/test/internal/node/*.spec.js",
4949
];
5050
baseConfig.plugins.unshift(multiEntry({ exports: false }));
5151

@@ -75,7 +75,7 @@ export function browserConfig(test = false) {
7575
format: "umd",
7676
name: "Azure.Communication.Chat",
7777
sourcemap: true,
78-
globals: { "@azure/core-http": "Azure.Core.HTTP" }
78+
globals: { "@azure/core-http": "Azure.Core.HTTP" },
7979
},
8080
preserveSymlinks: false,
8181
plugins: [
@@ -86,31 +86,31 @@ export function browserConfig(test = false) {
8686
// replace dynamic checks with if (false) since this is for
8787
// browser only. Rollup's dead code elimination will remove
8888
// any code guarded by if (isNode) { ... }
89-
"if (isNode)": "if (false)"
90-
}
89+
"if (isNode)": "if (false)",
90+
},
9191
}),
9292
shim({
9393
constants: `export default {}`,
9494
fs: `export default {}`,
9595
os: `export default {}`,
9696
dotenv: `export function config() { }`,
97-
path: `export default {}`
97+
path: `export default {}`,
9898
}),
9999
nodeResolve({
100100
mainFields: ["module", "browser"],
101-
preferBuiltins: false
101+
preferBuiltins: false,
102102
}),
103103
json(),
104104
cjs({
105105
namedExports: {
106106
chai: ["assert"],
107107
events: ["EventEmitter"],
108108
"@azure/communication-signaling": ["CommunicationSignalingClient", "SignalingClient"],
109-
...openTelemetryCommonJs()
110-
}
109+
...openTelemetryCommonJs(),
110+
},
111111
}),
112-
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
113-
]
112+
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false }),
113+
],
114114
};
115115

116116
if (test) {
@@ -119,7 +119,7 @@ export function browserConfig(test = false) {
119119
"dist-esm/test/public/*.spec.js",
120120
"dist-esm/test/internal/*.spec.js",
121121
"dist-esm/test/public/browser/*.spec.js",
122-
"dist-esm/test/internal/browser/*.spec.js"
122+
"dist-esm/test/internal/browser/*.spec.js",
123123
];
124124
baseConfig.plugins.unshift(multiEntry({ exports: false }));
125125
baseConfig.output.file = "dist-test/index.browser.js";

sdk/communication/communication-chat/samples-dev/messageOperations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { ChatClient } from "@azure/communication-chat";
99
import {
1010
AzureCommunicationTokenCredential,
11-
parseConnectionString
11+
parseConnectionString,
1212
} from "@azure/communication-common";
1313
import { CommunicationIdentityClient } from "@azure/communication-identity";
1414

sdk/communication/communication-chat/samples-dev/participantsOperations.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { ChatClient } from "@azure/communication-chat";
99
import {
1010
AzureCommunicationTokenCredential,
1111
getIdentifierKind,
12-
parseConnectionString
12+
parseConnectionString,
1313
} from "@azure/communication-common";
1414
import { CommunicationIdentityClient } from "@azure/communication-identity";
1515

@@ -42,9 +42,9 @@ export async function main() {
4242
participants: [
4343
{
4444
id: userSue.user,
45-
displayName: "Sue"
46-
}
47-
]
45+
displayName: "Sue",
46+
},
47+
],
4848
};
4949
await chatThreadClient.addParticipants(addParticipantsRequest);
5050
console.log(`Added chat participant user.`);

sdk/communication/communication-chat/samples-dev/threadOperations.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { ChatClient } from "@azure/communication-chat";
99
import {
1010
AzureCommunicationTokenCredential,
11-
parseConnectionString
11+
parseConnectionString,
1212
} from "@azure/communication-common";
1313
import { CommunicationIdentityClient } from "@azure/communication-identity";
1414

@@ -35,15 +35,15 @@ export async function main() {
3535
// create chat thread
3636
console.log("Creating Thread...");
3737
const createChatThreadRequest = {
38-
topic: "Hello, World!"
38+
topic: "Hello, World!",
3939
};
4040
const createChatThreadOptions = {
4141
participants: [
4242
{
4343
id: user,
44-
displayName: "Jack"
45-
}
46-
]
44+
displayName: "Jack",
45+
},
46+
],
4747
};
4848
const createChatThreadResult = await chatClient.createChatThread(
4949
createChatThreadRequest,

0 commit comments

Comments
 (0)