Skip to content

docs: point Node.js SDK versions and migration note to @flagsmith/nodejs - #8490

Open
Zaimwa9 wants to merge 2 commits into
mainfrom
docs/nodejs-package-rename
Open

docs: point Node.js SDK versions and migration note to @flagsmith/nodejs#8490
Zaimwa9 wants to merge 2 commits into
mainfrom
docs/nodejs-package-rename

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The Node.js SDK moved to @flagsmith/nodejs at 9.0.0, but the docs still resolved versions from the old flagsmith-nodejs package, so NodejsVersion() and every tsdocs link on the server-side page pointed at 8.1.2.

  • Fetch Node.js versions from @flagsmith/nodejs in the flagsmith-versions plugin.
  • Add a warning under the Node.js install block explaining the rename and deprecation of flagsmith-nodejs.

Context

flagsmith-nodejs currently carries no npm deprecation notice (unlike flagsmith@flagsmith/flagsmith), and it still gets ~25x the weekly downloads of @flagsmith/nodejs. Every published flagsmith-nodejs version sends an unusable user agent, so that install base is invisible in SDK usage analytics. This PR should land alongside an npm owner running:

npm deprecate flagsmith-nodejs@"*" "This package has moved to @flagsmith/nodejs. Please update your dependencies."

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner September 9, 2026 08:40
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 9, 2026 8:43am UTC
2 Skipped Deployments
Project Deployment Actions Updated
flagsmith-frontend-preview Ignored Ignored Preview Sep 9, 2026 8:43am UTC
flagsmith-frontend-staging Ignored Ignored Preview Sep 9, 2026 8:43am UTC

Request Review

@Zaimwa9
Zaimwa9 requested review from matthewelwell and removed request for a team September 9, 2026 08:40
@github-actions github-actions Bot added the docs Documentation updates label Sep 9, 2026
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6ad58c0d-498b-49f7-b24f-6fac5d8b2c7b

📥 Commits

Reviewing files that changed from the base of the PR and between ec513ab and c45daf7.

📒 Files selected for processing (1)
  • docs/src/components/SdkVersions.js

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The documentation identifies @flagsmith/nodejs as the replacement for flagsmith-nodejs and explains the required package and import changes. The Docusaurus versions plugin now fetches versions from @flagsmith/nodejs. The Node.js version component now defaults to ^9 when no specification is provided.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: 🔵 Low · up to c45da

The documentation correctly directs users to the renamed Node.js package, but existing integrations may still need the precise import replacement to complete migration safely. This is a bounded documentation risk.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 43c8dd2b-fc1c-4193-8628-6a14c91469b0

📥 Commits

Reviewing files that changed from the base of the PR and between f16ad68 and ec513ab.

📒 Files selected for processing (2)
  • docs/docs/integrating-with-flagsmith/sdks/server-side.mdx
  • docs/plugins/flagsmith-versions/index.js

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

:::warning

The Node.js SDK moved from `flagsmith-nodejs` to `@flagsmith/nodejs` in version 9.0.0. The `flagsmith-nodejs` package is
deprecated and no longer receives updates. Replace it in your `package.json` and update your imports.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🤖 get_repo_knowledge executed:

get_repo_knowledge Flagsmith/flagsmith /tmp/coderabbit-repo-knowledge/flagsmith-flagsmith-a74d157a/architecture /tmp/coderabbit-repo-knowledge/flagsmith-flagsmith-a74d157a/learnings /tmp/coderabbit-repo-knowledge/flagsmith-flagsmith-a74d157a/conventions

Length of output: 46649


🏁 Script executed:

#!/bin/bash
set -e
file='docs/docs/integrating-with-flagsmith/sdks/server-side.mdx'
sed -n '140,170p' "$file"
printf '\nRelevant package/import references:\n'
rg -n -C 2 'flagsmith-nodejs|`@flagsmith/nodejs`' docs package.json yarn.lock package-lock.json pnpm-lock.yaml 2>/dev/null || true

Repository: Flagsmith/flagsmith

Length of output: 7507


🌐 Web query:

@flagsmith/nodejs version 9.0.0 official documentation CommonJS require import module format

💡 Result:

In @flagsmith/nodejs version 9.0.0 and later, the SDK is provided as an ESM-only package [1][2]. As of version 4.0.0, the package transitioned away from CommonJS (CJS) as the primary format and introduced named exports [2][3]. Because version 9.0.0 is an ESM-only release, it does not support the traditional CommonJS require syntax [1]. You must use the import statement in an ESM context (e.g., using "type": "module" in your package.json or utilizing .mjs file extensions) [1]. To use the Flagsmith client in version 9.0.0, use the following ESM named import: import { Flagsmith } from '@flagsmith/nodejs'; The official documentation for the Flagsmith Node.js SDK can be found at https://docs.flagsmith.com/clients/server-side [4][5][6].

Citations:


State the package replacement and ESM requirement.

The warning must state that users must replace flagsmith-nodejs with @flagsmith/nodejs. Version 9.0.0 and later are ESM-only, so CommonJS require calls must be replaced with ESM import statements.

Suggested wording
-The `flagsmith-nodejs` package is deprecated and no longer receives updates. Replace it in your `package.json` and update your imports.
+The `flagsmith-nodejs` package is deprecated and no longer receives updates. Replace `flagsmith-nodejs` with `@flagsmith/nodejs` in your `package.json`. Version 9.0.0 and later are ESM-only, so replace CommonJS `require` calls with ESM `import` statements.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
deprecated and no longer receives updates. Replace it in your `package.json` and update your imports.
The `flagsmith-nodejs` package is deprecated and no longer receives updates. Replace `flagsmith-nodejs` with `@flagsmith/nodejs` in your `package.json`. Version 9.0.0 and later are ESM-only, so replace CommonJS `require` calls with ESM `import` statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants