Skip to content
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

chore: Add browser-telemetry to release please. #745

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Jan 22, 2025

Add release-please support for browser-telemetry and address a number of minor issues.

BEGIN_COMMIT_OVERRIDE
chore: Add browser-telemetry to release please.
fix: Export BrowserTelemetry, BrowserTelemetryInspector, and ImplementsCrumb.
chore: Update documentation comment links that were invalid.
feat: Rename initializeTelemetryInstance to initTelemetryInstance for consistency with initTelemetry.
END_COMMIT_OVERRIDE


release-browser-telemetry:
runs-on: ubuntu-latest
needs: ['release-please', 'release-browser']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we are using the browser package for some type imports.

Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 19014 bytes
Size limit: 21000

Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 15354 bytes
Size limit: 20000

Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Size: 19826 bytes
Size limit: 21000

permissions:
id-token: write
contents: write
if: ${{ always() && !failure() && !cancelled() && needs.release-please.outputs.package-browser-telemetry-released == 'true' }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This incantation allows us to depend on 'release-browser' without requiring that the browser package is being released.

Basically if release-browser is going to run, and it fails, cancel this step.
If it is ran, and it is a success, then run this step.
If it is not ran, but we need to release because we have out own changes, then run this step.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding this comment to the file for posterity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern is used extensively for this project. We probably need a centralized explanation of how to do this.

@@ -68,7 +68,7 @@ export interface Breadcrumb {
/**
* Utility type which allows for easy extension of base breadcrumb type.
*/
type ImplementsCrumb<U extends Breadcrumb> = U;
export type ImplementsCrumb<U extends Breadcrumb> = U;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be exported for documentation generation purposes, but it isn't expected that an application developer would use it.

* {@link breadcrumbs.http.customUrlFilter}.
* If any filter throws an exception, then the error data will be discarded.
*
* For filtering breadcrumbs or URLs in error data, refer to the `breadcrumbs.filters` option in {@link breadcrumbs} and
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some changes to get documentation links working.

@@ -65,6 +65,9 @@
"jsonpath": "$.dependencies['@launchdarkly/server-sdk-ai']"
}
]
},
"packages/telemetry/browser-telemetry": {
"bump-minor-pre-major": true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to 1.0 we want to increment the minor.

0.1.0 -> 0.2.0 etc.

When we do the 1.0 release this will be removed.

@kinyoklion kinyoklion marked this pull request as ready for review January 22, 2025 18:07
@kinyoklion kinyoklion requested a review from a team as a code owner January 22, 2025 18:07
permissions:
id-token: write
contents: write
if: ${{ always() && !failure() && !cancelled() && needs.release-please.outputs.package-browser-telemetry-released == 'true' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding this comment to the file for posterity.

@kinyoklion kinyoklion merged commit 257734f into main Jan 22, 2025
24 checks passed
@kinyoklion kinyoklion deleted the rlamb/emsr-25/release-please-browser-telemetry branch January 22, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants