Skip to content

Commit 4be0701

Browse files
kyle-ssgclaude
andauthored
docs: migrate flagsmith-cli and flagsmith-nodejs references to @Flagsmith scope (#7583)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9d6105d commit 4be0701

10 files changed

Lines changed: 22 additions & 23 deletions

File tree

docs/docs/getting-started/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The page looks like this:
7272

7373
For the purposes of this quickstart tutorial, we will import the SDK inline into our web page:
7474

75-
<CodeBlock>{ `<script src="https://cdn.jsdelivr.net/npm/flagsmith@`}<JsVersion />{`/index.js"></script>` } </CodeBlock>
75+
<CodeBlock>{ `<script src="https://cdn.jsdelivr.net/npm/@flagsmith/flagsmith@`}<JsVersion />{`/index.js"></script>` } </CodeBlock>
7676

7777
## 3. Connect to the Flagsmith API
7878

@@ -127,7 +127,7 @@ Our entire web page now reads like this:
127127
<head>
128128
<meta charset="utf-8" />
129129
<title>Flagsmith Quickstart Guide</title>
130-
<script src="https://cdn.jsdelivr.net/npm/flagsmith@`}<JsVersion />{`/index.js"></script>
130+
<script src="https://cdn.jsdelivr.net/npm/@flagsmith/flagsmith@`}<JsVersion />{`/index.js"></script>
131131
<script>
132132
flagsmith.init({
133133
environmentID: 'ZfmJTbLQZrhZVHkVhXbsNi',

docs/docs/integrating-with-flagsmith/CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ workflows.
1414
Install globally:
1515

1616
```bash
17-
npm install -g flagsmith-cli
17+
npm install -g @flagsmith/cli
1818
```
1919

2020
## Sample Usage

docs/docs/integrating-with-flagsmith/sdks/client-side-sdks/javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ You can automatically set default flags for your frontend application as part of
107107

108108
The main steps to achieving this are as follows:
109109

110-
1. Install the [CLI](/integrating-with-flagsmith/CLI) `npm i flagsmith-cli --save-dev`
110+
1. Install the [CLI](/integrating-with-flagsmith/CLI) `npm i @flagsmith/cli --save-dev`
111111
2. Call the CLI as part of npm postinstall to create a `flagsmith.json` file each time you run `npm install`. This can
112112
be done by either:
113113

docs/docs/integrating-with-flagsmith/sdks/server-side.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pip install flagsmith
148148
<TabItem value="nodejs" label="Node.js">
149149

150150
```bash
151-
npm install flagsmith-nodejs
151+
npm install @flagsmith/nodejs
152152
```
153153

154154
</TabItem>
@@ -254,7 +254,7 @@ var flagsmithClient = new FlagsmithClient(
254254
<TabItem value="nodejs" label="Node.js">
255255

256256
```javascript
257-
import { Flagsmith } from 'flagsmith-nodejs';
257+
import { Flagsmith } from '@flagsmith/nodejs';
258258

259259
const flagsmith = new Flagsmith({
260260
environmentKey: 'FLAGSMITH_SERVER_SIDE_ENVIRONMENT_KEY',
@@ -863,11 +863,11 @@ public class MyCustomOfflineHandler: BaseOfflineHandler
863863
<TabItem value="nodejs" label="Node.js">
864864

865865
Use <a
866-
href={`https://www.tsdocs.dev/docs/flagsmith-nodejs/${NodejsVersion()}/classes/LocalFileHandler.html`}>LocalFileHandler</a>
866+
href={`https://www.tsdocs.dev/docs/@flagsmith/nodejs/${NodejsVersion()}/classes/LocalFileHandler.html`}>LocalFileHandler</a>
867867
to read an environment file generated by the [Flagsmith CLI](/integrating-with-flagsmith/CLI):
868868

869869
```typescript
870-
import { Flagsmith, LocalFileHandler } from 'flagsmith-nodejs';
870+
import { Flagsmith, LocalFileHandler } from '@flagsmith/nodejs';
871871

872872
const flagsmith = new Flagsmith({
873873
offlineMode: true,
@@ -876,11 +876,11 @@ const flagsmith = new Flagsmith({
876876
```
877877

878878
To create your own offline handler, implement the `BaseOfflineHandler` interface. It must return an
879-
{/* prettier-ignore */}<a target="_blank" href={`https://www.tsdocs.dev/docs/flagsmith-nodejs/${NodejsVersion()}/classes/EnvironmentModel.html`}>EnvironmentModel</a>
879+
{/* prettier-ignore */}<a target="_blank" href={`https://www.tsdocs.dev/docs/@flagsmith/nodejs/${NodejsVersion()}/classes/EnvironmentModel.html`}>EnvironmentModel</a>
880880
object:
881881

882882
```typescript
883-
import type { BaseOfflineHandler, EnvironmentModel } from 'flagsmith-nodejs';
883+
import type { BaseOfflineHandler, EnvironmentModel } from '@flagsmith/nodejs';
884884

885885
class CustomOfflineHandler implements BaseOfflineHandler {
886886
getEnvironment(): EnvironmentModel {
@@ -1350,8 +1350,8 @@ $flagsmith = Flagsmith::Client.new(
13501350
<TabItem value="nodejs" label="Node.js">
13511351

13521352
```typescript
1353-
import { Flagsmith } from 'flagsmith-nodejs';
1354-
import type { EnvironmentModel } from 'flagsmith-nodejs';
1353+
import { Flagsmith } from '@flagsmith/nodejs';
1354+
import type { EnvironmentModel } from '@flagsmith/nodejs';
13551355

13561356
const flagsmith = new Flagsmith({
13571357
/*
@@ -1824,14 +1824,14 @@ final FlagsAndTraits flags = cache.getIfPresent(projectLevelCacheKey);
18241824
<TabItem value="nodejs" label="Node.js">
18251825

18261826
The `cache` option in the `Flagsmith` constructor accepts a cache implementation. This cache must implement the
1827-
{/* prettier-ignore */}<a href={`https://www.tsdocs.dev/docs/flagsmith-nodejs/${NodejsVersion()}/interfaces/FlagsmithCache.html`}>FlagsmithCache</a>
1827+
{/* prettier-ignore */}<a href={`https://www.tsdocs.dev/docs/@flagsmith/nodejs/${NodejsVersion()}/interfaces/FlagsmithCache.html`}>FlagsmithCache</a>
18281828
interface.
18291829

18301830
For example, this cache implementation uses Redis as a backing store:
18311831

18321832
```typescript
1833-
import { Flagsmith, Flags } from 'flagsmith-nodejs';
1834-
import type { BaseOfflineHandler, EnvironmentModel, FlagsmithCache } from 'flagsmith-nodejs';
1833+
import { Flagsmith, Flags } from '@flagsmith/nodejs';
1834+
import type { BaseOfflineHandler, EnvironmentModel, FlagsmithCache } from '@flagsmith/nodejs';
18351835
import * as redis from 'redis';
18361836

18371837
const redisClient = redis.createClient({

docs/plugins/flagsmith-versions/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default async function fetchFlagsmithVersions(context, options) {
8787
async loadContent() {
8888
const [js, nodejs, java, android, swiftpm, cocoapods, dotnet, rust, elixir, flutter] = await Promise.all(
8989
[
90-
fetchNpmVersions('flagsmith'),
90+
fetchNpmVersions('@flagsmith/flagsmith'),
9191
fetchNpmVersions('flagsmith-nodejs'),
9292
fetchJavaVersions(),
9393
fetchAndroidVersions(),

docs/src/components/SdkVersions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ export const SwiftPMVersion = ({ spec = '~3' }) => Version({ sdk: 'swiftpm', spe
2626
export const DotnetVersion = ({ spec = '~8' }) => Version({ sdk: 'dotnet', spec });
2727
export const ElixirVersion = ({ spec = '~2' }) => Version({ sdk: 'elixir', spec });
2828
export const RustVersion = ({ spec = '~2' }) => Version({ sdk: 'rust', spec });
29-
export const JsVersion = ({ spec = '~9' }) => Version({ sdk: 'js', spec });
29+
export const JsVersion = ({ spec = '^12' }) => Version({ sdk: 'js', spec });
3030
export const NodejsVersion = ({ spec } = { spec: '~6' }) => Version({ sdk: 'nodejs', spec });
3131
export const FlutterVersion = ({ spec = '~6' }) => Version({ sdk: 'flutter', spec });
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default (envId) => `
2-
npm i flagsmith-cli -g
2+
npm i @flagsmith/cli -g
33
export FLAGSMITH_ENVIRONMENT=${envId}
44
flagsmith get
55
`
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import _data from 'common/data/base/_data'
21
export default (serversideEnvironmentKey) => `
3-
npm i flagsmith-cli -g
2+
npm i @flagsmith/cli -g
43
export FLAGSMITH_ENVIRONMENT=${serversideEnvironmentKey}
54
flagsmith get -e document
65
`

frontend/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const keywords = {
7979
LIB_NAME: 'flagsmith',
8080
LIB_NAME_JAVA: 'FlagsmithClient',
8181
NPM_CLIENT: '@flagsmith/flagsmith',
82-
NPM_NODE_CLIENT: 'flagsmith-nodejs',
82+
NPM_NODE_CLIENT: '@flagsmith/nodejs',
8383
SEGMENT_NAME: 'superUsers',
8484
TRAIT_NAME: 'age',
8585
USER_FEATURE_FUNCTION: 'myEvenCoolerFeature',

frontend/web/components/pages/environment-settings/tabs/warehouse-tab/WarehouseEventCodeHelp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ System.out.println("Hello, Flagsmith Warehouse!");`,
4141
enabled: false,
4242
},
4343
'JavaScript': {
44-
code: `import flagsmith from 'flagsmith';
44+
code: `import flagsmith from '@flagsmith/flagsmith';
4545
4646
await flagsmith.init({
4747
environmentID: 'YOUR_ENVIRONMENT_KEY',
@@ -57,7 +57,7 @@ flagsmith.trackEvent('purchase', {
5757
enabled: true,
5858
},
5959
'Node JS': {
60-
code: `import Flagsmith from 'flagsmith-nodejs';
60+
code: `import Flagsmith from '@flagsmith/nodejs';
6161
6262
const flagsmith = new Flagsmith({ environmentKey: 'YOUR_ENVIRONMENT_KEY' });
6363
console.log('Hello, Flagsmith Warehouse!');`,

0 commit comments

Comments
 (0)