Skip to content

Commit c27a49a

Browse files
committed
Merge remote-tracking branch 'origin/master' into LongPollingLogicTweak
2 parents 17519c3 + 61910bd commit c27a49a

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

packages/firebase/gulpfile.js

+10
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,13 @@ gulp.task('cdn-type-module-path', function () {
3838
.pipe(gulp.dest('.'))
3939
);
4040
});
41+
42+
//google3 does not allow imports from absolute URLs, so we cannot use the gstatic link
43+
gulp.task('cdn-type-module-path-internal', function () {
44+
return gulp
45+
.src(files)
46+
.pipe(sourcemaps.init({ loadMaps: true }))
47+
.pipe(replace(/(['"])@firebase\/app(['"])/g, "'./firebase-app.js'"))
48+
.pipe(sourcemaps.write('.'))
49+
.pipe(gulp.dest('.'));
50+
});

packages/firebase/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@
367367
},
368368
"scripts": {
369369
"build": "rollup -c && gulp cdn-type-module-path && yarn build:compat",
370+
"build:internal": "rollup -c && gulp cdn-type-module-path-internal && yarn build:compat",
370371
"build:compat": "rollup -c compat/rollup.config.js",
371372
"dev": "rollup -c -w",
372373
"test": "echo 'No test suite for firebase wrapper'",

packages/firestore/test/unit/api/database.test.ts

+20
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,16 @@ describe('Settings', () => {
379379
expect(db._getSettings().experimentalAutoDetectLongPolling).to.be.false;
380380
});
381381

382+
it('long polling autoDetect=null should be coerced to false', () => {
383+
// Use a new instance of Firestore in order to configure settings.
384+
const db = newTestFirestore();
385+
db._setSettings({
386+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
387+
experimentalAutoDetectLongPolling: null as any
388+
});
389+
expect(db._getSettings().experimentalAutoDetectLongPolling).to.be.false;
390+
});
391+
382392
it('long polling force=[something truthy] should be coerced to true', () => {
383393
// Use a new instance of Firestore in order to configure settings.
384394
const db = newTestFirestore();
@@ -399,6 +409,16 @@ describe('Settings', () => {
399409
expect(db._getSettings().experimentalForceLongPolling).to.be.false;
400410
});
401411

412+
it('long polling force=null should be coerced to false', () => {
413+
// Use a new instance of Firestore in order to configure settings.
414+
const db = newTestFirestore();
415+
db._setSettings({
416+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
417+
experimentalForceLongPolling: null as any
418+
});
419+
expect(db._getSettings().experimentalForceLongPolling).to.be.false;
420+
});
421+
402422
it('gets settings from useEmulator', () => {
403423
// Use a new instance of Firestore in order to configure settings.
404424
const db = newTestFirestore();

0 commit comments

Comments
 (0)