Skip to content

Commit d87a6c4

Browse files
authored
refactor(react-sdk): renamed example server-only react-server-example (#1237)
This PR address the comment on a previous PR (#1218 (comment)) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk rename-only change that updates CI, workspace configuration, and release metadata to point at the renamed example; main risk is missed references breaking builds/tests. > > **Overview** > Renames the React Next.js RSC example from `server-only` to `react-server-example` and updates all references to match (GitHub Actions workflow job/Playwright install, Yarn workspace list, ESLint ignore patterns, and examples README). > > Adjusts release automation (`release-please-config.json`) and the example package name so dependency bumping and CI continue to track the renamed example, and updates `LDIsomorphicProvider` docs to reference the new example name. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b7c6461. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 5a5704c commit d87a6c4

18 files changed

Lines changed: 11 additions & 9 deletions

.github/workflows/react.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
9999
before_test: 'yarn workspace @launchdarkly/react-sdk-example-hello-react playwright install --with-deps chromium'
100100

101-
run-server-only-example:
101+
run-react-server-example:
102102
runs-on: ubuntu-latest
103103
permissions:
104104
id-token: write
@@ -109,6 +109,6 @@ jobs:
109109
node-version: 24
110110
- uses: ./actions/run-example
111111
with:
112-
workspace_name: '@launchdarkly/react-sdk-example-server-only'
112+
workspace_name: '@launchdarkly/react-sdk-example-react-server'
113113
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
114-
before_test: 'yarn workspace @launchdarkly/react-sdk-example-server-only playwright install --with-deps chromium'
114+
before_test: 'yarn workspace @launchdarkly/react-sdk-example-react-server playwright install --with-deps chromium'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"packages/sdk/react",
2222
"packages/sdk/react/contract-tests",
2323
"packages/sdk/react/examples/hello-react",
24-
"packages/sdk/react/examples/server-only",
24+
"packages/sdk/react/examples/react-server-example",
2525
"packages/sdk/react-native",
2626
"packages/sdk/react-native/example",
2727
"packages/sdk/react-native/contract-tests/entity",

packages/sdk/react/.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
ignorePatterns: ['contract-tests/next-env.d.ts', 'examples/server-only/next-env.d.ts'],
2+
ignorePatterns: ['contract-tests/next-env.d.ts', 'examples/react-server-example/next-env.d.ts'],
33
overrides: [
44
{
55
files: ['contract-tests/**/*.ts', 'contract-tests/**/*.tsx'],

packages/sdk/react/examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ This directory contains example applications demonstrating the LaunchDarkly Reac
55
| Example | Description |
66
|---------|-------------|
77
| [hello-react](./hello-react/) | Minimal Vite + React app that evaluates a boolean feature flag and displays the result with real-time updates. This is the recommended starting point. |
8-
| [server-only](./server-only/) | Next.js App Router example demonstrating server-side flag evaluation with React Server Components. |
8+
| [react-server-example](./react-server-example/) | Next.js App Router example demonstrating server-side flag evaluation with React Server Components. |

packages/sdk/react/examples/server-only/.gitignore renamed to packages/sdk/react/examples/react-server-example/.gitignore

File renamed without changes.

packages/sdk/react/examples/server-only/README.md renamed to packages/sdk/react/examples/react-server-example/README.md

File renamed without changes.

packages/sdk/react/examples/server-only/app/App.tsx renamed to packages/sdk/react/examples/react-server-example/app/App.tsx

File renamed without changes.

packages/sdk/react/examples/server-only/app/BootstrappedClient.tsx renamed to packages/sdk/react/examples/react-server-example/app/BootstrappedClient.tsx

File renamed without changes.

packages/sdk/react/examples/server-only/app/layout.tsx renamed to packages/sdk/react/examples/react-server-example/app/layout.tsx

File renamed without changes.

packages/sdk/react/examples/server-only/app/page.tsx renamed to packages/sdk/react/examples/react-server-example/app/page.tsx

File renamed without changes.

0 commit comments

Comments
 (0)