Skip to content

Commit 62d1d08

Browse files
authored
ci(react-sdk): update example app sdk version (#1234)
This PR will: 1. update release please config to update the react example app sdk versions 2. convert the react example apps to use pinned sdk versions instead of `workspace^` 3. added env to skip electron binary download in react contract test to address flaky behavior <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to CI environment variables and dependency version pinning in example apps plus release automation config updates. > > **Overview** > Improves React SDK contract-test CI reliability by setting `ELECTRON_SKIP_BINARY_DOWNLOAD=1` during dependency installation to avoid flaky concurrent Electron downloads. > > Updates the `server-only` React example to use pinned published versions of `@launchdarkly/react-sdk` and `@launchdarkly/node-server-sdk` (instead of `workspace:^`), and extends `release-please-config.json` so releases automatically bump the SDK dependency versions in the `hello-react` and `server-only` example `package.json` files. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 94f9df8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/launchdarkly/js-core/pull/1234" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
1 parent 860efc3 commit 62d1d08

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

.github/workflows/react.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
- name: Install and build contract test dependencies
3535
env:
3636
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
37+
# Skip Electron binary download to avoid flaky race condition during concurrent installs.
38+
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
3739
run: |
3840
yarn workspaces foreach -pR --topological-dev --from '@launchdarkly/react-sdk-contract-tests' install
3941
yarn workspaces foreach -pR --topological-dev --from '@launchdarkly/react-sdk-contract-tests' run build

packages/sdk/react/examples/server-only/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"test": "playwright test"
1010
},
1111
"dependencies": {
12-
"@launchdarkly/node-server-sdk": "workspace:^",
13-
"@launchdarkly/react-sdk": "workspace:^",
12+
"@launchdarkly/node-server-sdk": "9.10.10",
13+
"@launchdarkly/react-sdk": "0.1.1",
1414
"next": "^16",
1515
"react": "^19",
1616
"react-dom": "^19"

release-please-config.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@
5656
},
5757
"packages/sdk/server-node": {
5858
"extra-files": [
59-
"src/platform/NodeInfo.ts"
59+
"src/platform/NodeInfo.ts",
60+
{
61+
"type": "json",
62+
"path": "/packages/sdk/react/examples/server-only/package.json",
63+
"jsonpath": "$.dependencies['@launchdarkly/node-server-sdk']"
64+
}
6065
]
6166
},
6267
"packages/sdk/vercel": {
@@ -106,7 +111,17 @@
106111
"packages/sdk/react": {
107112
"bump-minor-pre-major": true,
108113
"extra-files": [
109-
"src/client/LDReactClient.tsx"
114+
"src/client/LDReactClient.tsx",
115+
{
116+
"type": "json",
117+
"path": "examples/hello-react/package.json",
118+
"jsonpath": "$.dependencies['@launchdarkly/react-sdk']"
119+
},
120+
{
121+
"type": "json",
122+
"path": "examples/server-only/package.json",
123+
"jsonpath": "$.dependencies['@launchdarkly/react-sdk']"
124+
}
110125
]
111126
}
112127
},

0 commit comments

Comments
 (0)