Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Nov 14, 2025

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.

  • Shopify Oxygen SDK example (packages/sdk/shopify-oxygen/example):
    • Adds worker example src/index.ts that initializes the SDK, evaluates a flag, and returns { flagKey, flagValue }.
    • Introduces app.js runner using @shopify/mini-oxygen to execute the built worker and periodically print flag results.
    • Includes build/setup files: package.json (scripts/deps), tsconfig.json, tsup.config.ts, and a README with usage instructions.
  • Monorepo:
    • Updates root package.json workspaces to include packages/sdk/shopify-oxygen/example.

Written by Cursor Bugbot for commit 571a063. This will update automatically on new commits. Configure here.

@joker23 joker23 requested a review from a team as a code owner November 14, 2025 17:03
@joker23 joker23 force-pushed the szhang/sdk-1556/oxygen-sdk-hello-example branch from 0199d73 to 4b21616 Compare November 14, 2025 17:04
@github-actions
Copy link
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 169118 bytes
Compressed size limit: 200000
Uncompressed size: 789399 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 24988 bytes
Compressed size limit: 26000
Uncompressed size: 122411 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 21721 bytes
Compressed size limit: 25000
Uncompressed size: 74698 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 17636 bytes
Compressed size limit: 20000
Uncompressed size: 90259 bytes

@joker23 joker23 force-pushed the szhang/sdk-1556/oxygen-sdk-hello-example branch from 4b21616 to 842b764 Compare November 14, 2025 17:15
process.exit();
}
});
});
Copy link

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.

Fix in Cursor Fix in Web

Copy link
Contributor Author

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);
Copy link

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.

Fix in Cursor Fix in Web

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