From 562845b1e48e33c4bffc26b485841d5dfb9b5cd3 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 20 Nov 2025 09:41:46 +0100 Subject: [PATCH 1/3] feat: add bw licensed context to getting started --- docs/getting-started/sdk/internal/index.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/sdk/internal/index.md b/docs/getting-started/sdk/internal/index.md index 06b64193c..8205b1ff8 100644 --- a/docs/getting-started/sdk/internal/index.md +++ b/docs/getting-started/sdk/internal/index.md @@ -62,18 +62,35 @@ android/ ### Web clients The web clients uses NPM to install the SDK as a dependency. NPM offers a dedicated command -[`link`][npm-link] which can be used to temporarily replace the packages with a local version. +[`link`][npm-link] which can be used to temporarily replace the packages with a local version. The +web SDK has two targets (OSS and Bitwarden License) and the linking command is different for each. +The one to use depends on which version of the client you are building. + +#### OSS ```bash npm link ../sdk-internal/crates/bitwarden-wasm-internal/npm ``` +#### Bitwarden License + +```bash +npm link ../sdk-internal/crates/bitwarden-wasm-internal/bitwarden_license/npm +``` + :::warning Running `npm ci` or `npm install` will replace the linked packages with the published version. ::: +:::warning + +`npm link` can only be used to link one package at a time. If you link the OSS version, the +Bitwarden License version will be automatically unlinked and restored to the published version. + +::: + ### Mobile #### Android From d4dce6604558e5b5dc456f547c2b2643f7af3b43 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 20 Nov 2025 09:46:57 +0100 Subject: [PATCH 2/3] fix: plural --- docs/getting-started/sdk/internal/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/sdk/internal/index.md b/docs/getting-started/sdk/internal/index.md index 8205b1ff8..0699512cc 100644 --- a/docs/getting-started/sdk/internal/index.md +++ b/docs/getting-started/sdk/internal/index.md @@ -61,7 +61,7 @@ android/ ### Web clients -The web clients uses NPM to install the SDK as a dependency. NPM offers a dedicated command +The web clients use NPM to install the SDK as a dependency. NPM offers a dedicated command [`link`][npm-link] which can be used to temporarily replace the packages with a local version. The web SDK has two targets (OSS and Bitwarden License) and the linking command is different for each. The one to use depends on which version of the client you are building. From 5a2f10bc5bdaaf4cb2b217bb29917e5cdd73e508 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 20 Nov 2025 10:44:07 +0100 Subject: [PATCH 3/3] feat: add command to link both versions --- docs/getting-started/sdk/internal/index.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/docs/getting-started/sdk/internal/index.md b/docs/getting-started/sdk/internal/index.md index 0699512cc..5f2b5a456 100644 --- a/docs/getting-started/sdk/internal/index.md +++ b/docs/getting-started/sdk/internal/index.md @@ -63,20 +63,15 @@ android/ The web clients use NPM to install the SDK as a dependency. NPM offers a dedicated command [`link`][npm-link] which can be used to temporarily replace the packages with a local version. The -web SDK has two targets (OSS and Bitwarden License) and the linking command is different for each. -The one to use depends on which version of the client you are building. - -#### OSS +web SDK has two targets (OSS and Bitwarden License) and the following command links both of them: ```bash -npm link ../sdk-internal/crates/bitwarden-wasm-internal/npm +npm link ../sdk-internal/crates/bitwarden-wasm-internal/npm ../sdk-internal/crates/bitwarden-wasm-internal/bitwarden_license/npm ``` -#### Bitwarden License - -```bash -npm link ../sdk-internal/crates/bitwarden-wasm-internal/bitwarden_license/npm -``` +If you only want to link one of the versions, you can run the command with only one of the paths. +Keep in mind that running `npm link` will restore any previously linked packages, so only the paths +in the last run command will be linked. :::warning @@ -84,13 +79,6 @@ Running `npm ci` or `npm install` will replace the linked packages with the publ ::: -:::warning - -`npm link` can only be used to link one package at a time. If you link the OSS version, the -Bitwarden License version will be automatically unlinked and restored to the published version. - -::: - ### Mobile #### Android