-
Notifications
You must be signed in to change notification settings - Fork 942
Feat/google3 typings support #9085
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
base: main
Are you sure you want to change the base?
Feat/google3 typings support #9085
Conversation
🦋 Changeset detectedLatest commit: 83e72ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Our CI workflows do not work on forks. Do you have permission to push a new branch to this repository?
packages/analytics/rollup.config.js
Outdated
const google3TypingsBuild = { | ||
input: 'dist/src/index.d.ts', | ||
output: { | ||
file: 'dist/esm/src/global_index.d.ts', |
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.
I think the output file should be in the same directory as the typings entrypoint.
file: 'dist/esm/src/global_index.d.ts', | |
file: 'dist/src/global_index.d.ts', |
Same thing for remote-config.
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.
Thanks! I applied the changes. However, I do not have direct push permissions to this repository.
962e48e
to
83e72ac
Compare
@@ -49,6 +49,7 @@ | |||
"devDependencies": { | |||
"@firebase/app": "0.13.1", | |||
"rollup": "2.79.2", | |||
"rollup-plugin-dts": "6.1.0", |
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.
Can you downgrade to match the version the other packages use here and in remote config?
https://github.com/firebase/firebase-js-sdk/blob/main/packages/firestore/package.json#L131
"rollup-plugin-dts": "6.1.0", | |
"rollup-plugin-dts": "5.3.1", |
Sorry didn't catch this the first time
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.
Also, I think that adding this dependency should cause the root yarn.lock
file to be updated if you install the dependencies locally. Can you include this file in the PR?
This PR adds a new Rollup build configuration to the analytics and remote-config packages. This is required to generate self-contained TypeScript definition (.d.ts) files, which are necessary for consuming these modular SDKs within google3.
This change follows the process outlined in the internal guide for this migration: go/how-to-migrate-to-modular-firebase-js-sdk.
Discussion
There is no public GitHub issue for this change. This work is part of an internal migration effort for Google's Chronicle SOAR UI (internal design doc: go/soar-custom-signals).
This was discussed internally with members of the Firebase team (Christina Holland), who pointed us to the migration guide that necessitates this PR.
Testing
These changes are additive and only affect the build configuration; they do not modify any of the core library source code in /src. As such, they should not impact existing tests.
The project builds successfully (yarn build) with these changes included. The ultimate test for this change will be its consumption by the internal google3 build process after the generated artifacts are imported.
API Changes
This PR introduces no changes to the public API. All modifications are confined to devDependencies in package.json and the addition of a new, non-default build step in rollup.config.js.