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 build/run setup and registers it in workspaces.

  • Example app (packages/sdk/shopify-oxygen/example):
    • Runner: app.ts uses @shopify/mini-oxygen to execute compiled worker and poll fetch output.
    • Example worker: src/index.ts initializes @launchdarkly/shopify-oxygen-sdk, evaluates variation, flushes, and returns { flagKey, flagValue }.
    • Build/Run: package.json scripts (build, start) with tsup and ts-node; includes dependencies and ESM config.
    • Config: adds tsconfig.json and tsup.config.ts for ESM build without externalizing the SDK.
    • Docs: README.md with setup and usage instructions.
  • Monorepo config:
    • Adds packages/sdk/shopify-oxygen/example to root package.json workspaces.

Written by Cursor Bugbot for commit 5f0d562. 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

github-actions bot commented Nov 14, 2025

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 21981 bytes
Compressed size limit: 25000
Uncompressed size: 75580 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
@joker23 joker23 requested a review from kinyoklion November 19, 2025 15:12
@joker23 joker23 force-pushed the szhang/sdk-1556/oxygen-sdk-hello-example branch from 2131034 to 594ef58 Compare November 19, 2025 15:43
},
"type": "module",
"dependencies": {
"@launchdarkly/shopify-oxygen-sdk": "latest",
Copy link

Choose a reason for hiding this comment

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

Bug: Example uses latest instead of workspace version

The example package specifies "@launchdarkly/shopify-oxygen-sdk": "latest" which fetches from npm instead of using the local workspace version. Other packages in the monorepo use "*" to reference workspace packages. This causes the example to use a published version rather than the local development version, which breaks the development workflow and could fail if the package isn't published.

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.

I think this is fine? If we are only looking at this from a POV of a how-to example, then I'd argue using latest published version is probably more correct.

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.

4 participants