-
Notifications
You must be signed in to change notification settings - Fork 389
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
fix(firestore-bigquery-export) use modules instead of namespaces #1534
Conversation
This is my first time drafting an issue and creating a PR for OSS. |
moduleNameMapper: { | ||
"firebase-admin/firestore": | ||
"<rootDir>/node_modules/firebase-admin/lib/firestore", | ||
}, |
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.
Fixed with reference to the following issue.
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.
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.
lgtm!
CI isn't running for some reason, closing in favour of #1561 |
This is a PR to correct the error in the following issue.
#1533
After checking where the error is occurring, it appears that there is a problem with the require syntax that is importing the module.
I think that the correct code should be as follows (typescripts build to javascripts).
correct:
In other words, I think the problem is using the global admin namespace, as in the following code.
https://github.com/firebase/extensions/blob/firestore-bigquery-export-v0.1.31/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/index.ts#L18
This should be redefined as follows (I am aware that it says so in Use modules instead of namespaces).