Repository: jupyterlab/jupyter-chat (language: python)

Issue:
Improve the `dev-install` script
The top-level `package.json` has a `dev-install` script here:

https://github.com/jupyterlab/jupyter-chat/blob/025efd158ee42a9562d9f496e340feaefc90f88a/package.json#L36

However the underlying `packages` don't seem to be exposing such `script` in their own `package.json`.

It could be useful to add such script in the different `packages` to speed up the dev install, which would for example run the `jupyter labextension develop . --overwrite` command for the lab extensions.



Discussion / hints:
Thanks for pointing it out @jtpio 

Fix patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2a64431..1848522 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -57,7 +57,7 @@ jobs:
     - name: Build the extensions
       run: |
         set -eux
-        ./scripts/install.sh
+        ./scripts/dev_install.sh
         pytest -vv -r ap --cov
 
   build_extensions:
diff --git a/binder/postBuild b/binder/postBuild
index 0621192..3490797 100755
--- a/binder/postBuild
+++ b/binder/postBuild
@@ -4,7 +4,7 @@
 # Distributed under the terms of the Modified BSD License.
 
 # Install collaborative chat
-./scripts/install.sh collaborative
+./scripts/dev_install.sh collaborative
 
 jupyter troubleshoot
 jupyter notebook --show-config
diff --git a/docs/source/developers/contributing/jupyterlab-collaborative-chat.md b/docs/source/developers/contributing/jupyterlab-collaborative-chat.md
index 0d87fc2..04bfafb 100644
--- a/docs/source/developers/contributing/jupyterlab-collaborative-chat.md
+++ b/docs/source/developers/contributing/jupyterlab-collaborative-chat.md
@@ -17,7 +17,7 @@ The following commands install the extension in development mode:
 
 ```bash
 # Install the extension
-./scripts/install.sh collaborative
+./scripts/dev_install.sh collaborative
 
 # Symlink the assets
 jupyter labextension develop --overwrite python/jupyterlab-collaborative-chat
diff --git a/docs/source/developers/contributing/jupyterlab-ws-chat.md b/docs/source/developers/contributing/jupyterlab-ws-chat.md
index a51362a..02a82e6 100644
--- a/docs/source/developers/contributing/jupyterlab-ws-chat.md
+++ b/docs/source/developers/contributing/jupyterlab-ws-chat.md
@@ -17,7 +17,7 @@ The following commands install the extension in development mode:
 
 ```bash
 # Install the extension
-./scripts/install.sh ws
+./scripts/dev_install.sh ws
 
 # Symlink the assets
 jupyter labextension develop --overwrite python/jupyterlab-ws-chat
diff --git a/package.json b/package.json
index 41d3b40..8b68a1d 100644
--- a/package.json
+++ b/package.json
@@ -35,9 +35,9 @@
     "clean": "lerna run clean",
     "clean:all": "lerna run clean:all",
     "dev": "jupyter lab --config playground/config.py",
-    "dev-install": "lerna run dev-install --stream",
-    "dev-uninstall": "lerna run dev-uninstall --stream",
-    "install-from-src": "lerna run install-from-src --stream",
+    "dev-install": "jlpm dev-install:collaborative && jlpm dev-install:ws",
+    "dev-install:collaborative": "jlpm build:collaborative && lerna run dev-install --scope=jupyterlab-collaborative-chat-extension --include-filtered-dependencies",
+    "dev-install:ws": "jlpm build:ws && lerna run dev-install --scope=jupyterlab-ws-chat-extension --include-filtered-dependencies",
     "lint": "jlpm && lerna run prettier && lerna run eslint",
     "lint:check": "lerna run prettier:check && lerna run eslint:check",
     "watch": "lerna run watch --parallel --stream",
diff --git a/python/jupyterlab-collaborative-chat/package.json b/python/jupyterlab-collaborative-chat/package.json
index 3758740..5378b35 100644
--- a/python/jupyterlab-collaborative-chat/package.json
+++ b/python/jupyterlab-collaborative-chat/package.json
@@ -41,6 +41,7 @@
     "clean:lintcache": "rimraf .eslintcache .stylelintcache",
     "clean:labextension": "rimraf jupyterlab_collaborative_chat/labextension jupyterlab_collaborative_chat/_version.py",
     "clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
+    "dev-install": "pip install -e \".[test]\" && jupyter labextension develop . --overwrite",
     "eslint": "jlpm eslint:check --fix",
     "eslint:check": "eslint . --cache --ext .ts,.tsx",
     "install:extension": "jlpm build",
diff --git a/python/jupyterlab-ws-chat/package.json b/python/jupyterlab-ws-chat/package.json
index 0450103..56345d9 100644
--- a/python/jupyterlab-ws-chat/package.json
+++ b/python/jupyterlab-ws-chat/package.json
@@ -41,6 +41,7 @@
     "clean:lintcache": "rimraf .eslintcache .stylelintcache",
     "clean:labextension": "rimraf jupyterlab_ws_chat/labextension jupyterlab_ws_chat/_version.py",
     "clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
+    "dev-install": "pip install -e \".[test]\" && jupyter labextension develop . --overwrite",
     "eslint": "jlpm eslint:check --fix",
     "eslint:check": "eslint . --cache --ext .ts,.tsx",
     "install:extension": "jlpm build",
diff --git a/scripts/dev_install.sh b/scripts/dev_install.sh
new file mode 100755
index 0000000..d933461
--- /dev/null
+++ b/scripts/dev_install.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
+EXTENSION=$1
+
+# install dependencies
+pip install jupyterlab~=4.0
+
+# install typescript dependencies
+jlpm install
+
+if [ -z "${EXTENSION}" ]; then
+  jlpm dev-install
+else
+  jlpm dev-install:${EXTENSION}
+fi
diff --git a/scripts/install.sh b/scripts/install.sh
deleted file mode 100755
index 7d970dc..0000000
--- a/scripts/install.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# Copyright (c) Jupyter Development Team.
-# Distributed under the terms of the Modified BSD License.
-
-EXTENSION=$1
-
-# install core packages
-pip install jupyterlab~=4.0
-jlpm install
-
-if [ -z "${EXTENSION}" ]; then
-  jlpm build
-  # install the collaborative chat extension
-  pip install -e python/jupyterlab-collaborative-chat[test]
-  jupyter labextension develop --overwrite python/jupyterlab-collaborative-chat
-
-  # install websocket chat extension
-  pip install -e python/jupyterlab-ws-chat[test]
-  jupyter labextension develop --overwrite python/jupyterlab-ws-chat
-else
-  PACKAGE="jupyterlab-${EXTENSION}-chat"
-  jlpm build:${EXTENSION}
-  pip install -e python/${PACKAGE}[test]
-  jupyter labextension develop --overwrite python/${PACKAGE}
-fi


Test patch:
diff --git a/.github/workflows/update-integration-tests.yml b/.github/workflows/update-integration-tests.yml
index fb292ab..ccb6539 100644
--- a/.github/workflows/update-integration-tests.yml
+++ b/.github/workflows/update-integration-tests.yml
@@ -72,7 +72,7 @@ jobs:
         run: python -m pip install -U "jupyterlab>=4.0.0,<5"
 
       - name: Install extension
-        run: ./scripts/install.sh collaborative
+        run: ./scripts/dev_install.sh collaborative
 
       - uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1
         with: