@chatbridge/vscode 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -5
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -90,11 +90,32 @@ Bundle with esbuild as CJS, with `vscode` and `playwright` marked external.
90
90
  `examples/vscode-dummy-chat` keeps `"type": "module"` in its manifest, so
91
91
  its bundle is `dist/extension.cjs`, not `.js` — match that if you copy the
92
92
  example's `esbuild.mjs`. Its `package` script runs
93
- `vsce package --no-dependencies`, which is only a CI packaging smoke test.
94
- A real vendor `.vsix` must ship `node_modules/playwright` so the Install
95
- Browser button works for end users: drop `--no-dependencies` when
96
- packaging for distribution, or vendors get "playwright is not bundled with
97
- this extension" from the Install button.
93
+ `vsce package --no-dependencies`, which is only a CI packaging smoke test
94
+ (its `workspace:*` dependencies cannot be npm-installed). A distributable
95
+ `.vsix` must ship `node_modules/playwright` so the Install Browser button
96
+ works for end users; without it the button reports "playwright is not
97
+ bundled with this extension".
98
+
99
+ ### Building a distributable `.vsix` (vendor repo)
100
+
101
+ 1. In the extension's `package.json`, keep only `playwright` under
102
+ `dependencies`. `@chatbridge/vscode` (and everything it pulls in) is
103
+ inlined by esbuild, so it belongs in `devDependencies` together with
104
+ `esbuild` and `@vscode/vsce`.
105
+ 2. Build the bundle: `bun run build` (esbuild → `dist/extension.cjs` and
106
+ `dist/webview/`).
107
+ 3. Create a plain production `node_modules` with npm, not bun:
108
+ `rm -rf node_modules && npm install --omit=dev`. vsce discovers
109
+ dependencies by walking npm's layout; bun's symlinked workspace tree
110
+ makes that walk escape the folder. The result is just `playwright` and
111
+ `playwright-core`.
112
+ 4. `npx @vscode/vsce package` (no `--no-dependencies`). Expect roughly 4 MB
113
+ and about 185 files.
114
+ 5. Verify: `unzip -l *.vsix | grep node_modules/playwright/cli.js`. Then
115
+ restore the dev tree with `bun install`.
116
+ 6. Install locally with `code --install-extension <file>.vsix`. Chromium is
117
+ never inside the `.vsix`: end users get it from the Install Browser
118
+ button (or `npx playwright install chromium`).
98
119
 
99
120
  `examples/vscode-dummy-chat` in the framework repo is the reference
100
121
  implementation to copy into a vendor repo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbridge/vscode",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "VSCode extension factory for chatbridge: a sidebar chat view on top of ChatSession",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "build:webview": "bun run check:webview && esbuild src/webview/main.ts --bundle --format=iife --target=es2022 --outfile=dist/webview/main.js && mkdir -p dist/webview && cp src/webview/style.css dist/webview/style.css"
29
29
  },
30
30
  "dependencies": {
31
- "@chatbridge/core": "0.7.0"
31
+ "@chatbridge/core": "0.8.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/vscode": "1.138.0",