-
Notifications
You must be signed in to change notification settings - Fork 31
chore: adding shopify oxygen example #997
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?
Conversation
0199d73 to
4b21616
Compare
|
@launchdarkly/browser size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
4b21616 to
842b764
Compare
| process.exit(); | ||
| } | ||
| }); | ||
| }); |
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.
Bug: Unhandled Promises Threaten Application Stability
The miniOxygen.ready.then() promise chain lacks error handling. If miniOxygen.ready rejects, it will cause an unhandled promise rejection since the promise chain is detached from the main() function's error handling. This could cause the application to crash or behave unexpectedly without proper error reporting.
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.
this is fine
| console.log('Error dispatching fetch:', err.message); | ||
| console.log('Press "q" or Ctrl+C to quit...') | ||
| }); | ||
| }, 1000); |
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.
Bug: Polling Frequency Mismatch: Documentation vs. Reality
The console message and comment state "Dispatching fetch every 5 seconds" but the setInterval uses 1000 milliseconds (1 second). This mismatch between documentation and implementation means the application polls 5 times more frequently than users are told to expect.
This PR will add an example application for Shopify Oxygen SDK
Note
Adds a Shopify Oxygen SDK example app with a mini-oxygen runner and updates the root workspaces to include it.
packages/sdk/shopify-oxygen/example):src/index.tsthat initializes the SDK, evaluates a flag, and returns{ flagKey, flagValue }.app.jsrunner using@shopify/mini-oxygento execute the built worker and periodically print flag results.package.json(scripts/deps),tsconfig.json,tsup.config.ts, and a README with usage instructions.package.jsonworkspaces to includepackages/sdk/shopify-oxygen/example.Written by Cursor Bugbot for commit 571a063. This will update automatically on new commits. Configure here.