Skip to content

Commit 792556b

Browse files
Merge branch 'mrschmidt/rewritefieldvalue' into mrschmidt/apiblob
2 parents ecec61e + dad9a4a commit 792556b

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

packages/firestore/rollup.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const transformers = [
5151

5252
const terserOptions = {
5353
output: {
54-
comments: "all",
54+
comments: 'all',
5555
beautify: true
5656
},
5757
mangle: {
@@ -89,20 +89,20 @@ const es5Builds = [
8989
},
9090
/**
9191
* Browser CJS Build
92-
*
93-
* The Browser CJS build is not mangled as Terser's property name mangling
92+
*
93+
* The Browser CJS build is not mangled as Terser's property name mangling
9494
* does not work well with CommonJS-style files.
9595
*/
9696
{
9797
input: 'index.ts',
98-
output:{ file: pkg.browser, format: 'cjs', sourcemap: true },
98+
output: { file: pkg.browser, format: 'cjs', sourcemap: true },
9999
plugins: [
100100
typescriptPlugin({
101101
typescript,
102102
cacheRoot: './.cache/cjs/'
103103
}),
104104
json()
105-
],
105+
]
106106
},
107107
/**
108108
* Browser ESM Build

packages/messaging/src/controllers/window-controller.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,14 @@ export class WindowController implements FirebaseMessaging, FirebaseService {
167167
scope: DEFAULT_SW_SCOPE
168168
}
169169
);
170-
171-
// The timing when browser updates sw when sw has an update is unreliable by my experiment.
172-
// It leads to version conflict when the SDK upgrades to a newer version in the main page, but
170+
171+
// The timing when browser updates sw when sw has an update is unreliable by my experiment.
172+
// It leads to version conflict when the SDK upgrades to a newer version in the main page, but
173173
// sw is stuck with the old version. For example, https://github.com/firebase/firebase-js-sdk/issues/2590
174174
// The following line reliably updates sw if there was an update.
175-
this.swRegistration.update().catch(() => { /* it is non blocking and we don't care if it failed */ });
175+
this.swRegistration.update().catch(() => {
176+
/* it is non blocking and we don't care if it failed */
177+
});
176178
} catch (e) {
177179
throw ERROR_FACTORY.create(ErrorCode.FAILED_DEFAULT_REGISTRATION, {
178180
browserErrorMessage: e.message

scripts/run_changed.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,16 @@ const alwaysRunTestPaths = [
5656
* These files trigger tests in other dirs
5757
*/
5858
const specialPaths = {
59-
'scripts/emulator-testing/emulators/firestore-emulator.ts': ['packages/firestore'],
60-
'scripts/emulator-testing/emulators/database-emulator.ts': ['packages/database'],
61-
'scripts/emulator-testing/emulators/emulator.ts': ['packages/firestore', 'packages/database'],
59+
'scripts/emulator-testing/emulators/firestore-emulator.ts': [
60+
'packages/firestore'
61+
],
62+
'scripts/emulator-testing/emulators/database-emulator.ts': [
63+
'packages/database'
64+
],
65+
'scripts/emulator-testing/emulators/emulator.ts': [
66+
'packages/firestore',
67+
'packages/database'
68+
],
6269
'scripts/emulator-testing/firestore-test-runner.ts': ['packages/firestore'],
6370
'scripts/emulator-testing/database-test-runner.ts': ['packages/database']
6471
};
@@ -152,20 +159,19 @@ async function runTests(pathList) {
152159

153160
async function main() {
154161
try {
155-
const {
156-
testAll,
157-
changedPackages = {}
158-
} = await getChangedPackages();
162+
const { testAll, changedPackages = {} } = await getChangedPackages();
159163
if (testAll) {
160164
await spawn('yarn', ['test'], {
161165
stdio: 'inherit'
162166
});
163167
} else {
164168
console.log(chalk`{blue Running tests in:}`);
165-
for (const filename of alwaysRunTestPaths) { // array
169+
for (const filename of alwaysRunTestPaths) {
170+
// array
166171
console.log(chalk`{green ${filename} (always runs)}`);
167172
}
168-
for (const filename in changedPackages) { // obj
173+
for (const filename in changedPackages) {
174+
// obj
169175
if (changedPackages[filename] === 'direct') {
170176
console.log(chalk`{yellow ${filename} (contains modified files)}`);
171177
} else {

0 commit comments

Comments
 (0)