-
Notifications
You must be signed in to change notification settings - Fork 924
Fix compilation and tests failures #8902
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,7 +130,7 @@ exports.removeAssertTransformer = removeAssertTransformer; | |
*/ | ||
const removeAssertAndPrefixInternalTransformer = service => ({ | ||
before: [ | ||
removeAsserts(service.getProgram()), | ||
removeAsserts(service.getProgram()) | ||
// renameInternals(service.getProgram(), { | ||
// publicIdentifiers, | ||
// prefix: '__PRIVATE_' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to be re-enabled |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ import { | |
TARGET_DB_ID, | ||
USE_EMULATOR | ||
} from './settings'; | ||
import { _onRealtimePipelineSnapshot } from '../../../src/api/pipeline_impl'; | ||
import { RealtimePipeline } from '../../../src/api/realtime_pipeline'; | ||
import { onPipelineSnapshot } from '../../../src/api/reference_impl'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MarkDuckworth This import is suspicious, just to call it out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll take another look. |
||
|
||
/* eslint-disable no-restricted-globals */ | ||
|
||
|
@@ -647,9 +647,11 @@ export async function checkOnlineAndOfflineResultsMatchWithPipelineMode( | |
await checkOnlineAndOfflineResultsMatch(query, ...expectedDocs); | ||
} else { | ||
// pipelineMode === 'query-to-pipeline' | ||
const pipeline = query.firestore.realtimePipeline().createFrom(query); | ||
const pipeline = (query.firestore as Firestore) | ||
.realtimePipeline() | ||
.createFrom(query); | ||
const deferred = new Deferred<RealtimePipelineSnapshot>(); | ||
const unsub = _onRealtimePipelineSnapshot( | ||
const unsub = onPipelineSnapshot( | ||
pipeline, | ||
{ includeMetadataChanges: true }, | ||
snapshot => { | ||
|
@@ -668,7 +670,7 @@ export async function checkOnlineAndOfflineResultsMatchWithPipelineMode( | |
} | ||
|
||
const cacheDeferred = new Deferred<RealtimePipelineSnapshot>(); | ||
const cacheUnsub = _onRealtimePipelineSnapshot( | ||
const cacheUnsub = onPipelineSnapshot( | ||
pipeline, | ||
{ includeMetadataChanges: true, source: 'cache' }, | ||
snapshot => { | ||
|
@@ -689,6 +691,22 @@ export function itIf( | |
return condition === 'only' ? it.only : condition ? it : it.skip; | ||
} | ||
|
||
function getDocsFromPipeline( | ||
pipeline: RealtimePipeline | ||
): Promise<RealtimePipelineSnapshot> { | ||
const deferred = new Deferred<RealtimePipelineSnapshot>(); | ||
const unsub = onSnapshot( | ||
'query-to-pipeline', | ||
pipeline, | ||
(snapshot: RealtimePipelineSnapshot) => { | ||
deferred.resolve(snapshot); | ||
unsub(); | ||
} | ||
); | ||
|
||
return deferred.promise; | ||
} | ||
|
||
export function getDocs( | ||
pipelineMode: PipelineMode, | ||
queryOrPipeline: Query | RealtimePipeline | ||
|
@@ -698,7 +716,7 @@ export function getDocs( | |
const ppl = queryOrPipeline.firestore | ||
.pipeline() | ||
.createFrom(queryOrPipeline); | ||
return getDocsProd( | ||
return getDocsFromPipeline( | ||
new RealtimePipeline( | ||
ppl._db, | ||
ppl.userDataReader, | ||
|
@@ -707,7 +725,7 @@ export function getDocs( | |
) | ||
); | ||
} else { | ||
return getDocsProd(queryOrPipeline); | ||
return getDocsFromPipeline(queryOrPipeline); | ||
} | ||
} | ||
|
||
|
@@ -743,7 +761,7 @@ export function onSnapshot( | |
const ppl = queryOrPipeline.firestore | ||
.pipeline() | ||
.createFrom(queryOrPipeline); | ||
return onSnapshotProd( | ||
return onPipelineSnapshot( | ||
new RealtimePipeline( | ||
ppl._db, | ||
ppl.userDataReader, | ||
|
@@ -754,7 +772,7 @@ export function onSnapshot( | |
obs as any | ||
); | ||
} else { | ||
return onSnapshotProd(queryOrPipeline, options as any, obs as any); | ||
return onPipelineSnapshot(queryOrPipeline, options as any, obs as any); | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be re-enabled